Ship trajectory prediction method based on variational autoencoder and BiLSTM

By combining the variational autoencoder and BiLSTM network, the accuracy and robustness of ship trajectory prediction in complex marine environments are solved, efficient and accurate trajectory prediction is achieved, and the safety and operational efficiency of maritime navigation are improved.

CN119761566APending Publication Date: 2025-04-04THE 724TH RESEARCH INSTITUTE OF CHINA STATE SHIPBUILDING CORP LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411814751.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The accuracy and robustness of ship trajectory prediction in complex marine environments are limited. Especially in the case of incomplete data and changing environments, the prediction performance of traditional models has significantly decreased and it is impossible to fully capture the complex dynamic characteristics of ship movement.

Method used

The ship trajectory prediction method based on the variational autoencoder and BiLSTM is adopted to reconstruct the trajectory data through the variational autoencoder, capture the potential characteristics of the data, and use the BiLSTM network to learn the trajectory characteristics for prediction.

Benefits of technology

Efficient and accurate ship trajectory prediction is achieved in complex marine environments, significantly improving the safety and operational efficiency of maritime navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761566A_ABST
    Figure CN119761566A_ABST
Patent Text Reader

Abstract

The present invention provides a ship trajectory prediction method based on variational autoencoder and BiLSTM. First, the ship trajectory data (MMSI number, longitude, latitude, speed over ground, and course over ground) collected by AIS is read as the feature sequence of the input data of the trajectory prediction model, and the trajectory segmentation based on the sliding window divides the trajectory sequences of different lengths into sequence segments of fixed lengths; then, the original trajectory data is subjected to variational inference through the variational autoencoder model, the latent space representation is learned, the correlation between the trajectory information and the historical trajectory information is established, and the reconstructed trajectory is calculated; then, the bidirectional long short-term memory network model is used to capture the long-term dependency of the trajectory data, and the characteristics of the trajectory are learned to predict the trajectory position at the next moment. The present invention can realize efficient and accurate ship trajectory prediction in a complex marine environment, and significantly improve the safety and operational efficiency of maritime navigation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of navigation and ocean engineering. Background Art

[0002] With the rapid development of the global ocean transportation industry, the safety and efficiency of ship navigation have become particularly important. Traditional ship trajectory prediction methods mainly rely on rules and statistical models, which have great limitations in accuracy and robustness when facing complex and changing marine environments.

[0003] In recent years, deep learning technology has demonstrated powerful capabilities in time series data processing and prediction, especially the application of bidirectional long short-term memory network (BiLSTM) and variational autoencoder (VAE) in the field of trajectory prediction, which has become a research hotspot. BiLSTM can capture the long-term dependencies of trajectory data from both positive and negative directions, and has significant advantages in modeling time series data. VAE can generate diversified trajectory data through the learning of latent variables, improving the generalization ability of the prediction model.

[0004] Although some progress has been made in applying deep learning methods to ship trajectory prediction, existing methods often still face challenges in data processing, model training, and prediction accuracy. Therefore, an innovative method that combines the advantages of LSTM and VAE is urgently needed to improve the accuracy and practicality of ship trajectory prediction. Summary of the invention

[0005] In order to solve the problems in the prior art that the prediction performance of traditional models is significantly reduced and the complex dynamic characteristics of ship motion cannot be fully captured when data is incomplete, the ship's navigation path and the environment are changeable, and the accuracy of ship trajectory prediction in complex marine environments is improved, a ship trajectory prediction method based on variational autoencoder and BiLSTM is proposed in the present invention.

[0006] In order to achieve the above technical objectives, the technical solution implementation steps proposed by the present invention include:

[0007] Step 1, trajectory data preprocessing: read the ship trajectory data collected by AIS as the feature sequence of the trajectory prediction model input data. The ship trajectory data includes MMSI number, longitude, latitude, speed over ground, and course over ground. The trajectory sequences of different lengths are divided into fixed-length sequence segments based on the sliding window trajectory segmentation.

[0008] Step 2: The variational autoencoder reconstructs the trajectory data:

[0009] The variational autoencoder is used for trajectory reconstruction. The variational autoencoder consists of two parts: the encoder and the decoder. The encoder maps the input trajectory data processed in step 1 to the feature space. The decoder obtains the valid data of the historical data set by inputting the future trajectory feature data of the ship and the high-dimensional data in the encoder, establishes the correlation between the trajectory information and the historical trajectory information, and finally calculates the reconstructed trajectory.

[0010] Step 3: Use bidirectional long short-term memory network for trajectory prediction:

[0011] The trajectory data reconstructed in step 2 is used to learn the characteristics of the trajectory through a bidirectional long short-term memory neural network to predict the trajectory position at the next moment.

[0012] Furthermore, the step 1 comprises the following steps:

[0013] Step 1.1: Screen and extract data based on the MMSI number in the AIS data, extract the data points of the ship's trajectory (longitude, latitude, speed over the ground, and course over the ground), and sort them according to the time series. Clean the data of the ship's trajectory and filter out the data of mooring at sea, berthing at the port, and with obvious abnormal speed.

[0014] Step 1.2, split the trajectory sequence into sub-trajectories of equal length based on the set sliding window size, to ensure that the longer trajectory data can be completely segmented. Assume that the sample of a single trajectory sequence is X = (x0, x1, ..., xi, ..., xn), its length is n, xi represents the trajectory point at time i. The sequence after segmentation based on the sliding window of length m and time step t is:

[0015]

[0016] Furthermore, the step 2 comprises the following steps:

[0017] Step 2.1, encoding stage, the encoder q(z|x) encodes the input trajectory data X into a latent variable distribution Z, where Z is a Gaussian distribution.

[0018] Step 2.2, calculate the posterior probability density function of the latent variable z as

[0019]

[0020] Use q(z|x) to fit the true posterior distribution p(z|x), and use KL divergence to measure the similarity of the two distributions.

[0021]

[0022] Step 2.3, calculate the marginal likelihood function of sample data X,

[0023] lgp θ (xi)=KL(q(z|xi)||p(z|xi))+ζ(θ,φ;xi)

[0024] Where φ is the true posterior distribution parameter; θ is the approximate distribution parameter of the hidden layer. Since the KL divergence is non-negative and when the two distributions are the same, the KL divergence is 0, so lgp θ (xi)≥ζ(θ,φ; xi), so ζ(θ,φ; xi) is the variational lower bound of the log-likelihood function. By maximizing the variational lower bound, the optimal estimate of the sample set can be obtained.

[0025] Further, the step 3 comprises the following steps:

[0026] Step 3.1, construct a bidirectional long short-term memory network, whose basic unit structure consists of an input gate, an output gate, a forget gate, a cell state, and a hidden state.

[0027] Among them, ot is the output gate, it is the input gate, ft is the forget gate, xt is the current input, σ represents the activation function, and the specific process is as follows:

[0028] ft=σ(Wf·[ht-1,xt]+bf)

[0029] it=σ(Wi·[ht-1,xt]+bi)

[0030] ot=σ(Wo·[ht-1,xt]+bo)

[0031] ct-1 and ct represent the memory cells of the previous moment and the current moment respectively. The calculation of ct is expressed as:

[0032] qt=tanh(Wc·[ht-1,xt]+bc)

[0033] ct=ft×ct-1+it×qt

[0034] The final output of the network is:

[0035] ht=ot*tanh(ct)

[0036] Step 3.2, the time connection between the ship's trajectory features is obtained through the bidirectional long short-term memory network, so as to predict the ship's trajectory. The network result ht is passed through the fully connected layer to output the ship's trajectory at the future moment.

[0037] The present invention can achieve efficient and accurate ship trajectory prediction in complex marine environments, significantly improving the safety and operational efficiency of marine navigation. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of an embodiment of the present invention;

[0039] Figure 2 It is the structure diagram of the autoencoder model;

[0040] Figure 3 This is the LSTM network model diagram. DETAILED DESCRIPTION

[0041] The present invention proposes a ship trajectory prediction method based on variational autoencoder and BiLSTM, which can realize efficient and accurate ship trajectory prediction in complex marine environments by comprehensively utilizing the characteristics of the two models, and significantly improve maritime navigation safety and operational efficiency. The preferred implementation process of the present invention will be further described in detail below with reference to the accompanying drawings.

[0042] The preferred embodiment of the present invention is shown in the flow chart Figure 1 . Combined with the attached Figures 1 to 3 , the specific implementation steps of the embodiment of the present invention are:

[0043] The first step is trajectory data preprocessing. It includes the following steps:

[0044] Step 1.1: Screen and extract data based on the MMSI number in the AIS data, extract the data points of the ship's trajectory (longitude, latitude, speed over the ground, and course over the ground), and sort them according to the time series. Clean the data of the ship's trajectory and filter out the data of mooring at sea, berthing at the port, and with obvious abnormal speed.

[0045] Step 1.2, split the trajectory sequence into sub-trajectories of equal length based on the set sliding window size, to ensure that the longer trajectory data can be completely segmented. Assume that the sample of a single trajectory sequence is X = (x0, x1, ..., xi, ..., xn), its length is n, xi represents the trajectory point at time i. The sequence after segmentation based on the sliding window of length m and time step t is:

[0046]

[0047] The second step is to reconstruct the trajectory data using the variational autoencoder. The autoencoder model structure is shown in the attached Figure 2 . The following steps are included:

[0048] Step 2.1, encoding stage, the encoder q(z|x) encodes the input trajectory data X into a latent variable distribution Z, where Z is a Gaussian distribution.

[0049] Step 2.2, calculate the posterior probability density function of the latent variable z as

[0050]

[0051] Use q(z|x) to fit the true posterior distribution p(z|x), and use KL divergence to measure the similarity of the two distributions.

[0052]

[0053] Step 2.3, calculate the marginal likelihood function of sample data X,

[0054] lgp θ (xi)=KL(q(z|xi)||p(z|xi))+ζ(θ,φ;xi)

[0055] Where φ is the true posterior distribution parameter; θ is the approximate distribution parameter of the hidden layer. Since the KL divergence is non-negative and when the two distributions are the same, the KL divergence is 0, so lgp θ (xi)≥ζ(θ,φ; xi), so ζ(θ,φ; xi) is the variational lower bound of the log-likelihood function. By maximizing the variational lower bound, the optimal estimate of the sample set can be obtained.

[0056] The third step is to use the bidirectional long short-term memory network for trajectory prediction. It includes the following steps:

[0057] Step 3.1, construct a bidirectional long short-term memory network, whose basic unit structure consists of input gate, output gate, forget gate, cell state and hidden state, see the attached Figure 3 .

[0058] Among them, ot is the output gate, it is the input gate, ft is the forget gate, xt is the current input, σ represents the activation function, and the specific process is as follows:

[0059] ft=σ(Wf·[ht-1,xt]+bf)

[0060] it=σ(Wi·[ht-1,xt]+bi)

[0061] ot=σ(Wo·[ht-1,xt]+bo)

[0062] ct-1 and ct represent the memory cells of the previous moment and the current moment respectively. The calculation of ct is expressed as:

[0063] qt=tanh(Wc·[ht-1,xt]+bc)

[0064] ct=ft×ct-1+it×qt

[0065] The final output of the network is:

[0066] ht=ot*tanh(ct)

[0067] Step 3.2, the time connection between the ship's trajectory features is obtained through the bidirectional long short-term memory network, so as to predict the ship's trajectory. The network result ht is output through the fully connected layer to output the ship's trajectory at the future moment. The parameters of the bidirectional long short-term memory network model are set as follows: the forward LSTM and the backward LSTM contain 128 neural units, 1 hidden layer, 2 tanh activation layers, the learning rate is 0.001, the batch size is 128, and the number of iterations is 50.

Claims

1. A ship trajectory prediction method based on variational autoencoder and BiLSTM, characterized by: Step 1, trajectory data preprocessing: read the ship trajectory data collected by AIS, including MMSI number, longitude, latitude, ground speed, and ground heading, as the feature sequence of trajectory prediction model input data, and divide trajectory sequences of different lengths into fixed-length sequence segments based on the trajectory segmentation of the sliding window; Step 2: Reconstruct the trajectory data using a variational autoencoder: The trajectory is reconstructed using a variational autoencoder. The variational autoencoder includes an encoder and a decoder. The encoder maps the input processed ship trajectory data to the feature space. The decoder obtains the valid data of the historical data set by inputting the ship trajectory feature data and the high-dimensional data in the encoder, establishes the correlation between the trajectory information and the historical trajectory information, and finally calculates the reconstructed trajectory. Step 3: The reconstructed trajectory data is used to learn the characteristics of the trajectory through a bidirectional long short-term memory neural network to predict the trajectory position at the next moment.

2. The ship trajectory prediction method based on variational autoencoder and BiLSTM according to claim 1, characterized in that: The step 1 also includes: Step 1.1: Screen and extract data based on the MMSI number in the AIS data, extract the data points of the ship's trajectory, including longitude, latitude, speed over the ground, and heading over the ground, and sort them according to the time series; clean the data of the ship's trajectory and filter out the data of anchoring at sea, berthing at the port, and with obviously abnormal speed; Step 1.2: Split the trajectory sequence into sub-trajectories of equal length based on the set sliding window size; Assume that the sample of a single trajectory sequence is X = (x0, x1, ..., x i ,…,x n ), whose length is n, x i represents the trajectory point at time i; the sequence after segmentation based on the sliding window with a length of m and a time step of t is:

3. The ship trajectory prediction method based on variational autoencoder and BiLSTM according to claim 1 or claim 2, characterized in that: The step 2 also includes: Step 2.1: Encoding stage; the encoder q(z|x) encodes the input trajectory data X into a latent variable distribution Z, where Z is a Gaussian distribution; Step 2.2, calculate the posterior probability density function of the latent variable z as: Among them, x is the input historical trajectory data; z is the latent variable, which is the implicit feature extracted from x by the encoder; q(z|x) is used to fit the true posterior distribution p(z|x), and KL divergence is used to measure the similarity of the two distributions: Step 2.3, calculate the marginal likelihood function of sample data X, lgp θ (x i )=KL(q(z|x i )||p(z|x i ))+ζ(θ,φ;x i ) Among them, φ is the true posterior distribution parameter; θ is the approximate distribution parameter of the hidden layer; since the KL divergence is non-negative, and when the two distributions are the same, the KL divergence is 0, so lgp θ (x i )≥ζ(θ,φ;x i ),ζ(θ,φ;x i ) is the variational lower bound of the log-likelihood function, and the optimal estimate of the sample set is obtained by maximizing the variational lower bound.

4. The ship trajectory prediction method based on variational autoencoder and BiLSTM according to claim 3 is characterized in that: Step 3 also includes: Step 3.1: Construct a bidirectional long short-term memory network. The basic unit structure includes input gate, output gate, forget gate, cell state and hidden state. t is the output gate, i t is the input gate, f t is the forget gate, x t is the current input, σ represents the activation function, including: f t =σ(W f ·[h t-1 ,x t ]+b f ) i t =σ(W i ·[h t-1 ,x t ]+b i ) the t =σ(W o ·[h t-1 ,x t ]+b o ) c t-1 and c t Represent the memory unit of the previous moment and the current moment respectively, c t The calculation is expressed as: q t =tanh(W c ·[h t-1 ,x t ]+b c ) c t =f t ×c t-1 +i t ×q t The final output of the network is: h t =o t *tanh(c t ) Step 3.2, obtain the temporal connection of the ship trajectory characteristics through the bidirectional long short-term memory network, so as to predict the ship trajectory; the network result h t The trajectory of the ship at the future moment is output through the fully connected layer.

Citation Information

Cited By

  • Agricultural machinery behavior identification method fusing interpolation enhancement and depth spatial-temporal feature modeling

    CN120180277A

  • Agricultural Machinery Behavior Recognition Method Combining Interpolation Enhancement and Deep Spatiotemporal Feature Modeling

    CN120180277B

  • Short-time ship trajectory prediction method, electronic equipment and computer readable storage medium

    CN121167245A