Ship trajectory prediction method based on hybrid Kalman neural network
By introducing a hybrid Kalman neural network into the Kalman filtering framework, using dynamic neural networks and Kalman gain neural networks to optimize track prediction, the shortcomings of traditional methods in long-term prediction and non-Gaussian noise processing are solved, and more accurate and robust track prediction is achieved.
Patent Information
- Application Number
- CN202411877644.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Traditional extended Kalman filtering is inaccurate when making longer-term track predictions and cannot effectively handle non-Gaussian noise.
Using a hybrid Kalman neural network-based method, a priori estimate of ship state is obtained through a dynamic neural network model (such as the Transformer model), and a hybrid Kalman gain neural network is used to learn Kalman gain, optimize state estimation and prediction.
A more accurate and robust track prediction is achieved, capable of handling nonlinear and non-Gaussian noise systems, enhancing the accuracy and stability of track prediction.
Smart Images

Figure CN119337923B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of trajectory prediction, and in particular to a ship trajectory prediction method, system, storage medium and electronic equipment based on a hybrid Kalman neural network. Background Art
[0002] In the field of navigation, Extended Kalman Filter (EKF) is often used to estimate and predict the motion state of a ship, thereby predicting the trajectory of the ship. The Extended Kalman Filter is a linear recursive estimator that predicts future states through historical data and makes corrections based on the difference between the actual measured value and the predicted value. In each iteration, EKF uses the new ship state measurement and the posterior estimate of the ship state from the previous iteration as sufficient statistics to generate a new prior estimate.
[0003] However, the traditional EKF has high requirements on the system dynamics model. In practical applications, the system dynamics model is usually simplified to a simple model, which may lead to inaccuracies when making longer-term predictions. Secondly, in practical applications, many noise sources have non-Gaussian characteristics, which are inconsistent with the assumptions of Kalman filtering and may cause deviations in the filtering results. In view of this, it is necessary to provide a new technology to achieve more accurate track prediction. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the deficiencies in the prior art, the present invention provides a ship trajectory prediction method, system, storage medium and electronic device based on a hybrid Kalman neural network, which solves the technical problem that accurate track prediction cannot be performed.
[0006] (II) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0008] A ship trajectory prediction method based on a hybrid Kalman neural network, comprising:
[0009] According to the historical trajectory of the target ship, the distribution of historical ship status at different times is obtained;
[0010] The historical ship state at the current moment is used as the posterior estimate of the ship state at the corresponding moment, and based on the dynamic neural network model, the prior estimate of the ship state at the next moment is obtained, and the predicted measurement value at the next moment is obtained based on the measurement matrix mapping; wherein the dynamic neural network model adopts the Transformer model;
[0011] According to the posterior estimation and historical measurement value of the ship state at the current moment, and the prior estimation and predicted measurement value of the ship state at the next moment, the corresponding Kalman gain is learned based on the mixed Kalman gain neural network;
[0012] According to the historical measurement values at each moment, the prior estimation of the ship state at the corresponding next moment, the predicted measurement values, and the corresponding Kalman gain, the posterior estimation of the ship state at each moment is corrected to obtain the corrected historical trajectory;
[0013] The corrected historical trajectory is used as an input to a dynamic neural network model to obtain a target ship trajectory prediction sequence.
[0014] Preferably, the distribution of the historical ship status at different times refers to:
[0015]
[0016] in, x t for t Historical ship status at the moment; The target ships are t Longitude coordinates, latitude coordinates, speed over the ground, and course over the ground at the time; T is the transpose operation.
[0017] Preferably, obtaining a priori estimation and predicted measurement value of the ship state at the next moment includes:
[0018] Will t Historical ship status at the moment x t As the posterior estimate of the ship state at the corresponding time ;
[0019] Will end at t The posterior estimate of the ship state at time After four-hot vector encoding and expansion to high-dimensional space, it is used as the dynamic neural network model F Input, get t+ Prior estimation of ship state at time 1 ;
[0020] Based on the measurement matrix H , the ship state prior estimate Mapped into the sensor measurement space, obtain t+ Predicted measurement value at time 1 .
[0021] Preferably, the training process of the Transformer model is:
[0022] Obtain multiple historical trajectory data of several ships;
[0023] Preprocess all historical trajectory data to obtain similar trajectory datasets of the target ship trajectory ,in n is the number of similar trajectory data, i Similar trajectory data , T For the total time, t Historical ship status at the moment , Respectively i Similar trajectory data t Longitude coordinates, latitude coordinates, ground heading, and ground speed at the time;
[0024] Will end t Historical ship status at the moment After four-hot vector encoding and expansion to high-dimensional space, it is used as the input of the Transformer model to predict t+ Ship status at time 1 ;
[0025] After traversing all similar trajectory data, construct the cross entropy loss function ,in CE represents cross entropy;
[0026] According to the cross entropy loss function, the Transformer model is trained until convergence.
[0027] Preferably, the learning of the corresponding Kalman gain includes:
[0028] The features F1, F2, F3 and F4 are used as the input of the hybrid Kalman gain neural network, and are sequentially passed through the fully connected input layer, GRU layer and fully connected output layer of the network to obtain the corresponding Kalman gain ;
[0029] Among them, the feature F1 is defined as the difference between the historical measurements of two consecutive moments, expressed as ; Feature F2 is the difference between the predicted measurement value and the historical measurement value at the same time, expressed as ; Feature F3 is the difference between the posterior estimates of the ship state at two consecutive moments, expressed as ; Feature F4 is the difference between the posterior estimate of the ship state and the prior estimate of the ship state at the same time, expressed as .
[0030] Preferably, the correction of the posterior estimation of the ship state at each moment refers to:
[0031]
[0032] in, For the corrected t Posterior estimate of the ship state at time +1.
[0033] A ship trajectory prediction system based on a hybrid Kalman neural network, comprising:
[0034] The data preprocessing module is used to obtain the distribution of historical ship status at different times according to the historical trajectory of the target ship;
[0035] A state prior estimation acquisition module is used to use the historical ship state at the current moment as a posterior estimate of the ship state at the corresponding moment, obtain the prior estimate of the ship state at the next moment based on the dynamic neural network model, and obtain the predicted measurement value at the next moment based on the measurement matrix mapping; wherein the dynamic neural network model adopts the Transformer model;
[0036] The Kalman gain learning module is used to learn the corresponding Kalman gain based on the hybrid Kalman gain neural network according to the posterior estimation of the ship state at the current moment, the historical measurement value, and the prior estimation and predicted measurement value of the ship state at the next moment;
[0037] The state posterior estimation correction module is used to correct the posterior estimation of the ship state at each moment according to the historical measurement value at each moment, the prior estimation of the ship state at the corresponding next moment, the predicted measurement value, and the corresponding Kalman gain to obtain the corrected historical trajectory;
[0038] The trajectory sequence prediction module is used to use the corrected historical trajectory as the input of the dynamic neural network model to obtain the target ship trajectory prediction sequence.
[0039] A storage medium stores a computer program for ship trajectory prediction based on a hybrid Kalman neural network, wherein the computer program enables a computer to execute the ship trajectory prediction method as described above.
[0040] An electronic device, comprising:
[0041] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include instructions for executing the ship trajectory prediction method as described above.
[0042] (III) Beneficial effects
[0043] The present invention provides a ship trajectory prediction method, system, storage medium and electronic device based on a hybrid Kalman neural network. Compared with the prior art, the present invention has the following beneficial effects:
[0044] In the present invention, the mathematical basis and interpretability of Kalman filtering are retained by introducing neural network into the Kalman filtering framework, while the fitting ability and learning ability of neural network are utilized. When the output result of the dynamic neural network model has noise, it is optimized based on hybrid Kalman neural network, so as to better handle the complex and changeable dynamic system in the real world and achieve more accurate and robust track prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A block diagram of a ship trajectory prediction method based on a hybrid Kalman neural network provided in an embodiment of the present invention;
[0047] Figure 2 A technical schematic diagram of a ship trajectory prediction method based on a hybrid Kalman neural network provided in an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of four-hot vector encoding provided by an embodiment of the present invention;
[0049] Figure 4 A schematic diagram of training a dynamic neural network model provided by an embodiment of the present invention;
[0050] Figure 5 A neural network architecture diagram for learning Kalman gain provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The embodiments of the present application solve the technical problem that it is impossible to accurately predict the track by providing a ship trajectory prediction method, system, storage medium and electronic device based on a hybrid Kalman neural network.
[0053] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:
[0054] In the embodiment of the present invention, the mathematical basis and interpretability of Kalman filtering are retained by introducing the neural network into the Kalman filter framework, while the fitting ability and learning ability of the neural network are utilized. When the output result of the dynamic neural network model is noisy, it is optimized based on the hybrid Kalman neural network, so as to better handle the complex and changeable dynamic system in the real world and achieve more accurate and robust track prediction.
[0055] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0056] Example:
[0057] like Figure 1 As shown, an embodiment of the present invention provides a ship trajectory prediction method based on a hybrid Kalman neural network, comprising:
[0058] S1. According to the historical trajectory of the target ship, obtain the distribution of historical ship status at different times;
[0059] S2. Taking the historical ship state at the current moment as the posterior estimation of the ship state at the corresponding moment, obtaining the prior estimation of the ship state at the next moment based on the dynamic neural network model, and obtaining the predicted measurement value at the next moment based on the measurement matrix mapping; wherein the dynamic neural network model adopts the Transformer model;
[0060] S3, based on the posterior estimation and historical measurement value of the ship state at the current moment, and the prior estimation and predicted measurement value of the ship state at the next moment, learn the corresponding Kalman gain based on the hybrid Kalman gain neural network;
[0061] S4. According to the historical measurement values at each moment, the a priori estimate of the ship state at the corresponding next moment, the predicted measurement values, and the corresponding Kalman gain, the a posteriori estimate of the ship state at each moment is corrected to obtain a corrected historical trajectory;
[0062] S5. Using the corrected historical trajectory as an input to a dynamic neural network model to obtain a target ship trajectory prediction sequence.
[0063] In the embodiment of the present invention, the mathematical basis and interpretability of Kalman filtering are retained by introducing the neural network into the Kalman filter framework, while the fitting ability and learning ability of the neural network are utilized. When the output result of the dynamic neural network model is noisy, it is optimized based on the hybrid Kalman neural network, so as to better handle the complex and changeable dynamic system in the real world and achieve more accurate and robust track prediction.
[0064] Next, we will combine Figure 2 The following are the steps of the above solution:
[0065] In step S1, the distribution of historical ship states at different times is obtained according to the historical trajectory of the target ship.
[0066] In this step, the historical trajectory of the target ship can be obtained based on the Automatic Identification System (AIS) system, and the distribution of the historical ship status at different times can be obtained based on this:
[0067]
[0068] in, x t for t Historical ship status at the moment; The target ships are t Longitude coordinates, latitude coordinates, speed over the ground, and course over the ground at the time; T is the transpose operation.
[0069] In step S2, the historical ship state at the current moment is used as the posterior estimation of the ship state at the corresponding moment, and the prior estimation of the ship state at the next moment is obtained based on the dynamic neural network model, and the predicted measurement value at the next moment is obtained based on the measurement matrix mapping; including:
[0070] Will t Historical ship status at the moment x t As the posterior estimate of the ship state at the corresponding time ;
[0071] Will end at t The posterior estimate of the ship state at time After four-hot vector encoding and expansion to high-dimensional space, it is used as the dynamic neural network model F Input, get t+ Prior estimation of ship state at time 1 ;
[0072] Based on the measurement matrix H , the ship state prior estimate Mapped into the sensor measurement space, obtain t+ Predicted measurement value at time 1 (The measured value can be set as longitude and latitude coordinate information).
[0073] Among them, due to x t is a low-dimensional vector representing the ship state. This feature space is too simple to represent complex ship motion patterns. Figure 3 As shown: First, The four-hot vector encoding is , and then associate each attribute with the corresponding high-dimensional embedding vector , that is, expanding the feature space to a high-dimensional space.
[0074] It should be noted that in the embodiment of the present invention, a dynamic neural network model is used instead of the mathematical model of the extended Kalman filter to capture the long-term dependencies that may exist in historical AIS measurements. The traditional extended Kalman filter algorithm requires an accurate dynamic model in track prediction. However, in actual situations, the ship's trajectory will be affected by many factors, which may be difficult to fully understand and model. In contrast, the dynamic neural network model, as a neural network-based model, has a very strong fitting ability, can adapt to different nonlinear system dynamics, and capture the complex relationships of the system by learning a large amount of data, thereby achieving more accurate track prediction.
[0075] Exemplarily, the dynamic neural network model adopts a Transformer model, such as Figure 4 As shown, the training process is:
[0076] Obtain multiple historical trajectory data of several ships;
[0077] Preprocess all historical trajectory data to obtain similar trajectory datasets of the target ship trajectory ,in n is the number of similar trajectory data, i Similar trajectory data , T For the total time, t Historical ship status at the moment , Respectively i Similar trajectory data t Longitude coordinates, latitude coordinates, ground heading, and ground speed at the time;
[0078] Will end t Historical ship status at the moment After four-hot vector encoding and expansion to high-dimensional space, it is used as the input of the Transformer model to predict t+ Ship status at time 1 ;
[0079] After traversing all similar trajectory data, construct the cross entropy loss function ,in CE represents cross entropy;
[0080] According to the cross entropy loss function, the Transformer model is trained until convergence.
[0081] It is not difficult to understand that in the training stage of the dynamic neural network model, data clustering preprocessing is performed because it is considered to be better suitable for ship trajectory prediction. Specifically: by analyzing the trajectory data, judging the similarity between different trajectories and screening them, multiple trajectory data cluster sets are obtained. The trajectories in each cluster set have the same or similar behavior pattern characteristics, which serve as the basis for selecting different training data sets for different predicted trajectories. Optionally, the dynamic time warping (DTW) method can be used to cluster the trajectories to select a trajectory data set similar to the target ship trajectory.
[0082] In step S3, the corresponding Kalman gain is learned based on the hybrid Kalman gain neural network according to the posterior estimation of the ship state at the current moment, the historical measurement value, and the prior estimation of the ship state at the next moment, the predicted measurement value.
[0083] The Kalman filter and its variants use basic statistical information to calculate the Kalman gain. In order to perform this calculation in a learning manner in a neural network, the statistical information of the measurement value and state estimate at each moment needs to be provided as input to the neural network so that it can learn the Kalman gain. Therefore, the following quantities related to the statistical relationship of the state space model can be used as input features of the Kalman gain neural network:
[0084] Feature F1 is the difference between the historical measurements at two consecutive moments, expressed as ;
[0085] Feature F2 is the difference between the predicted measurement value and the historical measurement value at the same time, expressed as ;
[0086] Feature F3 is the difference between the posterior estimates of the ship state at two consecutive moments, expressed as ;
[0087] Feature F4 is the difference between the posterior estimate of the ship state and the prior estimate of the ship state at the same time, expressed as .
[0088] Among them, features F1 and F3 reflect the evolution of the state, while features F2 and F4 represent the uncertainty of state estimation.
[0089] like Figure 5 As shown, the features F1, F2, F3 and F4 are used as the input of the hybrid Kalman gain neural network, and pass through the fully connected input layer, GRU layer and fully connected output layer of the network in turn to obtain the corresponding Kalman gain .
[0090] It is not difficult to understand that in order to obtain the appropriate Kalman gain K t+1 , it is required that in the training phase of the hybrid Kalman gain neural network, a large amount of data learning and training is required to discover the measured values, state estimates and the relationship between them, and then calculate the Kalman gain based on these relationships, which is different from the formula in the traditional extended Kalman filter algorithm. Corresponding.
[0091] In step S4, based on the historical measurement values at each moment, the a priori estimate of the ship state at the corresponding next moment, the predicted measurement values, and the corresponding Kalman gain, the posterior estimate of the ship state at each moment is corrected to obtain the corrected historical trajectory.
[0092] The correction of the posterior estimation of the ship state at each moment refers to:
[0093]
[0094] in, For the corrected t Posterior estimate of the ship state at time +1.
[0095] By correcting the posterior estimate of the ship state at each moment, the distribution of the historical ship state at different moments can be corrected, and then the corrected historical trajectory can be obtained.
[0096] In step S5, the corrected historical trajectory is used as an input to a dynamic neural network model to obtain a target ship trajectory prediction sequence.
[0097] In this step, the trained dynamic neural network model, namely the Transformer model, is still used, and the corrected historical trajectory is used as input data to predict the target ship trajectory in the future. Since the prediction process itself is not the focus of the embodiment of the present invention, it will not be repeated here.
[0098] The embodiments of the present invention utilize the mathematical basis and interpretability of Kalman filtering and the fitting and learning capabilities of neural networks. The hybrid Kalman filter neural network combines the state update mechanism of the Kalman filter and the nonlinear fitting capability of the neural network, and complements each other. Kalman filtering is very effective in processing linear systems, but when the system is nonlinear, the problem of error accumulation will arise. The neural network can discover the measured values, state estimates and the relationship between them through learning and training of a large amount of data, and calculate the Kalman gain based on these relationships, thereby making up for the performance limitations of the traditional Kalman filter when processing non-Gaussian noise.
[0099] The embodiment of the present invention provides a ship trajectory prediction system based on a hybrid Kalman neural network, comprising:
[0100] The data preprocessing module is used to obtain the distribution of historical ship status at different times according to the historical trajectory of the target ship;
[0101] A state prior estimation acquisition module is used to use the historical ship state at the current moment as a posterior estimate of the ship state at the corresponding moment, obtain the prior estimate of the ship state at the next moment based on the dynamic neural network model, and obtain the predicted measurement value at the next moment based on the measurement matrix mapping; wherein the dynamic neural network model adopts the Transformer model;
[0102] The Kalman gain learning module is used to learn the corresponding Kalman gain based on the hybrid Kalman gain neural network according to the posterior estimation of the ship state at the current moment, the historical measurement value, and the prior estimation and predicted measurement value of the ship state at the next moment;
[0103] The state posterior estimation correction module is used to correct the posterior estimation of the ship state at each moment according to the historical measurement value at each moment, the prior estimation of the ship state at the corresponding next moment, the predicted measurement value, and the corresponding Kalman gain to obtain the corrected historical trajectory;
[0104] The trajectory sequence prediction module is used to use the corrected historical trajectory as the input of the dynamic neural network model to obtain the target ship trajectory prediction sequence.
[0105] An embodiment of the present invention provides a storage medium storing a computer program for ship trajectory prediction based on a hybrid Kalman neural network, wherein the computer program enables a computer to execute the ship trajectory prediction method as described above.
[0106] An embodiment of the present invention provides an electronic device, including:
[0107] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include instructions for executing the ship trajectory prediction method as described above.
[0108] It can be understood that the ship trajectory prediction system based on the hybrid Kalman neural network, storage medium and electronic device provided in the embodiments of the present invention correspond to the ship trajectory prediction method based on the hybrid Kalman neural network provided in the embodiments of the present invention. The explanations, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the ship trajectory prediction method, which will not be repeated here.
[0109] In summary, compared with the prior art, the present invention has the following beneficial effects:
[0110] 1. In the embodiment of the present invention, the mathematical basis and interpretability of Kalman filtering are retained by introducing neural network into the Kalman filter framework, while the fitting ability and learning ability of neural network are utilized. When the output result of the dynamic neural network model is noisy, it is optimized based on hybrid Kalman neural network, so as to better handle the complex and changeable dynamic system in the real world and achieve more accurate and robust track prediction.
[0111] 2. Ability to handle nonlinear systems: Traditional Kalman filters are only applicable to linear systems, while hybrid Kalman filter neural networks utilize the nonlinear modeling capabilities of neural networks to handle nonlinear systems and perform more accurate state estimation and prediction.
[0112] 3. Processing non-Gaussian noise: Traditional Kalman filters assume that noise is Gaussian distributed and cannot process non-Gaussian noise. However, neural networks can directly obtain more accurate Kalman gains by learning a large amount of data, thus making up for the performance limitations of traditional Kalman filters in processing non-Gaussian noise.
[0113] 4. Enhanced track prediction capability: By combining the results of the dynamic neural network model and state estimation, the hybrid Kalman filter neural network can more accurately capture the nonlinear relationships and time-varying properties in complex systems, thereby achieving more accurate track prediction.
[0114] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0115] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A ship trajectory prediction method based on a hybrid Kalman neural network, characterized in that: include: According to the historical trajectory of the target ship, the distribution of historical ship status at different times is obtained; The historical ship state at the current moment is used as the posterior estimate of the ship state at the corresponding moment, and based on the dynamic neural network model, the prior estimate of the ship state at the next moment is obtained, and the predicted measurement value at the next moment is obtained based on the measurement matrix mapping; wherein the dynamic neural network model adopts the Transformer model; According to the posterior estimation and historical measurement value of the ship state at the current moment, and the prior estimation and predicted measurement value of the ship state at the next moment, the corresponding Kalman gain is learned based on the mixed Kalman gain neural network; According to the historical measurement values at each moment, the prior estimation of the ship state at the corresponding next moment, the predicted measurement values, and the corresponding Kalman gain, the posterior estimation of the ship state at each moment is corrected to obtain the corrected historical trajectory; The corrected historical trajectory is used as an input to a dynamic neural network model to obtain a target ship trajectory prediction sequence; The distribution of the historical ship status at different times refers to: in, x t for t Historical ship status at the moment; The target ships are t Longitude coordinates, latitude coordinates, speed over the ground, and course over the ground at the time; T is the transpose operation; Obtain the prior estimate of the ship's state at the next moment and the predicted measurement value, including: Will t Historical ship status at the moment x t As the posterior estimate of the ship state at the corresponding time ; Will end at t The posterior estimate of the ship state at time After four-hot vector encoding and expansion to high-dimensional space, it is used as the dynamic neural network model F Input, get t+ Prior estimation of ship state at time 1 ; Based on the measurement matrix H , the ship state prior estimate Mapped into the sensor measurement space, obtain t+ Predicted measurement value at time 1 ; The training process of the Transformer model is: Obtain multiple historical trajectory data of several ships; Preprocess all historical trajectory data to obtain similar trajectory datasets of the target ship trajectory ,in n is the number of similar trajectory data, i Similar trajectory data , T For the total time, t Historical ship status at the moment , Respectively i Similar trajectory data t Longitude coordinates, latitude coordinates, ground heading, and ground speed at the time; Will end t Historical ship status at the moment After four-hot vector encoding and expansion to high-dimensional space, it is used as the input of the Transformer model to predict t+ Ship status at time 1 ; After traversing all similar trajectory data, construct the cross entropy loss function ,in CE represents cross entropy; According to the cross entropy loss function, the Transformer model is trained until convergence.
2. The ship trajectory prediction method according to claim 1, characterized in that: The learning of the corresponding Kalman gain includes: The features F1, F2, F3 and F4 are used as the input of the hybrid Kalman gain neural network, and are sequentially passed through the fully connected input layer, GRU layer and fully connected output layer of the network to obtain the corresponding Kalman gain ; Among them, the feature F1 is defined as the difference between the historical measurements of two consecutive moments, expressed as ; Feature F2 is the difference between the predicted measurement value and the historical measurement value at the same time, expressed as ; Feature F3 is the difference between the posterior estimates of the ship state at two consecutive moments, expressed as ; Feature F4 is the difference between the posterior estimate of the ship state and the prior estimate of the ship state at the same time, expressed as .
3. The ship trajectory prediction method according to claim 2, characterized in that: The correction of the posterior estimation of the ship state at each moment refers to: in, For the corrected t Posterior estimate of the ship state at time +1.
4. A ship trajectory prediction system based on a hybrid Kalman neural network, characterized in that: Used to execute the ship trajectory prediction method according to claim 1, comprising: The data preprocessing module is used to obtain the distribution of historical ship status at different times according to the historical trajectory of the target ship; A state prior estimation acquisition module is used to use the historical ship state at the current moment as a posterior estimate of the ship state at the corresponding moment, obtain the prior estimate of the ship state at the next moment based on the dynamic neural network model, and obtain the predicted measurement value at the next moment based on the measurement matrix mapping; wherein the dynamic neural network model adopts the Transformer model; The Kalman gain learning module is used to learn the corresponding Kalman gain based on the hybrid Kalman gain neural network according to the posterior estimation of the ship state at the current moment, the historical measurement value, and the prior estimation and predicted measurement value of the ship state at the next moment; The state posterior estimation correction module is used to correct the posterior estimation of the ship state at each moment according to the historical measurement value at each moment, the prior estimation of the ship state at the corresponding next moment, the predicted measurement value, and the corresponding Kalman gain to obtain the corrected historical trajectory; The trajectory sequence prediction module is used to use the corrected historical trajectory as the input of the dynamic neural network model to obtain the target ship trajectory prediction sequence.
5. A storage medium, characterized in that: It stores a computer program for ship trajectory prediction based on a hybrid Kalman neural network, wherein the computer program enables a computer to execute the ship trajectory prediction method as described in any one of claims 1 to 3.
6. An electronic device, characterized in that: include: one or more processors; Memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the programs including programs for executing the ship trajectory prediction method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Dynamic knowledge-driven ship track prediction method and system
CN117474184A
Underwater pipeline track prediction method based on extended Kalman filtering and LSTM
CN119090052A