Ship encounter situation track prediction method based on context embedding technology

Through the ship's situational track prediction method based on context embedding technology, navigation features are extracted and feature fusion layer and global weight adaptive adjustment mechanism are constructed, which solves the accuracy and robustness of track prediction in complex situations, and achieves more accurate track prediction.

CN120296338APending Publication Date: 2025-07-11DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510291683.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing track prediction technology is difficult to effectively screen information under complex circumstances, which limits the performance of the model, especially in nonlinear problems in ship navigation and complex and changeable sea track predictions, which lacks accuracy and robustness.

Method used

The ship's track prediction method based on context embedding technology is adopted. By extracting the navigation features in situations, a context encoding module and a decoding module are constructed, and the feature information fusion layer and global weight adaptive adjustment mechanism are used to dynamically adjust the weight of the input context sequence to improve prediction capabilities.

Benefits of technology

It improves the accuracy and robustness of the ship's track prediction in the event of a situation, can effectively learn the ship's behavior patterns in the event of a situation, and provides accurate track prediction services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296338A_ABST
    Figure CN120296338A_ABST
Patent Text Reader

Abstract

The invention discloses a ship encounter situation track prediction method based on a context embedding technology. The method comprises the following steps: extracting ship track characteristic variables under an encounter situation; establishing a ship encounter situation track prediction model based on a context embedding technology; and evaluating the ship encounter situation track prediction model. According to the method, the track information of the ship encountering the meeting situation in the ship navigation process is extracted, and the track behavior characteristics of the target ship and the surrounding ships are defined. In addition, the spatial feature information of the target ship and the encounter track is incorporated into a prediction framework of the invention, and is used for learning the behavior pattern of the ship track under the encounter condition of the ship so as to provide an effective and accurate track prediction service. According to the method, the feature extraction capability of the FIENet and the advantage that a weight adaptive adjustment mechanism contacts global information are combined, and the learning capability of the ship navigation mode of the track prediction model under the meeting condition of the ship is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent shipping and artificial intelligence, and in particular relates to a ship encounter situation track prediction method based on context embedding technology. Background Art

[0002] In the context of "Shipping 4.0", ships are moving towards more proactive and intelligent maritime situational awareness and navigation capabilities by integrating cloud computing, artificial intelligence and Internet of Things technologies. Behind this progress, a stable and accurate track prediction technology support system is indispensable.

[0003] To this end, researchers have integrated professional knowledge of ship navigation, environmental variation factors and uncertainties in navigation, and established a track prediction model through the analysis of kinematic principles and ship characteristics. However, the dynamic interaction and nonlinear characteristics of the track in the actual navigation environment bring great complexity to the prediction work. In view of this, based on the indispensable data collected by the automatic identification system (AIS) in the shipping field, the research focus has turned to machine learning technology, especially deep learning models, which show great potential in overcoming nonlinear problems and enhancing the universality of prediction. Although these advanced technologies have unlimited potential, they are limited in effectively filtering information in complex encounter situations, which limits the performance of the model. The innovative application of the attention mechanism has effectively alleviated this bottleneck and is currently becoming increasingly popular in the field of track prediction. Enhancing the accuracy, robustness and ability to handle complex unknown situations of ship track prediction is a fundamental requirement for building a strong and stable maritime transportation system. Although various mathematical models and algorithms continue to evolve over time, in-depth exploration and breakthroughs are still a frontier scientific research task that needs to be solved in the face of complex and changeable maritime track prediction problems. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention proposes a ship encounter situation track prediction method based on context embedding technology, which can effectively extract the navigation characteristics of the ship in the encounter situation to provide effective and accurate track prediction services.

[0005] In order to achieve the above object, the technical means adopted by the present invention are as follows: a ship encounter situation track prediction method based on context embedding technology, comprising the following steps:

[0006] S1. Extraction of ship track characteristic variables under encounter conditions

[0007] S11. Extracting the encounter track

[0008] Select the original AIS data of all ships within the target observation time of the research area. First, preprocess the AIS data. Second, segment the tracks of ships traveling back and forth between the starting ports within the target observation time, and define the encounter distance of the tracks. Finally, extract the encounter tracks through the position distances between ships. And splice the track information of the target ship and the encounter ships to obtain the encounter ship track data. The steps are as follows:

[0009] S111. AIS data preprocessing

[0010] First, delete the data with consistent information at the same moment in the AIS data; then, delete the data with abnormal speed, course, longitude and latitude in the AIS data; finally, use the interpolation method to complete the filling of missing values, and the expression is as follows:

[0011]

[0012] Among them, let The function exists on the interval [k0, k n , and the function value at each position in this interval corresponds to Then divide this interval into n sub-intervals Each sub-interval satisfies In addition, the second derivative on k0 and k n is zero, that is, S”(k0) = 0, S”(k n ) = 0. Solve the undetermined coefficients in and At this time, according to the position of the missing observation value in the known sub-interval, combined with the above function, estimate the missing value.

[0013] S112. Segment the track degree and extract the encounter track

[0014] In the AIS data, the maritime mobile service identity number, that is, MMSI, is used to distinguish different ships. When a ship travels back and forth between the starting points, segment the tracks of different sailing periods, and divide the sailing with an interval of minutes between two sailing segments into different track segments, The segmentation method of the track of ship i is expressed as follows:

[0015]

[0016] In the formula, MMSI i represents the track information sequence of ship i, M m represents the mth track information of ship i, represents the number of track points.

[0017] S113. Associated contextual track information

[0018] Select the longitude lon, latitude lat, speed spe, and course cou of the ship during navigation as key contextual variables, and then, based on the ship's navigation time series, associate the contextual track information according to time.

[0019] S114. Calculate the track encounter distance

[0020] Within the selected research area, determine whether two ships are in an encounter situation based on the position distance between the ships. The formula for measuring the position distance between ships is as follows:

[0021]

[0022] In the formula, dence i,j represents the distance between ship i and ship j, and R is a constant equal to the radius of the earth. lon i , lat i represent the longitude and latitude of ship i respectively; lon j , lat j represent the longitude and latitude of ship j respectively. sin -1 (·) represents the inverse sin(·) trigonometric function. j represents the ship number different from ship i.

[0023] S115. Extract the encounter track

[0024] When the distance dence i,j between ship i and ship j at a certain moment is less than the set encounter distance threshold ε between two ships, the tracks of ship i and ship j at 30 moments before and after this moment are defined as the encounter track segment, which is expressed as:

[0025]

[0026] In the formula, and represent the track information sets of ship i and ship j at time t in the AIS data respectively, which are expressed as and represents the number of collected variable information, T is the time.

[0027] S12. Define the encounter track characteristic variables

[0028] Define the navigation state information and spatial characteristic information during the ship's navigation through the associated data.

[0029] S121. Define the encounter ship navigation state characteristic information

[0030] Obtain the self-navigation state information of the ship during navigation according to the associated AIS data. In the encounter situation, define the navigation state characteristic information of the encountering ships i and j during navigation as:

[0031]

[0032] Among them, p t represents the position information at time t. N represents the length of the ship's track, and t ∈ {1, 2, …, t, …, N}.

[0033] S122. Define the spatial characteristic information of the target ship

[0034] Define the spatial characteristic information of ship i as:

[0035]

[0036] Among them, represents the spatial characteristic information of ship i at the t-th moment, and respectively represent the longitude, latitude, course, and speed change information of ship i at time t,

[0037] S123. Define the spatial characteristic information of the encounter track

[0038] According to the spatial changes in the positions and navigation states between ships, define the spatial characteristic information of the encounter track as:

[0039]

[0040] Among them, represents the spatial position change information of ship i and ship j at the t-th moment, and respectively represent the difference information between the longitude, latitude, course, and speed of ship i and ship j at time t,

[0041] S124. Construct the encounter track characteristic variables

[0042] Based on the data set preprocessed in step S1, by fusing the navigation state characteristic information of the encountering ships, the spatial characteristic information of the target ship, and the spatial characteristic information of the encounter track, construct a set of encounter track characteristic variables, denoted as:

[0043]

[0044] In the formula, represents the encounter track feature variable during the navigation of the encountering ships, and z t represents the encounter track feature variable of ship i at time t.

[0045] S2. Establish a ship encounter situation track prediction model based on context embedding technology

[0046] The ship encounter situation track prediction model includes a context encoding module and a feature decoding module with context embedding. The establishment steps are as follows:

[0047] S21. Construct a context-related input matrix for the ship encounter situation track prediction model

[0048] Based on the encounter track feature variable Construct a context relationship based on time series data. The context relationship includes the historical ship position information at the previous moments before each time point and the prediction of the ship position at the next l moments, which is expressed as follows:

[0049]

[0050] In the formula, x t represents the input matrix at the previous moments before time t, and the matrix size is y t+1 represents the longitude and latitude from the (t + 1)-th to the (t + l)-th moments predicted by using x t . l is the prediction time length, which is a constant and the matrix size is 1×2l; f(·) represents the mapping function obtained by fitting; is the predicted value at the next l moments through the f(·) function. On , the method of sliding window is adopted to obtain the experimental sample set, which is expressed as follows:

[0051]

[0052] In the formula, input, output and represent the input data set, the output data set and the sample data set respectively.

[0053] S22. Construct an information encoding module with context embedding

[0054] The context-embedded information encoding module includes a context sequence information encoding layer and a feature information fusion layer. The context sequence information encoding layer effectively encodes and extracts the input context sequence information; the feature information fusion layer uses a multiple-weight adaptive adjustment mechanism to extract the feature information of the input sequence. The steps are as follows:

[0055] S221. Encode the context sequence information

[0056] Use the feature information extraction neural network, namely FIENet, to encode the context sequence information and extract useful information. The core architecture of the feature information extraction neural network includes a historical information extraction module and a real-time information extraction module. When obtaining the real-time information h t , historical information C t at time t, the real-time information h t-1 , historical information C t-1 and the context input information z t at time t are used as the input of the feature information extraction neural network.

[0057] The extraction method of the historical information extraction module is as follows: When extracting historical information, use the real-time information h t-1 , historical information C t-1 and the current context input z t as the input. First, calculate the candidate information of the historical information through the context input information z t and the real-time information h t-1 through non-linear mapping. The calculation formula is as follows: The calculation formula is as follows:

[0058]

[0059] After calculating the candidate information , determine the amount of information f t eliminated before time t and the current amount of information i t to be saved at time t. The value of f t is between 0 and 1, and the calculation formula is:

[0060] f t = σ(W f ·[h t-1 , z t +b f )

[0061] i t = σ(W i ·[h t-1 , z t +b i )

[0062] According to i t 、f t extract the historical information C at time t t , and the calculation formula is as follows:

[0063]

[0064] In the formula, tanh(·) represents the hyperbolic tangent function, f t represents the eliminated information volume, and i t represents the currently saved information volume. The parameters W c 、W f and W i respectively represent the weight values in the calculation of f t and i t . The parameters b c 、b f and b i respectively represent the bias terms in the calculation of f t and i t . The bias terms and weight values are all parameters learned in the neural network model. σ represents the Sigmoid function, and the calculation formula is as follows:

[0065]

[0066] In the formula, e refers to the base of the natural logarithm.

[0067] The extraction method of the real-time information extraction module is as follows: Based on the extracted historical information C t , the current context input information z t and the real-time information of the previous moment, the real-time information h t at the current moment is extracted through a series of non-linear mappings. The specific calculation formula is as follows:

[0068] O t =σ(W o ·[h t-1 ,z t +b o )

[0069] h t =O t ·tanh(C t )

[0070] In the formula, h t is the real-time coding information at time t, and both σ and tanh(·) represent activation functions. O t represents the real-time candidate information, and W o and b oCandidate information O for real-time calculation respectively t The weights and bias terms of t are all parameters to be learned. Among them, d is a constant, which is the output dimension of the set information vector set.

[0071] FIENet is expressed by the formula as follows:

[0072] h t = FIENetCell(z t , h t-1 ; W, b)

[0073] In the formula, W = {W f , W i , W c , W o}, b = {b f , b i , b c , b o}. By extracting the feature information of the information at each moment in the context sequence x t , the real-time information output set at each moment in the context sequence is obtained which is expressed as:

[0074]

[0075] S222. Feature information fusion

[0076] The fusion method of the feature information fusion layer is as follows: It is integrated through a fully connected and weight adaptive adjustment mechanism. The weight adaptive adjustment mechanism weights the input context sequence x t , and the calculation formula is as follows:

[0077]

[0078] In the formula, represents the mapping of the context sequence x t used as a query function, where is a learned weight matrix, is the bias term; represents the mapping of the context sequence x t used as a key-value function, where is a learned weight matrix, is the bias term; represents the value vector mapped by the context sequence x t , where is a learned weight matrix, is the bias term, through and The dot product between them is used to calculate the context relationship between two vectors, and the weight information of the relationship is obtained through a normalization function. The calculation formula is as follows: and The weight information of the relationship. The calculation formula is as follows:

[0079]

[0080] where s(·) represents the correlation function of vectors and . represents the vector and the μ-th vector . The correlation score between them is, where α μ is the importance of the μ-th vector in relative to the vector. Multiply the importance weight of the corresponding vector by the value vector of the context sequence x t , and the information value after information weighting between contexts is obtained. The calculation formula is as follows:

[0081]

[0082] Copy the input context sequence x t times and perform times of information weighting calculation. Concatenate the results, and then obtain the output value after the multi-weight adaptive adjustment mechanism through linear mapping . The calculation formula is as follows:

[0083]

[0084] In the formula, represents the -th weight adaptive adjustment mechanism vector. concat(·) represents the concatenation function, represents the learned weight value.

[0085] At the same time, in order to prevent gradient loss during the calculation process, first map the input context sequence x t non-linearly through a fully connected network, and then concatenate it with the output value after the multi-weight adaptive adjustment mechanism to obtain the output value of feature information fusion. First, before the calculation, expand x t and into one-dimensional vectors. The formula is as follows:

[0086] x' t = flatten(x t ) ​​

[0087]

[0088] In the formula, flatten(·) is the unfolding function. x' t is the one-dimensional matrix value after unfolding x t into a one-dimensional matrix value, is the one-dimensional matrix value after unfolding, is the sequence information value after being mapped by the fully connected network. V F is the output value of the feature information fusion layer. W m is the learned weight value, b m is the learned bias value.

[0089] S23. Feature Decoding of Context Embedding

[0090] The feature decoding module of the context embedding includes an information decoding network and a global weight adaptive adjustment mechanism. The global weight adaptive adjustment mechanism correlates the input context sequence and the output sequence, thereby dynamically adjusting the weight value of the input context sequence for the prediction task. The information decoding network is used to decode the encoded information obtained by the information encoding module of the context embedding and obtain the prediction sequence.

[0091] The steps are as follows:

[0092] S231. Information Decoding

[0093] The information decoding network uses the output value V F of the feature information fusion layer as the input information at the future time t+1, and obtains the track sequence information related to the historical context through the recurrent neural unit, i.e., RNU, so that the decoded information is obtained after the information fusion of FIENet and RNU

[0094] RNU extracts information through a simple non-linear mapping, and the calculation formula is as follows:

[0095] h' t+1 = σ(W r · [h' t , V F + b r )

[0096] In the formula, h' t+1 represents the updated information output at time t+1, h' t is the information output at time t, h' t+1 is when it is the first moment of the sequence, h' t is a randomly generated initial value. W r and br Parameters for learning. The input information at time t+1 is V F , and during decoding at time t+2 and later, the input information for RNU update is the predicted value at time t+1.

[0097]

[0098] Output the state h' t+1 Input it into the FIENet unit for decoding. The calculation formula is as follows:

[0099]

[0100] Represents the decoding information of the decoding FIENet at time t+1, W' * , b' * Are all parameters for learning.

[0101] S232, Global weight adaptive adjustment

[0102] The global weight adaptive adjustment mechanism is to mine the correlation between the real-time information output set of the input context sequence and the decoding information Between. First, convert Into a two-dimensional matrix The calculation formula is:

[0103]

[0104] In the formula, G' t+1 Is the output value of the global weight adaptive adjustment mechanism, Combine G' t+1 With the decoding information To obtain the information vector De; finally, through the non-linear mapping of the σ function, we get Which is the predicted value at time t+1. The calculation formula is as follows:

[0105]

[0106] In the formula, W out And b out Are all parameters for learning.

[0107] S3, Evaluate the track prediction model for ship encounter situations

[0108] Measure the performance of the track prediction model according to the mean absolute error MAE and the mean displacement error ADE between the predicted track information and the real track information. The smaller the MAE and ADE, the better the effect of the track prediction model. The calculation formula is as follows:

[0109]

[0110] Wherein, is the position serial number of the prediction sequence, l is the length of the prediction sequence, is the predicted value of the ship's track longitude and latitude, is the measured value of the ship's navigation longitude and latitude. represents the predicted latitude at the th moment, represents the predicted longitude at the th moment, respectively represent the true longitude and latitude.

[0111] Furthermore, all parameters W c 、W f 、W i 、W o 、 W m 、W r 、W out and b c 、b f 、b i 、b o 、 b m 、b r 、b out in the ship encounter situation track prediction model are updated using the backpropagation optimization algorithm.

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

[0113] First, the present invention takes the encounter situation that occurs during the ship's navigation as the research object, extracts the track information when the ship encounters an encounter situation during navigation, and defines the track behavior characteristics of the target ship and surrounding ships. The spatial feature information of the target ship and the encounter track is also incorporated into the prediction framework of the present invention to learn the behavior pattern of the ship's track in the encounter situation, so as to provide an effective and accurate track prediction service.

[0114] Second, the present invention constructs the spatial information characteristics between the target ship and surrounding ships, uses the feature fusion layer to extract the feature of the context sequence information for effective information coding. In addition, a global weight adaptive adjustment mechanism is used to identify the mutual relationship between the input context sequence and the output sequence, so as to be able to dynamically adjust the weight of the input context sequence to adapt to the prediction task. The present invention combines the feature extraction ability of FIENet and the advantage of the weight adaptive adjustment mechanism to connect global information, and improves the learning ability of the ship encounter situation track prediction model for the ship's navigation mode in the encounter situation. Description of the Drawings

[0115] Figure 1 is the overall flowchart of the present invention.

[0116] Figure 2 is a schematic diagram for defining the characteristic variables of the meeting track of the present invention.

[0117] Figure 3 is the calculation flowchart of FIENet of the present invention.

[0118] Figure 4 is the calculation flowchart of the weight adaptive adjustment mechanism of the present invention.

[0119] Figure 5 is the structure diagram of the feature fusion layer of the present invention.

[0120] Figure 6 is the structure diagram of the ship track prediction model of the present invention. Detailed Embodiment

[0121] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0122] As Figure 1 shown, a method for predicting the track of ship meeting situations based on context embedding technology has the following steps:

[0123] S1. Define the characteristic variables of the ship track in the meeting situation

[0124] Defining the characteristic variables of the ship track in the meeting situation includes two parts: extraction of the meeting track and definition of the characteristic variables of the meeting track. In the part of extracting the meeting track, mainly the cleaning of the track data is completed; in addition, the meeting track is extracted according to the data set. In the part of defining the characteristic variables of the meeting track, the characteristic information of the navigation state the spatial characteristic information of the target ship and the spatial characteristic information of the meeting track are defined, as Figure 2 shown. And the construction of the experimental sample set is completed.

[0125] S2. Establish a ship meeting situation track prediction model based on context embedding technology

[0126] First, according to the experimental sample set using the previous Predict the longitude and latitude at the future l moment based on the navigation feature information of the encountering ships at the current moment. For any t moment, there is an input context sequence and the one for supervised learning Secondly, in the encoding neural network block, encode the sequence information of the input sequence through FIENet, as Figure 3 shown, to generate the real-time information h t , collect all the real-time information output sets in the context and utilize the multiple weight adaptive adjustment mechanism in the feature information fusion layer, as Figure 4 shown, to achieve feature extraction of the context sequence information and obtain the fusion vector V F . In the decoding neural network block, decode the encoded information through the decoding FIENet and the full weight adaptive adjustment mechanism, as Figure 5 shown. The global weight adaptive adjustment mechanism can identify the association between the input context sequence and the output sequence, and obtain the global weighted information G' at the corresponding prediction moment t+1 , then splice it with the decoding information of the decoding FIENet and output the track prediction value through linear mapping The above process is the entire process of the track prediction model for ship encounter scenarios based on context embedding technology, as Figure 6 shown.

[0127] S3. Evaluate the track prediction model of encountering ships

[0128] Use MAE and ADE to evaluate the performance of the track prediction model of encountering ships. The smaller the MAE and ADE, the better the model's effect. And according to the evaluation feedback, continuously fine-tune the parameters and hyperparameters of the model until the expected prediction effect is achieved.

[0129] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A ship encounter situation track prediction method based on context embedding technology, characterized in that: It includes the following steps: S1. Extract the ship track feature variables in encounter situations S11. Extract the encounter tracks Select the original AIS data of all ships within the target observation time in the research area. First, preprocess the AIS data; second, segment the tracks of ships traveling back and forth between the starting ports within the target observation time, and define the encounter distance of the tracks; finally, extract the encounter tracks through the position distance between ships; and splice the track information of the target ship and the encounter ships to obtain the encounter ship track data. The steps are as follows: S111. AIS data preprocessing First, delete the data with consistent information at the same moment in the AIS data; then, delete the data with abnormal speed, heading, longitude and latitude in the AIS data; finally, complete the filling of missing values by using the interpolation method. The expression is as follows: Among them, assume that The function exists on the interval [k0, k n , and the function values at each position in this interval correspond to Then divide this interval into n sub-intervals Each sub-interval satisfies and In addition, the second derivative on k0 and k n is zero, that is, S”(k0) = 0, S”(k n ) = 0; Solve the undetermined coefficients in and At this time, based on the position of the missing observation value in the known sub-interval, combined with the above function, estimate the missing value; S112. Segment the track degree and extract the encounter tracks In AIS data, the Maritime Mobile Service Identity (MMSI) is used to distinguish different vessels; when a vessel travels back and forth between the starting and ending points, the track during different sailing periods is segmented, and the sailing with an interval of minutes between two sailing segments is divided into different track segments. The segmentation method of the track of vessel i is expressed as follows: where MMSI i represents the track information sequence of vessel i, M m represents the m-th track information of vessel i, represents the number of track points; S113. Associate the context track information Select the longitude lon, latitude lat, speed spe and heading cou of the ship during navigation as the key context variables, and then, based on the ship navigation time series, associate the context track information according to time; S114. Calculate the encounter distance of the tracks Within the selected research area, judge whether two ships are in an encounter situation according to the position distance between the ships. The formula for measuring the position distance between ships is as follows: where dence i,j represents the distance between ship i and ship j, R is a constant equal to the radius of the earth; lon i , lat i represent the longitude and latitude of ship i respectively; lon j , lat j represent the longitude and latitude of ship j respectively; sin -1 (·) represents the inverse sin(·) trigonometric function; j represents the ship number different from ship i; S115. Extract the encounter tracks When the distance dence between ship i and ship j at a certain moment i,j is less than the set encounter distance threshold ε between two ships, the tracks of ship i and ship j in the 30 moments before and after this moment are defined as the encounter track segments, which is expressed as: In the formula, and respectively represent the track information sets of ship i and ship j in the AIS data at time t, expressed as and represent the number of collected variable information, T is the time; S12. Define the encounter track feature variables Define the navigation state information and spatial feature information during the ship navigation process through the associated data; S121. Define the navigation state feature information of the encounter ships Obtain the own navigation state information of the ship during navigation according to the associated AIS data. In the encounter situation, define the navigation state feature information of the encounter ships i and j during navigation as: Among them, p t represents the position information at time t; N represents the length of the ship's track, and t ∈ {1, 2, …, t, …, N}; S122. Define the spatial feature information of the target ship Define the spatial feature information of ship i as: Among them, represents the spatial feature information of ship i at the t-th moment, and respectively represent the longitude, latitude, course and speed change information of ship i at the t-th moment, S123. Define the spatial feature information of the encounter tracks According to the spatial changes of the positions and navigation states between ships, define the spatial feature information of the encounter tracks as: Among them, represents the spatial position change information of ship i and ship j at the t-th moment, and respectively represent the difference information between the longitude, latitude, course and speed of ship i and ship j at the t-th moment, S124. Construct the encounter track feature variables Based on the data set preprocessed in step S1, construct a set of encounter track feature variables by fusing the navigation state feature information of the encounter ships, the spatial feature information of the target ship, and the spatial feature information of the encounter tracks, expressed as: In the formula, represents the encounter track feature variable during the navigation of the encountering ships, represents the encounter track feature variable of ship i at time t; S2. Establish a ship encounter situation track prediction model based on context embedding technology The ship encounter situation track prediction model includes a context encoding module and a feature decoding module with context embedding. The establishment steps are as follows: S21. Construct the context-related input matrix of the ship encounter situation track prediction model According to the encounter track feature variables Construct a context relationship based on time series data, where the context relationship includes the historical ship position information at each time point before and the prediction of the ship position at the next several time points, expressed as follows: where x t represents the input matrix at time instants before time t, and the matrix size is y t+1 represents the predicted longitude and latitude from the t+1-th to t the time instant; is the prediction time length, which is a constant and the matrix size is f(·) represents the mapping function obtained by fitting; is the predicted value at the next time instants through the f(·) function; The experimental sample set is obtained by adopting the sliding window method on as follows: wherein, input, output, and respectively represent an input data set, an output data set, and a sample data set; S22. Construct the information encoding module with context embedding The information encoding module with context embedding includes a context sequence information encoding layer and a feature information fusion layer. The context sequence information encoding layer effectively encodes and extracts the input context sequence information; the feature information fusion layer extracts the feature information of the input sequence by using a multiple weight adaptive adjustment mechanism. The steps are as follows: S221. Encode the context sequence information Encode the context sequence information using the Feature Information Extraction Neural Network, i.e., FIENet, and extract useful information; the core architecture of the Feature Information Extraction Neural Network includes a historical information extraction module and a real-time information extraction module. When obtaining the real-time information h t , historical information C t at time t, the real-time information h t-1 , historical information C t-1 at the previous time and the context input information at time t are used as the inputs to the Feature Information Extraction Neural Network; The extraction method of the historical information extraction module is as follows: when extracting historical information, the real-time information h at the previous moment is used t-1 , historical information C t-1 and the current context input as inputs. First, through the context input information and the real-time information h t-1 the candidate information of historical information is calculated through non-linear mapping and its calculation formula is as follows: After calculating the candidate information determine the amount of information f that has been eliminated before time t t and the current amount of information i that needs to be saved at time t t , f t takes values between 0 and 1, and the calculation formula is: According to i t 、f t Extract the historical information C at time t t , and the calculation formula is: where tanh(·) represents the hyperbolic tangent function, and f t represents the eliminated information amount, and i t represents the currently saved information amount; the parameters W c 、W f and W i represent the weight values in the calculation of f t and i t respectively, and the parameters b c 、b f and b i represent the bias terms in the calculation of f t and i t respectively; the bias terms and the weight values are all parameters learned in the neural network model; σ represents the Sigmoid function, and the calculation formula is as follows: where e is the base of the natural logarithm; The extraction method of the real-time information extraction module is as follows: from the historical information C extracted t , the current context input information and the real-time information at the previous moment, the real-time information h at the current moment is extracted through a series of non-linear mappings t , and the specific calculation formula is as follows: h t = O t ·tanh(C t ) Where h t is the real-time coding information at time t, and both σ and tanh(·) represent activation functions; O t represents the real-time candidate information, and W o and b o are the weight and bias term for calculating the real-time candidate information O t respectively, and both are parameters to be learned; among them, d is a constant, which is a set output dimension of the information vector; FIENet is expressed by the following formula: where \(W = \{W f , W i , W c , W o \}\), \(b=\{b f , b i , b c , b o \}\); By extracting the feature information of the information at each moment in the context sequence \(x t \), the real-time information output set at each moment in the context sequence is obtained denoted as: S222. Feature information fusion The fusion method of the feature information fusion layer is as follows: it is integrated through a fully connected and weight adaptive adjustment mechanism; the weight adaptive adjustment mechanism weights the input context sequence x t and the calculation formula is as follows: In the formula, is represented as the context sequence x t serves as a mapping for the query function, where is a learned weight matrix, is the bias term; is represented as the context sequence x t serves as a mapping for the key-value function, where is a learned weight matrix, is the bias term; represents the value vector mapped by the context sequence x t where is a learned weight matrix, is the bias term, through and the dot product between them to calculate the context relationship between the two vectors, and obtain the weight information of the relationship between and through the normalization function. The calculation formula is as follows: where s(·) represents the correlation function of the vector and ; represents the correlation score of the vector with the μ-th vector , where α μ is the importance of the μ-th vector in relative to the vector correlation; multiplying the importance weight of the corresponding vector by the value vector of the context sequence x t yields the information value after information weighting between contexts, and the calculation formula is as follows: ​ The input context sequence x t is copied for times and information weighted calculations are performed. The results are concatenated and then the output value after the multi-weight adaptive adjustment mechanism is obtained through linear mapping The calculation formula is as follows: In the formula, represents the th weight adaptive adjustment mechanism vector; concat(·) represents the concatenation function, represents the learned weight value; Meanwhile, in order to prevent gradient loss during the calculation process, the input context sequence x t is first subjected to a non-linear mapping through a fully connected network, and then concatenated with the output value after the multiple weight adaptive adjustment mechanism to obtain the output value of feature information fusion; First, before the calculation, x t and are expanded into one-dimensional vectors, and the formula is as follows: x' t = flatten(x t ) where flatten(·) is the unfolding function; x' t is the one-dimensional matrix value after unfolding x t ; is the one-dimensional matrix value after unfolding; is the sequence information value after being mapped by the fully connected network; V F is the output value of the feature information fusion layer; W m is the learned weight value, and b m is the learned bias value. S23. Feature decoding of context embedding The feature decoding module of context embedding includes an information decoding network and a global weight adaptive adjustment mechanism; the global weight adaptive adjustment mechanism correlates the input context sequence and the output sequence, so as to dynamically adjust the weights of the input context sequence for prediction tasks; the information decoding network is used to decode the encoded information obtained by the information encoding module of context embedding and obtain a prediction sequence; the steps are as follows: S231. Information decoding The information decoding network uses the output value V of the feature information fusion layer F as the input information for the future time t+1, and obtains the track sequence information related to the historical context through the recurrent neural unit, i.e., RNU, so as to obtain the decoded information after the information fusion of FIENet and RNU RNU extracts information through a simple non-linear mapping, and the calculation formula is as follows: h' t+1 = σ(W r · [h' t , V F + b r ) where h' t+1 represents the updated information output at time t+1, h' t is the information output at time t, and when h' t+1 is at the first time of the sequence, h' t is a randomly generated initial value; W r and b r are the learned parameters; the input information at time t+1 is V F , and during decoding at time t+2 and later, the input information during RNU update is the predicted value at time t+1; Output the status h' t+1 Input the FIENet unit for decoding, and the calculation formula is as follows: Indicates the decoded information of the decoding FIENet at time t+1, W' * , b' * are all learned parameters; S232. Global weight adaptive adjustment The global weight adaptive adjustment mechanism is to mine the correlation between the real-time information output set of the input context sequence and the decoded information ; First, is converted into a two-dimensional matrix The calculation formula is: where, G' t+1 is the output value of the global weight adaptive adjustment mechanism, Concatenate G' t+1 with the decoded information to obtain the information vector De; finally, through the non-linear mapping of the σ function, we get which is the predicted value at time t+1, and the calculation formula is as follows: In the formula, W out and b out are both parameters to be learned; S3. Evaluate the ship encounter situation track prediction model The performance of the track prediction model is measured according to the mean absolute error MAE and the mean displacement error ADE between the predicted track information and the true track information; the smaller the MAE and ADE are, the better the effect of the track prediction model is, and the calculation formula is as follows: Wherein, is the position serial number of the prediction sequence, is the length of the prediction sequence, is the predicted value of the ship's track longitude and latitude, is the measured value of the ship's navigation longitude and latitude; represents the predicted latitude at the th moment, represents the predicted longitude at the th moment, respectively represent the true longitude and latitude.

2. The method for predicting the ship encounter situation track based on the context embedding technology according to claim 1, wherein: All parameters W in the ship encounter situation track prediction model c 、W f 、W i 、W o 、 W m 、W r 、W out and b c 、b f 、b i 、b o 、 b m 、b r 、b out are updated using the backpropagation optimization algorithm.