Transformer-IRB-based short-term rainfall prediction method, device and storage medium
By using the Transformer-IRB model in the short-term rainfall forecast, the spatio-temporal characteristics of the radar echo map are extracted using multi-head attention layer and inverted residual blocks, the problem of insufficient prediction accuracy in the existing technology is solved and higher rainfall is achieved Prediction accuracy.
Patent Information
- Application Number
- CN202111374147.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-11-18
AI Technical Summary
The existing short-term rainfall forecasting method is difficult to make high-precision predictions when facing dynamic, nonlinear motion patterns and rapidly changing rainfall intensity scenarios. The model based on recurrent neural network has limitations in capturing space-time dependence, and the non-recurrent neural network model The lack of space-time feature extraction capability affects the accuracy of forecasting.
Using a short-term rainfall prediction method based on Transformer-IRB, the preprocessed radar echo image is input to the encoder with a multi-headed attention layer and an inverted residual block for feature extraction, and the prediction results are generated using the decoding module, combined with the Attention mechanisms and inverted residual network structure capture spatiotemporal features.
The accuracy of short-term rainfall prediction can be improved, and the long-range spatiotemporal evolution process in the radar echogram sequence can be better fitted, and the accuracy of prediction is improved.
Smart Images

Figure CN114137541B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of meteorological forecasting, and in particular to a Transformer-IRB-based short-term rainfall prediction method, device and storage medium. Background Art
[0002] Short-term rainfall forecast refers to the rainfall forecast for the next 0-6 hours. It is an important issue in the field of weather forecasting. It can provide weather guidance for the public's daily life and professional production activities, and play an important role in promoting economic development and protecting people's lives and property. There are two main types of existing short-term rainfall forecast methods: one is the radar echo map extrapolation method based on the optical flow method, and the other is the radar echo map extrapolation method based on machine learning.
[0003] The radar echo extrapolation method based on optical flow estimates the motion pattern of convective clouds from continuous radar echo patterns, and then uses a semi-Lagrangian advection model to predict future radar echo patterns, such as the ROVER (Real-time Optical flow by Variational methods for Echoes of Radar) method used by the Hong Kong Observatory, China.
[0004] Since the radar echo map extrapolation method based on the optical flow method is based on the assumptions of smooth motion and constant total rainfall intensity, it is difficult to make high-precision rainfall predictions when faced with dynamic, nonlinear motion patterns and rapidly changing rainfall intensity scenarios. To this end, machine learning methods that use deep neural network models with strong fitting nonlinear transformation capabilities and model the spatiotemporal processes of radar echo map sequences in a large amount of historical data-driven manner have received increasing attention. These works can be divided into two categories: those based on recurrent neural network architectures and those based on non-recurrent neural network architectures. In the research based on recurrent neural networks, representative works include the Convolutional LSTM (Long Short-Term Memory) model proposed by Shi et al. in 2015. This model uses a convolutional neural network to infer the hidden state corresponding to the radar echo map sequence based on LSTM. The convolutional neural network introduces the learning of local spatial correlations, and achieves higher prediction accuracy than models such as ROVER and FC-LSTM. However, conventional convolutional neural networks use fixed sampling templates to perform convolution operations on each point, which makes it difficult to capture the changing morphology of convective clouds. For this reason, Shi et al. proposed the TrajGRU (Trajectory Gated Recurrent Unit) model in 2017. This model uses a convolutional neural network to infer the sampling point position of each point for resampling, thereby obtaining non-fixed sampling points from global input information to capture the changing spatial morphological characteristics. In the work of non-recurrent neural network structures, representative work such as the CNN-based method proposed by Ayzel et al. in 2019 uses the U-Net architecture to build a prediction model. Generative adversarial network methods have also received attention, such as the artificial intelligence forecasting model based on the GAN method proposed by the Shenzhen Meteorological Bureau and Harbin Institute of Technology in 2019, and the short-term rainfall forecasting model based on the ConvGRU and GAN methods proposed by Tian et al. in 2019. In the above work, the model based on the recurrent neural network architecture has great limitations in capturing a larger range of spatiotemporal dependencies; the spatiotemporal feature extraction capability of the model based on the non-recurrent neural network architecture still needs to be improved, and lacks attention to the global spatiotemporal feature relationship, which restricts the accuracy of the short-term rainfall forecast model. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a Transformer-IRB-based short-term rainfall prediction method, device and storage medium in view of the above-mentioned defects of the prior art.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] On the one hand, a Transformer-IRB-based short-term rainfall prediction method is constructed, including:
[0008] Preprocessing the radar echo image;
[0009] The continuous M frames of radar echo images after preprocessing are sent to a pre-built and trained short-term rainfall prediction model based on Transformer-IRB to obtain N frames of radar echo images as short-term rainfall prediction results, wherein N is greater than M. The short-term rainfall prediction model includes a block embedding module, a feature extraction module, and a decoding module. The block embedding module extracts the embedded features of continuous multi-frame radar echo images and adds position encoding and then sends them to the feature extraction module. The feature extraction module uses a number of Transformer-inverted residual block modules with multi-head attention layers to form an encoder to extract the embedded features of the input and then send them to the decoding module. The decoding module decodes the input to obtain continuous multi-frame radar echo images as prediction results.
[0010] Preferably, the preprocessing of the radar echo image comprises: mapping the pixel values of the radar echo image to a range of [0, 255];
[0011] The method further comprises: obtaining a denoising mask in advance according to historical data of the radar echo image, and performing a dot multiplication of the radar echo image output by the short-term rainfall prediction model and the denoising mask to obtain a denoised radar echo image.
[0012] Preferably, the obtaining of a denoising mask comprises:
[0013] Define a denoising mask with the same resolution as the radar echo image, and initialize the pixel values of all pixels of the denoising mask to 1;
[0014] Search all pixels of the radar echo map, and record the pixels whose Mahalanobis distance is greater than 3 times the standard deviation as noise points;
[0015] Mark the pixels in the radar echo map with pixel values greater than 0 and less than 70 as noise points;
[0016] The pixel value of the pixel at the same position as the noise point in the denoising mask is updated to 0.
[0017] Preferably, the block embedding module includes two layers of point-by-point convolutional layers and a graph-to-sequence layer. The output of the first convolutional layer is nonlinearly mapped using an activation function and then sent to the second convolutional layer. The output of the second convolutional layer is linearly mapped and then sent to the graph-to-sequence layer. The graph-to-sequence layer converts the feature map processed by the second convolutional layer into a feature sequence according to the spatial position.
[0018] Preferably, the Transformer-inverted residual block module includes a multi-head attention layer, two layer normalization layers, a sequence-to-layer layer, two point-by-point convolutional layers, a depth-wise separable convolutional layer, and a graph-to-sequence layer;
[0019] The Transformer-inverted residual block module receives the feature embedding output by the previous module and sends it to the first normalization layer. The output of the first normalization layer is processed by the multi-head attention layer, the second normalization layer, the sequence to layer layer, and the first point-by-point convolution layer in sequence and sent to the depthwise separable convolution layer. The output of the first point-by-point convolution layer and the output of the depthwise separable convolution layer are added and sent to the second point-by-point convolution layer. The output of the second point-by-point convolution layer is sent to the graph to sequence layer. The output of the graph to sequence layer is added to the input of the first normalization layer and sent to the next module.
[0020] Among them, the first point-by-point convolution layer and the depth-wise separable convolution layer use GeLU activation function for nonlinear mapping, the second point-by-point convolution layer performs linear mapping, and the sequence-to-layer converts the embedded feature sequence into a feature map according to the spatial position.
[0021] Preferably, the point-by-point convolution layer is a convolution layer or a deconvolution layer whose grouping number is 1; and the depth-wise separable convolution layer is a convolution layer or a deconvolution layer whose grouping number is the output dimension.
[0022] Preferably, the decoding module is composed of a sequence-to-layer and two-layer deconvolution neural network layers in sequence, and the feature embedding is mapped into a multi-frame radar echo map.
[0023] Preferably, the method further comprises:
[0024] Before the short-term rainfall prediction model is put into use, a continuous M+N frames of denoised radar echo images are randomly extracted from historical data to perform random training on the short-term rainfall prediction model;
[0025] After the short-term rainfall prediction model completes random training and is put into use, continuous M+N frames of radar echo images are slidingly extracted from the latest historical data with a window of M frame size for sequential training.
[0026] On the second aspect, a short-term rainfall prediction device based on Transformer-IRB is constructed, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method described in any of the preceding items are implemented.
[0027] In a third aspect, a storage medium is constructed, storing a computer program, and when the computer program is executed by a processor, the steps of the method described in any of the preceding items are implemented.
[0028] The Transformer-IRB-based short-term rainfall prediction method, device and storage medium of the present invention have the following beneficial effects: combining the self-attention mechanism and the inverted residual network structure to capture a larger range of spatiotemporal information, the present invention adopts an inverted residual network structure with strong feature learning ability to extract complex spatiotemporal features in the radar echo image sequence, and adopts a self-attention mechanism to capture long-range global spatiotemporal dependencies, so as to better fit the rainfall evolution process in the long-range spatiotemporal range in the radar echo image sequence, thereby improving the accuracy of short-term rainfall prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative work:
[0030] Figure 1 is a flowchart of a short-term rainfall prediction method based on Transformer-IRB according to an embodiment of the present invention;
[0031] Figure 2 It is a structural diagram of the short-term rainfall prediction model;
[0032] Figure 3 It is a schematic diagram of the structure of the block embedding module;
[0033] Figure 4 It is a structural diagram of the Transformer-inverted residual block module. DETAILED DESCRIPTION
[0034] In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0036] The general idea of the present invention is: preprocessing the radar echo image, sending the preprocessed continuous M frames of radar echo images into a pre-built and trained short-term rainfall prediction model based on Transformer-IRB to obtain N frames of radar echo images as a short-term rainfall prediction result; wherein the short-term rainfall prediction model includes a block embedding module, a feature extraction module, and a decoding module. The block embedding module extracts the embedded features of continuous multi-frame radar echo images and adds position coding and then sends them to the feature extraction module. The feature extraction module uses a plurality of Transformer-inverted residual block modules with multi-head attention layers to form an encoder to extract the embedded features of the input and then send them to the decoding module. The decoding module decodes the input to obtain continuous multi-frame radar echo images as a prediction result.
[0037] In order to better understand the above-mentioned technical scheme, the above-mentioned technical scheme will be described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical scheme of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0038] Embodiment 1
[0039] refer to Figure 1 The Transformer-IRB-based short-term rainfall prediction method of this embodiment includes:
[0040] S100: Build and train a short-term rainfall prediction model and obtain a denoising mask;
[0041] The input of the short-term rainfall prediction model is M frames of radar echo images, and the output is N frames of radar echo images, where M and N are both positive integers and N is greater than M. For details, refer to Figure 2 The short-term rainfall prediction model includes a patch embedding module, a feature extraction module, and a decoding module. The patch embedding module extracts the embedded features of the continuous multi-frame radar echo map and adds position coding to the feature extraction module. The feature extraction module uses several (such as Figure 2 The encoder extracts the embedded features of the input and sends them to the decoding module, which decodes the input to obtain continuous multi-frame radar echo images as the prediction result.
[0042] refer to Figure 3 , wherein the block embedding module includes two layers of point-wise convolution layers and an image to sequence layer. The output of the first convolution layer is nonlinearly mapped using an activation function (GeLU) and then sent to the second convolution layer. The output of the second convolution layer is linearly mapped and then sent to the image to sequence layer without nonlinear mapping to retain more information. The image to sequence layer converts the feature map processed by the second convolution layer into a feature sequence according to the spatial position (i.e. ). Among them, two layers of point-by-point convolution can reduce the resolution and increase the effective receptive field of the spatial convolution operation of the subsequent module. In the present invention, the character F is the feature map, C is the number of feature map channels, H is the width of the feature map, W is the height of the feature map, and L is the length of the sequence.
[0043] refer to Figure 4 Each of the Transformer-inverted residual block modules includes a multi-head attention layer, two layer normalization layers, a sequence to image layer, two point-wise convolution layers, a depth-wise separable convolution layer, and a sequence to image layer.
[0044] Among them, the embedded features of the output of the previous module received by the Transformer-inverted residual block module are sent to the first layer normalization layer for processing, and the output of the first layer normalization layer is sent to the depthwise separable convolution layer in sequence through the multi-head attention layer, the second layer normalization layer, the sequence to layer layer, and the first point-by-point convolution layer. The output of the first point-by-point convolution layer and the output of the depthwise separable convolution layer are added and sent to the second point-by-point convolution layer. The output of the second point-by-point convolution layer is sent to the graph to sequence layer, and the output of the graph to sequence layer is added to the input of the first layer normalization layer and sent to the next module as the final output of the Transformer-inverted residual block module.
[0045] Among them, the first point-by-point convolution layer and the depth-separable convolution layer use activation function (GeLU) for nonlinear mapping, and the second point-by-point convolution layer performs linear mapping without using activation function for nonlinear mapping to retain more information. The sequence-to-layer converts the sequence into a feature map (i.e.
[0046] Different from the standard inverted residual module, the Transformer-inverted residual block module of the present invention combines the Transformer module and the inverted residual block network structure. First, the input feature embedding is processed in sequence using a layer normalization layer, a multi-head attention layer, and a layer normalization layer; in addition, a skip connection is added to the depthwise separable convolution layer, i.e.
[0047] The decoding module is composed of a sequence-to-layer and two-layer deconvolution neural network layers in sequence, and the feature embedding is mapped into a multi-frame radar echo map.
[0048] In the above model design, the design parameters of the convolution layer (or deconvolution layer) of the model are shown in Table 1. The point-by-point convolution layer is a convolution layer (or deconvolution layer) with a group number of 1, and the depth-wise separable convolution layer is a convolution layer (or deconvolution layer) with a group number of output dimensions.
[0049] Table 1 Model convolution layer (or deconvolution layer) design parameters
[0050]
[0051]
[0052] The multi-head attention layer includes two fully connected network layers and one Dropout layer. The fully connected network layer is calculated as shown in formula (1), d head For an attention head i The output feature dimension of the two fully connected layers is , and no activation function is used in the two fully connected layers. The output of the second fully connected layer is processed by the Dropout layer.
[0053] MultiHead(y)=Concat(head1,...,head h )W O (1);
[0054] In formula (1), is the embedding feature (embedding); Concat(·) means concatenating the outputs of h attention heads in the feature dimension; is the learnable parameter matrix;
[0055]
[0056] Among them, W i Q , W i K , is the learnable parameter matrix (1≤i≤h); d head =dmodel / h, h is the number of attention heads; Q i =yW i Q , K i =yW i K , V i =yW i V (1≤i≤ h); softmax(·) represents the activation function The softmax(·)j is calculated and then processed by the Dropout layer.
[0057] The training of the model is carried out in two stages: in the first stage, before the short-term rainfall prediction model is used for the first time, we randomly extract M+N frames of continuous radar echo images after denoising from historical data to train the short-term rainfall prediction model. In the second stage, after the model is put into use, the model can be trained online in real time using the latest historical data to ensure the accuracy of the model. Therefore, the method of this embodiment also includes: after the short-term rainfall prediction model is put into use, a window of M frame size is used to slide and extract M+N frames of continuous radar echo images from historical data for training.
[0058] The loss function of the model training is the sum of the balanced mean square error formula (2) and the balanced absolute error formula (3):
[0059]
[0060]
[0061] Where N is the number of radar echo sequence frames, H and W are the height and width of the radar echo respectively, and x n,i,j is the rainfall observation value of the pixel at position (i, j) of the radar echo map of the nth frame, The rainfall prediction value of the pixel whose radar echo position in the nth frame is (i, j), w n,i,j is the error weight of the pixel at position (i, j) of the radar echo image of the nth frame. The weight calculation corresponding to each frame of the radar echo image is shown in formula (4) (the weight of the noise point position is 0), where x is the rainfall intensity. Since the pixel value (pixel value) of the original radar echo image is the echo reflectivity value Z (dB), it needs to be converted into rainfall intensity R (mm / h). The relationship between ZR is described in formula (5), where a = 58.53 and b = 1.56:
[0062]
[0063] Z = 10 log a + 10 b log R (5);
[0064] Regarding the denoising mask, it is used to denoise the image output by the model. The acquisition of the denoising mask mainly includes:
[0065] 1) Obtain historical data of radar echo images, define a denoising mask with the same resolution as the radar echo image, and initialize the pixel values of all pixels of the denoising mask to 1;
[0066] 2) Search all pixels of the radar echo map, and record the pixels whose Mahalanobis distance is greater than 3 times the standard deviation as noise points. The relevant calculation formula is as follows:
[0067]
[0068]
[0069]
[0070]
[0071] Where N represents the number of pixels in the radar echo image, x i Represents the pixel value of a pixel in the radar echo image, D Mahalanobis (x) represents the Mahalanobis distance, represents the mean value of the pixel value of the radar echo image, σ represents the standard deviation, represents the covariance matrix.
[0072] 3) Mark the pixels in the radar echo map with pixel values greater than 0 and less than 70 as noise points;
[0073] 4) The pixel value of the pixel in the denoising mask having the same position as the noise point is updated to 0.
[0074] Similarly, the denoising mask is obtained based on the historical data of the radar echo image. After obtaining it, it can be saved. After the model is put into use, the image output by the model is denoised. Of course, considering that the historical data of the radar echo image will be gradually accumulated and updated, the denoising mask can be updated online using the latest historical data like the model. The updating process is to use the latest historical data to execute the above steps 1) to 4) again.
[0075] Step S100 is a preparatory work, the purpose of which is to obtain a model. Thereafter, the newly acquired radar echo image and the model obtained in step S100 can be used to execute the following steps S101-S104 to perform short-term rainfall prediction.
[0076] S101: preprocessing the radar echo image;
[0077] Before feeding the image into the model, we need to preprocess the image, including mapping the pixel values of the radar echo image to the range of [0, 255] based on equation (10), and then denoising the radar echo image:
[0078]
[0079] Among them, dBZ represents the pixel value of the original radar echo image, and pixel represents the pixel value of the radar echo image after preprocessing.
[0080] S102: sending the preprocessed continuous M frames of radar echo images to a pre-built and trained Transformer-IRB-based short-term rainfall prediction model to obtain N frames of radar echo images as short-term rainfall prediction results;
[0081] S103: performing a dot multiplication of the radar echo image output by the short-term rainfall prediction model and the denoising mask to obtain a denoised radar echo image.
[0082] Next, we conduct experiments by predicting 20 frames with 5 input frames. The comparison results are shown in Tables 2, 3, and 4. The model experiment of the present invention is compared with the Last Frame, ROVER, 2d CNN, and 3d CNN models.
[0083] Table 2 Comparison of CSI scores
[0084]
[0085] Table 3 Comparison of HSS scores
[0086]
[0087] Table 4 Comparison of B-MAE and B-MSE indicators
[0088]
[0089] Specifically, the prediction evaluation of the model uses common rainfall prediction evaluation indicators, namely: CSI (Critical Success Index) and HSS (Heidke Skill Score). In order to evaluate the skill score of the prediction performance greater than a specific rainfall intensity threshold (0.5, 2, 5, 10, 30), when the actual rainfall intensity (the actual radar echo reflection value Z is converted into the rainfall intensity value R according to the ZR relationship defined in formula (5)) or the model-predicted rainfall intensity is greater than a certain threshold, it is recorded as 1, otherwise it is recorded as 0. Thus, the TP (True Positive) number, FP (False Positive) number, TN (True Negative) number, and FN (False Negative) number of a specific rainfall intensity can be counted, and the model CSI index value (Formula 11) and HSS index value (Formula 12) can be further calculated.
[0090]
[0091]
[0092] From the results table, we can see that compared with the traditional radar echo extrapolation method (Last Frame, ROVER-Linear, ROVER-Nonlinear), the proposed model has achieved significant improvements in CSI and HSS scoring indicators. Compared with the non-recurrent neural network architecture model 2D CNN and 3D CNN, the proposed model also achieved better prediction performance.
[0093] Embodiment 2
[0094] This embodiment discloses a short-term rainfall prediction device based on Transformer-IRB, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method described in the first embodiment are implemented.
[0095] Embodiment 3
[0096] This embodiment discloses a storage medium, characterized in that a computer program is stored therein, and when the computer program is executed by a processor, the steps of the method described in the first embodiment are implemented.
[0097] In summary, the Transformer-IRB-based short-term rainfall prediction method, device and storage medium of the present invention have the following beneficial effects: combining the self-attention mechanism of Transformer and the inverted residual network structure to capture a larger range of spatiotemporal information, the present invention adopts an inverted residual network structure with strong feature learning ability to extract complex spatiotemporal features in the radar echo image sequence, and adopts a self-attention mechanism to capture long-range global spatiotemporal dependencies, so as to better fit the rainfall evolution process in the long-range spatiotemporal range in the radar echo image sequence, thereby improving the accuracy of short-term rainfall prediction.
[0098] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A Transformer-IRB-based short-term rainfall prediction method, characterized in that: The method comprises: Preprocessing the radar echo image; The continuous M frames of radar echo images after preprocessing are sent to a pre-built and trained Transformer-IRB-based short-term rainfall prediction model to obtain N frames of radar echo images as short-term rainfall prediction results, wherein N is greater than M. The short-term rainfall prediction model includes a block embedding module, a feature extraction module, and a decoding module. The block embedding module extracts the embedded features of the continuous multi-frame radar echo images and adds position encoding and then sends them to the feature extraction module. The feature extraction module uses a number of Transformer-inverted residual block modules with multi-head attention layers to form an encoder to extract the embedded features of the input and then send them to the decoding module. The decoding module decodes the input to obtain continuous multi-frame radar echo images as prediction results. The Transformer-inverted residual block module includes a multi-head attention layer, two layer normalization layers, a sequence to layer layer, two point-by-point convolutional layers, a depth-wise separable convolutional layer, and a graph to sequence layer; The Transformer-inverted residual block module receives the feature embedding output by the previous module and sends it to the first normalization layer. The output of the first normalization layer is processed by the multi-head attention layer, the second normalization layer, the sequence to layer layer, and the first point-by-point convolution layer in sequence and sent to the depthwise separable convolution layer. The output of the first point-by-point convolution layer and the output of the depthwise separable convolution layer are added and sent to the second point-by-point convolution layer. The output of the second point-by-point convolution layer is sent to the graph to sequence layer. The output of the graph to sequence layer is added to the input of the first normalization layer and sent to the next module. Among them, the first point-by-point convolution layer and the depth-wise separable convolution layer use GeLU activation function for nonlinear mapping, the second point-by-point convolution layer performs linear mapping, and the sequence-to-layer converts the embedded feature sequence into a feature map according to the spatial position.
2. The Transformer-IRB-based short-term rainfall prediction method according to claim 1, characterized in that: The preprocessing of the radar echo image includes: mapping the pixel values of the radar echo image to a range of [0, 255]; The method further comprises: obtaining a denoising mask in advance according to historical data of the radar echo image, and performing a dot multiplication of the radar echo image output by the short-term rainfall prediction model and the denoising mask to obtain a denoised radar echo image.
3. The Transformer-IRB-based short-term rainfall prediction method according to claim 2, characterized in that: The obtaining of the denoising mask comprises: Define a denoising mask with the same resolution as the radar echo image, and initialize the pixel values of all pixels of the denoising mask to 1; Search all pixels of the radar echo map, and record the pixels whose Mahalanobis distance is greater than 3 times the standard deviation as noise points; Mark the pixels in the radar echo map with pixel values greater than 0 and less than 70 as noise points; The pixel value of the pixel at the same position as the noise point in the denoising mask is updated to 0.
4. The Transformer-IRB-based short-term rainfall prediction method according to claim 1, characterized in that: The block embedding module includes two point-by-point convolutional layers and a graph-to-sequence layer. The output of the first convolutional layer is nonlinearly mapped using an activation function and then sent to the second convolutional layer. The output of the second convolutional layer is linearly mapped and then sent to the graph-to-sequence layer. The graph-to-sequence layer converts the feature map processed by the second convolutional layer into a feature sequence according to the spatial position.
5. The Transformer-IRB-based short-term rainfall prediction method according to claim 1 or 4, characterized in that: A point-by-point convolutional layer is a convolutional layer or deconvolutional layer whose grouping number is 1; a depth-wise separable convolutional layer is a convolutional layer or deconvolutional layer whose grouping number is the output dimension.
6. The Transformer-IRB-based short-term rainfall prediction method according to claim 1, characterized in that: The decoding module is composed of a sequence-to-layer and two-layer deconvolution neural network layers in sequence, and the feature embedding is mapped into a multi-frame radar echo map.
7. The Transformer-IRB-based short-term rainfall prediction method according to claim 1, characterized in that: The method further comprises: Before the short-term rainfall prediction model is put into use, a continuous M+N frames of denoised radar echo images are randomly extracted from historical data to perform random training on the short-term rainfall prediction model; After the short-term rainfall prediction model completes random training and is put into use, continuous M+N frames of radar echo images are slidingly extracted from the latest historical data with a window of M frame size for sequential training.
8. A short-term rainfall prediction device based on Transformer-IRB, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
