## 5 Discussion and Conclusions  
In model design, we focused on the following key aspects: the characteristics of the pedestrian trajectories, the interaction between pedestrians, the interaction between pedestrians and the environment, and the effect of travel intentions on pedestrians. When considering the interaction between pedestrians and the environment, we designed the Scene Potential Module, which takes into account that pedestrians walking in crowded environments are not only influenced by other people's behaviors but also constrained and guided by obstacles in the surrounding environment (e.g., walls and fences). The module aims to capture the potential influence of obstacles in the environment on pedestrian path choice, which is reflected in the fact that pedestrians are more inclined to pass through areas of low resistance and avoid areas of high resistance or dense obstacles. The Transition Intention Module was designed to model pedestrians' travel preferences and historical frequency to specific locations by capturing their travel preferences and historical frequency to specific locations, taking into account the fact that pedestrians' movement trajectories are closely related to their own travel intentions, which determine their destination choices and intrinsic motivations when choosing a path. In addition to this, to better fuse the encoded data of pedestrian's trajectory sequences with scene features and intention features, we use a multi-head attention mechanism and a fully connected layer to fuse these features. The multi-head attention mechanism enhances the understanding of complex crowd dynamics  
Figure 9: The model’s trajectory prediction results in various scenarios are as follows: scenario (**a**) represents one person following two people; scenario (**b**) represents one person meeting a group of pedestrians; scenario (**c**) represents two people walking in parallel; scenario (**d**) represents a group of pedestrians moving in the opposite direction; and scenario (**e**) represents a group of pedestrians gathering in the same direction. by focusing on different subspaces of the input data at the same time and by computing multiple attention heads in parallel, enabling the model to extract dimensional information from different perspectives and features. This paper presents the SA-GAT model, designed to forecast pedestrian paths and tackle the difficulties arising from dynamic interactions, randomness, and environmental factors. The model consists of an LSTM encoder, GAT pedestrian interaction feature extraction module, Scene Potential Module (Scene Tensor), pedestrian Transition Intention Module (Transition Tensor), and LSTM decoder. The framework incorporates diverse social variables and scene information to augment the model's capacity to forecast pedestrian trajectories. The quality of our model is validated by comparative studies with seven other models. Experimental results indicate that our model's performance has improved, especially in scenarios involving crowd interaction, pedestrian surrounding environment information, and pedestrian travel destinations. The visualization results demonstrate the model's ability to effectively allocate attention weights to make accurate predictions in different scenarios. Accurately predicting pedestrian trajectories is crucial for advancing service robots, which helps to improve their safety and intelligence, and bring a better experience for people. While this paper's model is currently focused on pedestrian trajectory prediction, future work will broaden its scope. We plan to enhance trajectory prediction by integrating additional semantic information for various targets, including pedestrians, vehicles, and bicycles. In addition, we will consider unexpected environmental factors such as sudden changes in weather conditions and unexpected obstacles in our future work in order to enhance the dynamic adaptive capability of the model to better cope with unexpected situations. M.Z.