A weather radar echo extrapolation method based on time series prediction neural network

By embedding the ST-LSTM structure into the ST-SARNN model using adaptive normalization and self-attention mechanisms, the problems of difficulty in mining spatiotemporal dependencies and insufficient prediction accuracy in high-value regions during radar echo extrapolation are solved, achieving higher-precision radar echo prediction.

CN117011668BActive Publication Date: 2025-10-21NANJING UNIV OF INFORMATION SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310714414.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2025-10-21
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

Existing time series prediction models struggle to effectively uncover long-term spatial dependencies in radar echo extrapolation and lack the ability to capture features of high-value radar echo regions. In particular, when there is a large proportion of low-echo samples in the training samples, the prediction accuracy is not high.

Method used

An ST-LSTM structure is embedded using an adaptive normalization method and a self-attention mechanism to construct an ST-SARNN model. The complex dynamic spatiotemporal dependencies between radar echo images are extracted through a spatiotemporal self-attention module, thereby improving the prediction accuracy of strong echoes.

Benefits of technology

It improves the prediction accuracy of high-value areas of radar echoes, reduces the accumulation of prediction errors, and enhances the prediction accuracy of future frames.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011668B_ABST
    Figure CN117011668B_ABST
Patent Text Reader

Abstract

The application discloses a weather radar echo extrapolation method based on a time sequence prediction neural network, and comprises the following steps: S1, reading a weather radar echo data set of a continuous time sequence by using OpenCV; S2, pre-processing the weather radar echo data set by using an adaptive normalization method; S3, embedding a space-time self-attention module in an ST-LSTM unit to obtain a space-time sequence prediction model based on space-time self-attention and a time sequence prediction neural network; S4, using a training set in the pre-processed weather radar echo data set to train the model; S5, predicting a test set by using the trained model, verifying by using a verification set, and obtaining a radar echo extrapolation model after verification. The application can better capture the complex dynamic space-time dependence relationship between radar echo clouds, and improve the prediction accuracy of strong echoes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of weather radar echo extrapolation and short-term forecasting, and in particular to a weather radar echo extrapolation method based on a time series prediction neural network. Background Art

[0002] Radar echo extrapolation is an important method for nowcasting severe convective weather and can be used for short-term precipitation forecasts, among other applications. Radar echo extrapolation aims to predict the spatial distribution of echo clouds at several future moments based on radar echo images from several previous consecutive moments. This is a spatiotemporal series prediction problem. In time series prediction, data from adjacent moments are interdependent. As the prediction time step advances, the accumulation of prediction errors is inevitable. Large deviations between consecutive prediction frames can significantly mislead predictions of future frames. Therefore, effectively exploiting the long-term spatial dependencies between radar echo images remains a major challenge. Furthermore, many existing spatiotemporal series prediction models are insufficiently able to capture the features of high-value radar echo regions. In particular, when a large proportion of low-echo samples are present in the training samples, the accuracy of predicting the trends of high-value echo regions needs to be improved. Summary of the Invention

[0003] Purpose of the invention: In response to the problems existing in the prior art, the present invention provides a weather radar echo extrapolation method based on a time series prediction neural network. By inputting the radar echo image data of the previous hour, the radar echo extrapolation result of the next hour is obtained.

[0004] Technical solution: The weather radar echo extrapolation method of the present invention comprises the following steps:

[0005] S1, use OpenCV to read the continuous time series weather radar echo dataset, the dataset contains n weather radar echo samples; among them, n weather radar echo samples include training set, validation set, and test set; each weather radar echo sample consists of 20 frames of time-continuous weather radar echo images, among which the first 10 frames of weather radar echo images are recorded as x, which serve as the input of the model; the last 10 frames of weather radar echo images are recorded as y, and each frame is stored in grayscale PNG format;

[0006] S2, uses an adaptive normalization method to preprocess the weather radar echo dataset;

[0007] S3, embedding the spatiotemporal self-attention module in the ST-LSTM unit to obtain a spatiotemporal sequence prediction model based on spatiotemporal self-attention and time series prediction neural network;

[0008] S4, using the training set in the preprocessed weather radar echo dataset to train the model;

[0009] S5, the trained model is used to predict the test set and verified using the validation set. After verification, the radar echo extrapolation model is obtained.

[0010] Furthermore, in step S2, the specific implementation process of preprocessing the weather radar echo dataset is as follows:

[0011] S21, obtaining the maximum radar reflectivity value of x in the weather radar echo sample X;

[0012] S22, normalizes according to the maximum reflectivity value. The specific formula is as follows:

[0013]

[0014] Where ProNormalization(X) represents the normalization operation on the weather radar echo sample X, max(x) represents the maximum value of x, and gain represents the gain.

[0015] Furthermore, in step S3, the specific implementation process of constructing the spatiotemporal sequence prediction model is as follows:

[0016] S31, by combining two Self-Attention infrastructures, build a spatiotemporal self-attention module to extract the temporal feature information of the tth time step in the lth layer and the spatial feature information of the lth layer and the tth time step

[0017] S32, embed the spatiotemporal self-attention module ST-SAM into the time series prediction neural network unit ST-LSTM to obtain the ST-SARNN Block, and complete the internal calculation of the ST-SARNN Block;

[0018] S33, by stacking ST-SARNN Block, we get the “encoding-prediction” time series prediction model;

[0019] S34, uses the Encoding Network in the "encoding-forecasting" time series prediction model to perform multi-layer ST-SARNN Block calculations on x; and uses the Forecasting Network to predict y step by time.

[0020] Furthermore, the specific implementation process of step S31 is as follows:

[0021] S311, high-order feature information of the time step of the lth hidden layer of the spatiotemporal self-attention module ST-SAM Perform convolution calculation on the time feature part and get The hidden state weight matrix of the three time dimensions is as follows:

[0022]

[0023] Among them, convolution() represents convolution calculation; A "query" vector representing the time dimension, represents the “checked” vector in the time dimension, A "content" vector representing the time dimension;

[0024] S312, calculate the time feature information of the tth time step of the lth layer The specific formula is as follows:

[0025]

[0026]

[0027] Among them, softmax() represents the activation function; T represents the matrix transpose; z is the independent variable;

[0028] S313, calculate the spatial feature information of the lth layer at the tth time step The specific formula is as follows:

[0029]

[0030]

[0031] in, A “query” vector representing the spatial dimensions, represents the “checked” vector of spatial dimensions, A "content" vector representing the spatial dimension;

[0032] S314, will As the output of the time feature information flow of the t-th time step of the l-th layer, it is passed to the t+1-th time step of the l-th layer as input; As the output of the spatial feature information flow at the lth layer at the tth time step, it is passed as input to the l+1th layer at the tth time step.

[0033] Furthermore, the specific process of the internal calculation of the ST-SARNN Block in step S32 is as follows:

[0034] S321, preliminary extraction of time feature information Get the initial time feature memory hidden state matrix of the lth layer at the tth time step The specific calculation formula is as follows:

[0035]

[0036]

[0037]

[0038]

[0039] in, Represents the time feature information of the tth time step of the l-1 layer Perform convolution operation; σ() is the sigmoid function, which is the same as the tanh() function as the activation function; * indicates convolution operation; W xg 、W xf 、W xi Respectively represent the unit state update value, forget gate and input gate for the initial extraction of time features The convolution kernel parameters that can be trained when performing convolution calculations; Wh g Wh f Wh i Respectively represent the unit state update value, forget gate and input gate for the initial extraction of time features The convolution kernel parameters that can be trained when performing convolution calculations; b g 、b f 、b i They represent the unit state update value when initially extracting time features, the bias term during the convolution operation in the forget gate and the input gate respectively; g t Represents the unit state update value when the time feature is initially extracted; i t represents the input gate when initially extracting temporal features; f t Represents the forget gate when initially extracting temporal features; It is the time feature information of the t-1th time step of the lth layer; is the initial time feature memory hidden state matrix of the lth layer at the t-1th time step;

[0040] S322, preliminary extraction of spatial feature information Get the initial spatial feature memory hidden state matrix of the lth layer at the tth time step The specific calculation formula is as follows:

[0041]

[0042]

[0043]

[0044]

[0045] Among them, W' xg 、W' xf 、W'xi They represent the unit state update value, forget gate and input gate for the initial extraction of spatial features. The convolution kernel parameters that can be trained when performing convolution calculations; W mg 、W mf 、W mi They represent the unit state update value, forget gate and input gate for the initial extraction of spatial features. The convolution kernel parameters that can be trained when performing convolution calculations; b' g 、b' f 、b' i They represent the unit state update value when initially extracting spatial features, the bias terms during the convolution operation in the forget gate and the input gate respectively; is the spatial feature information of the l-1th layer at the tth time step; g' t Represents the unit state update value when initially extracting spatial features; i' t represents the input gate for initial extraction of spatial features; f t ' represents the forget gate when initially extracting spatial features; is the initial spatial feature memory hidden state matrix at the tth time step of the lth layer;

[0046] S323: Further extract temporal feature information and spatial feature information. The specific formula is as follows:

[0047]

[0048]

[0049]

[0050] Among them, W xo 、W ho 、W co and W mo Respectively indicate the and The parameters that can be trained inside the convolution kernel during convolution calculation; b o Indicates that the output gate o is obtained by performing convolution operation t The bias term when ; Indicates that and Splicing is performed in the channel dimension, and then a 1×1 convolution is performed, W 1×1 is the training parameter within the 1×1 convolution kernel; represents the calculated preliminary fusion data of spatiotemporal information; ST-SAM() represents the spatiotemporal self-attention module; Represents the temporal feature information after further extraction at the t-th time step of the l-th layer; Represents the spatial feature information after further extraction at the lth layer and the tth time step.

[0051] Furthermore, the specific implementation process of step S4 is as follows:

[0052] S41, input each sample x in the training set into the ST-SARNN model to obtain the predicted radar echo image y i ';

[0053] S42, calculate the loss function loss, the formula is as follows:

[0054]

[0055]

[0056]

[0057] Where m is the number of samples in the same training batch, y i is the true value of the i-th radar echo.

[0058] Compared with the prior art, the present invention has the following significant effects:

[0059] The present invention proposes a radar echo extrapolation algorithm based on self-attention and gated recurrent neural networks. To address the problem that recurrent neural networks have insufficient ability to predict strong echoes, the self-attention mechanism is integrated into the spatiotemporal sequence prediction model of the ST-LSTM structure to form an ST-SARNN model. At the same time, to address the problem of imbalance between strong and weak echo samples in the training set, an adaptive normalization method is adopted to enable the ST-SARNN model to better capture the complex dynamic spatiotemporal dependencies between radar echo clouds, thereby improving the prediction accuracy of strong echoes. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 is a flow chart of the present invention;

[0061] Figure 2 Schematic diagram of the structure of the spatiotemporal self-attention module of the present invention;

[0062] Figure 3 This is a schematic diagram of the structure of the time series prediction unit after adding spatiotemporal self-attention in the present invention;

[0063] Figure 4 It is the overall structure of the spatiotemporal sequence prediction model of the present invention;

[0064] Figure 5 Schematic diagram of the sequence of radar echo extrapolation results used in the present invention. DETAILED DESCRIPTION

[0065] The present invention will be described in further detail below with reference to the accompanying drawings and specific implementations.

[0066] like Figure 1 As shown, the implementation steps of the weather radar echo extrapolation method of the present invention are as follows:

[0067] S1. Obtain a weather radar echo dataset: Use OpenCV to read a continuous time series weather radar echo dataset. This dataset contains 130,000 weather radar echo samples, of which 100,000 are used as a training set, 20,000 as a validation set, and 10,000 as a test set. Each weather radar echo sample consists of 20 frames of continuous weather radar echo images (with a 6-minute interval between each frame). The first 10 frames of weather radar echo images are denoted as x and serve as the input of the model (i.e., the spatiotemporal distribution of weather radar echoes in the previous hour); the last 10 frames of weather radar echo images are denoted as y and serve as the output of the model (i.e., the spatiotemporal prediction of weather radar echoes in the next hour). Each weather radar echo image frame has a horizontal resolution of 0.01 degrees, approximately 1 km. Each frame has a 501×501 grid. The pixel value within each grid represents the radar echo reflectivity factor for that grid area, ranging from 0 to 80 dBZ. A higher radar echo reflectivity factor value indicates a stronger radar echo. Each image frame is stored in grayscale PNG format and is read as a matrix of [1, 501, 501] dimensions.

[0068] S2, preprocessing the weather radar echo dataset: using an adaptive normalization method to preprocess the weather radar echo image to increase the proportion of strong echo samples. The specific implementation process is as follows:

[0069] S21. Obtain the maximum radar echo reflectivity factor value of x in the weather radar echo sample: read x (dimension is [20, 1, 501, 501]) through OpenVC. The read x is in numpy format. Perform the np.max() operation on x to obtain the maximum radar echo reflectivity factor value (maximum pixel value) of x.

[0070] S22, determine whether the obtained maximum radar echo reflectivity factor value is greater than or equal to 60dBZ: If the obtained maximum radar echo reflectivity factor value is greater than or equal to 60dBZ, then the weather radar echo sample X is considered a strong echo sample, and the sample X (20 frames) is directly divided by 80dBZ for normalization; otherwise, the weather radar echo sample X is divided by the sum of the maximum value of the weather radar echo image x of the previous 10 frames and the gain as the normalization result. The specific formula is as follows:

[0071]

[0072] Where ProNormalization(X) represents a normalization operation on the weather radar echo sample X, max() represents taking the maximum value, and gain represents gain, where gain=20.

[0073] The purpose of the gain here is to provide a gain space for the possible growth of the radar echo reflectivity factor in the future. This value is adjusted according to the needs of the different training data sets. Since the difference between the maximum value of x and the maximum value of y in the samples of the data set selected by this invention is within 20dBZ, in order to ensure that the 20 frames of images are fully normalized, the gain is defined as a constant 20dBZ.

[0074] Normalization can maintain the stability of the gradient during the back propagation of deep learning errors. Since the dataset contains a large number of low-echo samples, the large number of low-echo samples will cause the model to be biased towards predicting low-echo samples and have poor prediction ability for strong-echo samples. If the low-echo samples are directly divided by 80dBZ, the strong-echo samples and low-echo samples will still be unbalanced. Therefore, formula (1) can change the data distribution of low-echo samples and increase the proportion of strong-echo samples.

[0075] S3, embed the spatiotemporal self-attention module (ST-SAM) in the time series prediction neural network unit (ST-LSTM) to obtain a spatiotemporal sequence prediction model based on spatiotemporal self-attention and time series prediction neural network. The specific implementation process is as follows:

[0076] S31, build a spatiotemporal self-attention module (ST-SAM): combine two Self-Attention infrastructures to extract high-order temporal and spatial feature information between radar echo sequences, forming a new spatiotemporal self-attention module to further extract the temporal feature information of the tth time step in the lth layer. and the spatial feature information of the lth layer and the tth time step Specific structure such as Figure 2 ,in, They refer to the trainable parameters in the convolution kernel when calculating the "query" vector, "queried" vector, and "content" vector in the time dimension through convolution; They refer to the trainable parameters within the convolution kernel when calculating the "query" vector, "queried" vector, and "content" vector of the spatial dimension through convolution; Refers to the parameters that can be trained in the convolution kernel during the last convolution calculation in the process of temporal feature extraction; Refers to the parameters that can be trained within the convolution kernel during the last convolution calculation in the spatial feature extraction process. The specific operation process is as follows:

[0077] S311, Figure 2Taking the lth hidden layer as an example, the high-order feature information of this time step Perform convolution calculation on the time feature part and obtain Hidden state weight matrix of three time dimensions and The calculation is shown in formula (2):

[0078]

[0079] Among them, convolution() represents convolution calculation; A "query" vector representing the time dimension, represents the “checked” vector in the time dimension, A "content" vector representing the time dimension.

[0080] S312, calculate the time feature information of the tth time step of the lth layer The specific formula is as follows:

[0081]

[0082]

[0083] Among them, softmax() represents the activation function; T represents matrix transposition; convolution() represents convolution calculation; The transpose and The similarity is obtained by point multiplication, and then the proportion of similarity values ​​is calculated by softmax (z is the independent variable in formula (3)), and then compared with Perform similarity weighted calculation (point multiplication) to obtain the time feature information of the tth time step of the lth layer

[0084] S313, calculating spatial feature information The specific formula is as follows:

[0085]

[0086]

[0087] Among them, convolution() represents convolution calculation; T represents matrix transpose; A “query” vector representing the spatial dimensions, represents the “checked” vector of spatial dimensions, Represents the "content" vector of spatial dimensions; softmax() represents the activation function.

[0088] As shown in formula (5), As the input of the spatial feature part, Further convolution calculation is performed to obtain The hidden state weight matrix of the three spatial dimensions ( and In formula (6), The transpose and The similarity is obtained by point multiplication, and the proportion of similarity values ​​is obtained by softmax calculation, and then compared with Perform similarity weighted calculation (point multiplication) to obtain spatial feature information

[0089] S314, will As the output of the time feature information flow of the t-th time step of the l-th layer, it is passed to the t+1-th time step of the l-th layer as input and participates in the calculation of the time feature information of the t+1-th time step; The output of the spatial feature information flow at time step t of layer l is passed as input to time step t of layer l+1, participating in the spatial feature information calculation of layer l+1. The input hidden dimension of the convolution calculation is 64, the output hidden dimension is 64×3, the convolution kernel size is 5×5, the stride is 1, and the padding is 2.

[0090] S32, the spatiotemporal self-attention module (ST-SAM) is embedded in the time series prediction neural network unit (ST-LSTM) to obtain the ST-SARNN Block, which is used to enhance the extraction of spatiotemporal information flow in the internal memory unit. Figure 3 . Figure 3 In the figure, the dotted box 1 is the spatiotemporal self-attention structure (ST-SAM), and the dotted box 2 is the time series prediction neural network unit (ST-LSTM) in the PredRNN model proposed by previous researchers. The specific calculation process inside the ST-SARNN Block is as follows:

[0091] S321, preliminary extraction of time feature information Get the initial time feature memory hidden state matrix of the lth layer at the tth time step The specific calculation process is shown in formulas (7)-(10):

[0092]

[0093]

[0094]

[0095]

[0096] The calculation of formulas (7)-(10) is similar to the gate structure operation of LSTM, which can give greater weight to useful information and filter out useless information during the learning process of the neural network. Represents the time feature information of the tth time step of the l-1 layer Perform convolution operation; W xg is the training parameter in the convolution kernel, b g is the bias; σ is the sigmoid function, which is the same as the tanh function as the activation function; * represents the convolution operation; W xg 、W xf 、W xi Respectively represent the unit state update value, forget gate and input gate for the initial extraction of time features The convolution kernel parameters that can be trained when performing convolution calculations; Wh g Wh f Wh i Respectively represent the unit state update value, forget gate and input gate for the initial extraction of time features The convolution kernel parameters that can be trained when performing convolution calculations; b g 、b f 、b i They represent the unit state update value when initially extracting time features, the bias terms during the convolution operation in the forget gate and the input gate respectively; is the temporal feature information of the t-1th time step of the lth layer; g t Represents the unit state update value when the time feature is initially extracted; i t represents the input gate when initially extracting temporal features; f t Represents the forget gate when initially extracting temporal features; is the initial time feature memory hidden state matrix of the lth layer at the t-1th time step. Transfer in the time dimension.

[0097] S322, preliminarily extracting the spatial feature information of the lth layer and the tth time step Get the initial spatial feature memory hidden state matrix of the lth layer at the tth time step The specific calculation process is similar to the calculation in the preliminary extraction of time feature information, such as formulas (11)-(14):

[0098]

[0099]

[0100]

[0101]

[0102] Among them, * represents the convolution operation; tanh() represents the activation function; σ represents the sigmoid function; W' xg 、W' xf 、W' xi They represent the unit state update value, forget gate and input gate for the initial extraction of spatial features. The convolution kernel parameters that can be trained when performing convolution calculations; W mg 、W mf 、W mi They represent the unit state update value, forget gate and input gate for the initial extraction of spatial features. The convolution kernel parameters that can be trained when performing convolution calculations; b' g 、b' f 、b' i They represent the unit state update value when initially extracting spatial features, the bias terms during the convolution operation in the forget gate and the input gate respectively; It is the spatial feature information of the l-1th layer at the tth time step; represents the time feature information of the tth time step of the l-1 layer; g' t Represents the unit state update value when initially extracting spatial features; i' t represents the input gate when initially extracting spatial features; f' t Represents the forget gate when initially extracting spatial features; is the initial spatial feature memory hidden state matrix at the lth layer and the tth time step.

[0103] S323, further extracting temporal feature information and spatial feature information. The calculation process is shown in formulas (15)-(17):

[0104]

[0105]

[0106]

[0107] Formula (15) represents the convolution and addition of all the data with spatiotemporal information in the ST-SARNN Block, and the output gate o obtained by sigmoid calculation t The value range is [0,1], and it has the weight information of spatiotemporal features; where σ represents the sigmoid function; * represents the convolution operation; W xo 、W ho 、W co and W mo Respectively indicate the and The parameters that can be trained inside the convolution kernel during convolution calculation; b oIndicates that the output gate o is obtained by performing convolution operation t The bias term when ; Represents the temporal feature information of the t-1th time step of the lth layer.

[0108] In formula (16) Indicates that and Splicing is performed in the channel dimension, and then a 1×1 convolution is performed, W 1×1 is the training parameter in the 1×1 convolution kernel; * represents the convolution operation; σ represents the sigmoid function; Represents the calculated preliminary fusion data of spatiotemporal information. and They are transmitted to the time and space dimensions respectively, and have the characteristic attributes of time and space. Therefore, splicing can fuse the time and space information, and then perform 1×1 convolution to compress the time and space information to and Same dimensions.

[0109] Formula (17) As the input of the spatiotemporal self-attention module (ST-SAM), it further mines spatiotemporal feature information; where ST-SAM() represents the spatiotemporal self-attention module; Represents the temporal feature information after further extraction at the t-th time step of the l-th layer; Represents the spatial feature information after further extraction at the tth time step of the lth layer. and It is the temporal and spatial feature information matrix after further extraction at the lth layer and the tth time step.

[0110] S33, by stacking ST-SARNN Block, we get the "encoding-forecasting" time series prediction model. The constructed "encoding-forecasting" time series prediction model includes two parts: Encoding Network and Forecasting Network. The specific structure is as follows: Figure 4 , where X t Represents a frame of weather radar echo image data at time t of a training sample. The encoding part inputs 1 frame per time step, and a total of 10 frames are input; M t-1 Represents the spatial feature information of the highest layer output at time t-1; H t+n It represents the temporal feature information of the highest layer output at time t+n, and is also the radar echo image frame predicted by the model at time t+n.

[0111] S34, use Encoding Network to perform multi-layer ST-SARNN Block calculation on x; use Forecasting Network to predict y step by time. Figure 4 The "encoding-prediction" time series prediction model is divided into four layers, each with n ST-SARNN blocks. The n ST-SARNN blocks in the same layer share internally trained parameters. The horizontal direction is for temporal feature extraction, and the vertical direction is for spatial feature extraction.

[0112] In the Encoding Network part, the input value of each layer at time step t is as follows:

[0113] The first layer of the t-th time step (l=1): The input of the ST-SARNN Block is a radar echo image X of the time step t (Since there is no data, so it is used as Figure 3 middle The value of ), the time feature information of the first layer output at time t-1 The initial time feature memory hidden state matrix of the first layer output at time t-1 and the spatial feature information M output by the highest layer at the previous moment t-1 (Right now Figure 3 in ).

[0114] The second layer of the tth time step (l=2): The input of the ST-SARNN Block is the temporal feature information output by the previous layer of the time step (Right now Figure 3 in ), the temporal feature information output by the same layer at the previous moment (Right now Figure 3 in ), the initial memory hidden state matrix of the same layer output at the previous moment (Right now Figure 3 in ) and the spatial feature information M output by the highest layer at the previous moment t-1 (Right now Figure 3 in ).

[0115] The third and fourth layers of the tth time step are the same as the second layer. When t = 1, since it is the first moment, there is no spatiotemporal information data of the previous time step, so the M t-1 、 Initialize the matrix with 0 values.

[0116] In the Forecasting Network (forecasting) part, the input values ​​of each layer at time step t are as follows:

[0117] The first layer of the t-th time step (l=1): The input of the ST-SARNN Block is the temporal feature information H output by the highest layer at the previous moment t-1 (Since the prediction layer does not have the real radar echo image at that moment as input, it is used as Figure 3 middle The value of the first layer before the time characteristic information The initial memory hidden state matrix of the first layer output at the previous moment and the spatial feature information M output by the highest layer at the previous moment t-1 (Right now Figure 3 in ).

[0118] The second, third, and fourth layers of the tth time step are consistent with the second, third, and fourth layers of the encoding part. The highest layer H at each moment in the prediction part t+n After another 1×1 convolution, it has the same dimensions as the radar echo image and is used as the prediction for that moment. The prediction part has 10 time steps, so the radar echo images for the next 10 frames can be predicted.

[0119] S4, use the training set in the preprocessed weather radar echo dataset to train the model. The specific steps are as follows:

[0120] S41, input the i-th weather radar echo sample x (i.e., the first 10 frames) in the training set into the ST-SARNN model to obtain the predicted radar echo image y (i.e., the last 10 frames) i ';

[0121] S42, calculate the loss function loss: The loss function loss is the root mean square error function (MSE) plus the mean absolute error function (MAE), and the formula is as follows:

[0122]

[0123]

[0124]

[0125] Among them, m is the number of samples in the same batch of training, y i is the true value of the i-th radar echo. The loss is trained using the back-propagation algorithm with an initial learning rate of 0.0001, a decay coefficient of 0.6, and a batch size of 12. Training stops when the conditions are met.

[0126] S5, use the trained model to predict the test set and verify it using the validation set. After verification, the radar echo extrapolation model is finally obtained.

[0127] We select a representative case as a demonstration and compare the model with ConvLSTM, PredRNN and MIM. The results are as follows: Figure 5 The first row represents the radar echo data for the previous hour (input date), the second row represents the true value of the weather radar at the future moment, rows 3-5 represent the prediction results of the ConvLSTM, PredRNN, and MIM models respectively, and row 6 represents the prediction results of the ST-SARNN model proposed in this invention, which has a certain improvement in its ability to capture high-echo areas. For example, a high-echo area appears in the radar echo cloud in the lower left position. As the prediction progresses, the predictions of ConvLSTM, PredRNN, and MIM for this area have almost deviated from the true value, while ST-SARNN still maintains the ability to capture high-value areas in a longer prediction step.

Claims

1. A weather radar echo extrapolation method based on a time series prediction neural network, characterized in that: The following steps are involved: S1, use OpenCV to read the continuous time series weather radar echo dataset, the dataset contains n weather radar echo samples; among them, n weather radar echo samples include training set, validation set, and test set; each weather radar echo sample consists of 20 frames of time-continuous weather radar echo images, among which the first 10 frames of weather radar echo images are recorded as x, which serve as the input of the model; the last 10 frames of weather radar echo images are recorded as y, and each frame is stored in grayscale PNG format; S2, uses an adaptive normalization method to preprocess the weather radar echo dataset; S3, embedding the spatiotemporal self-attention module in the ST-LSTM unit to obtain a spatiotemporal sequence prediction model based on spatiotemporal self-attention and time series prediction neural network; The specific implementation process of building a spatiotemporal series prediction model is as follows: S31, by combining two Self-Attention infrastructures, build a spatiotemporal self-attention module to extract the temporal feature information of the tth time step in the lth layer and the spatial feature information of the lth layer and the tth time step S32, embed the spatiotemporal self-attention module ST-SAM into the time series prediction neural network unit ST-LSTM to obtain ST-SARNNBlock, and complete the internal calculation of ST-SARNN Block; S33, by stacking ST-SARNN Block, we get the "encoding-prediction" time series prediction model; S34, using the Encoding Network in the "encoding-forecasting" time series prediction model to perform multi-layer ST-SARNN Block calculations on x; using the Forecasting Network to predict y step by time; The specific implementation process of step S31 is as follows: S311, high-order feature information of the time step of the lth hidden layer of the spatiotemporal self-attention module ST-SAM Perform convolution calculation on the time feature part and get The hidden state weight matrix of the three time dimensions is as follows: Among them, convolution() represents convolution calculation; A "query" vector representing the time dimension, represents the "checked" vector of the time dimension, The "content" vector representing the time dimension; S312, calculate the time feature information of the tth time step of the lth layer The specific formula is as follows: Among them, softmax() represents the activation function; T represents the matrix transpose; z is the independent variable; S313, calculate the spatial feature information of the lth layer at the tth time step The specific formula is as follows: in, A "query" vector representing the spatial dimensions, represents the "checked" vector of spatial dimensions, The "content" vector representing the spatial dimension; S314, will As the output of the time feature information flow of the l-th layer at the t-th time step, it is passed to the l-th layer at the t+1-th time step as input; As the output of the spatial feature information flow at the t-th time step of the l-th layer, it is passed as input to the t-th time step of the l+1-th layer; S4, using the training set in the preprocessed weather radar echo dataset to train the model; S5, the trained model is used to predict the test set and verified using the validation set. After verification, the radar echo extrapolation model is obtained.

2. The weather radar echo extrapolation method based on a time series prediction neural network according to claim 1 is characterized in that: In step S2, the specific implementation process of preprocessing the weather radar echo dataset is as follows: S21, obtaining the maximum radar reflectivity value of x in the weather radar echo sample X; S22, normalizes according to the maximum reflectivity value. The specific formula is as follows: Where ProNormalization(X) represents the normalization operation on the weather radar echo sample X, max(x) represents the maximum value of x, and gain represents the gain.

3. The weather radar echo extrapolation method based on time series prediction neural network according to claim 1 is characterized in that: The specific process of the internal calculation of the ST-SARNN Block in step S32 is as follows: S321, preliminary extraction of time feature information Get the initial time feature memory hidden state matrix of the lth layer at the tth time step The specific calculation formula is as follows: in, Represents the time feature information of the tth time step of the l-1 layer Perform convolution operation; σ() is the sigmoid function, which is the same as the tanh() function as the activation function; * indicates convolution operation; W xg 、W xf 、W xi Respectively represent the unit state update value, forget gate and input gate for the initial extraction of time features The convolution kernel parameters that can be trained when performing convolution calculations; W hg 、W hf 、W hi Respectively represent the unit state update value, forget gate and input gate for the initial extraction of time features The convolution kernel parameters that can be trained when performing convolution calculations; b g 、b f 、b i They represent the unit state update value when initially extracting time features, the bias term during the convolution operation in the forget gate and the input gate respectively; g t Represents the unit state update value when the time feature is initially extracted; i t represents the input gate when initially extracting temporal features; f t Represents the forget gate when initially extracting temporal features; It is the time feature information of the t-1th time step of the lth layer; is the initial time feature memory hidden state matrix of the lth layer at the t-1th time step; S322, preliminary extraction of spatial feature information Get the initial spatial feature memory hidden state matrix of the lth layer at the tth time step The specific calculation formula is as follows: Among them, W′ xg , W′ xf , W′ xi They represent the unit state update value, forget gate and input gate for the initial extraction of spatial features. The convolution kernel parameters that can be trained when performing convolution calculations; W mg 、W mf 、W mi They represent the unit state update value, forget gate and input gate for the initial extraction of spatial features. The convolution kernel parameters that can be trained when performing convolution calculations; b′ g , b′ f , b′ i They represent the unit state update value when initially extracting spatial features, the bias terms during the convolution operation in the forget gate and the input gate respectively; is the spatial feature information of the l-1th layer at the tth time step; g' t Indicates the updated value of the unit state when initially extracting spatial features; represents the input gate when initially extracting spatial features; f' t Represents the forget gate when initially extracting spatial features; is the initial spatial feature memory hidden state matrix at the tth time step of the lth layer; S323: Further extract temporal feature information and spatial feature information. The specific formula is as follows: Among them, W xo 、W ho 、W co and W mo Respectively indicate the and The parameters that can be trained inside the convolution kernel during convolution calculation; b o Indicates that the output gate o is obtained by performing convolution operation t The bias term when ; Indicates that and Splicing is performed in the channel dimension, and then a 1×1 convolution is performed, W 1×1 is the training parameter within the 1×1 convolution kernel; represents the calculated preliminary fusion data of spatiotemporal information; ST-SAM() represents the spatiotemporal self-attention module; Represents the temporal feature information after further extraction at the t-th time step of the l-th layer; Represents the spatial feature information after further extraction at the lth layer and the tth time step.

4. The weather radar echo extrapolation method based on time series prediction neural network according to claim 1 is characterized in that: The specific implementation process of step S4 is as follows: S41, input each sample x in the training set into the ST-SARNN model to obtain the predicted radar echo image y′ of y i ; S42, calculate the loss function loss, the formula is as follows: Among them, m is the number of samples in the same batch of training, y i is the true value of the i-th radar echo.

Citation Information

Patent Citations

  • Radar echo extrapolation method, device and system

    CN115113165A

  • Radar echo extrapolation near weather prediction method

    CN115933010A