Ship speed prediction model construction method, device, equipment and storage medium
By screening important features from atmospheric ocean data and removing anomaly sample points, a lightweight speed prediction model for outbound and return journey was constructed, and the problem of inaccurate ship speed prediction in the existing technology was solved, achieving higher prediction accuracy and route differences identification.
Patent Information
- Application Number
- CN202410187376.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-02-20
AI Technical Summary
The lack of a solution to use lightweight models and drive prediction based on atmospheric and ocean data is in the prior art, resulting in inaccurate ship speed prediction.
By obtaining the training set and verification set from atmospheric ocean data, the random forest method is used to filter important features, the abnormal sample points are eliminated in combination with the wavelet decomposition method, and the speed distribution is adjusted using the adaptive adjustment method to build a lightweight speed prediction model for outbound and return journey.
It improves the accuracy of the ship's speed prediction model, can formulate an exclusive speed prediction model for the route, and effectively distinguishes the differences between outbound and return journeys.
Smart Images

Figure CN118094220B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship speed prediction, and in particular to a method, device, equipment and storage medium for constructing a ship speed prediction model. Background Art
[0002] The prediction of ship speed, especially the speed in non-still water, is a difficult problem in the shipping industry. The speed loss of a ship in bad weather is an important factor affecting the safety of the ship. Accurate speed prediction means the prediction of the ship's future sailing position.
[0003] In the relevant technology, empirical statistical methods or machine learning algorithms are often used to predict the speed. The former does not have a comprehensive understanding of the hydrological factors affecting the ship, and the empirical coefficients obtained through empirical equations are not applicable to the ever-changing ship forms. The existing machine learning methods for predicting ship speed have low training efficiency. On the other hand, the ship's speed prediction is usually predicted with the help of ship parameters such as main engine power, but the sea conditions at sea are complex and changeable instantly. Under normal circumstances, the ship-related parameters obtained are not accurate enough, and these parameters cannot completely play a decisive role, resulting in a large deviation between the speed prediction results and the actual situation.
[0004] Based on the above analysis of the development status of this technology field, the existing technology lacks solutions that use lightweight models and drive predictions based on atmospheric and ocean data. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, equipment and storage medium for constructing a ship speed prediction model, aiming to solve the above-mentioned problems in the prior art.
[0006] According to a first aspect of an embodiment of the present invention, a method for constructing a ship speed prediction model is provided, comprising:
[0007] Obtain the training set and the validation set corresponding to the route to be modeled from the atmospheric and ocean data;
[0008] Clean the training set and validation set and construct new features. Use the random forest method to screen all features consisting of new features and original data features to obtain important features for prediction. Based on the important features, form the first training set and the final validation set.
[0009] The wavelet decomposition method is used to remove abnormal sample points in the first training set, and the adaptive adjustment method is used to adjust the speed distribution in the first training set after removing the sample points, so as to obtain the final training set consistent with the data distribution of the final verification set;
[0010] The final training set is divided into an outbound training set and a return training set, and the final validation set is divided into an outbound validation set and a return validation set;
[0011] The outbound training set and the outbound validation set are used to train the initial lightweight model to obtain the outbound speed prediction model for the route to be modeled. The return training set and the return validation set are used to train the initial lightweight model to obtain the return speed prediction model for the route to be modeled.
[0012] According to a second aspect of an embodiment of the present invention, there is provided a device for constructing a ship speed prediction model, comprising:
[0013] A data acquisition module is used to obtain a training set and a validation set corresponding to the route to be modeled from atmospheric and ocean data;
[0014] The important feature screening module is used to clean the training set and the validation set and construct new features. The random forest method is used to screen all features consisting of new features and original data features to obtain the important features for prediction. The first training set and the final validation set are formed based on the important features.
[0015] The training set adjustment module is used to remove abnormal sample points in the first training set by using the wavelet decomposition method, and to adjust the speed distribution in the first training set after removing the sample points by using the adaptive adjustment method, so as to obtain a final training set consistent with the data distribution of the final verification set;
[0016] A data partitioning module is used to divide the final training set into an outbound training set and a return training set, and to divide the final verification set into an outbound verification set and a return verification set;
[0017] The model building module is used to train the initial lightweight model using the outbound training set and the outbound verification set to obtain the outbound speed prediction model of the route to be modeled, and to train the initial lightweight model using the return training set and the return verification set to obtain the return speed prediction model of the route to be modeled.
[0018] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method for constructing a ship speed prediction model as provided in the first aspect of the present disclosure are implemented.
[0019] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps of the method for constructing a ship speed prediction model provided in the first aspect of the present disclosure are implemented.
[0020] The technical solution provided by the embodiment of the present invention includes the following beneficial effects: a ship speed prediction model is constructed based on atmospheric and ocean data, and parameters that are inaccurate with the operation of the ship itself are not used during the model construction process, which effectively improves the accuracy of the ship speed prediction model construction; in order to adapt to the characteristics of the speed data distribution of the route to be modeled, a customized adaptive adjustment method is used to adjust the training set to match the data of the verification set, and finally a corresponding ship speed prediction model can be formulated for the route; and the construction of the model is divided into two parts, the outbound and return trips, which effectively distinguishes the differences between the outbound and return trips.
[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0023] Figure 1 is a flow chart of a method for constructing a ship speed prediction model according to an embodiment of the present invention;
[0024] Figure 2 is a schematic diagram of comparison of prediction results of an embodiment of the present invention;
[0025] Figure 3 is a schematic diagram of a device for constructing a ship speed prediction model according to an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0028] Method Embodiment
[0029] According to an embodiment of the present invention, a method for constructing a ship speed prediction model is provided. Figure 1 : is a flow chart of a method for constructing a ship speed prediction model according to an embodiment of the present invention. Figure 1 As shown, the method for constructing a ship speed prediction model according to an embodiment of the present invention specifically includes:
[0030] In step S110, a training set and a validation set corresponding to the route to be modeled are obtained from the atmospheric and oceanic data, specifically including:
[0031] The ship operation data under different routes are obtained from the atmospheric and ocean data as the training set, and each route includes actual samples of multiple voyages. The complete ship operation data under the route to be modeled is obtained from the atmospheric and ocean data as the verification set.
[0032] That is to say, all data are derived from atmospheric and ocean physical quantities or are derived based on atmospheric and ocean physical quantities, and do not involve physical quantities related to the ship itself. The present invention needs to identify the nonlinear relationship between meteorological and ocean data and the ship's speed.
[0033] In step S120, the training set and the validation set are cleaned and new features are constructed. The random forest method is used to screen all features consisting of the new features and the original data features to obtain the important features for prediction. The first training set and the final validation set are formed based on the important features, which specifically include:
[0034] According to the instantaneous moment corresponding to the speed, the linear difference method is applied to retrieve the meteorological and oceanographic element information data. In this embodiment, the meteorological and oceanographic elements are derived from the ERA-5 reanalysis data and the HYCOM data. The training set and the validation set are cleaned, and the distorted data and the data of the ship when entering and leaving the port are removed to obtain the cleaned training set and the cleaned validation set;
[0035] Based on the original features in the cleaned training set and the cleaned validation set, the element construction method is used to construct new features including synthetic wind speed, synthetic current speed, steep wave height, wind speed ship tangential wind speed and current speed ship tangential component. The average speed under the preset synthetic wind speed and steep wave height sea conditions is used as the new feature for setting the speed, and a training set including the new features and a validation set including the new features are formed. The synthesis method of synthetic wind speed and synthetic current speed is shown in Formula 1 and Formula 2, the synthesis method of steep wave height is shown in Formula 3, and the synthesis method of wind speed ship tangential wind speed and current speed ship tangential component is shown in Formula 5:
[0036]
[0037]
[0038] s=2πH / gT 2 Formula 3;
[0039] T_wind=u10·sinθ+v10·cosθ Formula 4;
[0040] T_current=cur_u·cosθ+cur_v·sinθ Formula 5;
[0041] Among them, uv_speed represents the composite wind speed, uv_current represents the composite flow speed, s represents the steep wave height, H represents the wave height, T represents the wave period, g represents the acceleration of gravity, T_wind represents the ship tangential wind speed, T_current represents the ship tangential component of the flow speed, u10 represents the 10-meter longitude wind speed, v10 represents the 10-meter latitudinal wind speed, cur_u represents the longitude surface flow speed, cur_v represents the latitudinal surface flow speed, and θ represents the angle between the traveling direction and the horizontal direction.
[0042] The set speed is the navigation speed set before the ship sails, and is also an important feature that can be used for modeling. The cargo loads carried by ships in different voyages are different. Sometimes ballast water injection is required to maintain the overall balance of the ship. In addition, due to hull wear, engine aging and other reasons, the set speed of the ship often cannot correspond to the still water speed of the ship. It is difficult to reach the set speed under actual circumstances. Therefore, this embodiment is based on historical statistical results and takes the average speed under sea conditions of 3m / s synthetic wind speed and 4m steep wave height as the set speed.
[0043] The random forest method is used for feature selection. In this embodiment, there are 19 total features, and there are 15 important features after screening. Removing features with little correlation is conducive to the rapid convergence of model training. In this embodiment, the important features retained in the new features include the set speed, steep wave height, synthetic flow velocity, ship tangential wind speed and ship tangential component of flow velocity. The important features retained in the original features include wind and wave significant wave height, average wave period, 10-meter wind speed in the longitudinal direction, 10-meter wind speed in the latitudinal direction, average wave direction of wind and waves, significant wave height of swell waves, significant wave height of swell waves and wind waves superimposed significant wave height, average wave direction, average wave direction of swell waves and meridian surface velocity.
[0044] In the training set including the new features and the validation set including the new features, only the data of important features are retained to form the first training set and the final validation set.
[0045] In step S130, the wavelet decomposition method is used to remove abnormal sample points in the first training set, and the adaptive adjustment method is used to adjust the speed distribution in the first training set after removing the sample points to obtain a final training set consistent with the data distribution of the final verification set, which specifically includes:
[0046] A curve showing the change of speed labels over time in the first training set is drawn, and the wavelet decomposition method is used to remove sample points that deviate too much or are abnormal in the curve, that is, to remove some abnormal data in the complete voyage.
[0047] The K-nearest neighbor algorithm is used to calculate the distance between the different ship operation data under each route and the final verification set in the first training set after removing abnormal sample points. The distance in this embodiment refers to the characteristic distance. The same amount of data is selected from each route to obtain the second training set, so that the number of voyages under each route occupies the same proportion in the training process;
[0048] The data belonging to the same route as the final verification set are extracted from the second training set as the alignment target data, and sample points in the alignment target data are extracted at equal intervals as alignment points. The other data not extracted in the second training set are used as the data to be adjusted, and sample points in each data to be adjusted are extracted with the same number of alignment points as adjustment points. The speed distribution of all sample points in the data to be adjusted is adjusted by aligning the adjustment points with the alignment points in sequence, so as to obtain the final training set consistent with the data distribution of the final verification set.
[0049] That is, by using data that is not much different from the distribution of the validation set as a reference, the distribution of other data in the second training set is adjusted to narrow the data distribution difference between the training data and the validation data, so as to construct a ship speed prediction model that meets the corresponding route characteristics.
[0050] In this embodiment, the speed distribution may refer to the spatial distribution of the speed and other distributions, and the number of selected alignment target data is one piece of data, that is, the data included in one voyage.
[0051] In step S140, the final training set is divided into an outbound training set and a return training set, and the final verification set is divided into an outbound verification set and a return verification set.
[0052] In step S150, the outbound training set and the outbound validation set are used to train the initial lightweight model to obtain the outbound speed prediction model of the route to be modeled, and the return training set and the return validation set are used to train the initial lightweight model to obtain the return speed prediction model of the route to be modeled, which specifically includes:
[0053] Use the outbound training set and outbound validation set to train the initial LightGBM lightweight model. Use the OPTUNA hyperparameter optimization framework to adjust the parameters in the LightGBM lightweight model in real time during the training process. After the training, the outbound speed prediction model is obtained.
[0054] Use the return training set and return validation set to train the initial LightGBM lightweight model. During the training process, use the OPTUNA hyperparameter optimization framework to adjust the parameters in the LightGBM lightweight model in real time. After the training, the return speed prediction model is obtained.
[0055] In this embodiment, the role of the validation set is to evaluate the model effect, and OPTUNA automatically adjusts the parameters.
[0056] The method further comprises:
[0057] In step S160, the outbound speed prediction model is used to predict the ship's speed at each moment in the outbound phase in the corresponding route, and the return speed prediction model is used to predict the ship's speed at each moment in the return phase in the corresponding route.
[0058] In this embodiment, a complete route data is selected as the test set. The test set and the validation set belong to the same route but not the same voyage. The RMSE and MAE between the predicted speed and the actual speed are calculated. The empirical equation is selected for the comparison scheme. The form of the empirical equation selected in this embodiment is shown in Formula 6:
[0059] V=V0-(1.08h-0.126qh+2.77×10 -3 Fcosα)(1-2.33×10 -7 ·D·V0) Formula 6;
[0060] Among them, V represents the ship speed predicted by the empirical equation, V0 represents the set sailing speed of the ship, h represents the wave height, q represents the angle between the heading and the wave direction, F represents the magnitude of the horizontal force, and D represents the ship's deadweight tonnage. Using V instead of V0 during navigation can grasp the ship's sailing position at each moment.
[0061] Figure 2 is a schematic diagram of the comparison of prediction results of the embodiment of the present invention, such as Figure 2 As shown, the speed sequence predicted by the ship speed prediction model constructed by the present invention is closer to the AIS speed. The RMSE between the actual speed of the ship on the entire route and the predicted speed is 0.96, and the MAE is 0.76. The RMSE between the actual speed and the speed predicted by the empirical equation is 2.0, and the MAE is 1.8. It can be concluded that the speed prediction effect of the model of the present invention is significant, which is greatly improved compared with the empirical equation.
[0062] To sum up, in response to the existing problems, the method for constructing a ship speed prediction model is invented. The ship speed prediction model is driven by atmospheric and ocean data. In the process of model construction, parameters that are inaccurate with the operation of the ship itself are not used, which effectively improves the accuracy of the ship speed prediction model construction; the element method is used to construct new features, and the random forest method is used to screen the more important features among all features, which can effectively avoid the overfitting of the model from the side; the wavelet decomposition method is used to eliminate abnormal data points in the sample and optimize the data content; in order to adapt to the characteristics of the speed data distribution of the route to be modeled, the training set is adjusted to match the data distributed in the verification set using a custom adaptive adjustment method; a series of methods are used to obtain the final training data that matches the route to be modeled, and finally a corresponding ship speed prediction model can be formulated for the route; and the construction of the model is divided into two parts, the outbound and return trips, which effectively distinguishes the differences between the outbound and return trips.
[0063] Device Embodiment
[0064] According to an embodiment of the present invention, a device for constructing a ship speed prediction model is provided. Figure 3 Schematic diagram of a device for constructing a ship speed prediction model according to an embodiment of the present invention. Figure 3 As shown, the device for constructing a ship speed prediction model according to an embodiment of the present invention specifically includes:
[0065] The data acquisition module 30 is used to obtain a training set and a validation set corresponding to the route to be modeled from the atmospheric and oceanic data, specifically for:
[0066] The ship operation data under different routes are obtained from the atmospheric and oceanic data as the training set, and the complete ship operation data under the route to be modeled is obtained from the atmospheric and oceanic data as the verification set.
[0067] The important feature screening module 32 is used to clean the training set and the validation set and construct new features, use the random forest method to screen all features consisting of new features and original data features, obtain the important features for prediction, and form the first training set and the final validation set based on the important features, specifically for:
[0068] Clean the training set and validation set, remove the distorted data and the data of ships entering and leaving the port, and obtain the cleaned training set and cleaned validation set;
[0069] Based on the original features in the cleaned training set and the cleaned validation set, the element construction method is used to construct new features including synthetic wind speed, synthetic flow speed, steep wave height, wind speed ship tangential wind speed and flow speed ship tangential component. The average speed under the preset synthetic wind speed and steep wave height sea conditions is used as the new feature for setting the speed, and a training set including the new features and a validation set including the new features are formed.
[0070] The training set adjustment module 34 is used to remove abnormal sample points in the first training set by using the wavelet decomposition method, and to adjust the speed distribution in the first training set after removing the sample points by using the adaptive adjustment method, so as to obtain a final training set consistent with the data distribution of the final verification set, and is specifically used for:
[0071] A curve showing the change of speed labels over time in the first training set is drawn, and the wavelet decomposition method is used to remove sample points that deviate too much or are abnormal in the curve.
[0072] The K-nearest neighbor algorithm is used to calculate the distance between the different ship operation data under each route and the final verification set in the first training set after removing abnormal sample points, and the same amount of data is selected from each route to obtain the second training set;
[0073] The data belonging to the same route as the final verification set are extracted from the second training set as the alignment target data, and sample points in the alignment target data are extracted at equal intervals as alignment points. The other data not extracted in the second training set are used as the data to be adjusted, and sample points in each data to be adjusted are extracted with the same number of alignment points as adjustment points. The speed distribution of all sample points in the data to be adjusted is adjusted by aligning the adjustment points with the alignment points in sequence, so as to obtain the final training set consistent with the data distribution of the final verification set.
[0074] A data partitioning module 36 is used to divide the final training set into an outbound training set and a return training set, and to divide the final verification set into an outbound verification set and a return verification set;
[0075] The model building module 38 is used to train the initial lightweight model using the outbound training set and the outbound verification set to obtain the outbound speed prediction model of the route to be modeled, and to train the initial lightweight model using the return training set and the return verification set to obtain the return speed prediction model of the route to be modeled, specifically for:
[0076] Use the outbound training set and outbound validation set to train the initial LightGBM lightweight model. Use the OPTUNA hyperparameter optimization framework to adjust the parameters in the LightGBM lightweight model in real time during the training process. After the training, the outbound speed prediction model is obtained.
[0077] The initial LightGBM lightweight model is trained using the return training set and the return validation set. During the training process, the OPTUNA hyperparameter optimization framework is used to adjust the parameters in the LightGBM lightweight model in real time. After the training, the return speed prediction model is obtained.
[0078] The device further comprises:
[0079] The test module 310 uses the outbound speed prediction model to predict the ship's speed at each moment in the outbound phase in the corresponding route, and uses the return speed prediction model to predict the ship's speed at each moment in the return phase in the corresponding route.
[0080] To sum up, in response to the existing problems, the device for constructing a ship speed prediction model is invented. It constructs a ship speed prediction model based on atmospheric and ocean data. In the process of model construction, parameters that are inaccurate with the operation of the ship itself are not used, which effectively improves the accuracy of the ship speed prediction model construction; the element method is used to construct new features, and the random forest method is used to screen more important features among all features, which can effectively avoid the overfitting of the model from the side; the wavelet decomposition method is used to eliminate abnormal data points in the sample and optimize the data content; in order to adapt to the characteristics of the speed data distribution of the route to be modeled, the training set is adjusted to match the data distributed in the verification set using a custom adaptive adjustment method; a series of methods are used to obtain the final training data that matches the route to be modeled, and finally a corresponding ship speed prediction model can be formulated for the route; and the construction of the model is divided into two parts, the outbound and return trips, which effectively distinguishes the differences between the outbound and return trips.
[0081] Electronic device embodiment
[0082] Figure 4 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 400 may include at least one processor 410 and a memory 420. The processor 410 may execute instructions stored in the memory 420. The processor 410 is connected to the memory 420 through a data bus. In addition to the memory 420, the processor 410 may also be connected to an input device 430, an output device 440, and a communication device 450 through a data bus.
[0083] The processor 410 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0084] Memory 420 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0085] In the embodiment of the present disclosure, executable instructions are stored in the memory 420, and the processor 410 can read the executable instructions from the memory 420 and execute the instructions to implement all or part of the steps of the method for constructing a ship speed prediction model in any of the above exemplary embodiments.
[0086] Computer Readable Storage Medium Embodiments
[0087] In addition to the above-mentioned methods and devices, the exemplary embodiments of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions, and the computer program instructions can be executed by a processor to implement all or part of the steps described in the method for constructing a ship speed prediction model in any of the above-mentioned exemplary embodiments.
[0088] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages and scripting languages (e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0089] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.
[0090] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned 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 constructing a ship speed prediction model, characterized in that: include: Obtain the training set and the validation set corresponding to the route to be modeled from the atmospheric and ocean data; Cleaning the training set and the validation set and constructing new features, using the random forest method to screen all features consisting of the new features and original data features to obtain important features for prediction, and forming a first training set and a final validation set based on the important features; Use the wavelet decomposition method to remove abnormal sample points in the first training set, and use the adaptive adjustment method to adjust the speed distribution in the first training set after removing the sample points, so as to obtain a final training set consistent with the data distribution of the final verification set; Dividing the final training set into an outbound training set and a return training set, and dividing the final verification set into an outbound verification set and a return verification set; The outbound training set and the outbound verification set are used to train an initial lightweight model to obtain an outbound speed prediction model for the route to be modeled; the return training set and the return verification set are used to train an initial lightweight model to obtain a return speed prediction model for the route to be modeled.
2. The method according to claim 1, characterized in that The method further comprises: The outbound speed prediction model is used to predict the ship's speed at each moment in the outbound phase in the corresponding route, and the return speed prediction model is used to predict the ship's speed at each moment in the return phase in the corresponding route.
3. The method according to claim 1, characterized in that The step of obtaining a training set and a validation set corresponding to the route to be modeled from the atmospheric and oceanic data specifically includes: The ship operation data under different routes are obtained from the atmospheric and oceanic data as the training set, and the complete ship operation data under the route to be modeled is obtained from the atmospheric and oceanic data as the verification set.
4. The method according to claim 1, characterized in that The cleaning of the training set and the validation set and constructing new features specifically includes: Cleaning the training set and the verification set, removing distorted data and data of ships entering and leaving the port, and obtaining a cleaned training set and a cleaned verification set; Based on the original features in the cleaned training set and the cleaned validation set, new features including synthetic wind speed, synthetic flow speed, steep wave height, wind speed ship tangential wind speed and flow speed ship tangential component are constructed using the element construction method, and the average speed under the preset synthetic wind speed and steep wave height sea conditions is used as the new feature for setting the speed, and a training set including the new features and a validation set including the new features are formed.
5. The method according to claim 1, characterized in that The method of removing abnormal sample points in the first training set by using the wavelet decomposition method specifically includes: drawing a curve of the speed label in the first training set changing over time, and removing sample points in the curve that deviate too much or are abnormal by using the wavelet decomposition method.
6. The method according to claim 1, characterized in that The method of using the adaptive adjustment method to adjust the speed distribution in the first training set after removing the sample points to obtain a final training set consistent with the data distribution of the final verification set specifically includes: The K-nearest neighbor algorithm is used to calculate the distance between the different ship operation data under each route and the final verification set in the first training set after removing abnormal sample points, and an equal amount of data is selected from each route to obtain a second training set; Data belonging to the same route as the final verification set are extracted from the second training set as alignment target data, sample points in the alignment target data are extracted at equal intervals as alignment points, other data not extracted from the second training set are used as data to be adjusted, sample points in each data to be adjusted are extracted with the same number of alignment points as adjustment points, the adjustment points are aligned with the alignment points in sequence, the speed distribution of all sample points in the data to be adjusted is adjusted, and a final training set consistent with the data distribution of the final verification set is obtained.
7. The method according to claim 1, characterized in that The using of the outbound training set and the outbound verification set to train the initial lightweight model to obtain the outbound speed prediction model of the route to be modeled, and the using of the return training set and the return verification set to train the initial lightweight model to obtain the return speed prediction model of the route to be modeled specifically includes: The outbound training set and the outbound validation set are used to train an initial LightGBM lightweight model. During the training process, the OPTUNA hyperparameter optimization framework is used to adjust the parameters in the LightGBM lightweight model in real time. After the training is completed, an outbound speed prediction model is obtained. The return training set and the return validation set are used to train the initial LightGBM lightweight model. During the training process, the OPTUNA hyperparameter optimization framework is used to adjust the parameters in the LightGBM lightweight model in real time. After the training, the return speed prediction model is obtained.
8. A device for constructing a ship speed prediction model, characterized in that: include: A data acquisition module is used to obtain a training set and a validation set corresponding to the route to be modeled from atmospheric and ocean data; An important feature screening module, used for cleaning the training set and the validation set and constructing new features, using the random forest method to screen all features consisting of the new features and the original data features, obtaining the predicted important features, and forming the first training set and the final validation set based on the important features; A training set adjustment module, used to remove abnormal sample points in the first training set by using a wavelet decomposition method, and to adjust the speed distribution in the first training set after removing the sample points by using an adaptive adjustment method, so as to obtain a final training set consistent with the data distribution of the final verification set; A data partitioning module, used to divide the final training set into an outbound training set and a return training set, and to divide the final verification set into an outbound verification set and a return verification set; The model building module is used to train an initial lightweight model using the outbound training set and the outbound verification set to obtain an outbound speed prediction model for the route to be modeled, and to train an initial lightweight model using the return training set and the return verification set to obtain a return speed prediction model for the route to be modeled.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method for constructing a ship speed prediction model as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by a processor, the steps of the method for constructing a ship speed prediction model as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
High-speed train bearing fault diagnosis method based on ensemble learning
CN114861719A
Ship trim optimization method and system
CN115600311A