Ship trajectory prediction method based on graph attention mechanism and electronic chart
By constructing a multi-layer graph neural network model based on graph attention mechanism and electronic nautical charts, and integrating waterway and AIS data, the problem that the existing technology fails to fully consider the impact of the geographical environment is solved, and high-precision ship trajectory prediction and improved interpretability are achieved.
Patent Information
- Application Number
- CN202511122606.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing ship trajectory prediction methods fail to fully consider factors such as the geographic spatial environment and channel layout, resulting in insufficient accuracy, stability and interpretability of trajectory prediction results.
By constructing a multi-layer graph neural network model based on graph attention mechanism and electronic nautical charts, integrating nautical chart channel data and AIS data, multimodal data fusion is achieved, channel structure information is extracted and predicted in combination with ship trajectories.
It improves the accuracy and interpretability of ship trajectory prediction, enhances the model's adaptability in complex water environments, and improves navigation safety and efficiency.
Smart Images

Figure CN120632376A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent ship technology, and in particular to a ship trajectory prediction method based on a graph attention mechanism and an electronic nautical chart. Background Art
[0002] The Automatic Identification System (AIS) is a core technology for monitoring and managing vessel activity. It integrates modern communications, computer processing, and electronic information display technologies. It broadcasts its navigation status in real time to surrounding vessels and the Vessel Traffic Service (VTS) via Very High Frequency (VHF) channels, while also receiving navigation information from other vessels within a 20-nautical-mile radius. The AIS system enables vessel identification and dynamic monitoring, effectively alleviating the burden of traffic management in ports and waterways. The AIS system continuously collects and records a large amount of dynamic navigation data, including positioning timestamps, latitude and longitude, course over ground (COG), and speed over ground (SOG). By applying data mining and intelligent analysis techniques, it is possible to deeply understand the patterns of vessel navigation behavior, enhance the intelligent level of water traffic monitoring and management, and further assist ships in achieving safer and more efficient navigation. Consequently, intelligent prediction of vessel trajectories based on AIS data has become a key research direction in intelligent shipping and waterway traffic management. By modeling and analyzing historical trajectory data, the future trajectory of the ship can be predicted, providing basic support for applications such as navigation decision support, collision avoidance warning, and port scheduling optimization.
[0003] Currently, most ship trajectory prediction research uses deep learning methods, which predict future ship trajectories by learning the inherent temporal patterns of historical trajectory data. For example, the paper "Trajectory Prediction Based on Ship Motion Behavior and Time-Series Graph Neural Networks" proposes a long-term ship trajectory prediction method based on ship motion behavior analysis and a time-series graph neural network (TGCN-MP). This method aims to address the inadequacy of traditional prediction methods in modeling complex navigation behaviors. By preprocessing ship AIS data, modeling motion behavior, and clustering trajectories, typical ship motion patterns are discovered. High-precision trajectory prediction is achieved by combining a graph convolutional neural network with a gated recurrent unit (GRU). However, while this approach incorporates the spatiotemporal correlations of ship trajectories and motion patterns, the current graph convolutional and GRU network architectures are still limited in their ability to fine-grainedly model multi-ship interactions in complex waters during feature extraction, resulting in increased prediction errors in extremely complex interaction scenarios. Furthermore, the model primarily relies on ship AIS trajectory data and motion patterns, without systematically incorporating environmental factors such as weather, sea conditions, and nautical chart and channel data. For example, the paper "Ship Trajectory Prediction Model Based on NGO-Bi-GRU" proposes a novel ship trajectory prediction model that combines the Northern Goshawk Optimization (NGO) algorithm with a bidirectional gated recurrent unit (Bi-GRU) neural network. The model aims to improve the performance of traditional neural networks in terms of hyperparameter optimization, prediction accuracy, and stability. By utilizing the NGO algorithm to automatically optimize the learning rate, number of hidden nodes, and regularization coefficient of the Bi-GRU model, it avoids the inefficiency and tendency to get stuck in local optima associated with traditional manual parameter adjustment. However, some existing intelligent optimization algorithms (such as whale optimization and gray wolf optimization) suffer from slow convergence and a tendency to get stuck in local minima when faced with high-dimensional hyperparameter searches, limiting further improvements in prediction model performance. Furthermore, current models primarily consider basic characteristics such as speed and longitude and latitude, but fail to adequately model micro-dynamic factors such as heading, course changes, and sailing time, hindering the refinement and robustness of trajectory prediction. Other ship trajectory prediction solutions use a combination of graph neural networks and time series networks. For example, patent CN117494871A, "A Ship Trajectory Prediction Method Considering Ship Interactions," extracts interactions between ships from dynamic AIS data to perform dynamic modeling of multiple ships. This solution considers only the interactions between ships and does not incorporate navigation information from electronic nautical charts. This makes it difficult to fully reflect the actual navigation patterns of ships affected by the geographical environment.
[0004] It can be seen that the existing ship trajectory prediction schemes still have many limitations: existing methods mostly focus on modeling the time series characteristics of ship positions, and predict ship trajectories based on single time series features. They rarely consider the influence of factors such as the geographic space environment, channel layout, and navigation rules. It is difficult to fully reflect the actual navigation laws affected by the geographical environment during ship movement, resulting in obvious deficiencies in the accuracy, stability, and interpretability of trajectory prediction results. Summary of the Invention
[0005] In light of this, the present invention proposes a ship trajectory prediction method based on a graph attention mechanism and electronic nautical charts. This method integrates chart and channel data with AIS data through a multi-layer graph structure, achieving multimodal data fusion and constructing an intelligent ship trajectory prediction model based on a multi-layer graph neural network. This model can accurately predict a ship's navigation trajectory over a period of time, effectively improving the accuracy and interpretability of intelligent ship trajectory prediction in complex water environments. By utilizing AIS data in combination with chart and channel data, the present invention can achieve a deep understanding and prediction of ship behavior, thereby improving navigation safety and efficiency in inland waterways.
[0006] To this end, the present invention adopts the following technical solutions: The present invention provides a ship trajectory prediction method based on a graph attention mechanism and an electronic nautical chart, comprising: S1. Collect the boundary line and center line of the target channel from the nautical chart channel data and save them in the form of longitude and latitude coordinates; S2. Filtering the AIS data of ships in the target channel, separating the track of each ship by MMSI to form a ship track dataset, and preprocessing the ship track dataset; S3. Data fusion of chart channel data and ship trajectory data by vectorization method; S4. A ship trajectory prediction model is constructed based on an improved hierarchical graph neural network, and the model is trained and evaluated. The model vectorizes channel elements and ship trajectories into a set of polylines, each composed of multiple vector nodes, and node features include start and end coordinates and attributes. The model adopts a three-layer architecture: a subgraph encoding layer, a global graph interaction layer, and a prediction layer. The subgraph encoding layer uses a graph attention network and maximum pooling to aggregate local information within the same polyline and extract polyline-level features. The global graph interaction layer uses a global interaction graph based on a self-attention mechanism to model high-order interactions between all polylines. The prediction layer uses a gated recurrent unit to capture the temporal dynamics in the trajectory data and predict the ship trajectory. S5. Use the trained ship trajectory prediction model to obtain the ship trajectory prediction result.
[0007] Furthermore, the coordinates of the boundary line and the center line of the target channel are transformed into a local Cartesian coordinate system.
[0008] Furthermore, the coordinates of the trajectory obtained from the ship AIS data are converted to a local Cartesian coordinate system.
[0009] Furthermore, the channel centerline data is saved in an XML file, wherein the XML file records the channel and surrounding static elements in the scene where the ship is located; Furthermore, each channel segment in the XML file is a geometric structure including the following attributes: channel segment unique identifier, centerline coordinate point sequence, upstream channel segment ID, downstream channel segment ID, left adjacent channel segment ID, right adjacent channel segment ID and turning information.
[0010] Furthermore, the ship trajectory dataset is preprocessed, including: Identify and eliminate outliers, which are points where data from the same location is uploaded repeatedly due to equipment failure or network congestion; Identify and propose drift points, which are points in the trajectory that deviate from the main route and have a sudden change in position. These points are caused by positioning errors or decoding anomalies and significantly deviate from the trajectory connecting the previous and next points. For the entangled points in the trajectory where the time order is disordered and the trajectory is winding and entangled, a time series repair mechanism is proposed. By identifying abnormal sorting points and reordering or discarding them, the coherence of the trajectory in the time and space dimensions is ensured.
[0011] Furthermore, the chart channel data and the ship trajectory data are fused using a vectorization method, including: The channel boundary lines and center lines are converted into polyline representations composed of coordinate points to extract the geometric structure and attribute information of the channel. At the same time, the ship trajectory is organized into a continuous coordinate sequence in chronological order and also represented as a polyline to preserve its dynamic behavior characteristics. The channel polyline and trajectory polyline are uniformly mapped to the local coordinate system, and a fusion data structure containing spatial adjacency relationships is constructed to achieve alignment and fusion of channel static information and ship dynamic information at the representation level, providing unified vectorized input for subsequent graph neural network modeling.
[0012] Furthermore, the model vectorizes the channel elements and the ship trajectory into a set of polylines, including: For channel features, the coordinates of adjacent points are sequentially connected to form a directed vector; For the ship trajectory, the trajectory points are sampled at a fixed time interval of 60 seconds and also connected into a vector; The channel feature vector and the ship trajectory vector form a broken line, express; Each vector It will be treated as a node in a graph, and its characteristics are defined as: ; in, and are the coordinates of the starting and ending points of the vector respectively; is a vector attribute; The vector belongs to ID.
[0013] Furthermore, in the subgraph encoding layer, a subgraph is constructed for each polyline, and graph attention propagation is performed on all vector nodes within it. The propagation form of each layer of the graph attention network is: ; in, is the adjacent node feature; is the weight matrix; Edge weights calculated by the attention mechanism; is the ReLU activation function; After completing the graph attention network aggregation, perform a maximum pooling operation on the entire polyline to obtain the polyline features, and use a linear layer to unify the output dimension; In the global graph interaction layer, all polyline features are used as nodes to construct a fully connected graph to model the high-order relationships between polylines; To implement the attention mechanism, each broken line node is concatenated with its ID encoding vector to form the input, which is then fed into a single-layer self-attention module: ; The output is the context-enhanced features for each polyline; In the prediction layer, starting from the broken line features corresponding to the target ship, a three-layer gated recurrent unit is used to predict the future trajectory sequence, and finally the ship trajectory prediction value is obtained.
[0014] Compared with the prior art, the present invention has the following beneficial effects: 1) Improving trajectory prediction accuracy: By integrating AIS trajectory data with channel geographic information and comprehensively considering three types of characteristics: time, space, and environment, the accuracy of ship trajectory prediction is effectively improved, which is superior to methods based only on time series data.
[0015] 2) Enhance model interpretability: Introducing channel structure information makes the prediction results more consistent with the actual navigation path and channel rules, and has good physical interpretability and navigation semantic consistency.
[0016] 3) Improving adaptability to complex environments: Graph neural networks are used to model waterway structures and combined with attention mechanisms to capture the complex relationship between ship behavior and the surrounding environment, improving the model's performance in dynamic, crowded, or complex waters.
[0017] Furthermore, it should be noted that compared to the existing patent CN117494871A, a method for ship trajectory prediction that considers ship interactions, the two technologies differ fundamentally in their modeling objectives and innovative approaches. This application emphasizes the multimodal fusion of channel information (such as centerlines, channel boundaries, and channel directions) with ship trajectories. This method models channel attributes such as channel centerlines, boundaries, and channel directions from nautical charts with ship trajectories, constructing a spatial topology graph based on channel chart information and trajectory information, thereby enhancing ship trajectory prediction. In contrast, the existing patent CN117494871A extracts ship interactions from dynamic AIS data, dynamically models the temporal and spatial relationships between multiple ships, and constructs an interaction graph (with a dynamically changing adjacency matrix) based on the dynamic ships. The two modeling approaches are fundamentally different. Regarding graph structure modeling, the present application's method integrates channel boundary lines, centerlines, and ship trajectory information, and uses vectorized representation to construct the graph structure. Specifically, the channel centerline and boundary information are regarded as multiple continuous vector sequences (polylines) that also contain channel attributes. The ship trajectory is then mapped to this structure. Through the collaborative modeling of local subgraphs and the global graph, the structural guidance of the channel on ship behavior is achieved. Channel information is derived from electronic nautical chart information and has the advantages of strong interpretability and stable structure. In contrast, the existing patent CN117494871A constructs a dynamic graph based on real-time AIS data between ships. It uses each ship as a node in the graph and dynamically constructs edges by calculating the time approximation efficiency and spatial relative distance to form an adjacency matrix that changes over time. This method emphasizes the interactive relationship between ships. Although both use a method that combines graph neural networks with time series networks, the specific module structure, fusion method and application direction are completely different. This application introduces the GAT network in the sub-graph encoding stage to improve the representation ability of waterway structure, uses Self-Attention to extract global channel context information, and finally adopts GRU decoding for trajectory prediction. It is significantly different from the comparative patent that only uses the GCN+GRU combination structure (GCN is used to extract spatial dependencies between ships, there is no global interaction mechanism, and local interactions rely on GCN).
[0018] This application proposes for the first time to introduce the channel information of electronic nautical charts into the ship trajectory prediction model, and constructs a GAT-based channel sub-graph structure extraction and global attention modeling mechanism, which is an important extension and innovation of the existing technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 This is a flowchart for implementing an embodiment of the present invention; Figure 2 This is a schematic diagram of channel selection in an embodiment of the present invention; Figure 3 This is the visualization of the coordinates of the nautical chart channel data in an embodiment of the present invention; Figure 4 This is a model structure diagram in an embodiment of the present invention; Figure 5 This is a visualization comparison chart of predictions of various models in the embodiments of the present invention. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] This paper proposes a ship trajectory prediction method based on a graph attention mechanism and electronic nautical charts. First, the boundary lines and center lines of the target channel are collected and stored as longitude and latitude coordinates. Next, AIS data of ships within the target channel is filtered and each ship's trajectory is separated by its MMSI. Next, the chart channel data and ship trajectory data are fused using a vectorization method. Finally, a graph neural network is trained and evaluated to achieve intelligent ship trajectory prediction. This method integrates dynamic AIS trajectory data with static channel geographic information, comprehensively modeling ship trajectories and chart channel data to achieve high-precision prediction of future ship trajectories.
[0024] The following takes the ship trajectory prediction of a certain section of the Yangtze River as an example to explain this scheme in detail. Figure 1 As shown, a ship trajectory prediction method based on a graph attention mechanism and an electronic nautical chart in an embodiment of the present invention includes the following steps: S1. Collect channel data; The nautical chart channel data collected in this embodiment is selected from a section of the Yangtze River with a total length of about 6 nautical miles. Figure 2 shown.
[0025] The boundary lines and center lines of the selected channel are collected and recorded in longitude and latitude coordinates. However, in modeling and prediction tasks, it is more accurate and efficient to use the local Cartesian coordinate system (coordinates with a certain reference point as the origin), so all coordinates are converted to the local Cartesian coordinate system and visualized as follows: Figure 3 shown.
[0026] The channel centerline is also saved in an XML (eXtensible Markup Language) file. This file records the channel and surrounding static elements in the scene where the ship is located. Each channel segment is a geometric structure with the following attributes:
[0027] This XML file is mainly used to provide environmental context to help the model understand the channel structure, possible feasible paths, channel boundary constraints, etc. of the ship, thereby improving prediction accuracy and feasibility.
[0028] Nautical chart and channel data play a crucial role in multimodal intelligent trajectory prediction models. Nautical charts provide the model with rich context, including channel geometry (centerline coordinates), semantic information (turn types), channel boundaries, and topology (predecessor / successor channels, adjacent channels, etc.). This information enables the model to not only rely on the target vessel's historical trajectory for predictions, but also understand the channel structure within which the vessel is located, thereby improving its ability to model future behavior. For example, the "successor_ids" and "turn_direction" information contained in the XML helps the model identify all feasible paths, such as left turns, straight ahead, or right turns, and filter out reasonable options. In the model presented in this paper, these map elements are converted into vector representations (e.g., each channel centerline segment is converted into a vector). These are then input into the model along with the vessel's trajectory to form a local subgraph. Interactive modeling is then performed using a graph neural network. Finally, multimodal contextual information is aggregated into a global graph, generating more physically plausible and environmentally consistent future trajectory predictions. Therefore, the map not only enhances the model's interpretability and prediction accuracy, but also significantly improves its generalization capabilities in complex scenarios. The waterway dataset produced by the present invention can meet the above requirements.
[0029] S2, ship trajectory data collection and preprocessing; Filter out the data within the target channel from the AIS data, separate the track of each ship through MMSI, and convert the coordinates to the local Cartesian coordinate system as well as the channel data.
[0030] Raw AIS records often contain noise, outliers, or missing data. Left unprocessed, these issues can severely impact the accuracy and stability of subsequent trajectory modeling and prediction. Therefore, prior to trajectory prediction modeling, systematic preprocessing of the raw data is required to remove outliers, complete missing values, and improve data quality.
[0031] In terms of abnormal points, the main focus is on identifying and eliminating duplicate records. Such points are usually due to repeated uploading of data at the same location due to equipment failure or network congestion. Their characteristics are consistent position, speed, and heading, but different timestamps. Secondly, points in the trajectory that deviate from the main route or have sudden changes in position are identified as drift points. These are usually caused by positioning errors or decoding anomalies, and they deviate significantly from the trajectory connecting the previous and next points and need to be eliminated. Finally, for entangled points in the trajectory where the time sequence is disordered and the trajectory is folded and entangled, a time series repair mechanism is proposed. By identifying abnormal sorting points and reordering or discarding them, the consistency of the trajectory in the time and space dimensions is ensured. The above-mentioned multi-dimensional anomaly processing method effectively improves the availability of AIS data and the robustness of the trajectory prediction model.
[0032] S3, integrating channel data and ship trajectory data; The data fusion of S1's chart channel data and S2's ship trajectory data is performed using the vectorization method.
[0033] S4, constructing a ship trajectory prediction model; This example proposes an improved hierarchical graph neural network model, VMGAT (Vessel Multi-modal Graph Attention Network for Vessel Trajectory Prediction), for intelligent vessel trajectory prediction. By learning a unified scene context directly from vector representations of the channel and vessel, this model avoids the information loss and high computational cost of traditional rendering and ConvNet encoding. This model vectorizes channel elements (such as the channel, boundary lines, and centerlines) and vessel trajectories into a set of polylines. Each polyline consists of multiple vector nodes, whose features include start and end point coordinates and attributes. In this embodiment, the model adopts a three-layer architecture: first, a graph attention network (GAT) and maximum pooling are used to aggregate local information within the same broken line, so that the model can adaptively assign different weights to different neighboring nodes, thereby enhancing the modeling ability of complex spatiotemporal dependencies in ship trajectories and extracting broken line-level features; then, a global interaction graph (based on the self-attention mechanism) is used to model high-order interactions between all broken lines; finally, the prediction module adopts a gated recurrent unit (GRU), so that the model can better capture the temporal dynamics in the trajectory data, especially when processing ship trajectories with long-term dependencies, GRU effectively avoids the gradient vanishing problem. The model proposed in the present invention is as follows: Figure 4 shown.
[0034] In the chart channel data, the coordinates of the channel boundary line and the channel centerline are recorded, and additional attribute information is also carried, such as whether there is a turn, whether there are adjacent channels on the left and right, upstream and downstream channels, etc., while the ship trajectory data are all time series coordinates. These elements can be approximately represented by a set of vectors: for channel characteristics, the coordinates of adjacent points are sequentially connected to form a directed vector; for ship trajectory, the trajectory points are sampled at a fixed time interval of 60 seconds and also connected to form vectors. These vectors form a polyline. Each vector It will be treated as a node in a graph, and its characteristics are defined as: ; in, and are the coordinates of the starting and ending points of the vector respectively; is a vector attribute; The vector belongs to ID.
[0035] In the subgraph encoding stage, a subgraph is constructed for each polyline, and graph attention propagation is performed on all vector nodes within it. The propagation form of each layer of GAT is: ; in, is the adjacent node feature; is the weight matrix; Edge weights calculated by the attention mechanism; is the ReLU activation function.
[0036] After completing GAT aggregation, max pooling is performed on the entire polyline to obtain its overall features, and a linear layer is used to unify the output dimension.
[0037] In the global graph interaction phase, all polyline features are treated as nodes to construct a fully connected graph to model the high-order relationships between polylines. To implement the attention mechanism, each polyline node is concatenated with its ID encoding vector to form the input, which is then fed into a single-layer self-attention module: ; The output is the context-enhanced features of each polyline for subsequent prediction.
[0038] In the prediction stage, starting from the polyline features corresponding to the target ship, a three-layer GRU is used to predict the future trajectory sequence, and finally the ship trajectory prediction value is obtained.
[0039] S5. Training the ship trajectory prediction model; The trajectory data was divided into a training set and a test set with a ratio of 8:2, containing 10,000 and 2,500 trajectories respectively. The model was then trained using this data. The training process consisted of 400 epochs, a learning rate of 0.001, a learning rate decay of 0.05% every five epochs, and 50 warm-up rounds.
[0040] S6. Using the trained ship trajectory prediction model, obtain the ship trajectory prediction result.
[0041] 20% of the ship trajectory data in the dataset was used for verification. Experiments were conducted on the above dataset and compared with the proposed method using RNN, LSTM, and VectorNet. VMGAT was used as the model of this solution.
[0042] ADE (Average Displacement Error) and FDE (Final Displacement Error) are two commonly used evaluation indicators in trajectory prediction tasks, which are mainly used to evaluate the deviation between the trajectory predicted by the model and the actual trajectory.
[0043] ADE measures the average Euclidean distance error between the predicted trajectory and the true trajectory over the entire prediction period. It reflects the overall prediction accuracy of the model during the entire prediction process, and the formula is as follows: ; FDE only focuses on the error of the last prediction time step, measuring the Euclidean distance between the predicted trajectory endpoint and the true endpoint. It is mainly used to evaluate the model's ability to accurately predict the trajectory endpoint. The formula is as follows: ; in is the number of time steps for prediction; For the The predicted position of the time step; For the The true position of the time step; represents the Euclidean distance (L2 norm).
[0044] The results obtained by predicting the test set are shown in Table 1.
[0045] Table 1
[0046] As can be seen, on the test set, the ADE of the VMGAT model proposed in this example is 13.64% lower than that of the best-performing model (VectorNet) in the ablation experiment. This demonstrates that the model significantly improves the accuracy of ship trajectory prediction.
[0047] In addition, in order to more intuitively demonstrate the performance of each model in the prediction task, the prediction results of some typical trajectories are visualized, such as Figure 5 As shown. Figure 5 As can be seen in the figure, the predicted trajectories of RNN, LSTM, and VectorNet deviate somewhat from the true trajectory, especially near the endpoint. The VMGAT model proposed in this study demonstrates stronger prediction capabilities, not only being closer to the true trajectory in terms of overall trajectory shape but also more accurate in predicting the endpoint position. This further validates the effectiveness of this model in improving the accuracy of ship trajectory prediction.
[0048] In the above embodiment, by integrating dynamic AIS trajectory data with static waterway geographic information, high-precision modeling and prediction of the ship's future motion trajectory is achieved. This method expands the traditional trajectory modeling method based on time series to multimodal joint modeling, introduces the channel structure vector representation for the first time, extracts the structural information of the channel environment based on graph neural network, and deeply integrates it with the ship's historical trajectory data to construct a trajectory expression method that contains the triple semantics of time, space and environment. In terms of model architecture, the present invention adopts the graph attention mechanism to enhance the node representation ability in the channel subgraph, and at the same time introduces the time series modeling module to model the trajectory evolution law, effectively improving the prediction accuracy and generalization ability of the model in complex water environments. The present invention realizes high-quality modeling, explainable prediction and intelligent support for ship trajectories, and is suitable for key scenarios such as high-density waterway traffic management, ship path planning and navigation safety warning.
[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A ship trajectory prediction method based on graph attention mechanism and electronic nautical chart, characterized in that: include: S1. Collect the boundary line and center line of the target channel from the nautical chart channel data and save them in the form of longitude and latitude coordinates; S2. Filtering the AIS data of ships in the target channel, separating the track of each ship by MMSI to form a ship track dataset, and preprocessing the ship track dataset; S3. Data fusion of chart channel data and ship trajectory data by vectorization method; S4. A ship trajectory prediction model is constructed based on an improved hierarchical graph neural network, and the model is trained and evaluated. The model vectorizes channel elements and ship trajectories into a set of polylines, each composed of multiple vector nodes, and node features include start and end coordinates and attributes. The model adopts a three-layer architecture: a subgraph encoding layer, a global graph interaction layer, and a prediction layer. The subgraph encoding layer uses a graph attention network and maximum pooling to aggregate local information within the same polyline and extract polyline-level features. The global graph interaction layer uses a global interaction graph based on a self-attention mechanism to model high-order interactions between all polylines. The prediction layer uses a gated recurrent unit to capture the temporal dynamics in the trajectory data and predict the ship trajectory. S5. Use the trained ship trajectory prediction model to obtain the ship trajectory prediction result.
2. A ship trajectory prediction method based on graph attention mechanism and electronic nautical chart according to claim 1, characterized in that: The coordinates of the boundary lines and center lines of the target channel are transformed into the local Cartesian coordinate system.
3. The ship trajectory prediction method based on graph attention mechanism and electronic nautical chart according to claim 1 is characterized in that: The coordinates of the track obtained from the ship AIS data are transformed into the local Cartesian coordinate system.
4. The method for ship trajectory prediction based on graph attention mechanism and electronic nautical chart according to claim 1, characterized in that: The channel centerline data is saved in an XML file, which records the channel and surrounding static elements in the scene where the ship is located.
5. The method for ship trajectory prediction based on graph attention mechanism and electronic nautical chart according to claim 4, characterized in that: Each channel segment in the XML file is a geometric structure that includes the following attributes: channel segment unique identifier, centerline coordinate point sequence, upstream channel segment ID, downstream channel segment ID, left adjacent channel segment ID, right adjacent channel segment ID, and turning information.
6. The method for ship trajectory prediction based on graph attention mechanism and electronic nautical chart according to claim 1, characterized in that: The ship trajectory dataset is preprocessed, including: Identify and eliminate outliers, which are points where data from the same location is uploaded repeatedly due to equipment failure or network congestion; Identify and propose drift points, which are points in the trajectory that deviate from the main route and have a sudden change in position. These points are caused by positioning errors or decoding anomalies and significantly deviate from the trajectory connecting the previous and next points. For the entangled points in the trajectory where the time order is disordered and the trajectory is winding and entangled, a time series repair mechanism is proposed. By identifying abnormal sorting points and reordering or discarding them, the coherence of the trajectory in the time and space dimensions is ensured.
7. The method for ship trajectory prediction based on graph attention mechanism and electronic nautical chart according to claim 1, characterized in that: Data fusion of chart channel data and ship trajectory data is performed using vectorization methods, including: The channel boundary lines and center lines are converted into polyline representations composed of coordinate points to extract the geometric structure and attribute information of the channel. At the same time, the ship trajectory is organized into a continuous coordinate sequence in chronological order and also represented as a polyline to preserve its dynamic behavior characteristics. The channel polyline and trajectory polyline are uniformly mapped to the local coordinate system, and a fusion data structure containing spatial adjacency relationships is constructed to achieve alignment and fusion of channel static information and ship dynamic information at the representation level, providing unified vectorized input for subsequent graph neural network modeling.
8. The method for ship trajectory prediction based on graph attention mechanism and electronic nautical chart according to claim 1, characterized in that: The model vectorizes channel elements and ship trajectories into a set of polylines, including: For channel features, the coordinates of adjacent points are sequentially connected to form a directed vector; For the ship trajectory, the trajectory points are sampled at a fixed time interval of 60 seconds and also connected into a vector; The channel feature vector and the ship trajectory vector form a broken line, express; Each vector It will be treated as a node in a graph, and its characteristics are defined as: ; in, and are the coordinates of the starting and ending points of the vector respectively; is a vector attribute; The vector belongs to ID.
9. A method for ship trajectory prediction based on graph attention mechanism and electronic nautical chart according to claim 8, characterized in that: In the subgraph encoding layer, a subgraph is constructed for each polyline, and graph attention propagation is performed on all vector nodes within it. The propagation form of each layer of the graph attention network is: ; in, is the adjacent node feature; is the weight matrix; Edge weights calculated by the attention mechanism; is the ReLU activation function; After completing the graph attention network aggregation, perform a maximum pooling operation on the entire polyline to obtain the polyline features, and use a linear layer to unify the output dimension; In the global graph interaction layer, all polyline features are used as nodes to construct a fully connected graph to model the high-order relationships between polylines; To implement the attention mechanism, each broken line node is concatenated with its ID encoding vector to form the input, which is then fed into a single-layer self-attention module: ; The output is the context-enhanced features for each polyline; In the prediction layer, starting from the broken line features corresponding to the target ship, a three-layer gated recurrent unit is used to predict the future trajectory sequence, and finally the ship trajectory prediction value is obtained.
Citation Information
Patent Citations
Ship abnormal behavior detection method based on improved graph attention neural network
CN120354292A
System and method for forecasting trajectory based on AIS data and tide observation station information
KR102778555B1
Cited By
Maritime data rapid verification and completion method and system based on AIS multi-modal data fusion
CN121188039A
A maritime data rapid checking and completing method and system based on AIS multi-modal data fusion
CN121188039B
Maritime traffic network mining method
CN121255792A
NAVDAT communication-based ship traffic intelligent prediction and cooperative guidance method and system
CN121330954A
Aircraft taxiing trajectory intelligent prediction method fusing spatial-temporal characteristics and motion constraints
CN121459644A