A method and system for dynamic spatiotemporal prediction of ship navigation waves based on deep learning
Through the deep learning SeaGraph model, combined with multi-source data and self-attention mechanism, the problems of coverage, timeliness and computational efficiency in ship wave forecasting are solved, and high-precision dynamic forecast of the wave field ahead of the ship's navigation path is achieved, improving navigation safety and decision-making efficiency in complex sea conditions.
Patent Information
- Application Number
- CN202510854969.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-25
AI Technical Summary
Existing technologies in ship wave forecasting have problems such as limited coverage, insufficient timeliness, low computational efficiency, and spatiotemporal misalignment between the static modeling framework and the dynamic navigation trajectory, resulting in insufficient perception and predictability in complex sea conditions.
The deep learning-based SeaGraph model is used to dynamically capture the spatiotemporal propagation patterns of wave fields through multi-source data preprocessing and feature encoding, combined with the Transformer architecture and multi-head self-attention mechanism, to achieve high-precision forecasts of the wave fields ahead of the ship's navigation path.
It breaks through the time and space constraints of the traditional static modeling framework and realizes high-precision predictive modeling of the dynamic evolution of the wave field ahead of the ship's navigation trajectory, significantly reducing operating costs and improving navigation safety and decision-making efficiency.
Smart Images

Figure CN120387552B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of marine environment prediction, and in particular relates to a method and system for dynamic spatiotemporal prediction of ship navigation waves based on deep learning. Background Art
[0002] With the acceleration of globalization, maritime shipping, as a core vehicle for trade, is experiencing unprecedented growth. However, the combined effects of shipping expansion and climate change have led to frequent extreme weather events and complex sea conditions, posing a significant challenge to ship navigation safety. Therefore, the development of high-precision, real-time, dynamic, and route-level wave forecasting technology has become a critical requirement for improving navigation safety and intelligent decision-making efficiency.
[0003] Currently, traditional ship-based ocean environment perception relies mainly on three types of technical means: (1) point data collection systems based on observation buoys and coastal ocean stations, which have low ocean coverage and are difficult to reflect the characteristics of dynamic wave fields; (2) satellite remote sensing technology can obtain wide-area wave field information, but its timeliness is significantly insufficient due to data inversion delays, long revisit cycles, and weather interference; (3) numerical prediction models rely on solving physical equations, and the need for high resolution leads to an exponential increase in computational complexity. They are also sensitive to parameterization errors of sudden events such as typhoons, making it difficult to meet real-time forecasting needs. The imbalance between data update frequency, spatial resolution, and computational efficiency in the above methods seriously restricts ships' ability to capture the dynamic evolution of wave fields around their routes.
[0004] In recent years, deep learning technology has provided new ideas for breaking through the limitations of traditional physical modeling. Existing research mainly focuses on two paths: (1) fixed-point wave prediction methods based on time series models. Although this type of method is superior to numerical models in short-term accuracy, the spatiotemporal misalignment between the static modeling framework and the dynamic navigation trajectory of the ship is prominent; (2) wave inversion technology based on ship motion response, which reversely infers wave parameters through six-degree-of-freedom sensor data. However, this type of method can only perceive the local wave field around the ship and cannot predict the dynamic evolution trend of the unnavigated sea area ahead. The lack of dynamic perception and foresight of the existing system has limited the efficiency of intelligent obstacle avoidance and route optimization decision-making in complex sea conditions.
[0005] In the prior art, the paper "Feasibility of a Self-Propelled Buoy Wave Measurement Method Based on Artificial Neural Networks" proposes an inversion model based on artificial neural networks. This model uses the ship's rolling motion history as input and the wave history as output. It uses an artificial neural network to extract ship motion characteristics and then inputs a linear function to invert the wave surface history. However, this method has only been validated through tank testing and can only invert the characteristics of the waves currently encountered by the ship; it cannot predict wave information at future route points.
[0006] Through the above analysis, the problems and defects of the existing technology are as follows:
[0007] Problem 1: Limited Coverage. The point-based data collection system based on observation buoys and coastal oceanographic stations has low ocean coverage and is unable to capture the full range of dynamic wave fields. For example, buoys can only provide real-time data for a localized area and cannot capture the spatial propagation patterns of wave fields over time, resulting in insufficient global awareness of complex ocean conditions.
[0008] Problem 2: Lack of timeliness. Although satellite remote sensing can obtain wide-area wave field information, it is limited by data inversion delays, long revisit periods, and weather interference, and cannot meet the needs of ships for real-time dynamic wave forecasts.
[0009] Problem 3: Low computational efficiency. Traditional numerical models rely on solving physical equations, and the high-resolution requirements lead to an exponential increase in computational effort. Furthermore, model initialization relies on high-quality initial field data, which is difficult to obtain in real time in practical applications, further limiting their forecast accuracy and response speed.
[0010] Problem 4: Temporal and spatial misalignment between static modeling frameworks and dynamic navigation trajectories. Existing fixed-point wave prediction methods based on time series models typically use historical data from fixed locations as input, making it difficult to adapt to the spatiotemporal changes in a ship's dynamic navigation trajectory.
[0011] Problem 5: Insufficient local perception and global foresight. Wave inversion technology based on ship motion response can only perceive the local wave field around the ship and cannot predict the dynamic evolution trend of the unnavigated sea area ahead. Summary of the Invention
[0012] To overcome the problems existing in the related art, the disclosed embodiments of the present invention provide a method and system for spatiotemporal prediction of ship navigation wave dynamics based on deep learning, and specifically relate to a method and system for spatiotemporal prediction of ship navigation wave dynamics based on SeaGraph.
[0013] The technical solution is as follows: a method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning, the method comprising the following steps:
[0014] S1, the collected ship AIS data and the ERA5 reanalysis dataset are temporally and spatially aligned, missing values are repaired, and normalized to generate node feature vectors containing latitude and longitude, timestamp, wind speed, and significant wave height. The node feature vectors quantify the importance of ship trajectory nodes and their temporal and spatial interactions through node feature coding, centrality coding, spatial coding, and temporal coding.
[0015] S2, based on the quantification of the importance and spatiotemporal interaction of ship trajectory nodes, uses the Transformer architecture to build the SeaGraph model. By integrating the multi-head self-attention mechanism with the graph network, it dynamically captures the spatiotemporal propagation laws of the wave field and outputs the effective wave height prediction value of the target waypoint through the dynamic output layer;
[0016] S3, performs SeaGraph model validation and performance analysis through SeaGraph model training, comparative experiments, and extreme event verification.
[0017] In step S1, the collected ship AIS data are spatially and temporally aligned with the ERA5 reanalysis dataset, including:
[0018] Ship trajectory data extracts AIS data from global routes, including timestamp UTC, latitude and longitude, speed, and heading, with a sampling interval of 0.5-3 hours;
[0019] Marine environmental data, using the ERA5 reanalysis dataset, extract the wind speed and significant wave height at 10 meters in the target sea area;
[0020] Time and space alignment: match the ship trajectory points with the ERA5 grid points in time and space. Bilinear interpolation is used to complete the parameters of non-integer grid points. The expression is:
[0021] ;
[0022] Where, is the ship's position, For the The weight of the grid points, is the value at a certain position, The nearest four ERA5 grid points, with weights determined by the inverse square of the distance.
[0023] In step S1, missing value repair and standardization processing are performed on the collected ship AIS data and ERA5 reanalysis dataset, including:
[0024] Missing trajectory repair: For trajectory segments that are missing for more than 3 hours, linear interpolation is used to complete the missing trajectory. The expression is:
[0025] ;
[0026] Where, for The latitude and longitude position at the moment, and are the latitude and longitude positions of adjacent valid track points. All are time intervals, ;
[0027] Standardization processing, Z-score standardization of wind speed and significant wave height, the expression is:
[0028] ;
[0029] Where, is the normalized value, is the value before normalization, is the mean of the training set, is the standard deviation.
[0030] In step S1, node feature encoding includes: taking each ship trajectory point as a node, and its feature vector contains latitude and longitude, time, wind field and wave information; the ship trajectory has nodes, and the feature vector of each node is expressed as ,in, is the feature dimension; is a real number space of dimension d;
[0031] Centrality encoding is used to capture the importance of key nodes in the ship trajectory. Nodes close to the target waypoint or in complex sea conditions are important. A learnable embedding vector is assigned to each node based on its importance and added to the node features. The expression is:
[0032] ;
[0033] Where, is the initial embedding vector of node 𝑖, is the original eigenvector of node 𝑖, Based on the node A learnable embedding vector for the importance distribution of .
[0034] In step S1, spatial encoding is used to capture the spatial relationship between nodes in the ship trajectory. The distance or direction between two adjacent trajectory points is used as the measure of the spatial relationship. Assign a learnable bias term and add it to the softmax attention module of Transformer:
[0035] ;
[0036] Where, is the attention score, Node and The input representation is, and They are the weight matrices of query and key, is the matrix transpose, is the scaling factor, is a learnable scalar indexed by distance, For nodes The distance between them.
[0037] In step S1, time encoding is used to capture the temporal relationship between nodes in the ship trajectory. The time interval between two trajectory points is used as a measure of the temporal relationship. A learnable bias term is assigned to each pair of nodes and added to the softmax attention module of the Transformer. The expression is:
[0038] ;
[0039] Where, is a learnable scalar indexed by a time interval, For nodes The time between.
[0040] In step S2, the SeaGraph model consists of multiple cascaded SeaGraph layers, each of which integrates layer normalization, multi-head self-attention modules, and feed-forward networks.
[0041] The SeaGraph layer is implemented based on the Transformer encoder, and layer normalization LN is applied before the multi-head self-attention MHA and feed-forward network FFN. The specific calculation is as follows:
[0042] ;
[0043] ;
[0044] Where, For the Node representation of the layer; is multi-head self-attention, is a feedforward neural network, For normalization, For the The node representation of the layer, For the The intermediate node representation obtained after the layer passes through multi-head attention.
[0045] In step S2, the spatiotemporal propagation law of the wave field is dynamically captured, and the effective wave height prediction value of the target waypoint is output through the dynamic output layer, including:
[0046] The global representation Mapping to significant wave height predictions:
[0047] ;
[0048] Where, is the predicted wave characteristics, is a linear mapping.
[0049] Another object of the present invention is to provide a deep learning-based spatiotemporal prediction system for ship navigation wave dynamics, which implements the deep learning-based spatiotemporal prediction method for ship navigation wave dynamics, and the system includes:
[0050] The multi-source data preprocessing and feature coding module is used to perform spatiotemporal alignment, missing value repair, and standardization on the collected ship AIS data and the ERA5 reanalysis dataset, generating node feature vectors containing latitude and longitude, timestamps, wind speed, and significant wave height. The node feature vectors quantify the importance of ship trajectory nodes and their spatiotemporal interactions through node feature coding, centrality coding, spatial coding, and temporal coding.
[0051] The SeaGraph model building module is used to quantify the importance and spatiotemporal interaction of ship trajectory nodes. The SeaGraph model is constructed using the Transformer architecture. By integrating the multi-head self-attention mechanism with the graph network, it dynamically captures the spatiotemporal propagation patterns of the wave field and outputs the effective wave height prediction value of the target waypoint through the dynamic output layer.
[0052] The model validation module is used to perform SeaGraph model validation and performance analysis through SeaGraph model training, comparative experiments, and extreme event validation.
[0053] Furthermore, the ship navigation wave dynamic spatiotemporal prediction system based on deep learning is equipped with a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the computer program is executed by the processor, it can realize the functions of the ship navigation wave dynamic spatiotemporal prediction system based on deep learning.
[0054] In combination with all the above technical solutions, the beneficial effects of the present invention are as follows:
[0055] First, this invention integrates multi-source time-series data from a ship's historical trajectory with the spatiotemporal characteristics of target waypoints to design an adaptive spatiotemporal encoding mechanism and construct a dynamic graph network architecture to capture the spatiotemporal propagation patterns of wave fields. This approach overcomes the spatiotemporal constraints of traditional static modeling frameworks, integrating the advantages of self-attention mechanisms and graph networks to enhance predictive modeling of the dynamic evolution of wave fields ahead of a ship's trajectory, providing high-precision wave forecasting support for intelligent navigation in complex sea conditions.
[0056] Second, this invention leverages a multi-head self-attention mechanism and spatiotemporal encoding technology to capture the complex spatiotemporal dependencies between ship trajectories and the dynamic propagation of wave fields. The model adaptively quantifies the importance of trajectory nodes and dynamically allocates attention weights to historical waypoints, spatially adjacent regions, and temporal evolution trends. This overcomes the spatiotemporal misalignment limitations of traditional static modeling and enables highly accurate modeling of the wave field evolution patterns ahead of the target waypoint.
[0057] Third, compared with traditional numerical models, satellite remote sensing and RNN / LSTM-based fixed-point prediction methods, the present invention uses node feature coding, centrality coding and spatiotemporal bias term design, and the average absolute error within the 6-hour forecast range is much lower than that of the LSTM model, and the peak error in extreme events (such as wave mutations) changes smoothly; through high-precision, low-latency wave dynamic forecasting capabilities, the present invention can significantly reduce the operating costs of ships caused by severe sea conditions, while improving route optimization efficiency and navigation safety, providing high-timeliness data support for marine environmental monitoring, disaster warning and resource exploration, and promoting the transformation and upgrading of the shipping industry towards intelligence and greenness. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure;
[0059] Figure 1 This is a schematic diagram of a method for dynamic spatiotemporal prediction of ocean waves during ship navigation based on deep learning, provided by an embodiment of the present invention;
[0060] Figure 2 This is a flow chart of a method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning provided by an embodiment of the present invention;
[0061] Figure 3 This is a schematic diagram of the SeaGraph model construction principle provided by an embodiment of the present invention;
[0062] Figure 4 This is a graph of model error changes for the same prediction time duration provided by an embodiment of the present invention;
[0063] Figure 5 This is a comparison chart of MAE changes and extreme stage errors of different models provided by an embodiment of the present invention in a wave mutation event. DETAILED DESCRIPTION
[0064] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0065] The innovation of the present invention lies in that it proposes for the first time a dynamic modeling framework that integrates multi-source spatiotemporal feature coding and adaptive graph networks, breaking through the constraints of traditional static modeling frameworks on the spatiotemporal relationship between ship trajectories and wave fields, and realizing high-precision dynamic forecasting of the wave field ahead of the navigation path. Specifically, the present invention integrates ship AIS trajectory data and ERA5 reanalysis environmental data through multi-source data preprocessing and feature coding modules to construct a multi-dimensional spatiotemporal feature system of node features, centrality coding, spatial coding and time coding; designs the SeaGraph model based on the Transformer architecture, and dynamically captures the spatiotemporal propagation laws of the wave field through multi-layer cascaded SeaGraph layers that fuse multi-head self-attention mechanisms and graph network characteristics; further combines comparative experiments with extreme event verification technology to significantly improve the robustness of the model in long-term predictions and sudden sea conditions. This method reduces the error increase by 29.6% compared to the traditional LSTM model within a 6-hour prediction range, and reduces the MAE peak error by 50% in wave mutation scenarios, providing high-precision, low-latency dynamic environment perception support for intelligent navigation and obstacle avoidance decisions of ships under complex sea conditions.
[0066] The present invention proposes multi-source spatiotemporal feature coding: integrating spatiotemporal data of ship trajectories with ocean environment parameters to construct node, centrality, spatial and temporal coding;
[0067] Adaptive graph network architecture: Based on SeaGraph, it integrates the self-attention mechanism with the graph network to capture the dynamic propagation patterns of the wave field;
[0068] Dynamic forecast model optimization: Achieve high accuracy and robustness through training with spatiotemporal aligned datasets and multi-dimensional validation.
[0069] Example 1, as Figure 1The deep learning-based spatiotemporal prediction method for ship-borne ocean waves, provided by embodiments of this invention, integrates multi-source time-series data from a ship's historical trajectory with the spatiotemporal characteristics of target waypoints, designs an adaptive spatiotemporal encoding mechanism, and constructs a dynamic graph network architecture, breaking through the limitations of traditional static modeling frameworks. Its core innovation lies in integrating the advantages of the self-attention mechanism and graph networks to dynamically capture the spatiotemporal propagation patterns of wave fields. This allows for highly accurate predictive modeling of the dynamic evolution of ocean waves in unexplored waters ahead of the ship's trajectory, thereby improving intelligent navigation safety and route optimization decision-making efficiency in complex sea conditions.
[0070] Multi-source spatiotemporal feature coding technology, adaptive graph network modeling technology, and dynamic forecast model training and verification technology. Multi-source spatiotemporal feature coding technology is used to capture the spatiotemporal correlation between ship trajectories and the ocean environment, adaptive graph network modeling technology enables learning of the dynamic propagation patterns of wave fields, and dynamic forecast model training and verification technology ensures the high accuracy and robustness of the model.
[0071] First, the multi-source spatiotemporal feature coding technology constructs node feature coding, centrality coding, spatial coding, and temporal coding based on the multi-source time series data (latitude and longitude, time, wind field, and waves) of the ship's historical trajectory and the spatiotemporal features of the target waypoints. Specifically, it includes:
[0072] Node feature encoding: Each ship trajectory point is regarded as a graph node, and its feature vector contains latitude and longitude, time, wind field and wave information;
[0073] Centrality encoding: assigns learnable embedding vectors to key nodes based on their spatial proximity to target waypoints or sea state complexity, enhancing the model's focus on important nodes.
[0074] Spatial encoding: assigning learnable biases to node pairs based on the distance and direction relationship between adjacent trajectory points to quantify the strength of spatial interactions;
[0075] Time coding: Based on the time interval between nodes, a time relationship bias term is constructed to capture the dynamic evolution of the wave field.
[0076] Secondly, we designed the SeaGraph model based on the Transformer architecture, integrating the multi-head self-attention mechanism with graph network characteristics. The specific implementation is as follows:
[0077] SeaGraph layer construction: Introducing layer normalization (LN), multi-head self-attention (MHA), and feed-forward network (FFN) into the classic Transformer encoder, capturing long-range dependencies and complex interactions between nodes through adaptive attention weights;
[0078] Dynamic graph output layer: A fully connected network is used to map the global representation of the graph to the wave characteristics ahead (such as significant wave height), achieving end-to-end dynamic forecasting.
[0079] Finally, dynamic forecast model training and verification technology improves model performance through multi-source dataset construction and experimental optimization. Specifically, it includes:
[0080] Dataset construction: We integrated AIS data (time, longitude and latitude) from 830 shipping routes worldwide with the ERA5 reanalysis dataset (wind speed and significant wave height). After spatiotemporal alignment, linear interpolation (missing track repair), and Z-score normalization, we divided the dataset into an 80% training set and a 20% test set.
[0081] Model verification: Comparative experiments were conducted to verify the superiority of the model in terms of indicators such as mean absolute error (MAE) and long-term forecast error increase;
[0082] Verification of adaptability to extreme events: For wave mutation scenarios, time series error analysis and boxplot comparison are used to demonstrate the model’s predictive stability under extreme sea conditions.
[0083] Through the above-mentioned technical means, the present invention realizes high-precision dynamic prediction of the wave field ahead of the ship's navigation path, providing reliable environmental perception support for navigation safety and intelligent decision-making in complex sea conditions.
[0084] Example 2, as another possible implementation of the present invention, Figure 2 As shown, the deep learning-based spatiotemporal prediction method for ship navigation wave dynamics provided by the embodiment of the present invention includes:
[0085] S1, the collected ship AIS data and the ERA5 reanalysis dataset are temporally and spatially aligned, missing values are repaired, and normalized to generate node feature vectors containing latitude and longitude, timestamp, wind speed, and significant wave height. The node feature vectors quantify the importance of ship trajectory nodes and their temporal and spatial interactions through node feature coding, centrality coding, spatial coding, and temporal coding.
[0086] S2, based on the quantification of the importance and spatiotemporal interaction of ship trajectory nodes, uses the Transformer architecture to build the SeaGraph model. By integrating the multi-head self-attention mechanism with the graph network, it dynamically captures the spatiotemporal propagation laws of the wave field and outputs the effective wave height prediction value of the target waypoint through the dynamic output layer;
[0087] S3, performs SeaGraph model validation and performance analysis through SeaGraph model training, comparative experiments, and extreme event verification.
[0088] Through systematic experiments, the model's forecast accuracy and stability in normal sea conditions and extreme events are verified, and its advantages over existing technologies are compared and analyzed.
[0089] For example, in step S1, a spatiotemporal feature encoding system is constructed by integrating ship trajectory data with ocean environmental parameters to provide standardized data input for the SeaGraph model. First, ship AIS data from 830 global routes and the ERA5 reanalysis dataset are collected. Through spatiotemporal alignment, missing value repair, and normalization, node feature vectors containing latitude and longitude, timestamps, wind speed, and significant wave height are generated. Furthermore, through centrality coding, spatial coding, and temporal coding, node importance and spatiotemporal interactions are quantified, enhancing the SeaGraph model's ability to capture the dynamic propagation patterns of wave fields.
[0090] Specifically, step S1 includes:
[0091] S101, data collection and integration;
[0092] Ship trajectory data: AIS data is extracted from global routes, including timestamp (UTC), latitude and longitude, speed, and heading, with a sampling interval of 0.5-3 hours.
[0093] Marine environmental data: The ERA5 reanalysis dataset was used to extract the wind speed at 10 meters and significant wave height in the target sea area, with a temporal and spatial resolution of 1 hour and 0.25°×0.25°, respectively.
[0094] Time and space alignment: Match the ship trajectory points with the ERA5 grid points in time and space. This invention innovatively proposes to use bilinear interpolation to complete the parameters of non-integer grid points:
[0095] ;
[0096] Where, is the ship's position, For the The weight of the grid points, is the value at a certain position, The nearest four ERA5 grid points, with weights determined by the inverse square of the distance.
[0097] S102, data cleaning and standardization.
[0098] Missing track repair: This invention innovatively proposes to use linear interpolation to complete the track segments that are missing for more than 3 hours:
[0099] ;
[0100] Where, for The latitude and longitude position at the moment, and are the latitude and longitude positions of adjacent valid track points. All are time intervals, ;
[0101] Standardization: This invention innovatively proposes to perform Z-score standardization on wind speed and significant wave height:
[0102] ;
[0103] Where, is the normalized value, is the value before normalization, is the mean of the training set, is the standard deviation.
[0104] S103, spatiotemporal feature encoding.
[0105] Node feature encoding: Each ship trajectory point is regarded as a node, and its feature vector contains latitude and longitude, time, wind field and wave information. Assume that the ship trajectory has nodes, and the feature vector of each node is expressed as ,in, is the feature dimension; The dimension is The real number space of ;
[0106] Centrality encoding: To capture the importance of key nodes in the ship's trajectory, centrality encoding is used. Nodes close to the target waypoint or in complex sea conditions may be more important. Specifically, a learnable embedding vector is assigned to each node based on its importance and added to the node features:
[0107] ;
[0108] Where, is the initial embedding vector of node 𝑖, is the original eigenvector of node 𝑖, Based on the node A learnable embedding vector for the importance distribution of .
[0109] Spatial encoding: In order to capture the spatial relationship between nodes in the ship trajectory, spatial encoding is used. The distance or direction between two adjacent trajectory points is used as the measure of the spatial relationship. Specifically, for each pair of nodes Assign a learnable bias term and add it to the softmax attention module of Transformer:
[0110] ;
[0111] Where, is the attention score, Node and The input representation is, and They are the weight matrices of query and key, is the matrix transpose, is the scaling factor, is a learnable scalar indexed by distance, For nodes The distance between them.
[0112] Temporal encoding: To capture the temporal relationship between nodes in the ship trajectory, temporal encoding is used. The time interval between two trajectory points is used as a measure of the temporal relationship. Specifically, a learnable bias term is assigned to each pair of nodes and added to the softmax attention module of the Transformer:
[0113] ;
[0114] Where, is a learnable scalar indexed by a time interval, For nodes The time between.
[0115] For example, Figure 3 As shown, the step S2 specifically includes:
[0116] S201, model architecture design.
[0117] SeaGraph layer: The SeaGraph layer is implemented based on the Transformer encoder, but layer normalization (LN) is applied before the multi-head self-attention (MHA) and feed-forward network (FFN). The specific calculation is as follows:
[0118] ;
[0119] ;
[0120] Where, For the Node representation of the layer; is multi-head self-attention, is a feedforward neural network, For normalization, For the The node representation of the layer, For the The intermediate node representation obtained after the layer passes through multi-head attention.
[0121] S202, dynamic graph output layer: represents the global Mapping to significant wave height predictions:
[0122] ;
[0123] Where, is the predicted wave characteristics, is a linear mapping.
[0124] Exemplarily, step S3 specifically includes:
[0125] S301, model training.
[0126] Dataset division: The training set and test set are divided into 8:2 ratios to ensure balanced distribution of routes.
[0127] Loss function: smooth L1 loss is used:
[0128] ;
[0129] Optimization strategy: Use Adam optimizer, initial learning rate , weight decay , train for 100 epochs.
[0130] S302, comparative experiment: Compare the prediction accuracy with that of ANN and LSTM models, and calculate the error increase of different models from 1 to 6 hours ( Figure 4 ). SeaGraph achieved the lowest MAE across all prediction timeframes, with a relatively small increase in error. This demonstrates SeaGraph's superiority in processing multivariate time series data of historical ship trajectories, particularly for long-term prediction tasks. In contrast, the ANN model experienced the most significant increase in error, primarily due to its inability to effectively capture the complex patterns and long-range dependencies in time series data. While LSTM can leverage sequential memory mechanisms to some extent, its performance remains inferior to SeaGraph models based on self-attention and graph networks.
[0131] S303, extreme event verification: a dynamic process in which the wave height rises rapidly and then gradually decays is selected to verify the forecast accuracy ( Figure 5 In the figure, the red areas mark key stages where wave heights increase significantly. SeaGraph (blue) exhibits the most stable MAE fluctuations throughout the entire process. Even during the extreme stages of rapid wave height increases (red areas), its error increase is relatively small, with a peak MAE of approximately 0.2, lower than that of the LSTM (orange, peak of approximately 0.3) and ANN (green, peak of approximately 0.4). This demonstrates that SeaGraph is more effective in maintaining forecast accuracy in response to sudden wave events.
[0132] Compared with the existing technology, the present invention significantly improves the accuracy and dynamic adaptability of ship-borne wave forecasting by integrating SeaGraph's adaptive graph network architecture and multi-source spatiotemporal feature encoding mechanism. Experiments show that its mean absolute error and mean square error are lower than those of the traditional LSTM model, and the error increase within the 6-hour prediction range is only 29.6%, which is lower than the 40.8% of the LSTM model. It effectively solves the problems of high computing resource consumption of traditional numerical simulations and insufficient spatiotemporal dynamic modeling of existing deep learning methods. At the same time, through the integration of multi-source data aligned in time and space and the design of lightweight models, the complexity of data acquisition and processing is reduced, and the timeliness bottleneck of satellite remote sensing and buoy observations is avoided. In addition, the model still maintains stable prediction capabilities in wave mutation scenarios, provides high-precision, low-latency dynamic environment perception support for ship intelligent navigation, and significantly improves navigation safety and decision-making efficiency in complex sea conditions.
[0133] In embodiment 3, the deep learning-based spatiotemporal prediction system for ship navigation and ocean wave dynamics provided in the embodiment of the present invention includes:
[0134] The multi-source data preprocessing and feature coding module is used to perform spatiotemporal alignment, missing value repair, and standardization on the collected ship AIS data and the ERA5 reanalysis dataset, generating node feature vectors containing latitude and longitude, timestamps, wind speed, and significant wave height. The node feature vectors quantify the importance of ship trajectory nodes and their spatiotemporal interactions through node feature coding, centrality coding, spatial coding, and temporal coding.
[0135] The SeaGraph model building module is used to quantify the importance and spatiotemporal interaction of ship trajectory nodes. The SeaGraph model is constructed using the Transformer architecture. By integrating the multi-head self-attention mechanism with the graph network, it dynamically captures the spatiotemporal propagation patterns of the wave field and outputs the effective wave height prediction value of the target waypoint through the dynamic output layer.
[0136] The model validation module is used to perform SeaGraph model validation and performance analysis through SeaGraph model training, comparative experiments, and extreme event validation.
[0137] The above description is only a preferred specific implementation method of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. A method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning, characterized in that: The method comprises the following steps: S1, the collected ship AIS data and the ERA5 reanalysis dataset are temporally and spatially aligned, missing values are repaired, and normalized to generate node feature vectors containing latitude and longitude, timestamp, wind speed, and significant wave height. The node feature vectors quantify the importance of ship trajectory nodes and their temporal and spatial interactions through node feature coding, centrality coding, spatial coding, and temporal coding. S2, based on the quantification of the importance and spatiotemporal interaction of ship trajectory nodes, uses the Transformer architecture to build the SeaGraph model. By integrating the multi-head self-attention mechanism with the graph network, it dynamically captures the spatiotemporal propagation laws of the wave field and outputs the effective wave height prediction value of the target waypoint through the dynamic output layer; S3, conducts SeaGraph model validation and performance analysis through SeaGraph model training, comparative experiments, and extreme event verification; In step S2, the SeaGraph model consists of multiple cascaded SeaGraph layers, each of which integrates layer normalization, multi-head self-attention modules, and feed-forward networks. The SeaGraph layer is implemented based on the Transformer encoder, and layer normalization LN is applied before the multi-head self-attention MHA and feed-forward network FFN. The specific calculation is as follows: ; ; Where, For the Node representation of the layer; is multi-head self-attention, is a feedforward neural network, For normalization, For the The node representation of the layer, For the The intermediate node representation obtained after the layer passes through multi-head attention.
2. The method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning according to claim 1 is characterized in that: In step S1, the collected ship AIS data are spatially and temporally aligned with the ERA5 reanalysis dataset, including: Ship trajectory data extracts AIS data from global routes, including timestamp UTC, latitude and longitude, speed, and heading, with a sampling interval of 0.5-3 hours; Marine environmental data, using the ERA5 reanalysis dataset, extract the wind speed and significant wave height at 10 meters in the target sea area; Time and space alignment: match the ship trajectory points with the ERA5 grid points in time and space. Bilinear interpolation is used to complete the parameters of non-integer grid points. The expression is: ; Where, is the ship's position, For the The weight of the grid points, is the value at a certain position, The nearest four ERA5 grid points, with weights determined by the inverse square of the distance.
3. The method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning according to claim 1, characterized in that: In step S1, missing value repair and standardization processing are performed on the collected ship AIS data and ERA5 reanalysis dataset, including: Missing trajectory repair: For trajectory segments that are missing for more than 3 hours, linear interpolation is used to complete the missing trajectory. The expression is: ; Where, for The latitude and longitude position at the moment, and are the latitude and longitude positions of adjacent valid track points. All are time intervals, ; Standardization processing, Z-score standardization of wind speed and significant wave height, the expression is: ; Where, is the normalized value, is the value before normalization, is the mean of the training set, is the standard deviation.
4. The method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning according to claim 1, characterized in that: In step S1, node feature encoding includes: taking each ship trajectory point as a node, and its feature vector contains latitude and longitude, time, wind field and wave information; the ship trajectory has nodes, and the feature vector of each node is expressed as ,in, is the feature dimension; The dimension is The real number space of ; Centrality encoding is used to capture the importance of key nodes in the ship trajectory. Nodes close to the target waypoint or in complex sea conditions are important. A learnable embedding vector is assigned to each node based on its importance and added to the node features. The expression is: ; Where, is the initial embedding vector of node 𝑖, is the original eigenvector of node 𝑖, Based on the node A learnable embedding vector for the importance distribution of .
5. The method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning according to claim 1, characterized in that: In step S1, spatial encoding is used to capture the spatial relationship between nodes in the ship trajectory. The distance or direction between two adjacent trajectory points is used as the measure of the spatial relationship. Assign a learnable bias term and add it to the softmax attention module of Transformer: ; Where, is the attention score, Node and The input representation is, and They are the weight matrices of query and key, is the matrix transpose, is the scaling factor, is a learnable scalar indexed by distance, For nodes The distance between them.
6. The method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning according to claim 5, characterized in that: In step S1, time encoding is used to capture the temporal relationship between nodes in the ship trajectory. The time interval between two trajectory points is used as a measure of the temporal relationship. A learnable bias term is assigned to each pair of nodes and added to the softmax attention module of the Transformer. The expression is: ; Where, is a learnable scalar indexed by a time interval, For nodes The time between.
7. The method for dynamic spatiotemporal prediction of ship navigation waves based on deep learning according to claim 1, characterized in that: In step S2, the spatiotemporal propagation law of the wave field is dynamically captured, and the effective wave height prediction value of the target waypoint is output through the dynamic output layer, including: The global representation Mapping to significant wave height predictions: ; Where, is the predicted wave characteristics, is a linear mapping.
8. A deep learning-based spatiotemporal prediction system for ship navigation waves, characterized by: Implementing the deep learning-based spatiotemporal prediction method for ship navigation wave dynamics as described in any one of claims 1 to 7, the system comprises: The multi-source data preprocessing and feature coding module is used to perform spatiotemporal alignment, missing value repair, and standardization on the collected ship AIS data and the ERA5 reanalysis dataset, generating node feature vectors containing latitude and longitude, timestamps, wind speed, and significant wave height. The node feature vectors quantify the importance of ship trajectory nodes and their spatiotemporal interactions through node feature coding, centrality coding, spatial coding, and temporal coding. The SeaGraph model building module is used to quantify the importance and spatiotemporal interaction of ship trajectory nodes. The SeaGraph model is constructed using the Transformer architecture. By integrating the multi-head self-attention mechanism with the graph network, it dynamically captures the spatiotemporal propagation patterns of the wave field and outputs the effective wave height prediction value of the target waypoint through the dynamic output layer. The model validation module is used to perform SeaGraph model validation and performance analysis through SeaGraph model training, comparative experiments, and extreme event validation.
9. The deep learning-based spatiotemporal prediction system for ship navigation waves according to claim 8, characterized in that: The deep learning-based ship navigation wave dynamic spatiotemporal prediction system is equipped with a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can realize the functions of the deep learning-based ship navigation wave dynamic spatiotemporal prediction system.
Citation Information
Patent Citations
Wave prediction method based on Transform space-time mutual coding
CN117236383A
Intelligent correction method for sea wave forecast
CN118504779A