Ship track prediction method and system based on multi-ship coupling influence

By constructing a ship track prediction model based on GAN and MLP, identifying the coupling impact of multiple ships encountered, extracting the potential motion characteristics of the target ship, solving the problem of not considering the coupling effect caused by multiple ships encountered in the prior art, and achieving high-precision track prediction and risk reduction.

CN120354035AActive Publication Date: 2025-07-22SHANDONG UNIV OF SCI & TECH

Patent Information

Application Number
CN202510829168.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-07-22
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

The prior art fails to effectively consider the coupling effect caused by multiple ships in ship track prediction, resulting in reduced prediction accuracy and retaining redundant information, making it impossible to adapt to complex maritime traffic environments.

Method used

Generative adversarial network (GAN) is used to combine multi-head probability sparse self-attention and multi-layer perceptron (MLP), and potential motion characteristics of the target ship are extracted by identifying the coupling effects of adjacent ships, and the adversarial training of generators and discriminators is used to generate high-precision tracks.

Benefits of technology

It improves the accuracy of ship track prediction, reduces collision risks, is suitable for intelligent shipping management systems and port scheduling, reduces economic losses, and improves waterway utilization and logistics and transportation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354035A_ABST
    Figure CN120354035A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of ship track prediction, and discloses a ship track prediction method and system based on multi-ship coupling influence. The method comprises the following steps: identifying adjacent ships generating coupling influence on a target ship; extracting a potential motion feature vector of the target ship under coupling influence at the # imgabs0 # moment; outputting a predicted track of the target ship by using the designed generator; and inputting the real track and the predicted track into a discriminator, and finally generating the probability that the input track is identified as the real track. The mutual competition training of the generator and the discriminator in the generative adversarial network can further improve the precision of ship track prediction, so that the constructed model is more suitable for a real ship navigation environment, and the collision risk is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of ship trajectory prediction, and particularly relates to a ship trajectory prediction method and system affected by multi-ship coupling. Background Art

[0002] With the continuous growth of maritime trade demand and the increasing pressure of complex sea area traffic, the risk of traffic accidents such as ship collisions has gradually increased. In order to improve maritime traffic safety and prevent ship collisions, it is necessary to monitor and predict the movement behavior of ships to achieve intelligent maritime monitoring. The existing technology uses the Bidirectional Long Short-Term Memory (Bi-LSTM) as the basic model for ship trajectory prediction, which comprehensively considers the context information of time series data. At the same time, in order to improve the accuracy and adaptability of complex trajectories, an attention mechanism is added to the Bi-LSTM model to increase the weight of key information. However, most of the current research on ship trajectory prediction does not consider the coupling effect caused by multi-ship encounters, and redundant information is retained in the prediction process, which affects the prediction accuracy.

[0003] Through the above analysis, the problems and defects of the existing technology are as follows: The existing technology uses Bi-LSTM to more comprehensively consider the context information of time series data, and at the same time adds an attention mechanism to increase the weight of key information, but redundant information is retained in the prediction process, and the research does not consider the coupling effect caused by multi-ship encounters during ship navigation. In the real navigation environment, there are encounter situations such as head-on encounter, crossing encounter and overtaking. In this case, when there are two or more encounter situations at the same time, adjacent ships will have a coupling effect on the navigation of the target ship. Summary of the Invention

[0004] To overcome the problems existing in the related technologies, the disclosed embodiments of the present invention provide a ship trajectory prediction method and system for the coupled influence of multiple ships. The purpose of the present invention is to address the problem that in ship trajectory prediction, the coupled effect caused by the encounter of multiple ships is not considered, or although the influence of the encounter is considered, it only involves one of the head-on, crossing, or overtaking situations between two ships, and two or more complex situations have not been involved. The present invention constructs a ship trajectory prediction model based on the Generative Adversarial Network (GAN), integrating multi-head probabilistic sparse self-attention and the Multilayer Perceptron (MLP). The constructed prediction model uses a collision risk quantification index to effectively identify the neighboring ships that have a coupled influence on the target ship, and extracts the potential motion characteristics of the target ship under the coupled influence. On this basis, the trajectory of the target ship is predicted, and through the mutual competitive training of the generator and discriminator in the model, a ship trajectory with higher accuracy is generated, providing technical support for ensuring maritime traffic safety and improving the efficiency of maritime traffic supervision.

[0005] The technical solution is as follows: A ship trajectory prediction method for the coupled influence of multiple ships, including: S1, selecting the closest distance of approach (DCPA) and the closest time of approach (TCPA) as evaluation indicators to identify the neighboring ships that have a coupled influence on the target ship; S2, using the MLP to quantify the non-linear relationship between the motion characteristics of the target ship and the motion characteristics of the neighboring ships, and extracting the potential motion feature vector of the target ship at the moment under the coupled influence; ; S3, inputting the potential motion feature vector of the target ship at the moment under the coupled influence into the G-encoder based on Bi-LSTM carried by the generator for encoding, and outputting the hidden feature representation of the target ship's trajectory ; inputting the hidden feature representation of the target ship's trajectory into the multi-head probabilistic sparse self-attention to remove redundant information and retain the attention to key information, obtaining the weighted hidden feature ; inputting the weighted hidden feature into the G-decoder based on Bi-LSTM carried by the generator for decoding, and outputting the feature representation of the predicted trajectory ; inputting the feature representation of the predicted trajectory into the MLP carried by the generator, and outputting the predicted trajectory of the target ship; ; S4. Input the true track and the predicted track into the Bi-LSTM-based D-encoder carried by the discriminator to obtain the hidden state matrix output by the Bi-LSTM. Input the hidden state matrix output by the Bi-LSTM into the MLP carried by the discriminator, and finally generate the probability that the input track is recognized as a true track. .

[0006] In step S1, select the closest distance of approach (DCPA) and the time to closest point of approach (TCPA) as evaluation indicators to identify neighboring vessels that have a coupled impact on the target vessel, including: The latitudes, longitudes, speeds, and headings of the target vessel and the neighboring vessels are respectively: and ; Calculate the relative distance between the two based on the latitude and longitude coordinate data of the target vessel and the neighboring vessel; as shown in formulas (1)-(2): (1) (2) In the formula, is the relative distance between the target vessel and the neighboring vessel, is the radius of the earth; Calculate the relative speed and relative heading between the two based on the speeds and headings of the target vessel and the neighboring vessel, as shown in formulas (3)-(4): (3) (4) In the formula, is the relative speed, is the relative heading, is the arccosine function; Calculate the corresponding DCPA and TCPA based on the relative distance, relative speed, and relative heading calculated above, as shown in formulas (5)-(6): (5) (6) In the formula, is the relative bearing of the target vessel; Vessels with a DCPA less than 3 NM and a TCPA less than 30 minutes are identified.

[0007] In step S2, use the MLP to quantify the non-linear relationship between the motion characteristics of the target vessel and the motion characteristics of the neighboring vessels, and extract the potential motion feature vector affected by the coupling at the , including: The MLP establishes a complex non-linear relationship model through hidden layers and activation functions, and automatically learns hierarchical feature representations from the original data by processing high-dimensional data, extracts the non-linear relationship between the motion features of the target ship and the motion features of neighboring ships, and based on the non-linear relationship between them, extracts the potential motion feature vector of the target ship, as shown in formulas (7)-(9): (7) Wherein, is the input feature matrix of the MLP, is the feature vector of the target ship at moment, including latitude, longitude, speed, and heading information, ; is the feature vector of the th neighboring ship that has a coupling effect on the target ship at moment, including latitude, longitude, speed, and heading information, ; is the feature vector of the th neighboring ship that has a coupling effect on the target ship at moment, including latitude, longitude, speed, and heading information, is the feature vector of the th neighboring ship that has a coupling effect on the target ship at moment, including latitude, longitude, speed, and heading information, ; Formula (7) integrates the state information of the target ship and neighboring ships into an input matrix for subsequent feature extraction; (8) Wherein, is the output of the th hidden layer, is the weight matrix of the th layer, is the output of the th layer, is the bias of the th layer, is the total number of hidden layers in the MLP, is the activation function; Formula (8) describes the calculation process of the th hidden layer of the MLP, and extracts features layer by layer through linear transformation and non-linear activation functions; (9) Wherein, is the potential motion feature vector of the target ship affected by coupling at moment, is the weight matrix of the output layer in the MLP, is the output of the L-th hidden layer, is the bias of the output layer in the MLP; Formula (9) is the calculation process of the output layer of the MLP, generating the potential motion feature vector of the target ship at the moment affected by coupling.

[0008] In step S3, the generator is equipped with: a G-encoder, a multi-head probabilistic sparse self-attention module, a G-decoder, and an MLP; Select Bi-LSTM as the core component of the G-encoder. Bi-LSTM is composed of two layers of long short-term memory networks LSTM stacked together; the first layer of LSTM inputs data forward, and the second layer of LSTM inputs data backward; the LSTM cell contains a forget gate, an input gate, a cell state, and an output gate; the above components control the information flow through the sigmoid activation function and pointwise multiplication to model the long-term dependence relationship in sequence data; the long short-term memory network LSTM includes: the input vector enters the forget gate, the input gate, and the output gate, as shown in formulas (10)-(12): (10) where is the forget gate vector, is the sigmoid function, is the historical state transformation weight of the forget gate, is the potential motion feature vector of the target ship at the moment affected by coupling, is the input feature transformation weight of the forget gate, is the hidden state at the moment, is the bias of the forget gate; Formula (10) determines whether to remember the cell state information of the previous unit; (11) (12) where is the input gate vector, is the historical state transformation weight of the input gate, is the input feature transformation weight of the input gate, is the bias of the input gate, is the output gate vector, is the historical state transformation weight of the output gate, is the input feature transformation weight of the output gate, is the bias of the output gate, is the activation function; Equation (11) controls that new information needs to be updated to the cell state; Equation (12) determines which information in the cell state is memorized as the output state. Output the candidate cell state vector and update the cell state vector, as shown in Equations (13) - (14): (13) (14) Where is the candidate cell state vector, is the historical state transformation weight of the candidate cell state, is the input feature transformation weight of the candidate cell state, is the cell state vector, is the bias of the candidate cell state, is the cell state vector at time Equation (13) generates new information that may be added to the cell state; Equation (14) updates the cell state by combining the decisions of the forget gate and the input gate. Update the hidden state vector according to the output gate vector and the cell state vector, as shown in Equation (15): (15) Where is the hidden state vector output by the single-direction LSTM layer; Equation (15) updates the hidden state vector according to the output gate vector and the cell state vector.

[0009] In step S3, in the Bi-LSTM, the forward propagation layer processes the sequence in chronological order to generate the hidden state , and the backward propagation layer processes the sequence in the reverse order to generate the hidden state ; the bidirectional hidden state at each moment is obtained by Equation (16): (16) Where is the bidirectional hidden state finally output by the Bi-LSTM; Equation (16) concatenates and to form a bidirectional hidden state containing context information for subsequent calculations.

[0010] Furthermore, the multi-head probabilistic sparse self-attention module combines the multi-head attention mechanism with the sparsification strategy to focus on the coupling effect of neighboring ships on the target ship, as shown in Equations (17) - (24): (17) (18) (19) In the formula, are the query matrix, the key matrix, and the value matrix respectively, is the hidden matrix composed of vectors, ; is the number of timestamps, are the weight matrices of the query, key, and value; To reduce the computational complexity and centrally process the most relevant information, a sparsification strategy is adopted. The sparsity metric calculation for each query is shown in formula (20): (20) In the formula, is the th row vector of is the th row vector of is the matrix transpose symbol, is the transpose of the row vector the transpose of is the length of the key, is the feature dimension of the key vector in the model, is the sparsification metric score, is the key matrix; Formula (20) is used to judge the attention distribution between each query and all keys, so as to obtain the sparsity metric value between each query-key pair. The obtained multiple sparsity metric values are sorted from large to small, and the top results are selected to participate in the subsequent calculation; the calculation formula of the sparse attention weight is shown in formula (21): (21) In the formula, is the sparse attention weight, is the set of query elements corresponding to , is the transpose matrix of the key matrix ; Formula (21) is used to calculate the attention weight between the query and the key, and the probability distribution is obtained through softmax normalization, which determines the attention degree of the model at different positions; The probability sparse attention mechanism is extended to attention heads to capture different features, as shown in formulas (22)-(24). The output captures the global dependencies and complex features in the data, and analyzes and predicts future trajectories; Calculate the Output of each attention head: (22) Wherein, is the output of the -th attention head, is the sparse attention weight, is the value matrix; Concatenate and linearly transform the outputs of all attention heads: (23) Wherein, is the output of the multi-head probabilistic sparse self-attention, is the concatenation operation, is the output of the 1st attention head, is the output of the 2nd attention head, is the output of the -th attention head, is the learnable weight matrix of the output layer; Obtain the final output: (24) Wherein, is the final output of the multi-head probabilistic sparse self-attention.

[0011] Furthermore, the G-decoder gradually generates the feature representation of the predicted track according to the outputs of the G-encoder and the multi-head probabilistic sparse self-attention module ; The G-decoder also uses Bi-LSTM; Then introduce MLP after the decoder to convert the hidden representation into the latitude, longitude, speed, and heading data of the predicted track at the moment , that is, the predicted track, as shown in formulas (25)-(26): (25) (26) Wherein, are the weight matrices of the Bi-LSTM and MLP networks respectively, are the biases of the Bi-LSTM and MLP networks respectively.

[0012] In step S4, the discriminator is equipped with a D-encoder and an MLP; The discriminator processes the input track data through the D-encoder and the MLP, and outputs the probability that the input data is recognized as a real track; as shown in formulas (27) and (28): (27) (28) Wherein, is the hidden state matrix output by the Bi-LSTM, are the weight matrices of the Bi-LSTM and the MLP respectively, are the biases of the Bi-LSTM and the MLP respectively, represents the true track sequence of the target ship, where is at the th moment, the true latitude, longitude, speed, and course of the target ship; represents the predicted track sequence of the target ship output by the generator, where is at the th moment, the predicted latitude, longitude, speed, and course, is the probability that the input track is recognized as a true track.

[0013] After step S4, the generator and the discriminator compete with each other through the adversarial learning mechanism, and gradually optimize their respective parameters; finally, predicted track data highly similar to the true track data is generated to achieve high-precision prediction of the track.

[0014] Another object of the present invention is to provide a ship track prediction system affected by multi-ship coupling. This system implements the ship track prediction method affected by multi-ship coupling. This system includes: A ship identification module based on multi-ship coupling, which is used to select the closest distance of approach DCPA and the closest time of approach TCPA as evaluation indicators to identify neighboring ships that have a coupling effect on the target ship; A feature extraction module, which uses an MLP to quantify the non-linear relationship between the motion features of the target ship and the motion features of neighboring ships, and extracts the potential motion feature vector of the target ship affected by coupling at the moment ; A generator, which is used to input the potential motion feature vector of the target ship affected by coupling at the moment into the Bi-LSTM-based G-encoder carried by the generator for encoding, and output the hidden feature representation of the target ship track ; input the hidden feature representation of the target ship track into the multi-head probability sparse self-attention to eliminate redundant information and retain the attention to key information, and obtain the weighted hidden feature ; input the weighted hidden feature into the Bi-LSTM-based G-decoder carried by the generator for decoding, and output the feature representation of the predicted track ; input the feature representation of the predicted track into the MLP carried by the generator, and output the predicted track of the target ship; ​ The discriminator inputs the real track and the predicted track into the Bi-LSTM-based D-encoder carried by the discriminator to obtain the hidden state matrix output by the Bi-LSTM , and inputs the hidden state matrix output by the Bi-LSTM into the MLP carried by the discriminator, and finally generates the probability that the input track is recognized as a real track .

[0015] Combining all the above technical solutions, the beneficial effects of the present invention are as follows First, by extracting the coupling effects generated by neighboring ships on the target ship in various encounter situations, the present invention constructs a new ship track prediction model based on GAN that simultaneously integrates multi-head probabilistic sparse self-attention and MLP. This model can break through the limitations in previous studies where the coupling effects caused by multi-ship encounters were not considered, or although the impacts caused by ship encounters were considered, only the head-on, crossing, or overtaking situations between two ships were involved, and the complex situations with two or more types have not been covered. It realizes ship track prediction under the coupling influence of neighboring ships in multi-ship encounter situations. The present invention uses MLP to quantify the multi-ship coupling influence and extract the potential motion characteristics of the target ship. At the same time, Bi-LSTM is selected as the core component of the encoder and decoder to capture the characteristics of bidirectional time series. Multi-head probabilistic sparse self-attention is embedded in the model, and the internal connections between hidden representations can be captured more efficiently through parallelized attention calculation and probabilistic sparse selection mechanism, eliminating redundant information. The mutual competition training between the generator and the discriminator in the generative adversarial network can further improve the accuracy of ship track prediction, making the constructed model more suitable for the real ship navigation environment and reducing the collision risk

[0016] Second, the solution of the present invention can be widely applied to fields such as intelligent shipping management systems, port scheduling, and ship autopilot. By accurately predicting the ship tracks during multi-ship encounters, it can effectively reduce the incidence of ship collision accidents, reduce economic losses such as insurance claims and ship repairs, and reduce the operating costs of enterprises; at the same time, improve the utilization rate of waterways and shipping efficiency, and promote the improvement of logistics transportation efficiency

[0017] Third, for the existing ship track prediction technologies at home and abroad, most focus on single-ship motion or simple two-ship encounter scenarios, lacking systematic research on ship track prediction in complex multi-ship encounter situations with two or more ships. The technical solution of the present invention first proposes a ship track prediction model that integrates multi-head probabilistic sparse self-attention, MLP, and GAN, achieving a key breakthrough at the theoretical and algorithm levels, and providing a new technical path for multi-ship collaborative navigation research BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure; Figure 1 It is the schematic diagram of the ship track prediction system for the coupled influence of multiple ships provided by the embodiments of the present invention; Figure 2 It is the diagram of the DCPA and TCPA calculation examples provided by the embodiments of the present invention; Figure 3 It is the structure diagram of Bi-LSTM provided by the embodiments of the present invention; Figure 4 It is the comparison diagram of the prediction errors of the present invention when the time interval is 30 s; Figure 5 It is the comparison diagram of the prediction errors of the present invention when the time interval is 1 min; Figure 6 It is the comparison diagram of the prediction errors of the present invention when the time interval is 2 min; Figure 7 It is the comparison diagram of the prediction errors of the present invention when the time interval is 5 min; Figure 8 It is the comparison track diagram of the present invention when the time interval is 30 s; Figure 9 It is the longitude prediction schematic diagram of different methods when the time interval of the present invention is set to 30 s; Figure 10 It is the latitude prediction schematic diagram of different methods when the time interval of the present invention is set to 30 s; Figure 11 It is the comparison track diagram of the present invention when the time interval is 1 min; Figure 12 It is the longitude prediction diagram of different methods when the time interval of the present invention is set to 1 min; Figure 13 It is the latitude prediction diagram of different methods when the time interval of the present invention is set to 1 min; Figure 14 It is the comparison track diagram of the present invention when the time interval is 2 min; Figure 15 It is the longitude prediction diagram of different methods when the time interval of the present invention is set to 2 min; Figure 16 It is the latitude prediction diagram of different methods when the time interval of the present invention is set to 2 min; Figure 17 It is the comparison track diagram of the present invention when the time interval is 5 min; Figure 18 It is the longitude prediction diagram of different methods when the time interval of the present invention is set to 5 min; Figure 19It is the latitude prediction diagram of different methods when the time interval of the present invention is set to 5 minutes. DETAILED DESCRIPTION

[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0020] The innovation of the present invention lies in: in view of the excellent performance of the generative adversarial network in generating a predicted track that is infinitely close to the real track by using the game adversarial training between the generator and the discriminator, a new ship track prediction model based on the generative adversarial network is constructed by integrating multi-head probabilistic sparse self-attention and MLP, which is used to explore the track prediction of the target ship under the influence of multi-ship coupling; the model introduces MLP for feature extraction to quantify the influence of multi-ship coupling and explore the potential navigation behavior characteristics of the target ship under the multi-ship coupling effect; at the same time, the multi-head probabilistic sparse self-attention mechanism is embedded, and the intrinsic connection between hidden representations can be more efficiently captured through parallel attention calculation and probabilistic sparse selection mechanism, redundant information can be eliminated, and the weight of the continuous variable in the hidden state can be determined.

[0021] Embodiment 1, as Figure 1 As shown, the ship track prediction system for multi-ship coupling influence provided by an embodiment of the present invention includes: The ship identification module based on multi-ship coupling influence selects the closest encounter distance DCPA and the closest encounter time TCPA as evaluation indicators to identify the adjacent ships that have coupling influence on the target ship. The closest encounter distance DCPA is less than 3NM and the closest encounter time TCPA is less than 30 min. The feature extraction module uses MLP to quantify the nonlinear relationship between the motion characteristics of the target ship and the motion characteristics of the neighboring ships, and extracts the target ship's The potential motion feature vector affected by coupling at all times ; Generator, used to place the target ship in The potential motion feature vector affected by coupling at all times The input is encoded into the Bi-LSTM-based G-encoder carried by the generator, and the hidden feature representation of the target ship track is output. ; Represent the hidden features of the target ship’s track Input into multi-head probabilistic sparse self-attention, remove redundant information, retain attention to key information, and obtain weighted hidden features ; The weighted hidden features The input is sent to the Bi-LSTM-based G-decoder on the generator for decoding, and the feature representation of the predicted track is output. ; The characteristics of the predicted track are represented by The input is fed into the MLP carried by the generator, and the predicted track of the target ship is output; The discriminator inputs the real track and the predicted track into the D-encoder based on Bi-LSTM carried by the discriminator to obtain the hidden state matrix output by Bi-LSTM , the hidden state matrix of Bi-LSTM output The input is fed into the MLP of the discriminator, and the probability of the input track being recognized as the real track is finally generated. .

[0022] The generator and the discriminator are trained competitively to further improve the accuracy of ship track prediction.

[0023] Example 2, the key to ship track prediction based on multi-ship coupling effect is how to explore the potential navigation characteristics of the target ship under the multi-ship coupling effect. In addition, the generator in GAN is responsible for generating the future track of the ship, while the discriminator continuously distinguishes the generated track from the real track. Through continuous adversarial training, the two can jointly improve the model performance, thereby achieving high-precision ship track prediction. Therefore, the present invention proposes a new ship track prediction model based on GAN that simultaneously integrates multi-head probabilistic sparse self-attention and MLP. The specific framework principle is as follows Figure 1 As shown in the figure, the distance to closest point of approach (DCPA) and time to closest point of approach (TCPA) are used as evaluation indicators to identify the neighboring ships that have a coupling effect on the target ship, and MLP is used for feature extraction to obtain the potential navigation feature vector of the target ship. . By G-encoder Encode and output the hidden feature representation of the target ship track Embedding multi-head probabilistic sparse self-attention, through parallel attention calculation and probabilistic sparse selection mechanism, more effectively explores the relationship between hidden features and obtains weighted hidden features The G-decoder will Decoded into context information, a predicted track is generated. The real track and the predicted track are input into the discriminator to identify the authenticity of the track.

[0024] Specifically, the ship track prediction method for multi-ship coupling influence provided by the embodiment of the present invention includes: S1. Select the closest distance of approach DCPA and the closest time of approach TCPA as evaluation indicators to identify neighboring ships that have a coupled impact on the target ship; The closest distance of approach DCPA is less than 3 NM and the closest time of approach TCPA is less than 30 min; S2. Use an MLP to quantify the non - linear relationship between the motion characteristics of the target ship and those of the neighboring ships, and extract the potential motion feature vector of the target ship affected by the coupling at the moment; ; S3. Input the potential motion feature vector of the target ship affected by the coupling at the moment into the Bi - LSTM - based G - encoder carried by the generator for encoding, and output the hidden feature representation of the target ship's track ; Input the hidden feature representation of the target ship's track into the multi - head probabilistic sparse self - attention to eliminate redundant information and retain the attention to key information, obtaining the weighted hidden feature ; Input the weighted hidden feature into the Bi - LSTM - based G - decoder carried by the generator for decoding, and output the feature representation of the predicted track ; Input the feature representation of the predicted track into the MLP carried by the generator, and output the predicted track of the target ship; ; S4. Input the true track and the predicted track into the Bi - LSTM - based D - encoder carried by the discriminator to obtain the hidden state matrix output by the Bi - LSTM , and input the hidden state matrix output by the Bi - LSTM into the MLP carried by the discriminator, and finally generate the probability that the input track is recognized as a true track ; Among them, the generator and the discriminator compete with each other in training to further improve the accuracy of ship track prediction.

[0025] Exemplarily, in step S1, ship identification based on multi - ship coupled impact: Select DCPA and TCPA as evaluation indicators, calculate the DCPA and TCPA of the target ship and other ships, and regard the ships with DCPA less than 3 NM and TCPA less than 30 minutes as neighboring ships that have an impact on the target ship.

[0026] Specifically, ship identification based on multi - ship coupled impact specifically includes: During the navigation process, the navigation of the target ship is affected by the coupling effects caused by the encounters of multiple ships. Identifying the neighboring ships that have a coupling effect on the target ship is the basis for the subsequent work of the present invention. Considering that DCPA and TCPA are usually applied to collision risk assessment and can effectively determine which ships are dangerous and which are not, the present invention uses DCPA and TCPA as the method for identifying neighboring ships. As Figure 2 shown in the calculation example diagrams of DCPA and TCPA, the latitudes, longitudes, speeds, and headings of the target ship and the neighboring ships are and . The relative distance between the two is calculated based on the latitude and longitude coordinate data of the target ship and the neighboring ship, as shown in Formulas (1) - (2). The relative speed and relative heading between the two are calculated based on the speeds and headings of the target ship and the neighboring ship, as shown in Formulas (3) - (4). Finally, the corresponding DCPA and TCPA are calculated based on the relative distance, relative speed, and relative heading calculated above, as shown in Formulas (5) - (6).

[0027] (1) (2) In the formula, is the relative distance between the target ship and the neighboring ship, is the radius of the earth; Based on the speeds and headings of the target ship and the neighboring ship, the relative speed and relative heading between the two are calculated, as shown in Formulas (3) - (4): (3) (4) In the formula, is the relative speed, is the relative heading, is the arccosine function; Based on the relative distance, relative speed, and relative heading calculated above, the corresponding DCPA and TCPA are calculated, as shown in Formulas (5) - (6): (5) (6) In the formula, is the relative bearing of the target ship; Ships with DCPA less than 3 NM and TCPA less than 30 minutes are identified.

[0028] Generally speaking, ship drivers will define a typical safety distance of 2 NM based on experience to avoid other ships. However, in actual navigation scenarios, various physiological, psychological, and environmental factors will affect the driver's judgment. Therefore, the present invention defines the safety distance as 3 NM. The DCPA less than 3 NM and the TCPA less than 30 min are used as the evaluation indexes of the present invention.

[0029] It can be understood that the innovative proposal of the above formula in the application background and specific application scenarios of the present invention plays a unique and crucial role, has remarkable technical effects, and has a positive effect on improving the accuracy of track prediction, enhancing the adaptability to complex environments and multi-ship interactions, and solving the technical problems of track prediction in existing technologies in complex port waters.

[0030] Exemplarily, in step S2, feature extraction: It is used to quantify the non-linear relationship between the motion features of the target ship and the motion features of neighboring ships by using MLP, and extract the potential motion feature vector of the target ship affected by coupling at t the moment, which is used as the input of the Bi-LSTM-based G-encoder carried by the generator.

[0031] Specifically, the feature extraction includes: As described in step S1, determining the neighboring ships that have a multi-ship coupling effect on the target ship is the basis of the research. Then, how to quantify the coupling influence generated by neighboring ships is the key issue. MLP can establish a complex non-linear relationship model through hidden layers and activation functions, and automatically learn hierarchical feature representations from raw data by processing high-dimensional data. Therefore, MLP is embedded in the feature extraction framework. It is used to extract the non-linear relationship between the motion features of the target ship and the motion features of neighboring ships. Based on their non-linear relationship, the potential motion feature vector of the target ship is extracted as shown in formulas (7)-(9): (7) In the formula, is the input feature matrix of MLP, is the feature vector of the target ship at the moment, including latitude, longitude, speed, and heading information, ; is the feature vector of the th neighboring ship that has a coupling influence on the target ship at the moment, including latitude, longitude, speed, and heading information, ; is the feature vector of the th neighboring ship that has a coupling influence on the target ship at the moment, including latitude, longitude, speed, and heading information, The feature vector of the th neighboring ship that has a coupling effect on the target ship at time, including latitude, longitude, speed, and heading information, ; Formula (7) integrates the state information of the target ship and neighboring ships into an input matrix for subsequent feature extraction; (8) In the formula, is the output of the th hidden layer, is the weight matrix of the th layer, is the output of the th layer, is the bias of the th layer, is the total number of hidden layers in the MLP, is the activation function; Formula (8) describes the calculation process of the th hidden layer of the MLP, extracting features layer by layer through linear transformation and non - linear activation function; (9) In the formula, is the potential motion feature vector of the target ship affected by the coupling effect at time, is the weight matrix of the output layer in the MLP, is the output of the th hidden layer in the MLP, is the bias of the output layer in the MLP; Formula (9) is the calculation process of the output layer of the MLP, generating the potential motion feature vector of the target ship affected by the coupling effect at

[0032] It can be understood that the usage scenarios and functions of the MLP in the prior art are different from those of the present invention. Many existing studies only focus on the trajectory prediction of a single ship. In these scenarios, the MLP is mainly used for feature extraction and processing of the trajectory data of a single ship itself. For example, by analyzing the historical data of the ship's speed, heading, position, etc. through the MLP, its own motion laws and patterns are mined. It does not involve the interaction between multiple ships, and even less will it extract the non - linear relationship between the motion features of the target ship and neighboring ships. The problem of ship trajectory prediction under the multi - ship coupling effect has unique complexity. Multiple ships affect each other during navigation, and their motion relationships are non - linear and complex and changeable. The methods of single - ship feature processing or general data feature conversion in the prior art cannot capture such complex interactions and coupling effects between multiple ships.

[0033] Therefore, the formula (7) - formula (9) constructed by the present invention to extract potential motion feature vectors is an innovative method for ship trajectory prediction in a multi-ship coupling scenario.

[0034] Exemplarily, in step S3, the generator is equipped with a G-encoder, a multi-head probabilistic sparse self-attention module, a G-decoder, and an MLP.

[0035] Among them, the role of the G-encoder is to convert the input data into a high-dimensional hidden representation to capture the time-related context information in the data. In fact, for the ship trajectory prediction problem, the ship's trajectory at the next moment will be affected by the data at the previous moment and the data at the next moment. Since Bi-LSTM can capture forward and backward sequence information and improve the model's ability to analyze sequence data, the present invention selects Bi-LSTM as the core component of the G-encoder.

[0036] As Figure 3 shown in the Bi-LSTM structure diagram, Bi-LSTM is composed of two layers of long short-term memory networks (LSTM) stacked. The first layer of LSTM inputs data forward, and the second layer of LSTM inputs data backward. The LSTM cell contains a forget gate, an input gate, a cell state, and an output gate. These components control the information flow through the sigmoid activation function and pointwise multiplication to achieve the modeling of long-term dependencies in sequence data. The details of the LSTM network are as follows. The input vector enters the forget gate, the input gate, and the output gate, as shown in formulas (10) - (12). Then, the output candidate cell state vector is output, and the cell state vector is updated, as shown in formulas (13) - (14). Finally, the hidden state vector is updated according to the output gate vector and the cell state vector, as shown in formula (15).

[0037] (10) In the formula, is the forget gate vector, is the sigmoid function, is the historical state transformation weight of the forget gate, is the potential motion feature vector of the target ship affected by coupling at time, is the input feature transformation weight of the forget gate, is the hidden state at time, is the bias of the forget gate; (11) (12) Wherein, is the input gate vector, is the weight of the historical state transformation of the input gate, is the weight of the input feature transformation of the input gate, is the bias of the input gate, is the output gate vector, is the weight of the historical state transformation of the output gate, is the weight of the input feature transformation of the output gate, is the bias of the output gate, is the activation function; Formula (11) controls the new information to be updated to the cell state; Formula (12) determines which information in the cell state is memorized as the output state; Output the candidate cell state vector and update the cell state vector as shown in Formulas (13)-(14): (13) (14) Wherein, is the candidate cell state vector, is the weight of the historical state transformation of the candidate cell state, is the weight of the input feature transformation of the candidate cell state, is the cell state vector, is the bias of the candidate cell state, is the cell state vector at time Formula (13) generates new information that may be added to the cell state; Formula (14) combines the decisions of the forget gate and the input gate to update the cell state; Update the hidden state vector according to the output gate vector and the cell state vector as shown in Formula (15): (15) Wherein, is the hidden state vector output by the single-direction LSTM layer; Formula (15) updates the hidden state vector according to the output gate vector and the cell state vector.

[0038] In the Bi-LSTM, the forward propagation layer processes the sequence in chronological order to generate the hidden state , and the backward propagation layer processes the sequence in the reverse order to generate the hidden state . Finally, the bidirectional hidden state at each time is obtained by Formula (16).

[0039] (16) Wherein, is the bidirectional hidden state finally output by the Bi-LSTM; Formula (16) combines and to form a bidirectional hidden state containing context information for subsequent calculations.

[0040] It can be understood that in the field of ship trajectory prediction, the encoders in the prior art mostly adopt a single LSTM, unidirectional GRU or ordinary feedforward neural network structure: a single LSTM can only capture sequence dependencies in the forward direction and cannot utilize future information; the same is true for the unidirectional GRU and its long-distance modeling ability is limited; the ordinary feedforward neural network cannot process temporal features. In the present invention, the G-encoder breakthroughly adopts the Bi-LSTM as the core component, and through the superposition of two layers of LSTM in the forward and backward directions, it realizes the bidirectional temporal modeling of the ship trajectory sequence for the first time - both capturing the influence of historical trajectories on the current state and mining the potential constraints of future trends on the current behavior. Compared with the prior art, this encoder solves the technical bottlenecks of the traditional unidirectional model that cannot capture the "future-current" inverse temporal correlation and the long-distance features are easily lost, provides a more comprehensive spatio-temporal feature basis for trajectory prediction in multi-ship complex interaction scenarios, and enables the model to accurately depict the dynamic behavior logic of ships in the multi-ship coupling effect.

[0041] Exemplarily, a multi-head probabilistic sparse self-attention module. In order to further improve the model's ability to capture the complex dependency relationships between the target ship and neighboring ships, a multi-head probabilistic sparse self-attention mechanism is adopted. This mechanism combines the multi-head attention mechanism with a sparsification strategy, and by retaining important motion features, dynamically reduces the attention to irrelevant motion features, thereby facilitating the attention to the coupling influence of neighboring ships on the target ship, as shown in formulas (17)-(24).

[0042] (17) (18) (19) Wherein, are the query matrix, key matrix and value matrix respectively, is the hidden matrix composed of vectors, ; is the number of timestamps, are the weight matrices of the query, key and value; To reduce the computational complexity and centrally process the most relevant information, a sparsification strategy is adopted, and the sparse metric calculation for each query is shown in formula (20): (20) Wherein, is the th row vector, is the th row vector, is the matrix transpose symbol, is the transpose of the row vector ; is the length of the key, is the feature dimension of the key vector in the model, is the sparsification metric score, is the key matrix; Formula (20) is used to determine the attention distribution between each query and all keys, so as to obtain the sparse metric value between each query-key pair. The obtained multiple sparse metric values are sorted from large to small, and the top results are selected to participate in the subsequent calculation; the calculation formula of the sparse attention weight is shown in Equation (21): (21) In the formula, is the sparse attention weight, is the corresponding query element set, is the transpose matrix of the key matrix ; Formula (21) is used to calculate the attention weight between the query and the key, and the probability distribution is obtained through softmax normalization, which determines the attention degree of the model at different positions; The probability sparse attention mechanism is extended to attention heads to capture different features. As shown in Formulas (22)-(24). This final output can capture the global dependencies and complex features in the data, enabling the model to effectively analyze and predict future trajectories.

[0043] Calculate the output of the th attention head, as shown in Formula (22): (22) In the formula, is the output of the th attention head, is the sparse attention weight, is the value matrix; The outputs of all attention heads are concatenated and linearly transformed, as shown in Formula (23): (23) In the formula, is the output of the multi-head probability sparse self-attention, is the concatenation operation, Is the output of the first attention head, Is the output of the second attention head, Is the output of the th attention head, Is the learnable weight matrix of the output layer; Obtain the final output, as shown in formula (24): (24) In the formula, Is the final output of the multi-head probabilistic sparse self-attention.

[0044] It can be understood that in the prior art, multi-head self-attention and sparsification strategies mostly focus on optimizing computational efficiency or general sequence modeling, and do not combine with the feature modeling requirements of multi-ship coupling scenarios. The multi-head probabilistic sparse self-attention mechanism of the present invention breakthroughly fuses the quantification of ship coupling effects and attention calculation deeply: after mapping ship motion features to query (Q), key (K), and value (V) matrices through formulas (17)-(19), use the sparse metric of formula (20) to dynamically screen features strongly associated with the target ship and eliminate redundant information; through the calculation of the sparse attention weight of formula (21), make different attention heads adaptively focus on multi-dimensional features of coupling relationships, realize dynamic weight allocation under continuous variable hidden states and hierarchical sorting of feature importance; finally, through the multi-head concatenation and linear transformation of formulas (22)-(24), uniformly capture the local sensitivity and global dependence of multi-ship interactions. Compared with the prior art, the formula operation of this mechanism is upgraded from "general feature association" to "coupling effect-oriented semantic perception", solving the problems of computational redundancy and dilution of key features in traditional attention in multi-ship scenarios, and significantly improving the parsing efficiency and accuracy of the model for complex multi-ship interaction patterns.

[0045] Specifically, the G-decoder gradually generates the feature representation of the predicted track according to the outputs of the G-encoder and the multi-head probabilistic sparse self-attention module . Similar to the G-encoder, the G-decoder also uses Bi-LSTM. Then an MLP is introduced after the decoder to convert the hidden representation into the latitude, longitude, speed, and course data of the predicted track at the moment, that is, the predicted track. The specific formula is as shown in formulas (25)-(26).

[0046] (25) (26) In the formula, Are the weight matrices of the Bi-LSTM and MLP networks respectively, They are the biases of the Bi-LSTM and MLP networks respectively.

[0047] It can be understood that in the prior art, the decoder mostly uses a unidirectional LSTM or a traditional fully connected layer, which can only process unidirectional time series or local features, and it is difficult to accurately map to the longitude and latitude coordinates, speed, and heading of complex spatio-temporal dependencies. The G-decoder of this application innovatively continues the bidirectional modeling ability of Bi-LSTM. By synchronously capturing the causal relationship of historical tracks and the potential constraints of future tracks through the forward and backward LSTM layers, it solves the problem of insufficient modeling of "inverse time series interaction" in the multi-ship coupling scenario by the unidirectional model. At the same time, the second MLP introduced after the decoder directly maps the high-dimensional hidden features output by Bi-LSTM to longitude and latitude coordinates, speed, and heading through multi-layer non-linear transformation (such as equations (25)-(26)), breaking through the information loss bottleneck of the need for multi-layer complex networks to transform coordinates in the prior art - improving the coherence of track generation through bidirectional time series modeling and enhancing the prediction regression accuracy using the non-linear fitting ability of MLP.

[0048] Exemplarily, in step S4, the generator and the discriminator compete with each other in training, which can further improve the accuracy of ship track prediction.

[0049] Specifically, the discriminator is equipped with a D-encoder and an MLP; The discriminator is a traditional binary classification model. In the present invention, the role of the discriminator is to distinguish between real ship track data and the predicted ship track data generated by the generator. The discriminator processes the input track data through the D-encoder and the MLP, and then outputs the probability that the input data is recognized as a real track. The formula is shown in equations (27) and (28).

[0050] (27) (28) In the formula, is the hidden state matrix output by Bi-LSTM, are the weight matrices of Bi-LSTM and MLP respectively, They are the biases of Bi-LSTM and MLP respectively, represents the real track sequence of the target ship, where, is the real latitude, longitude, speed, and heading of the target ship at the th moment; represents the predicted track sequence of the target ship output by the generator, where, is the predicted latitude, longitude, speed, and heading of the target ship at the th moment, is the probability that the input track is recognized as a real track.

[0051] During the training process, the generator and discriminator compete with each other through an adversarial learning mechanism, gradually optimizing their respective parameters. Eventually, the generator can generate predicted track data that is highly similar to the real track data, thus achieving high-precision track prediction.

[0052] To further illustrate the related effects of the embodiments of the present invention, the following experiments are conducted.

[0053] The model proposed by the present invention is applicable to various typical navigation scenarios such as waters near ports, narrow channels, and convergence waters with complex ship traffic flow characteristics. Here, the waters near a certain port are taken as an example for verification.

[0054] 1. Evaluation metrics.

[0055] The model proposed by the present invention is applicable to typical navigation scenarios such as waters near ports, narrow channels, and convergence waters with complex ship traffic flow characteristics. To evaluate the effectiveness and accuracy of the GAN-MM model in track prediction, the AIS data of the waters near Qingdao Port is used to verify the proposed model, and prediction methods such as GRU, MLP, SVR, ARIMA, LSTM, Bi-LSTM, LSTM-Attention, and GAN are used to compare the model performance.

[0056] Meanwhile, to verify the accuracy of ship track prediction, MAE, MAPE, RMSE, MSE, and SMAPE are used as evaluation metrics, as shown in Equations (29)-(33): (29) (30) (31) (32) (33) 2. Analysis of experimental results.

[0057] To verify the performance of the GAN-MM model, Tables 1 to 4 list the total prediction errors when the time intervals are set to 30s, 1min, 2min, and 5min, Figures 4 to 7 which details the improvement in prediction accuracy of the proposed model compared with other algorithms. Figure 4 Comparison graph of prediction errors when the time interval is 30s, Figure 5 Comparison graph of prediction errors when the time interval is 1min, Figure 6 Comparison graph of prediction errors when the time interval is 2min, Figure 7 Comparison graph of prediction errors when the time interval is 5min; Table 1 Prediction errors when the time interval is set to 30 seconds

[0058] Table 2 Prediction Errors when the Time Interval is Set to 1 Minute

[0059] Table 3 Prediction Errors when the Time Interval is Set to 2 Minutes

[0060] Table 4 Prediction Errors when the Time Interval is Set to 5 Minutes

[0061] Analysis of Tables 1 - 4 and Figures 4 - 7 , among all time intervals, the total prediction error of GAN-MM is the smallest, followed by GAN, and the total prediction error of SVR is the largest. Compared with other comparison algorithms, the maximum improvement amplitude of the prediction error of GAN-MM is close to 100%, and the minimum improvement amplitude of the prediction error is 8.43%. In addition, although the prediction performance of GAN-MM is the best, its prediction performance varies with different time intervals. GAN-MM has the best prediction performance when the time interval is 2 min, while the worst prediction performance when the time interval is 5 min.

[0062] Figures 8 - 19 further shows the comparison of the predicted tracks and the true tracks of each algorithm, as well as the comparison of each algorithm in terms of longitude and latitude. Analysis Figures 8 - 19 shows that in the numerical experiments of four groups of time intervals, the deviation of GAN-MM from the true track is the smallest, followed by GAN, and the deviation of SVR from the true track is the largest. It can be seen from this that compared with other algorithms, the performance of GAN-MM is the best.

[0063] In summary, considering the influence of multi-ship coupling, the model track prediction performance proposed by the present invention is the best, which can significantly improve the accuracy and stability of track prediction.

[0064] The above is only a relatively preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should all be covered within the protection scope of the present invention.

Claims

1. A method for predicting the ship track affected by the coupling of multiple ships, characterized in that The method includes: S1. Select the closest distance of approach DCPA and the closest time of approach TCPA as evaluation indicators, and identify the neighboring vessels that have a coupled impact on the target vessel; S2. The MLP is used to quantify the non-linear relationship between the motion characteristics of the target ship and those of the neighboring ships, and extract the potential motion feature vector of the target ship affected by coupling at the moment ; S3. Input the potential motion feature vector of the target ship affected by coupling at moment into the Bi-LSTM-based G-encoder carried by the generator for encoding, and output the hidden feature representation of the target ship's track ; Input the hidden feature representation of the target ship's track into the multi-head probabilistic sparse self-attention to eliminate redundant information and retain the attention to key information, obtaining the weighted hidden feature ; Input the weighted hidden feature into the Bi-LSTM-based G-decoder carried by the generator for decoding, and output the feature representation of the predicted track ; Input the feature representation of the predicted track into the MLP carried by the generator, and output the predicted track of the target ship; ​ S4. Input the true trajectory and the predicted trajectory into the Bi-LSTM-based D-encoder carried by the discriminator to obtain the hidden state matrix output by the Bi-LSTM. . Input the hidden state matrix output by the Bi-LSTM into the MLP carried by the discriminator, and finally generate the probability that the input trajectory is recognized as a true trajectory. .

2. The ship track prediction method for the multi-ship coupling influence according to claim 1, characterized in that In step S1, selecting the closest distance of approach DCPA and the closest time of approach TCPA as evaluation indicators, and identifying the neighboring vessels that have a coupled impact on the target vessel includes: The latitudes, longitudes, speeds, and headings of the target ship and neighboring ships are respectively: and ; According to the latitude and longitude coordinate data of the target ship and the neighboring ship, calculate the relative distance between the two; as shown in formulas (1)-(2): (1) (2) In the formula, is the relative distance between the target ship and the neighboring ship, is the radius of the earth; According to the speeds and headings of the target vessel and the neighboring vessels, calculate the relative speed and relative heading between the two, as shown in formulas (3)-(4): (3) (4) In the formula, is the relative speed, is the relative course, is the arccosine function; According to the relative distance, relative speed and relative heading calculated above, calculate the corresponding DCPA and TCPA, as shown in formulas (5)-(6): (5) (6) In the formula, is the relative bearing of the target ship; Vessels with a DCPA less than 3 NM and a TCPA less than 30 minutes are identified.

3. The ship track prediction method for the influence of multi-ship coupling according to claim 1, wherein, In step S2, the MLP is used to quantify the non-linear relationship between the motion characteristics of the target ship and those of neighboring ships, and the potential motion characteristic vector of the target ship affected by coupling at the moment is extracted. , including: The MLP establishes a complex non-linear relationship model through hidden layers and activation functions, and automatically learns hierarchical feature representations from the original data by processing high-dimensional data, extracts the non-linear relationship between the motion characteristics of the target ship and those of neighboring ships, and based on the non-linear relationship between them, extracts the potential motion characteristic vector of the target ship, as shown in formulas (7)-(9): (7) wherein, is the input feature matrix of the MLP, is the feature vector of the target ship at time, including latitude, longitude, speed, and course information, ; is the feature vector of the th neighboring ship that has a coupling effect on the target ship at time, including latitude, longitude, speed, and course information, ; is the feature vector of the th neighboring ship that has a coupling effect on the target ship at time, including latitude, longitude, speed, and course information, is the feature vector of the th neighboring ship that has a coupling effect on the target ship at time, including latitude, longitude, speed, and course information, ; Formula (7) integrates the state information of the target vessel and the neighboring vessels into an input matrix for subsequent feature extraction; (8) wherein, is the output of the -th hidden layer, is the weight matrix of the -th layer, is the output of the -th layer, is the bias of the -th layer, is the total number of hidden layers in the MLP, is the activation function; Equation (8) describes the calculation process of the hidden layer of the MLP, and features are extracted layer by layer through linear transformation and non-linear activation functions; (9) In the formula, is the potential motion feature vector of the target ship affected by coupling at moment, is the weight matrix of the output layer in the MLP, is the output of the L-th hidden layer, is the bias of the output layer in the MLP; Equation (9) is the calculation process of the output layer of the MLP, generating the potential motion feature vector of the target ship affected by coupling at moment.

4. The method for predicting the ship track affected by multi-ship coupling according to claim 1, wherein, In step S3, the generator is equipped with: a G-encoder, a multi-head probabilistic sparse self-attention module, a G-decoder, and an MLP; Select Bi-LSTM as the core component of the G-encoder. Bi-LSTM is composed of two layers of long short-term memory networks LSTM stacked. The first layer of LSTM inputs data forward, and the second layer of LSTM inputs data backward. The LSTM cell includes a forget gate, an input gate, a cell state, and an output gate. The above components control the information flow through the sigmoid activation function and pointwise multiplication to realize the modeling of long-term dependencies in sequence data. The long short-term memory network LSTM includes: the input vector enters the forget gate, the input gate, and the output gate, as shown in formulas (10)-(12): (10) In the formula, is the forgetting gate vector, is the sigmoid function, is the weight of the historical state transformation of the forgetting gate, is the potential motion feature vector of the target ship affected by coupling at moment, is the weight of the input feature transformation of the forgetting gate, is the hidden state at moment, and is the bias of the forgetting gate; Formula (10) determines whether to remember the cell state information of the previous unit; (11) (12) Wherein, is the input gate vector, is the historical state transformation weight of the input gate, is the input feature transformation weight of the input gate, is the bias of the input gate, is the output gate vector, is the historical state transformation weight of the output gate, is the input feature transformation weight of the output gate, is the bias of the output gate, is the activation function; Formula (11) controls the new information that needs to be updated to the cell state; formula (12) determines which information in the cell state is remembered as the output state; Output the candidate cell state vector and update the cell state vector, as shown in formulas (13)-(14): (13) (14) Wherein, is the candidate cell state vector, is the historical state transformation weight of the candidate cell state, is the input feature transformation weight of the candidate cell state, is the cell state vector, is the bias of the candidate cell state, is the cell state vector at time Formula (13) generates the new information that may be added to the cell state; formula (14) combines the decisions of the forget gate and the input gate to update the cell state; Update the hidden state vector according to the output gate vector and the cell state vector, as shown in formula (15): (15) Wherein, is the hidden state vector output by the unidirectional LSTM layer; Formula (15) updates the hidden state vector according to the output gate vector and the cell state vector.

5. The ship track prediction method for multi-ship coupling influence according to claim 4, characterized in that In step S3, in the Bi-LSTM, the forward propagation layer processes the sequence in chronological order to generate hidden states , and the backward propagation layer processes the sequence in the reverse order to generate hidden states ; the bidirectional hidden state at each moment is obtained by formula (16): (16) In the formula, is the bidirectional hidden state finally output by the Bi-LSTM; Formula (16) concatenates and to form a bidirectional hidden state containing context information for subsequent calculations.

6. The method for predicting the ship track affected by multi-ship coupling according to claim 4, characterized in that, The multi-head probabilistic sparse self-attention module combines the multi-head attention mechanism with the sparsification strategy to focus on the coupled impact of neighboring vessels on the target vessel, as shown in formulas (17)-(24): (17) (18) (19) Wherein, are the query matrix, the key matrix, and the value matrix respectively, is the hidden matrix composed of vectors, ; is the number of timestamps, are the weight matrices of the query, key, and value; To reduce the computational complexity and concentrate on processing the most relevant information, a sparsification strategy is adopted. The sparse metric calculation for each query is shown in formula (20): (20) In the formula, is the th row vector of is the th row vector of is the matrix transpose symbol, is the transpose of the row vector , is the length of the key, is the characteristic dimension of the key vector in the model, is the sparsification metric score, is the key matrix; Formula (20) is used to determine the attention distribution between each query and all keys, so as to obtain a sparse metric value between each query-key pair. The obtained multiple sparse metric values are sorted from large to small, and the first results are selected to participate in the subsequent calculation; the calculation formula for the sparse attention weight is shown in Equation (21): (21) In the formula, is the sparse attention weight, is the corresponding query element set, is the transposed matrix of the key matrix ; Formula (21) is used to calculate the attention weights between the query and the key, and the probability distribution is obtained through softmax normalization, which determines the degree of attention of the model at different positions; The probabilistic sparse attention mechanism is extended to a number of attention heads to capture different features, as shown in formulas (22)-(24), and the output captures the global dependencies and complex features in the data to analyze and predict future trajectories; Calculate the output of the (22) Wherein, is the output of the th attention head, is the sparse attention weight, is the value matrix; Concatenate and linearly transform the outputs of all attention heads: (23) In the formula, is the output of multi-head probabilistic sparse self-attention, For splicing operation, is the output of the first attention head, is the output of the second attention head, For the The output of an attention head, is the learnable weight matrix of the output layer; Obtain the final output: (24) In the formula, It is the final output of multi-head probabilistic sparse self-attention.

7. The ship track prediction method for the influence of multi-ship coupling according to claim 4, characterized in that The G-decoder gradually generates the feature representation of the predicted trajectory according to the outputs of the G-encoder and the multi-head probabilistic sparse self-attention module. ; The G-decoder also uses Bi-LSTM; then an MLP is introduced after the decoder to convert the hidden representation into the latitude, longitude, speed, and heading data of the predicted trajectory at the moment, that is, the predicted trajectory, as shown in Formulas (25)-(26): (25) (26) In the formula, are the weight matrices of the Bi-LSTM and MLP networks respectively, are the biases of the Bi-LSTM and MLP networks respectively.

8. The method for predicting the ship track affected by multi-ship coupling according to claim 1, characterized in that, In step S4, the discriminator is equipped with a D-encoder and an MLP; The discriminator processes the input track data through the D-encoder and the MLP, and outputs the probability that the input data is recognized as a real track; as shown in Formulas (27) and (28): (27) (28) Wherein, is the hidden state matrix output by the Bi-LSTM, are the weight matrices of the Bi-LSTM and the MLP respectively, are the biases of the Bi-LSTM and the MLP respectively, represents the true track sequence of the target ship, where, is at the th moment, the true latitude, longitude, speed, and course of the target ship; represents the predicted track sequence of the target ship output by the generator, where, is at the th moment, the predicted latitude, longitude, speed, and course of the target ship, is the probability that the input track is recognized as the true track.

9. The ship track prediction method for multi-ship coupling influence according to claim 1, wherein After step S4, the generator and the discriminator compete with each other through the adversarial learning mechanism, and gradually optimize their respective parameters; finally, predicted track data highly similar to the real track data is generated to achieve high-precision prediction of the track.

10. A ship track prediction system for the coupled influence of multiple ships, characterized in that, Implement the ship track prediction method for the multi-ship coupling effect according to any one of claims 1-9. The system includes: A ship identification module based on the multi-ship coupling effect, which is used to select the closest distance of approach DCPA and the closest time of approach TCPA as evaluation indicators to identify neighboring ships that have a coupling effect on the target ship; The feature extraction module uses an MLP to quantify the non-linear relationship between the motion features of the target ship and those of neighboring ships, and extracts the potential motion feature vector of the target ship affected by coupling at the moment ; A generator for inputting the potential motion feature vector of the target ship affected by coupling at the moment into the Bi-LSTM-based G-encoder carried by the generator for encoding, and outputting the hidden feature representation of the target ship's track ; inputting the hidden feature representation of the target ship's track into the multi-head probabilistic sparse self-attention to eliminate redundant information and retain the attention to key information, obtaining the weighted hidden feature ; inputting the weighted hidden feature into the Bi-LSTM-based G-decoder carried by the generator for decoding, and outputting the feature representation of the predicted track ; inputting the feature representation of the predicted track into the MLP carried by the generator, and outputting the predicted track of the target ship; ​ Discriminator, input the true track and the predicted track into the Bi-LSTM-based D-encoder carried by the discriminator to obtain the hidden state matrix output by Bi-LSTM , input the hidden state matrix output by Bi-LSTM into the MLP carried by the discriminator, and finally generate the probability that the input track is recognized as a true track .

Citation Information

Patent Citations

  • Ship track real-time prediction method and system based on optimal strategy learning

    CN113221449A

  • Deep learning model T-LSTM-based ship motion track prediction method

    CN116664629A

  • Ship trajectory prediction method and system based on deep learning

    CN117408372A

  • Real-time ship navigation route planning method based on augmented reality

    CN119090106A

  • A ship wake prediction method with self-adaptive time interval based on mirror gate network

    JP7629247B1

Cited By

  • Interference waveform generation method of underwater sound wave

    CN121690464A