Ship trajectory prediction method and system based on double-layer data driven GRU network
Patent Information
- Application Number
- CN202310583927.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-05-23
AI Technical Summary
[0004]本发明的目的之一在于提供一种基于GRU网络的双层数据驱动的船舶轨迹预测方法,以解决现有技术中多维数据特征提取不足和预测精度低的问题
[0037] Compared with existing technologies, this invention can extract the location information and behavioral feature information of time-series trajectories. It extracts information through multi-layer networks based on GRU networks and performs ingenious fusion learning. At the same time, it introduces adjacency distance dimension information to enhance the correlation between time-series points so that the model can better extract data characteristics, thereby greatly increasing the model's feature learning ability on the dataset and improving the accuracy of the prediction model.
Smart Images

Figure CN116629116B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of trajectory prediction technology, and in particular to a two-layer data-driven method and system for ship trajectory prediction based on GRU networks. Background Technology
[0002] Current methods for predicting ship trajectories primarily rely on the location data dimension of datasets. This approach fails to consider the characteristics of multidimensional data, such as motion state information, and its limitations in mining historical multidimensional features of ships further hinder improvements in prediction accuracy. With the development of maritime IoT technology, sea-land-air joint wireless systems collect diverse ship state information, making existing prediction methods ill-suited to the increasingly complex maritime traffic environment.
[0003] Traditional ship trajectory prediction methods are simple and efficient. Compared to other methods, traditional methods are straightforward and can generate prediction results faster. Representative prediction methods mainly include kinematic models, constant speed models, Ornstein-Uhlenbeck models, and Kalman filter variants. However, traditional methods are limited to specific application scenarios, and insufficient data feature mining leads to poor prediction results. Now, some artificial intelligence-based methods can improve ship trajectory prediction by constructing reasonable kinematic models based on specific scenarios, thereby improving prediction accuracy. Artificial intelligence methods are further divided into machine learning methods and deep learning methods. Common machine learning methods include Kalman filters, Gaussian models, clustering models, and knowledge-based models. However, machine learning methods are limited by manually set data rules and objective functions, and still have insufficient ability to mine pattern features from the data. Data-driven deep learning methods can deeply extract knowledge of ship kinematic behavior and patterns. Common deep learning methods include multilayer perceptron networks, recurrent recurrent neural networks and their variants, long short-term memory and gated recurrent unit networks. However, among existing methods, deep learning-based approaches still have shortcomings in utilizing multidimensional data features and data feature mining. Especially in the increasingly complex and volatile maritime environment, how to utilize data of multiple data types to improve trajectory prediction accuracy remains a challenge. Summary of the Invention
[0004] One of the objectives of this invention is to provide a two-layer data-driven ship trajectory prediction method based on GRU networks, in order to solve the problems of insufficient multi-dimensional data feature extraction and low prediction accuracy in the prior art.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: a two-layer data-driven ship trajectory prediction method based on GRU networks, comprising the following steps:
[0006] S1. Obtain an observation sequence X of length g from the AIS dataset. g The observed sequence is input into the first machine learning model to obtain an intermediate feature state output of length l. Simultaneously, the observed sequence is input into the second machine learning model to obtain an intermediate feature state output of length l.
[0007] S2, intermediate feature states of the first machine learning model intermediate feature states of the second machine learning model The data is then spliced together to form a composite training dataset;
[0008] S3. Use the composite training data as input to the third machine learning model to obtain the prediction result.
[0009] Preferably, the process of obtaining the first machine learning model, the second machine learning model, and the third machine learning model includes:
[0010] The collected ship time-series trajectory data is used as the AIS dataset, which is then divided into a training set and a test set.
[0011] The training set is used as input to the GRU sub-model and the BiGRU sub-model to train the GRU sub-model and the BiGRU sub-model, thereby obtaining the first machine learning model and the second machine learning model.
[0012] The intermediate state outputs of the optimal GRU sub-model and the BiGRU sub-model obtained during training are fused, and the fused state output is input into the fused prediction block to train the fused prediction block and obtain the third machine learning model.
[0013] More preferably, the dimensions of each time-series data point in the AIS dataset consist of location information and motion state information; the dimensions of the location information consist of time, latitude, and longitude, and the dimensions of the motion state information consist of heading, speed, and adjacency distance; in the adjacency distance, taking the i-th trajectory time-series point as an example, d i Let d be the Cartesian plane distance between the i-th trajectory sequence point and the next trajectory time sequence point i+1. i The calculation method is as follows: lat i+1 Lon represents the latitude of the (i+1)th trajectory sequence point. i+1 This represents the longitude of the (i+1)th trajectory sequence point.
[0014] More preferably, the first machine learning model is a GRU neural network; the second machine learning model is a BiGRU neural network; and the third machine learning model is a multilayer perceptron.
[0015] More preferably, in step S1, the first machine learning model inputs the observation sequence The mapping is to an output sequence of length l, consisting of intermediate feature states. The acquisition process includes:
[0016] Observation sequences in the dataset The elements are sequentially input into the first machine learning model, where t represents the position in the current trajectory sequence;
[0017] Update the hidden sequence of the first machine learning model according to the following formula. in Each element This represents the spatiotemporal features extracted from the sample points at time t in a series of trajectories of length g. Each element... This represents the spatiotemporal features extracted from the previous sample point at time t in a trajectory with an input time series length of g. This represents the output set of the fully connected layers that connect to the hidden states of the GRU neural network. The dimension of the hidden state is q, which is the same as the dimension of the model input data. θ represents the trajectory point of the sequence currently input into the GRU neural network, i.e., the input sample point of the first machine learning model. gru This represents the parameter values in each input-to-output mapping process;
[0018] θ gru This represents the parameter set in the mapping process of the first machine learning model: Let L represent the i-th time point in the trajectory sequence of length g input into the first machine learning model, where L represents the quantization error and N represents the total number of training samples. Let θ represent the j-th time point in the mapped output sample of length l, and let θ represent the parameter value in each input-to-output mapping process.
[0019] M g,l This represents an input sequence X of length g. g Below, the predicted output sequence Y of length l is... l This maximizes the conditional probability: M g,l =argmax Y p(Y l |X g ), p(Y l |X g ) represents a given sequence of g observations mapped to X. g Shoot to the future l predicted trajectory sequence Y l The probability of;
[0020] The state sequence consisting of the outputs of all hidden layers is input into the fully connected layer to obtain an intermediate feature state output of length l.
[0021] More preferably, in step S1, the second machine learning model takes the input observation sequence The mapping is to an output sequence of length l, consisting of intermediate feature states. The acquisition process includes:
[0022] Observation sequences in the dataset The elements are sequentially input into the second machine learning model, where t represents the position in the current trajectory sequence;
[0023] The forward hidden sequence of the second machine learning model is obtained according to the following formula. and backward hidden sequences
[0024] in This represents the output set of the fully connected layers containing the hidden states of the GRU sub-block model. The hidden state dimension is q, which is the same as the dimension of the model input data. t This represents the trajectory points of the input sequence at time t, which are the input sample points of the second machine learning model;
[0025] This represents the parameter set in the forward layer mapping process of the second machine learning model: This represents the i-th time point in the trajectory sequence of length g input into the feedforward layer of the second machine learning model. This represents the parameter set in the backward mapping process of the second machine learning model: Let L represent the i-th time point in the trajectory sequence of length g input to the feedback layer, where L represents the quantization error and N represents the total number of training samples. Let θ represent the j-th time point in the mapped output sample of length l, and let θ represent the parameter value in each input-to-output mapping process.
[0026] The forward hidden sequence and the backward hidden sequence are concatenated to obtain a concatenated state sequence. This concatenated state sequence is then input into a fully connected layer to obtain an intermediate feature state output of length l.
[0027] More preferably, in step S3, the third machine learning model outputs a state sequence from the input concatenated intermediate features. Mapped to an output sequence, the predicted output of length l. The acquisition process includes:
[0028] Concatenate intermediate feature state sequences The elements are sequentially input into the third machine learning model, where t represents the t-th concatenated feature pair in the current intermediate feature state sequence;
[0029] Obtain the hidden sequence of the third machine learning model according to the following formula. in This represents the output set of the fully connected layer, which connects to the hidden states of the multilayer perceptron. The hidden state dimension is q, and q is the same as the dimension of the model input data. This represents the concatenated value of intermediate feature states of the input data at time t, which is the input feature value of the third machine learning model. θ represents the output hidden state value obtained in the previous time step, and θ represents the parameter value in the process of mapping each input concatenated feature value to the output.
[0030] According to the following formula, the output h of the j-th hidden layer j :h j =σ j (h j-1 w j +b j ;θ), where the hidden state h1 of the first hidden layer is σ is the activation function of the first hidden layer, l is the total number of inputs, and b is the activation function of the first hidden layer. t It is the bias of the first hidden layer, w t It is the weight of the connection layer, σ j b is a non-linear activation function with learnable parameters θ in the j-th hidden layer. j It is the bias of the j-th hidden layer, w j These are the weights of the j-th connection layer;
[0031] The vector consisting of the outputs of all hidden layers is input into the fully connected layer to obtain a predicted output sequence of length l.
[0032] In addition, the present invention also provides a two-layer data-driven ship trajectory prediction system based on a GRU network, which includes:
[0033] The data acquisition module is used to acquire observation sequences X of length g from the AIS dataset. g ;
[0034] The data processing module is used to input the observed sequence into the first machine learning model and obtain an intermediate feature state output of length l. The observed sequence is then input into the second machine learning model to obtain an intermediate feature state output of length l.
[0035] The data stitching module is used to stitch together the intermediate feature states of the first machine learning model. intermediate feature states of the second machine learning model The data is then concatenated to obtain a composite training dataset.
[0036] The result prediction module is used to take the composite training data as input to the third machine learning model to obtain the prediction result. The system operates using the aforementioned two-layer data-driven ship trajectory prediction method based on a GRU network.
[0037] Compared with existing technologies, this invention can extract the location information and behavioral feature information of time-series trajectories. It extracts information through multi-layer networks based on GRU networks and performs ingenious fusion learning. At the same time, it introduces adjacency distance dimension information to enhance the correlation between time-series points so that the model can better extract data characteristics, thereby greatly increasing the model's feature learning ability on the dataset and improving the accuracy of the prediction model. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0039] Figure 2 This is a diagram of the GRU network structure in an embodiment of the present invention;
[0040] Figure 3 This is a diagram of the BiGRU network structure in an embodiment of the present invention;
[0041] Figure 4 This is a diagram of the multilayer perceptron (MLP) network structure in an embodiment of the present invention;
[0042] Figure 5 This invention provides a comparison of the performance differences of the method and two key sub-blocks regarding RMSE, MAPE, and MAE at different prediction step sizes in this embodiment of the invention.
[0043] Figure 6 The method of this invention and two key sub-blocks are compared across all prediction steps to compare the average performance differences in RMSE, MAPE, and MAE. Detailed Implementation
[0044] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and accompanying drawings. The content mentioned in the embodiments is not intended to limit the present invention.
[0045] The machine learning model training process used in this embodiment is as follows: Existing historical trajectory data from the AIS dataset is used and divided into a training set and a test set. Those skilled in the art should understand that when applying this method in practice, the test set should be obtained from the time-series dataset from which ship trajectory prediction is to be performed. Since this embodiment is only for illustrating and verifying the method, time-series data from the existing dataset can be used as the test set.
[0046] The AIS dataset consists of 1,282,656 time-series trajectory data points collected by AIS receiver devices, which were downloaded from the official website and consist of 197 ship data points. The dataset is then divided into training and test sets in a 7:3 ratio.
[0047] In the training set, the trajectory segments corresponding to each ship in the dataset are preprocessed and then input into the first and second machine learning models to extract deep features of the time series data. The tanh function is used for prediction in the output layer. The root mean square error function is used to calculate the error between the predicted trajectory label and the true trajectory label. The weights and biases of each layer of the neural network are calculated through the backpropagation algorithm. The neural networks in the first and second machine learning models are trained iteratively until the loss function converges, and the optimal first machine learning model and the optimal second machine learning model are obtained. At the same time, the intermediate feature state output of the training data in the training set is obtained.
[0048] The intermediate feature state outputs of the optimally trained first and second machine learning models are concatenated. The concatenated state data vector is then input into the fusion prediction block. The multilayer perceptron network of the fusion prediction block is used to learn and extract deep features from the concatenated state network. The tanh function is used for prediction at the output layer. The root mean square error function is used to calculate the error between the predicted trajectory label and the true trajectory label. The weights and biases of each layer of the neural network are calculated through backpropagation. The neural network in the fusion prediction block is iteratively trained until the loss function converges, resulting in the optimally trained model of the fusion prediction block. Finally, the overall first, second, and third machine learning models are saved.
[0049] Example 1
[0050] This embodiment utilizes the trained GRU, BiGUR, and multilayer perceptron networks to achieve multidimensional feature extraction and better prediction performance of the prediction model.
[0051] Figure 1 The structure of the proposed two-layer data-driven ship trajectory prediction method is shown, where the GRU block, BiGRU block, and fusion prediction block form an integrated prediction framework for trajectory prediction. The key features of this two-layer data-driven prediction method are as follows:
[0052] First, the two-layer data-driven prediction method in this embodiment takes g existing trajectory points as input, and after learning and fusing them through three key blocks, outputs a prediction of l future trajectory points. The values of g and l can be adjusted according to actual business needs.
[0053] Secondly, the two-layer data-driven prediction method in this embodiment constructs prediction sub-blocks based on the same dataset, and utilizes different neural network structures in the prediction sub-blocks to perform feature learning and prediction on the positional and dimensional information of the trajectory in the same dataset. For example, GRU networks and BiGRUs are used simultaneously to learn the dataset and output intermediate feature states, enabling multi-level feature learning and extraction of the dataset using different network structures. Furthermore, a multilayer perceptron network is used to concatenate and fuse the intermediate feature state outputs to obtain the final prediction result. The two-layer data-driven trajectory prediction process based on GRU networks includes the following steps: Figure 1 As shown:
[0054] Step (1): First, the GRU block receives a sequence of length g observed from the dataset and inputs the observed sequence into the GRU network for learning. The data types included for each sequence point in the dataset are: time, latitude, longitude, heading, speed and adjacency distance.
[0055] Step (2): Next, the BiGRU block receives a sequence of length g observed from the dataset and inputs the observed sequence into the BiGRU network for learning. The data types included for each sequence point in the dataset are: time, latitude, longitude and adjacency distance.
[0056] Step (3): Next, after training and learning the GRU network structure, the state sequence composed of the outputs of the hidden layers is input into the fully connected layer to obtain an intermediate feature state output sequence of length l.
[0057] Step (4): Similarly, after training and learning the BiGRU network structure, the state sequence composed of the outputs of the hidden layers is input into the fully connected layer to obtain an intermediate feature state output sequence of length l.
[0058] Output intermediate feature states for the first machine learning model intermediate feature states of the second machine learning model The data is then spliced together to form new training data.
[0059] Step (5): Then, the intermediate feature state outputs of the GRU block and the BiGRU block are concatenated to form a new training data. This training data will be used as input to the fusion prediction block.
[0060] Step (6): Transfer the new training data The input is fed into the fusion prediction block, which uses a multilayer perceptron network for learning, and finally outputs the overall prediction model result.
[0061] The two-layer data-driven ship trajectory prediction method based on GRU network designed in this embodiment can perform multi-dimensional data feature learning and ingenious fusion learning on the dataset, which greatly increases the model's ability to extract data characteristics from the dataset and improves the accuracy of the prediction model.
[0062] The GRU block employs a gated recurrent neural network (GRU). A gated recurrent neural network (GRU) is a variant of a recurrent neural network (RNN), such as... Figure 2 As shown, the GRU network contains two internal structures: reset gates and update gates. The reset gate is used to reduce information deemed irrelevant in the previous unit, while the update gate is used to determine how much information from the previous unit needs to be passed to the next unit.
[0063] This embodiment uses the observation sequence of a defined dataset. Let X represent a general sequence of length t, where t represents the current position in the trajectory sequence. g The hidden vector sequence is calculated sequentially using the GRU network. The specific GRU model is controlled by the following formulas (1)-(4).
[0064] r t =σ(U r x t +W r h t-1 +b r ), (1)
[0065] z t =σ(U z x t +W z h t-1 +b z (2)
[0066]
[0067]
[0068] Where σ represents the sigmoid activation function, tanh is the hyperbolic tangent function, and r t ,z t This indicates resetting the door and updating the door's output. h tThis represents the candidate output and the actual output, ⊙ represents element-wise multiplication, Us and Ws are weight matrices, and bs is the bias term.
[0069] For the output vector Perform another fully connected layer calculation and output a feature state output sequence of length l. Each element This represents the spatiotemporal feature data extracted from the trajectory sequence of the input GRU neural network from the t-th component of the sequence. It represents the output set of the fully connected layer of the hidden state connected to the GRU neural network. The dimension of the hidden state is q, which is the same as the dimension of the model input data.
[0070] The BiGRU block employs a bidirectional gated recurrent neural network (BiGRU). For example... Figure 3 As shown, the BiGRU model has an additional backpropagation GRU model compared to the unidirectional GRU model. This allows BiGRU to explore past and future information in the observed sequence, thus providing more effective prediction results. BiGRU takes the input sequence X... g The mapping is to two output sequences, namely the forward hidden sequences. Backward hidden sequence And operate using the following formulas (5)-(7):
[0071]
[0072]
[0073]
[0074] Each GRU function is a recurrent network of equations (1)-(4). The GRU function performs a nonlinear transformation on the input time-series trajectory vector, converting it into the corresponding GRU hidden state, α. t and β t Let b represent the weights of the hidden layer states of the BiGRU feedforward and backward neural networks at time t, respectively. t It is the bias term of the time series. The positive and negative hidden states obtained by the two unidirectional GRU networks through formulas (5) to (7) are concatenated into a compact bidirectional representation, and finally the intermediate feature state output of the BiGRU block is obtained.
[0075] For the output vector Perform another fully connected layer calculation and output a feature state output sequence of length l. Each element This represents the spatiotemporal feature data extracted from the trajectory sequence of the input BiGRU neural network from the t-th component of the sequence. It represents the output set of the fully connected hidden state layer connected to the BiGRU neural network. The hidden state dimension is q, which is the same as the dimension of the model input data.
[0076] This embodiment outputs the intermediate feature states of GRU blocks and BiGRU blocks. and The sequences are then concatenated to form the input sequence for the final fused prediction block.
[0077] The fusion prediction block employs a multilayer perceptron network (MLP). A MLP is a type of neural network that utilizes a supervised learning technique using backpropagation. The MLP sequentially reads the concatenated sequence of intermediate feature states from the outputs of GRU and BiGRU blocks. For each pair of spliced elements, update the internal hidden state according to the following formula:
[0078]
[0079] Where σ is the activation function of the first hidden layer. This represents the concatenation state at time t in the input variables, where l is the total number of inputs, and b is the number of inputs. t It is the bias of this layer, w t These are the weights of the connection layer. Then, the subsequent hidden layers update their internal hidden state using the following formula:
[0080] h j =σ j (h j-1 w j +b j ;θ) (9)
[0081] Where σ j b is a non-linear activation function in the j-th hidden layer with learnable parameters θ. j It is the bias of the j-th hidden layer, w tj It is the weight of the connection at the j-th layer. Finally, an output layer is appended to receive the hidden state h from formula (9). j As input, predictions are made sequentially.
[0082] In the fusion prediction block, the multilayer perceptron (MLP) network, such as Figure 4 As shown, the training process of an MLP network structure involves taking the input sequence... Mapped to an output sequence, i.e., the hidden sequence. Calculations are performed using formula (10):
[0083]
[0084] Where MLP represents the calculation process of formulas (8) and (9), using Output vector of hidden layer Perform another fully connected layer operation and output a sequence of length l, where each element The encoding extracts feature information from the intermediate predicted state sequence of the input from the t-th component of the sequence. This represents the output set of the fully connected layer containing the hidden states of the multilayer perceptron. The dimension of the hidden state is q, which is the same as the dimension of the model input data. Finally, the predicted output sequence of the fused prediction block is calculated using formula (11).
[0085]
[0086] Among them, W y and b y It maps the MLP output to the next prediction location. The trainable parameters of the neural network. This represents the output value of the t-th trajectory sequence point in an output sequence of length l.
[0087] The following section introduces the prediction scenario and application model of the two-layer data-driven prediction method in this embodiment, and then analyzes the effectiveness of the two-layer data-driven prediction method in this scenario.
[0088] Predictive model:
[0089] (1) Assume that the user knows the trajectory observation points of the ship at sea for a certain period of time, and the trajectory observation sequence comes from the AIS (Automatic Identification System for Ships) dataset.
[0090] (2) Users can input the known observation sequence into the two-layer data-driven prediction method, which will obtain the final future prediction trajectory sequence by passing the observation sequence through GRU, BiGRU blocks and fusion prediction blocks.
[0091] (3) In the two-layer data-driven prediction method of this embodiment, the trajectory points in the input observation sequence are not allowed to be less than 2, and the trajectory points in the output prediction sequence are not allowed to be less than 1.
[0092] Validity analysis:
[0093] The effectiveness of the method provided in this embodiment is analyzed using ship trajectory sequences in the western coastal region of the United States as an example.
[0094] (1) Comparison with existing work. The method of this embodiment is compared with Naive LSTM, GRU network and the five state-of-the-art existing works. On the US AIS dataset, the RMSE and MAPE performance of this embodiment can be improved by up to 99.45% and 99.5% respectively compared with existing studies, and the improvement is at least 11.8% and 18.38%. The RMSE and MAE performance of this embodiment are on average better than existing studies by 47.15% and 51.20% respectively. Therefore, the two-layer data-driven prediction method proposed in this embodiment has good prediction accuracy.
[0095] (2) A comparison of the overall prediction results with those of key sub-blocks using the two-layer data-driven prediction method further demonstrates its effectiveness. This embodiment compares RMSE, MAPE, and MAE performance. Figure 5 As shown, this embodiment outperforms both GRU and BiGRU blocks in all performance evaluation metrics. Particularly at different prediction step sizes, the two-layer data-driven prediction method achieves up to 39.99% and 6.58% improvement in RMSE performance compared to GRU and BiGRU blocks, respectively. In terms of MAPE performance, the two-layer data-driven prediction method achieves up to 28.04% and 32.9% improvement compared to GRU and BiGRU blocks, respectively. And in terms of MAE performance, the two-layer data-driven prediction method achieves up to 37.06% and 16.64% improvement compared to GRU and BiGRU blocks, respectively.
[0096] To further illustrate the effectiveness of the method provided in this embodiment, the average performance evaluation metric of all predicted step sizes is compared. For example... Figure 6 As shown, this embodiment outperforms the GRU and BiGRU blocks on average by 5.33% and 26.76% in RMSE performance, respectively. This embodiment outperforms the GRU and BiGRU blocks on average by 22.57% and 25.89% in MAPE performance, respectively. This embodiment outperforms the GRU and BiGRU blocks on average by 11.21% and 24.92% in MAE performance, respectively. The experimental data from the above embodiments demonstrate that this method outperforms the method using a single neural network block. This is because, through multi-layer networks and multi-dimensional feature mining of data, the two-layer network can acquire more data characteristics and increase the model's learning ability on trajectory data, thereby improving the overall prediction accuracy of the model.
[0097] Example 2
[0098] This embodiment relates to a two-layer data-driven ship trajectory prediction device based on a GRU network. The ship prediction device includes a processor and a memory. The memory stores a computer program. When the computer program is executed, it is used to implement the two-layer data-driven ship trajectory prediction method based on a GRU network in Embodiment 1.
[0099] Specifically, the processor can be an Intel(R) Core(TM) i7-1165G7@2.80GHz processor, 32GB of memory, and software programming can be performed using Python 3.8 on the Keras framework.
[0100] The purpose of the two-layer data-driven ship trajectory prediction device based on GRU networks provided in this embodiment is to implement the two-layer data-driven ship trajectory prediction method based on GRU networks involved in Embodiment 1. Therefore, the technical effects of Embodiment 1 and the two-layer data-driven ship trajectory prediction device based on GRU networks provided in this embodiment will not be repeated here.
[0101] To facilitate understanding by those skilled in the art of the improvements of this invention over the prior art, some of the accompanying drawings and descriptions have been simplified. The above embodiments are preferred implementations of this invention. In addition, this invention can be implemented in other ways. Any obvious substitutions without departing from the concept of this technical solution are within the protection scope of this invention.
Claims
1. A two-layer data-driven ship trajectory prediction method based on GRU networks, characterized in that, Includes the following steps: S1. Obtain an observation sequence X of length g from the AIS dataset. g The observed sequence is input into the first machine learning model to obtain an intermediate feature state output of length l. Simultaneously, the observed sequence is input into the second machine learning model to obtain an intermediate feature state output of length l. ; S2, Output of intermediate feature states of the first machine learning model intermediate feature state output of the second machine learning model The data is then spliced together to form a composite training dataset; S3. Use the composite training data as input to the third machine learning model to obtain the prediction result; The process of obtaining the first machine learning model, the second machine learning model, and the third machine learning model includes: The collected ship time-series trajectory data is used as the AIS dataset, which is then divided into a training set and a test set. The training set is used as input to the GRU sub-model and the BiGRU sub-model to train the GRU sub-model and the BiGRU sub-model, thereby obtaining the first machine learning model and the second machine learning model. The intermediate state outputs of the optimal GRU sub-model and the BiGRU sub-model obtained during training are fused, and the fused state output is input into the fused prediction block to train the fused prediction block and obtain the third machine learning model. The dimensions of each time-series data point in the AIS dataset consist of location information and motion state information; the location information is composed of time, latitude, and longitude, and the motion state information is composed of heading, speed, and adjacency distance; in the adjacency distance, taking the i-th trajectory time-series point as an example, d i Let d be the Cartesian plane distance between the i-th trajectory sequence point and the next trajectory time sequence point i+1. i The calculation method is as follows: , This represents the latitude of the (i+1)th trajectory sequence point. This represents the longitude of the (i+1)th point in the trajectory sequence; The first machine learning model is a GRU neural network; the second machine learning model is a BiGRU neural network; and the third machine learning model is a multilayer perceptron.
2. The ship trajectory prediction method based on a two-layer data driven GRU network according to claim 1, characterized in that: In step S1, the first machine learning model inputs the observation sequence The mapping is to an output sequence of length l, consisting of intermediate feature states. The acquisition process includes: Observation sequences in the dataset The elements are sequentially input into the first machine learning model, where t1 represents the position in the current trajectory sequence; Update the hidden sequence of the first machine learning model according to the following formula. ,in Each element This represents the spatiotemporal features extracted from the sample points at time t1 of a trajectory with an input time series length of g. Each element... This represents the spatiotemporal features extracted from the previous sample point at time t1 in a series of trajectories with a time series length of g. This represents the output set of the fully connected layers that connect to the hidden states of the GRU neural network. The dimension of the hidden state is q, which is the same as the dimension of the model input data. This represents the trajectory point of the sequence currently input into the GRU neural network, i.e., the input sample point of the first machine learning model. This represents the set of parameters for each input-to-output mapping process; This represents the parameter set in the mapping process of the first machine learning model: , Let L represent the i-th time point in the trajectory sequence of length g input into the first machine learning model, where L represents the quantization error and N represents the total number of training samples. Let represent the i-th time point in the mapped output sample of length l. This represents the parameter values in each input-to-output mapping process; M g,l This represents an input sequence X of length g. g Below, the predicted output sequence of length l This maximizes the conditional probability. , X represents a given sequence of g observations. g Shoot to the next l predicted trajectory sequence The probability of; The state sequence consisting of the outputs of all hidden layers is input into the fully connected layer to obtain an intermediate feature state output of length l. .
3. The two-layer data-driven ship trajectory prediction method based on GRU network according to claim 2, characterized in that: In step S1, the second machine learning model takes the input observation sequence The mapping is to an output sequence of length l, consisting of intermediate feature states. The acquisition process includes: Observation sequences in the dataset The elements are sequentially input into the second machine learning model, where t2 represents the position in the current trajectory sequence; The forward hidden sequence of the second machine learning model is obtained according to the following formula. and backward hidden sequence ; in , The hidden layer state dimension is q, and q is the same as the dimension of the model input data. This represents the trajectory points of the input sequence at time t2, which are the input sample points of the second machine learning model. This represents the parameter set in the forward layer mapping process of the second machine learning model: , This represents the i-th time point in the trajectory sequence of length g input into the feedforward layer of the second machine learning model. This represents the parameter set in the backward mapping process of the second machine learning model: , Let L represent the i-th time point in the trajectory sequence of length g input to the feedback layer, where L represents the quantization error and N represents the total number of training samples. Let represent the i-th time point in the mapped output sample of length l. This represents the parameter values in each input-to-output mapping process; The forward hidden sequence and the backward hidden sequence are concatenated to obtain a concatenated state sequence. This concatenated state sequence is then input into a fully connected layer to obtain an intermediate feature state output of length l. .
4. The two-layer data-driven ship trajectory prediction method based on GRU network according to claim 3, characterized in that: In step S3, the third machine learning model outputs the input concatenated intermediate feature state. , Mapped to a predicted output of length l The acquisition process includes: Output the concatenated intermediate feature states The elements are sequentially input into the third machine learning model, where t3 represents the t3th concatenated feature pair in the current intermediate feature state output; Obtain the hidden sequence of the third machine learning model according to the following formula. ,in , This represents the output set of the fully connected layer, which connects to the hidden states of the multilayer perceptron. The hidden state dimension is q, and q is the same as the dimension of the model input data. This represents the concatenated value of the intermediate feature state output of the input data at time t3, which is the input feature value of the third machine learning model. This represents the output hidden state value obtained in the previous time step. This represents the parameter values in the process of mapping each input concatenated feature value to the output; The output of the j-th hidden layer is based on the following formula. : The hidden state of the first hidden layer for , This is the activation function of the first hidden layer, where l is the total number of inputs. It is the bias of the first hidden layer. These are the weights of the connection layer. The j-th hidden layer has learnable parameters. nonlinear activation function, It is the bias of the j-th hidden layer. These are the weights of the j-th connection layer; The vector consisting of the outputs of all hidden layers is input into the fully connected layer to obtain a predicted output of length l. .
5. A two-layer data-driven ship trajectory prediction system based on a GRU network, operating using the method described in any one of claims 1-4, characterized in that, include: The data acquisition module is used to acquire observation sequences X of length g from the AIS dataset. g ; The data processing module is used to input the observed sequence into the first machine learning model and obtain an intermediate feature state output of length l. The observed sequence is then input into the second machine learning model to obtain an intermediate feature state output of length l. ; The data stitching module is used to stitch together the intermediate feature states of the first machine learning model. intermediate feature states of the second machine learning model The data is then concatenated to obtain a composite training dataset. The result prediction module is used to take the composite training data as input to the third machine learning model to obtain the prediction result.
Citation Information
Patent Citations
Improved ship trajectory prediction method and device based on recurrent neural network
CN113887789A
BiGRU-based multi-ship target tracking method, storage medium and product
CN115951325A