Ship and salvaged object relative angle time sequence prediction method and system under different wave heights based on multi-model fusion
The LSTM-RandomForest combined model, combining RandomForest's spatial feature mining with LSTM's temporal pattern capture, solves the problem of insufficient prediction accuracy of the relative angle between the ship and the target, improves the prediction accuracy in wave conditions, and ensures the safety and success rate of the salvage mission.
Patent Information
- Application Number
- CN202510586275.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-10-10
Smart Images

Figure CN120763884A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of ship salvage, in particular, especially relates to a ship and salvaged object relative angle time series prediction method and system under different wave heights based on multi-model fusion. BACKGROUND
[0002] With the implementation of China's marine power strategy, China's far sea transportation industry has developed rapidly, and marine rescue and salvage has become one of the important factors to promote China's marine economic development. The salvage process is jointly affected by factors such as strong wind, wave and ocean current, among which the inclination angle of the salvage ship and the target object is an important parameter in the salvage process, which directly affects the success rate of salvage. If the relative angle is too large, the salvage task will be terminated in advance, which greatly protects the safety of people's lives and property. If the relative position relationship between the salvage ship and the target object under high sea conditions can be predicted, many salvage ship overturning accidents can be avoided, which has great significance for the safety of rescue and salvage.
[0003] At present, there are methods for predicting the single motion posture of ships and target objects, including traditional physical models (such as hydrodynamic equations, Kalman filtering), machine learning algorithms and deep learning models. Among them, artificial neural networks have LSTM / GRU and LSTM-CNN algorithms and other methods, but the precision of the above methods is insufficient and needs to be improved. SUMMARY
[0004] In view of the above technical problems, a ship and salvaged object relative angle time series prediction method and system under different wave heights based on multi-model fusion are provided. The LSTM-RandomForest combined model achieves excellent performance on the test set, providing an effective method to improve the prediction accuracy of the relative position of the ship and the target object under wave conditions.
[0005] The technical means adopted by the present application are as follows: A ship and salvaged object relative angle time series prediction method under different wave heights based on multi-model fusion, comprising the following steps: Obtain initial data; the initial data includes ship and target object motion time series data under multiple wave height conditions; Preprocess the initial data to generate effective initial data, and divide the training data set and the test data set; Based on the above training data set, the RandomForest model and the LSTM model are constructed and trained respectively; Input the test data set into the trained RandomForest model and LSTM model, and evaluate the model; Based on the trained model, the ship-target angle prediction under dynamic changes in wave height is achieved.
[0006] Furthermore, during the preprocessing process, based on the initial data obtained, a variable correlation heat map is drawn to screen key features, a sliding window method is used to construct supervised learning samples, and data preprocessing is performed through MinMax normalization and Standard normalization.
[0007] Furthermore, in the specific prediction process, the prediction is first performed through RandomForest, which includes the following steps: denormalizing the prediction results of the model to restore them to the scale of the original data, selecting the two variable state parameters (Ha, Da) at the previous moment (ta), that is, the instantaneous value of the relative angle (Da); and predicting the output target at the next moment (tb), that is, the instantaneous value of the relative angle (Db).
[0008] Furthermore, in the specific prediction process, LSTM prediction includes the following steps: selecting two variable state parameters (Ha, Da) at the previous moment (ta), that is, the instantaneous value of the relative angle (Da); predicting the output target at the next moment (tb), that is, the instantaneous value of the relative angle (Db).
[0009] Furthermore, during the test data set testing, R 2 The model is evaluated using the dual indicators of RMSE and RMS.
[0010] A time series prediction system for the relative angle between a ship and a salvaged object at different wave heights based on multi-model fusion, comprising: A data acquisition module is used to acquire initial data; the initial data includes time series data of ship and target motion under multiple wave height conditions; The data preprocessing module is used to preprocess the initial data to generate valid data for model construction, training and testing; RandomForest model construction module, used to build RandomForest models based on valid data; LSTM neural network model construction module, used to build LSTM neural network model based on valid data; The RandomForest model prediction module is used to predict the ship-target angle under dynamic changes in wave height based on valid data; The LSTM neural network model prediction module is used to predict the ship-target angle under dynamic changes in wave height based on valid data; The prediction result comparison module is used to compare the prediction data output by the RandomForest model prediction module and the LSTM neural network model prediction module to generate the final prediction result.
[0011] Compared with the existing technology, the present invention has the following advantages: the present invention establishes a comparative analysis framework of random forest and LSTM dual models: random forest focuses on spatial feature mining, and LSTM focuses on temporal pattern capture; R is used in the training process. 2 , RMSE, and ultimately achieve accurate modeling of the wave height-angle mapping relationship. By leveraging the complementary strengths of traditional machine learning and deep learning, this method leverages the high interpretability of random forests and the time series modeling capabilities of LSTMs, achieving excellent performance on test sets and providing improved prediction accuracy for the relative position of ships and targets under wave conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0013] Figure 1 It is a flow chart of the present invention.
[0014] Figure 2 Schematic diagram of RandomForest and LSTM model details. DETAILED DESCRIPTION
[0015] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0016] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is in no way intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0017] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0018] Unless otherwise specified, the relative arrangement of the parts and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention. At the same time, it should be clear that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to actual proportional relationships. The technology, methods and equipment known to those of ordinary skill in the relevant art may not be discussed in detail, but in appropriate cases, the technology, methods and equipment should be considered as a part of the specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of the exemplary embodiments can have different values. It should be noted that similar numbers and letters represent similar items in the following drawings, and therefore, once an item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.
[0019] In the description of the present invention, it should be understood that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "horizontal, vertical, vertical, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the device or element referred to must have a specific direction or be constructed and operated in a specific direction. Therefore, they cannot be understood as limiting the scope of protection of the present invention: the directional words "inside and outside" refer to the inside and outside relative to the outline of each component itself.
[0020] For ease of description, spatially relative terms such as "above," "above," "on the upper surface of," and "above" may be used herein to describe the spatial positional relationship of a device or feature to other devices or features as shown in the figures. It should be understood that spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is inverted, a device described as "above" or "on top of" another device or structure would then be positioned as "below" or "below" the other device or structure. Thus, the exemplary term "above" may include both the orientations of "above" and "below." The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used herein should be interpreted accordingly.
[0021] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of the present invention.
[0022] like Figure 1 、 2 As shown, the embodiment of the present invention discloses a method for predicting the relative angle between a ship and a salvaged object at different wave heights based on multi-model fusion, comprising the following steps: Acquiring initial data; the initial data includes time series data of ship and target motion under multiple wave height conditions; Preprocess the initial data to generate valid initial data and divide it into training data set and test data set; Based on the above training data sets, the RandomForest model and LSTM model are constructed and trained respectively; Input the test dataset into the trained RandomForest model and LSTM model to evaluate the model; Based on the trained model, the ship-target angle prediction is achieved under dynamic wave height changes. In the actual prediction process, the model used for the specific application scenario is determined based on the higher accuracy of the RandomForest model or LSTM model confirmed during training.
[0023] Furthermore, in the preprocessing process, step 1 obtains the time series data of ship and target motion under multiple wave height conditions, where the input features are time and wave height, and the output features are relative angles. A variable correlation heat map is drawn to screen key features, and a sliding window method is used to realize supervised learning sample construction. Data preprocessing is performed through MinMax normalization and Standard normalization.
[0024] The standardized data is divided into training set and test set according to a certain ratio of 80% training set and 20% test set.
[0025] The LSTM neural network model of the present invention includes an LSTM layer, a Dropout layer and two fully connected layers, and neurons are randomly discarded through the Dropout layer to prevent overfitting.
[0026] The workflow of the random forest of the present invention is that the model receives standardized time series features (time, wave height) as input, and the target variable is the relative angle of the ship. Ensemble training: By setting up 100 decision trees, each tree is trained based on a differentiated training subset sampled by Bootstrap (sample duplication is allowed), and only some features are randomly selected when the node is split to increase the diversity of the model. Each decision tree independently predicts the relative angle, and the final result is output through mean aggregation (regression task) to reduce the overfitting risk of a single tree. The model quantifies the contribution of time and wave height to the prediction by calculating the reduction in Gini impurity (or MSE reduction) of the feature when the tree node is split, providing a basis for feature engineering. Random forest achieves higher R on the test set due to its parallel training and feature selection capabilities. 2 , reflecting its advantages in spatial feature mining.
[0027] The workflow of the LSTM structure of the present invention is to first reshape the standardized time series features (time, water wave height) A (H, D), that is, the instantaneous values of wave height (H) and relative angle (D) into a three-dimensional tensor (number of samples, time step = 1, number of features = 2), and construct a neural network layer containing 64 LSTM units. The cell state and hidden state are dynamically regulated by the forget gate, input gate and output gate - the forget gate determines how much historical information is retained, the input gate filters the current valid features, and the output gate generates the hidden state of the current time step; then the Dropout layer (0.2 probability random deactivation) is connected to prevent overfitting, and then the features are integrated through the fully connected layer activated by ReLU. Finally, the standardized relative angle is predicted by the linear output layer; the model uses the Adam optimizer (learning rate 0.001) to minimize the mean square error loss. After 50 cycles of training, the prediction result is denormalized and restored to the actual angle value, and finally output R 2 =0.9999 and RMSE=0.0003, which verifies its effective memory and feature extraction capabilities in single time step sequence modeling.
[0028] During the test data set testing, R 2 The model is evaluated using the dual indicators of RMSE and RMS.
[0029] R2 The coefficient of determination (R) is used to measure the model's ability to explain the variation in the target variable (relative angle). 2 The evaluation is better than the absolute error evaluation that only relies on the mean square error (MSE) and is used to compare the predictive ability of different models. Its formula is: (1) in, is the true value, is the predicted value, is the mean of the true values. 2 The closer it is to 1, the better the model fitting effect is.
[0030] RMSE (Root Mean Squared Error) is a core indicator that measures the difference between the model's predicted value and the true value. The smaller the value, the higher the model's prediction accuracy. Its formula is: (2) Where (n) is the number of samples, and are the true value and the predicted value respectively.
[0031] Furthermore, in the specific prediction process, the prediction is first performed through RandomForest, which includes the following steps: denormalizing the prediction results of the model to restore them to the scale of the original data, selecting the two variable state parameters (Ha, Da) at the previous moment (ta), that is, the instantaneous value of the relative angle (Da); and predicting the output target at the next moment (tb), that is, the instantaneous value of the relative angle (Db).
[0032] Furthermore, in the specific prediction process, LSTM prediction includes the following steps: selecting two variable state parameters (Ha, Da) at the previous moment (ta), that is, the instantaneous value of the relative angle (Da); predicting the output target at the next moment (tb), that is, the instantaneous value of the relative angle (Db).
[0033] A time series prediction system for the relative angle between a ship and a salvaged object at different wave heights based on multi-model fusion, comprising: A data acquisition module is used to acquire initial data; the initial data includes time series data of ship and target motion under multiple wave height conditions; The data preprocessing module is used to preprocess the initial data to generate valid data for model construction, training and testing; RandomForest model construction module, used to build RandomForest models based on valid data; LSTM neural network model construction module, used to build LSTM neural network model based on valid data; The RandomForest model prediction module is used to predict the ship-target angle under dynamic changes in wave height based on valid data; The LSTM neural network model prediction module is used to predict the ship-target angle under dynamic changes in wave height based on valid data; The prediction result comparison module is used to compare the prediction data output by the RandomForest model prediction module and the LSTM neural network model prediction module to generate the final prediction result.
[0034] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the relative angle between a ship and a salvaged object at different wave heights based on multi-model fusion, characterized in that: The steps include: Acquiring initial data; the initial data includes time series data of ship and target motion under multiple wave height conditions; Preprocess the initial data to generate valid initial data and divide it into training data set and test data set; Based on the above training data sets, the RandomForest model and LSTM model are constructed and trained respectively; Input the test dataset into the trained RandomForest model and LSTM model to evaluate the model; Based on the trained model, the ship-target angle prediction under dynamic changes in wave height is achieved.
2. The method according to claim 1, characterized in that During the preprocessing process, based on the initial data obtained, a variable correlation heat map is drawn to screen key features, a sliding window method is used to construct supervised learning samples, and data preprocessing is performed through MinMax normalization and Standard normalization.
3. The method according to claim 1, characterized in that In the specific prediction process, the prediction is first performed through RandomForest, which includes the following steps: the prediction results of the model are denormalized to restore the scale of the original data, and the two variable state parameters (Ha, Da) at the previous moment (ta) are selected, that is, the instantaneous value of the relative angle (Da); the output target at the next moment (tb) is predicted, that is, the instantaneous value of the relative angle (Db).
4. The method according to claim 1, wherein In the specific prediction process, LSTM prediction includes the following steps: selecting two variable state parameters (Ha, Da) at the previous moment (ta), that is, the instantaneous value of the relative angle (Da); predicting the output target at the next moment (tb), that is, the instantaneous value of the relative angle (Db).
5. The method according to claim 1, wherein During the test data set testing, R 2 The model is evaluated using the dual indicators of RMSE and RMS.
6. A time series prediction system for the relative angle between a ship and a salvaged object at different wave heights based on multi-model fusion, characterized in that: include: A data acquisition module is used to obtain initial data; The initial data includes time series data of ship and target motion under multiple wave height conditions; The data preprocessing module is used to preprocess the initial data to generate valid data for model construction, training and testing; RandomForest model construction module, used to build RandomForest models based on valid data; LSTM neural network model construction module, used to build LSTM neural network model based on valid data; The RandomForest model prediction module is used to predict the ship-target angle under dynamic changes in wave height based on valid data; The LSTM neural network model prediction module is used to predict the ship-target angle under dynamic changes in wave height based on valid data; The prediction result comparison module is used to compare the prediction data output by the RandomForest model prediction module and the LSTM neural network model prediction module to generate the final prediction result.