Sea wave height prediction and model training method, electronic device and storage medium

By constructing an encoder-decoder network structure based on ConvGRU, the accuracy problem of traditional wave height prediction models in the absence of spatial information features is solved, and high-precision wave height prediction and multi-site prediction are achieved.

CN115660041BActive Publication Date: 2026-03-03WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210933548.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-04
Publication Date
2026-03-03
Estimated Expiration
2042-08-04

AI Technical Summary

Technical Problem

Traditional wave height prediction models have low accuracy when regional wave spatial information features are lacking, and traditional machine learning-based methods have declining accuracy when predicting large-scale wave data.

Method used

A ConvGRU-based encoder-decoder network structure is constructed. By building a sample dataset and performing forward and backward propagation training, the ConvGRU network is used to extract temporal and spatial information features. Multiple iterations are performed to achieve model convergence and improve prediction accuracy.

Benefits of technology

It improves the prediction accuracy and generalization ability of the wave height prediction model, enabling accurate multi-site prediction and solving the accuracy problem of traditional models when spatial information is lacking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115660041B_ABST
    Figure CN115660041B_ABST
Patent Text Reader

Abstract

The application relates to a sea wave height prediction and model training method, electronic equipment and a computer storage medium, which comprises the following steps: constructing a sample data set, wherein the sample data set comprises sea wave height space-time sequences in different regions; constructing a model to perform forward propagation processing on sample data in the sample data set and output a prediction result, wherein the prediction result comprises a sea wave height space-time prediction sequence in the next moment in different regions, and the model is constructed based on a ConvGRU encoder-decoder network structure; performing back propagation on the prediction result to update model parameters; and performing the propagation process multiple times until the model converges, thereby obtaining a trained sea wave height prediction model. By using the ConvGRU structure, combining the time information features and the space information features of regional sea waves, and performing multi-scale learning, the prediction accuracy of large-scale sea wave data prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model prediction technology, and in particular to a method for predicting and training ocean wave height, an electronic device, and a computer storage medium. Background Technology

[0002] With the continuous improvement of water transport demand, people have higher requirements for the safety, economy, and environmental standards of maritime navigation. Hydrological and meteorological conditions have a significant impact on ship safety. Therefore, how to comprehensively consider hydrological and meteorological conditions to plan safe, reliable, economical, and environmentally friendly routes for ships, thereby ensuring the healthy and rapid development of the shipping industry, has become one of the hot topics in water transportation research.

[0003] Ships are affected by various hydrological and meteorological factors while navigating at sea, and wave height forecasting is a crucial component of meteorological and hydrological support for ocean-going vessels. Accurate forecasts of hydrological and meteorological factors ensure safe navigation and minimize voyage time and fuel consumption. Wave height forecasting also safeguards the normal operation of ocean-going passenger ships.

[0004] Traditional parametric model-based prediction model training methods struggle to capture nonlinear features in the data; traditional machine learning-based prediction model training methods can automatically capture nonlinear features in the data and have good generalization ability on small samples, but when predicting large-scale wave data, the prediction accuracy decreases due to the lack of spatial information features in regional ocean waves. Summary of the Invention

[0005] In view of this, it is necessary to provide a method, electronic device and computer storage medium for predicting wave height and training a model, in order to solve the problem that the existing technology has low prediction accuracy due to the lack of regional wave spatial information features when predicting wave height.

[0006] To address the aforementioned problems, in a first aspect, the present invention provides a method for training a wave height prediction model, comprising:

[0007] Construct a sample dataset, which includes spatiotemporal sequences of ocean wave heights in different regions;

[0008] The model is constructed to perform forward propagation processing on the sample data in the sample dataset and output prediction results. The prediction results include spatiotemporal prediction sequences of wave height in different regions at the next time step. The model is constructed based on the encoder-decoder network structure of ConvGRU.

[0009] The prediction results are used for backpropagation to update the model parameters;

[0010] By iterating the above propagation process multiple times, a trained wave height prediction model is obtained when the model converges.

[0011] Furthermore, the construction of the sample dataset includes:

[0012] Obtain the raw dataset, which includes meteorological datasets of wave heights for different regions;

[0013] The original dataset is converted into a two-dimensional array to obtain a first dataset in the form of a two-dimensional matrix for each region, wherein the grid size of each region is a preset number;

[0014] The first dataset in the form of a two-dimensional matrix for each region is preprocessed to obtain the second dataset in the form of a three-dimensional matrix for each region, and the second dataset is determined as the sample dataset.

[0015] Furthermore, the preprocessing operation performed on the first dataset in the form of a two-dimensional matrix for each region to obtain a second dataset in the form of a three-dimensional matrix for each region includes:

[0016] Based on the time sequence, the first dataset in the form of a two-dimensional matrix within a preset time period is combined in each region to obtain the second dataset in the form of a three-dimensional matrix for each region. The second dataset represents the spatiotemporal sequence of wave height in the region, and the matrix dimensions are latitude, longitude and time step.

[0017] Furthermore, before model training, the method also includes:

[0018] Set the hyperparameters of the model, including batch size and learning rate;

[0019] Set the training method and the number of training sessions, wherein the training method is batch training;

[0020] Configure the optimizer and activation function for the model during training. The optimizer is Adam, and the activation function is LeakyReLU.

[0021] Furthermore, the model is constructed based on the ConvGRU encoder-decoder network structure;

[0022] The ConvGRU encoder network consists of 12 ConvGRU2D layers and 8 groupnorm normalization layers, which encode the input sample data into vectors in a continuous feature space.

[0023] The ConvGRU decoder network consists of 13 ConvGRU2D layers and 8 groupnorm layers. The decoder network is used to decode the encoded input sequence and output the target sequence.

[0024] Furthermore, the constructed model performs forward propagation processing on the sample data in the sample dataset and outputs prediction results, including:

[0025] The sample data in the sample dataset is processed by forward propagation using the forward propagation formula of ConvGRU neurons;

[0026] The forward propagation formula of the ConvGRU neuron includes:

[0027]

[0028]

[0029]

[0030]

[0031] To reset the door, To update the door, For current memory information, This is for the final memory information. Current information input, This is the output of the hidden layer from the previous time step. and For each bias and weight matrix, Represents the convolution kernel. Represents the convolution operator. This represents the Hadamard product. This represents the Sigmoid function.

[0032] Furthermore, the sample dataset includes a training set, a validation set, and a test set;

[0033] After obtaining the trained wave height prediction model when the model converges, the method further includes:

[0034] The prediction accuracy of the wave height prediction model was tested based on the test set.

[0035] If the prediction accuracy is less than the preset accuracy, adjust the network structure of the wave height prediction model or process the parameters in the wave height prediction model.

[0036] Secondly, the present invention also provides a method for predicting ocean wave height, comprising:

[0037] Obtain the first ocean wave satellite cloud image within a preset time period; the color of the ocean wave satellite cloud image represents the ocean wave height.

[0038] Extract the first ocean wave height spatiotemporal sequence from the first ocean wave satellite cloud image;

[0039] The first wave height spatiotemporal sequence is input into the trained wave height prediction model, and the second wave height spatiotemporal sequence for the next time period is output. The wave height prediction model is constructed based on the ConvGRU encoder-decoder network structure.

[0040] The second wave height spatiotemporal sequence is visualized, and the satellite cloud image of the second wave in the next time period of the predicted preset time period is output.

[0041] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the above-described wave height prediction model training method or wave height prediction method.

[0042] Fourthly, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-described wave height prediction model training method or wave height prediction method.

[0043] The beneficial effects of using the above embodiments are:

[0044] This invention provides a large-scale sample of ocean wave data to ensure sufficient training data for the model, and constructs a high-resolution input-output sample dataset to guarantee the model's prediction accuracy. During training, the network output is obtained through forward propagation, and the network parameters are updated through backpropagation. After multiple iterations, the prediction model converges. By utilizing the characteristics of the ConvGRU network structure, the temporal and spatial information features of the sample data are extracted and then learned at different scales to obtain accurate multi-site prediction results, thereby improving the model's prediction accuracy. Finally, the ability of ConvGRU to handle edges is used to improve the generalization ability of the prediction model. Attached Figure Description

[0045] Figure 1 A flowchart illustrating an embodiment of the wave height prediction model training method provided by the present invention;

[0046] Figure 2 A ConvGRU-based encoder-decoder network structure diagram is provided as an embodiment of the present invention;

[0047] Figure 3 An internal structure diagram of a ConvGRU provided in an embodiment of the present invention;

[0048] Figure 4 A flowchart illustrating an embodiment of the wave height prediction method provided by the present invention;

[0049] Figures 5(a) and (b) are prediction effect diagrams provided by an embodiment of the present invention;

[0050] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0051] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0052] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, "a plurality of" means two or more, unless otherwise explicitly specified. The reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0053] This invention provides a method, device, and storage medium for predicting and training a wave height model. Addressing the shortcomings of traditional deep learning models like RNNs and CNNs in multi-step regional prediction of sea wave height, CNNs learn local features of images, primarily short-term, but neglect temporal relevance; RNNs primarily learn temporal information features, primarily long-term, but neglect spatial relevance. This invention, combining the advantages of both RNNs and CNNs in multi-step regional prediction of wave height, proposes a regional multi-step prediction model based on a ConvGRU encoder-decoder network structure. The ConvGRU design effectively improves the feature extraction capability of signal data, and the efficient integration of the convolutional GRU autoencoder forms a highly efficient unsupervised learning network, avoiding the problem of RNNs forgetting long-term information and improving prediction accuracy.

[0054] Before describing the embodiments, the relevant terms are defined as follows:

[0055] CNN (Convolutional Neural Networks) is a type of feedforward neural network consisting of one or more convolutional layers, pooling layers, and a fully connected layer at the top. It performs exceptionally well in image processing and is primarily used to extract local features from convolutional objects.

[0056] A Recurrent Neural Network (RNN) is an artificial neural network in which nodes are connected in a directed loop. The internal state of such a network can exhibit dynamic temporal behavior. Unlike feedforward neural networks, RNNs can utilize their internal memory to process input sequences of arbitrary temporal order.

[0057] GRU (Gate Recurrent Unit) is a type of RNN proposed to address issues such as long-term memory and gradients in backpropagation.

[0058] ConvGRU (Convolutional Gate Recurrent Unit) replaces the fully connected layers in Long Short-Term Memory (LSTM) networks with convolutional kernels, essentially transforming fully connected layers into locally connected ones. Compared to Convolutional LSM networks, ConvGRU has fewer gate units, fewer parameters, and faster training speed. It also reduces the accumulation of errors propagating information over long sequences, allowing the model to retain memories from long sequences that are not erased over time or due to low relevance to predictions.

[0059] The specific embodiments are described in detail below:

[0060] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the wave height prediction model training method provided by the present invention. A specific embodiment of the present invention discloses a wave height prediction model training method, comprising:

[0061] Step S101: Construct a sample dataset, which includes spatiotemporal sequences of wave heights in different regions;

[0062] Step S102: The model is constructed to perform forward propagation processing on the sample data in the sample dataset and output the prediction results. The prediction results include the spatiotemporal prediction sequence of wave height in different regions at the next moment. The model is constructed based on the encoder-decoder network structure of ConvGRU.

[0063] Step S103: Use the prediction results to perform backpropagation to update the model parameters;

[0064] Step S104: Iterate the above propagation process multiple times until the model converges to obtain the trained wave height prediction model.

[0065] The sample dataset includes spatiotemporal sequences of wave heights from different regions. It's understandable that the ConvGRU network can not only establish temporal relationships like a GRU, but also characterize local spatial features like a CNN. A significant feature of the ConvGRU network is that the first two dimensions of the three-dimensional tensor are spatial, and the last dimension is temporal. All input and output elements are three-dimensional tensors, preserving spatial information. Therefore, the matrix dimensions of the wave height spatiotemporal sequence are latitude, longitude, and time step.

[0066] It should be noted that the model constructed in this invention is based on a ConvGRU encoder-decoder network structure. The ConvGRU design effectively improves the feature extraction capability of sample data, effectively integrating the convolutional GRU with an autoencoder to form a highly efficient unsupervised learning network, thus avoiding the problem of RNNs forgetting long-term information. Supervised learning is employed during the training phase. The network output is obtained through forward propagation, and the network parameters are updated through backpropagation. After multiple iterations, the model converges, and the model training is complete.

[0067] This invention provides a large-scale sample of ocean wave data to ensure sufficient training data for the model, and constructs a high-resolution input-output sample dataset to guarantee the model's prediction accuracy. During training, the network output is obtained through forward propagation, and the network parameters are updated through backpropagation. After multiple iterations, the prediction model converges. By utilizing the characteristics of the ConvGRU network structure, the temporal and spatial information features of the sample data are extracted and then learned at different scales to obtain accurate multi-site prediction results, thereby improving the model's prediction accuracy. Finally, the ability of ConvGRU to handle edges is used to improve the generalization ability of the prediction model.

[0068] In one embodiment of the present invention, constructing a sample dataset includes:

[0069] Obtain the raw dataset, which includes meteorological datasets of wave heights for different regions;

[0070] The original dataset is transformed into a two-dimensional array to obtain the first dataset in the form of a two-dimensional matrix for each region, where the grid size of each region is a preset number;

[0071] The first dataset in the form of a two-dimensional matrix for each region is preprocessed to obtain the second dataset in the form of a three-dimensional matrix for each region, and the second dataset is determined as the sample dataset.

[0072] The original dataset comes from the 5th edition of the European Reanalysis dataset released by the European Centre for Medium-Range Weather Forecasts (ECMWF). The reanalysis dataset uses physical laws to combine model data with observations from around the world into a globally complete and consistent dataset. This optimally integrates previous forecasts with newly available observations to produce new and best estimates of atmospheric conditions, resulting in a high-quality reanalysis meteorological dataset with high spatiotemporal resolution. Therefore, the original dataset includes meteorological data carrying wave heights from different regions.

[0073] It should be noted that the reanalysis dataset was divided into a 720×361 grid for global land and ocean data, with a grid size of 62km and a data precision of 0.5°×0.5°. The meteorological data update interval was 1 hour. However, in this invention, to meet the requirement of not losing spatial correlation in the data format, a regional grid size of 64×64 is used, meaning each region is divided into 64×64 grids, with one meteorological data point on each grid. t Regional wind and wave observations at any given time.

[0074] This is represented using a two-dimensional matrix. t The observed regional wind and wave values ​​at that time were:

[0075]

[0076] Among them, elements Representative at The height of the wind and waves at the location Time-based observations, among which, , The location of the grid region; since the grid size used in this invention is 64×64, therefore... and Both equal 64.

[0077] Taking a rectangular area in the Pacific Ocean as an example, the latitude and longitude of the four vertices are (28.75N, 126E), (28.75N, 141.75E), (13N, 126E) and (28.75N, 141.25E). It should be noted that the original dataset, sample dataset and image set in this invention can be converted to each other. Specifically, the basemap library in Python is used to visualize the wind and waves in the sea area.

[0078] Then, the first dataset in the form of a two-dimensional matrix for each region is preprocessed to obtain the second dataset in the form of a three-dimensional matrix for each region.

[0079] In one embodiment of the present invention, a preprocessing operation is performed on a first dataset in the form of a two-dimensional matrix for each region to obtain a second dataset in the form of a three-dimensional matrix for each region, including:

[0080] Based on the time sequence, the first dataset in the form of a two-dimensional matrix within a preset time period is combined in each region to obtain the second dataset in the form of a three-dimensional matrix for each region. The second dataset represents the spatiotemporal sequence of wave height in that region, and the matrix dimensions are latitude, longitude and time step.

[0081] This invention primarily uses sea wave data from the previous 12 hours to predict sea wave data for the next 12 hours. Therefore, the preset time period is generally 12 hours. Within each region, data is generated in chronological order. The wind and wave height variable matrix at each moment is combined into a three-dimensional matrix:

[0082]

[0083] This matrix is ​​the second dataset in three-dimensional matrix form for this region, representing the spatiotemporal sequence of wind and wave heights. The matrix dimensions are (different latitudes, different longitudes, time steps). In this invention, because the first 12 steps of prediction are used, therefore... The answer is 12. Once the sample dataset is constructed, it can be divided into a training set, a validation set, and a test set in a 3:1:1 ratio for model training and testing.

[0084] In one embodiment of the present invention, before model training, the above method further includes:

[0085] Set the model's hyperparameters, including batch size and learning rate;

[0086] Set the training method and number of training sessions; the training method is batch training.

[0087] Configure the optimizer and activation function for the model during training. The optimizer is Adam, and the activation function is LeakyReLU.

[0088] Understandably, before the model begins learning, the model's environment needs to be set up. Specifically, the model's hyperparameters need to be set. Hyperparameters are parameters whose values ​​are set before the learning process begins, rather than parameters obtained through training. It should be noted that the hyperparameters can be determined using a validation set. In this invention, the model's hyperparameters are a batch size of 16 and a learning rate of 0.001. The model's training method and number of training iterations also need to be set. In this invention, batch training is used, and the maximum number of training iterations is 100. Finally, the optimizer for the model during training needs to be set up. The optimizer's task is to calculate the gradient of the loss function in each epoch and then update the parameters. In this invention, Adam (Adaptive) is chosen. Moment estimation (Adaptive Moment Estimation) is used as the optimizer for the model. The optimizer algorithm is easy to implement and has high computational efficiency and low memory requirements. Setting an activation function is crucial. Without an activation function, the input of each node is a linear function of the output of the previous layer, which is easy to verify and is equivalent to having no hidden layers. The approximation ability of the network is quite limited. By introducing a nonlinear function as the activation function, the expressive power of the deep neural network becomes more powerful. The activation function used in this invention is LeakyReLU. Using this activation function accelerates the convergence speed of the model and can further improve the prediction accuracy of the model.

[0089] In one embodiment of the present invention, the model is constructed based on a ConvGRU encoder-decoder network structure;

[0090] The ConvGRU encoder network consists of 12 ConvGRU2D layers and 8 groupnorm normalization layers. The encoder network encodes the input sample data into vectors in a continuous feature space.

[0091] The ConvGRU decoder network consists of 13 ConvGRU2D layers and 8 groupnorm layers. The decoder network is used to decode the encoded input sequence and output the target sequence.

[0092] It is understood that the prediction model in this invention is based on the ConvGRU encoder network and the ConvGRU decoder network. Since deep learning neural networks require that the input and output are both fixed dimensions, the number of layers in the encoder network and the number of layers in the decoder network should be the same. It should be noted that the decoder network usually includes two gated recurrent unit convolutional layers in the last layer to ensure the output.

[0093] The encoder network's main function is to encode the input sample data into vectors in a continuous feature space, while the decoder network's main function is to decode the encoded input sequence and output the target sequence. For details, please refer to [link to documentation / reference]. Figure 2 , Figure 2 This diagram illustrates a ConvGRU-based encoder-decoder network architecture according to an embodiment of the present invention. The encoder network consists of 12 ConvGRU2D layers and 8 groupnorm normalization layers; the decoder network consists of 13 ConvGRU2D layers and 8 groupnorm normalization layers. The numbers in parentheses within the ConvGRU2D units represent the number of input channels, the number of output channels, the convolutional kernel size, the stride, and the padding size, respectively.

[0094] It is understood that the sample dataset and the visualized regional wave map in this invention can be converted to each other, and the prediction results will ultimately be displayed through visualization. Since the display results are in image form, 2D convolution is still used in this invention to improve prediction efficiency. For details on the specific processing method of the data using ConvGRU, please refer to the forward propagation process below, which will not be repeated here. Furthermore, the normalization layer can make the processing results smoother and the visualized image clearer; in addition, adding an activation layer can further improve the prediction accuracy of the model.

[0095] In one embodiment of the present invention, a model is constructed to perform forward propagation processing on sample data in a sample dataset and output prediction results, including:

[0096] The forward propagation formula of ConvGRU neurons is used to process the sample data in the sample dataset through forward propagation.

[0097] The forward propagation formula for ConvGRU neurons includes:

[0098]

[0099]

[0100]

[0101]

[0102] To reset the door, To update the door, For current memory information, This is for the final memory information. Current information input, This is the output of the hidden layer from the previous time step. and For each bias and weight matrix, Represents the convolution kernel. Represents the convolution operator. This represents the Hadamard product. This represents the Sigmoid function.

[0103] The ConvGRU structure can not only establish temporal relationships like GRU, but also characterize local spatial features like CNN. Ordinary LSTM and GRU use a near-fully connected internal structure, leading to serious information redundancy problems. Furthermore, this connection method ignores the spatial correlation between local pixels in the data. ConvGRU extends the fully connected idea from GRU to convolutional structures, replacing the dot product operation in GRU with convolutional operations. (See [link to ConvGRU documentation]). Figure 3 , Figure 3 This is an internal structure diagram of a ConvGRU provided in one embodiment of the present invention. All input and output elements are three-dimensional tensors, preserving spatial information while still using a recursive viewpoint.

[0104] Specifically, the ConvGRU structure uses a gate structure composed of Sigmoid layers and convolution operations to select information. The Sigmoid function is used for the output of hidden layer neurons, and its value ranges from (0,1).

[0105] In the ConvGRU structure described above, and After extracting the desired features through convolution, the data enters the reset gate. The state information from the previous time step is filtered through the Sigmoid unit: [Selection] China Transmit more important information; if When it is approximately equal to 0, then The information will not be transmitted. middle.

[0106] and The information in the data is processed by convolution and then updated through the update gate. The Sigmoid unit in the memory filters the information that needs to be forgotten: if Approximately equal to 1, then The information in the middle will be almost directly copied to ;like If approximately equal to 0, then It will be directly transmitted .

[0107] The input information at the current time step is extracted using convolution and compared with the input information after the reset gate. The information from different times is concatenated and then the data range is scaled by an activation function, which means that the state and information at the current moment are memorized.

[0108] Ultimately, through ,forget Less important features, and through Selectively memorize information from the current node to achieve the final output.

[0109] In one embodiment of the present invention, the sample dataset includes a training set, a validation set, and a test set;

[0110] After obtaining the trained wave height prediction model when the model converges, the above method also includes:

[0111] The prediction accuracy of the wave height prediction model was tested based on the test set.

[0112] If the prediction accuracy is less than the preset accuracy, adjust the network structure of the wave height prediction model or process the parameters in the wave height prediction model.

[0113] Understandably, the test set is used only once, specifically when evaluating the final model after training. It doesn't participate in the parameter learning or hyperparameter selection process; it's solely for model evaluation. Prediction accuracy can be calculated by comparing the predicted output with the actual value. A high prediction accuracy indicates good network training. Conversely, a low accuracy requires further adjustments to the network structure and parameter optimization. This could involve changing the number of layers or continuing the iterative training process.

[0114] Furthermore, in one embodiment of the present invention, it is also necessary to evaluate the performance of the prediction model. Specifically, three evaluation functions, MAE (mean absolute error), MAPE (mean absolute percentage error), and RMSE (root mean square error), are selected as the standards for measuring the generalization ability of the prediction model. The specific evaluation formula is as follows:

[0115]

[0116]

[0117]

[0118] in, These are actual observed values. For predicted values, n The number of observations (samples) is determined, and then the training weights with the smallest evaluation function values ​​are selected, saved, and their corresponding prediction results are output.

[0119] Based on the above-described wave height prediction model training method, this invention also provides a corresponding wave height prediction method. Please refer to [link to relevant documentation]. Figure 4 , Figure 4This is a flowchart illustrating an embodiment of the wave height prediction method provided by the present invention. A specific embodiment of the present invention discloses a wave height prediction method, comprising:

[0120] Step S401: Obtain the first ocean wave satellite cloud image within a preset time period. The color of the ocean wave satellite cloud image represents the ocean wave height.

[0121] Step S402: Extract the spatiotemporal sequence of the first ocean wave height from the first ocean wave satellite cloud image;

[0122] Step S403: Input the first wave height spatiotemporal sequence into the trained wave height prediction model, and output the second wave height spatiotemporal sequence for the next time period within a preset time period. The wave height prediction model is constructed based on the ConvGRU encoder-decoder network structure.

[0123] Step S404: Visualize the spatiotemporal sequence of the second wave height and output the satellite cloud image of the second wave for the next time period of the predicted preset time period.

[0124] In the process of predicting wave height, wave data from the previous time period is typically used to predict wave data for the next time period. Specifically, the preset time period in this invention can be 12 hours, and the next time period after the preset time period is also 12 hours. The wave data interval is 1 hour.

[0125] It should be noted that the effective information in ocean wave satellite cloud images generally includes wave height, latitude and longitude, and observation time. Among these, wave height can be obtained from the color of the ocean wave satellite cloud image; the darker the color, the higher the wave height, and the lighter the color, the lower the wave height.

[0126] After acquiring the first 12 hours of satellite cloud imagery of the ocean waves, features of this imagery can be extracted for rapid model processing. Specifically, the spatiotemporal sequence of the first ocean wave height is extracted, including wave height, latitude and longitude, and observation time. This spatiotemporal sequence is then input into the trained ocean wave height prediction model. Specifically, the ConvGRU structure within the prediction model is used to extract temporal and spatial features from the sequence, and then learning is performed at different scales to obtain accurate multi-site prediction results for the following 12 hours. The ConvGRU structure has been described in detail above and will not be repeated here.

[0127] It is understandable that regional wave height prediction requires the simultaneous output of prediction values ​​from multiple locations, which is a pixel-level prediction. The model in this invention can achieve accurate pixel-level spatial output, better capture global spatial information and map it to the required multi-location output. While ensuring pixel-level regional wave height output, it can perform multi-step prediction and learn samples from different prediction times to achieve accurate spatiotemporal prediction.

[0128] For example, please refer to Figures 5(a) and (b), which are prediction effect diagrams provided by an embodiment of the present invention. Taking a rectangular area of ​​the Pacific Ocean as an example, two prediction samples are randomly selected, and the predicted values ​​for the next 12 hours are obtained based on the input of the previous 12 hours. The predicted values ​​are then compared with the actual values, where high winds and waves are displayed in light colors and low winds and waves are displayed in dark colors.

[0129] Based on the above-described wave height prediction model training method or wave height prediction method, this embodiment of the invention also provides an electronic device, including: a processor and a memory, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it implements the steps in the wave height prediction model training method or wave height prediction method of the above embodiments.

[0130] Figure 6 The diagram shows a structural schematic of an electronic device 600 suitable for implementing embodiments of the present invention. The electronic device in the embodiments of the present invention may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0131] The electronic device includes a memory and a processor, wherein the processor may be referred to as processing device 601 below, and the memory may include at least one of read-only memory (ROM) 602, random access memory (RAM) 603 and storage device 608 below, as detailed below:

[0132] like Figure 6As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0133] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0134] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of the embodiments of the present invention.

[0135] Based on the above-described wave height prediction model training method or wave height prediction method, this embodiment of the invention also provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps in the wave height prediction model training method or wave height prediction method of the above embodiments.

[0136] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0137] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for training a sea wave height prediction model, characterized in that, The method comprises the following steps: constructing a sample data set comprising sea wave height spatio-temporal sequences in different regions; constructing a model to perform forward propagation processing on sample data in the sample data set and output a prediction result, wherein the prediction result comprises sea wave height spatio-temporal prediction sequences in different regions at the next moment, and the model is constructed based on an encoder-decoder network structure of ConvGRU, wherein the encoder network of ConvGRU is composed of 12 ConvGRU2D layers and 8 groupnorm normalization layers, and the input sample data is encoded into a vector in a continuous feature space by using the encoder network; the decoder network of ConvGRU is composed of 13 ConvGRU2D layers and 8 groupnorm normalization layers, and the input sequence after encoding is decoded by using the decoder network and a target sequence is output; performing back propagation using the prediction result to update model parameters; iterating the above propagation process multiple times, and obtaining a trained sea wave height prediction model when the model converges.

2. The sea wave height prediction model training method of claim 1, wherein, The method further comprises the following steps before constructing the sample data set: obtaining an original data set comprising meteorological data sets carrying sea wave heights in different regions; converting the original data set into a two-dimensional array to obtain a first data set in the form of a two-dimensional matrix of each region, wherein the grid size of each region is a preset number; performing a preprocessing operation on the first data set in the form of a two-dimensional matrix of each region to obtain a second data set in the form of a three-dimensional matrix of each region, and determining the second data set as the sample data set. 3.The sea wave height prediction model training method of claim 2, wherein, The method further comprises the following steps before constructing the sample data set: combining the first data set in the form of a two-dimensional matrix in a preset time period within each region based on time sequence to obtain a second data set in the form of a three-dimensional matrix of each region, wherein the second data set represents the sea wave height spatio-temporal sequence of the region, and the matrix dimension is latitude, longitude and time step. 4.The sea wave height prediction model training method of claim 1, wherein, Before model training, the method further comprises the following steps: setting hyperparameters of the model, wherein the hyperparameters comprise batch size and learning rate; setting training mode and training times, wherein the training mode is batch training; setting the optimizer and activation function of the model in the training process, wherein the optimizer is Adam, and the activation function is LeakyReLU. 5.The sea wave height prediction model training method of claim 1, wherein, The method further comprises the following steps before constructing the model to perform forward propagation processing on sample data in the sample data set and output a prediction result: performing forward propagation processing on sample data in the sample data set by using a forward propagation formula of a ConvGRU neuron; wherein the forward propagation formula of the ConvGRU neuron comprises: for resetting the gate, for updating the gate, for the current memory information, for the final memory information, information input at the current time, for the hidden layer output at the previous time, and for each bias and weight matrix, denotes a convolution kernel, denotes a convolution operator, denotes a Hadamard product, denotes a Sigmoid function. 6.The sea wave height prediction model training method of claim 1, wherein, The sample data set comprises a training set, a validation set and a test set. After obtaining the trained sea wave height prediction model when the model converges, the method further comprises the following steps: testing the prediction accuracy of the sea wave height prediction model based on the test set; If the prediction accuracy is less than a preset accuracy, a network structure of the sea wave height prediction model is adjusted or parameters in the sea wave height prediction model are processed.

7. A sea wave height prediction method characterized by, The method comprises the following steps: A first sea wave satellite cloud image in a preset time period is acquired, and a sea wave height is represented by a color of the sea wave satellite cloud image. A first sea wave height spatio-temporal sequence of the first sea wave satellite cloud image is extracted. The first sea wave height spatio-temporal sequence is input into a trained sea wave height prediction model, and a second sea wave height spatio-temporal sequence of a next time period in the preset time period is output, wherein the sea wave height prediction model is constructed based on an encoder-decoder network structure of ConvGRU, the encoder network of ConvGRU is composed of 12 ConvGRU2D layers and 8 groupnorm normalization layers, and the input sample data is encoded into a vector in a continuous feature space by using the encoder network; the decoder network of ConvGRU is composed of 13 ConvGRU2D layers and 8 groupnorm normalization layers, and the input sequence after encoding is decoded and a target sequence is output by using the decoder network. The second sea wave height spatio-temporal sequence is visualized, and a second sea wave satellite cloud image of the next time period in the preset time period is output.

8. An electronic device, comprising: A computer readable storage medium is provided, and the computer readable storage medium stores a program or instructions, which are executed by a processor to implement the steps of the sea wave height prediction model training method in any one of claims 1 to 6 or the sea wave height prediction method in claim 7.

9. A computer-readable storage medium, characterized in that, A computer readable storage medium is provided, and the computer readable storage medium stores a program or instructions, which are executed by a processor to implement the steps of the sea wave height prediction model training method in any one of claims 1 to 6 or the sea wave height prediction method in claim 7.

Citation Information

Patent Citations

  • Ocean wave direction spectrum correction method and device, storage medium and electronic equipment

    CN111738347A

  • Electromagnetic wave frequency prediction method and device

    CN112418394A