Ship Fusion Trajectory Prediction Method Driven by Deep - sea Wind Farm Coordinates
By using GRU network and deep-sea wind farm coordinate information in ship trajectory prediction, the limitations of existing methods in leveraging complex data and processing timing relationships are solved, and more accurate and safe ship trajectory prediction is achieved.
Patent Information
- Application Number
- CN202510363290.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-26
AI Technical Summary
Existing ship trajectory prediction methods are difficult to make full use of complex ship trajectory data and wind farm information in deep-sea environments, resulting in low prediction accuracy and limitations in dealing with long-term dependencies and timing relationships.
The ship fusion trajectory prediction method driven by deep-sea wind farm coordinates is adopted, and the gated cyclic unit (GRU) is used instead of the long and short-term memory network (LSTM), and the deep-sea wind farm coordinates are included in the prediction model. Feature information is extracted through the fully connected network, and a multi-layer GRU network is input for training to generate a ship trajectory prediction model.
This method reduces the amount of network parameters, reduces the risk of overfitting, can take into account the surrounding environment of the ship more comprehensively, provide more targeted navigation suggestions and path planning, and improves the safety and efficiency of ship navigation.
Smart Images

Figure CN119940654B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of ship trajectory prediction, and particularly relates to a ship fusion trajectory prediction method driven by deep - sea wind farm coordinates. Background Art
[0002] Ship trajectory prediction technology refers to using ship historical trajectory data and other relevant information, through modeling and algorithm analysis, to predict the navigation trajectory and behavior of a ship within a certain period in the future. With the rise of deep learning, models such as recurrent neural networks (RNNs), long short - term memory networks (LSTMs), and attention mechanisms have been widely used in ship trajectory prediction, which can better capture the complex relationships and temporal information between data, thereby improving the prediction accuracy. Such methods are relatively simple in data processing and feature extraction, often only considering basic information such as the position and speed of the ship. However, in reality, ship trajectory data may contain more complex information and features, such as the navigation intention, navigation mode, and ship type of the ship, and these information are crucial for more accurately predicting the ship trajectory. Traditional methods often cannot fully mine and utilize these information, resulting in low prediction accuracy. In addition, these methods have limitations in dealing with long - term dependencies and temporal relationships. Ship trajectory data has obvious temporal characteristics. The current position and speed of a ship are often affected by the previous moment or even earlier moments. Statistical models in traditional methods are difficult to effectively capture this temporal relationship, resulting in inaccurate and incoherent predictions of the future development of the ship trajectory.
[0003] LSTM (Long Short - Term Memory network) is a variant of the recurrent neural network (RNN), aiming to solve the problems of gradient vanishing and gradient explosion that occur when traditional RNNs process long - sequence data. Although the design of LSTM enables it to better capture long - term dependencies, compared with traditional RNNs, the structure of the LSTM network is more complex, including key components such as input gates, forget gates, and output gates. This complexity often leads to the need for more computing resources and training time in some cases, increasing the complexity of the model and the challenges of training. On the other hand, since LSTM contains more gating units internally, it means that the network needs to store and update more information in its internal memory units. This may lead to the risk of overfitting in some short - sequence tasks or cases with weak data correlations, because its complexity may make it more likely to overfit to a small amount of data.
[0004] In the deep - sea environment, the increasing number of wind farms poses new challenges to ship navigation. Since ships need to avoid these wind farms in a timely manner to ensure navigation safety. In this context, it is crucial to consider the location and layout of deep - sea wind farms and incorporate these factors into the trajectory prediction model. However, current trajectory prediction methods have some deficiencies in dealing with wind farm factors. Existing methods usually tend to regard trajectory prediction as a simple spatio - temporal sequence problem, ignoring the influence of special features such as wind farms in the deep - sea environment on the ship's movement trajectory. This way of simplifying the model may lead to the ship being unable to effectively respond to the presence of wind farms during actual navigation, thus increasing the potential collision risk. Additionally, existing methods often lack sufficient refinement and real - time performance when considering wind farm factors. The layout of deep - sea wind farms may change over time and environmental conditions, while current models often have difficulty updating this information in a timely manner, resulting in inaccurate or untimely prediction results. Summary of the Invention
[0005] (I) Object of the Invention
[0006] The object of the present invention is to provide a ship fusion trajectory prediction method driven by deep - sea wind farm coordinates. By using a gated recurrent unit (GRU) to replace the long short - term memory network (LSTM) and incorporating deep - sea wind farm coordinates into the considerations of ship trajectory prediction, this design not only reduces the number of network parameters and the risk of overfitting, but also can more comprehensively consider the situation of the ship's surrounding environment, provide more targeted navigation suggestions and path planning for the ship, and improve the safety and efficiency of ship navigation.
[0007] (II) Technical Solution
[0008] To solve the above problems, the present invention provides a ship fusion trajectory prediction method driven by deep - sea wind farm coordinates, and the method includes:
[0009] Obtain standard AIS data, where the standard AIS data includes ship latitude and longitude coordinates and heading data; the heading data includes the heading of the ship;
[0010] Calculate the wind farm repulsive force according to the ship's latitude and longitude coordinates and the wind farm coordinates;
[0011] Calculate the wind farm angle factor according to the heading data and the angle formed by the ship's heading and the direction of the wind farm;
[0012] Use a first fully - connected network to extract features from the ship's latitude and longitude coordinates to obtain the position encoding of the ship at the corresponding moment;
[0013] Use a second fully - connected network to extract features from the wind farm repulsive force and the wind farm angle factor to obtain the feature vector of the ship and the wind farm;
[0014] Train a preset ship trajectory prediction model using the position encoding of the ship at the corresponding moment, the feature vectors of the ship and the wind farm, and the output data of the hidden state at the previous moment to obtain a trained ship trajectory prediction model; the preset ship trajectory prediction model includes a multi-layer GRU network;
[0015] Use the trained ship trajectory prediction model to predict the ship trajectory.
[0016] Further, before calculating the wind farm repulsive force according to the ship's longitude and latitude coordinates and the wind farm coordinates, it also includes judging whether to introduce the wind farm coordinates based on the actual distance between the ship and the surrounding wind farms. The calculation formula for the wind farm repulsive force is as follows:
[0017] ;
[0018] In the formula, is an exponential function, and are two positive constants, represents the distance between the ship and the wind farm, represents the minimum distance between the ship and the wind farm, and the distance D between the ship and the wind farm is calculated from the ship's longitude and latitude coordinates and the wind farm coordinates.
[0019] Further, it is characterized in that the calculation formula for the wind farm angle factor is as follows:
[0020] ;
[0021] In the formula, is the wind farm angle factor, , is the course vector of the ship in longitude and latitude, , are the longitude vector and latitude vector formed by the ship to the wind farm respectively, is the included angle formed by the course of the ship and the direction of the wind farm.
[0022] Further, the calculation formula for the position encoding of the ship at the corresponding moment is as follows;
[0023] ;
[0024] In the formula, is the position encoding of the ship at time t, is the ReLU non-linear activation function, is the first network training weight, , respectively represent at the The longitude and latitude of the ship at a moment.
[0025] Furthermore, it is characterized in that the calculation formula of the feature vector of the ship and the wind farm is as follows:
[0026] ;
[0027] Wherein, is the feature vector of the ship and the wind farm, is the second network training weight.
[0028] Furthermore, training the preset ship trajectory prediction model by using the position encoding of the ship at the corresponding moment, the feature vector of the ship and the wind farm, and the hidden state output data of the previous moment to obtain the trained ship trajectory prediction model includes:
[0029] Inputting the position encoding of the ship at time t , the feature vector of the ship and the wind farm and the hidden state output data of the previous moment into the first layer of GRU network to obtain the first hidden state at time t;
[0030] Inputting the position encoding of the ship at time t , the feature vector of the ship and the wind farm , the hidden state output data of the previous moment and the first hidden state at time t into the second layer of GRU network to obtain the second hidden state at time t;
[0031] Inputting the position encoding of the ship at time t , the feature vector of the ship and the wind farm , the hidden state output data of the previous moment and the second hidden state at time t into the third layer of GRU network to obtain the third hidden state at time t,
[0032] Predicting the final trajectory of the ship according to the third hidden state at time t; wherein, the multiple layers of GRU networks include the first layer of GRU network, the second layer of GRU network and the third layer of GRU network.
[0033] Furthermore, the processing process of each layer of GRU network includes:
[0034] Receiving the position encoding of the ship at time t , the feature vector of the ship and the wind farm and the hidden state output data of the previous moment ;
[0035] Encode the position of the ship at time t and the feature vectors of the ship and the wind farm and the hidden state output data of the previous time are all input into the update gate to calculate the update gate vector ;
[0036] Encode the position of the ship at time t and the hidden state output data of the previous time are all input into the reset gate to calculate the reset gate vector ,
[0037] Combine the position encoding of the ship at time t , the hidden state output data of the previous time and the reset gate vector to calculate the candidate hidden state at time t ;
[0038] According to the candidate hidden state , the update gate vector and the hidden state output data of the previous time , calculate the hidden state at time t
[0039] Furthermore, the calculation formula of the update gate vector is as follows:
[0040] ;
[0041] In the formula, is the weight matrix of the update gate, is the bias term of the update gate, is the Sigmoid activation function
[0042] Furthermore, the calculation formula of the reset gate vector is as follows:
[0043] ;
[0044] In the formula, is the weight matrix of the reset gate, is the bias term of the reset gate, is the Sigmoid activation function
[0045] Furthermore, the calculation formula of the candidate hidden state at time t is as follows:
[0046] ;
[0047] In the formula denotes element-wise multiplication, is the weight matrix of the candidate hidden state, is the bias term of the candidate hidden state, () is the hyperbolic tangent function.
[0048] (III) Beneficial effects
[0049] The present invention proposes a ship fusion trajectory prediction method driven by deep-sea wind farm coordinates, aiming to optimize the navigation path planning by combining the specific navigation characteristics of the ship, thereby improving the safety and efficiency of ship navigation. At the same time, it also has a positive effect on aspects such as maritime traffic management and monitoring. First, the ship trajectory prediction model preset in the present invention includes a multi-layer GRU network, and the gated recurrent unit (GRU) is selected to replace the long short-term memory network (LSTM). The purpose is to simplify the model structure and reduce complexity. Compared with LSTM, GRU has a simpler structure, only including an update gate and a reset gate. The concise performance of GRU reduces the number of parameters in the network, reduces the computational cost of the model, improves the training efficiency, and also helps the model to better generalize to new data, avoiding overfitting to the training data, thereby improving the robustness and generalization ability of the model. In addition, the present invention incorporates the coordinates of the deep and far sea wind farm into the considerations of ship trajectory prediction, and conducts trajectory prediction based on the distance and angle between the ship's position and the wind farm, demonstrating a more in-depth concern for maritime navigation safety and efficiency. The principle is as follows: Based on the actual distance between the ship and the surrounding wind farms, it is judged whether to introduce the wind farm coordinates. When the judgment result is that the wind farm coordinates need to be introduced, the wind farm repulsive force is calculated according to the ship's longitude and latitude coordinates and the wind farm coordinates; according to the heading data and the included angle formed by the ship's heading and the direction of the wind farm, the wind farm angle factor is calculated, and then the above data are respectively subjected to feature extraction through a fully connected network, and the corresponding results are input into a multi-layer GRU network for training to generate a trained ship trajectory prediction model. Finally, ship trajectory prediction is carried out through the trained ship trajectory prediction model. The present invention innovatively uses the position information of the wind farm and combines the relative position relationship between the ship's current position and the wind farm to further improve the accuracy and reliability of ship trajectory prediction, enabling the ship to better avoid obstacles such as wind farms in a complex maritime environment and avoid potential collision risks. By combining factors such as the ship's position, the position of the wind farm, the distance, and the angle, the situation of the ship's surrounding environment can be considered more comprehensively, providing more targeted navigation suggestions and path planning for the ship. Brief description of the drawings
[0050] Figure 1 is the flow chart of the ship fusion trajectory prediction method driven by deep-sea wind farm coordinates of the present invention;
[0051] Figure 2 is the flow chart of ship trajectory prediction in a specific embodiment of the present invention;
[0052] Figure 3 It is a schematic diagram of the GRU structure of a specific embodiment of the present invention;
[0053] Figure 4 It is the Sigmoid activation function of a specific embodiment of the present invention;
[0054] Figure 5 is Figure 2 The expanded schematic diagram of the lateral propagation (application based on time series) of the three-layer GRU network structure in Specific Embodiments
[0055] To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be 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 exemplary and are not intended to limit the scope of the present invention. In addition, in the following descriptions, the descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.
[0056] As Figure 1 shown, the present invention provides a method for predicting the integrated trajectory of a ship driven by the coordinates of a deep-sea wind farm, and the method includes the following steps:
[0057] S101. Obtain standard AIS data, where the standard AIS data includes the ship's latitude and longitude coordinates and heading data; the heading data includes the ship's heading;
[0058] S102. Calculate the wind farm repulsive force according to the ship's latitude and longitude coordinates and the wind farm coordinates;
[0059] S103. Calculate the wind farm angle factor according to the angle formed by the heading data, the ship's heading, and the direction of the wind farm;
[0060] S104. Use the first fully connected network to extract features from the ship's latitude and longitude coordinates to obtain the position encoding of the ship at the corresponding moment;
[0061] S105. Use the second fully connected network to extract features from the wind farm repulsive force and the wind farm angle factor to obtain the feature vectors of the ship and the wind farm;
[0062] S106. Use the position encoding of the ship at the corresponding moment, the feature vectors of the ship and the wind farm, and the output data of the hidden state at the previous moment to train a preset ship trajectory prediction model to obtain a trained ship trajectory prediction model; the preset ship trajectory prediction model includes a multi-layer GRU network;
[0063] S107. Use the trained ship trajectory prediction model to predict the ship trajectory.
[0064] Further, in S101, obtaining standard AIS data specifically includes: first, obtaining ship trajectory data through the AIS system, and then preprocessing the ship trajectory data to obtain standard AIS data. The standard AIS data includes ship longitude and latitude coordinates and heading data; the heading data includes the heading of the ship. In this step: The AIS system is a system for automatic information exchange between ships and between ships and shore-based facilities. In the trajectory prediction technology, ship trajectory data is usually provided by the Automatic Identification System (AIS), and these systems are installed on ships. The AIS system aims to improve the efficiency and safety of maritime traffic management. By real-time transmitting information such as the position, navigation speed, and heading of ships, ships can identify, track, and avoid collisions with each other, and at the same time, it also provides important data support for maritime monitoring and emergency rescue. In this step, the AIS system obtains ship trajectory data (i.e., ship AIS data); since there are some problems in the actual application of ship AIS data, for example, due to the lack of a complete information verification mechanism, the data may contain a large amount of error information. These error information may be caused by problems in aspects such as positioning equipment, communication facilities, and software design. These error data may interfere with the analysis of ship trajectory behavior, thus affecting the accuracy and reliability of ship trajectory prediction. Therefore, when preprocessing AIS data, it is necessary to clean and verify the data, remove abnormal and error data, so as to improve the credibility and accuracy of the data and ensure the effectiveness of subsequent analysis and modeling. For data preprocessing, we focus on collecting ship AIS data within a specific longitude and latitude area, and then perform preliminary cleaning of the data, removing non-core columns such as length, width, ship status, and date, to obtain preprocessed data (standard AIS data). The standard AIS data only retains the data tuples of five key elements: the unique identity identifier of the ship, the timestamp, longitude, latitude (longitude and latitude coordinates), and heading. Among them, the timestamp belongs to a dynamic information of the ship, and this information can be updated in real time to reflect the current state and moving trajectory of the ship. Next, in order to deeply analyze the navigation trajectory of a specific MMSI (English full name: Maritime Mobile Service Identity, which is the abbreviation of the maritime mobile service identification code used to identify ships, and this code must ensure consistency with the actual situation of the ship at all times), we perform a data redundancy removal step. By traversing the entire AIS data set, we accurately screen and extract all data records that match the MMSI. Subsequently, these records are sorted according to the order of timestamps, and data redundancy with the same time and MMSI caused by repeated system reception is identified and removed. This move aims to ensure the purity, consistency, and accuracy of the data, laying a solid and accurate data foundation for subsequent trajectory analysis and modeling work. Next, data conversion is carried out, which usually involves converting the data into a format suitable for analysis.Operations such as converting date and time fields to standard formats, converting geographic coordinates to numerical formats, and converting ship types to codes are included for subsequent analysis.
[0065] For the ship AIS data Normalize the longitude and latitude information, that is, perform a normalization operation on the longitude and latitude data in its historical records. This process aims to unify the measurement scales between different features, so that all features are numerically in the same order of magnitude, thereby accelerating the convergence speed of the neural network and helping to improve the generalization ability of the model when dealing with new data. The calculation formula is as follows:
[0066] ; (1)
[0067] In formula (1), , represents the maximum longitude and minimum longitude in the AIS data of each ship, , represents the maximum latitude and minimum latitude in the AIS data of each ship, ([[]] , ) respectively represent the longitude and latitude of the ship at the moment, ([[]] , ), ([[]] , ) are part of the standard AIS data, , are the course vectors of the ship in longitude and latitude respectively.
[0068] Furthermore, before step S102, it also includes: based on the actual distance between the ship and the surrounding wind farms, determine whether to introduce the coordinates of the wind farms, specifically including: before performing trajectory prediction, we need to screen the geographical location where the ship is located. According to the regulations on the safe driving distance of the ship, we take 15 nautical miles as the threshold for the distance between this ship and the surrounding wind farms. 15 nautical miles is equivalent to a threshold for the safe distance. If the actual distance between the ship and the wind farm is less than 15 nautical miles, then the coordinates of the wind farm are considered in this method; if the distance is greater than 15 nautical miles, then the future course of the ship will not coincide with the location of the wind farm, so the coordinates of the wind farm are excluded. The present invention mainly solves the problem of ship trajectory prediction within a range where the actual distance between the ship and the wind farm is less than 15 nautical miles.
[0069] Furthermore, in S102, calculate the wind farm repulsive force according to the ship longitude and latitude coordinates and the wind farm coordinates, specifically including:
[0070] For the wind farm coordinates, quantify the distance between the ship and the wind farm by calculating the distance from the ship, and its calculation formula is:
[0071] ; (2)
[0072] In formula (2), the distance between the ship and the wind farm,( , ) is the coordinate of the wind farm;
[0073] After calculating the distance between the ship and the wind farm , the repulsive force of the wind farm can be calculated :
[0074] ; (3)
[0075] In formula (3), is an exponential function, and are two positive constants, represents the distance between the ship and the wind farm, represents the minimum distance between the ship and the wind farm. , and The optimal selection of is usually determined by considering the ship characteristics and navigation environment of a specific water area. The purpose of constructing the wind farm repulsive force in this way is that when the distance between the ship and the wind farm is greater than , it indicates that the ship and the wind farm are within a safe distance, so there is no need to pay too much attention to the impact of the wind farm on the ship's trajectory. Therefore, an exponential function is used to reduce the impact of the wind farm repulsive force. On the contrary, if the distance between the ship and the wind farm is less than , it indicates that the ship and the wind farm are in a dangerous and collision-prone state, and then the positional relationship between the two needs to be highly concerned, and the wind farm repulsive force is increased significantly.
[0076] Furthermore, in S103, according to the heading data, the included angle formed by the heading of the ship and the direction of the wind farm, the wind farm angle factor is calculated. The design principle of this step is: in addition to calculating the repulsive force between the ship and the wind farm, it should also be noted that the positional relationship between the ship's movement direction and the wind farm, that is, the wind farm in front of the ship is more important than the wind farm behind the ship, which is a special positional relationship determined by the ship's movement direction. Therefore, the present invention introduces the angle factor k between the ship and the wind farm, and its calculation formula is as follows:
[0077] ; (4)
[0078] In formula (4), is the wind farm angle factor (the angle factor between the ship and the wind farm),( , ) is the ship's heading vector, denoted as , , are the longitude vector and latitude vector formed by the ship to the wind farm respectively. The vector formed by the ship to the wind farm is , is the angle formed by the ship's heading and the direction of the wind farm.
[0079] Further, in S104, the first fully connected network is used to extract features from the ship's longitude and latitude coordinates to obtain the position encoding of the ship at the corresponding moment, which specifically includes: embedding the standard AIS data (preprocessed data), and using the first fully connected network layer to encode the preprocessed ship data. The calculation formula for the position encoding of the ship at the corresponding moment is as follows;
[0080] ; (5)
[0081] In formula (5), is the position encoding of the ship at time t, is the ReLU non-linear activation function, is the first network training weight, which is the weight corresponding to the first fully connected layer and is used to calculate , , respectively represent the longitude and latitude of the ship at the moment.
[0082] Further, in S105, the second fully connected network is used to extract features from the wind farm repulsive force and the wind farm angle factor to obtain the feature vector of the ship and the wind farm, which specifically includes:
[0083] After calculating the wind farm repulsive force F and the wind farm angle factor k, the two are used for feature extraction through the operation of the second fully connected network. The calculation method is:
[0084] ; (6)
[0085] In formula (6), is the ReLU non-linear activation function, is the second network training weight, which is the weight corresponding to the second fully connected layer and is used to calculate is the vector of the ship and the wind farm features (wind farm influence factor).
[0086] Further, in S106, the preset ship trajectory prediction model is trained using the position encoding of the ship at the corresponding moment, the feature vector of the ship and the wind farm, and the output data of the hidden state at the previous moment to obtain the trained ship trajectory prediction model, which specifically includes:
[0087] Encode the position of the ship at time t and the feature vectors of the ship and the wind farm and the hidden state output data of the previous moment are all input into the first-layer GRU network to obtain the first hidden state at time t;
[0088] Encode the position of the ship at time t and the feature vectors of the ship and the wind farm and the hidden state output data of the previous moment and the first hidden state at time t are all input into the second-layer GRU network to obtain the second hidden state at time t;
[0089] Encode the position of the ship at time t and the feature vectors of the ship and the wind farm and the hidden state output data of the previous moment and the second hidden state at time t are all input into the third-layer GRU network to obtain the third hidden state at time t;
[0090] Predict the final trajectory of the ship according to the third hidden state at time t; among them, the preset ship trajectory prediction model includes multiple layers of GRU networks, and the multiple layers of GRU networks include the first-layer GRU network, the second-layer GRU network and the third-layer GRU network. The preset trajectory prediction model as a whole consists of three layers of GRU. It is set to three layers of GRU because the data of the ship trajectory in reality will contain a lot of complex information and features. If the structure is set too small, these features may not be accurately captured, but if the structure is set to more than three layers, it is more likely to lead to a more complex model and may also have the problem of overfitting and cannot be generalized in actual applications. The three-layer GRU structure is as Figure 2 and Figure 5 shown, Figure 2 In, the AIS information part (MMSI corresponds to the unique identity of the ship, time is the timestamp, longitude is the longitude, latitude is the latitude, and COG ((Course Over Ground)) is the course. After calculating and processing the ship coordinates and the wind farm coordinates, they are input into the preset trajectory prediction model. Among the three vertical layers, from top to bottom in sequence are the first-layer GRU network, the second-layer GRU network, and the third-layer GRU network. The third-layer GRU network is close to the prediction result output part, Figure 5 The corresponding three vertical layers in Figure 1 The three-layer structure, the leftmost column corresponds to Figure 2The lower part, and the three horizontal columns on the right describe the specific working principle of the model in chronological order. The third hidden state at time t (the current time) is output by the last GRU network (the third layer), which is the predicted value of the final trajectory point of the ship at time t. The roles of the first hidden state and the second hidden state at time t in the input and output of the longitudinal GRU are for facilitating the inspection of the intermediate parameters of the trained model. Figure 5 is Figure 2 the unfolded diagram of the lower half part (GRU three-layer module). The GRU module in the center of the figure is Figure 3 identical, and the internal structures of the GRU modules in the figure are all the same.
[0091] Furthermore, for the processing process of each layer of the GRU network, the GRU network structure includes a reset gate and an update gate. The reset gate determines how to combine new input information with previous memories, and the update gate defines the amount of previous memories saved to the current time step. The processing process is as Figure 3 shown, specifically including:
[0092] 1), Receive the position encoding of the ship at time t , the feature vector of the ship and the wind farm and the output data of the hidden state at the previous time step . In this step, for each time step t, the GRU receives the input ship position , and the hidden state at the previous time step ;
[0093] 2), Input the position encoding of the ship at time t , the feature vector of the ship and the wind farm and the output data of the hidden state at the previous time step into the update gate, and calculate the update gate vector . The main role of the update gate is to control how to combine the hidden state passed down from the previous time step and the candidate hidden state at the current time step to generate the hidden state at the current time step. When is close to 0, it means more reliance on the current candidate hidden state; when is close to 1, it means more reliance on the hidden state at the previous time step. The calculation formula of the update gate vector is as follows:
[0094] ; (7)
[0095] In formula (7), is the weight matrix of the update gate, To update the bias term of the gate, is the Sigmoid activation function, as Figure 4 shown. The abscissa of this activation function represents the input value, and the ordinate represents the output value. The sigmoid activation function can map the output of a neuron between 0 and 1.
[0096] 3), Encode the position of the ship at time t and the output data of the hidden state at the previous time step are both input into the reset gate to calculate the reset gate vector . The reset gate is used to control how to combine the hidden state of the previous time step with the current input to calculate the candidate hidden state. The reset gate vector is calculated as follows:
[0097] ; (8)
[0098] In equation (8), is the weight matrix of the reset gate, is the bias term of the reset gate, is the Sigmoid activation function. The reset gate determines the degree of participation of the hidden state of the previous time step in the calculation of the candidate hidden state at the current time step by controlling the magnitude of its output value. When the reset gate approaches 0, it means that almost completely ignores the hidden state of the previous time step, that is, "forgets" the historical information. The reset gate adjusts the current input and the historical information in the way of generating the candidate hidden state . When the reset gate approaches 1, it means more historical information is retained and affects the calculation of the candidate hidden state together with the current input. It helps the model handle long-term and short-term dependencies in sequence data more effectively by controlling the forgetting of historical information and the combination of the current input and historical information.
[0099] 4) Combine the position encoding of the ship at time t , the output data of the hidden state at the previous time step and the reset gate vector to calculate the candidate hidden state at time t. The candidate hidden state represents the candidate hidden state at the current moment and will update the hidden state of the previous time step according to the current input and the reset gate; the candidate hidden state at time t is calculated as follows:
[0100] ; (9)
[0101] where denotes element-wise multiplication, is the weight matrix of the candidate hidden state, is the bias term of the candidate hidden state, ( ) is the hyperbolic tangent function. It should be noted that the various parameters of each GRU module , , , , , need to be adjusted according to the actual situation. The calculation of the candidate hidden state directly involves the input at the current time step , which enables the model to capture important information in the current input. Although the calculation of the candidate hidden state also depends on the hidden state at the previous time step, this dependence is regulated by the reset gate . When the reset gate approaches 0, the model will ignore most of the historical information, while when the reset gate approaches 1, more historical information will be retained.
[0102] 5) Finally, based on the candidate hidden state , the update gate vector and the hidden state output data at the previous moment, calculate the hidden state at time t, and the calculation formula is:
[0103] ; (10)
[0104] Furthermore, in S107, use the trained ship trajectory prediction model to predict the ship trajectory, obtain real-time data and input it into the trained ship trajectory prediction model to obtain the at each time step, and predict the final trajectory point of the ship.
[0105] The present invention provides a method for predicting the integrated trajectory of a ship driven by the coordinates of a deep - sea wind farm, aiming to combine the specific navigation characteristics of the ship, optimize the navigation path planning, thereby improving the safety and efficiency of ship navigation, and also playing a positive role in aspects such as maritime traffic management and monitoring. This method proposes to incorporate the position of the wind farm, the distance and angle between the ship and the wind farm into the ship trajectory prediction, and introduces the wind farm repulsive force F and the wind farm angle factor k. This innovative method aims to utilize the position information of the wind farm, combined with the relative position relationship between the current position of the ship and the wind farm, to more accurately predict the future trajectory and actions of the ship. By considering the influencing factors of the wind farm, such as position, direction, and distance, etc., the performance of the trajectory prediction model can be effectively improved. The prediction model can more accurately predict the ship navigation path, avoid potential collision risks, and improve navigation safety. Incorporating factors such as the location of the far - reaching sea - based wind farm, the distance and angle between the ship and the wind farm into the ship trajectory prediction model can achieve more comprehensive environmental perception and intelligent decision - making. The present invention also proposes to use a fully - connected network to extract and encode the longitude and latitude positions of the ship, the wind farm repulsive force, and the wind farm angle factor, and finally input the above - mentioned information into a network composed of multiple GRUs for ship trajectory prediction. The present invention adopts the GRU network because the GRU network has an update gate and a reset gate, and these gating mechanisms help the model better capture the long - term dependencies in time - series data. The network structure composed of GRUs is simpler, reducing the number of parameters and computational complexity. In ship trajectory prediction, since the navigation of the ship is affected by various factors and the state information in the past for a relatively long time needs to be considered, this simplicity helps to reduce the risk of overfitting, accelerate the training speed, and perform better in the case of less data volume.
Claims
1. A ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive, characterized in that: include: Acquire standard AIS data, wherein the standard AIS data includes the latitude and longitude coordinates and heading data of the ship; the heading data includes the heading of the ship; The wind farm repulsion force is calculated according to the latitude and longitude coordinates of the ship and the wind farm coordinates; before the wind farm repulsion force is calculated according to the latitude and longitude coordinates of the ship and the wind farm coordinates, it is also included to determine whether to introduce the wind farm coordinates based on the actual distance between the ship and the surrounding wind farms, and the wind farm repulsion force calculation formula is as follows: ; In the formula, is an exponential function, and are two normal numbers, represents the distance between the ship and the wind farm, represents the minimum distance between the ship and the wind farm, the distance D between the ship and the wind farm is calculated by the latitude and longitude coordinates of the ship and the coordinates of the wind farm; The wind farm angle factor is calculated according to the angle formed by the heading of the ship and the direction of the wind farm; the wind farm angle factor calculation formula is as follows: ; In the formula, is the wind farm angle factor, , are the heading vectors of the ship in longitude and latitude respectively, , are the longitude vector and latitude vector from the ship to the wind farm, is the angle formed by the heading of the ship and the direction of the wind farm; Using a first fully connected network to extract features from the latitude and longitude coordinates of the ship to obtain a position code of the ship at a corresponding time; Using a second fully connected network to extract features of the wind farm repulsive force and the wind farm angle factor, to obtain feature vectors of the ship and the wind farm; The preset ship trajectory prediction model is trained using the position code of the ship at the corresponding time, the feature vector of the ship and the wind farm, and the hidden state output data at the previous time to obtain a trained ship trajectory prediction model; the preset ship trajectory prediction model includes a multi-layer GRU network; The trained ship trajectory prediction model is used to predict the ship trajectory.
2. The ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive according to claim 1 is characterized in that: The calculation formula for the position code of the ship at the corresponding time is as follows: ; In the formula, is the position code of the ship at time t, is the ReLU nonlinear activation function, is the first network training weight, , Respectively expressed in The longitude and latitude of the ship at the moment.
3. The ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive according to claim 2 is characterized in that: The calculation formula of the characteristic vector of the ship and the wind farm is as follows: ; in, is the characteristic vector of the ship and the wind farm, Train the weights for the second network.
4. The ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive according to claim 3 is characterized in that: The method of training a preset ship trajectory prediction model by using the position code of the ship at the corresponding time, the feature vector of the ship and the wind farm, and the hidden state output data at the previous time to obtain a trained ship trajectory prediction model includes: Encode the position of the ship at time t , the characteristic vectors of the ship and the wind farm And the hidden state output data of the previous moment All are input into the first layer of GRU network to obtain the first hidden state at time t; Encode the position of the ship at time t , the characteristic vectors of the ship and the wind farm , the hidden state output data of the previous moment The first hidden state at time t is input into the second layer of GRU network to obtain the second hidden state at time t; Encode the position of the ship at time t , the characteristic vectors of ships and wind farms , the hidden state output data of the previous moment The second hidden state at time t is input into the third layer of GRU network to obtain the third hidden state at time t; The final trajectory of the ship is predicted according to the third hidden state at time t; wherein the multi-layer GRU network includes a first layer GRU network, a second layer GRU network and a third layer GRU network.
5. The ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive according to claim 4 is characterized in that: The processing process of each layer of the GRU network includes: Receive the ship's position code at time t , the characteristic vectors of ships and wind farms And the hidden state output data of the previous moment ; Encode the position of the ship at time t , the characteristic vectors of ships and wind farms And the hidden state output data of the previous moment Both are input into the update gate, and the update gate vector is calculated ; Encode the position of the ship at time t And the hidden state output data of the previous moment Both are input into the reset gate, and the reset gate vector is calculated , Combined with the ship's position code at time t , the hidden state output data of the previous moment and reset gate vector , calculate the candidate hidden state at time t ; Based on the candidate hidden state , update gate vector And the hidden state output data of the previous moment , calculate the hidden state at time t.
6. The ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive according to claim 5 is characterized in that: The update gate vector The calculation formula is as follows: ; In the formula, is the weight matrix of the update gate, is the bias term of the update gate, is the Sigmoid activation function.
7. The ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive according to claim 6 is characterized in that: The reset gate vector The calculation formula is as follows: ; In the formula, To reset the gate weight matrix, is the bias term for the reset gate.
8. The ship fusion trajectory prediction method based on deep-sea wind farm coordinate drive according to claim 7 is characterized in that: The candidate hidden state at time t The calculation formula is as follows: ; In the formula represents element-wise multiplication, is the weight matrix of the candidate hidden states, is the bias term of the candidate hidden state, () is the hyperbolic tangent function.
Citation Information
Patent Citations
A method, apparatus, and storage medium for analyzing ship traffic flow in wind farm waters.
CN114936332A
Ship trajectory prediction method based on attention mechanism and coding and decoding GRU
CN117633477A