Ship track prediction method and system based on AIS data and deep learning
By embedding LSTM in the Encoder of the Transformer model, the Transformer-LSTM model is constructed, which solves the problem of large calculation volume and low prediction accuracy in ship navigation trajectory prediction, and achieves high-precision spatio-temporal position prediction and navigation safety warning.
Patent Information
- Application Number
- CN202311479920.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2025-03-07
AI Technical Summary
Long-term memory networks have problems with large calculation volume and low prediction accuracy in ship navigation trajectory prediction, mainly because the hidden layer cannot effectively focus on the key information in the sequence by the average processing of the input sequence by the hidden layer.
The improved Transformer-LSTM model is adopted to embed LSTM in the Encoder of the Transformer model. Through this combined model, the Transformer-LSTM model is trained to give different weights to data features, thereby improving prediction accuracy.
A high-precision space-time position prediction for the ship in the future is achieved, and an early warning mechanism is established through the prediction results to ensure the safety of ship navigation.
Smart Images

Figure CN119577042A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship track prediction, and in particular to a ship track prediction method and system based on AIS data and deep learning. Background Art
[0002] LSTM (Long Short Term Memory) was first proposed by Hochreiter et al. in 1997. [1] After being proposed, it has been applied in many fields. The superiority of LSTM and its combined models in time series prediction has led many scholars to apply LSTM models to track prediction. GAN S et al. [2] LSTM is used to predict the short-term trajectory of ships, and good results have been achieved. In order to study the long-term prediction of ship navigation trajectories, DING M et al. [3] A novel variational LSTM ship trajectory prediction method is proposed to predict the ship's trajectory in the next 5-20 minutes based on AIS data. The prediction features include longitude, latitude, speed and heading. GAO M et al. [4] By constructing a bidirectional long short-term memory neural network model, a ship behavior prediction model suitable for AIS data and time series was established to predict the ship's navigation behavior and perform online parameter adjustment. The bidirectional structure enhances the correlation between historical data and future data, improves the accuracy of prediction, and through the "forget gate" of long short-term memory, remembers common behavior patterns and forgets special behaviors, thus improving the generalization ability of the model. CAPOBIANCO S et al. [5] A sequence-to-sequence ship trajectory prediction method based on an encoder-decoder LSTM recurrent neural network was constructed, and the effectiveness of the model was demonstrated using historical AIS data. [6] By comparing the multi-step prediction method with the single-step prediction method, the multi-step prediction method is used to study whether it can provide richer spatial information reference for analyzing ship behavior and predicting its trajectory. [7] and XIANG J et al. [8] CNN and GRU are used respectively to identify the fishing behavior of ships. This process does not require setting complex parameters, and compared with traditional models, CNN and GRU have better recognition effects.
[0003] DWG Aet al. [9]By unifying the time and space information of the ship, using the cubic spline interpolation method and using the historical trajectory data of the ship to predict the future route of the ship, this method combines the advantages of TPNet (Trajectory Proposal Network for Motion Prediction, TPNet) and LSTM, can predict time and space at the same time, balance the complexity and accuracy of the prediction process, is easy to implement, suitable for real-time analysis, and has high prediction accuracy. LUO W et al.
[10] A prediction method based on vector analysis is proposed to predict the ship's navigation trajectory, and the reinforcement learning method is used to improve the prediction accuracy.
[0004] The above algorithms have conducted in-depth research on the prediction of ship navigation trajectories, but the long short-term memory network has some shortcomings. The hidden layer in the long short-term memory network can only average the input sequence, that is, all features of the input sequence are given the same weight, and it is impossible to pay more attention to the key information in the sequence, resulting in large calculation amount and low prediction accuracy. Summary of the invention
[0005] The present invention provides a ship track prediction method and system based on AIS data and deep learning to overcome the above technical problems.
[0006] A ship track prediction method based on AIS data and deep learning, including:
[0007] Step 1: Build a Transformer model and improve the Transformer model. The improvement of the Transformer model is to embed LSTM in the Encoder of the Transformer model and express it as a Transformer-LSTM model.
[0008] Step 2: Obtain the AIS dataset, preprocess the AIS dataset, construct a trajectory dataset based on the preprocessed AIS dataset, and divide the trajectory dataset into a training set and a test set.
[0009] Step 3: Train the Transformer-LSTM model according to the training set. Different weights are assigned to the features of the data in the training set according to the Transformer-LSTM model.
[0010] Test the trained Transformer-LSTM model according to the test set, and select the trained Transformer-LSTM model according to the test results.
[0011] Step 4: Obtain the historical trajectory of the ship to be predicted, predict the future trajectory points of the ship to be predicted based on the historical trajectory of the ship to be predicted and the selected Transformer-LSTM model, and use the future trajectory points as reference points.
[0012] Step 5: Provide navigation warning based on the positional relationship between the current position of the ship and the reference point.
[0013] Preferably, the preprocessing of the AIS data set includes removing outliers, performing trajectory time smoothing according to a trajectory time window smoothing filter method, performing interpolation processing according to cubic spline interpolation, resampling the data, and performing mean normalization processing.
[0014] Preferably, step 5 includes obtaining the channel width of the main channel where the ship to be predicted is located and the width of the ship itself, setting a low threshold and a high threshold, drawing a circle in the main channel with the low threshold as the radius and the reference point as the center as the safety area, drawing a circle in the main channel with the high threshold as the radius and the reference point as the center and using the part except the safety area as the secondary safety area, judging whether the current position of the ship to be predicted is located in the safety area, if so, it indicates that the position of the ship to be predicted is normal, otherwise, continue to judge whether the current position of the ship to be predicted is located in the secondary safety area, if so, it indicates that the position of the ship to be predicted is slightly abnormal, and the slight abnormality is fed back to the staff and an early warning is issued, otherwise it indicates that the position of the ship to be predicted is seriously deviated, and the serious deviation is fed back to the staff and a deviation warning is issued.
[0015] Preferably, the relationship between the low-gear threshold and the high-gear threshold is that the low-gear threshold is smaller than the high-gear threshold, and the low-gear threshold is larger than the length and width of the ship.
[0016] A ship track prediction system includes a model building module, a data processing module, a model training module, a track prediction module and a navigation warning module.
[0017] The model building module is used to build a Transformer model and improve the Transformer model. The improvement of the Transformer model is to embed LSTM in the Encoder of the Transformer model and express it as a Transformer-LSTM model.
[0018] The data processing module is used to obtain the AIS data set, preprocess the AIS data set, construct a trajectory data set based on the preprocessed AIS data set, and divide the trajectory data set into a training set and a test set.
[0019] The model training module is used to train the Transformer-LSTM model according to the training set, assign different weights to the features of the data in the training set according to the Transformer-LSTM model, test the trained Transformer-LSTM model according to the test set, and select the trained Transformer-LSTM model according to the test results.
[0020] The trajectory prediction module is used to obtain the historical trajectory of the ship to be predicted, predict the future trajectory points of the ship to be predicted based on the historical trajectory of the ship to be predicted and the selected Transformer-LSTM model, and use the future trajectory points as reference points.
[0021] The navigation warning module is used to issue navigation warnings based on the positional relationship between the current position of the ship and the reference point.
[0022] The present invention provides a ship track prediction method and system based on AIS data and deep learning. The Transformer-LSTM model used has high prediction accuracy and small prediction error, and can accurately predict the spatiotemporal position of the ship in the future. At the same time, with the prediction results of the Transformer-LSTM model as a reference, an early warning mechanism is established to warn of the behavior of ships deviating from the channel, which has very important practical significance for ensuring the safety of ship navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0024] Figure 1 is a flow chart of the method of the present invention;
[0025] Figure 2 It is a comparison diagram of the prediction structures of different training cycles of the present invention;
[0026] Figure 3 It is the ship trajectory diagram after screening by the present invention;
[0027] Figure 4 It is a two-dimensional result diagram of the track prediction of the present invention;
[0028] Figure 5 It is the electronic chart result diagram of the track prediction of the present invention;
[0029] FIG6( a ) is a schematic diagram of a normal trajectory position of the present invention;
[0030] FIG6( b ) is a schematic diagram of a slight yaw of the trajectory position of the present invention;
[0031] FIG6( c ) is a schematic diagram of a serious deviation of the trajectory position of the present invention;
[0032] FIG. 7( a ) is an electronic chart display when the track position of the present invention is normal;
[0033] FIG. 7( b ) is an electronic chart display when the track position of the present invention is slightly off course;
[0034] FIG. 7( c ) is an electronic chart display when the track position of the present invention is seriously yawed. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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.
[0036] Figure 1 It is a flow chart of the method of the present invention, such as Figure 1 As shown, the method of this embodiment may include:
[0037] Step 1: Build a Transformer model and improve the Transformer model. The improvement of the Transformer model is to embed LSTM in the Encoder of the Transformer model and express it as a Transformer-LSTM model.
[0038] Step 2: Obtain the AIS dataset, preprocess the AIS dataset, construct a trajectory dataset based on the preprocessed AIS dataset, and divide the trajectory dataset into a training set and a test set.
[0039] Step 3: Train the Transformer-LSTM model according to the training set. Different weights are assigned to the features of the data in the training set according to the Transformer-LSTM model.
[0040] Test the trained Transformer-LSTM model according to the test set, and select the trained Transformer-LSTM model according to the test results.
[0041] Step 4: Obtain the historical trajectory of the ship to be predicted, predict the future trajectory points of the ship to be predicted based on the historical trajectory of the ship to be predicted and the selected Transformer-LSTM model, and use the future trajectory points as reference points.
[0042] Step 5: Provide navigation warning based on the positional relationship between the current position of the ship and the reference point.
[0043] Based on the above scheme, the Transformer-LSTM model used in this embodiment has high prediction accuracy and small prediction error, and can accurately predict the spatiotemporal position of the ship in the future. At the same time, with the prediction results of the Transformer-LSTM model as a reference, an early warning mechanism is established to warn of the behavior of ships deviating from the channel, which is of great practical significance for ensuring the safety of ship navigation.
[0044] Specifically, this embodiment provides the details of the track prediction method, including:
[0045] First of all, ship track prediction is to predict the ship's future trajectory based on the ship's historical navigation information and the multi-dimensional features reflected in the AIS data. Traditional ship trajectory prediction is mostly based on statistics and traditional machine learning, but due to the complex marine environment and the uncertainty of ship navigation, the prediction results are often unsatisfactory. With the great success of deep learning in all walks of life, many scholars have begun to use deep learning to predict ship trajectories, which provides rich ideas for the proposal and application of this model.
[0046] Step 1: Build the Transformer model. The Transformer model is a classic model for natural language processing proposed by the Google team in 2017. The Transformer model uses the Self-Attention mechanism, which changes the traditional RNN sequential structure. The entire network structure consists only of Self-Attention and Feed Forward Neural Network, which enables the model to be trained in parallel, is no longer constrained by position information, and can have global information.
[0047] The Transformer model is improved, and the improvement of the Transformer model is to embed LSTM in the Encoder of the Transformer model and express it as a Transformer-LSTM model. Specifically, on the basis of the Transformer model, LSTM is embedded as a layer in the Transformer model, specifically in the Encoder embedded in the Transformer model, and the Transformer model adopts an existing commonly used model, and the two are combined into a Transformer-LSTM model. Different weights are given to the features of the data in the data set according to the Transformer-LSTM model.
[0048] The Transformer-LSTM model discards the reliance on the sequential structure of time series in traditional neural networks. Its network structure mainly consists of two parts: the Encoder block and the Decoder block, where the Q, K, and V matrices are obtained through matrix operations.
[0049] As a new network model that can process sequence data, Transformer's dependence on time series data and nonlinear learning of spatial data are mainly based on the internal Self-Attention structure and Multi-HeadAttention module. These two modules can not only capture the correlation between multiple dimensions of input vectors, but also enable the model to have the ability of parallel training, and the prediction performance has been greatly improved.
[0050] Step 2, obtain an AIS data set, and preprocess the AIS data set. The preprocessing of the AIS data set includes removing outliers, smoothing the trajectory time according to the trajectory time window smoothing filter method, interpolating according to cubic spline interpolation, resampling the data, and performing mean normalization. The collected AIS data is processed as shown in Table 1 below, where "MMSI" means "maritime mobile communication service identification code"; "LTM" means "local time"; "LON" means "longitude"; and "LAT" means "latitude".
[0051] Table 1 Processed AIS data
[0052]
[0053] The trajectory data set is constructed according to the preprocessed AIS data set, and the trajectory data set is divided into a training set and a test set, that is, the processed experimental data is divided, 80% of the trajectory point data is used as the training set, and 20% of the trajectory point data is used as the test set.
[0054] Step 3: Train the Transformer-LSTM model based on the training set. The parameters are set as follows: represents the input sequence of the model; the output sequence is Represents the output sequence of the model; in the ship trajectory of the test set, The real value sequence corresponding to the sequence is During the training of the model, the time range of the sequence is 1≤T≤T t ; In the prediction process of the model, the time range of the sequence is the number of iterations, which is an important factor affecting the accuracy of the neural network model. In this embodiment, the number of iterations is set to {10, 30, 50, 70, 100}; the learning rate is set to 0.001; the batch size is set to 12. The input sequence is input from the encoder and the output sequence is output from the decoder. When the training cycles are 50, 100, 150, 200, 250, and 300 respectively, the prediction results of the Transformer-LSTM model are compared with those of the LSTM model, the Attention-LSTM model, and the Attention-BiLSTM model. The comparison diagrams are shown as follows: Figure 2 As shown in (a), (b), (c), (d), (e), and (f), it can be seen from the comparison diagram that with the increase of training cycles, the prediction effect of each model gradually tends to be stable, and the degree of deviation from the true value generally shows a trend of gradually decreasing. The prediction value of the LSTM model does not conform to the actual movement trend of the ship, and with the increase of training cycles, the prediction value has repeated points, and no effective prediction of the ship trajectory is made; the individual points in the prediction value of the Attention-LSTM model deviate greatly from the true value; the Attention-BiLSTM model conforms to the actual trend of the ship's movement, but there is a certain error; and the prediction value of the Transformer-LSTM model not only conforms to the trend of the ship's movement, but also has a small error.
[0055] Test the trained Transformer-LSTM model according to the test set. Select the trained Transformer-LSTM model according to the test results.
[0056] Step 4: Obtain the historical trajectory of the ship to be predicted, predict the future trajectory points of the ship to be predicted based on the historical trajectory of the ship to be predicted and the selected Transformer-LSTM model, and use the future trajectory points as reference points.
[0057] In order to verify the feasibility and superiority of this embodiment, the AIS data of the main channel of Ningbo-Zhoushan Port is used for verification. The navigation tracks of ships with 9-digit MMSI numbers, speeds greater than 5 knots and lengths greater than 90 meters are screened out from the collected data. The screened AIS data are processed by removing outliers, trajectory time window smoothing filtering, cubic spline interpolation, resampling and mean variance normalization. Figure 3 shown.
[0058] Map the track of a ship with MMSI number 21252**** in the waters to the two-dimensional coordinate system as follows: Figure 4 As shown in the figure, it can be seen that the predicted value of the Transformer-LSTM model has a high degree of fit with the actual value of the ship, which fully demonstrates the high prediction accuracy of the Transformer-LSTM model.
[0059] In order to better demonstrate the prediction effect of the model, Figure 4 The ship tracks in the chart are mapped onto the electronic chart, such as Figure 5 As shown in the figure, it can be seen that the model prediction value is consistent with the ship's motion trend and has a high degree of fit with the true value. It accurately predicts the ship's motion trend and spatiotemporal position in the future, which adds protection to the ship's navigation safety.
[0060] Since ships are affected by sea conditions such as sea breeze, waves, and currents during navigation, as well as objective factors such as the ship's own operating performance and collision avoidance behavior, it is impossible for ships to sail completely according to the expected plan during navigation. There will be certain deviations and certain navigation risks. Therefore, it is necessary to issue early warnings for ships that deviate from their routes.
[0061] Step 5. Obtain the channel width of the main channel where the ship to be predicted is located and the ship's own width, set a low threshold and a high threshold, draw a circle in the main channel with the low threshold as the radius and the reference point as the center as the safety area, draw a circle in the main channel with the high threshold as the radius and the reference point as the center, and use the part except the safety area as the secondary safety area to determine whether the current position of the ship to be predicted is within the safety area. If so, it indicates that the position of the ship to be predicted is normal. Otherwise, continue to determine whether the current position of the ship to be predicted is within the secondary safety area. If so, it indicates that the position of the ship to be predicted is slightly abnormal, and the slight abnormality is fed back to the staff and an early warning is issued. Otherwise, it indicates that the position of the ship to be predicted is seriously deviated, and the serious deviation is fed back to the staff and a deviation warning is issued.
[0062] Specifically, this implementation gives the details of navigation warning. First, based on the prediction method of ship trajectory based on AIS data and deep learning, the navigation trajectory of the ship in the future is obtained. Since the data during model learning and training are all historical data of safe navigation of the ship, and the feasibility, effectiveness and accuracy of the model of this embodiment have been explained and verified above, the model of this embodiment has a reliable reference value for the prediction of the future navigation trajectory of the ship. Therefore, based on the Transformer-LSTM model, the prediction point of the Transformer-LSTM model is used as the reference point to establish a ship safety warning mechanism to ensure the safety of ship navigation.
[0063] (2) Early warning application
[0064] According to the relevant provisions of the "Special Plan for Channels and Anchorages in Zhoushan Port Area" (revised version in 2019), the width of the main channel of the core port area of Ningbo Zhoushan is between 1,000 and 1,300 meters, and the research of this application is based on a ship length of more than 90 meters. Combined with the navigation data of Ningbo Zhoushan Port, it can be seen that the length of large ships navigating in the main channel of Ningbo Zhoushan is mostly in the range of 90-300 meters, and the width of the ship is mostly in the range of 12-60 meters.
[0065] Taking into account factors such as the width of the main channel and the width range of navigable ships, this embodiment sets two thresholds for the deviation range to issue an early warning for ship deviation behavior, wherein the low threshold is set to 250 meters and the high threshold is set to 400 meters. The setting of the thresholds can be adjusted according to the actual situation during navigation. This embodiment sets the early warning mechanism to three situations: "normal position", "slight deviation" and "serious deviation" according to the threshold range.
[0066] The centerline of the channel divides the main channel into an upper and lower channel, with the ship track prediction point as the center and the set values of the low threshold and the high threshold as the radius. The dotted circular box is the low threshold and the solid circular box is the high threshold. When the ship position is near the prediction point and within the dotted circular box, the ship is considered to be in a "normal position", as shown in Figure 6(a). At this time, the ship can travel normally; when the ship position is between the dotted circular box and the solid circular box, the ship is considered to be "slightly yawed", as shown in Figure 6(b). At this time, the ship should be vigilant to avoid further yaw; when the ship position is outside the solid circular box, the ship is considered to be "severely yawed", as shown in Figure 6(c). At this time, the ship has seriously yawed and there is a risk of collision with other ships. At this time, the ship should take immediate measures until it is within the range of "normal position" or "slightly yawed" to ensure the safety of the ship's navigation.
[0067] In order to better demonstrate the ship warning mechanism, the actual motion trajectory of the ship and the predicted value of the Transformer-LSTM model are mapped to the electronic chart platform, such as Figure 7(a) , 7(b) , 7(c) respectively show the electronic chart display when the ship's track position is normal, the electronic chart display when the ship's track is slightly deviated, and the electronic chart display when the ship's track is seriously deviated, where the dotted line frame is the low threshold and the solid line frame is the high threshold.
[0068] A ship track prediction system includes a model building module, a data processing module, a model training module, a track prediction module and a navigation warning module.
[0069] The model building module is used to build a Transformer model and improve the Transformer model. The improvement of the Transformer model is to embed LSTM in the Encoder of the Transformer model and express it as a Transformer-LSTM model.
[0070] The data processing module is used to obtain the AIS data set, preprocess the AIS data set, construct a trajectory data set based on the preprocessed AIS data set, and divide the trajectory data set into a training set and a test set.
[0071] The model training module is used to train the Transformer-LSTM model according to the training set, assign different weights to the features of the data in the training set according to the Transformer-LSTM model, test the trained Transformer-LSTM model according to the test set, and select the trained Transformer-LSTM model according to the test results.
[0072] The trajectory prediction module is used to obtain the historical trajectory of the ship to be predicted, predict the future trajectory points of the ship to be predicted based on the historical trajectory of the ship to be predicted and the selected Transformer-LSTM model, and use the future trajectory points as reference points.
[0073] The navigation warning module is used to issue navigation warnings based on the positional relationship between the current position of the ship and the reference point.
[0074] Overall beneficial effects:
[0075] The present invention provides a ship track prediction method and system based on AIS data and deep learning. The Transformer-LSTM model used has high prediction accuracy and small prediction error, and can accurately predict the spatiotemporal position of the ship in the future. At the same time, with the prediction results of the Transformer-LSTM model as a reference, an early warning mechanism is established to warn of the behavior of ships deviating from the channel, which has very important practical significance for ensuring the safety of ship navigation.
[0076] The reference documents cited in the background technology are as follows:
[0077] [1]HOCHREITER S,SCHMIDHUBER J.Long Short-Term Memory[J].NeuralComputation,1997,9(8):1735-1780.
[0078] [2]GAN S,SHAN L,KANG L,et al.Ship trajectory prediction forintelligent traffic management using clustering and ANN:Ukacc InternationalConference on Control[C].2016.
[0079] [3]DING M,SU W,LIU Y,et al.A Novel Approach on Vessel TrajectoryPrediction Based on Variational LSTM:2020IEEE International Conference onArtificial Intelligence and Computer Applications(ICAICA)[C].2020.
[0080] [4]GAO M,SHI G,LI S.Online Prediction of Ship Behavior with AutomaticIdentification System Sensor Data Using Bidirectional Long Short-Term MemoryRecurrent Neural Network[J].Sensors,2018,18(12):4211.
[0081] [5]CAPOBIANCO S,MILLEFIORI L M,FORTI N,et al.Deep Learning Methodsfor Vessel Trajectory Prediction Based on Recurrent Neural Networks[J].IEEEtransactions on aerospace and electronic systems,2021,57(6):4329-4346.
[0082] [6]WANG R X,PENG C Y,GAO J M,et al.A dilated convolution network-based LSTM model for multi-step prediction of chaotic time series[J].COMPUTATIONAL&APPLIED MATHEMATICS,2020,39(1):1-22.
[0083] [7]LJUNGGREN H.Using Deep Learning for Classifying Ship Trajectories:2018 International Conference on Information Fusion(FUSION)[C].2018.
[0084] [8]XIANG J,XUAN L,SOUZA E,et al.Improving point-based AIS trajectoryclassification with partition-wise gated recurrent units:International JointConference on Neural Networks[C].2017.
[0085] [9]DWG A,YSZ A,JFZ B,et al.A novel MP-LSTM method for ship trajectoryprediction based on AIS data[J].Ocean Engineering,2021,228:1-16.
[0086]
[10] LUO W,ZHANG G.Ship Motion Trajectory and Prediction Based onVector Analysis[J].Journal of Coastal Research,2020,95:1183.
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A ship track prediction method based on AIS data and deep learning, characterized in that: include, Step 1: Build a Transformer model and improve the Transformer model. The improvement of the Transformer model is to embed LSTM in the Encoder of the Transformer model and express it as a Transformer-LSTM model. Step 2: Obtain the AIS dataset, preprocess the AIS dataset, construct a trajectory dataset based on the preprocessed AIS dataset, and divide the trajectory dataset into a training set and a test set. Step 3: Train the Transformer-LSTM model according to the training set, where different weights are assigned to the features of the data in the training set according to the Transformer-LSTM model. Test the trained Transformer-LSTM model according to the test set, and select the trained Transformer-LSTM model according to the test results. Step 4: Obtain the historical trajectory of the ship to be predicted, predict the future trajectory points of the ship to be predicted based on the historical trajectory of the ship to be predicted and the selected Transformer-LSTM model, and use the future trajectory points as reference points. Step 5: Provide navigation warning based on the positional relationship between the current position of the ship and the reference point.
2. A ship track prediction method based on AIS data and deep learning according to claim 1, characterized in that: The preprocessing of the AIS data set includes removing outliers, smoothing the trajectory time according to the trajectory time window smoothing filter method, interpolating according to cubic spline interpolation, resampling the data and performing mean normalization.
3. A ship track prediction method based on AIS data and deep learning according to claim 1, characterized in that: The step 5 includes obtaining the channel width of the main channel where the ship to be predicted is located and the width of the ship itself, setting a low threshold and a high threshold, drawing a circle in the main channel with the low threshold as the radius and the reference point as the center as the safety area, drawing a circle in the main channel with the high threshold as the radius and the reference point as the center and using the part except the safety area as the secondary safety area, judging whether the current position of the ship to be predicted is within the safety area, if so, it indicates that the position of the ship to be predicted is normal, otherwise, it continues to judge whether the current position of the ship to be predicted is within the secondary safety area, if so, it indicates that the position of the ship to be predicted is slightly abnormal, and the slight abnormality is fed back to the staff and an early warning is issued, otherwise, it indicates that the position of the ship to be predicted is seriously deviated, and the serious deviation is fed back to the staff and a deviation warning is issued.
4. A ship track prediction method based on AIS data and deep learning according to claim 3, characterized in that: The relationship between the low-gear threshold and the high-gear threshold is that the low-gear threshold is smaller than the high-gear threshold, and the low-gear threshold is larger than the ship length and the ship width.
5. A ship track prediction system based on the method of claim 1, characterized in that: It includes model building module, data processing module, model training module, trajectory prediction module and navigation warning module. The model building module is used to build a Transformer model and improve the Transformer model. The improvement of the Transformer model is to embed LSTM in the Encoder of the Transformer model and express it as a Transformer-LSTM model. The data processing module is used to obtain the AIS data set, preprocess the AIS data set, construct a trajectory data set based on the preprocessed AIS data set, and divide the trajectory data set into a training set and a test set. The model training module is used to train the Transformer-LSTM model according to the training set, assign different weights to the features of the data in the training set according to the Transformer-LSTM model, test the trained Transformer-LSTM model according to the test set, and select the trained Transformer-LSTM model according to the test results. The trajectory prediction module is used to obtain the historical trajectory of the ship to be predicted, predict the future trajectory points of the ship to be predicted based on the historical trajectory of the ship to be predicted and the selected Transformer-LSTM model, and use the future trajectory points as reference points. The navigation warning module is used to issue navigation warnings based on the positional relationship between the current position of the ship and the reference point.
Citation Information
Cited By
Shipping logistics flow direction prediction method and system based on multi-source data fusion
CN120875177A