Ship trajectory prediction method combining ship behaviors and environmental factors
By combining ship behavior and environmental factors, using feature processing and fusion modules to predict ship trajectory, the problem of insufficient accuracy and reliability of ship trajectory prediction in the prior art is solved, and more efficient and reliable prediction results are achieved.
Patent Information
- Application Number
- CN202510367561.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art has problems of insufficient accuracy and reliability in ship trajectory prediction, especially under the influence of complex environmental factors near deep sea wind farms.
Ship trajectory prediction is carried out by combining ship behavior and environmental factors, using the ship automatic identification system to obtain AIS data and environmental data, design feature processing prediction module to extract features, fusion feature module generates ship trajectory fusion prediction data, and trains the preset ship trajectory prediction model.
It improves the accuracy and reliability of ship trajectory prediction, can process high-dimensional and nonlinear data, has strong learning ability, can capture the complex dynamic characteristics of ship movement, and adapt to complex and changeable marine environments.
Smart Images

Figure CN119886468A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ship trajectory prediction, and in particular relates to a ship trajectory prediction method combining ship behavior and environmental factors. Background Art
[0002] As ship traffic becomes increasingly busy, the accuracy requirements for ship trajectory prediction are also getting higher and higher. However, traditional methods have significant limitations in data quality and model complexity. For example, simulation methods rely on accurate physical models and parameters, but the actual marine environment is complex and changeable, and it is difficult to accurately simulate all factors, especially the significant time interval uncertainty, which leads to large deviations in prediction results. Statistical methods are based on similarity search and Bayesian reasoning. Although they can handle a certain degree of noise and uncertainty, the quality and quantity of data directly affect the prediction accuracy. In addition, statistical models are usually simple and difficult to capture the complex dynamic characteristics of ship motion. Knowledge-based methods require knowledge extraction, storage and retrieval, and the construction and maintenance costs of the knowledge base are high. At the same time, the update speed of the knowledge base may not keep up with the changes in ship traffic and the marine environment. Machine learning models, especially deep learning models, require a large amount of labeled data for training. The data labeling process is time-consuming and costly, which limits the widespread application of the model. Existing machine learning models have weak learning capabilities for ship dynamic characteristics and are difficult to capture the complex motion patterns of ships under different environments and conditions. The prediction results of machine learning models are easily affected by the parameters set in advance, and the adjustment of parameters requires a lot of experiments and experience accumulation. In addition, methods based on deep learning also have the following limitations. It is difficult for deep learning models to effectively fit complex environmental changes and uncertain factors, such as ocean weather, water currents, tides, etc., resulting in limited prediction accuracy. Deep learning models usually have high time complexity and long running time, making it difficult to meet the needs of real-time prediction. Deep learning models have high requirements for hardware devices, including computing power and storage space. Low-end hardware will lead to low model learning efficiency and affect the prediction effect.
[0003] In summary, the defects of existing technologies indicate that in the field of ship trajectory prediction, more advanced technologies and methods still need to be further researched and developed to improve the accuracy and practicality of ship trajectory prediction. Summary of the invention
[0004] 1. Purpose of the invention The purpose of the present invention is to provide a ship trajectory prediction method that combines ship behavior and environmental factors, aiming to solve the problems of insufficient accuracy and reliability in current ship trajectory prediction, especially under the influence of complex environmental factors near deep sea wind farms, and to improve the accuracy of trajectory prediction.
[0005] (II) Technical solution To solve the above problems, the present invention provides a ship trajectory prediction method combining ship behavior and environmental factors, comprising: Obtain AIS data and environmental data respectively through the ship automatic identification system; Inputting the AIS data into a first feature processing prediction module to obtain pre-processed AIS data and data prediction results of ship behavior; Inputting the environmental data into a second feature processing prediction module to obtain a prediction result of the environmental data surrounding the ship; Inputting the data prediction results of the ship behavior and the prediction results of the ship surrounding environment data into a fusion feature module to generate ship trajectory fusion prediction data; The preset ship trajectory prediction model is trained using the preprocessed AIS data, the environmental data and the ship trajectory fusion prediction data to obtain a trained ship trajectory prediction model, wherein the preset ship trajectory prediction model includes a first feature processing prediction module, a second feature processing prediction module and a fusion feature module; The trained ship trajectory prediction model is used to predict the ship trajectory.
[0006] Furthermore, the first feature processing prediction module includes an AIS data preprocessing module, a ship behavior clustering module, a BIGRU-based ship behavior feature extraction module and a first fully connected layer, which are connected in sequence.
[0007] Furthermore, the step of inputting the AIS data into a first feature processing prediction module to obtain a data prediction result of the ship behavior comprises the following steps: Preprocessing the AIS data by the AIS data preprocessing module to obtain preprocessed AIS data; Inputting the preprocessed AIS data into the ship behavior clustering module to obtain a clustering result of the ship behavior; Using the BIGRU-based ship behavior feature extraction module, feature extraction is performed on the clustering results of the ship behavior to obtain ship behavior features; The first fully connected layer is used to normalize the ship behavior characteristics to obtain a data prediction result of the ship behavior.
[0008] Furthermore, the pre-processed AIS data is input into the ship behavior clustering module to obtain the clustering result of the ship behavior, including: Extracting ship track sets from preprocessed AIS data; Traversing the ship trajectory set and determining whether processing is required to obtain ship trajectory data that meets the requirements; Compressing the ship trajectory data by using a DP compression algorithm; After compression is completed, the Hausdorff similarity matrix is calculated based on the Hausdorff distance; The HDBSCAN clustering method is used to cluster the Hausdorff similarity matrix and obtain the optimal clustering result; Based on the optimal clustering result, the clustering result of ship behavior is obtained by screening according to the comprehensive clustering performance index.
[0009] Furthermore, the HDBSCAN clustering method processing process is as follows: The minimum spanning tree and clustering hierarchy are established based on the Hausdorff similarity matrix. Traverse and compress the clustering hierarchy to obtain multiple clustering results; Selecting a clustering result with the best stability from the multiple clustering results; Furthermore, the adopting of the BIGRU-based ship behavior feature extraction module to extract features from the clustering results of the ship behavior to obtain ship behavior features comprises the following steps: Inputting the clustering result of the ship behavior into the encoder for forward operation and backward operation respectively, and obtaining forward feature information and backward feature information output by the encoder respectively; The forward feature information and the backward feature information are processed by a Softmax activation function to obtain ship behavior features; the BIGRU-based ship behavior feature extraction module includes an encoder and a decoder, and the decoder is used to receive the ship behavior features.
[0010] Furthermore, the calculation formula of the forward feature information is: Forward feature information GRU: ; In the formula, the subscript f represents the forward direction, is the forward hidden state at time t, is the activation function, is the forward weight matrix input to the hidden state, For input, is the forward weight matrix from hidden state to hidden state, is the forward hidden state at time t-1, is the forward bias matrix.
[0011] Furthermore, the calculation formula of the backward feature information is: Backward feature information GRU: ; In the formula, the subscript b indicates backward, is the backward hidden state at time t, is the backward weight matrix input to the hidden state, is the backward weight matrix from hidden state to hidden state, is the backward hidden state at time t+1, is the backward bias matrix.
[0012] Furthermore, the calculation formula of the ship behavior characteristics is: ; In the formula, is the behavior characteristic of the ship at time t, is the weight matrix at time t, is the weight matrix at time t, is the bias matrix at time t.
[0013] Furthermore, the step of inputting the environmental data into a second feature processing prediction module to obtain a prediction result of the environmental data surrounding the ship includes: Associating the environmental data with the AIS data to form multimodal data; The environmental factor feature extraction module is used to extract the environmental factor features from the associated multimodal data; The extracted environmental factor features are input into the second fully connected layer to obtain the prediction results of the ship's surrounding environment data.
[0014] Furthermore, the pre-processed AIS data, the environmental data and the ship trajectory fusion prediction data are used to train a preset ship trajectory prediction model to obtain a trained ship trajectory prediction model, including: The pre-processed AIS data and the ship trajectory fusion prediction data are input into the BIGRU-based ship behavior feature extraction module, and the environmental data and the ship trajectory fusion prediction data are input into the environmental factor feature extraction module for training respectively to obtain a trained ship trajectory prediction model.
[0015] (III) Beneficial effects The present invention provides a ship trajectory prediction method combining ship behavior and environmental factors. The method takes into account the influence of the strong monsoon and other characteristics of the deep sea wind farm environment on the ship trajectory. Therefore, the ship trajectory prediction is performed by combining the ship behavior characteristics and the deep sea wind farm environment characteristics. First, the AIS data and environmental data are obtained respectively through the ship automatic identification system, and two feature processing prediction modules are designed to extract the features of the AIS data and environmental data respectively. Finally, a fusion feature module is used to generate ship trajectory fusion prediction data, and then the pre-processed AIS data, environmental data and ship trajectory fusion prediction data are used to train the preset ship trajectory prediction model to obtain the trained ship trajectory prediction model, and finally the ship trajectory prediction is performed by the trained ship trajectory prediction model. The present invention aims to establish a more accurate ship trajectory prediction model by comprehensively analyzing the complex factors such as the behavior characteristics of the ship and the marine environment, so as to effectively improve the accuracy and reliability of the ship trajectory prediction. The present invention can process high-dimensional and nonlinear data; has a strong learning ability, can capture the complex dynamic characteristics of ship motion; has low model complexity and running time cost; can adapt to complex and changeable marine environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a ship trajectory prediction method combining ship behavior and environmental factors of the present invention; Figure 2 Schematic diagram of the overall architecture of the preset ship trajectory prediction model of the embodiment of the present invention; Figure 3 AIS data preprocessing flow chart of an embodiment of the present invention; Figure 4 It is a flow chart of ship behavior clustering; Figure 5 This is a schematic diagram of the ship behavior feature extraction module based on Bi-GRU; Figure 6 This is a schematic diagram of the Bi-GRU structure; Figure 7 This is a schematic diagram of the environmental factor feature extraction module; Figure 8 This is a schematic diagram of the focal decomposition network (FDNet) structure; Fig. 9 Schematic diagram of the focus decomposition feature extraction layer structure. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.
[0018] like Figure 1 As shown, the present invention provides a ship trajectory prediction method combining ship behavior and environmental factors, in which a trajectory prediction network model based on ship behavior and environmental influence is constructed, such as Figure 2 As shown in the figure, the architecture designs two channels (AIS data feature extraction channel and environmental data feature extraction channel) to preprocess and extract the collected ship AIS data features and environmental features respectively. Finally, a fusion feature module is used to fuse the features of the two channels and predict the future ship trajectory data. The method specifically includes: S101, obtain AIS data and environmental data respectively through the ship automatic identification system. AIS data is ship navigation data. AIS is the ship automatic identification system, which refers to a new navigation aid system used for maritime safety and communication between ships and shores, and between ships. It is usually composed of a VHF communicator, a GPS locator, and a communication controller connected to a ship-borne display and sensors, etc., which can automatically exchange important information such as ship position, speed, heading, ship name, call sign, etc. The AIS installed on the ship not only sends this information to the outside, but also receives information from other ships within the VHF coverage range, thereby realizing automatic response; S102, the AIS data is input into a first feature processing prediction module to obtain the pre-processed AIS data and the data prediction result of the ship behavior. The first feature processing prediction module (AIS data feature extraction channel) is as follows: Figure 2 As shown, it includes an AIS data preprocessing module, a ship behavior clustering module, a BIGRU-based ship behavior feature extraction module and a first fully connected layer, where BIGRU (Bidirectional Gate Recurrent Unit) is based on a bidirectional gated recurrent unit; S103, inputting the environmental data into a second feature processing prediction module to obtain a prediction result of the environmental data around the ship. The second feature processing prediction module (environmental data feature extraction channel) is as follows: Figure 2 As shown, it includes environmental factor data preprocessing associated with AIS, an environmental factor feature extraction module and a second connection layer, wherein the model used by the environmental factor feature extraction module is a focal decomposition network; S104, inputting the data prediction result of the ship behavior and the prediction result of the ship surrounding environment data into a fusion feature module to generate ship trajectory fusion prediction data; S105, training a preset ship trajectory prediction model using the preprocessed AIS data, the environmental data and the ship trajectory fusion prediction data to obtain a trained ship trajectory prediction model, wherein the preset ship trajectory prediction model includes a first feature processing prediction module, a second feature processing prediction module and a fusion feature module; S106, using the trained ship trajectory prediction model to predict the ship trajectory.
[0019] Furthermore, in S101, AIS data and environmental data are obtained respectively through the ship automatic identification system, and the AIS data is the ship navigation data, such as Figure 2 As shown, the AIS data includes the ship's sailing time, longitude, latitude, ground speed and ground course, etc., and the environmental data includes the ship's sailing time, longitude, latitude, wind speed, visibility and temperature, etc.
[0020] Furthermore, in S102, the AIS data is input into a first feature processing prediction module to obtain a data prediction result of the ship behavior, which specifically includes: 1) Preprocessing the AIS data through the AIS data preprocessing module to obtain preprocessed AIS data; in this process, the acquired AIS data needs to be preprocessed to improve the accuracy of the AIS data. The specific process is as follows: Figure 3 As shown in the figure. The collected AIS data are prone to a large number of missing, duplicate and randomly scattered outliers, mainly due to factors such as communication delays in the AIS system and external weather interference. Therefore, preprocessing the raw data is the key to enhancing the stability of the model and improving the accuracy of ship trajectory feature extraction. First, the rows containing missing values and duplicate data are removed from the original dataset to reduce the data volume and improve data processing efficiency. In order to solve the missing values in the original AIS data, linear interpolation is used to fill the gaps, thereby retaining the movement trend and pattern of the original trajectory. For random outliers, the following methods are used to eliminate them: (1) The ship position information should be limited to 90 degrees north and south latitude and 180 degrees east longitude. Data outside this range is considered an outlier; (2) Navigation safety requires the regulation of ship speed through various regulations, including the International Convention for Safety of Life at Sea (SOLAS), which stipulates that the maximum allowable speed is less than 30 knots; (3) Based on navigation parameters, the trajectory of the ship in a relatively static state, such as anchoring or mooring, is excluded.
[0021] 2) Input the pre-processed AIS data into the ship behavior clustering module to obtain the clustering results of ship behavior. The specific steps of this process are as follows: 2.1. Extracting ship trajectory sets from preprocessed AIS data; 2.2. Traverse the ship trajectory set and determine whether it needs to be processed to obtain ship trajectory data that meets the requirements; 2.3. compressing the ship trajectory data by using a DP compression algorithm; 2.4. After compression is completed, the Hausdorff similarity matrix is calculated according to the Hausdorff distance; 2.5. Use the HDBSCAN clustering method to cluster the Hausdorff similarity matrix and obtain the optimal clustering result; DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based spatial clustering algorithm. The algorithm divides areas with sufficient density into clusters and finds clusters of arbitrary shapes in a spatial database with noise. It defines a cluster as the largest set of density-connected points. The HDBSCAN clustering method processing process is as follows: The minimum spanning tree and clustering hierarchy are established based on the Hausdorff similarity matrix. Traverse and compress the clustering hierarchy to obtain multiple clustering results; Selecting a clustering result with the best stability from the multiple clustering results; 2.6. Based on the optimal clustering results, the clustering results of ship behaviors are obtained by screening according to the comprehensive clustering performance indicators.
[0022] Combine the following Figure 4 , the ship behavior clustering step in the above 2) step is specifically described as follows: The clustering steps under the AIS data feature extraction channel are as follows: In maritime traffic research, ship behavior reflects the movement pattern and law of the "ship group". Identifying and modeling ship behavior helps to predict ship navigation intentions. The specific process of clustering ship behavior is as follows: Figure 4 As shown, the core of this paper is the Douglas-Peucker (DP) compression algorithm, the calculation of the Hausdorff distance matrix and its similarity matrix, and the Hierarchical Density-Based Spatial Clustering of Applications with Noise (HDBSCAN) algorithm.
[0023] First, extract the ship trajectory set from the preprocessed AIS data. Use Mercator coordinate transformation to traverse the ship trajectory set and determine whether trimming is required. First, traverse all j AIS data of the i-th ship. P(j) is the j-th data, which includes mmsi (Maritime Mobile Service Identity), longitude and latitude, and time. Then, check the time span between the two adjacent ais data. If it is greater than the set value, trajectory trimming is required. If it is not greater than the set value, further judge whether j + 1 = n. If so, enter the DP algorithm. If not, calculate j = j + 1 and enter the next loop. After entering the DP algorithm, continue to judge whether i = N. If so, after compression, calculate the Hausdorff similarity matrix according to the Hausdorff distance. If not, calculate i = i + 1 and enter the Mercator coordinate transformation loop. Figure 4 In this context, n represents the total number of a ship trajectory set P(j), and N represents the total number of all ships.
[0024] Specifically, the DP compression algorithm can compress ship trajectory data and improve the calculation efficiency without losing important features. The steps of this algorithm are as follows: First, connect the starting point and the ending point of the trajectory curve to form a straight line Y = Ax + By + C. Second, for all points P(xi, yi) on the curve except the start and end points, calculate their distances to the straight line Y. The calculation formula is as follows: ; (1) In formula (1), A, B, and C are the coefficients in the straight line equation, xi and yi are the abscissa and ordinate of the point, and d in formula (1) is the distance from this point to this straight line. Compare the maximum value MAX in the calculated distance data with the preset value D. D is a threshold set manually to control the accuracy of the algorithm for compressing the trajectory. If MAX < D, then all points on the curve except the start and end points can be discarded, and the curve is approximated as the straight line Y. If MAX > D, then retain the point P corresponding to the maximum value MAX. Divide the curve into two parts with point P as the demarcation point, and repeat the above steps for these two parts. In this step, the larger D is, the closer the compressed trajectory is to a straight line; the smaller D is, the closer the compressed trajectory is to the original shape. Finally, repeat the calculation of the distance and compare and screen it with the preset value D until the maximum value MAX of the distance of all segments of the curve is less than the threshold D, or the curve can no longer be further divided. After compression, calculate the Hausdorff similarity matrix according to the Hausdorff distance. The Hausdorff distance is the distance between two subsets in a metric space. It transforms the non-empty subsets of the metric space itself into a metric space. The calculation formula of the Hausdorff distance is: In formulas (2), (3), and (4), represents trajectories A and B. and Represent the points in trajectory A and trajectory B respectively. In the example above, we first calculate for any point on trajectory A The minimum distance to all points on trajectory B, and then take all points The maximum value of the distance generated; in h(trajB,trajA), first calculate for any point on trajectory B The minimum distance to all points on trajectory A, and then take all points The maximum value among the resulting distances. is the Hausdorff distance, taking the maximum of the above two.
[0025] The similarity function used to calculate the similarity matrix is as follows: In formula (5) and formula (6), and is the mean of the Hausdorff distances between trajectory i, j and other trajectories, represents the element in the i-th row and j-th column of the matrix A (A refers to the similarity matrix), S is the similarity between the i-th trajectory and the j-th trajectory, e is a constant, n in formula (5) is the total number of trajectories, and d in formula (6) is the Hausdorff distance between the i-th trajectory and the j-th trajectory.
[0026] In addition, it is worth noting that from the perspective of "ship groups", the HDBSCAN clustering method is used to perform cluster analysis on the kinematic characteristics of the historical trajectory point set in the same waters (latitude and longitude, ground heading, ground speed, etc.). Specifically, HDBSCAN includes three steps: establishing a minimum spanning tree and a clustering hierarchy, traversing and compressing the clustering hierarchy, and screening the clustering results with the best stability. In this clustering process, the clustering hierarchy is used to gradually merge all data into multiple clustering results. This process can be visualized using a dendrogram and a clustering tree. The algorithm improves the DBSCAN algorithm by introducing a hierarchical clustering structure and using a stability function to adaptively determine the clustering radius threshold, thereby minimizing the impact of user input. The stability function formula used is as follows ( represents the stability score of data point p, represents the size of the cluster with data point p as the core, represents the set of all other data points that belong to the same cluster as data point p): ; (7) In formula (7), the overall meaning of the denominator is: For data points For a point in the set of all other data points in the same cluster, calculate all size(q), that is, the size of the cluster with data point q as the core, and take the maximum value from them. Compared with the traditional DBSCAN algorithm, the HDBSCAN algorithm improves the efficiency and performance of ship trajectory clustering. After clustering, discrete ship semantic behavior words and continuous ship semantic behavior words are constructed according to the clustering results to realize the recognition and modeling of ship semantic behavior, laying the foundation for subsequent trajectory classification prediction.
[0027] 3) Using the BIGRU-based ship behavior feature extraction module to extract features from the clustering results of the ship behavior to obtain ship behavior features, this step specifically includes: Inputting the clustering result of the ship behavior into the encoder for forward operation and backward operation respectively, and obtaining forward feature information and backward feature information output by the encoder respectively; After the forward feature information and the backward feature information are processed by the Softmax activation function, the ship behavior feature is obtained; the ship behavior feature extraction module based on BIGRU includes an encoder and a decoder, and the decoder is used to receive the ship behavior feature. The calculation formula of the forward feature information is: Forward feature information GRU: ; (8) In the formula, the subscript f represents the forward direction, is the forward hidden state at time t, is the activation function, is the forward weight matrix input to the hidden state, For input, is the forward weight matrix from hidden state to hidden state, is the forward hidden state at time t-1, is the forward bias matrix.
[0028] Furthermore, the calculation formula of the backward feature information is: Backward feature information GRU: ; (9) In the formula, the subscript b indicates backward, is the backward hidden state at time t, is the backward weight matrix input to the hidden state, is the backward weight matrix from hidden state to hidden state, is the backward hidden state at time t+1, is the backward bias matrix.
[0029] Furthermore, the calculation formula of the ship behavior characteristics is: ; (10) In the formula, is the behavior characteristic of the ship at time t, is the weight matrix at time t, is the weight matrix at time t, is the bias matrix at time t.
[0030] Combine the following Figure 5 and Figure 6 Describe the above step 3) in detail: The Bi-GRU-based ship behavior feature extraction module under the AIS data feature extraction channel is as follows: Figure 5 shown. Figure 5 In , a is the softmax activation function. a and the previous softmax are the same process. a refers to the result after the softmax activation function. c is the tanh activation function. The h in the encoder with a right arrow is the forward feature information GRU output, and the h with a left arrow is the backward feature information GRU output. The y1 in the decoder represents the prediction result corresponding to x. It is input together with x when training the model. When training the model, y1 is input to MLP, and then the output information of the input encoder is fused, and finally output to the output layer MLP to obtain the final prediction result. This module uses an encoder-decoder structure to extract classification features for clustered ships. The encoder is mainly based on BiGRU and multi-layer perceptron (MLP). The input layer is MLP, which can adapt to data inputs of different types and structures, and can easily expand the data structure that has processed more complex features. The specific formula is as follows: ; (11) ; (12) ; (13) in, It is Layer The weighted input of each neuron, It is Layer Neuron to Layer The weight of the neuron, It is Layer The output of a neuron, It is Layer The bias of a neuron, represents the Sigmoid function, is the weighted input, It is Layer The output of each neuron, formula (11)-(13) is the preprocessing process after the data is input into MLP in the decoder.
[0031] The preprocessed data is input into MLP for normalization and standardization, and helps the subsequent neural network learn useful features to improve model performance. The BiGRU is used to extract ship behavior features from the input layer data.
[0032] It is worth noting that the internal framework of the model adopts BiGRU to prevent the feature loss problem caused by ordinary GRU, where most of the previous state vectors may be forgotten when predicting large cycles. The structure of BiGRU is as follows Figure 6 The specific formula is as follows (the subscripts f and b represent forward and backward, respectively. Figure 6 , forward is a right arrow, backward is a left arrow): Forward feature information GRU: ; (8) Figure 6 The output of the middle and lower layers is , the calculation formula is as follows: ; (18) In equations (8) and (18), the subscript f represents the forward direction. is the forward hidden state at time t-1, is the forward hidden state at time t, is the forward hidden state at time t+1, is the activation function, is the forward weight matrix input to the hidden state, and For input, is the forward weight matrix from hidden state to hidden state, is the forward bias matrix.
[0033] Backward feature information GRU: ; (9) Figure 6 The upper-middle input is , the calculation formula is as follows: ; (19) In equations (9) and (19), the subscript b indicates backward. is the backward hidden state at time t-1, is the backward hidden state at time t, is the backward hidden state at time t+1, is the backward weight matrix input to the hidden state, is the backward weight matrix from hidden state to hidden state, is the backward bias matrix.
[0034] Output of BiGRU: ; (10) In the formula, is the behavior characteristic of the ship at time t, is the weight matrix at time t, is the weight matrix at time t, is the bias matrix at time t.
[0035] The forward (forward) and reverse feature information (backward) output by the BiGRU in the encoder are processed by the Softmax activation function and input into the GRU module of the decoding layer. The specific formula of the Softmax activation function is as follows: ; (14) in, is the first The final ship behavior characteristics are decoded and output through the decoding layer.
[0036] 4) Use the first fully connected layer to normalize the ship behavior features to obtain the data prediction results of the ship behavior. In this step, the first fully connected layer finally integrates the output of the decoder through linear transformation and maps the feature vector to the feature fusion module. The specific formula is as follows (x is the input vector, W is the weight matrix, b is the bias vector, and y is the output vector): ; (15) In formula (15), W and b are independent parameters in the feature fusion module, which are different from the parameters mentioned above.
[0037] Furthermore, in S103, the environmental data is input into a second feature processing prediction module to obtain a prediction result of the environmental data surrounding the ship, including: Associating the environmental data with the AIS data to form multimodal data; The environmental factor feature extraction module is used to extract the environmental factor features from the associated multimodal data; The extracted environmental factor features are input into the second fully connected layer to obtain the prediction results of the ship's surrounding environment data.
[0038] Combine the following Figure 2The second feature processing prediction module part specifically explains the above steps: considering the construction of deep-sea wind farms near the East China Sea of China and the great influence of environmental factors such as ocean currents, wind speed, and temperature on ship navigation, it is necessary to include this factor in the consideration scope of the trajectory prediction task. This module includes three submodules: environmental factor data preprocessing associated with AIS, environmental factor feature extraction module, and the second fully connected layer. The reason for data preprocessing is that the original AIS data does not contain environmental factors and needs to be effectively associated. Therefore, the present invention uses the nearest distance and shortest distance methods to associate AIS and environmental information. First, for each AIS data point, the closest environmental information cluster is selected from the environmental data set according to the timestamp (the timestamp belongs to a dynamic information of the ship, which can be updated in real time to reflect the current state of the ship and the trajectory of movement) field to achieve the purpose of filtering. Secondly, the environmental data closest to the AIS data is selected from the filtered environmental information cluster. Finally, the filtered environmental data is combined with the AIS data to form multimodal original data containing AIS data and environmental data. The processed data is input into the environmental factor feature extraction module for environmental factor feature extraction.
[0039] The overall architecture of the environmental factor feature extraction module is as follows: Figure 7 As shown in the figure, the model used in this module is the Focal Decomposed Network (FDNet). The overall structure of the FDNet system is mainly composed of linear projection layers, where the first layer is the embedding layer, the last layer is the projection output layer, and the remaining intermediate layers are focal decomposition feature extraction layers. The specific schematic diagram is shown in Figure 7 As shown in Figure 2, each focus decomposition feature extraction module contains 4 convolutional layers, combined with Figure 8 and Fig. 9 Specific instructions ( Figure 8 This is a schematic diagram of the FDNet structure. Fig. 9 for Figure 8 Figure 1 shows the structure of the focal decomposition feature extraction layer in Figure 1). The odd-numbered layers are 1×1 convolutional layers, which have the same function as the perceptron. Suppose there is an input feature map I with dimensions (H, W, C), where H is the height, W is the width, and C is the number of channels. A 1×1 convolution kernel K is used with dimensions (1, 1, C, C′), where C is the number of input channels and C′ is the number of output channels. Figure 8 In the above formula, Lin and V represent the length and width of the input feature matrix respectively. The D×D weight matrix refers to the multiplication of the weight matrix with a length and a width of D respectively. The weight normalization part refers to the weight normalization, GELU activation function, and residual link operations. xN means that the focus decomposition feature extraction layer is repeated N times. Fig. 9 There are 4 convolutional layers in the focal decomposition feature extraction layer. The odd-numbered layers perform 1x1 convolutions, and the even-numbered layers perform 3x1 convolutions. Fig. 9 B refers to batch, that is, the number of feature maps in this batch, p=(1,0) means increasing the height of the matrix by 1 and the width by 0, that is, adding a row of 0 elements before the first row of the matrix. The formula for the convolution operation can be expressed as: ; (16) In Equation (16), O(i,j,k) is the value of the output feature map at position (i,j) and channel k, I(i,j,m) is the value of the input feature map at position (i,j) and channel m, and K(0,0,m,k) is the weight of the convolution kernel at position (0,0) and input channel m to output channel k. Except for the last projection layer, two-dimensional convolution is used, where the two dimensions correspond to the time dimension and the variable dimension, respectively, instead of the commonly used one-dimensional convolution. The kernel size of the variable dimension will always be 1 to ensure that the element values of different variables do not affect each other. This approach is driven by variable-specific prediction methods that treat sequences from different variables as different instances. Sequences of different variables have different properties from each other in reality. However, for prediction conditions with hundreds of variables, it is very expensive to adopt different projection matrices for different variables. FDNet does not mix the values of different variables, but gives them the same weight matrix through a specific two-dimensional convolution. Since pure element-wise feature extraction of input elements makes the model vulnerable to outliers, the even layers are 3×1 convolution layers. Assume there is an input feature map I with dimensions (H, W, C), where H is the height, W is the width, and C is the number of channels. Use a 1x1 convolution kernel K with dimensions (3, 1, C, C′), where C is the number of input channels and C′ is the number of output channels. The formula for the convolution operation can be expressed as: ; (17) In formula (17), O(i,j,k) is the value of the output feature map at position (i,j) and channel k, I(i+m,j+n,m) is the value of the input feature map at position (i+m,j+n) and channel m, and K(n,m,k) is the weight of the convolution kernel at position (n,m) and input channel m to output channel k. The stride of the convolution layer used here is only 1 to enhance locality and smooth abnormalities. In addition, multiple convolutions will only make the receptive field of the input element contain very few neighboring elements, which still ensures the local fine-grained feature extraction of the input sequence. Therefore, the features of elements extracted from different variables and timestamps are decomposed in FDNet. Finally, the feature maps of different variables are flattened separately, and a one-dimensional convolution layer with a kernel size of 1 is used to extract separate features for different variables. It can be seen that due to this final output design, increasing the length of the input feature will only lead to an increase in the parameters of this one-dimensional convolution layer. Therefore, unlike many other methods, FDNet does not suffer from a non-negligible parameter explosion as the length of the feature increases. The second fully connected layer has the same function as the first fully connected layer in the ship behavior feature extraction module. After integrating the output features of the above network, it is passed to the feature fusion module.
[0040] Finally, the feature fusion module combines the ship behavior and environmental factors to jointly predict the future ship trajectory by adding the two output tensors element by element.
[0041] S105, using the pre-processed AIS data, the environmental data and the ship trajectory fusion prediction data to train a preset ship trajectory prediction model to obtain a trained ship trajectory prediction model, the preset ship trajectory prediction model includes a first feature processing prediction module, a second feature processing prediction module and a fusion feature module; this step specifically includes: The pre-processed AIS data and the ship trajectory fusion prediction data are input into the BIGRU-based ship behavior feature extraction module, and the environmental data and the ship trajectory fusion prediction data are input into the environmental factor feature extraction module for training respectively to obtain a trained ship trajectory prediction model; during the training process: The pre-processed AIS data and the ship trajectory fusion prediction data are input into the BIGRU-based ship behavior feature extraction module, and then pass through the first fully connected layer to obtain a new data prediction result of the ship behavior; The environmental data and the ship trajectory fusion prediction data are input into the environmental factor feature extraction module, and then passed through the second fully connected layer to obtain a new prediction result of the ship's surrounding environment data; Finally, according to the prediction results of new ship behavior data and new ship surrounding environment data, the parameters inside the preset model are continuously adjusted and optimized to obtain the trained ship trajectory prediction model.
[0042] S106, using the trained ship trajectory prediction model to predict the ship trajectory. In this step, the real-time AIS data and environmental data are input into the trained ship trajectory prediction model, and inside the model: firstly, the real-time data prediction data of the ship behavior and the real-time prediction data of the ship's surrounding environment data are generated respectively, and then the real-time data prediction data of the ship behavior and the real-time prediction data of the ship's surrounding environment data are fused to obtain the real-time prediction result of the ship's trajectory.
[0043] The present invention provides a ship trajectory prediction method that combines ship behavior and environmental factors. The method takes into account the impact of strong monsoons and other characteristics of deep-sea wind farm environments on ship trajectories, and predicts ship trajectories by combining ship behavior characteristics with deep-sea wind farm environmental characteristics. The present invention particularly considers the site selection of deep-sea wind farms near the East China Sea of China and the dynamic impact of ocean currents, wind speeds, temperatures, etc. on ship navigation, further improving the accuracy and reliability of predictions. The present invention has the following advantages: 1. The present invention combines the clustering algorithm with the deep learning algorithm, uses the HDBSCAN algorithm to cluster the ship's navigation trajectory, and then extracts the ship behavior characteristics based on BiGRU, which can make corresponding predictions for ship behaviors of different categories. The present invention uses the HDBSCAN algorithm instead of the DBSCAN algorithm to cluster the ship behavior (speed, heading, collision avoidance strategy, etc.) information contained in the AIS data. By introducing a hierarchical clustering structure and using a stability function to adaptively determine the clustering radius threshold, the impact of user input on the clustering results is minimized, effectively improving the reliability of the prediction. The designed BiGRU-based encoding-decoding structure module extracts ship behavior characteristics. Compared with ordinary BiGRU, it can process sequences of variable lengths and capture contextual information, and can extract ship behavior characteristics at a deeper level; 2. Use the focus decomposition network (FDNet) to extract environmental features from the collected environmental data, and innovatively integrate the environmental features with the characteristics of ship behavior (speed, heading, collision avoidance strategy, etc.) to obtain prediction results that take into account both the static trend of ship navigation and the dynamic impact of the environment; the present invention also takes into account the impact of complex environmental factors near deep-sea wind farms on ship trajectories, such as strong monsoons, ocean currents and tides, and uses the focus decomposition network (FDNet) to extract environmental data features. Its performance and operating time complexity are better than existing deep learning algorithms. The advantage of using FDNet to extract environmental features is that FDNet's performance is better than the most advanced model based on the attention mechanism, and thanks to its internal linear projection mechanism, the time complexity is significantly reduced, effectively improving the operating efficiency; 3. Finally, the AIS data features and environmental data features are combined to predict the ship trajectory in the future, further ensuring the accuracy and reliability of the ship trajectory prediction.
[0044] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.
Claims
1. A ship trajectory prediction method combining ship behavior and environmental factors, characterized in that: include: Obtain AIS data and environmental data respectively through the ship automatic identification system; Inputting the AIS data into a first feature processing prediction module to obtain pre-processed AIS data and data prediction results of ship behavior; Inputting the environmental data into a second feature processing prediction module to obtain a prediction result of the environmental data surrounding the ship; Inputting the data prediction results of the ship behavior and the prediction results of the ship surrounding environment data into a fusion feature module to generate ship trajectory fusion prediction data; The preset ship trajectory prediction model is trained using the preprocessed AIS data, the environmental data and the ship trajectory fusion prediction data to obtain a trained ship trajectory prediction model, wherein the preset ship trajectory prediction model includes a first feature processing prediction module, a second feature processing prediction module and a fusion feature module; The trained ship trajectory prediction model is used to predict the ship trajectory.
2. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 1 is characterized in that: The first feature processing prediction module includes an AIS data preprocessing module, a ship behavior clustering module, a BIGRU-based ship behavior feature extraction module and a first fully connected layer, which are connected in sequence.
3. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 2, characterized in that: The step of inputting the AIS data into a first feature processing prediction module to obtain a data prediction result of the ship behavior comprises the following steps: Preprocessing the AIS data by the AIS data preprocessing module to obtain preprocessed AIS data; Inputting the preprocessed AIS data into the ship behavior clustering module to obtain a clustering result of the ship behavior; Using the BIGRU-based ship behavior feature extraction module, feature extraction is performed on the clustering results of the ship behavior to obtain ship behavior features; The first fully connected layer is used to normalize the ship behavior characteristics to obtain a data prediction result of the ship behavior.
4. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 3 is characterized in that: The step of inputting the pre-processed AIS data into the ship behavior clustering module to obtain a clustering result of the ship behavior includes: Extracting ship track sets from preprocessed AIS data; Traversing the ship trajectory set and determining whether processing is required to obtain ship trajectory data that meets the requirements; Compressing the ship trajectory data by using a DP compression algorithm; After compression is completed, the Hausdorff similarity matrix is calculated based on the Hausdorff distance; The HDBSCAN clustering method is used to cluster the Hausdorff similarity matrix and obtain the optimal clustering result; Based on the optimal clustering result, the clustering result of ship behavior is obtained by screening according to the comprehensive clustering performance index.
5. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 4 is characterized in that: The HDBSCAN clustering method processing process is as follows: The minimum spanning tree and clustering hierarchy are established based on the Hausdorff similarity matrix. Traverse and compress the clustering hierarchy to obtain multiple clustering results; A clustering result with the best stability is selected from the multiple clustering results.
6. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 2, characterized in that: The adopting the BIGRU-based ship behavior feature extraction module to extract features from the clustering results of the ship behavior to obtain ship behavior features includes the following steps: Inputting the clustering result of the ship behavior into the encoder for forward operation and backward operation respectively, and obtaining forward feature information and backward feature information output by the encoder respectively; The forward feature information and the backward feature information are processed by a Softmax activation function to obtain ship behavior features; the BIGRU-based ship behavior feature extraction module includes an encoder and a decoder, and the decoder is used to receive the ship behavior features.
7. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 6, characterized in that: The calculation formula of the forward feature information is: Forward feature information GRU: ; In the formula, the subscript f represents the forward direction, is the forward hidden state at time t, is the activation function, is the forward weight matrix input to the hidden state, For input, is the forward weight matrix from hidden state to hidden state, is the forward hidden state at time t-1, is the forward bias matrix.
8. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 7, characterized in that: The calculation formula of the backward feature information is: Backward feature information GRU: ; In the formula, the subscript b indicates backward, is the backward hidden state at time t, is the backward weight matrix input to the hidden state, is the backward weight matrix from hidden state to hidden state, is the backward hidden state at time t+1, is the backward bias matrix.
9. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 8, characterized in that: The calculation formula of the ship behavior characteristics is: ; In the formula, is the behavior characteristic of the ship at time t, is the weight matrix at time t, is the weight matrix at time t, is the bias matrix at time t.
10. The ship trajectory prediction method combining ship behavior and environmental factors according to claim 1, characterized in that: The step of inputting the environmental data into a second feature processing prediction module to obtain a prediction result of the environmental data surrounding the ship comprises: Associating the environmental data with the AIS data to form multimodal data; The environmental factor feature extraction module is used to extract the environmental factor features from the associated multimodal data; The extracted environmental factor features are input into the second fully connected layer to obtain the prediction results of the ship's surrounding environment data.
Citation Information
Patent Citations
AIS-based overwater intelligent monitoring management method and system
CN111739345A
Logistics distribution center site selection method and system based on HDBSCAN
CN114841637A
AIS data-based inland river unmanned ship route extraction method and system
CN117218897A
Multimode converter with soft switching
KR1020220152792A