CN115660041A - Sea wave height prediction and model training method, electronic device and storage medium - Google Patents

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

Info

Publication number
CN115660041A
CN115660041A CN202210933548.6A CN202210933548A CN115660041A CN 115660041 A CN115660041 A CN 115660041A CN 202210933548 A CN202210933548 A CN 202210933548A CN 115660041 A CN115660041 A CN 115660041A
Authority
CN
China
Prior art keywords
wave height
sea wave
data set
model
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210933548.6A
Other languages
Chinese (zh)
Inventor
张华军
孙幼军
苏义鑫
张丹红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN202210933548.6A priority Critical patent/CN115660041A/en
Publication of CN115660041A publication Critical patent/CN115660041A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a sea wave height prediction and model training method, electronic equipment and a computer storage medium, wherein the method comprises the following steps: constructing a sample data set, wherein the sample data set comprises wave height space-time sequences in different areas; the method comprises the steps that a model is built to conduct forward propagation processing on sample data in a sample data set, and a prediction result is output, wherein the prediction result comprises a sea wave height space-time prediction sequence at the next moment in different areas, and the model is built on the basis of a ConvGRU encoder decoder network structure; performing back propagation by using the prediction result to update the model parameters; and iterating the propagation process for multiple times to obtain a trained sea wave height prediction model when the model is converged. According to the method, the characteristics of the ConvGRU structure are utilized, the time information characteristics and the space information characteristics of regional sea waves are combined, multi-scale learning is carried out, and the prediction accuracy of large-scale sea wave data prediction is improved.

Description

Sea wave height prediction and model training method, electronic device and storage medium
Technical Field
The invention relates to the technical field of model prediction, in particular to a sea wave height prediction and model training method, electronic equipment and a computer storage medium.
Background
With the continuous promotion of water transport demands, people have higher requirements on safety, economy and green standards of marine navigation. The hydrological meteorological conditions have a great influence on the safety of the ship, so how to comprehensively consider the hydrological meteorological conditions to plan a safe, reliable, economic and green route for the ship so as to ensure the health of the shipping industry to be rapidly developed into one of the hot spots for the research of the water transportation industry at present.
When a ship sails on the sea, the ship is influenced by various hydrometeorology elements, and the sea wave height prediction is an important component of the ocean vessel meteorological hydrology guarantee. The accurate forecasting of the hydrological meteorological elements can ensure the sailing safety of the ship and save sailing time and fuel oil as much as possible. The sea wave height prediction can provide guarantee for the normal operation of ocean-going passenger ships.
The traditional parameter model-based prediction model training method is difficult to capture nonlinear features in data; the prediction model training method based on the traditional machine learning can automatically capture the non-linear characteristics in the data, has good generalization capability on small samples, but when large-scale wave data is predicted, the prediction precision is reduced because the regional waves lack the spatial information characteristics.
Disclosure of Invention
In view of the above, it is necessary to provide a method for predicting sea wave height and training a model, an electronic device, and a computer storage medium, so as to solve the problem of low prediction accuracy caused by lack of regional sea wave spatial information characteristics when sea wave height is predicted in the prior art.
In order to solve the above problem, in a first aspect, the present invention provides a method for training a wave height prediction model, including:
constructing a sample data set, wherein the sample data set comprises wave height space-time sequences in different areas;
carrying out forward propagation processing on the sample data in the sample data set by constructing a model, and outputting a prediction result, wherein the prediction result comprises a sea wave height space-time prediction sequence at the next moment in different areas, and the model is constructed based on a ConvGRU encoder-decoder network structure;
performing back propagation by using the prediction result to update the model parameters;
and iterating the propagation process for multiple times to obtain a trained wave height prediction model when the model reaches convergence.
Further, the constructing the sample data set includes:
acquiring an original data set, wherein the original data set comprises meteorological data sets carrying sea wave heights in different areas;
converting the original data set into a two-dimensional array to obtain a first data set in a two-dimensional matrix form of each area, wherein the grid size of each area is a preset number;
and preprocessing the first data set in the form of the two-dimensional matrix of each region to obtain a second data set in the form of the three-dimensional matrix of each region, and determining the second data set as the sample data set.
Further, the pre-processing 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 includes:
and combining the first data sets in the form of two-dimensional matrixes in each region based on the time sequence to obtain a second data set in the form of three-dimensional matrixes in each region, wherein the second data set represents a sea wave height space-time sequence in the region, and the matrix dimensionality is latitude, longitude and time step.
Further, before performing model training, the method further comprises:
setting hyper-parameters of the model, wherein the hyper-parameters comprise batch size and learning rate;
setting a training mode and training times, wherein the training mode is batch training;
and setting an optimizer and an activation function of the model in a training process, wherein the optimizer is Adam, and the activation function is LeakyReLU.
Further, the model is constructed based on ConvGRU encoder-decoder network structure;
the ConvGRU encoder network consists of 12 ConvGRU2D layers and 8 groupnorm normalization layers, and the encoder network is utilized to encode input sample data into vectors in a continuous feature space;
the ConvGRU decoder network consists of 13 ConvGRU2D layers and 8 groupnorm group normalization layers, and the decoder network is used for decoding the coded input sequence and outputting a target sequence.
Further, the constructing the model performs forward propagation processing on the sample data in the sample data set, and outputs a prediction result, including:
carrying out forward propagation processing on the sample data in the sample data set by utilizing a forward propagation formula of a ConvGRU neuron;
wherein the forward propagation formula of the ConvGRU neuron comprises:
Z t =σ(W xz *X t +W hz *H t-1 +b z )
R t =σ(W xr *X t +W hr *H t-1 +b r )
H′ t =f(W xh *X t +R t o(W hh *H t-1 )+b h )
H t =(1-Z t )oH′ t +Z t oH t-1
R t to reset the gate, Z t To refresh door, H' t For currently remembered information, H t For final memorization of information. X t Information input at the present moment, H t-1 For hidden layer output at the previous moment, b i And W ij For each bias and weight matrix, f denotes a convolution kernel, a convolution operator,
Figure BDA0003782647240000041
representing a Hadamard product and sigma a Sigmoid function.
Further, the sample data set comprises a training set, a verification set and a test set;
after obtaining the trained sea wave height prediction model when the model reaches convergence, the method further comprises the following steps:
testing the prediction precision of the sea wave height prediction model based on the test set;
and if the prediction precision is smaller than the preset precision, adjusting the network structure of the sea wave height prediction model or processing parameters in the sea wave height prediction model.
In a second aspect, the present invention further provides a wave height prediction method, including:
acquiring a first sea wave satellite cloud picture in a preset time period, wherein the color of the sea wave satellite cloud picture represents the height of sea waves;
extracting a first sea wave height space-time sequence of the first sea wave satellite cloud picture;
inputting the first sea wave height space-time sequence into a trained sea wave height prediction model, and outputting a second sea wave height space-time sequence in a next time period of a preset time period, wherein the sea wave height prediction model is constructed based on a ConvGRU encoder-decoder network structure;
and performing visualization processing on the second sea wave height space-time sequence, and outputting a second sea wave satellite cloud picture of the next time period of the predicted preset time period.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the wave height prediction model training method or the wave height prediction method when executing the computer program.
In a fourth aspect, the present invention further provides a computer storage medium, wherein a computer program is stored in the computer readable storage medium, and when executed by a processor, the computer program implements the steps in the wave height prediction model training method or the wave height prediction method.
The beneficial effects of adopting the above embodiment are:
according to the invention, a large-scale sea wave data sample is provided, so that a sufficient sample is provided for model training, a high-resolution input and output sample data set is constructed, and the prediction accuracy of the model is guaranteed; obtaining the output of the network through forward propagation in the training process, updating the parameters of the network through the backward propagation process, and converging the prediction model after multiple iterations; by utilizing the characteristics of the ConvGRU network structure, the accurate multi-site prediction result is obtained by extracting the time information characteristics and the air information characteristics of the sample data and then learning from different scales, so that the prediction precision of the model is improved; and finally, improving the generalization capability of the prediction model by utilizing the capability of processing the edge by the ConvGRU.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of a wave height prediction model training method provided by the present invention;
fig. 2 is a diagram of a ConvGRU-based codec network according to an embodiment of the present invention;
fig. 3 is an internal structural diagram of a ConvGRU according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a method for predicting the height of sea waves according to an embodiment of the present invention;
FIGS. 5 (a) and (b) are diagrams of the predicted effect according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form a part hereof, and which together with the embodiments of the invention serve to explain the principles of the invention and not to limit its scope.
In the description of the present invention, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to imply that the number of technical features indicated is implicitly being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Further, "a plurality" means two or more unless specifically limited otherwise. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention provides a sea wave height prediction and model training method, equipment and a storage medium, aiming at the defects of a basic deep learning model of the traditional RNN and CNN in the multi-step region prediction of sea surface wave height, the CNN learns some characteristics of local pictures, mainly in a short period, but ignores the time correlation; RNNs learn mainly a temporal information feature, mainly long-term, but ignore spatial correlations. The invention provides a regional multi-step prediction model based on a ConvGRU coding and decoding network structure aiming at the defects of RNN and CNN basic models in the multi-step regional prediction aspect of sea wave height by combining the advantages of the RNN and CNN basic models, adopts the design of the ConvGRU, effectively improves the feature extraction capability of signal data, effectively integrates a convolution GRU self-encoder to form an efficient unsupervised learning network, avoids the problem that RNN forgets long-term information, and improves the prediction precision.
Before the description of the embodiments, the related words are paraphrased:
the CNN (Convolutional Neural Networks) is a feed-forward Neural network, and is composed of one or more Convolutional layers, a pooling layer, and a top fully-connected layer, and is excellent in image processing field, and the CNN is mainly used for extracting local features of Convolutional objects.
An RNN (Recurrent Neural Network) is an artificial Neural Network in which nodes are connected in a ring in a directional manner, and the internal state of the Network can exhibit dynamic timing behavior. Unlike feed-forward neural networks, the RNN can use its internal memory to process an input sequence at arbitrary timing.
The GRU (Gate recovery Unit), which is one of RNNs, is proposed to solve the problems of long-term memory and gradient in back propagation.
The ConvGRU (Convolutional gated round Unit) uses a convolution kernel to replace a full connection layer in the long-short term memory network, that is, the full connection is changed into local connection, and compared with the convolution long-short term memory network, the ConvGRU has the advantages that the number of gated units is reduced, the parameter amount is reduced, and the training speed is increased. The accumulation of errors in the information transfer over long sequences is reduced, enabling the model to preserve memory in long sequences and not be cleared over time or because of low correlation with predictions.
Specific examples are described in detail below:
referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a method for training a wave height prediction model provided in the present invention, and an embodiment of the present invention discloses a method for training a wave height prediction model, which includes:
step S101: constructing a sample data set, wherein the sample data set comprises wave height space-time sequences in different areas;
step S102: the method comprises the steps that a model is built to conduct forward propagation processing on sample data in a sample data set, and a prediction result is output, wherein the prediction result comprises a sea wave height space-time prediction sequence at the next moment in different areas, and the model is built on the basis of a ConvGRU encoder decoder network structure;
step S103: performing back propagation by using the prediction result to update the model parameters;
step S104: and iterating the propagation process for multiple times to obtain a trained sea wave height prediction model when the model is converged.
The sample data set comprises wave height space-time sequences in different areas, and it can be understood that the ConvGRU network not only can establish a time sequence relation as GRU, but also can depict local spatial features as CNN. And a significant feature of the ConvGRU network is that the three-dimensional tensor of the first two dimensions is the spatial dimension and the latter dimension is the temporal dimension. All input and output elements are three-dimensional tensors and spatial information is preserved. Therefore, the matrix dimension of the sea wave height space-time sequence is latitude, longitude and time step.
It should be noted that the model constructed by the invention is constructed based on the ConvGRU encoder-decoder network structure, the ConvGRU design is adopted, the feature extraction capability of the sample data can be effectively improved, the convolution GRU and the self-encoder are effectively integrated to form an efficient supervised-free learning network, and the problem that the RNN forgets long-term information can be avoided. In the training stage, a supervised learning mode is adopted, the output of the network is obtained through forward propagation, the parameters of the network are updated through a backward propagation process, the model is converged after multiple iterations, and the model training is completed.
According to the invention, a large-scale sea wave data sample is provided, so that a sufficient sample is provided for model training, a high-resolution input and output sample data set is constructed, and the prediction accuracy of the model is guaranteed; obtaining the output of the network through forward propagation in the training process, updating the parameters of the network through the backward propagation process, and converging the prediction model after multiple iterations; by utilizing the characteristics of the ConvGRU network structure, the accurate multi-site prediction result is obtained by extracting the time information characteristics and the air information characteristics of the sample data and then learning from different scales, so that the prediction precision of the model is improved; and finally, improving the generalization capability of the prediction model by utilizing the capability of processing the edge by the ConvGRU.
In one embodiment of the invention, constructing a sample data set comprises:
acquiring an original data set, wherein the original data set comprises meteorological data sets carrying sea wave heights in different areas;
converting the original data set into a two-dimensional array to obtain a first data set in a two-dimensional matrix form of each area, wherein the grid size of each area is a preset number;
and preprocessing the first data set in the form of the two-dimensional matrix of each region to obtain a second data set in the form of the three-dimensional matrix of each region, and determining the second data set as a sample data set.
Wherein the raw dataset is derived from a release 5 European reanalysis dataset published by the mid-European weather forecast center, the reanalysis dataset combining model data and observations from all over the world into a global complete and consistent dataset using the laws of physics, combining the previous forecasts with newly available observations in an optimal manner to produce a new best estimate of atmospheric conditions, resulting in a high quality and high temporal and spatial resolution reanalysis dataset. Therefore, the original data set comprises meteorological data sets carrying the heights of ocean waves in different areas.
Note that the reanalysis data set was divided into 720 × 361 grid of global land and ocean at 62km, the grid size of data accuracy was 0.5 ° × 0.5 °, and the meteorological data update interval used was 1 hour. In order to meet the requirement that the data format does not lose spatial correlation, the size of the used area grid is 64 x 64, namely, each area is divided into the size of 64 x 64 grids, and each grid is provided with meteorological data which represent the area storm observation value at the time t.
Wherein, the area storm observation value of the time t expressed by a two-dimensional matrix form is as follows:
Figure BDA0003782647240000091
wherein, the element x t (i, j) represents the observed value at time t of the wave height of the site (i, j), where i, j are the positions of the grid areas, where both M and N are equal to 64, since the area grid size used by the present invention is 64 × 64.
Taking a pacific with a rectangular area as an example, the longitude and latitude of four vertices are (28.75N, 126E), (28.75N, 141.75E), (13n, 126e) and (28.75N, 141.25E), respectively, it should be noted that the original data set, the sample data set and the picture set in the present invention can be transformed to each other, and specifically, the basemap library in python is adopted to perform the visual display of the sea surface area storm.
And then, carrying out preprocessing operation on the first data set in the two-dimensional matrix form of each area to obtain a second data set in the three-dimensional matrix form of each area.
In an embodiment of the present invention, the preprocessing 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 includes:
and combining the first data sets in the form of two-dimensional matrixes in each region based on the time sequence to obtain a second data set in the form of three-dimensional matrixes in each region, wherein the second data set represents a sea wave height space-time sequence in the region, and the matrix dimensionality is latitude, longitude and time step.
The method mainly uses the wave data of the sea area of the first 12 hours to predict the wave of the sea area of the future 12 hours, so the preset time period is generally 12 hours, and the wave height variable matrix channels at k moments are combined into a three-dimensional matrix in each area according to the time sequence:
Figure BDA0003782647240000101
the matrix is a second data set in the form of a three-dimensional matrix of the region, namely a wind-wave height space-time sequence representing the region, and the matrix dimensionality is (different latitudes, different longitudes, and time step lengths). After the sample data set is constructed, the sample data set can be divided into a training set, a verification set and a test set according to the proportion of 3.
In an embodiment of the present invention, before performing model training, the method further includes:
setting hyper-parameters of the model, wherein the hyper-parameters comprise batch size and learning rate;
setting a training mode and training times, wherein the training mode is batch training;
and setting an optimizer and an activation function of the model in the training process, wherein the optimizer is Adam, and the activation function is LeakyReLU.
It can be understood that before the model is learned, the environment of the model needs to be set, specifically, the hyper-parameter of the model is set, the hyper-parameter is a parameter set before the learning process is started, and is not parameter data obtained through training, it needs to be noted that the hyper-parameter can be determined by using a verification set, the hyper-parameter of the model in the invention is that the batch size is 16, and the learning rate is 0.001; setting a training mode and training times of the model, wherein the training mode of the model adopts batch training, and the maximum training times is 100; an optimizer of the model in the training process is set, wherein the optimizer is used for calculating the gradient of a loss function in each epoch to update parameters, adam (Adaptive moment estimation) is selected as the optimizer of the model, the algorithm of the optimizer is easy to realize, and the optimizer has high calculation efficiency and low memory requirement; the method comprises the steps of setting an activation function, if an excitation function is not used, the input of each layer of nodes is a linear function output by an upper layer, the verification is easy, the effect is equivalent to that of no hidden layer, the approximation capability of a network is quite limited, and a nonlinear function is introduced as the excitation function, so that the expression capability of a deep neural network is more powerful.
In one embodiment of the invention, the model is constructed based on the ConvGRU codec network structure;
the ConvGRU encoder network consists of 12 ConvGRU2D layers and 8 groupnorm normalization layers, and encodes input sample data into vectors in a continuous feature space by using the encoder network;
the ConvGRU decoder network consists of 13 ConvGRU2D layers and 8 groupnorm group normalization layers, and the decoder network is used for decoding the coded input sequence and outputting a target sequence.
It can be understood that the prediction model in the present invention is formed based on the encoder network of ConvGRU and the decoder network of ConvGRU, and since the deep learning neural network requires that the input and the output are both of fixed dimensions, the number of layers of the encoder network should be the same as that of the decoder network, and it should be noted that the decoder network usually includes two gate cycle unit convolution layers in the last layer to ensure the output.
The encoder network mainly encodes input sample data into vectors in a continuous feature space, and the decoder network mainly decodes the encoded input sequence and outputs a target sequence. Specifically, please refer to fig. 2, fig. 2 is a network structure diagram of a encoder/decoder based on ConvGRU according to an embodiment of the present invention. The encoder network consists of 12 ConvGRU2D layers and 8 groupnorm group normalization layers; the decoder network consists of 13 ConvGRU2D and 8 groupnorm group normalization layers. The numbers in parentheses in the ConvGRU2D unit represent the number of input channels, the number of output channels, the convolution kernel size, the step size and the padding size, respectively.
It can be understood that the sample data set and the visualized area ocean wave graph in the present invention can be mutually converted, and the prediction result can be finally displayed through the visualization operation, because the display result is in the form of a picture, in order to improve the prediction efficiency, the present invention still adopts a 2D convolution mode for processing, and the specific processing mode of the data through the ConvGRU is referred to the following forward propagation process, which is not described herein again. The processing result can be smoother and the visual picture can be clearer through the normalization layer; in addition, the addition of the activation layer can further improve the prediction accuracy of the model.
In an embodiment of the present invention, the constructing a model performs forward propagation processing on sample data in a sample data set, and outputs a prediction result, including:
carrying out forward propagation processing on the 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:
Z t =σ(W xz *X t +W hz *H t-1 +b z )
R t =σ(W xr *X t +W hr *H t-1 +b r )
H′ t =f(W xh *X t +R t o(W hh *H t-1 )+b h )
H t =(1-Z t )oH′ t +Z t oH t-1
R t to reset the gate, Z t To refresh door, H' t For currently remembered information, H t For final memorization of information. X t Information input at the present moment, H t-1 For hidden layer output at the previous moment, b i And W ij For each bias and weight matrix, f denotes a convolution kernel, a convolution operator,
Figure BDA0003782647240000121
representing the Hadamard product and sigma the Sigmoid function.
The ConvGRU structure can establish a time sequence relation like GRU, and can depict local spatial features like CNN. The internal structures of the common LSTM and the GRU adopt a mode close to full connection, which brings a serious problem of information redundancy, and the connection mode ignores spatial correlation between local pixels in data, convGRU expands the idea of full connection in the GRU into a convolution structure, and replaces the dot product operation in the GRU with convolution operation, please refer to fig. 3, which is an internal structure diagram of a ConvGRU provided by an embodiment of the present invention. All input and output elements are three-dimensional tensors, preserving spatial information while still using a recursive view.
Specifically, the ConvGRU structure selects information by a gate structure composed of a Sigmoid layer and a convolution operation. Wherein, the Sigmoid function is used for hidden layer neuron output, and the value range is (0,1).
In the ConvGRU structure described above, X t And H t-1 By convolution of the desired featuresAccess reset gate R after extraction t And screening the state information of the previous moment by a Sigmoid unit: selection of H t-1 Middle pair H t Transferring more important information; if R is t When it is about 0, then H t-1 Will not transmit information into H t In (1).
X t And H t-1 After convolution calculation, the information in (1) passes through an updating gate Z t The Sigmoid unit in (1) screens the information needing to be forgotten: if Z is t About equal to 1, then H t-1 Almost directly copying the information in (1) to H t (ii) a If Z is t H 'is equal to or equal to 0' t Will be directly transmitted to H t
H′ t The feature extraction is carried out on the input information at the current moment by convolution and the H passing through a reset gate t-1 And after splicing the time information, zooming the data range through an activation function, namely memorizing the state and the information of the current time.
Finally, by (1-Z) t )oH′ t Forget H t-1 Less important feature, and by Z t oH t-1 And selectively memorizing the information of the current node to achieve the final output.
In one embodiment of the invention, the sample data set comprises a training set, a validation set and a test set;
after the trained sea wave height prediction model is obtained when the model reaches convergence, the method further comprises the following steps:
testing the prediction precision of the sea wave height prediction model based on the test set;
and if the prediction precision is smaller than the preset precision, adjusting the network structure of the sea wave height prediction model or processing parameters in the sea wave height prediction model.
It will be appreciated that the test set is only used once, i.e. when evaluating the final model after training is complete, and it is used only for evaluation of the model, and it does not participate in either the learning parameter process or the hyper-parameter selection process. The prediction accuracy can be compared with an actual value according to an output predicted value, and if the prediction accuracy is high, the network training is better. Otherwise, the network structure needs to be further adjusted and the parameters need to be optimized. Such as changing the number of layers in the network or continuing the iterative training process.
In addition, in an embodiment of the present invention, it is further required to perform performance evaluation on the prediction model, specifically, three evaluation functions, namely MAE (mean absolute error), MAPE (mean absolute percentage error) and RMSE (root mean square error), are selected as criteria for measuring the generalization ability of the prediction model, and a specific evaluation formula is as follows:
Figure BDA0003782647240000141
Figure BDA0003782647240000142
Figure BDA0003782647240000143
wherein Y is i In order to be the actual observed value,
Figure BDA0003782647240000144
and n is the number of observation (samples) for predicting the value, then the training weight with the minimum evaluation function value is selected for storage, and the corresponding prediction result is output.
Based on the above sea wave height prediction model training method, an embodiment of the present invention further provides a sea wave height prediction method, please refer to fig. 4, where fig. 4 is a schematic flow diagram of an embodiment of the sea wave height prediction method provided by the present invention, and a specific embodiment of the present invention discloses a sea wave height prediction method, including:
step S501: acquiring a first sea wave satellite cloud picture in a preset time period, wherein the color of the sea wave satellite cloud picture represents the height of sea waves;
step S502: extracting a first sea wave height space-time sequence of a first sea wave satellite cloud picture;
step S503: inputting the first sea wave height space-time sequence into a trained sea wave height prediction model, and outputting a second sea wave height space-time sequence in the next time period of a preset time period, wherein the sea wave height prediction model is constructed based on a ConvGRU encoder-decoder network structure;
step S504: and performing visual processing on the second sea wave height space-time sequence, and outputting a second sea wave satellite cloud picture of the next time period of the predicted preset time period.
In the process of predicting the height of the sea wave, the sea wave data in the next time period is usually predicted by using the sea wave data in the previous time period, specifically, the preset time period in the invention may be 12 hours, the next time period of the preset time period is also 12 hours, and the interval time of the sea wave data is 1 hour.
It should be noted that the effective information in the sea wave satellite cloud picture generally includes sea wave height, longitude and latitude and observation time, where the sea wave height can be obtained according to the color of the sea wave satellite cloud picture, and the darker the color is, the higher the sea wave height is, and the lighter the color is, the lower the sea wave height is.
After the first ocean wave satellite cloud picture in the first 12 hours is obtained, in order that the model can be processed quickly, the characteristics of the first ocean wave satellite cloud picture can be extracted, specifically a first ocean wave height space-time sequence which comprises the characteristic information such as ocean wave height, longitude and latitude, observation time and the like. And then inputting the first sea wave height space-time sequence into a trained sea wave height prediction model for prediction, namely extracting time information characteristics and space information characteristics in the sequence by using a ConvGRU structure included in the prediction model, and then learning from different scales to obtain an accurate multi-station prediction result in the next 12 hours. The ConvGRU structure has been described above with accuracy and is not described here in detail.
The model can realize accurate pixel-level spatial output, better captures global spatial information and maps the global spatial information to the required multi-position output, can carry out multi-step prediction while ensuring the pixel-level regional storm height output, and can learn samples from different prediction moments to realize accurate space-time prediction.
For example, referring to fig. 5 (a) and fig. 5 (b), fig. 5 (a) and fig. 5 (b) are diagrams of a predicted effect according to an embodiment of the present invention. Taking the pacific block rectangular area as an example, randomly selecting 2 prediction samples, obtaining a predicted value (predicted) for the next 12 hours according to the input (input) of the previous 12 hours, and comparing the predicted value with an actual value (target), wherein high storms are displayed in light colors, and low storms are displayed in dark colors.
Based on the above sea wave height prediction model training method or the sea wave height prediction method, an embodiment of the present invention further provides an electronic device, including: a processor and a memory and a computer program stored in the memory and executable on the processor; the processor, when executing the computer program, implements the steps in the wave height prediction model training method or the wave height prediction method according to the above embodiments.
An illustrative diagram of a structure suitable for use in implementing an embodiment of the invention is shown in FIG. 6 as an electronic device 600. The electronic devices in the embodiments of the present invention may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as the processing device 601 hereinafter, and the memory may include at least one of a Read Only Memory (ROM) 602, a Random Access Memory (RAM) 603 and a storage device 608 hereinafter, as shown in detail below:
as shown in fig. 6, the electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. The RAM603 also stores various programs and data necessary for the operation of the electronic apparatus 600. The processing device 601, the ROM602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method illustrated in the flowchart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of embodiments of the present invention.
Based on the wave height prediction model training method or the wave height prediction method, embodiments of the present invention also provide a computer-readable storage medium, where one or more programs are stored, and the one or more programs can be executed by one or more processors to implement the steps in the wave height prediction model training method or the wave height prediction method according to the above embodiments.
Those skilled in the art will appreciate that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware, and the program may be stored in a computer readable storage medium. The computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are also within the scope of the present invention.

Claims (10)

1. A method for training a wave height prediction model is characterized by comprising the following steps:
constructing a sample data set, wherein the sample data set comprises wave height space-time sequences in different areas;
carrying out forward propagation processing on the sample data in the sample data set by constructing a model, and outputting a prediction result, wherein the prediction result comprises a sea wave height space-time prediction sequence at the next moment in different areas, and the model is constructed based on a ConvGRU encoder-decoder network structure;
performing back propagation by using the prediction result to update model parameters;
and iterating the propagation process for multiple times to obtain a trained sea wave height prediction model when the model is converged.
2. The wave height prediction model training method according to claim 1, wherein the constructing a sample data set comprises:
acquiring an original data set, wherein the original data set comprises meteorological data sets carrying sea wave heights in different areas;
converting the original data set into a two-dimensional array to obtain a first data set in a two-dimensional matrix form of each area, wherein the grid size of each area is a preset number;
and preprocessing the first data set in the form of the two-dimensional matrix of each region to obtain a second data set in the form of the three-dimensional matrix of each region, and determining the second data set as the sample data set.
3. A method for training a sea wave height prediction model according to claim 2, wherein the preprocessing operation on the first data set in the form of a two-dimensional matrix of each region to obtain the second data set in the form of a three-dimensional matrix of each region comprises:
and combining the first data sets in the form of two-dimensional matrixes in each region based on the time sequence to obtain a second data set in the form of three-dimensional matrixes in each region, wherein the second data set represents a sea wave height space-time sequence in the region, and the matrix dimensionality is latitude, longitude and time step.
4. A method of training a sea wave height prediction model according to claim 1, wherein before performing model training, the method further comprises:
setting hyper-parameters of a model, wherein the hyper-parameters comprise batch size and learning rate;
setting a training mode and training times, wherein the training mode is batch training;
and setting an optimizer and an activation function of the model in a training process, wherein the optimizer is Adam, and the activation function is LeakyReLU.
5. A method for training a wave height prediction model according to claim 1, characterized in that the model is constructed based on a ConvGRU encoder-decoder network structure;
the ConvGRU encoder network consists of 12 ConvGRU2D layers and 8 groupnorm normalization layers, and the encoder network is utilized to encode input sample data into vectors in a continuous feature space;
the ConvGRU decoder network consists of 13 ConvGRU2D layers and 8 groupnorm group normalization layers, and the decoder network is used for decoding the coded input sequence and outputting a target sequence.
6. The sea wave height prediction model training method according to claim 5, wherein the constructing model performs forward propagation processing on the sample data in the sample data set and outputs a prediction result, and the method comprises the following steps:
forward propagation processing is carried out on the sample data in the sample data set by utilizing a forward propagation formula of a ConvGRU neuron;
wherein the forward propagation formula of the ConvGRU neuron comprises:
Z t =σ(W xz *X t +W hz *H t-1 +b z )
R t =σ(W xr *X t +W hr *H t-1 +b r )
Figure FDA0003782647230000021
Figure FDA0003782647230000022
R t to reset the gate, Z t To refresh door, H' t For currently remembered information, H t For final memorization of information. X t Information input at the present moment, H t-1 For hidden layer output at the previous moment, b i And W ij For each bias and weight matrix, f denotes a convolution kernel, a convolution operator,
Figure FDA0003782647230000031
representing the Hadamard product and sigma the Sigmoid function.
7. A wave height prediction model training method according to claim 1, characterized in that 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 reaches convergence, the method further comprises the following steps:
testing the prediction precision of the sea wave height prediction model based on the test set;
and if the prediction precision is smaller than the preset precision, adjusting the network structure of the sea wave height prediction model or processing parameters in the sea wave height prediction model.
8. A method of predicting sea wave height, comprising:
acquiring a first sea wave satellite cloud picture in a preset time period, wherein the color of the sea wave satellite cloud picture represents the height of sea waves;
extracting a first sea wave height space-time sequence of the first sea wave satellite cloud picture;
inputting the first sea wave height space-time sequence into a trained sea wave height prediction model, and outputting a second sea wave height space-time sequence in a next time period of a preset time period, wherein the sea wave height prediction model is constructed based on a ConvGRU encoder-decoder network structure;
and performing visualization processing on the second sea wave height space-time sequence, and outputting a predicted second sea wave satellite cloud picture of the next time period in a preset time period.
9. An electronic device comprising a memory and a processor, wherein the memory is configured to store a program; the processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps of the wave height prediction model training method of any one of the above claims 1 to 7 or the wave height prediction method of claim 8.
10. A computer-readable storage medium storing a computer-readable program or instructions, which when executed by a processor, is capable of implementing the steps of the wave height prediction model training method of any one of claims 1 to 7 or the wave height prediction method of claim 8.
CN202210933548.6A 2022-08-04 2022-08-04 Sea wave height prediction and model training method, electronic device and storage medium Pending CN115660041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210933548.6A CN115660041A (en) 2022-08-04 2022-08-04 Sea wave height prediction and model training method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210933548.6A CN115660041A (en) 2022-08-04 2022-08-04 Sea wave height prediction and model training method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115660041A true CN115660041A (en) 2023-01-31

Family

ID=85024174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210933548.6A Pending CN115660041A (en) 2022-08-04 2022-08-04 Sea wave height prediction and model training method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115660041A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116953677A (en) * 2023-09-18 2023-10-27 海底鹰深海科技股份有限公司 Sonar target recognition algorithm based on deep learning
CN117407660A (en) * 2023-12-13 2024-01-16 中国海洋大学三亚海洋研究院 Regional sea wave forecasting method based on deep learning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116953677A (en) * 2023-09-18 2023-10-27 海底鹰深海科技股份有限公司 Sonar target recognition algorithm based on deep learning
CN117407660A (en) * 2023-12-13 2024-01-16 中国海洋大学三亚海洋研究院 Regional sea wave forecasting method based on deep learning

Similar Documents

Publication Publication Date Title
KR101880907B1 (en) Method for detecting abnormal session
CN115660041A (en) Sea wave height prediction and model training method, electronic device and storage medium
CN112132149B (en) Semantic segmentation method and device for remote sensing image
CN111386536A (en) Semantically consistent image style conversion
CN112489164B (en) Image coloring method based on improved depth separable convolutional neural network
CN114724012B (en) Tropical unstable wave early warning method and device based on space-time cross-scale attention fusion
CN114460555B (en) Radar echo extrapolation method and device and storage medium
WO2006120724A1 (en) Geographic information system using neural networks
CN113705331A (en) SAR ship detection method based on quaternary characteristic pyramid network
CN116563682A (en) Attention scheme and strip convolution semantic line detection method based on depth Hough network
Adeli et al. An advanced spatio-temporal convolutional recurrent neural network for storm surge predictions
Ye et al. Multi-year ENSO forecasts using parallel convolutional neural networks with heterogeneous architecture
Dong et al. Motion-guided global–local aggregation transformer network for precipitation nowcasting
KR102582706B1 (en) Method and apparatus for image super resolution
CN113554653A (en) Semantic segmentation method for long-tail distribution of point cloud data based on mutual information calibration
CN115953330B (en) Texture optimization method, device, equipment and storage medium for virtual scene image
CN116977872A (en) CNN+ transducer remote sensing image detection method
CN111814693A (en) Marine ship identification method based on deep learning
Pietropolli et al. GANs for integration of deterministic model and observations in marine ecosystem
CN110648030A (en) Method and device for predicting seawater temperature
Chen et al. FC-ZSM: Spatiotemporal downscaling of rain radar data using a feature constrained zooming slow-mo network
CN114792349A (en) Remote sensing image conversion map migration method based on semi-supervised generation confrontation network
CN113222206A (en) Traffic state prediction method based on ResLS-C deep learning combination
WO2024071377A1 (en) Information processing device, information processing method, and program
Li et al. Super resolution for single satellite image using a generative adversarial network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination