# Research on Multi-Port Ship Traffic Prediction Method Based on Spatiotemporal Graph Neural Networks
## 1 Introduction  
Maritime transportation, characterized by its substantial carrying capacity, cost-effectiveness, and remarkable adaptability to diverse environmental conditions, plays a significant role in international trade as an important mode of transportation. The accurate prediction of ship traffic flow holds immense significance, as it offers invaluable data support for the advancement of the national maritime industry and the strategic planning of international trade initiatives. Furthermore, it plays a crucial role in facilitating port layout planning, thereby addressing the prevalent challenge of aligning the port capacity with the escalating number of vessels arising from the rapid growth of the maritime industry. Additionally, this predictive capability contributes to the reduction of traffic congestion and the mitigation of accidents within maritime areas, consequently enhancing the overall efficiency of port infrastructure utilization [1]. This paper primarily concentrates on the prediction of maritime traffic flow in multi-port scenarios. Traffic flow prediction entails a typical task of time series forecasting,wherein the objective is to capture inherent patterns within traffic flow and speed data, characterized by their temporal sequences. By effectively discerning such patterns, it becomes feasible to infer future traffic flow states [2]. The primary challenge in time series prediction lies in accurately extracting a consistent temporal pattern. In practice, numerous factors, including environmental fluctuations, seasonal variations, and unforeseen accidents, can disrupt these theoretically stable patterns, thereby adding a considerable level of complexity to time series prediction problems. Consequently, time series prediction methods necessitate the incorporation of diverse influencing factors [3]. In the past, linear methods such as Autoregressive Integrated Moving Average (ARIMA) models and historical average analysis were limited in handling complex external factors. Scholars have attempted to use nonlinear machine learning methods such as backpropagation networks [4] and support vector machines [5] to uncover hidden patterns in time series data. However, these methods often suffer from slow convergence and algorithmic incompleteness, resulting in unsatisfactory solutions to time series prediction problems. Consequently, researchers have turned to the application of deep learning techniques as a means to tackle practical time series prediction challenges. Deep neural networks exhibit the inherent capability to capture and model nonlinear relationships. By leveraging the stacking of multiple layers, these models can effectively capture a multitude of hidden factors and intricate variables within the data. Recurrent neural networks (RNN) [6], long short-term memory (LSTM) [7], and subsequent models such as gated recurrent units (GRU) [8], WaveNet [9], and Transformer [10; 11], have demonstrated outstanding performance in the field of time series prediction. With the rapid development of graph neural networks in recent years, spatial-convolution-based graph neural network models led by graph convolutional networks (GCN) [12] and graph attention networks (GAN) [13] have gained significant attention. In graph neural networks, a graph is composed of a set of vertices (nodes) that are interconnected by a set of edges. By performing convolutions on graphs with arbitrary structures, graph neural networks can learn rich spatial features. In recent years, they have been successfully applied in various domains, such as trajectory prediction [14; 15] and traffic flow prediction [16]. In traffic flow prediction methods, conventional approaches often consider traffic intersections or sensors as entities, represented as individual nodes. Simultaneously, the road network, which accommodates these traffic entities, serves as the edges that symbolize the relationships between these nodes.