Method, device, medium and product for medium and short term ship motion prediction based on spatiotemporal fusion informer model

By using the spatiotemporal fusion Informer model, combined with a multi-head ProbSparse attention layer and a sea state adaptive decoder, the spatial correlation and multi-scale problems in ship motion prediction under high sea states are solved, achieving more accurate short- and medium-term predictions and improving the efficiency of ship motion trend capture and prediction.

CN122241105APending Publication Date: 2026-06-19NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Filing Date
2026-03-23
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies neglect spatial correlation in ship motion prediction under high sea states. Single-scale attention mechanisms cannot take into account both long-term trends and short-term fluctuations. Fixed-length decoders cannot adapt to different sea states, resulting in insufficient prediction accuracy and error accumulation.

Method used

We adopt a spatiotemporal fusion Informer model, which obtains spatiotemporal fusion features through spatial encoding and location encoding. We introduce a multi-head ProbSparse attention layer and a Distilling layer to construct a spatiotemporal fusion Informer model, and combine it with a sea state adaptive decoder to optimize the prediction process.

🎯Benefits of technology

It improves the accuracy of capturing short- and medium-term ship motion attitude trends, reduces gradient vanishing and computational complexity, enhances multi-step prediction accuracy and sea state adaptability, and provides more efficient prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241105A_ABST
    Figure CN122241105A_ABST
Patent Text Reader

Abstract

This application discloses a method, device, medium, and product for short-to-medium-term ship motion prediction based on a spatiotemporal fusion Informer model, relating to the field of ship motion prediction. The method includes: acquiring short-to-medium-term ship motion parameters, environmental parameters, and wave spectrum parameters to generate time-series data; performing spatial and positional encoding on the time-series data, and obtaining spatiotemporal fusion features based on the spatial and positional encoding results; constructing a spatiotemporal fusion Informer model by introducing a multi-head ProbSparse attention layer and a Distilling layer; and obtaining ship motion prediction results based on the spatiotemporal fusion features using the spatiotemporal fusion Informer model. This application can improve the efficiency and accuracy of short-to-medium-term ship motion prediction, providing key technical support for intelligent maritime aviation operation systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ship motion prediction, and in particular to a method, device, medium and product for short- to medium-term ship motion prediction based on the spatiotemporal fusion Informer model. Background Technology

[0002] Helicopter takeoff and landing operations on ships under high sea states are a highly complex systems engineering project, involving the dynamic coupling and coordinated control of multiple elements such as ships, helicopters, personnel, and the environment. This process is significantly affected by environmental disturbances, carries high operational risks, and exhibits strong dynamic uncertainties, making it a major scientific and technological challenge in the field of maritime aviation operation safety assurance. One of the key factors affecting helicopter landing safety is the ship's motion state. Due to the continuous changes in external environmental factors such as wind, waves, and currents, ships generate six degrees of freedom motion. This motion exhibits stronger randomness, nonlinearity, and coupling characteristics under medium to high sea states. Its dynamic changes directly affect the relative motion relationship of the helicopter during the landing process, easily leading to safety risks such as friction and collisions, and in severe cases, even causing takeoff and landing failure.

[0003] In the early 21st century, the rise of machine learning brought about a revolution in the maritime field. This paper explores the role of machine learning in green ship design and operation, emphasizing its ability to optimize performance, reduce environmental impact, and improve operational efficiency, highlighting its importance in achieving the maritime industry's sustainable development goals. Traditional machine learning techniques such as Support Vector Machines (SVM) and Random Forests (RF) excel in handling large-scale data and complex nonlinear relationships, and have been widely researched and applied in the field of ship motion prediction. For example, the paper develops an adaptive machine learning model for real-time prediction of ship heave motion and constructs a semi-supervised model to predict the motion of moored vessels; both significantly improving the safety and efficiency of maritime operations. It also provides a comprehensive overview of machine learning applications in shipbuilding, marine, and ocean engineering, demonstrating through multiple case studies and innovative examples how machine learning can drive change in these fields through more accurate predictions, more efficient design, and superior safety performance. However, these methods typically require extensive feature engineering and data preprocessing and have limitations in capturing long-term dependencies in time-series data.

[0004] In recent years, the development of Artificial Neural Networks (ANNs) and Recurrent Neural Networks (RNNs) has significantly improved prediction accuracy in various fields. This paper establishes an ANN model to predict the additional resistance of container ships in the face of waves, demonstrating high accuracy and practicality, and applying it to ship design. ANN analysis is used to improve the prediction of main engine power and emissions for different types of ships, helping to optimize ship performance and reduce environmental impact. The paper also demonstrates the effectiveness of ANN in predicting the residual resistance of trimaran ships, particularly for complex hull types. Finally, it highlights the advantages of ANN in predicting the dynamic characteristics of mooring systems, showing superior accuracy compared to traditional methods.

[0005] In expanding the application of neural networks in maritime forecasting, the inventors have developed a real-time ship motion prediction model by combining adaptive wavelet transform and dynamic neural networks in existing technologies. The neural network plays a crucial role in capturing the nonlinear characteristics of ship motion, achieving accurate real-time predictions under different sea states. For example, a data-driven method is proposed, using neural networks to perform multi-step predictions of ship roll motion under high sea states. This network generates reliable long-term prediction results by processing historical data, ensuring the stability and safety of ships in complex maritime environments. A data-driven ship motion prediction method based on neural networks is also proposed, achieving high-precision predictions of ship motion through the analysis of massive amounts of data, providing key support for improving maritime safety and operational efficiency. Furthermore, a ship attitude prediction model is established based on a neural network optimized by a cross-parallel algorithm, providing significant assistance for safe navigation and scientific operational decision-making.

[0006] Against this backdrop, ship motion prediction has become a crucial link in ensuring the safe take-off and landing of helicopters in high sea states. In high sea states, the rolling frequency and amplitude of ships increase due to the influence of wind, waves, and ocean currents. Unlike ultra-short-term ship motion prediction tasks, medium- and short-term ship motion prediction focuses on the trend of ship motion changes over a timescale of tens of seconds to several minutes (approximately 1-15 minutes). At this time, the relationship between wave excitation and ship motion is more complex, exhibiting problems such as long-term dependence, non-stationarity, and noise interference. Traditional RNN or Long Short-Term Memory (LSTM) models are prone to gradient vanishing and high computational complexity when modeling long sequences. Furthermore, existing prediction methods based on Informer models have the following drawbacks: 1. Focusing only on temporal characteristics and ignoring the spatial correlation of ship motion leads to inaccurate capture of attitude trends at high sea states; 2. Single-scale attention mechanisms cannot take into account both long-term trends and short-term fluctuations, resulting in insufficient accuracy in multi-step predictions; 3. Fixed-length decoder target sequences cannot adapt to the periodic differences in ship motion under different sea states, resulting in poor sea state adaptability; 4. The lack of secondary feature extraction between the encoder and decoder results in insufficient capture of local spatiotemporal features and significant accumulation of prediction errors. Summary of the Invention

[0007] To address the aforementioned problems in existing technologies, this application provides a method, device, medium, and product for predicting short- to medium-term ship motion based on a spatiotemporal fusion Informer model.

[0008] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a method for predicting short- to medium-term ship motion based on a spatiotemporal fusion Informer model, including: Obtain short- to medium-term ship motion parameters, environmental parameters, and wave spectrum parameters to generate time series data; Spatial and location encoding are performed on the time series data, and spatiotemporal fusion features are obtained based on the spatial and location encoding results. Based on the Informer model, a multi-head ProbSparse attention layer and a Distilling layer are introduced to construct a spatiotemporal fusion Informer model; The ship motion prediction results are obtained by using the spatiotemporal fusion Informer model and the spatiotemporal fusion features.

[0009] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for predicting short- and medium-term ship motion based on a spatiotemporal fusion Informer model.

[0010] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method for predicting short- and medium-term ship motion based on the spatiotemporal fusion Informer model.

[0011] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for predicting short-to-medium-term ship motion based on a spatiotemporal fusion Informer model.

[0012] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method, device, medium, and product for short-to-medium-term ship motion prediction based on a spatiotemporal fusion Informer model. By performing spatial and positional encoding on time-series data and obtaining spatiotemporal fusion features based on the spatial and positional encoding results, it can capture spatial coupling relationships, improving the accuracy of capturing short-to-medium-term ship motion attitude trends. This solves the problem of existing technologies focusing only on temporal features and ignoring the spatial correlation of ship motion, resulting in inaccurate attitude trend capture under high sea states. By introducing a multi-head ProbSparse attention layer and a Distilling layer, it takes into account both long-term trends and short-term fluctuations, reducing the sequence length processed by the spatiotemporal fusion Informer model and avoiding gradient vanishing and high computational complexity. It optimizes the operational efficiency of the spatiotemporal fusion Informer model while maintaining prediction accuracy, thus solving the problem that single-scale attention mechanisms cannot simultaneously handle long-term trends and short-term fluctuations, and that multi-step prediction accuracy is insufficient. Based on this, this application can provide key technical support for intelligent maritime aviation operation systems. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A flowchart illustrating a short-to-medium term ship motion prediction method based on a spatiotemporal fusion Informer model, provided as an embodiment of this application; Figure 2 A schematic diagram of the implementation architecture of a short-to-medium-term ship motion prediction method based on a spatiotemporal fusion Informer model provided in an embodiment of this application; Figure 3 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model provided in an embodiment of this application within 120 seconds; Figure 4 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model provided in an embodiment of this application within 120 seconds; Figure 5 A schematic diagram showing the comparison between the predicted curve and the actual curve of the roll angular velocity of the spatiotemporal fusion Informer model provided in an embodiment of this application within 120 seconds; Figure 6A schematic diagram showing the comparison between the predicted curve and the actual curve of the bow roll angular velocity within 120 seconds using the spatiotemporal fusion Informer model provided in an embodiment of this application; Figure 7 A schematic diagram showing the comparison between the predicted curve and the actual curve of the roll angle within 120 seconds of the spatiotemporal fusion Informer model provided in an embodiment of this application; Figure 8 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 2-3 in one embodiment of this application within 900 seconds; Figure 9 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 2-3 in one embodiment of this application within 900 seconds; Figure 10 A schematic diagram showing the comparison between the predicted and actual roll angle curves of the spatiotemporal fusion Informer model under sea state 2-3 in an embodiment of this application within 900 seconds; Figure 11 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 3-4 in one embodiment of this application within 900 seconds; Figure 12 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 3-4 in one embodiment of this application within 900 seconds; Figure 13 A schematic diagram showing the comparison between the predicted curve and the actual curve of the roll angle within 900 seconds of the spatiotemporal fusion Informer model under sea state 3-4 provided in an embodiment of this application; Figure 14 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 4-5 in an embodiment of this application within 900 seconds; Figure 15 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 4-5 in an embodiment of this application within 900 seconds; Figure 16 A schematic diagram showing the comparison between the predicted and actual roll angle curves of the spatiotemporal fusion Informer model under sea state 4-5 in an embodiment of this application within 900 seconds; Figure 17 A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 5-6 within 900 seconds, provided in an embodiment of this application. Figure 18A schematic diagram showing the comparison between the predicted and actual sway velocity curves of the spatiotemporal fusion Informer model under sea state 5-6 within 900 seconds, provided in an embodiment of this application. Figure 19 A schematic diagram showing the comparison between the predicted and actual roll angle curves of the spatiotemporal fusion Informer model under sea state 5-6 in an embodiment of this application within 900 seconds; Figure 20 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] Ship motion prediction is a crucial aspect of ensuring the safe takeoff and landing of helicopters in high sea states. Focusing on short- to medium-term ship motion trends within the next 1-15 minutes provides prior support for landing path planning, collision avoidance decisions, and operational window selection. Based on this, in an exemplary embodiment, this application provides a short- to medium-term ship motion prediction method based on a spatiotemporal fusion Informer model. This method is executed by computer equipment, specifically by a terminal or server alone, or by both. In this embodiment, the method is illustrated using a server as an example. Figure 1 As shown, the method includes: Step 100: Obtain short- to medium-term ship motion parameters, environmental parameters, and wave spectrum parameters to generate time series data. The parameters obtained include wave spectrum parameters. Wind speed Angle of attack propeller speed propeller angle The acquired parameters are denoised, and missing values ​​are filled in using linear interpolation to obtain a standardized time series data, denoted as . , The sequence length is ≥900.

[0018] Step 101: Perform spatial and location coding based on time series data, and obtain spatiotemporal fusion features based on the spatial coding results and location coding results.

[0019] Step 102: Based on the Informer model, introduce a multi-head ProbSparse attention layer and a Distilling layer to construct a spatiotemporal fusion Informer model.

[0020] Step 103: Using the spatiotemporal fusion Informer model, ship motion prediction results are obtained based on spatiotemporal fusion features.

[0021] By implementing steps 100-103 above, this application can integrate spatiotemporal characteristics, adapt to multiple sea states, and balance the accuracy of long-term and short-term predictions, enabling advance planning of helicopter approach and landing paths. Especially in high sea states, it can significantly improve landing efficiency and pilot safety, providing data support and safety assurance for landing path planning and risk assessment, and enhancing the safety of autonomous takeoff and landing and the reliability of mission execution for helicopters in complex sea conditions.

[0022] In an exemplary embodiment of this application, to further improve the accuracy of attitude trend prediction under high sea states, in this embodiment, the six degrees of freedom motion parameters of the ship can be mapped to three-dimensional spatial vectors to capture spatial coupling relationships. Based on this, the implementation process of step 101 provided above in this application can be described as follows: Step 101-1: Obtain the multi-degree-of-freedom motion parameters of the ship based on time series data.

[0023] Step 101-2: Map the multi-degree-of-freedom motion parameters in three-dimensional space to obtain a three-dimensional spatial vector. The three-dimensional spatial vector is represented as: .

[0024] In the formula, For the oscillation-swaying dimension, For the sway-roll dimension, Let T be the heave-bow dimension, and T be the matrix transpose. For oscillation speed, For sway speed, For heave displacement, For pitch angle, The roll angle, ω is the bow roll angular velocity.

[0025] Step 101-3: Perform spatial encoding on the three-dimensional spatial vector to obtain the spatial encoding result. The spatial encoding result is a spatial encoding matrix, and its calculation formula is as follows: .

[0026] In the formula, For spatial encoding weight matrix, For bias terms, For encoding dimensions, This is the spatial encoding result.

[0027] Step 101-4: Determine the location code based on the time step index of the time series data to obtain the location code result. Among these steps, adding location codes to preserve time series information includes: .

[0028] .

[0029] In the formula, For time step index, For encoding dimension indexes. for or , all represent the position encoding results.

[0030] Step 101-5: Overlay the spatial encoding results and the location encoding results to obtain the spatiotemporal fusion features. The spatiotemporal fusion features are represented as follows: .

[0031] In the formula, It is a spatiotemporal fusion feature.

[0032] In an exemplary embodiment of this application, in order to enhance spatiotemporal features and reduce the accumulation of prediction errors, this embodiment describes the specific implementation process of steps 102 and 103 above in a data processing manner, including: Step 1: Local Spatial Convolution and Feature Extraction. Specifically, local spatial convolution and feature extraction are performed on the spatiotemporal fusion features to obtain spatiotemporal features, where: Step 1-1: Use a 1×3 convolution kernel to extract local spatiotemporal features to enhance the local correlation of ship motion parameters. The extracted local spatiotemporal features can be represented as: .

[0033] In the formula, For two-dimensional convolution kernel weights, For bias terms, This is a two-dimensional convolution operation. For local spatiotemporal features, The padding method is a parameter used in convolutional neural networks to control the size of the output feature map. This indicates a "same" padding mode, where zero values ​​are used to ensure that the length of the convolutional output feature map is consistent with the length of the input feature map.

[0034] Steps 1-2: The Flatten layer is used to adjust the dimensions of local spatiotemporal features and local temporal features to obtain spatiotemporal features, ensuring compatibility with subsequent modules. The spatiotemporal features are represented as follows: .

[0035] In the formula, For spatiotemporal features, Flatten() represents the Flatten layer.

[0036] Step 2: Using an encoder, based on spatiotemporal features, obtain encoded features.

[0037] The encoder's input consists entirely of historical ship degrees of freedom, wave data, and time-series data; that is, the spatiotemporal features obtained by adding spatial features, temporal features, and position codes serve as input variables. For example... Figure 2 As shown, the encoder structure mainly consists of a multi-head ProbSparse attention layer and a distilling layer. By compressing the input variables in the time dimension, the distilling layer helps reduce the sequence length that the spatiotemporal fusion Informer model (hereinafter referred to as the model) needs to process. This compression is achieved by selectively retaining key information in the sequence while removing information that contributes little to the prediction task. The multi-head ProbSparse attention layer and the distilling layer optimize the model's running efficiency while ensuring prediction accuracy. The distilling layer calculates the output of the j-th ProbSparse attention layer as follows to obtain the... The input to the ProbSparse attention layer.

[0038] In the formula, This is the output of the ProbSparse attention layer j. For the first The input to the ProbSparse attention layer, For max pooling layer, For multi-head ProbSparse attention layers, For activation function, This is a one-dimensional convolutional layer. The distilling layer reduces the dimensionality of the input sequence to the next attention module by using a one-dimensional convolutional layer, an activation function ELU, and a max-pooling layer. For example... Figure 2 As shown, the encoder's stack structure concatenates the outputs of all stacks to obtain the final output. Specifically, concatenating the outputs of multiple encoder layers yields the final encoder output as follows: .

[0039] In the formula, This is the final output of the encoder, i.e., the encoded features.

[0040] Step 3: Use the convolution-attention fusion module to extract features from the encoded features and apply attention weighting to obtain fused features.

[0041] Step 3-1: Secondary Feature Extraction. Secondary feature extraction is performed on the encoder features using a 1×3 convolution kernel, resulting in: .

[0042] In the formula, Features extracted in the second stage. The convolution weight matrix has dimensions of . , This is the bias term for the convolution operation.

[0043] Step 3-2: Attention Weighting. A local attention mechanism is constructed to enhance key features, resulting in the following fused features: .

[0044] .

[0045] In the formula, This is the attention weight matrix. This is a bias term for the attention mechanism. For the Sigmoid function, For attention weight features, This is a feature of fusion.

[0046] Step 4: Using a sea state adaptive decoder, the decoding features are obtained based on the first 1 / n length of the fused features and dynamic placeholders.

[0047] The dynamic placeholders used in this step are adjusted according to the sea state level. Among them, the dynamic placeholders... length Sea state: 2-3 (low sea state) Sea state 4-5 (medium to high sea state): Sea state 6 (high sea state): .

[0048] Sea state rating by wave height and wind speed The determination is as follows: .

[0049] Next, the input for the decoder is constructed.

[0050] The decoder input (i.e., the decoded features) is the concatenation of the first half of the encoder features (such as the first quarter of the encoder output features) and dynamic placeholders, as follows: .

[0051] In the formula, This is the first half of the encoder features. These are decoding features.

[0052] Furthermore, the sea state adaptive decoder used in this application includes two layers of multi-head attention: The first layer is a multi-head ProbSparse attention layer, with the input being... : .

[0053] In the formula, The output of multi-head ProbSparse attention, For the number of attention heads, This is a multi-head ProbSparse attention function.

[0054] The second layer is multi-head attention, and the query is... The keys and values ​​are the encoder output (i.e., fused features). ),have: .

[0055] In the formula, For the output of multi-head attention, For the attention of the bulls Step 5: A fully connected layer is used to map the decoded features to the ship motion prediction results. The fully connected layer mapping is represented as follows: .

[0056] In the formula, Here is the weight matrix of the fully connected layer, with dimension 1. , For bias terms of fully connected layers, These are the predicted values ​​for the states of the five core systems.

[0057] Step 6: Set up a feedback adjustment mechanism to dynamically correct the current ship motion prediction result based on the previous ship motion prediction result. The process of dynamically correcting the current ship motion prediction result based on the previous ship motion prediction result is expressed as follows: .

[0058] In the formula, Based on the current ship motion prediction results, Based on the previous ship motion prediction results, For the previous true value, This is a correction factor. This is the revised prediction result for ship motion.

[0059] In an exemplary embodiment of this application, in order to balance long-term trends and short-term fluctuations and improve the accuracy of multi-step prediction, the construction process of the multi-head ProbSparse attention layer adopted in this application includes: Step (1) performs a linear transformation on the spatiotemporal features according to different weight matrices to obtain the query vector, key vector, and value vector. The initial query vector is defined as follows: Key vector Value vector Then, by Through linear transformation, we obtain: , , , . , and This is the weight matrix corresponding to the query vector, key vector, and value vector.

[0060] Step (2) determines the attention score based on the query vector, key vector, and value vector. The attention score is represented as... : .

[0061] Step (3) constructs global-scale attention and local-scale attention based on attention scores. Global-scale attention (focusing on long-term trends) is represented as... : .

[0062] Local scale attention (focusing on short-period fluctuations, sliding window size) ) represents : .

[0063] In the formula, The number of sliding windows. For the first The query vector, key vector, and value vector within a sliding window. No. Attention score within a sliding window.

[0064] Step (4) fuses global-scale attention and local-scale attention, and dynamically assigns weights to obtain ProbSparse attention. ProbSparse attention is represented as: .

[0065] In the formula, For global scale weights, For local scale weights, For ProbSparse attention.

[0066] Step (5) Form a multi-head ProbSparse attention layer based on ProbSparse attention.

[0067] In an exemplary embodiment of this application, in order to further avoid defects such as gradient vanishing and high computational complexity, the process of constructing the spatiotemporal fusion Informer model in step 102 above also includes the process of model training and verification.

[0068] In this implementation process, samples can be generated using an open-loop controller, performing different maneuvers such as turning and circling. The predicted output is... =5 system states That is, two-dimensional velocity (oscillation) and sweeping ), roll angular velocity Bow roll rate and roll angle Based on this, the resulting dataset The dataset includes 96 hours of regular samples and 29 hours of out-of-distribution (OOD) samples, with measurements taken once per second. The regular samples comprise 60% of the training set. 10% of the validation set and 30% of the test set Out-of-distribution samples For evaluation purposes only, it has a wider propeller speed range and more frequent rudder angle changes.

[0069] The loss function of the spatiotemporal fusion Informer model is jointly constructed using mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE), and is expressed as follows: .

[0070] In the formula, The mean absolute error, . The root mean square error, . The mean absolute percentage error, . The average absolute error weighting, . The root mean square error weight is used. . Weighted by the average absolute percentage error. . Let be the true value of the k-th parameter at time t. Let t be the predicted value of the k-th parameter at time t, and T be the prediction time domain length.

[0071] The Adam optimizer is used to minimize the loss function, and the training hyperparameters are set as follows: learning rate. Batch size Training cycle The initializer is set to the sequence length during training. Training cycle .

[0072] In this implementation process, to analyze the predictive performance of the model, the Mean Absolute Error (MAE) is selected. ), Root Mean Squared Error ) and Mean Absolute Percentage Error These three forecasting evaluation metrics measure the mean absolute deviation, standard deviation, and relative error between predicted and actual values, reflecting the overall forecasting accuracy of the model and the dispersion of the error distribution; they represent the average percentage of the forecast error relative to the actual value. Based on this, the output of medium- and short-term forecasting results includes: (1) Prediction results of ship motion within 120 seconds using the spatiotemporal fusion Informer model.

[0073] A representative sea state of 4-5 was randomly selected from the dataset, and the model's predicted output and actual results for ship motion over 120 seconds were compared, including pitch speed, sway speed, roll rate, bow rate, and roll angle. Figures 3-7 As shown, the predicted oscillation velocity curve generally follows the same trend as the actual curve. The root mean square error is shown in Table 1.

[0074] Table 1. Root mean square error of the spatiotemporal fusion Informer model predictions within 120 seconds.

[0075] In summary, the spatiotemporal fusion Informer model proposed in this application demonstrates good performance in predicting various motion states of ships. The predicted curves for most motion states are consistent with the actual curves, and the root mean square error is at a low level, indicating that the model can effectively learn the temporal characteristics of ship motion and provides a feasible method for predicting ship motion states to assist helicopter landing.

[0076] (2) Prediction results of ship motion within 900 seconds using the spatiotemporal fusion Informer model.

[0077] One sea state each of 2-3, 3-4, 4-5, and 5-6 was randomly selected from a large dataset to specifically validate the prediction accuracy and sea state adaptability of the proposed model. Specific experimental results are shown below. Figures 8-19 As shown, the results for each operating condition include three representative comparison results: comparison between the sway velocity test set and the predicted value; comparison between the yaw velocity test set and the predicted value; and comparison between the roll angle test set and the predicted value. Figures 8-19 In this text, sway speed, roll speed, and pitch angle are all expressed in English, and time-step represents the time step.

[0078] 1) Sea state 2-3 (low sea state). For example... Figures 8-10 The results show that, under sea states 2-3, the spatiotemporal fusion Informer model's predictions of sway velocity largely match the actual values ​​across most time steps. The overall predicted trend of sway velocity is quite close to the actual value; however, in some areas with significant fluctuations, such as time steps 200-400, the predicted values ​​fail to fully capture the fluctuations in the actual values. The early-stage capture of roll dynamics is good. The root mean square error of the predictions for this sea state is shown in Table 2.

[0079] Table 2. Root mean square error of the spatiotemporal fusion Informer model within 900 seconds under sea states 2-3.

[0080] The model provided in this application demonstrates a certain degree of accuracy in short-term prediction of ship motion in sea states 2-3, particularly in predicting motion trends. However, its prediction of subtle abrupt changes is relatively coarse.

[0081] 2) Sea state 3-4 (low to medium sea state). (By...) Figures 11-13 The results clearly and intuitively show that the errors of most parameters in the spatiotemporal fusion Informer model increase under sea states 3-4 compared to sea states 2-3, but the key attitude parameters still maintain high accuracy, with the roll angle increasing by only 8.9% compared to sea states 2-3, accurately capturing changes in ship attitude. The root mean square error of the prediction under sea states 3-4 is shown in Table 3.

[0082] Table 3. Root mean square error of the spatiotemporal fusion Informer model prediction within 900 seconds under sea states 3-4.

[0083] 3) Sea state 4-5 (medium to high sea state). For example... Figures 14-16As shown, the spatiotemporal fusion Informer model continues to demonstrate good predictive performance for ship sway speed as sea state increases. Even in areas with large fluctuations, errors occur, which may be due to the model's insufficient sensitivity or accuracy in responding to environmental disturbances (such as wind and waves), but overall, the results remain within acceptable limits. The root mean square error of predictions for sea states 4-5 is shown in Table 4.

[0084] Table 4. Root mean square error of the spatiotemporal fusion Informer model within 900 seconds under sea states 4-5.

[0085] 4) Sea state 5-6 (high sea state). Under high sea state conditions, such as... Figures 17-19 As shown, the spatiotemporal fusion Informer model demonstrates increasingly outstanding accuracy in predicting sway velocity. Under high sea states, the predicted curve remains relatively close to the actual curve over most time steps, especially in regions with significant velocity variations, where the prediction performance is excellent. The root mean square error of the predictions under sea states 5-6 is shown in Table 5.

[0086] Table 5. Root mean square error of the spatiotemporal fusion Informer model within 900 seconds under sea states 5-6.

[0087] In summary, the experimental results demonstrate that the proposed spatiotemporal fusion Informer model exhibits a certain degree of accuracy in predicting ship motion states under different sea states, showing optimal performance in low sea states and controllable performance in medium and high sea states, particularly excelling in motion trend prediction. By providing these short-to-medium-term prediction results to a helicopter path planning system, the system can combine the predicted ship motion trends to pre-plan the optimal path for the helicopter from approach to landing, avoiding dangerous periods and areas of drastic changes in ship attitude. Especially in high sea states, the short-to-medium-term predictions can anticipate the intensity and cycle of ship motion, helping the path planning system to formulate safer and more efficient landing paths, thereby significantly improving landing efficiency and pilot safety.

[0088] Furthermore, under high sea states, the influence of wind, waves, and ocean currents causes ships to roll more frequently and with greater amplitude. Unlike ultra-short-term ship motion prediction tasks, medium- and short-term ship motion prediction focuses on the trend of ship motion changes over a timescale of tens of seconds to several minutes. At this time, the relationship between wave excitation and ship motion is more complex, exhibiting problems such as long-term dependence, non-stationarity, and noise interference. Traditional RNN or LSTM models are prone to gradient vanishing and high computational complexity when modeling long sequences. The proposed spatiotemporal fusion Informer (Information Transformer) model provides short-term ship motion prediction. It has at least the following advantages: 1. This application maps ship motion parameters to three-dimensional spatial vectors, which can capture spatial coupling relationships and improve the accuracy of attitude trend prediction by 20%-25% under high sea states.

[0089] 2. The multi-scale ProbSparse attention mechanism adopted in this application takes into account both long-term trends and short-term fluctuations, thereby improving the multi-step prediction accuracy by 18%-22%.

[0090] 3. The decoder used in this application dynamically adjusts the sequence length according to the sea state level, which significantly enhances the adaptability of the model in sea states 2-6 and reduces the generalization error by 15%-18%.

[0091] 4. This application uses a convolution-attention fusion module to achieve secondary feature extraction, which can enhance local spatial features, reduce the accumulation of prediction errors, and reduce the RMSE of predictions in the short to medium term by more than 25% compared with the original model.

[0092] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 20As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores short- to medium-term ship motion prediction data based on the spatiotemporal fusion Informer model. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a short- to medium-term ship motion prediction method based on the spatiotemporal fusion Informer model.

[0093] Those skilled in the art will understand that Figure 20 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment to which the present application is applied. Specific computer equipment may include, for example, [the following is a list of possible additional structures]. Figure 20 The diagram shows more or fewer components, or combinations of certain components, or different component arrangements.

[0094] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0095] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0096] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0097] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0098] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (RRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0099] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0101] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for predicting short- to medium-term ship motion based on a spatiotemporal fusion Informer model, characterized in that, include: Obtain short- to medium-term ship motion parameters, environmental parameters, and wave spectrum parameters to generate time series data; Spatial and location encoding are performed on the time series data, and spatiotemporal fusion features are obtained based on the spatial and location encoding results. Based on the Informer model, a multi-head ProbSparse attention layer and a Distilling layer are introduced to construct a spatiotemporal fusion Informer model; The ship motion prediction results are obtained by using the spatiotemporal fusion Informer model and the spatiotemporal fusion features.

2. The method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model according to claim 1, characterized in that, Spatial and location encoding are performed on the time series data, and spatiotemporal fusion features are obtained based on the spatial and location encoding results, including: The ship's multi-degree-of-freedom motion parameters are obtained based on the time series data; The multi-degree-of-freedom motion parameters are mapped in three-dimensional space to obtain a three-dimensional space vector. The three-dimensional spatial vector is spatially encoded to obtain the spatial encoding result; The location encoding is determined based on the time step index of the time series data, and the location encoding result is obtained. The spatiotemporal fusion feature is obtained by superimposing the spatial encoding result and the positional encoding result.

3. The method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model according to claim 1, characterized in that, Based on the Informer model, a multi-head ProbSparse attention layer and a Distilling layer are introduced to construct a spatiotemporal fusion Informer model, including: The encoder of the Informer model is constructed using a multi-head ProbSparse attention layer and the Distilling layer. A convolutional-attention fusion module is constructed to extract features from the output features of the encoder; A sea state adaptive decoder is constructed using a multi-head ProbSparse attention layer and a multi-head attention layer to serve as the decoder for the Informer model, thereby obtaining the spatiotemporal fusion Informer model. The input to the sea state adaptive decoder is the output of the convolution-attention fusion module and a dynamic placeholder. The dynamic placeholder is determined based on the sea state level.

4. The method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model according to claim 3, characterized in that, Using the aforementioned spatiotemporal fusion Informer model, ship motion prediction results are obtained based on the spatiotemporal fusion features, including: Local spatial convolution and feature extraction are performed on the spatiotemporal fusion features to obtain spatiotemporal features; Using the encoder, based on the spatiotemporal features, the encoded features are obtained; The convolution-attention fusion module is used to extract features from the encoded features and then perform attention weighting to obtain fused features; Using the sea state adaptive decoder, the decoding features are obtained based on the first 1 / n length of the fused features and the dynamic placeholders; A fully connected layer is used to map the decoded features into ship motion prediction results; A feedback adjustment mechanism is set up to dynamically correct the current ship motion prediction result based on the previous ship motion prediction result.

5. The method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model according to claim 4, characterized in that, The spatiotemporal fusion features are subjected to local spatial convolution and feature extraction to obtain spatiotemporal features, including: The local spatiotemporal features are extracted using a 1×3 convolutional kernel; The spatiotemporal features are obtained by adjusting the dimensions of the local spatiotemporal features and the local temporal features using the Flatten layer.

6. The method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model according to claim 4, characterized in that, The construction process of the multi-head ProbSparse attention layer includes: The spatiotemporal features are linearly transformed according to different weight matrices to obtain query vector, key vector and value vector; Attention scores are determined based on query vectors, key vectors, and value vectors; Global-scale attention and local-scale attention are constructed based on the attention scores; By fusing the global-scale attention and local-scale attention and dynamically assigning weights, ProbSparse attention is obtained. A multi-head ProbSparse attention layer is formed based on ProbSparse attention.

7. The method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model according to claim 1, characterized in that, The loss function of the spatiotemporal fusion Informer model is constructed jointly using mean absolute error, root mean square error, and mean absolute percentage error, and is expressed as follows: ; In the formula, The mean absolute error, The root mean square error, The mean absolute percentage error, The average absolute error weighting, The root mean square error weight is used. The average absolute percentage error weight.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the short-to-medium-term ship motion prediction method based on the spatiotemporal fusion Informer model as described in any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model as described in any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method for predicting short-to-medium-term ship motion based on the spatiotemporal fusion Informer model as described in any one of claims 1-7.