CN114819053B - Average wave direction forecast deviation correcting method based on space-time convolution LSTM - Google Patents
Average wave direction forecast deviation correcting method based on space-time convolution LSTM Download PDFInfo
- Publication number
- CN114819053B CN114819053B CN202210210019.3A CN202210210019A CN114819053B CN 114819053 B CN114819053 B CN 114819053B CN 202210210019 A CN202210210019 A CN 202210210019A CN 114819053 B CN114819053 B CN 114819053B
- Authority
- CN
- China
- Prior art keywords
- data
- time
- forecast
- wave direction
- space
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000004458 analytical method Methods 0.000 claims abstract description 94
- 238000012937 correction Methods 0.000 claims abstract description 61
- 230000015654 memory Effects 0.000 claims abstract description 41
- 238000012549 training Methods 0.000 claims abstract description 19
- 230000007246 mechanism Effects 0.000 claims description 24
- 230000004927 fusion Effects 0.000 claims description 22
- 239000011159 matrix material Substances 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 7
- 238000010845 search algorithm Methods 0.000 claims description 6
- 230000002776 aggregation Effects 0.000 claims description 5
- 238000004220 aggregation Methods 0.000 claims description 5
- 238000012546 transfer Methods 0.000 claims description 5
- 230000001788 irregular Effects 0.000 claims description 4
- 230000004931 aggregating effect Effects 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 2
- 238000012856 packing Methods 0.000 claims 1
- 238000002474 experimental method Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 9
- 238000004806 packaging method and process Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000010801 machine learning Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000006467 substitution reaction Methods 0.000 description 4
- 230000004075 alteration Effects 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000002860 competitive effect Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 238000007500 overflow downdraw method Methods 0.000 description 2
- 230000000306 recurrent effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 108010038083 amyloid fibril protein AS-SAM Proteins 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000003874 inverse correlation nuclear magnetic resonance spectroscopy Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000036961 partial effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012950 reanalysis Methods 0.000 description 1
- 230000006886 spatial memory Effects 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Image Analysis (AREA)
Abstract
The invention belongs to the field of numerical forecasting, and discloses a method for correcting average wave direction forecasting deviation of space-time convolution LSTM, which comprises the steps of selecting forecasting data, and selecting hourly wave forecasting data of a region to be corrected as a mode data sample; re-analyzing the lattice point data, taking the analysis data as a true value, and selecting the average wave direction per hour of the correction area to be detected; the data matching is carried out, so that the forecast data can be interpolated and matched to grid points of the analysis data, in addition, the forecast data and the analysis data are matched on a time scale, and finally, the two data are matched on a space and time level; constructing a deviation correction training set; a multi-layer network structure of a space-time convolution LSTM deviation correction model based on layer self-attention memory is built. The invention adopts a face-to-face area correction method to model the time space characteristics, overcomes the limitation of the traditional numerical correction method on azimuth angles, and ensures that the deviation correction is more accurate.
Description
Technical Field
The invention belongs to the technical field of average wave direction prediction deviation correction, and particularly relates to an average wave direction prediction deviation correction method based on space-time convolution LSTM.
Background
Existing wave direction prediction models based on machine learning usually adopt a point-to-point mode (tree model, multi-layer perceptron and the like) or a point-facing mode (residual convolution neural network), but are difficult to model aiming at time-of-history time space-time information and other sea waves and meteorological features; in addition, the wave direction prediction often uses the wave direction prediction as a numerical value and ignores the azimuth angle characteristic, so that a machine learning model which can better integrate the space-time characteristic and other characteristics and consider the wave direction and angle characteristic is required to be constructed for solving the modeling problem of the space-time characteristic at azimuth angle and historical moment; in some practical applications, the analysis data is taken as a true value, but the analysis data cannot obtain the latest data, for example, ERA-5 data is adopted, so that only the analysis data of the latest previous 5 days can be obtained, and the practical application requirement cannot be met.
Disclosure of Invention
In view of this, the present invention proposes a mean wave direction forecast bias correction method based on space-time convolution LSTM, comprising the steps of:
S1: selecting forecast data, and selecting hour-by-hour sea wave forecast data of the region to be corrected as a mode data sample;
S2: re-analyzing the lattice point data, taking the analysis data as a true value, and selecting the average wave direction per hour of the correction area to be detected;
S3: in order to match the forecast data with the analysis data, if the forecast data is irregular grid data, performing inverse distance weight interpolation on the forecast data so that the forecast data can be interpolated and matched to grid points of the analysis data, in addition, the forecast data is matched with the analysis data on a time scale, and finally, the two data are matched on a space and time level;
S4: constructing a deviation correction training set;
s5: a multi-layer network structure of a space-time convolution LSTM deviation correction model based on layer self-attention memory is built, and the multi-layer network structure comprises the following three parts:
A first layer: a space-time convolution LSTM layer based on a layer self-attention mechanism adopts a 3-layer space-time convolution LSTM module based on the self-attention mechanism, and a prediction and analysis data space-time characteristic matrix is selected as input in time sequence;
A second layer: the channel convolution fusion layer is used for carrying out feature selection on future time forecast data, splicing the forecast data after feature selection with the average wave direction of the analysis data before 144 hours and the real angle difference of the forecast and analysis data wave direction, carrying out channel combination with the output of the space-time convolution LSTM based on a layer self-attention mechanism, and carrying out 1X 1 channel convolution fusion on the fused data, wherein the output of the channel convolution is the forecast and the real angle difference of the analysis wave direction of the model forecast;
third layer: and the deviation correcting layer is used for adding the real angle difference of the wave direction predicted by the model and the average wave direction of the forecast data at the future moment to generate corrected average wave direction data.
Further, the constructing the bias correction training set includes:
The real angle difference of the average wave direction of the forecast data and the average wave direction of the analysis data is obtained, in addition, the average wave direction before 144 hours of the time continuous analysis data is also used as the time sequence characteristic of a training set, and finally the data is converted into the data in the form of a two-dimensional image in space so as to construct a space-level matching and time-level continuous deviation correction training set, wherein the training set comprises the real angle difference of the forecast data, the average wave direction of the analysis data, the average wave direction of the forecast data and the analysis data, and the average wave direction before 144 hours of the analysis data.
Furthermore, the space feature extraction is performed by adopting a 3*3-sized convolution kernel in the space-time convolution LSTM, the 3-layer space-time convolution LSTM hidden layers based on the layer self-attention mechanism are respectively 32, 32 and 32, and the hidden layer of the self-attention mechanism is 12.
Further, the calculation formula of the true angle difference is as follows:
θbias=θf-θr-360×((θf-θr)>180)+360×((θf-θr)<-180)
where θ f represents the forecast data average direction, and θ r represents the analyze data average direction.
Further, the feature aggregation step includes the following steps:
In the same time step, the aggregated characteristic Z is the fusion of Z h and Z m in the model layer-to-layer propagation process, and Z h and Z m respectively correspond to Is characterized by (2); for Z h,/>, last time stepOutput/by predRNN-Mapped into different feature spaces in the SAM module:
where W hq,Whk,Whv is the set of weights for the 1 x 1 convolution, And C is the number of channels, and N is the product of the length and the width of the feature map, and the similarity score between points is calculated by applying matrix products:
The similarity between the ith and jth points is expressed as Wherein/>And h t,j is a feature vector of dimension c×1, then normalizing the similarity score along the column:
z h is aggregated by weighting each position:
Z h is obtained by querying the bottom layer Mapping underlying memory 1×1 convolutions to keys by weights W mk and W mv And value/>Input/>, is then calculated by matrix multiplication between query Q h and key K m And memory/>Similarity score between:
all weights for the aggregate features are calculated by the following formula:
Then, the "pixel" for the i-th position in Z m is calculated by a weighted sum of the N positions in value V m:
Wherein, Is the j-th column of the memory; finally, Z is determined by W z[Zh;Zm.
Furthermore, the upper memory information is adaptively updated through a gating mechanism, so that the SAM can capture the spatial correlation and predRNN 'zigzag' memory transfer structure on the basis of predRNN models, and the memory can grasp global space-time information; by aggregating features Z and inputsTo produce an input gate i "t and an input fusion gate g" t, and in addition, forget that the gate is replaced with 1-i "t to reduce the parameters, the mathematical representation of the memory update procedure is as follows:
further, through the output gate o' t point multiplication Output from attention memory Module/>The formula is as follows:
Further, in the time sequence model LSA-predRNN, forecast data F and analysis data R at the same moment before 6 days and a real wave direction angle difference between F and R are used as time sequence data input; in addition, for future t-moment forecast data, characteristics are selected to screen characteristics, the screened forecast data F t and the real wave direction angle difference between the analysis data R t-144 and F t and R t-144 at the same moment before 6 days are spliced, channel convolution fusion is carried out on the real wave direction angle difference and the output of LSA-predRNN, and the information learned by the time sequence model and a plurality of characteristics of the future time forecast data and related analysis data are further subjected to characteristic learning so as to better learn the real angle deviation.
Further, the feature selection mode is a backward search algorithm without heuristic in the packaging method.
The beneficial effects of the invention are as follows:
1) The machine learning deviation correcting method aiming at the average wave direction of the regional grid is provided, and the past deviation correcting method based on the average wave direction is mostly aimed at specific floating mark points, but adopts a face-to-face regional correcting method, so that the deviation correcting has higher application value.
2) Based on the deep learning image recognition model, a space-time convolution LSTM method based on a layer self-attention mechanism is provided, the method models space-time characteristics and has more competitive power compared with other time sequence prediction models.
3) The correction method for the wave direction real angle difference is adopted, the real angle deviation is predicted, and then the angle difference and the forecast data are added to complete deviation correction, so that the limitation of the traditional numerical correction method on the azimuth angle is overcome.
4) By adopting the channel convolution fusion method, the model considers time sequence data and also considers other sea wave and meteorological features by considering future time forecast data.
5) The analysis data is also used as the input of the wave direction deviation correction, and the analysis data at the same moment before 5 days is used as the input, so that the forecast data has a time sequence in the input time sequence data, and the analysis data also has a time sequence, thereby improving the model correction effect.
Drawings
FIG. 1 is a schematic diagram of the true angular difference of the wave direction of the present invention;
FIG. 2 is a timing model diagram of LSA-predRNN of the present invention;
FIG. 3 is a diagram of a SAM self-attention memory module;
FIG. 4 is a schematic diagram of a method for correcting the wave direction deviation of a space-time convolution LSTM according to the present invention;
fig. 5 is a feature selection line graph.
Detailed Description
The invention is further described below with reference to the accompanying drawings, without limiting the invention in any way, and any alterations or substitutions based on the teachings of the invention are intended to fall within the scope of the invention.
The invention aims to provide an average wave direction forecast deviation correcting method based on space-time convolution LSTM.
In order to achieve the purpose, the technical scheme adopted by the invention comprises the following steps:
A space-time convolution LSTM wave direction forecast deviation correcting method based on layer self-attention memory is characterized by comprising the following steps:
s1: selecting forecast data, and selecting hour-by-hour sea wave forecast data of the region to be corrected as a mode data sample;
s2: selecting re-analysis lattice point data, taking analysis data as a true value, and selecting an hour-by-hour average wave direction analysis data of an correction area to be detected;
S3: in order to match the forecast data with the analysis data, if the forecast data is irregular grid data, inverse distance weight interpolation is needed to be carried out on the forecast data so that the forecast data can be interpolated and matched to grid points of the analysis data, in addition, the forecast data is matched with the analysis data on a time scale, and finally, the two data are matched on a space and time level;
S4: constructing a deviation correction training set, solving the real angle difference of the average wave direction of the forecast data and the analysis data, taking the average wave direction before 144 hours (6 days) of time-continuous analysis data as the time sequence characteristic of the training set, and finally converting the data into data in the form of two-dimensional images in space to construct a deviation correction training set with matched space layers and continuous time layers, wherein the deviation correction training set comprises the average wave direction of the forecast data, the average wave direction of the analysis data, the real angle difference of the forecast data and the analysis data, and the average wave direction 144 hours before the analysis data;
S5: building a space-time convolution LSTM deviation correction model based on layer self-attention memory, and building a multi-layer network structure by using Pytorch, wherein the space-time convolution LSTM deviation correction model comprises the following three parts:
A first layer: based on a layer self-attention mechanism, a 3-layer self-attention mechanism based space-time convolution LSTM module is adopted, and a prediction and analysis data space-time characteristic matrix is selected as input in time sequence, namely 5 time prediction data and 5 time analysis data before 120 hours are selected; the space characteristic extraction is carried out by adopting a 3*3-sized convolution kernel in the space-time convolution LSTM, and the 3-layer space-time convolution LSTM hidden layers based on the layer self-attention mechanism are respectively 32, 32 and 32, and the hidden layer of the self-attention mechanism is 12;
A second layer: the channel convolution fusion layer performs feature selection on future time forecast data, a feature selection mode adopts a backward search algorithm without heuristic in a packaging method, then the forecast data after feature selection is spliced with average wave direction of analysis data before 144 hours and real angle difference of the forecast and analysis data wave direction, then the channel convolution fusion layer performs channel combination with output of space-time convolution LSTM based on a layer self-attention mechanism, and then the fused data is subjected to 1X 1 channel convolution fusion, and at the moment, the output of channel convolution is the forecast and analysis wave direction real angle difference of model prediction;
Third layer: the deviation correcting layer adds the real wave direction angle difference predicted by the model and the average wave direction of the predicted data at the future moment to realize the prediction deviation correction;
In order to make the technical scheme and the beneficial effects of the invention clearer, the invention is further described below with reference to practical examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
The invention provides a method for inputting re-analysis data at the same time before 6 days and the average wave direction angle difference of the re-analysis data at the same time before 6 days and the re-analysis data at the same time before 6 days as a model, for example, the historical time prediction data input by the model is F t-5、Ft-4、Ft-3、Ft-2、Ft-1, the analysis data R t-149、Rt-148、Rt-147、Rt-146、Rt-145 at the same time before 6 days (6 x 24 hours), and the average wave direction true angle difference R t-149-Ft-5、Rt-148-Ft-4… Rt-145-Ft-1 of the re-analysis data at the same time before 6 days and the re-analysis data at the same time before 6 days are also input as the model.
1. Wave direction true angle difference
Firstly, aiming at the cyclic characteristic of 0-360 degrees of azimuth angle, converting the numerical correction problem of the prior researchers into the prediction problem of the real angle difference, and then adding the angle difference and the wave direction of the prediction data to finish deviation correction; the actual angle difference θ bias is shown in fig. 1, where θ f represents the average wave direction of the forecast data, θ r represents the average wave direction of the analysis data, and finally, the actual angle difference is added to the forecast data to implement deviation correction, where the actual angle difference formula is:
θbias=θf-θr-360×((θf-θr)>180)+360×((θf-θr)< -180) (1)
2. Space-time convolution LSTM model based on self-attention mechanism
Aiming at space-time feature modeling, the space feature matrix is converted into a two-dimensional image value by reference to image recognition research, and a space-time convolution LSTM deviation correcting method based on a layer self-attention mechanism is provided.
LSTM is a recurrent neural network (Recurrent neural network, abbreviated as RNN) that recursively uses sequence data as input in the evolution direction of the sequence and all nodes (looping units) are chained.
In predRNN structures, the memory module does not fully express the spatial memory between layers and the zigzag time memory transfer relationship between different time steps, so the invention proposes a space-time LSTM (LSA-predRNN) based on a layer self-attention mechanism based on predRNN for the present deviation correction invention, as shown in fig. 2 and 3, spatial information is firstly transferred upwards from layer to layer, and then transferred forwards along the zigzag along with the time, so that the spatial information can flow efficiently; in addition, the time information is still transferred horizontally forward. In predRNN, a Self-attention memory (Self-AttentionMemory, abbreviated as SAM) structure is introduced to time-space memoryCalculated output/>, with standard time memory and space-time memoryFurther spatial feature learning is performed to fully capture global spatial and temporal information; here the SAM module causes spatiotemporal memory to be transferred from layer to layer of the same time slice of the model, as opposed to the time-sequential forward transfer of memory in SA-ConvLSTM.
In LSA-predRNN, a space-time convolution LSTM module (LSA-ST-LSTM) based on a self-attention mechanism is included, and the specific implementation mode is shown as a formula 2, when the model layer number is 1, the module input is x t, and when the model layer number is greater than 1, the input is the lower model output
The SAM self-attention memory structure introduced in LSA-ST-LSTM is shown in FIG. 3 and comprises the last time stepMemory output of underlying model/>The whole process can be divided into three parts of feature aggregation, memory updating and output.
1. Feature aggregation. In the same time step, the aggregated characteristic Z is the fusion of Z h and Z m in the model layer-to-layer propagation process, and Z h and Z m respectively correspond toIs characterized by (2); for Z h,/>, last time stepOutput/by predRNN-Mapped into different feature spaces in the SAM module:
where W hq,Whk,Whb is the set of weights for the 1 x1 convolution, And C is the number of channels, and N is the product of the length and the width of the feature map, and the similarity score between points is calculated by applying matrix products:
The similarity between the ith and jth points is expressed as Wherein/>And h t,j is a feature vector of dimension c×1, then normalizing the similarity score along the column:
finally, Z h are aggregated by weighting each position:
Z h is obtained by querying the bottom layer Mapping underlying memory 1×1 convolutions to keys by weights W mk and W mv And value/>Input/>, is then calculated by matrix multiplication between query Q h and key K m And memory/>Similarity score between:
Similar to equation 4, all weights for the aggregated features are given by:
Then, the "pixel" for the i-th position in Z m is calculated by a weighted sum of the N positions in value V m:
Wherein, Is the j-th column of the memory; finally, Z is determined by W z[Zh;Zm.
2. And (5) memory updating. The upper Memory information is self-adaptively updated through a gating mechanism, so that the SAM can capture the spatial correlation (layer scale) and the time dependence (predRNN' zigzag Memory transfer structure) on the basis of a predRNN model, and the Memory can grasp the global space-time information. By aggregating features Z and inputsTo produce input gates i "t and input fusion gates g" t, and in addition, forget that the gates are replaced with 1-i "t to reduce parameters, the update process can be expressed as follows:
3. and outputting. Through the point multiplication of the output gate o' t Output from attention memory Module/>The formula is as follows:
Analysis data input
Since the invention takes the analysis data as the true value, but the analysis data cannot acquire the latest data, such as ERA-5 data adopted by the invention, only the analysis data of the latest previous 5 days can be acquired, so as to meet the actual application requirement, the invention proposes a method for inputting the analysis data at the same moment before 6 days and the analysis data wave direction angle difference at the same moment before 6 days as a model, wherein the historical moment forecast data input by the model is F t-5、 Ft-4、Ft-3、Ft-2、Ft-1, and the analysis data R t-149、Rt-148、 Rt-147、Rt-146、Rt-145 at the same moment before 6 days (6 x 24 hours) and the analysis data average wave direction true angle difference R t-149-Ft-5、Rt-148-Ft-4…Rt-145-Ft-1 at the same moment before 6 days are also input as the model, as shown in a left LSA-predRNN module in the following figure 4.
Channel convolution fusion aims at other characteristic modeling problems (sea wave characteristics and meteorological characteristics) except the average wave direction, can be integrated into a deviation correction model, and can help to improve model performance, and in a time sequence model LSA-predRNN, as shown in the following figure 4, forecast data F (Forecast) and analysis data R (analysis) at the same moment before 6 days and a real wave direction angle difference between F and R are input as time sequence data; in addition, for the forecast data at the future time (t time), feature selection is performed on the forecast data to screen features, a backward search algorithm without heuristic in a packaging method is selected in a feature selection mode, the screened (1) forecast data F t and (2) real wave direction angle differences between the forecast data R t-144 (reanalysis) at the same time before 6 days and (3) F t and R t-144 are spliced, channel convolution fusion is performed on the forecast data and the output of a time sequence model (LSA-predRNN), the operation is similar to full-connection feature learning of one-dimensional data, and the information learned by the time sequence model is further subjected to feature learning with a plurality of features of the forecast data at the future time and related analysis data, so that the real angle deviation is better learned. Packaging method (Wrapper) basic idea: depending on the objective function (often the predictive effect score), several features are selected at a time, or excluded. For each feature subset to be selected, a model is trained over the training set and then the feature subset is selected on the verification set based on the error magnitude. What algorithm is generally to be trained, the algorithm is selected for evaluation. The backward search algorithm selects one feature deletion at a time from the existing feature set and evaluates until a threshold is reached or the remaining feature set is empty, and then selects from all the attempted feature subsets F that have the smallest error rate on the verification set. The packaging method is the prior art without heuristic backward search algorithm, and the invention is not repeated.
Correction of forecast deviation
As shown in fig. 4, the real angle difference output by the channel convolution fusion is added to the forecast data to realize the real angle difference correction, and the corrected average wave direction data is generated.
The experiment of the invention is mainly divided into two parts: model comparison experiment and deviation correction experiment. Model comparison experiments model performance was explored using 1872 hours (2021/03/01-2021/05/16) for a south sea sub-area (8.5-16°n, 109.5-125°e) with a two-dimensional image size of 16 x 16. The forecast data is FVcom unstructured triangle mesh data; the re-analysis dataset was ERA-5 data with a resolution of 0.5 °. The invention was trained for the first 1704 hours and tested for the last 168 hours. The prediction data is subjected to inverse distance weight interpolation (INVERSE DISTANCE WEIGHTED is an interpolation method used when large data is displayed, and is not repeated in the prior art in this embodiment), the prediction data is mapped onto the analysis data, the two data are matched on a 0.5-degree grid, then the angular difference of the wave directions between the two data sets is obtained, the average wave direction of the analysis data at the same moment before 6 days is also mapped with the data, and meanwhile, the average wave direction of the prediction data and the average wave direction of the analysis data at the same moment before 6 days are obtained to obtain the true angular difference of the wave directions so that the analysis data can also be input as a subsequent model, so that the prediction data input and the analysis input have time sequence characteristics. For the space-time prediction task, the value needs to be filled in for each space-time grid, and according to the land and ocean distinction, the ocean part is still the wave direction angle difference value and other characteristic values (such as wave height, wave period and the like), and the land part is set to 0.
To verify the proposed model performance, four model variants were proposed: (1) The method does not comprise a subsequent channel convolution fusion and deviation correction module, and the analysis data is not used as an input model, and the model output result plus the forecast data is used for obtaining a corrected result, which is called LSA-predRNN-v1; (2) On the basis of a v2 model, preferentially selecting all features of future time forecast data, and then adding the features into the model to perform channel convolution fusion, which is called LSA-predRNN-v2; (3) Finally, on the basis of v2, the average wave direction of the analysis data at the same moment before the 6 days of the historical moment forecast data and the real wave direction angle difference of the analysis data and the forecast data are input as a model, in addition, the average wave direction of the analysis data and the real wave direction angle difference of the analysis data and the forecast data at the same moment before the 6 days of the future moment are added into a channel fusion module, and the final model is called LSA-predRNN-v3.
In the model comparison experiment, carrying out comparison experiments on total 7 models of LSTM, convLSTM, predRNN, self-Attention ConvLSTM, LSA-predRNN-v1, LSA-predRNN-v2 and LSA-predRNN-v3 respectively, carrying out feature selection in the v2 model experiment, exploring the model performance in a south sea partial area (9.5-11.5 DEG N, 112.0-114.0 DEG E) in 400 hours (2021/03/01-2021/05/16), carrying out a packaging method without a heuristic backward search method, so as to finish feature selection on all features except for average wave direction, adopting LambdaLR of pytorch in a feature selection process to adjust learning rate, and deploying an early-stop method (earlystopping) for accelerating model training time; as shown in fig. 5, the feature selection result shows that the effect is best by only retaining 3 forecast data features of the average wave direction u component (sin (wdir)), the average wave direction v component (cos (wdir)), and the water depth (h_center) and adding the average wave direction (wdir), so that the 4 parameters are selected as v2 model features to perform subsequent channel convolution fusion; finally, the 7 model evaluation indexes are RMSE in degrees (°), and the experimental results are shown in table 1 below.
TABLE 1 average wave direction correction experiment results
Prediction mode | Before correction RMSE (°) | RMSE after correction (°) | Improving effect |
LSTM(base) | 114.3382 | 67.6233 | 40.86% |
ConvLSTM | 114.3382 | 58.4741 | 48.86% |
predRNN | 114.3382 | 48.6682 | 57.43% |
SA-ConvLSTM | 114.3382 | 53.2810 | 53.87% |
LSA-predRNN-v1 | 114.3382 | 47.7424 | 58.24% |
LSA-predRNN-v2 | 114.3382 | 46.8441 | 59.03% |
LSA-predRNN-v3 | 114.3382 | 36.9760 | 67.66% |
As can be seen by comparing 7 models, the LSA-predRNN-v3 model has an RMSE index which is better than that of other 6 models, the model is improved by 67.66 percent compared with the model before correction, and is improved by 45.32 percent compared with the baseline model LSTM, which shows that the proposed time sequence model has certain advancement.
In addition, for comparison with the related study, a multi-layer perceptron (MLP) model adopted by the related researcher is introduced in the experiment, and the comparison model MLP is corrected for wave direction values, and in addition, for verifying the reliability of the wave direction true angle difference proposed by the study, an LSA-predRNN-v3-number model is introduced, and the model does not consider wave direction azimuth angle characteristics and only corrects the deviation for the wave direction values. The results show that compared with the MLP method of the previous study and the deviation correcting method aiming at numerical values, the method provided by the study has certain advancement.
TABLE 2 average wave direction correction experiment results
Prediction mode | Before correction RMSE (°) | RMSE after correction (°) | Improving effect |
MLP | 81.7139 | 47.1922 | 42.25% |
LSA-predRNN-v3-number | 94.7265 | 42.6108 | 55.02% |
LSA-predRNN-v3 | 114.3382 | 36.9760 | 67.66% |
Deviation correction experiment:
Training a model by using the whole south sea area (0-25 DEG N, 105-122 DEG E) for 800 hours (2021/4/13-2021/5/16), wherein the area image size is 51 multiplied by 35; data from 632 hours before training and from 168 hours after training are selected, deviation correction is applied, and the model deviation correction effect is visualized by taking 2021, 5, 16 and 23 hours as an example, so that the systematic error influence of FVcom forecast modes is remarkably eliminated after correction.
Example 2
In example 1, only the average direction of the analysis data is taken as the true value, and the model correction effect is described, because the research area has no observation data of the lattice point, if the observation data of the lattice point exists, the observation data can be taken as input as the observation data of the analysis data, but the observation data can be kept consistent with the time of the forecast data without selecting the same time before 6 days, so that the embodiment forms an average direction deviation correction method based on the fact that the average direction of the analysis data is replaced by the true value based on the observation data.
Example 3
The peak wave direction is also a wave parameter, so that the deviation correction can be carried out on the peak wave direction lattice point area data by referring to the average wave direction; therefore, in this example, the peak direction deviation correction method was formed on the basis of example 1 by substituting the peak direction for the analysis data average direction to be a true value.
Example 4
In the invention, the selected forecast data is irregular triangular network data, inverse distance weight interpolation is needed to complete matching of re-analysis lattice point data, however, the WW3 (WAVEWATCH-iii) wave forecast data is regular lattice point forecast data, and bilinear interpolation can be directly carried out on the forecast data when the regular type forecast data is ordered so as to match the re-analysis data or real data of the regular lattice points, so that wave direction deviation correction is carried out on the forecast data in the mode.
Example 5
In the feature selection experiment, a 5×5 region was selected, and neither 51×35 nor 16×16 was selected, but the calculated RMSE effect was significantly reduced, so that the present embodiment was corrected for the deviation of the average wave direction, and may be performed in a divided region.
The beneficial effects of the invention are as follows:
1) The machine learning deviation correcting method aiming at the average wave direction of the regional grid is provided, and the past deviation correcting method based on the average wave direction is mostly aimed at specific floating mark points, but adopts a face-to-face regional correcting method, so that the deviation correcting has higher application value.
2) Based on the deep learning image recognition model, a space-time convolution LSTM method based on a layer self-attention mechanism is provided, the method models space-time characteristics and has more competitive power compared with other time sequence prediction models.
3) The correction method for the wave direction real angle difference is adopted, the real angle deviation is predicted, and then the angle difference and the forecast data are added to complete deviation correction, so that the limitation of the traditional numerical correction method on the azimuth angle is overcome.
4) By adopting the channel convolution fusion method, the model considers time sequence data and also considers other sea wave and meteorological features by considering future time forecast data.
5) The analysis data is also used as the input of the wave direction deviation correction, and the analysis data at the same moment before 5 days is used as the input, so that the forecast data has a time sequence in the input time sequence data, and the analysis data also has a time sequence, thereby improving the model correction effect.
The word "preferred" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferred" is intended to present concepts in a concrete fashion. The term "or" as used in this disclosure is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise or clear from the context, "X uses a or B" is intended to naturally include any of the permutations. That is, if X uses A; x is B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.
Moreover, although the disclosure has been shown and described with respect to one or more implementations, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. The present disclosure includes all such modifications and alterations and is limited only by the scope of the following claims. In particular regard to the various functions performed by the above described components (e.g., elements, etc.), the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the disclosure. Furthermore, while a particular feature of the disclosure may have been disclosed with respect to only one of several implementations, such feature may be combined with one or other features of the other implementations as may be desired and advantageous for a given or particular application. Moreover, to the extent that the terms "includes," has, "" contains, "or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term" comprising.
The functional units in the embodiment of the invention can be integrated in one processing module, or each unit can exist alone physically, or a plurality of or more than one unit can be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. The above-mentioned devices or systems may perform the storage methods in the corresponding method embodiments.
In summary, the foregoing embodiment is an implementation of the present invention, but the implementation of the present invention is not limited to the embodiment, and any other changes, modifications, substitutions, combinations, and simplifications made by the spirit and principles of the present invention should be equivalent to the substitution manner, and all the changes, modifications, substitutions, combinations, and simplifications are included in the protection scope of the present invention.
Claims (8)
1. The average wave direction forecast deviation correcting method based on the space-time convolution LSTM is characterized by comprising the following steps of:
S1: selecting forecast data, and selecting hour-by-hour sea wave forecast data of the region to be corrected as a mode data sample;
S2: re-analyzing the lattice point data, taking the analysis data as a true value, and selecting the average wave direction per hour of the correction area to be detected;
S3: in order to match the forecast data with the analysis data, if the forecast data is irregular grid data, performing inverse distance weight interpolation on the forecast data so that the forecast data can be interpolated and matched to grid points of the analysis data, in addition, the forecast data is matched with the analysis data on a time scale, and finally, the two data are matched on a space and time level;
S4: constructing a deviation correction training set, solving the real angle difference of the average wave direction of the forecast data and the analysis data, taking the average wave direction before 144 hours of time continuous analysis data as the time sequence characteristic of the training set, and finally converting the data into data in the form of two-dimensional images in space so as to construct the deviation correction training set with matched space layers and continuous time layers, wherein the deviation correction training set comprises the average wave direction of the forecast data from hour to hour, the real angle difference of the forecast data and the analysis data from hour to hour and the average wave direction before 144 hours of the analysis data from hour to hour;
s5: a multi-layer network structure of a space-time convolution LSTM deviation correction model based on layer self-attention memory is built, and the multi-layer network structure comprises the following three parts:
a first layer: based on a space-time convolution LSTM layer of a layer self-attention mechanism, a 3-layer space-time convolution LSTM module (LSA-ST-LSTM) based on the self-attention mechanism is adopted, a space-time feature matrix of forecast and analysis data is selected as input in time sequence, and the process of introducing SAM self-attention memory structure in the LSA-ST-LSTM can be divided into three parts of feature aggregation, memory updating and output;
A second layer: the channel convolution fusion layer is used for carrying out feature selection on future time forecast data, splicing the forecast data after feature selection with the average wave direction of the analysis data before 144 hours and the real angle difference of the forecast and analysis data wave direction, carrying out channel combination with the output of the space-time convolution LSTM based on a layer self-attention mechanism, and carrying out 1X 1 channel convolution fusion on the fused data, wherein the output of the channel convolution is the forecast and the real angle difference of the analysis wave direction of the model forecast;
third layer: and the deviation correcting layer is used for adding the real angle difference of the wave direction predicted by the model and the average wave direction of the forecast data at the future moment to generate corrected average wave direction data.
2. The method for correcting average wave direction forecast deviation of space-time convolution LSTM according to claim 1, wherein a 3*3-sized convolution kernel is adopted in the space-time convolution LSTM to perform spatial feature extraction, the 3-layer space-time convolution LSTM hidden layers based on a layer self-attention mechanism are respectively 32, 32 and 32, and the hidden layer of the self-attention mechanism is 12.
3. The method for correcting average wave direction forecast deviation of space-time convolution LSTM according to claim 1, wherein the calculation formula of the true angle difference is:
θbias=θf-θr-360×((θf-θr)>180)+360×((θf-θr)<-180)
where θ f represents the forecast data average direction, and θ r represents the analyze data average direction.
4. The method of correcting average wave direction forecast bias of spatio-temporal convolution LSTM according to claim 1, characterized in that said step of feature aggregation comprises the following steps:
In the same time step, the aggregated characteristic Z is the fusion of Z h and Z m in the model layer-to-layer propagation process, and Z h and Z m respectively correspond to Is characterized by (2); for Z h,/>, last time stepOutput/by predRNN- Mapped into different feature spaces in the SAM module:
Where (W hq,Whk,Whv) is the set of weights for a1 x 1 convolution, And C is the number of channels, and N is the product of the length and the width of the feature map, and the similarity score between points is calculated by applying matrix products:
The similarity between the ith and jth points is expressed as Wherein/>And h t,j is a feature vector of dimension c×1, then normalizing the similarity score along the column:
z h is aggregated by weighting each position:
Z h is obtained by querying the bottom layer Mapping underlying memory 1×1 convolutions to keys by weights W mk and W mv And value/>Input/>, is then calculated by matrix multiplication between query Q h and key K m And memory/>Similarity score between:
all weights for the aggregate features are calculated by the following formula:
Then, the "pixel" for the i-th position in Z m is calculated by a weighted sum of the N positions in value V m:
Wherein, Is the j-th column of the memory; finally, Z is determined by W z[Zh;Zm.
5. The method for correcting average wave direction forecast deviation of space-time convolution LSTM according to claim 4, wherein the method is characterized in that the upper memory information is adaptively updated through a gating mechanism, so that SAM can capture space correlation and predRNN' font memory transfer structure on the basis of predRNN model, and thus the memory can grasp global space-time information; by aggregating features Z and inputsTo produce an input gate i 't' and an input fusion gate g 't', and further forgetting that the gate is replaced with 1-i 't' to reduce the parameters, the mathematical representation of the memory update procedure is as follows:
6. The method for correcting average wave direction forecast bias of space-time convolution LSTM as recited in claim 5, wherein said method is characterized by multiplying said output gate o 't' by the point Output from attention memory Module/>The formula is as follows:
7. The method for correcting average wave direction forecast deviation of space-time convolution LSTM according to claim 1, wherein in the time series model LSA-predRNN, forecast data F and the analysis data R at the same time before 6 days and the real wave direction angle difference between F and R are inputted as time series data; in addition, for future t-moment forecast data, characteristics are selected to screen characteristics, the screened forecast data F t and the real wave direction angle difference between the analysis data R t-144 and F t and R t-144 at the same moment before 6 days are spliced, channel convolution fusion is carried out on the real wave direction angle difference and the output of LSA-predRNN, and the information learned by the time sequence model and a plurality of characteristics of the future time forecast data and related analysis data are further subjected to characteristic learning so as to better learn the real angle deviation.
8. The method for correcting average wave direction forecast bias of space-time convolution LSTM according to claim 7, wherein said feature selection mode is a backward search algorithm without heuristic in a packing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210210019.3A CN114819053B (en) | 2022-03-04 | 2022-03-04 | Average wave direction forecast deviation correcting method based on space-time convolution LSTM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210210019.3A CN114819053B (en) | 2022-03-04 | 2022-03-04 | Average wave direction forecast deviation correcting method based on space-time convolution LSTM |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114819053A CN114819053A (en) | 2022-07-29 |
CN114819053B true CN114819053B (en) | 2024-05-03 |
Family
ID=82528774
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210210019.3A Active CN114819053B (en) | 2022-03-04 | 2022-03-04 | Average wave direction forecast deviation correcting method based on space-time convolution LSTM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114819053B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115049443B (en) * | 2022-08-15 | 2022-10-28 | 国能日新科技股份有限公司 | Multi-scale feature-based adaptive regression meteorological medium and long term optimization method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777949A (en) * | 2016-12-08 | 2017-05-31 | 河海大学 | A kind of long-term trend Forecasting Methodology of the wave wave direction based on analyze data again |
CN111738347A (en) * | 2020-06-28 | 2020-10-02 | 国家海洋环境预报中心 | Sea wave direction spectrum correction method and device, storage medium and electronic equipment |
WO2021068528A1 (en) * | 2019-10-11 | 2021-04-15 | 平安科技(深圳)有限公司 | Attention weight calculation method and apparatus based on convolutional neural network, and device |
CN113344301A (en) * | 2021-07-05 | 2021-09-03 | 江苏省气象台 | Rainfall forecast objective correction method based on competitive convolutional neural network |
KR20210150776A (en) * | 2020-06-04 | 2021-12-13 | 대우조선해양 주식회사 | System for predicting wave information through machine learning of sea level image |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11966670B2 (en) * | 2018-09-06 | 2024-04-23 | Terrafuse, Inc. | Method and system for predicting wildfire hazard and spread at multiple time scales |
-
2022
- 2022-03-04 CN CN202210210019.3A patent/CN114819053B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777949A (en) * | 2016-12-08 | 2017-05-31 | 河海大学 | A kind of long-term trend Forecasting Methodology of the wave wave direction based on analyze data again |
WO2021068528A1 (en) * | 2019-10-11 | 2021-04-15 | 平安科技(深圳)有限公司 | Attention weight calculation method and apparatus based on convolutional neural network, and device |
KR20210150776A (en) * | 2020-06-04 | 2021-12-13 | 대우조선해양 주식회사 | System for predicting wave information through machine learning of sea level image |
CN111738347A (en) * | 2020-06-28 | 2020-10-02 | 国家海洋环境预报中心 | Sea wave direction spectrum correction method and device, storage medium and electronic equipment |
CN113344301A (en) * | 2021-07-05 | 2021-09-03 | 江苏省气象台 | Rainfall forecast objective correction method based on competitive convolutional neural network |
Non-Patent Citations (1)
Title |
---|
珠江口近海海域海浪预报方法研究;王欣睿;《海洋通报》;20090630;第113-126页 * |
Also Published As
Publication number | Publication date |
---|---|
CN114819053A (en) | 2022-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106909924B (en) | Remote sensing image rapid retrieval method based on depth significance | |
Shabri et al. | Streamflow forecasting using least-squares support vector machines | |
Kavzoglu et al. | An assessment of the effectiveness of a rotation forest ensemble for land-use and land-cover mapping | |
CN113392961B (en) | Method for extracting mesoscale eddy track stable sequence and predicting cyclic neural network | |
CN111612066A (en) | Remote sensing image classification method based on depth fusion convolutional neural network | |
CN109001736B (en) | Radar echo extrapolation method based on deep space-time prediction neural network | |
CN107092859A (en) | A kind of depth characteristic extracting method of threedimensional model | |
Wang et al. | Distilling knowledge from an ensemble of convolutional neural networks for seismic fault detection | |
CN114724012B (en) | Tropical unstable wave early warning method and device based on space-time cross-scale attention fusion | |
Shafizadeh-Moghadam et al. | Performance analysis of radial basis function networks and multi-layer perceptron networks in modeling urban change: a case study | |
CN114780739B (en) | Time sequence knowledge graph completion method and system based on time graph convolution network | |
Kaloop et al. | Optimizing local geoid undulation model using GPS/levelling measurements and heuristic regression approaches | |
CN113255995A (en) | Air pollution prediction method | |
CN114819053B (en) | Average wave direction forecast deviation correcting method based on space-time convolution LSTM | |
Ganguli et al. | Predicting food security outcomes using convolutional neural networks (cnns) for satellite tasking | |
Hsieh | Evolution of machine learning in environmental science—A perspective | |
Abdalla et al. | Deep learning weather forecasting techniques: literature survey | |
CN111611960A (en) | Large-area ground surface coverage classification method based on multilayer perceptive neural network | |
Mojiri et al. | Comparison of predictions by kriging and spatial autoregressive models | |
Chen et al. | TemproNet: A transformer-based deep learning model for seawater temperature prediction | |
CN116912661A (en) | Target track prediction method and system with domain generalization capability | |
CN115953902A (en) | Traffic flow prediction method based on multi-view space-time diagram convolution network | |
CN116070763A (en) | New wind power plant wind power prediction method and system based on gradient evolution | |
CN115545159A (en) | Average sea surface temperature forecasting method of deep neural network | |
CN114821033A (en) | Three-dimensional information enhanced detection and identification method and device based on laser point cloud |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |