Ship trajectory prediction method based on space-time adaptive graph pool

By introducing a space-time adaptive graph pool mechanism in ship trajectory prediction, redundant interactions are eliminated and ship space interaction characteristics with time continuity is constructed, the problem of large prediction accuracy deviation in the prior art is solved, and more efficient and accurate ship trajectory prediction is achieved.

CN119558188AActive Publication Date: 2025-03-04DALIAN MARITIME UNIVERSITY

Patent Information

Application Number
CN202411646372.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-04
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The existing ship trajectory prediction methods fail to effectively eliminate useless features when considering the ship direction, resulting in a large deviation in prediction accuracy.

Method used

Using a method based on space-time adaptive graph pool, time series features are extracted through the ship trajectory time encoder. The spatial interaction encoding unit uses the adaptive graph pool mechanism to eliminate redundant interactions, constructs ship spatial interaction features with time continuity, and realizes the prediction of ship trajectory through feature fusion modules and prediction decoders.

Benefits of technology

It significantly improves the accuracy and efficiency of ship trajectory prediction, reduces the impact of useless features, and enhances the spatial and temporal perception ability of the prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558188A_ABST
    Figure CN119558188A_ABST
Patent Text Reader

Abstract

The invention discloses a ship trajectory prediction method based on a space-time adaptive graph pool. The method comprises the following steps: S1, acquiring AIS original data of a ship trajectory; s2, performing data preprocessing on the AIS original data to obtain a ship trajectory data sample set; randomly dividing the ship trajectory data sample set into a training set and a verification set; s3, constructing a ship trajectory prediction model, wherein the ship trajectory prediction model comprises a ship trajectory time encoder, a ship trajectory space interaction encoder, a feature fusion module and a prediction decoder; and S4, performing model training and model verification on the ship trajectory prediction model based on the training set and the verification set to obtain an optimal ship trajectory prediction model, and further realizing ship trajectory prediction through the optimal ship trajectory prediction model. The problems that according to an existing prediction method, ship interaction is learned by building a fixed space range, ship interaction is generated under the condition that the direction of ship interaction is not considered, too many useless features are caused, unnecessary interaction is likely to be caused, and then ship track prediction has large deviation are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship trajectory prediction, and in particular to a ship trajectory prediction method based on a spatiotemporal adaptive graph pool. Background Art

[0002] Ship trajectory prediction plays a vital role in early warning and safety of maritime navigation. When moving a ship, the navigator must fully grasp the future trajectory of the ship within a certain period of time in order to effectively avoid collisions. However, the accuracy of ship trajectory prediction is an important issue that needs to be solved at present. With the rapid growth of maritime trade volume, the demand for more ships with larger cargo capacity and higher speed has increased, and the issue of maritime safety and security has become prominent. It is of great importance to ensure the safety of maritime transportation. Trajectory prediction helps marine objects such as ships to warn and prevent collisions, which is considered to reduce the risk of maritime transportation accidents, and most ships are obliged to use transponder systems such as AIS to identify themselves. In contrast, ships that do not do so intentionally or unintentionally are called black ships. They must be discovered using other tools such as drones, aircraft or satellites equipped with radio frequency receivers or imaging sensors. Knowing the future trajectory of a ship not only helps avoid ship collisions, but also helps to determine the identity of black ships found in satellite images. This is of great significance to ensuring the safety of maritime transportation and promoting the development of intelligent shipping.

[0003] In recent years, trajectory prediction has played an important role in autonomous navigation and multi-agent cooperation of pedestrians, vehicles and ships. The current prediction methods are mainly divided into two aspects: data-driven trajectory prediction and model-driven trajectory prediction. Model-driven trajectory prediction learns the movement law of ships from a large amount of AIS historical data and infers the future movement trajectory of ships based on the previous movement characteristics of ships. Compared with the data-driven method, the prediction accuracy of this method is improved. Deep learning models are increasingly widely used in the field of ship trajectory prediction due to their high representation ability, which also enables more refined features to be learned from historical data, laying the foundation for more accurate and continuous real-time ship trajectory prediction.

[0004] However, current prediction methods learn ship interactions by establishing a fixed spatial range. Ship interactions are generated without considering their directions, resulting in too many useless features, which can easily lead to unnecessary interactions and thus cause large deviations in ship trajectory predictions. Summary of the invention

[0005] The present invention provides a ship trajectory prediction method based on a spatiotemporal adaptive graph pool to overcome the above technical problems.

[0006] In order to achieve the above object, the technical solution of the present invention is:

[0007] A ship trajectory prediction method based on spatiotemporal adaptive graph pool specifically comprises the following steps:

[0008] S1: Get the AIS raw data of the ship’s track;

[0009] S2: preprocess the AIS raw data to obtain a sample set of ship trajectory data;

[0010] And the ship trajectory data sample set is randomly divided into a training set and a validation set;

[0011] S3: constructing a ship trajectory prediction model, wherein the ship trajectory prediction model includes a ship trajectory time encoder, a ship trajectory space interaction encoder, a feature fusion module and a prediction decoder;

[0012] Based on the ship trajectory time encoder, the ship trajectory data samples are encoded into ship trajectory motion sequence to obtain the ship time series characteristics;

[0013] The ship trajectory spatial interaction encoder includes a graph attention network layer and a spatial interaction encoding unit;

[0014] The graph attention network layer is used to obtain the aggregated trajectory features of different ships according to the ship time series features; the spatial interaction encoding unit is used to obtain the ship feature vector with time-continuous ship spatial interaction features according to the aggregated trajectory features based on the adaptive graph pooling mechanism;

[0015] The feature fusion module is used to fuse the ship time series features with the ship feature vector, obtain the intermediate state vector, and use the intermediate state vector as the hidden state vector of the current time step;

[0016] The prediction decoder is used to predict and obtain the hidden state vector of the next time step based on the intermediate state vector, that is, the position corresponding to the next time step of the ship;

[0017] S4: The ship trajectory prediction model is trained and verified based on the training set and the validation set to obtain the optimal ship trajectory prediction model, and then the ship trajectory is predicted through the optimal ship trajectory prediction model.

[0018] Further, the AIS raw data is preprocessed as described in S2, including AIS data filtering, AIS data separation and AIS data extraction in sequence;

[0019] The AIS data filtering at least includes: deleting AIS data whose ship MMSI number is not a preset number of digits; deleting AIS data containing null values; deleting AIS data whose ship speed over ground SOG and course over ground COG exceed the preset threshold range; deleting AIS data containing less than a preset number of ships under the same timestamp, and randomly deleting AIS data with repeated timestamps corresponding to the same ship MMSI number; using linear interpolation method to resample AIS data at a preset interval sampling period to supplement the missing ship latitude and longitude data;

[0020] The AIS data separation is to separate the data after the AIS data is filtered to obtain the separated trajectory sequence data, which specifically includes:

[0021] The AIS data is grouped based on the ship MMSI number to obtain the AIS track data corresponding to each ship, and the AIS track data of each ship is sorted by time based on the timestamp to obtain the continuous ship track sequence data of each ship;

[0022] The AIS data extraction is to use a sliding window method to perform trajectory extraction of a preset time step on the ship trajectory sequence data to obtain a sample set of ship trajectory data.

[0023] Furthermore, the model expression of the ship trajectory time encoder in S3 is:

[0024]

[0025] Where: represents the latitude coordinate of ship i at time step t and t∈{1,…,N}; represents the latitude coordinate of ship i at time step t-1; represents the relative latitude position of the ship at time step t relative to time step t-1; represents the longitude coordinate of the ship at time step t; represents the longitude coordinate of ship i at time step t-1; represents the relative longitude position of the ship at time step t relative to time step t-1; represents the fixed-length vector at which the relative position is embedded into each time step; φ(·) represents the embedding function; W e represents the embedding weight; represents the hidden state of the ship trajectory time encoder of ship i at time step t; W m Represents the weight of the ship trajectory time encoder.

[0026] Furthermore, the model expression of the spatial interaction coding unit is:

[0027]

[0028] Where: ∥ represents the connection operation between hidden states; W represents the weight matrix of the shared linear transformation applied to each ship node; N represents the attention coefficient of ship node i and ship node j at time step t; i represents the neighborhood set of node i in the directed graph obtained based on the graph attention network; a represents the weight vector of a single-layer feedforward neural network; a T represents the transpose of a; τ represents the adaptive distance threshold function and τ∈[0,1]; n represents the number of neighboring nodes of node i in the directed graph; ||{·} represents the selection function; represents the attention coefficient after the adaptive graph pooling mechanism; σ represents the nonlinear activation function; represents the spatial interaction characteristics of ships; W g represents the weights of the spatial interaction encoder; Feature vectors representing interaction features with temporal continuity; The feature vector representing the time-continuous interaction characteristics of ship i at time step t-1.

[0029] Furthermore, the model expression of the prediction decoder in S3 is:

[0030]

[0031] Where: W d represents the weight of the prediction decoder; mlp(·) represents the linear layer; Indicates that at time step t obs A fixed-length vector when ; Indicates that at time step t obs The intermediate state vector at +1; Indicates that at time step t obs , the hidden state of the ship trajectory time encoder; Indicates that at time step t obs When , the spatial interaction coding unit outputs a feature vector of interaction features with temporal continuity; They represent the ship at time step t obs +1 corresponds to the horizontal and vertical coordinates of the position.

[0032] Furthermore, the S4 specifically includes the following steps:

[0033] S41: inputting the training set into the constructed ship trajectory prediction model for model training to obtain a trained ship trajectory prediction model;

[0034] S42: verifying the trained ship trajectory prediction model through the verification set;

[0035] That is, to determine whether the output of the trained ship trajectory prediction model converges;

[0036] If the output of the trained ship trajectory prediction model converges, it is confirmed that the trained ship trajectory prediction model is the optimal ship trajectory prediction model;

[0037] Otherwise, based on the back propagation algorithm, the weight parameters of the trained ship trajectory prediction model are adaptively adjusted, and step S41 is repeated until it is confirmed that the weight parameters of the trained ship trajectory prediction model that have converged are the optimal weight parameters and the ship trajectory prediction model is reconstructed to obtain the optimal ship trajectory prediction model.

[0038] Furthermore, the loss function Loss used in S42 to determine whether the output of the trained ship trajectory prediction model converges is:

[0039]

[0040] Where: represents the predicted trajectory of ship i; Y i represents the true trajectory of ship i.

[0041] Beneficial effects: The present invention provides a ship trajectory prediction method based on a spatiotemporal adaptive graph pool, which adopts an encoder-decoder structure to construct a ship trajectory prediction model based on a spatiotemporal adaptive graph pool, and uses a ship trajectory time encoder to sequence encode the ship trajectory motion, so as to extract the motion sequence characteristics of each ship from the historical trajectory in the time dimension; in the spatial interaction coding unit, based on the adaptive graph pool mechanism, an adaptive distance threshold is used to eliminate redundant interactions, and a sparse directed graph and a ship spatial interaction feature with time continuity are constructed, so as to obtain the spatiotemporal characteristics of the ship sequence data, so as to eliminate useless features in the ship interaction; a feature fusion module is used to fuse the ship time series features and the ship spatial interaction features into an intermediate state vector, and the intermediate state vector is used as the hidden state vector of the current time step, and it is input into the prediction decoder to predict and obtain the position corresponding to the next time step of the ship, so as to realize the ship trajectory prediction, which greatly improves the prediction accuracy and efficiency of the ship trajectory. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] 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 creative labor.

[0043] Figure 1It is a flow chart of the ship trajectory prediction method based on the spatiotemporal adaptive graph pool of the present invention;

[0044] Figure 2 A structural block diagram of a ship trajectory prediction model based on a spatiotemporal adaptive graph pool is constructed in this embodiment;

[0045] Figure 3 Schematic diagram of the process of preprocessing AIS raw data in this embodiment;

[0046] Figure 4 Schematic diagram of a single graph attention layer in this embodiment. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 described embodiments are 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 creative work are within the scope of protection of the present invention.

[0048] This embodiment provides a ship trajectory prediction method based on a spatiotemporal adaptive graph pool. Figure 1 As shown, the specific steps include:

[0049] S1: Obtain AIS raw data of ship track; specifically, the AIS raw data includes: MMSI (unique ship ID), BaseDateTime (timestamp), LAT (latitude), LON (longitude), SOG (speed over ground), COG (course over ground), Heading (heading angle), ship name, IMO number, call sign, ship type, navigation status, length, width, draft, and cargo weight;

[0050] S2: preprocess the AIS raw data to obtain a sample set of ship trajectory data, and randomly divide the sample set of ship trajectory data into a training set and a validation set;

[0051] Specifically, Figure 3 As shown, according to the pre-created data processor, the AIS raw data is pre-processed, including AIS data filtering, AIS data separation and AIS data extraction in sequence; wherein the pre-created data processor is a unit module set according to the existing data filtering, data separation and data extraction technology, which is only used to realize the pre-processing of data according to the existing data processing function, and the data processing technology itself is not the invention point of the present application, and will not be described in detail here;

[0052] The AIS data filtering at least includes: deleting AIS data whose ship MMSI number is not a preset number of digits, that is, deleting data whose MMSI number is not 9 digits, to ensure the uniqueness and validity of the data; deleting AIS data containing null values, that is, deleting data samples of AIS attribute information containing null values; deleting AIS data whose ship ground speed SOG and ground course COG exceed the preset threshold range, that is: the SOG range is set to [1.0-22.0], and the COG range is set to [0-360], and the data exceeding the range will be deleted; deleting AIS data containing less than the preset number of ships under the same timestamp, and randomly deleting AIS data with repeated timestamps corresponding to the same ship MMSI number, that is, deleting AIS data and SOG values ​​of non-sea ships. AIS data of moored and anchored ships with a speed of less than 1 knot and AIS data with less than 3 ships under the same BaseDateTime are deleted. In addition, for the same MMSI number, the BaseDateTime is checked, the AIS data with duplicate timestamps are removed, and the only record with the same BaseDateTime is retained; the AIS data is resampled at a preset interval sampling period using linear interpolation to supplement the missing ship latitude and longitude data, that is, the AIS data is resampled at intervals of one minute using linear interpolation to supplement the missing LAT and LON data of the AIS data every minute; since SOG and Heading are relatively stable in a short period of time, the average value is used instead of SOG and Heading for interpolation during this period;

[0053] The AIS data separation is to separate the data after AIS data filtering to obtain separated trajectory sequence data, specifically including: grouping the AIS data based on the ship MMSI number, obtaining the AIS trajectory data corresponding to each ship, and sorting the AIS trajectory data of each ship according to time based on the timestamp to obtain continuous ship trajectory sequence data of each ship;

[0054] Specifically, the AIS raw data are grouped by MMSI number, and the data of the same MMSI number (i.e. the same ship) are sorted by time. In this embodiment, the ship trajectory data is defined as T = {p0, p1, ..., p n}, where n is the number of valid samples for each ship, p = (x, y) represents the specific location information of the ship at a certain moment; x represents the LON longitude; y represents the LAT latitude;

[0055] The AIS data extraction is to use a sliding window method to extract the trajectory of the ship trajectory sequence data at a preset time step to obtain a sample set of ship trajectory data;

[0056] Specifically, for the ship trajectory sequence data T = {p0, p1, ..., p n}, since the model needs to learn to predict the target sequence of length Q based on the input sequence of length l, the length of the sliding window is set to l+Q; starting from the starting point of the trajectory sequence, a time window of length l+Q is taken, and the sliding window slides forward with a step size of 1, and a new trajectory sample is obtained each time until the last ship trajectory point of the entire trajectory sequence is covered; after the trajectory data is extracted, the AIS data is preprocessed to obtain a series of trajectory data samples as a ship trajectory data sample set for the input of the prediction model;

[0057] S3: Construct a ship trajectory prediction model, such as Figure 2 As shown, the ship trajectory prediction model includes a ship trajectory time encoder, a ship trajectory space interaction encoder, a feature fusion module and a prediction decoder; based on the ship trajectory time encoder, the ship trajectory data samples are encoded into a ship trajectory motion sequence to obtain the ship time series features;

[0058] Specifically, suppose there are N ships in the set sea area, and the historical trajectories of all ships are received X = {X1, X2, …, X N}, predict the future trajectories of all ships The ship i is placed in a period of time t obs The historical trajectory is defined as where t∈{1,…,t obs}, and the predicted trajectory of the ship in the future period t pred can be defined as where t∈{t obs +1,…,t pred}; represents the latitude and longitude values ​​of ship i at time step t;

[0059] The ship trajectory time encoder is composed of multiple layers of ConvLSTM, which can extract the motion sequence features of each ship from the historical trajectory in the time dimension. First, the relative position of each ship in the current time step relative to the previous time step is calculated, and its expression is:

[0060]

[0061] Where: represents the latitude coordinate of ship i at time step t and t∈{1,…,N}; represents the latitude coordinate of ship i at time step t-1; represents the relative latitude position of the ship at time step t relative to time step t-1; represents the longitude coordinate of the ship at time step t; represents the longitude coordinate of ship i at time step t-1; represents the relative longitude position of the ship at time step t relative to time step t-1;

[0062] Embed the relative position into a fixed-length vector at each time step In the above example, we get the embedding vector representation of the feature, which is expressed as

[0063]

[0064] Where: represents the fixed-length vector at which the relative position is embedded into each time step; φ(·) represents the embedding function; W e represents the embedding weight;

[0065] Fixed-length vector As the input of the ship trajectory time encoder, the ship time series characteristics are obtained, and its expression is:

[0066]

[0067] Where: φ(·) represents the embedding function; W e represents the embedding weight; represents the hidden state of M-ConvLSTM of ship i at time step t; W m Represents the weights of the ship trajectory time encoder, and these parameters are shared by all ships in the sea area.

[0068] The ship trajectory spatial interaction encoder includes a graph attention network layer and a spatial interaction encoding unit;

[0069] The graph attention network layer is used to obtain the aggregated trajectory features of different ships according to the time series features of the ships; the spatial interaction encoding unit is used to obtain the spatial interaction features of ships with time continuity according to the aggregated trajectory features based on the adaptive graph pooling mechanism;

[0070] In a specific embodiment, considering that ship movement is an interactive activity, using one ConvLSTM for each ship cannot capture the spatial interaction between ships, and the interaction between different ships is different; in order to consider the continuity of spatial interaction between ships in the time dimension, this embodiment uses a graph attention network GAT to aggregate the hidden states of ConvLSTM and establish a ship spatial interaction model with time and space perception. In order to exchange information between various ships in complex and crowded scenes, the social interaction between ships is modeled as a directed graph, and the ships in the scene are regarded as nodes on the graph, and each node contains the sequence characteristics of the ship. Firstly, the ship trajectory encoder is used to obtain the hidden state of each ship trajectory feature. Then, the graph attention mechanism is used to perform the weighted sum of the features of adjacent nodes, which is completely dependent on the node features and has nothing to do with the graph structure. Different ships have different interaction behaviors, which leads to different interactions between nodes in the directed graph. The attention mechanism helps to encode the relative influence and latent space interaction between ships. The graph attention network (GAT) is used as an aggregation mechanism to assign different importance to different nodes to aggregate information from adjacent nodes. The input of the GAT layer comes from the embedding vector m={m1,m2,…,m N}, where m i ∈R F , R is the number of nodes in the graph; F is the feature dimension of each node, and the output of the GAT layer is m′={m′1,m′2,…,m′ N}, where m′ i ∈R F′ ,The feature dimensions of the input and output of a node can be unequal. A single graph attention layer such as Figure 4 As shown:

[0071] The hidden state of the M-ConvLSTM of ship i at time step t After feeding into the attention layer graph, the attention mechanism coefficient of node pair (i, j) is calculated as:

[0072]

[0073] Where: || represents the connection operation between hidden states; W∈R F′×F The weight matrix representing the shared linear transformation applied to each node; N represents the attention coefficient of ship node i and ship node j at time step t; i Indicates the neighborhood set of node i in the directed graph obtained based on the graph attention network; a represents the weight vector of a single-layer feedforward neural network, which is then normalized by a softmax with a Leaky ReLU activation function to obtain the normalized attention coefficient a T represents the transpose of a;

[0074] The Adaptive Graph Pooling (AGP) mechanism is used to reduce redundant ship spatial interactions and improve trajectory prediction accuracy. However, the traditional pooling method still requires manual graph screening using the pooling rate parameter during the calculation process, which limits its ability to dynamically determine the optimal value of each directed graph. To solve this problem, the use of the Adaptive Distance Threshold (ADT) can provide a dynamic threshold for each directed graph, greatly reducing the problem of losing important information about ship trajectories during the pooling process;

[0075] Adaptive distance threshold function τ is used to reduce dense interactions. When The initial value of Set to 0, and finally get the attention coefficient after the adaptive graph pool mechanism Its expression is

[0076]

[0077] Where: τ represents the adaptive distance threshold function and τ∈[0,1]; n represents the number of neighboring nodes of node i in the directed graph; ||{·} represents the selection function; represents the attention coefficient after the adaptive graph pooling mechanism; ||{·} represents the selection function;

[0078] The output ship spatial interaction characteristics of the adaptive graph pooling mechanism of node i, i.e. ship i at time step t, are:

[0079]

[0080] Where: σ represents a nonlinear activation function, and two GAT layers are used in the adaptive graph pooling mechanism.

[0081] Get the ship space interaction characteristics

[0082] In this embodiment, in order to consider the continuity of spatial interaction features in the time dimension, GAT aggregates the hidden state of ConvLSTM and obtains the spatial interaction features through an adaptive graph pooling mechanism.

[0083] After that, the spatial interaction coding unit is used to establish a ship spatial interaction model with spatiotemporal perception. That is, the spatial interaction coding unit is composed of a ConvLSTM unit. This ConvLSTM unit is called G-ConvLSTM to capture the feature vector of the ship spatial interaction characteristics with temporal continuity. Its expression is:

[0084]

[0085] Where: W g represents the weights of the spatial interaction encoder; Feature vectors representing interaction features with temporal continuity; The feature vector representing the time-continuous interaction characteristics of ship i at time step t-1;

[0086] The feature fusion module is used to fuse the ship time series features with the ship space interaction features, obtain an intermediate state vector, and use the intermediate state vector as the hidden state vector of the current time step;

[0087] In a specific embodiment, in the ship trajectory time encoder, the motion sequence features of each ship are modeled by using M-ConvLSTM, and the temporal continuity of the spatial interaction between ships is modeled by using G-ConvLSTM, so as to obtain the spatial features of the ship interaction with temporal continuity, and these high-level features are fused to realize the spatiotemporal information fusion of the ship trajectory; at the time step t obs At the point, each ship is passed through the ship trajectory time encoder and the ship trajectory space interactive encoder, and the ship time series features and ship feature vectors obtained are used as two hidden state variables and And through the series operation, it is combined to obtain an intermediate state vector Its expression is

[0088]

[0089] Where: ⊕ represents the series operation between vectors; represents the observation time step t obs The intermediate state vector of ship i in , and contains the spatiotemporal characteristics of the ship;

[0090] The prediction decoder is used to predict and obtain the hidden state vector of the next time step according to the intermediate state vector, that is, the position corresponding to the next time step of the ship;

[0091] Specifically, D-ConvLSTM is used as a predictive decoder to predict the future trajectory of the ship. As the initial hidden state input to the prediction decoder, the future trajectory of the ship is predicted. The prediction decoder predicts the hidden state vector of the next time step as The predicted relative position of the ship is Its expression is

[0092]

[0093] Where: W drepresents the weight of the prediction decoder; mlp(·) represents the linear layer; Indicates that at time step t obs A fixed-length vector when ; Indicates that at time step t obs The intermediate state vector at +1; Indicates that at time step t obs , the hidden state of the ship trajectory time encoder; Indicates that at time step t obs When , the spatial interaction coding unit outputs a feature vector of interaction features with temporal continuity; They represent the ship at time step t obs +1 corresponds to the horizontal and vertical coordinates of the position;

[0094] S4: Based on the training set and the validation set, the ship trajectory prediction model is trained and validated to obtain the optimal ship trajectory prediction model, and then the ship trajectory is predicted through the optimal ship trajectory prediction model. Specifically, the following steps are included:

[0095] S41: inputting the training set into the constructed ship trajectory prediction model for model training to obtain a trained ship trajectory prediction model;

[0096] S42: verifying the trained ship trajectory prediction model through the verification set;

[0097] That is, to determine whether the output of the trained ship trajectory prediction model converges;

[0098] If the output of the trained ship trajectory prediction model converges, it is confirmed that the trained ship trajectory prediction model is the optimal ship trajectory prediction model;

[0099] Among them, the loss function Loss is used to judge whether the output of the trained ship trajectory prediction model converges. That is, the L2 loss is used as the loss function to measure the similarity between the generated predicted trajectory and the true trajectory. Its expression is:

[0100]

[0101] Where: represents the predicted trajectory of ship i; Y i represents the actual trajectory of ship i;

[0102] This embodiment trains the model by minimizing the loss function to achieve optimal performance and realize the prediction of the future trajectory of the ship, so as to take effective collision avoidance strategies in time to ensure the safety of maritime transportation;

[0103] Otherwise, based on the back propagation algorithm, the weight parameters of the trained ship trajectory prediction model are adaptively adjusted, and step S41 is repeated until it is confirmed that the weight parameters of the trained ship trajectory prediction model that have converged are the optimal weight parameters and the ship trajectory prediction model is reconstructed to obtain the optimal ship trajectory prediction model.

[0104] Compared with the prior art, this embodiment provides a ship trajectory prediction method based on a spatiotemporal adaptive graph pool, and constructs a ship trajectory prediction model based on a spatiotemporal adaptive graph pool, namely, the STCLAGP model, which adopts an encoder-decoder structure, wherein the ship trajectory motion is sequence-encoded by a ship trajectory time encoder, and the motion sequence characteristics of each ship can be extracted from the historical trajectory in the time dimension; in the spatial interaction coding unit, based on the adaptive graph pool mechanism, an adaptive distance threshold is used to eliminate redundant interactions, and a sparse directed graph and a ship spatial interaction feature with time continuity are constructed, thereby obtaining the spatiotemporal characteristics of the ship sequence data to eliminate useless features in the ship interaction; a feature fusion module is used to fuse the ship time series features and the ship spatial interaction features into an intermediate state vector, and the intermediate state vector is used as the hidden state vector of the current time step, and it is input into the prediction decoder to predict and obtain the position corresponding to the next time step of the ship, thereby realizing the ship trajectory prediction, which greatly improves the prediction accuracy and efficiency of the ship trajectory.

[0105] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned 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 spatiotemporal adaptive graph pool, characterized in that: The specific steps include: S1: Get the AIS raw data of the ship’s track; S2: preprocess the AIS raw data to obtain a sample set of ship trajectory data; And the ship trajectory data sample set is randomly divided into a training set and a validation set; S3: constructing a ship trajectory prediction model, wherein the ship trajectory prediction model includes a ship trajectory time encoder, a ship trajectory space interaction encoder, a feature fusion module and a prediction decoder; Based on the ship trajectory time encoder, the ship trajectory data samples are encoded into ship trajectory motion sequence to obtain the ship time series characteristics; The ship trajectory spatial interaction encoder includes a graph attention network layer and a spatial interaction encoding unit; The graph attention network layer is used to obtain the aggregated trajectory features of different ships based on the time series features of the ships; The spatial interaction encoding unit is used to obtain a ship feature vector with temporal continuity of ship spatial interaction features according to the aggregated trajectory features based on an adaptive graph pooling mechanism; The feature fusion module is used to fuse the ship time series features with the ship feature vector, obtain the intermediate state vector, and use the intermediate state vector as the hidden state vector of the current time step; The prediction decoder is used to predict and obtain the hidden state vector of the next time step based on the intermediate state vector, that is, the position corresponding to the next time step of the ship; S4: The ship trajectory prediction model is trained and verified based on the training set and the validation set to obtain the optimal ship trajectory prediction model, and then the ship trajectory is predicted through the optimal ship trajectory prediction model.

2. A ship trajectory prediction method based on spatiotemporal adaptive graph pool according to claim 1, characterized in that: The AIS raw data is preprocessed as described in S2, including AIS data filtering, AIS data separation and AIS data extraction in sequence; The AIS data filtering at least includes: deleting AIS data whose ship MMSI number is not a preset number of digits; deleting AIS data containing null values; deleting AIS data whose ship speed over ground SOG and course over ground COG exceed the preset threshold range; deleting AIS data containing less than a preset number of ships under the same timestamp, and randomly deleting AIS data with repeated timestamps corresponding to the same ship MMSI number; using linear interpolation method to resample AIS data at a preset interval sampling period to supplement the missing ship latitude and longitude data; The AIS data separation is to separate the data after the AIS data is filtered to obtain the separated trajectory sequence data, which specifically includes: The AIS data is grouped based on the ship MMSI number to obtain the AIS track data corresponding to each ship, and the AIS track data of each ship is sorted by time based on the timestamp to obtain the continuous ship track sequence data of each ship; The AIS data extraction is to use a sliding window method to perform trajectory extraction of a preset time step on the ship trajectory sequence data to obtain a sample set of ship trajectory data.

3. A ship trajectory prediction method based on spatiotemporal adaptive graph pool according to claim 2, characterized in that: The model expression of the ship trajectory time encoder in S3 is: Where: represents the latitude coordinate of ship i at time step t and t∈{1,…,N}; represents the latitude coordinate of ship i at time step t-1; represents the relative latitude position of the ship at time step t relative to time step t-1; represents the longitude coordinate of the ship at time step t; represents the longitude coordinate of ship i at time step t-1; represents the relative longitude position of the ship at time step t relative to time step t-1; represents the fixed-length vector at which the relative position is embedded into each time step; φ(·) represents the embedding function; W e represents the embedding weight; represents the hidden state of the ship trajectory time encoder of ship i at time step t; W m Represents the weight of the ship trajectory time encoder.

4. A ship trajectory prediction method based on spatiotemporal adaptive graph pool according to claim 3, characterized in that: The model expression of the spatial interaction coding unit is: Where: ∥ represents the connection operation between hidden states; W represents the weight matrix of the shared linear transformation applied to each ship node; N represents the attention coefficient of ship node i and ship node j at time step t; i represents the neighborhood set of node i in the directed graph obtained based on the graph attention network; a represents the weight vector of a single-layer feedforward neural network; a T represents the transpose of a; τ represents the adaptive distance threshold function and τ∈[0,1]; n represents the number of neighboring nodes of node i in the directed graph; ∥{·} represents the selection function; represents the attention coefficient after the adaptive graph pooling mechanism; σ represents the nonlinear activation function; Represents the spatial interaction characteristics of ships; W g represents the weights of the spatial interaction encoder; Feature vectors representing interaction features with temporal continuity; The feature vector representing the time-continuous interaction characteristics of ship i at time step t-1.

5. A ship trajectory prediction method based on spatiotemporal adaptive graph pool according to claim 4, characterized in that: The model expression of the prediction decoder described in S3 is Where: W d represents the weight of the prediction decoder; mlp(·) represents the linear layer; Indicates that at time step t obs A fixed-length vector when ; Indicates that at time step t obs The intermediate state vector at +1; Indicates that at time step t obs , the hidden state of the ship trajectory time encoder; Indicates that at time step t obs When , the spatial interaction coding unit outputs a feature vector of interaction features with temporal continuity; They represent the ship at time step t obs +1 corresponds to the horizontal and vertical coordinates of the position.

6. A ship trajectory prediction method based on spatiotemporal adaptive graph pool according to claim 1, characterized in that: The S4 specifically includes the following steps S41: inputting the training set into the constructed ship trajectory prediction model for model training to obtain a trained ship trajectory prediction model; S42: verifying the trained ship trajectory prediction model through the verification set; That is, to determine whether the output of the trained ship trajectory prediction model converges; If the output of the trained ship trajectory prediction model converges, it is confirmed that the trained ship trajectory prediction model is the optimal ship trajectory prediction model; Otherwise, based on the back propagation algorithm, the weight parameters of the trained ship trajectory prediction model are adaptively adjusted, and step S41 is repeated until it is confirmed that the weight parameters of the trained ship trajectory prediction model that have converged are the optimal weight parameters and the ship trajectory prediction model is reconstructed to obtain the optimal ship trajectory prediction model.

7. A ship trajectory prediction method based on spatiotemporal adaptive graph pool according to claim 6, characterized in that: The loss function Loss used in S42 to determine whether the output of the trained ship trajectory prediction model converges is: Where: represents the predicted trajectory of ship i; Y i represents the true trajectory of ship i.

Citation Information

Patent Citations

  • Ship trajectory prediction method and system based on deep learning

    CN117408372A

  • Multi-ship trajectory prediction method and system based on dynamic space-time refinement network

    CN117743795A

  • Ship-type-spoofing detection method employing ensemble learning

    WO2021017577A1

Cited By

  • Unmanned aerial vehicle GPS deception detection method based on federal learning

    CN120722393A