Coastal ship trajectory prediction method based on coarse and fine granularity navigation feature extraction

By constructing an aggregated network model based on coarse and fine-grained navigation feature extraction, and combining fine-grained and coarse-grained encoders, the problem of local features and global dependencies in coastal vessel trajectory prediction is solved, achieving more accurate and stable prediction results.

CN121167262APending Publication Date: 2025-12-19SHANGHAI MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511259105.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

In coastal areas, existing deep learning algorithms struggle to effectively capture local features and short-term dependencies in ship trajectories, resulting in large prediction errors, especially in complex geographical environments where accurate prediction is difficult.

Method used

An aggregation network model based on coarse and fine-grained navigation feature extraction is adopted, which combines a fine-grained navigation feature encoder and a coarse-grained navigation feature encoder. Local features are captured through slice embedding, slice differential self-attention and fine-grained convolution, and global dependencies are captured by combining BiLSTM and multi-head self-attention mechanism. Fully connected layers are used for feature collaborative aggregation.

Benefits of technology

It improves the accuracy and stability of coastal vessel trajectory prediction, effectively captures the local and global characteristics of vessel navigation, reduces computational complexity, and enhances the model's adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121167262A_ABST
    Figure CN121167262A_ABST
Patent Text Reader

Abstract

The invention provides a coastal ship trajectory prediction method based on coarse and fine granularity navigation feature extraction, and the method comprises the steps: collecting a ship data set, and dividing the ship data set into a training set, a verification set and a test set; performing data preprocessing on the collected ship data set; constructing an aggregation network model based on coarse and fine granularity navigation feature extraction; and sending the preprocessed ship trajectory data into the constructed network model for coarse and fine granularity feature extraction to obtain coarse and fine granularity navigation features, and inputting the obtained navigation features into a full connection layer for ship trajectory prediction. According to the method, the accuracy and reliability of coastal ship trajectory prediction are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ship trajectory prediction technology, specifically to a coastal ship trajectory prediction method based on coarse and fine-grained navigation feature extraction. Background Technology

[0002] Timely prediction of ship trajectories is crucial for issuing early warnings of potential dangers such as collisions, groundings, and encounters. However, achieving accurate trajectory prediction is challenging, especially in coastal areas where ship traffic density is much higher due to the presence of numerous ports and waterways compared to the vast ocean. This inevitably leads to the following challenges: 1) Compared to the high seas, high-density coastal areas require more frequent collision avoidance maneuvers, including turning, speed adjustments, and anchoring, resulting in highly complex ship navigation trajectories. 2) Due to the influence of tides and ocean currents, ship speeds can increase or decrease significantly in specific areas or time periods, significantly affecting the distance between navigation points and increasing prediction errors. 3) When ships navigate through complex geographical features such as coastal reefs, estuaries, and bays, they must change course to bypass obstacles or avoid shallow waters. Therefore, the overall trajectory exhibits complex nonlinear characteristics, posing challenges to their analysis.

[0003] In recent years, deep learning algorithms, including recurrent neural networks (RNNs) and their variants, have been widely applied in the field of ship navigation. These algorithms utilize recurrent architectures to capture temporal dependencies between timestamps in trajectories. For example, ship traffic conflict state models are created using AIS dynamic data and the concept of social forces, and then incorporated into LSTM networks to improve the accuracy of ship trajectory prediction. Although RNN-based trajectory prediction methods have achieved commendable results, they face challenges such as vanishing and exploding gradients, which limit their ability to capture global dependencies in long sequences. Recently, the introduction of attention-based neural networks has significantly enhanced the ability of models to capture global dependencies in long sequences. For example, GRU and Transformer architectures are integrated, along with complementary positional encoding, to analyze features in long-term trajectory sequences. Furthermore, attention mechanisms are used to capture global dependencies in both the temporal and spatial domains, thereby incorporating spatiotemporal features to predict future ship trajectories. However, they still have limitations in handling local features or short-term dependencies, neglecting local navigation features and failing to capture short-term fluctuations in speed and heading. Therefore, effectively modeling more fine-grained ship navigation information is crucial for improving the accuracy and stability of coastal ship predictions. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide a coastal vessel trajectory prediction method based on coarse and fine granular navigation feature extraction, which effectively improves the accuracy and reliability of coastal vessel trajectory prediction.

[0005] To solve the above problems, the technical solution of the present invention is as follows:

[0006] A coastal vessel trajectory prediction method based on coarse-grained and fine-grained navigation feature extraction includes the following steps:

[0007] Collect ship datasets and divide them into training, validation, and test sets;

[0008] Data preprocessing is performed on the collected ship dataset;

[0009] Construct an aggregated network model based on coarse and fine-grained navigation feature extraction;

[0010] The preprocessed ship trajectory data is fed into the constructed network model for coarse and fine-grained feature extraction to obtain coarse and fine-grained navigation features. The obtained navigation features are then input into the fully connected layer for ship trajectory prediction.

[0011] Preferably, the step of preprocessing the collected ship dataset specifically includes: interpolating, removing duplicate values, removing outliers, and normalizing the trajectory sequences in the collected ship dataset.

[0012] Preferably, in the step of constructing an aggregated network model based on coarse and fine-grained navigation feature extraction, the aggregated network model includes a fine-grained navigation feature encoder, a coarse-grained navigation feature encoder, and a fully connected layer.

[0013] Preferably, the fine-grained navigation feature encoder includes slice embedding, slice differential self-attention, and fine-grained feature convolution. Local changes in position and orientation within the embedding vector are captured by slice differential self-attention, and the output of slice differential self-attention is further refined by fine-grained convolution to capture more accurate ship navigation features.

[0014] Preferably, the coarse-grained navigation feature encoder is used to address the impaired global time dependency in the fine-grained navigation feature encoder, including a BiLSTM encoder and a multi-head self-attention mechanism.

[0015] Preferably, the BiLSTM encoder uses two independent LSTMs to operate on the sequence data in parallel, for bidirectional processing of the input sequence at each time step.

[0016] Preferably, to generate the final prediction result, the outputs of the fine-grained navigation feature encoder and the coarse-grained navigation feature encoder are collaboratively aggregated using a fully connected layer:

[0017]

[0018] Among them W T and W S This represents the weight matrix of the fully connected layer; the Concat operation performs direct vector concatenation, combining local fine-grained features along the feature dimension. and global coarse-grained features Output X' SA This represents the final result of the synergistic integration of fine-grained and coarse-grained features.

[0019] Preferably, the constructed aggregated network model based on coarse and fine granular navigation feature extraction is trained, validated, and tested using training set, validation set, and test set data.

[0020] Compared with the prior art, the present invention has the following beneficial effects:

[0021] 1. The fine-grained navigation feature encoder of this invention adopts the slice differential self-attention (SDSA) method. This method cuts the embedding vector into several segments and calculates the attention between segments. Each segment consists of a series of points. Compared with the total number of points, the number of segments is much smaller. This method not only reduces the computational complexity, but also effectively explores the locality of neighboring points.

[0022] 2. This invention combines 2D convolution and residual connection FGC modules to further extract fine-grained features of navigation in order to capture local changes in trajectory position and velocity.

[0023] 3. This invention proposes a multi-semantic input method in granular navigation feature encoders. This method combines the ship's relative position information from the previous time step with the current navigation information, embeds them into a vector as an input sequence, and then combines BiLSTM and self-attention to capture the global temporal dependence of ship navigation. Attached Figure Description

[0024] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0025] Figure 1 This is a flowchart of the coastal vessel trajectory prediction method based on coarse and fine granular navigation feature extraction of the present invention;

[0026] Figure 2 This is a flowchart illustrating the coastal vessel trajectory prediction method based on coarse and fine-grained navigation feature extraction according to the present invention.

[0027] Figure 3 The flowchart of the fine-grained feature extraction network provided by this invention;

[0028] Figure 4 This is a slice differential self-attention map in the fine-grained feature extraction network of this invention;

[0029] Figure 5 This is a fine-grained convolutional graph in the fine-grained feature extraction network of this invention;

[0030] Figure 6 The diagram shows the coarse-grained feature extraction network structure provided by this invention. Detailed Implementation

[0031] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0032] Specifically, this invention provides a coastal vessel trajectory prediction method based on coarse- and fine-grained navigation feature extraction, such as... Figure 1 As shown, the method includes the following steps:

[0033] S1: Collect ship datasets and divide them into training, validation, and test sets;

[0034] Specifically, the dataset used in this invention comprises a large number of ships equipped with real AIS systems, collected in 2022 from coastal areas of China and the United States. This dataset primarily includes information such as MMSI, latitude and longitude coordinates, ground speed, ground heading, collection time, and ship status. 70% of the dataset was used for training, 10% for validation, and the remaining 20% ​​for testing.

[0035] S2: Perform data preprocessing on the collected ship dataset;

[0036] Specifically, the trajectory sequences in the collected ship dataset are interpolated, duplicate values ​​are removed, outliers are removed, and normalization is performed; the specific methods are as follows:

[0037] Collected AIS data is prone to containing numerous missing, duplicate, and randomly scattered outliers, primarily due to communication delays within the AIS system and external weather interference. Therefore, preprocessing the raw data is crucial for improving model stability and the accuracy of extracting ship trajectory features. First, rows containing missing and duplicate data are removed from the raw dataset to reduce data volume and improve processing efficiency. To address missing values ​​in the raw AIS data, linear interpolation is used to fill in the gaps, preserving the original trajectory's movement trend and pattern. For random outliers, the following methods are employed to eliminate them:

[0038] (1) Ship position information should be limited to a range of 90 degrees latitude (north-south) and 180 degrees longitude (east-west). Any data outside this range is considered an outlier.

[0039] (2) Navigation safety requirements regulate ship speed through various regulations, including the International Convention for the Safety of Life at Sea (SOLAS), which sets the maximum permissible speed below 30 knots.

[0040] (3) Based on navigation parameters, relatively static ship trajectories (such as anchoring or mooring) are excluded.

[0041] S3: Construct an aggregated network model based on coarse and fine-grained navigation feature extraction;

[0042] like Figure 2 As shown, the aggregated network model includes a fine-grained navigation feature encoder (FGVE), a coarse-grained navigation feature encoder (CGVE), and a fully connected layer (FC).

[0043] The Fine-Grained Navigation Feature Encoder (FGVE) consists of three key modules: Slice Embedding (SE), Slice Differential Self-Attention (SDSA), and Fine-Grained Feature Convolution (FGC). The FGVE proposed in this invention helps the model adapt to highly irregular trajectories along coastlines. First, the Slice Embedding (SE) technique enriches the navigation information encapsulated in a single embedding vector. Local changes in position and orientation within the embedding vector are captured by Slice Differential Self-Attention (SDSA). Finally, the output of SDSA is further processed by Fine-Grained Convolution (FGC) to extract features and capture more fine-grained ship navigation characteristics.

[0044] Specifically, such as Figure 3 As shown, in Figure 3 In the fine-grained navigation feature encoder, the input data is first slice-embedded (SE). In each slice, the position, velocity and heading of several consecutive trajectory points are embedded into a vector, effectively using navigation information across consecutive time steps to enhance the information of the embedded vector.

[0045] The slice embedding (SE) specifically includes: Unlike audio and video sequences, ship trajectory sequences exhibit specific correlations across continuous time steps. To enhance the information encapsulated in the embedding vector, a slice embedding method is employed to segment the input time series into segments of length L. Slice Slices:

[0046]

[0047] in It is a d-dimensional variable of length L for the i-th ship. Slice The e-th slice.

[0048] Following the above operations, linear projection and position embedding techniques are used to convert each piece of information into a vector:

[0049]

[0050] Here, E represents a learnable projection matrix, and This represents the learnable position embedding at positions e and d.

[0051] By using this method, an array of embedding vectors is obtained:

[0052]

[0053] in This represents a segment of a univariate time series.

[0054] The processed vector is input into the designed slice differential self-attention (SDSA) algorithm, the structure of which is as follows: Figure 4 As shown, the Slice Differential Self-Attention (SDSA) specifically includes: for a single-head self-attention scenario, projecting the input sequence H... i Through three projection matrices W q W k and W v Retrieve query Q, key K, and value V. Q = H i W q K = H i W k V = H i W v Arrange Q, K, and V according to length L SD The partitioning yields {Q1,Q2,…,Q} m},{K1,K2,…,K n},{V1,V2,…,V n}, where m and n are the segment lengths. Since Q, K, and V are obtained through slicing, Q... i K i and V i Since the data consists of two-dimensional matrices rather than vectors, matrix computation is required to determine the similarity between slices as an attention score. We can use a simple dot product method to calculate the similarity between matrices. However, the dot product has limitations because it only focuses on numerical differences and ignores the direction of element changes, thus lacking sensitivity to directional information in the data. Furthermore, the dot product considers all elements in the matrix without emphasizing specific elements or patterns, making it suitable for comprehensive similarity comparisons. To focus on capturing fine-grained navigation features in position and orientation, we propose a two-dimensional gradient difference strategy during the attention computation process.

[0055] To measure the relevance c between all queries Q and key K ij We use two-dimensional gradient difference to calculate the correlation of local segments:

[0056]

[0057]

[0058] and Q represents i The difference components in the horizontal and vertical gradient directions, denoted by Diff, represent the difference computation, where axis represents the difference dimension. M is the aggregate gradient magnitude matrix. ω Q and ω K It is obtained through the Euclidean norm and used to aggregate the gradient magnitudes on the two components. Finally, for any given query matrix Q... i and key K i The similarity c between them is calculated using Euclidean distance. ij .

[0059]

[0060] in It is the scaling factor for the current slice weight, used as the relevance metric between each query and key.

[0061] The attention weights are obtained by normalizing using the Softmax function:

[0062]

[0063] The output Y of the i-th slice i It is all values ​​{V j The weighted sum of the products of |j=1,2,…,n} and their corresponding attention weights.

[0064]

[0065] The final output of the single-head attention module is obtained by concatenating the outputs of all slices.

[0066] SD(H;L) SD = Concat(Y1,Y2,…,Y) m ) = head k

[0067] Here, SD is an abbreviation for SliceDiff. Finally, the outputs of all heads are concatenated and projected according to the above method to obtain the differential self-attention output:

[0068]

[0069] Among them, all heads are connected via W h Perform linear combinations.

[0070] like Figure 5 As shown, after slice differential self-attention (SDSA), a fine-grained feature extraction layer (FGC) is proposed to enhance the ability to capture local fine-grained features in the trajectory. The fine-grained convolution (FGC) consists of four 2D convolutional layers. These dimensions correspond to the time dimension and the variable dimension, respectively. The kernel size for the variable dimension is always set to 1. The odd-numbered layers consist of 1×1 convolutional layers, specifically designed to extract pure element-wise features and enhance their representation. To mitigate the impact of outliers on the model, the even-numbered layers employ convolutions with a stride of 3×1, enhancing local connectivity and smoothing outliers. Finally, after three FGC layers, the fine-grained features of the FGVE are output.

[0071] like Figure 6 As shown, the coarse-grained navigation feature encoder (CGVE) combines a bidirectional long short-term memory (BiLSTM) and a multi-head self-attention (MSA) mechanism. The purpose of designing the CGVE encoder is to address the impaired global temporal dependencies in the aforementioned FGVE.

[0072] The BiLSTM overcomes the limitations of traditional LSTM by employing two independent LSTMs to operate on the sequence data in parallel. During implementation, the relative position of each ship at the current time step relative to the previous time step is first calculated:

[0073]

[0074] in This represents the latitude coordinate of ship i at time step t. This represents the relative latitude of ship i at time step t relative to the previous time step t-1. Similarly, Represents relative longitude position. At each time step t, the relative position, velocity, and heading are encoded as a fixed-length vector.

[0075]

[0076] The input data is passed to a BiLSTM encoder, which consists of two LSTM units for bidirectional processing of the input sequence at each time step. A typical LSTM consists of three gates: a forget gate and a forget gate. t Input gate i t Output gate ot Given The calculation formula is as follows:

[0077]

[0078] Cell state C t By integrating f t and i t Update as needed. σ corresponds to the Sigmoid activation function, and tanh corresponds to the tanh activation function. ω and b represent the learnable parameters in the LSTM. The prediction formula of BiLSTM is derived by combining the outputs of the forward and backward LSTM modules:

[0079]

[0080] Where f represents the mapping function in forward propagation, and f2 represents the mapping function in backward propagation. ω f and ω b Corresponding to their respective weights. f3 and ω out This represents the output mapping function and its related parameters. This represents the output at time step t.

[0081] To enhance the model's ability to capture long-term dependencies, a self-attention mechanism is incorporated into the BiLSTM architecture. Compared to slicing and gradient differencing methods, this approach provides a more global representation of temporal dependencies.

[0082]

[0083] Wherein, the projection matrix W q and W k and W v These are trainable parameters. The self-attention mechanism receives a query q, a key k, and a value v as input, d k This represents the dimension of each query sequence.

[0084]

[0085] Furthermore, the multi-head form of the self-attention mechanism can be used to capture different aspects of the relationships between input features:

[0086]

[0087] Among them W o Linear combination head j All outputs.

[0088] Finally, to generate the final prediction results, a fully connected layer (FC) is used to collaboratively aggregate the outputs of FGVE and CGVE:

[0089]

[0090] Among them W T and W S This represents the weight matrix of the fully connected layer. The Concat operation performs direct vector joins, combining local fine-grained features along the feature dimension. and global coarse-grained features Output X' SA This represents the final result of the synergistic integration of fine-grained and coarse-grained features.

[0091] The constructed aggregated network model based on coarse and fine granular navigation feature extraction was trained, validated, and tested using training, validation, and test sets.

[0092] S4: The preprocessed ship trajectory data is fed into the constructed network model for coarse and fine-grained feature extraction to obtain coarse and fine-grained navigation features. The obtained navigation features are then input into the fully connected layer for ship trajectory prediction.

[0093] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A coastal vessel trajectory prediction method based on coarse-grained and fine-grained navigation feature extraction, characterized in that, The method includes the following steps: Collect ship datasets and divide them into training, validation, and test sets; Data preprocessing is performed on the collected ship dataset; Construct an aggregated network model based on coarse and fine-grained navigation feature extraction; The preprocessed ship trajectory data is fed into the constructed network model for coarse and fine-grained feature extraction to obtain coarse and fine-grained navigation features. The obtained navigation features are then input into the fully connected layer for ship trajectory prediction.

2. The coastal vessel trajectory prediction method based on coarse-grained and fine-grained navigation feature extraction according to claim 1, characterized in that, The steps for preprocessing the collected ship dataset specifically include: interpolating, removing duplicate values, removing outliers, and normalizing the trajectory sequences in the collected ship dataset.

3. The coastal vessel trajectory prediction method based on coarse-grained and fine-grained navigation feature extraction according to claim 1, characterized in that, In the step of constructing an aggregated network model based on coarse and fine-grained navigation feature extraction, the aggregated network model includes a fine-grained navigation feature encoder, a coarse-grained navigation feature encoder, and a fully connected layer.

4. The coastal vessel trajectory prediction method based on coarse and fine-grained navigation feature extraction according to claim 3, characterized in that, The fine-grained navigation feature encoder includes slice embedding, slice differential self-attention, and fine-grained feature convolution. Local changes in position and orientation within the embedding vector are captured by slice differential self-attention, and the output of slice differential self-attention is further refined by fine-grained convolution to capture more accurate ship navigation features.

5. The coastal vessel trajectory prediction method based on coarse and fine-grained navigation feature extraction according to claim 3, characterized in that, The coarse-grained navigation feature encoder is used to address the impaired global time dependency in the fine-grained navigation feature encoder, including a BiLSTM encoder and a multi-head self-attention mechanism.

6. The coastal vessel trajectory prediction method based on coarse-grained and fine-grained navigation feature extraction according to claim 5, characterized in that, The BiLSTM encoder uses two independent LSTMs to operate on the sequence data in parallel, enabling bidirectional processing of the input sequence at each time step.

7. The coastal vessel trajectory prediction method based on coarse-grained and fine-grained navigation feature extraction according to claim 3, characterized in that, To generate the final prediction, the outputs of the fine-grained and coarse-grained navigation feature encoders are collaboratively aggregated using fully connected layers: Among them W T and W S This represents the weight matrix of the fully connected layer; the Concat operation performs direct vector concatenation, combining local fine-grained features along the feature dimension. and global coarse-grained features Output X' SA This represents the final result of the synergistic integration of fine-grained and coarse-grained features.

8. The coastal vessel trajectory prediction method based on coarse-grained and fine-grained navigation feature extraction according to claim 1, characterized in that, The constructed aggregated network model based on coarse and fine granular navigation feature extraction was trained, validated, and tested using training, validation, and test sets.