Sea wave height prediction method and device, storage medium and computer program product

By constructing multivariate datasets and training models with split data sets, the method improves sea wave height prediction accuracy by addressing the limitations of single-source data reliance in traditional methods.

CN120316495APending Publication Date: 2025-07-15HUANENG (ZHEJIANG) ENERGY DEV CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510314591.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

Traditional methods rely on a single data source and cannot effectively handle the complex relationships of multi-dimensional environmental data, resulting in low prediction accuracy of wave height.

Method used

A multivariate data set is constructed, and the prediction model is trained through the training set and verification set, and the wave height prediction is predicted using a random forest algorithm and a decision tree. The missing values and outliers are processed in combination with interpolation, and the threshold is set for wave state judgment.

Benefits of technology

It improves the accuracy and reliability of wave height prediction, can promptly identify extreme wave status and initiate emergency responses to ensure the safety of maritime facilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316495A_ABST
    Figure CN120316495A_ABST
Patent Text Reader

Abstract

The invention discloses a sea wave height prediction method and device, a storage medium and a computer program product, and relates to the field of ocean engineering.The sea wave height prediction method comprises the steps that a multivariate data set is constructed according to wind speed data and sea wave data in a target area within a first time period, the data of each category in the multivariate data set is divided according to a preset proportion, a training set and a verification set are obtained, the categories of the data contained in the training set and the verification set are the same, and the first time period is a period of time before the current time; training a prediction model through the training set, and adjusting hyper-parameters in the prediction model through the verification set to obtain a target prediction model; the wind speed data and the sea wave data of the target area in a second time period are input into the target prediction model to predict the sea wave height of the target time, the second time period is a time period before the current time and is later than the first time period, and the target time is a time period after the current time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of ocean engineering, and in particular, to a method and device for predicting wave height, a storage medium, and a computer program product. Background Art

[0002] In the field of marine environmental monitoring and prediction, traditional methods often rely on a single data source, such as solely depending on the wave height data of buoys to predict wave height. Since these methods ignore the interaction of multiple complex environmental factors involved in the formation of wave height, their prediction accuracy is often limited.

[0003] In view of the problem in the related art that traditional methods usually rely on a single data source and cannot effectively handle the complex relationships of multi-dimensional environmental data, resulting in low prediction accuracy, no effective solution has been proposed yet.

[0004] Therefore, it is necessary to improve the related art to overcome the above-mentioned defects in the related art. Summary of the Invention

[0005] The embodiments of the present application provide a method and device for predicting wave height, a storage medium, and a computer program product, so as to at least solve the problem in the related art that traditional methods usually rely on a single data source and cannot effectively handle the complex relationships of multi-dimensional environmental data, resulting in low prediction accuracy.

[0006] According to an aspect of the embodiments of the present application, a method for predicting wave height is provided, including: constructing a multi-source data set based on wind speed data and wave data in a target area within a first time period, and dividing the data of each category in the multi-source data set according to a preset ratio to obtain a training set and a validation set, where the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time; training a prediction model through the training set, and adjusting hyperparameters in the prediction model through the validation set to obtain a target prediction model; inputting the wind speed data and wave data in the target area within a second time period into the target prediction model to predict the wave height at a target time, where the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

[0007] In an exemplary embodiment, after constructing a multi-variate data set based on wind speed data and wave data in a target area during a first time period, the method further includes: determining outliers and first missing values in the multi-variate data set, and deleting the outliers to obtain second missing values, where the number of the second missing values is the sum of the number of the first missing values and the number of the outliers; and complementing the second missing values by interpolation to obtain a complete multi-variate data set.

[0008] In an exemplary embodiment, inputting the wind speed data and wave data of the target area during a second time period into the target prediction model to predict the wave height at a target time includes: randomly sampling the input data set to obtain a plurality of sample data sets, and creating a plurality of decision trees corresponding to the plurality of sample data sets, where the input data set includes the wind speed data and the wave data during the second time period, and the plurality of sample data sets are in one-to-one correspondence with the plurality of decision trees; inputting the plurality of sample data sets into the plurality of decision trees respectively to obtain a plurality of prediction results; and determining the wave height according to the plurality of prediction results.

[0009] In an exemplary embodiment, determining the wave height according to the plurality of prediction results includes: determining the wave height according to the following formula where T i (x) is the i-th prediction result among the plurality of prediction results, and n is a positive integer.

[0010] In an exemplary embodiment, after inputting the wind speed data and wave data of the target area during a second time period into the target prediction model to predict the wave height at a target time, the method further includes: determining that the wave state is a normal wave when the wave height is less than a threshold; and determining that the wave state is an extreme wave when the wave height is greater than or equal to the threshold.

[0011] In an exemplary embodiment, after inputting the wind speed data and wave data of the target area during a second time period into the target prediction model to predict the wave height at a target time, the method further includes: continuously monitoring the wave height of the target area when the wave state is the normal wave; and activating an alarm device when the wave state is the extreme wave, where the alarm device is used to remind a target object to initiate an emergency response.

[0012] According to another aspect of the embodiments of the present application, there is also provided a device for predicting sea wave height, including: a partitioning module, configured to construct a multi-variate data set based on wind speed data and sea wave data in a target area within a first time period, and partition the data of each category in the multi-variate data set according to a preset ratio to obtain a training set and a validation set, where the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time; a training module, configured to train a prediction model through the training set and adjust hyperparameters in the prediction model through the validation set to obtain a target prediction model; a prediction module, configured to input wind speed data and sea wave data in the target area within a second time period into the target prediction model to predict the sea wave height at a target time, where the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

[0013] According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program, where the computer program is configured to execute the above-mentioned method for predicting sea wave height when running.

[0014] According to still another aspect of the embodiments of the present application, there is also provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the above-mentioned processor executes the above-mentioned method for predicting sea wave height through the computer program.

[0015] According to still another aspect of the embodiments of the present application, there is also provided a computer program product including a computer program, where the steps of the methods described in the various embodiments of the present application are implemented when the computer program is executed by a processor.

[0016] Through the present application, a multi-variate data set is constructed based on wind speed data and sea wave data in a target area within a first time period, and the data of each category in the multi-variate data set is partitioned according to a preset ratio to obtain a training set and a validation set, where the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time; a prediction model is trained through the training set, and hyperparameters in the prediction model are adjusted through the validation set to obtain a target prediction model; wind speed data and sea wave data in the target area within a second time period are input into the target prediction model to predict the sea wave height at a target time, where the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time. Thereby, the problem in the related art that traditional methods usually rely on a single data source and cannot effectively handle the complex relationships of multi-dimensional environmental data, resulting in low prediction accuracy, is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings herein are incorporated into and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0018] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0019] Figure 1 is a hardware structural block diagram of a computer terminal for a method of predicting sea wave height according to an embodiment of the present application;

[0020] Figure 2 is a flowchart of a method of predicting sea wave height according to an embodiment of the present application;

[0021] Figure 3 is a structural block diagram of a device for predicting sea wave height according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] To enable those skilled in the art to better understand the solutions of the present application, the following clearly and completely describes the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of them. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0024] The method embodiments provided in the embodiments of the present application can be executed on a computer terminal or a similar computing device. Taking the operation on a computer terminal as an example, Figure 1It is a hardware block diagram of a computer terminal for a method of predicting sea wave height according to an embodiment of the present application. As Figure 1 shown, the computer terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor (Central Processing Unit, MCU) or a field programmable gate array (Field Programmable Gate Array, FPGA)), and a memory 104 for storing data. Among them, the above computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above computer terminal. For example, the computer terminal may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.

[0025] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the method of predicting sea wave height in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the computer terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0026] The wireless network provided by the communication provider of the computer terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (Radio Frequency, abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0027] In this embodiment, a method of predicting sea wave height is provided, which is applied to the above computer terminal. Figure 2 It is a flowchart of a method of predicting sea wave height according to an embodiment of the present application. As Figure 2 shown, the process includes the following steps:

[0028] Step S202: Construct a multi-variate data set based on the wind speed data and wave data in the target area during the first time period, and divide the data of each category in the multi-variate data set according to a preset ratio to obtain a training set and a validation set. Herein, the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time.

[0029] Optionally, collect the wind speed, wind direction data, and wave height of the offshore wind farm in the past year, with a data collection frequency of once every 10 minutes. Then, combine the tide data and water depth information in the past year to construct a multi-variate data set. Divide the data of each category in the multi-variate data set according to a ratio of 8:2 to obtain a training set and a validation set. For example, use 80% of the wind speed data in the past year as a training subset and 20% of the data as a validation subset, and sequentially obtain the training subsets and validation subsets corresponding to the data of each category (including but not limited to wind speed data and wave data). Integrate the training subsets of all categories together to obtain a complete training set, and integrate the validation subsets of all categories together to obtain a complete validation set.

[0030] Step S204: Train a prediction model with the training set and adjust the hyperparameters in the prediction model with the validation set to obtain a target prediction model.

[0031] Step S206: Input the wind speed data and wave data in the target area during the second time period into the target prediction model to predict the wave height at the target time. Herein, the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

[0032] Through the above steps, a multi-variate data set is constructed based on the wind speed data and wave data in the target area during the first time period, and the data of each category in the multi-variate data set is divided according to a preset ratio to obtain a training set and a validation set. Herein, the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time. A prediction model is trained with the training set, and the hyperparameters in the prediction model are adjusted with the validation set to obtain a target prediction model. The wind speed data and wave data in the target area during the second time period are input into the target prediction model to predict the wave height at the target time. Herein, the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time. Thus, it solves the problem in the related art that traditional methods usually rely on a single data source and cannot effectively handle the complex relationships of multi-dimensional environmental data, resulting in low prediction accuracy.

[0033] In an exemplary embodiment, after constructing a multivariate dataset based on wind speed data and wave data in a target area during a first time period, the method further includes: determining outliers and first missing values in the multivariate dataset, and deleting the outliers to obtain second missing values, where the number of the second missing values is the sum of the number of the first missing values and the number of the outliers; and complementing the second missing values by interpolation to obtain a complete multivariate dataset.

[0034] In a multivariate dataset for wave height monitoring, outliers are usually detected using statistical methods such as Z-score, interquartile range, or machine learning-based methods such as Isolation Forest. Once outliers are detected, they are usually deleted, and at this time, data is missing at the positions where the outliers originally were. Adding the first missing values (i.e., the original missing values in the multivariate dataset) to the missing values at the positions of the outliers gives the second missing values. To avoid bias caused by missing values in model training, the second missing values are complemented by interpolation, usually using time series interpolation. Among them, time series interpolation can be linear interpolation, that is, drawing a straight line between the two points before and after the missing value to estimate the missing value; it can also be spline interpolation, using a smooth curve to estimate; or model-based interpolation, such as using an ARIMA model to predict the missing value. After interpolation, the positions of the original missing values and outliers will be filled with the estimated or predicted values, thus obtaining a complete multivariate dataset. This dataset will serve as the basis for subsequent model training, enabling the random forest model to be trained based on complete and accurate data, thereby improving the accuracy and reliability of the prediction.

[0035] In an exemplary embodiment, inputting the wind speed data and wave data of the target area during a second time period into the target prediction model to predict the wave height at a target time includes: randomly sampling the input dataset to obtain a plurality of sample datasets, and creating a plurality of decision trees corresponding to the plurality of sample datasets, where the input dataset includes the wind speed data and the wave data during the second time period, and the plurality of sample datasets correspond to the plurality of decision trees one by one; inputting the plurality of sample datasets into the plurality of decision trees respectively to obtain a plurality of prediction results; and determining the wave height according to the plurality of prediction results.

[0036] In an exemplary embodiment, determining the wave height according to the plurality of prediction results includes: determining the wave height according to the following formula where T i (x) is the i-th prediction result among the plurality of prediction results, and n is a positive integer.

[0037] In the random forest algorithm, the input data set (i.e., the complete data set containing wind speed data and wave data in the second time period) is sampled randomly with replacement to generate multiple independent sample data sets. Each sample data set will contain a part of the samples in the input data set. Since it is sampling with replacement, some samples may appear multiple times in the same sample data set, while some samples may not appear at all. This random sampling method increases the diversity between sample data sets, helps reduce the correlation between decision trees, and improves the generalization ability of the model. Next, a decision tree is independently constructed for each generated sample data set. During prediction, the sample data sets are respectively input into the decision trees, and each decision tree generates its own prediction result. According to the following formula, the prediction results of all decision trees are averaged to obtain the final predicted value, i.e., the wave height. In this embodiment, the sum of the prediction results of all decision trees is averaged, and the average value of multiple prediction results is determined as the wave height.

[0038] In an alternative embodiment, the above calculation of the wave height can also be performed in other ways. For example, after obtaining multiple prediction results, the prediction result of each decision tree is multiplied by the weight corresponding to the decision tree to obtain multiple weighted prediction results, and then the multiple weighted prediction results are added to obtain the above wave height.

[0039] In an exemplary embodiment, after inputting the wind speed data and wave data of the target area in the second time period into the target prediction model to predict the wave height at the target time, the method further includes: when the wave height is less than the threshold, determining that the wave state is normal waves; when the wave height is greater than or equal to the threshold, determining that the wave state is extreme waves.

[0040] Optionally, the threshold of the wave height is set to 3 meters. When the predicted wave height is less than 3 meters, it is determined that the wave state is normal waves. This means that the wave height is within a safe range, and the offshore wind farm can continue to operate normally without additional safety measures. When the predicted wave height is equal to or greater than 3 meters, it is determined that the wave state is extreme waves. In this case, the operator of the offshore wind farm needs to activate the warning system and take a series of preventive measures, such as suspending high-risk operations, strengthening equipment, and evacuating non-essential personnel, to ensure the safety of personnel and equipment.

[0041] In an exemplary embodiment, after inputting the wind speed data and wave data of the target area during a second time period into the target prediction model to predict the wave height at a target time, the method further includes: continuously monitoring the wave height of the target area when the wave state is the normal wave; and activating an alarm device when the wave state is the extreme wave, where the alarm device is used to remind a target object to initiate an emergency response.

[0042] When the wave state predicted by the random forest model is the normal wave, it means that the wave height is within a safe range and does not immediately pose a threat to an offshore wind farm, an offshore platform or coastal facilities. In this case, continue with routine monitoring, regularly or real-time collect data such as the wind speed, wind direction, tide, water depth, etc. of the target area, and update the prediction of the wave height based on these data to ensure the continuity and real-time nature of the monitoring. Once the predicted wave state is determined to be the extreme wave, that is, the wave height reaches or exceeds a pre-set threshold, the alarm device will be immediately activated. The function of the alarm device is to timely notify relevant operators or management departments, reminding them that the wave condition is becoming dangerous and may pose a serious threat to offshore or coastal facilities, and an emergency response procedure needs to be initiated immediately. The emergency response can include a series of measures, such as: suspending or stopping offshore operations to ensure personnel safety; strengthening offshore wind power equipment, offshore platforms or coastal buildings to reduce the damage caused by storm surges and large waves; evacuating non-essential personnel to avoid personnel injuries; activating backup power supplies to ensure the operation of critical equipment; and notifying the rescue team to standby and prepare to respond to possible emergencies.

[0043] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application.

[0044] In this embodiment, a device for predicting the wave height is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0045] Figure 3 It is a structural block diagram of a device for predicting sea wave height according to an embodiment of the present application. The device includes:

[0046] A partitioning module 30, configured to construct a multi-variate data set based on wind speed data and sea wave data in a target area within a first time period, and partition the data of each category in the multi-variate data set according to a preset ratio to obtain a training set and a validation set. Wherein, the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time;

[0047] A training module 32, configured to train a prediction model through the training set and adjust hyperparameters in the prediction model through the validation set to obtain a target prediction model;

[0048] A prediction module 34, configured to input wind speed data and sea wave data in the target area within a second time period into the target prediction model to predict the sea wave height at a target time. Wherein, the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

[0049] Through the above device, a multi-variate data set is constructed based on wind speed data and sea wave data in a target area within a first time period, and the data of each category in the multi-variate data set is partitioned according to a preset ratio to obtain a training set and a validation set. Wherein, the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time; a prediction model is trained through the training set, and hyperparameters in the prediction model are adjusted through the validation set to obtain a target prediction model; wind speed data and sea wave data in the target area within a second time period are input into the target prediction model to predict the sea wave height at a target time. Wherein, the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time. Thus, the problem in the related art is solved that traditional methods usually rely on a single data source and cannot effectively process the complex relationships of multi-dimensional environmental data, resulting in low prediction accuracy.

[0050] In an exemplary embodiment, the partitioning module 30 is further configured to determine outliers and first missing values in the multi-variate data set, delete the outliers to obtain second missing values, where the number of the second missing values is the sum of the number of the first missing values and the number of the outliers; and complete the second missing values by interpolation to obtain a complete multi-variate data set.

[0051] In an exemplary embodiment, the prediction module 34 is further configured to randomly sample the input data set to obtain a plurality of sample data sets, and create a plurality of decision trees corresponding to the plurality of sample data sets, where the input data set includes the wind speed data and the sea wave data within the second time period, and the plurality of sample data sets correspond to the plurality of decision trees one by one; input the plurality of sample data sets into the plurality of decision trees respectively to obtain a plurality of prediction results; and determine the sea wave height according to the plurality of prediction results.

[0052] In an exemplary embodiment, the prediction module 34 is further configured to determine the sea wave height according to the following formula where T i (x) is the i-th prediction result among the plurality of prediction results, and n is a positive integer.

[0053] In an exemplary embodiment, the prediction module 34 is further configured to determine that the sea wave state is a normal sea wave when the sea wave height is less than the threshold; and determine that the sea wave state is an extreme sea wave when the sea wave height is greater than or equal to the threshold.

[0054] In an exemplary embodiment, the prediction module 34 is further configured to continuously monitor the sea wave height of the target area when the sea wave state is the normal sea wave; and activate an alarm device when the sea wave state is the extreme sea wave, where the alarm device is used to remind the target object to initiate an emergency response.

[0055] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0056] Optionally, in this embodiment, the above storage medium may be configured to store a computer program for executing the following steps:

[0057] S1, construct a multi-variable data set according to the wind speed data and the sea wave data in the target area within the first time period, and divide the data of each category in the multi-variable data set according to a preset ratio to obtain a training set and a validation set, where the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time;

[0058] S2, train a prediction model through the training set, and adjust the hyperparameters in the prediction model through the validation set to obtain a target prediction model;

[0059] S3. Input the wind speed data and wave data of the target area in the second time period into the target prediction model to predict the wave height at the target time, where the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

[0060] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROMs), random access memories (RAMs), external hard drives, magnetic disks, or optical discs, etc., various media that can store computer programs.

[0061] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.

[0062] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0063] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:

[0064] S1. Construct a multi-variate data set based on the wind speed data and wave data in the first time period in the target area, and divide the data of each category in the multi-variate data set according to a preset ratio to obtain a training set and a validation set, where the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time;

[0065] S2. Train a prediction model with the training set and adjust the hyperparameters in the prediction model with the validation set to obtain a target prediction model;

[0066] S3. Input the wind speed data and wave data of the target area in the second time period into the target prediction model to predict the wave height at the target time, where the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

[0067] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.

[0068] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, where the non-volatile computer-readable storage medium stores the computer program product, and when the computer program is executed by a processor, the steps of the methods described in various embodiments of the present application are implemented.

[0069] Optionally, in this embodiment, the above computer program may be configured to implement the following steps when executed by a processor:

[0070] S1, construct a multi-variable data set according to the wind speed data and wave data in the target area within the first time period, and divide the data of each category in the multi-variable data set according to a preset ratio to obtain a training set and a validation set, where the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time;

[0071] S2, train a prediction model through the training set, and adjust the hyperparameters in the prediction model through the validation set to obtain a target prediction model;

[0072] S3, input the wind speed data and wave data in the target area within the second time period into the target prediction model to predict the wave height at the target time, where the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

[0073] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary implementation manners, and will not be repeated here.

[0074] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0075] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for predicting the wave height, characterized in that, Comprising: Construct a multivariate data set based on wind speed data and wave data in a target area during a first time period, and divide the data of each category in the multivariate data set according to a preset ratio to obtain a training set and a validation set, wherein the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time; Train a prediction model with the training set and adjust the hyperparameters in the prediction model with the validation set to obtain a target prediction model; Input the wind speed data and wave data in the target area during a second time period into the target prediction model to predict the wave height at a target time, wherein the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

2. The method for predicting the wave height according to claim 1, wherein After constructing a multivariate data set based on wind speed data and wave data in a target area during a first time period, the method further includes: determining outliers and first missing values in the multivariate data set, and deleting the outliers to obtain second missing values, wherein the number of the second missing values is the sum of the number of the first missing values and the number of the outliers; Complete the second missing values by interpolation to obtain a complete multivariate data set.

3. The method for predicting the sea wave height according to claim 1, wherein Inputting the wind speed data and wave data in the target area during a second time period into the target prediction model to predict the wave height at a target time includes: Randomly sample the input data set to obtain a plurality of sample data sets, and create a plurality of decision trees corresponding to the plurality of sample data sets, wherein the input data set includes the wind speed data and the wave data during the second time period, and the plurality of sample data sets and the plurality of decision trees correspond one by one; Input the plurality of sample data sets into the plurality of decision trees respectively to obtain a plurality of prediction results; Determine the wave height according to the plurality of prediction results.

4. The method for predicting the wave height according to claim 3, wherein Determining the wave height according to the plurality of prediction results includes: Determine the sea wave height according to the following formula where T i (x) is the i-th prediction result among the multiple prediction results, and n is a positive integer.

5. The method for predicting the wave height according to claim 1, wherein After inputting the wind speed data and wave data in the target area during a second time period into the target prediction model to predict the wave height at a target time, the method further includes: When the wave height is less than a threshold, determining that the wave state is a normal wave; When the wave height is greater than or equal to the threshold, determining that the wave state is an extreme wave.

6. The method for predicting the wave height according to claim 5, wherein, After inputting the wind speed data and wave data in the target area during a second time period into the target prediction model to predict the wave height at a target time, the method further includes: When the wave state is the normal wave, continuously monitor the wave height of the target area; When the wave state is the extreme wave, activate an alarm device, wherein the alarm device is used to remind a target object to initiate an emergency response.

7. A device for predicting the height of ocean waves, characterized in that, Comprising: A partitioning module, configured to construct a multivariate dataset based on wind speed data and wave data in a target area within a first time period, and partition the data of each category in the multivariate dataset according to a preset ratio to obtain a training set and a validation set, wherein the training set and the validation set contain the same categories of data, and the first time period is a period of time before the current time; A training module, configured to train a prediction model with the training set and adjust hyperparameters in the prediction model with the validation set to obtain a target prediction model; A prediction module, configured to input the wind speed data and wave data in the target area within a second time period into the target prediction model to predict the wave height at a target time, wherein the second time period is a period of time before the current time, the second time period is later than the first time period, and the target time is a time after the current time.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when running, executes the method according to any one of claims 1 to 6.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.