Ship trajectory prediction method and device based on deep learning

By combining spatiotemporal graph neural networks and variational autoencoders, this method solves the problem of the lack of integration between the dynamic influence of the external environment and the interaction between ships in existing ship trajectory prediction methods. It achieves high-precision and interpretable ship trajectory prediction, which is applicable to fields such as intelligent shipping and maritime traffic management.

CN121479282BActive Publication Date: 2026-03-17NAVAL UNIV OF ENG PLA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing deep learning-based ship trajectory prediction methods fail to effectively integrate the dynamic influence of the external environment, lack uncertainty assessment, and do not consider ship interaction relationships, resulting in insufficient prediction accuracy and poor interpretability under complex sea conditions.

Method used

A spatiotemporal fusion feature of ships is extracted using a spatiotemporal graph neural network. This feature is then converted into a multi-channel two-dimensional raster image by combining marine environmental data. The spatiotemporal and environmental features are fused through a gating mechanism, and a variational autoencoder is used for prediction. A composite loss function is introduced for model training to ensure that the prediction results conform to the laws of navigation dynamics.

Benefits of technology

It significantly improves the accuracy of dense water area prediction, supports confidence assessment in high-risk scenarios, ensures that prediction results are both environmentally adaptable and nautical reasonable, provides intuitive uncertainty visualization, and is suitable for diverse application scenarios under complex sea conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479282B_ABST
    Figure CN121479282B_ABST
Patent Text Reader

Abstract

This invention provides a deep learning-based method and apparatus for ship trajectory prediction. The method includes: extracting spatiotemporal fusion features of the ship from historical trajectory data based on a spatiotemporal graph neural network; converting the marine environmental data corresponding to the historical trajectory data into a multi-channel two-dimensional raster image, and extracting environmental features from the multi-channel two-dimensional raster image based on a deep learning model; fusing the spatiotemporal fusion features and the environmental features through a gating mechanism to obtain a final fusion feature; and predicting the future trajectory data of the ship based on the final fusion feature using a variational autoencoder. This invention solves the problems of existing technologies ignoring environmental influences, lacking uncertainty assessment, and not considering ship interactions by explicitly modeling ship interactions, fusing dynamic environmental factors, and outputting ship trajectories with uncertainty quantification. It significantly improves the accuracy, interpretability, and practicality of trajectory prediction under complex sea conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent shipping technology, and in particular to a method and apparatus for predicting ship trajectories based on deep learning. Background Technology

[0002] With the rapid development of the shipping industry, ship trajectory prediction has become an important research field. Traditional ship trajectory prediction methods are mainly based on linear prediction and multinomial prediction, which often perform poorly when dealing with complex trajectory data. In recent years, the development of deep learning technology has provided new ideas for ship trajectory prediction. However, existing deep learning-based trajectory prediction methods still face challenges when dealing with large-scale, high-dimensional ship trajectory data:

[0003] Ignoring the dynamic influence of the external environment: Most models only use the ship's own historical AIS (Automatic Identification System) data (position, speed, and heading), without incorporating key environmental factors such as wind speed, wave height, ocean currents, port density, and interactions with other ships;

[0004] Deterministic output, lack of uncertainty quantification: Existing models typically output a single trajectory, which cannot reflect the prediction confidence and is not reliable enough in high-risk scenarios (such as narrow waterways);

[0005] Unmodeled inter-ship interactions: In dense waters, ship behavior is significantly influenced by neighboring vessels, and existing methods mostly predict individual ship interactions independently.

[0006] The training objective is singular: it only minimizes the mean square error (MSE) without considering trajectory diversity or physical rationality (such as maximum turning rate constraints). Summary of the Invention

[0007] This invention provides a deep learning-based method and apparatus for ship trajectory prediction, which addresses the shortcomings of existing technologies such as ignoring environmental influences, lacking uncertainty assessment, and not considering ship interactions. By explicitly modeling ship interactions, integrating dynamic environmental factors, and outputting ship trajectories with uncertainty quantification, it significantly improves the accuracy, interpretability, and practicality of trajectory prediction under complex sea conditions.

[0008] This invention provides a deep learning-based method for predicting ship trajectories, comprising:

[0009] Spatiotemporal fusion features of the ship are extracted from the ship's historical trajectory data based on a spatiotemporal graph neural network.

[0010] The marine environmental data corresponding to the historical trajectory data is converted into a multi-channel two-dimensional raster image, and environmental features are extracted from the multi-channel two-dimensional raster image based on a deep learning model;

[0011] The spatiotemporal fusion features and the environmental features are fused using a gating mechanism to obtain the final fused features;

[0012] The future trajectory data of the ship is predicted based on the variational autoencoder and the final fused features.

[0013] According to the deep learning-based ship trajectory prediction method provided by the present invention, before extracting the spatiotemporal fusion features of the ship from the ship's historical trajectory data based on a spatiotemporal graph neural network, the method further includes:

[0014] The historical trajectory data and marine environmental data are preprocessed, including coordinate transformation, normalization, construction of relative trajectories, and handling of missing values.

[0015] According to the present invention, a deep learning-based ship trajectory prediction method extracts the spatiotemporal fusion features of a ship from historical trajectory data based on a spatiotemporal graph neural network, including:

[0016] An adjacency matrix is ​​generated based on the historical trajectory data at each time step to construct a spatial graph, where the vertices of the spatial graph are the ships. Edges are established between ships whose distance is less than a preset threshold, and the weight of the edge is the reciprocal of the distance between the ships.

[0017] The historical trajectory data is divided into trajectory sequences according to time steps. The same ship node in the trajectory sequences of adjacent time steps is connected, and the same ship node in the trajectory sequences of preset time steps is connected to construct a time map.

[0018] Spatial features are extracted from the spatial graph using a graph convolutional network, and temporal features are extracted from the temporal graph using a temporal convolutional network.

[0019] The spatial features and the temporal features are fused to obtain spatiotemporal fusion features.

[0020] According to a deep learning-based ship trajectory prediction method provided by the present invention, the spatial features and the temporal features are fused using the following formula to obtain spatiotemporal fused features:

[0021] ;

[0022] ;

[0023] in, For activation function, As weight, For bias, For spatial features, As a time feature, ⊙ represents spatiotemporal fusion characteristics, and ⊙ represents element-wise multiplication.

[0024] According to the deep learning-based ship trajectory prediction method provided by the present invention, the formula for fusing the spatiotemporal fusion features and the environmental features through a gating mechanism to obtain the final fused features is as follows:

[0025] ;

[0026] ;

[0027] in, For activation function, As weight, For bias, As a feature of spatiotemporal fusion, As an environmental feature, For the final fusion feature, ⊙ represents element-wise multiplication.

[0028] According to the present invention, a deep learning-based ship trajectory prediction method predicts the future trajectory data of the ship based on the final fused features using a variational autoencoder, comprising:

[0029] Based on the final fusion features, the mean and variance are output by a Bi-GRU encoder;

[0030] Latent variables are sampled based on the mean and variance;

[0031] The latent variables and the final fusion features at the last moment are concatenated and then input into the GRU decoder to generate future trajectory data.

[0032] According to the deep learning-based ship trajectory prediction method provided by the present invention, before extracting the spatiotemporal fusion features of the ship from the ship's historical trajectory data based on a spatiotemporal graph neural network, the method further includes:

[0033] The spatiotemporal graph neural network, deep learning model, gating mechanism and variational autoencoder are trained as a whole using a composite loss function.

[0034] The composite loss function includes reconstruction loss, KL divergence loss, physical constraint loss, and diversity loss.

[0035] According to the deep learning-based ship trajectory prediction method provided by the present invention, the composite loss function... The formula is:

[0036] ;

[0037] Among them, reconstruction losses The formula is:

[0038] ;

[0039] KL divergence loss The formula is:

[0040] ;

[0041] Physical constraint loss The formula is:

[0042] ;

[0043] Diversity loss The formula is:

[0044] ;

[0045] , , and The hyperparameters are adjustable, where H is the time step for future trajectory data and T is the time step for historical trajectory data. For the first Predicted future trajectory data at time steps For the first Actual value of future trajectory data at time step. Let be the length of the latent space vector output by the variational autoencoder. The first of the vectors representing the mean of the latent Gaussian distribution. One portion, The first standard deviation vector of the latent Gaussian distribution is the first... One portion, and These represent the changes in heading and velocity at time step t′, respectively. and These are the ship's maximum permissible rate of turn and maximum acceleration, respectively. Where K is the time step of the trajectory data, and K is the number of trajectories generated from sampling the latent space. and The first Next and first The position coordinates of the predicted trajectory generated by the second sampling at the final time T+H.

[0046] The present invention also provides a deep learning-based ship trajectory prediction device, comprising:

[0047] The first extraction module is used to extract the spatiotemporal fusion features of the ship from the ship's historical trajectory data based on a spatiotemporal graph neural network;

[0048] The second extraction module is used to convert the marine environmental data corresponding to the historical trajectory data into a multi-channel two-dimensional raster image, and extract environmental features from the multi-channel two-dimensional raster image based on a deep learning model.

[0049] The fusion module is used to fuse the spatiotemporal fusion features and the environmental features through a gating mechanism to obtain the final fusion feature;

[0050] The prediction module is used to predict the future trajectory data of the ship based on the final fused features using a variational autoencoder.

[0051] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the deep learning-based ship trajectory prediction method as described above.

[0052] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the deep learning-based ship trajectory prediction method as described above.

[0053] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the deep learning-based ship trajectory prediction method as described above.

[0054] The deep learning-based ship trajectory prediction method and apparatus provided by this invention have the following beneficial effects:

[0055] 1. Significantly improve the accuracy of prediction in dense waters: By explicitly modeling the dynamic interaction between ships as a spatiotemporal graph structure, this invention can accurately capture the complex interaction relationships between ships in dense waters (such as avoidance and following behaviors), thereby significantly improving the trajectory prediction accuracy in high-density traffic scenarios.

[0056] 2. Support for Confidence Assessment and Decision Making in High-Risk Scenarios: Based on a variational autoencoder framework, this invention achieves probabilistic prediction, not only outputting a single trajectory but also generating multiple possible future trajectories and their corresponding confidence levels. This uncertainty quantification capability provides reliable confidence assessment for high-risk scenarios (such as narrow waterways and severe weather), contributing to more scientific decision-making.

[0057] 3. Ensuring both environmental adaptability and nautical rationality in prediction results: This invention introduces an environmental perception gating mechanism that dynamically integrates external environmental factors such as wind speed, wave height, and ocean currents, making the prediction results more environmentally adaptable. Simultaneously, by embedding physical constraint losses (such as maximum turning rate and acceleration limits), it ensures that the predicted trajectory conforms to the laws of nautical dynamics, avoiding unreasonable motion patterns.

[0058] 4. Achieving a balance between high accuracy and real-time performance: This invention combines deep learning technology with composite loss function optimization to ensure prediction accuracy while supporting efficient inference. It can meet the needs of real-time trajectory prediction and can be integrated into electronic nautical chart systems for real-time early warning.

[0059] 5. Provides an intuitive uncertainty visualization tool. This invention outputs Top-K high-probability trajectories and their confidence ellipses, and supports drawing 95% confidence ellipses for each trajectory at each time step. This intuitive uncertainty visualization method facilitates users to quickly understand the prediction results and take corresponding measures.

[0060] 6. Applicable to complex sea conditions and diverse application scenarios: By integrating multi-source heterogeneous data and designing a composite loss function, this invention can adapt to diverse application scenarios under complex sea conditions, including but not limited to intelligent shipping, maritime traffic management, and ship autopilot.

[0061] 7. Enhance the interpretability and practicality of the model. By explicitly modeling ship interaction relationships, embedding physical constraints, and quantifying uncertainties, this invention significantly improves the interpretability of the model, making its prediction results closer to actual navigation scenarios and giving it higher practical value.

[0062] In summary, this invention demonstrates significant advantages in prediction accuracy, environmental adaptability, navigation rationality, real-time performance, and interpretability, providing strong technical support for intelligent shipping and maritime traffic safety. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0064] Figure 1 This is one of the flowcharts of the deep learning-based ship trajectory prediction method provided by the present invention;

[0065] Figure 2 This is the second flowchart of the deep learning-based ship trajectory prediction method provided by the present invention;

[0066] Figure 3 This is a schematic diagram of the structure of the deep learning-based ship trajectory prediction device provided by the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0068] The following is combined with Figure 1 This invention describes a deep learning-based ship trajectory prediction method, comprising:

[0069] Step 101: Extract the spatiotemporal fusion features of the ship from its historical trajectory data based on a spatiotemporal graph neural network;

[0070] Step 102: Convert the marine environmental data corresponding to the historical trajectory data into a multi-channel two-dimensional raster image, and extract environmental features from the multi-channel two-dimensional raster image based on a deep learning model;

[0071] Step 103: The spatiotemporal fusion features and the environmental features are fused using a gating mechanism to obtain the final fused features;

[0072] Step 104: Based on the variational autoencoder, predict the future trajectory data of the ship according to the final fusion features.

[0073] First, historical vessel trajectory data and environmental data are collected and preprocessed. The trajectory data includes fields such as latitude and longitude, speed, heading, and timestamp; the environmental data consists of rasterized environmental features of a specific sea area, including wind speed / direction, wave height, ocean current speed / direction, port location, and restricted waterways.

[0074] The Spatiotemporal Graph Neural Network (ST-GNN) is used to extract ship interaction features, including constructing a spatial graph to model the interaction relationships between ships, constructing a temporal graph to capture trajectory temporal dependencies, and fusing spatiotemporal features. By fusing the structural information of the spatial and temporal graphs, and combining attention mechanisms and graph convolution techniques, accurate modeling and feature extraction of dynamic interaction relationships between ships are achieved.

[0075] Environmental perception gating fusion and trajectory coding involves fusing external dynamic factors through an environmental perception gating mechanism, converting heterogeneous environmental data into multi-channel two-dimensional raster images with a unified spatiotemporal resolution, and using ConvLSTM to process dynamic environmental raster image sequences to achieve dynamic modulation of ship status by environmental information.

[0076] Dynamic environment raster maps are created to transform heterogeneous, continuous, and spatiotemporally varying marine environmental data into multi-channel two-dimensional raster images with uniform spatiotemporal resolution (similar to remote sensing imagery). Each pixel contains multiple environmental feature values, which can be directly processed by deep learning models (such as ConvLSTM, U-Net, and CNN). For example, ConvLSTM can be used to process sequences of dynamic environment raster maps, outputting an environment context vector. It integrates spatiotemporal features with environmental features through a gating mechanism.

[0077] Ship trajectory prediction based on variational autoencoder generates future H-step trajectories step by step, while outputting prediction uncertainty and visualizing the prediction results and uncertainty.

[0078] For example, using a trained model for inference, outputting Top-K (e.g., K=3) high-probability trajectories and their confidence ellipses; drawing 95% confidence ellipses for each time step of each trajectory; and supporting integration into electronic chart systems for real-time early warning (e.g., marking ellipses in red when they cover channel boundaries).

[0079] This embodiment significantly improves prediction performance and practicality by introducing a spatiotemporal graph neural network to model ship interactions, using a variational autoencoder to generate ship trajectories, and incorporating external dynamic factors through an environmental perception gating mechanism.

[0080] Based on the above embodiments, this embodiment further includes the following step before extracting the spatiotemporal fusion features of the ship from its historical trajectory data based on a spatiotemporal graph neural network:

[0081] The historical trajectory data and marine environmental data are preprocessed, including coordinate transformation, normalization, construction of relative trajectories, and handling of missing values.

[0082] Data preprocessing includes:

[0083] Coordinate transformation: Convert latitude and longitude to local UTM plane coordinates (unit: meters);

[0084] Normalization: Min-Max normalization is applied to all continuous variables to [0,1].

[0085] Construct relative trajectories: For each ship, calculate the offset (Δx, Δy) relative to the current position of the target ship to enhance translation invariance.

[0086] Missing value handling: If there are no data points at a certain time step, linear interpolation is used to fill in the missing data, with a maximum tolerance interval of 60 seconds.

[0087] Based on the above embodiments, this embodiment extracts the spatiotemporal fusion features of the ship from its historical trajectory data using a spatiotemporal graph neural network, including:

[0088] An adjacency matrix is ​​generated based on the historical trajectory data at each time step to construct a spatial graph, where the vertices of the spatial graph are the ships. Edges are established between ships whose distance is less than a preset threshold, and the weight of the edge is the reciprocal of the distance between the ships.

[0089] The historical trajectory data is divided into trajectory sequences according to time steps. The same ship node in the trajectory sequences of adjacent time steps is connected, and the same ship node in the trajectory sequences of preset time steps is connected to construct a time map.

[0090] Spatial features are extracted from the spatial graph using a graph convolutional network, and temporal features are extracted from the temporal graph using a temporal convolutional network.

[0091] The spatial features and the temporal features are fused to obtain spatiotemporal fusion features.

[0092] Ship interaction features extracted based on spatiotemporal graph neural networks (ST-GNN) include:

[0093] Spatial graph construction (modeling of ship-to-ship interaction relationships). An adjacency matrix is ​​generated based on trajectory data. If the distance between two ships is less than a threshold (e.g., 3 nautical miles), an edge is established with a weight equal to the reciprocal of the distance (emphasizing close-range interactions). The adjacency matrix is ​​recalculated at each time step to capture dynamic changes in interaction relationships (e.g., increased distance after avoidance).

[0094] Time-based graph construction (trajectory temporal dependency modeling). The trajectory is divided into sequences by time steps (e.g., t-2, t-1, t, t+1, t+2), with each time step corresponding to a graph snapshot; connecting the same ship nodes at adjacent time steps represents the continuity of motion. Connecting nodes separated by fixed time intervals (e.g., every 60 seconds) captures periodic motion patterns (e.g., oscillating navigation). Ensure that all ship time steps are synchronized to avoid graph structure breaks due to missing data.

[0095] Spatiotemporal graph fusion. Spatial features (such as position and velocity) and temporal features (such as acceleration and turning rate) of a ship are concatenated into a node attribute vector.

[0096] Feature extraction from the spatiotemporal graph of a trajectory. The aim is to extract high-order interaction features from the spatiotemporal graph, and it consists of three stages: spatial feature extraction, temporal feature extraction, and spatiotemporal fusion.

[0097] Spatial feature extraction: Graph Convolutional Network (GCN) is used to aggregate neighbor node information and generate spatial features containing local interactions, thereby capturing the interaction patterns between ships.

[0098] ;

[0099] Where A is the adjacency matrix and D is the degree matrix. and These are the node spatial features of the (l+1)th and lth layers, respectively. For trainable weights, This is the activation function.

[0100] Temporal feature extraction: Temporal convolutional networks (TCN) are used to extract multi-scale temporal patterns and capture the temporal dynamics of trajectories.

[0101] ;

[0102] in, d represents the time feature, d represents the dilation rate, and k represents the kernel size. For the first Learnable convolution weight parameters, In time step The ship status input characteristics at the location.

[0103] Spatiotemporal feature fusion: By dynamically adjusting the weights of spatial and temporal features through learnable gating units, a comprehensive feature representation is generated.

[0104] ;

[0105] ;

[0106] in, For activation function, As weight, For bias, For spatial features, As a time feature, ⊙ represents spatiotemporal fusion characteristics, and ⊙ represents element-wise multiplication.

[0107] Based on the above embodiments, this embodiment uses a gating mechanism to fuse the spatiotemporal fusion features and the environmental features to obtain the final fusion feature using the following formula:

[0108] ;

[0109] ;

[0110] in, It is the Sigmoid activation function. As weight, For bias, As a feature of spatiotemporal fusion, As an environmental feature, For the final fusion feature, ⊙ represents element-wise multiplication.

[0111] Based on the above embodiments, this embodiment predicts the future trajectory data of the ship based on the final fusion features using a variational autoencoder, including:

[0112] Based on the final fusion features, the mean and variance are output by a Bi-GRU encoder;

[0113] Latent variables are sampled based on the mean and variance;

[0114] The latent variables and the final fusion features at the last moment are concatenated and then input into the GRU decoder to generate future trajectory data.

[0115] Ship trajectory prediction based on variational autoencoders includes:

[0116] Input the fused historical state sequence The average value is output through the Bi-GRU encoder. and variance .

[0117] Latent variable sampling, from sampling.

[0118] The z-axis is concatenated with the state at the last moment and input into the GRU decoder to gradually generate the trajectory for the next H steps. It also outputs the prediction uncertainty.

[0119] Based on the above embodiments, this embodiment further includes defining a composite loss function and physical constraint embedding for model training before extracting the spatiotemporal fusion features of the ship from its historical trajectory data based on a spatiotemporal graph neural network:

[0120] The spatiotemporal graph neural network, deep learning model, gating mechanism and variational autoencoder are trained as a whole using a composite loss function.

[0121] The composite loss function includes reconstruction loss, KL divergence loss, physical constraint loss, and diversity loss.

[0122] The reconstruction loss measures the difference between the predicted and actual trajectories; the KL divergence loss normalizes the potential spatial distribution; the physical constraint loss ensures the trajectory conforms to nautical dynamics constraints; and the diversity loss promotes multimodal trajectory generation. The physical constraint loss includes at least one of the following: maximum turning rate constraint, maximum acceleration constraint, and channel boundary constraint.

[0123] Based on the above embodiments, the composite loss function described in this embodiment The formula is:

[0124] ;

[0125] Among them, reconstruction losses The formula is:

[0126] ;

[0127] KL divergence loss The formula is:

[0128] ;

[0129] Physical constraint loss The formula is:

[0130] ;

[0131] Diversity loss The formula is:

[0132] ;

[0133] , , and The hyperparameters are adjustable, where H is the time step for future trajectory data and T is the time step for historical trajectory data. For the first Predicted future trajectory data at time steps For the first Actual value of future trajectory data at time step. Let be the length of the latent space vector output by the variational autoencoder. The first of the vectors representing the mean of the latent Gaussian distribution. One portion, The first standard deviation vector of the latent Gaussian distribution is the first... One portion, and These represent the changes in heading and velocity at time step t′, respectively. and These are the ship's maximum permissible rate of turn and maximum acceleration, respectively. Where K is the time step of the trajectory data, and K is the number of trajectories generated from sampling the latent space. and The first Next and first The position coordinates of the predicted trajectory generated by the second sampling at the final time T+H.

[0134] For example, , , , .

[0135] The model training process includes:

[0136] Data preparation. The original track data is segmented using a sliding window to generate sample pairs (X,Y) and environmental raster sequence for the corresponding time period is obtained.

[0137] Forward propagation. Perform the trajectory prediction step to generate the predicted trajectory. Calculate according to the above formula (If diversity loss is to be calculated, the decoding is repeated K times).

[0138] Backpropagation and optimization. Using the Adam optimizer, initial learning rate... Learning rate scheduling: decays by 0.9 every 10 rounds, block size is 64, training takes 200 rounds.

[0139] This embodiment provides a novel trajectory prediction method that can integrate environmental information, model ship interactions, output probability distributions, and meet nautical physical constraints, achieving high-precision, interpretable, uncertainty-quantified, and nautical dynamics-compliant ship trajectory prediction.

[0140] The deep learning-based ship trajectory prediction device provided by the present invention will be described below. The deep learning-based ship trajectory prediction device described below can be referred to in correspondence with the deep learning-based ship trajectory prediction method described above.

[0141] like Figure 3 As shown, the device includes a first extraction module 301, a second extraction module 302, a fusion module 303, and a prediction module 304, wherein:

[0142] The first extraction module 301 is used to extract the spatiotemporal fusion features of the ship from the ship's historical trajectory data based on a spatiotemporal graph neural network;

[0143] The second extraction module 302 is used to convert the marine environmental data corresponding to the historical trajectory data into a multi-channel two-dimensional raster image, and extract environmental features from the multi-channel two-dimensional raster image based on a deep learning model;

[0144] The fusion module 303 is used to fuse the spatiotemporal fusion features and the environmental features through a gating mechanism to obtain the final fusion features;

[0145] The prediction module 304 is used to predict the future trajectory data of the ship based on the final fusion features using a variational autoencoder.

[0146] This embodiment significantly improves prediction performance and practicality by introducing a spatiotemporal graph neural network to model ship interactions, using a variational autoencoder to generate ship trajectories, and incorporating external dynamic factors through an environmental perception gating mechanism.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A deep learning-based ship trajectory prediction method, characterized in that, The method comprises the following steps: extracting spatio-temporal fusion features of a ship from historical trajectory data of the ship based on a spatio-temporal graph neural network; converting marine environment data corresponding to the historical trajectory data into a multi-channel two-dimensional grid image, and extracting environment features from the multi-channel two-dimensional grid image based on a deep learning model; fusing the spatio-temporal fusion features and the environment features through a gating mechanism to obtain final fusion features; predicting future trajectory data of the ship based on a variational autoencoder according to the final fusion features; extracting spatio-temporal fusion features of a ship from historical trajectory data of the ship based on a spatio-temporal graph neural network, comprising: generating an adjacency matrix according to historical trajectory data of each time step to construct a spatial graph, wherein the vertices in the spatial graph are the ships, edges are established between ships with a distance less than a preset threshold, and the weight of the edge is the inverse of the distance between the ships; dividing the historical trajectory data into trajectory sequences according to time steps, connecting the same ship nodes in adjacent time step trajectory sequences, and connecting the same ship nodes in trajectory sequences with a preset time interval, to construct a time graph; extracting spatial features from the spatial graph using a graph convolution network and extracting temporal features from the time graph using a time series convolution network; fusing the spatial features and the temporal features to obtain spatio-temporal fusion features; before extracting spatio-temporal fusion features of a ship from historical trajectory data of the ship based on a spatio-temporal graph neural network, the method further comprises: training the spatio-temporal graph neural network, the deep learning model, the gating mechanism, and the variational autoencoder as a whole using a composite loss function; the composite loss function comprises a reconstruction loss, a KL divergence loss, a physical constraint loss, and a diversity loss. 2.The deep learning-based ship trajectory prediction method according to claim 1, characterized in that, before extracting spatio-temporal fusion features of a ship from historical trajectory data of the ship based on a spatio-temporal graph neural network, the method further comprises: preprocessing the historical trajectory data and marine environment data, which comprises coordinate conversion, normalization processing, constructing relative trajectories, and missing value processing. 3.The deep learning-based ship trajectory prediction method according to claim 1, characterized in that, The spatial features and the temporal features are fused by the following formula to obtain spatio-temporal fusion features: ; ; wherein, is an activation function, is a weight, is a bias, is a spatial feature, is a temporal feature, is a spatio-temporal fusion feature, and is an element-wise multiplication. 4.The deep learning-based ship trajectory prediction method according to claim 1, wherein, The formula for fusing the spatio-temporal fusion features and the environment features through a gating mechanism to obtain final fusion features is as follows: ; ; wherein, is an activation function, is a weight, is a bias, is a spatio-temporal fusion feature, is an environmental feature, is a final fusion feature, and is an element-wise multiplication. 5.The deep learning-based ship trajectory prediction method according to claim 1, wherein, predicting future trajectory data of the ship based on a variational autoencoder according to the final fusion features, comprising: outputting a mean and a variance through a Bi-GRU encoder according to the final fusion features; sampling a latent variable according to the mean and the variance; concatenating the latent variable and the final fusion features at the last time step, and inputting them into a GRU decoder to generate future trajectory data. 6.The deep learning-based ship trajectory prediction method according to claim 1, wherein, The composite loss function The formula is: ; wherein the reconstruction loss is given by the formula: ; KL divergence loss The formula is: ; Physical constraint loss The formula is: ; Loss of diversity The formula is: ; , , and The hyperparameters are adjustable, where H is the time step for future trajectory data and T is the time step for historical trajectory data. For the first Predicted future trajectory data at each time step For the first Actual value of future trajectory data at time step. Let be the length of the latent space vector output by the variational autoencoder. The first of the vectors representing the mean of the latent Gaussian distribution. One portion, The first standard deviation vector of the latent Gaussian distribution is the first... One portion, and These represent the changes in heading and velocity at time step t′, respectively. and These are the ship's maximum permissible rate of turn and maximum acceleration, respectively. Where K is the time step of the trajectory data, and K is the number of trajectories generated from sampling the latent space. and The first Next and first The position coordinates of the predicted trajectory generated by the second sampling at the final time T+H.

7. A deep learning-based ship trajectory prediction device characterized by comprising: The method is applied to the deep learning-based ship trajectory prediction method of any one of claims 1 to 6, comprising: a first extraction module for extracting spatio-temporal fusion features of a ship from historical trajectory data of the ship based on a spatio-temporal graph neural network; a second extraction module for converting marine environment data corresponding to the historical trajectory data into a multi-channel two-dimensional grid image, and extracting environment features from the multi-channel two-dimensional grid image based on a deep learning model; a fusion module configured to fuse the spatio-temporal fusion feature and the environment feature by a gating mechanism to obtain a final fusion feature; a prediction module configured to predict future trajectory data of the ship based on the final fusion feature according to a variational autoencoder.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the program to realize the deep learning-based ship trajectory prediction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • STGNN-Net-based vehicle trajectory prediction method

    CN118468223A

  • Track prediction method and device based on time-space diagram neural network learning model

    CN119313962A