Precipitation forecasting method and device and storage medium

By improving the UNet model, adding a multi-scale adaptive attention module and a multi-branch feature extraction module, and using depth separable convolution, the problem of achieving high-precision precipitation forecast under limited computing costs is solved, and an efficient precipitation forecast model is realized.

CN120065379APending Publication Date: 2025-05-30NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510207898.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high-precision forecasting at limited computing costs, especially when processing large-scale data, the calculation overhead is high.

Method used

A lightweight precipitation forecast model is adopted that improves the UNet model, which adds a multi-scale adaptive attention module after the first double convolution and each encoder, a multi-branch feature extraction module after the upsampling module, and uses depth separable convolution instead of traditional convolution.

Benefits of technology

By introducing a multi-scale adaptive attention module and a multi-branch feature extraction module, features can be extracted from different scales, and details and global information in the precipitation process can be captured, which improves the accuracy and speed of precipitation forecasts, while reducing calculation overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120065379A_ABST
    Figure CN120065379A_ABST
Patent Text Reader

Abstract

The invention discloses a rainfall forecasting method and device and a storage medium, and belongs to the field of rainfall forecasting, and the method comprises the steps: obtaining a plurality of continuous rainfall data in a past set time period, and enabling the time difference between any two adjacent rainfall data to be equal; and inputting all the acquired rainfall data into the trained lightweight rainfall forecasting model to obtain a plurality of continuous rainfall data in a future preset time period. According to the invention, the multi-scale adaptive attention module is introduced, and multi-scale feature processing and an attention mechanism are combined, so that the change of a rainfall area can be accurately identified; through introduction of a channel and a space attention mechanism, the expression ability of rainfall related characteristics is improved; a multi-branch feature extraction module is introduced, so that the performance of the model is further improved; the use of depth separable convolution improves the precision and speed of rainfall forecast. By integrating the above points, the efficiency and precision of rainfall forecasting are improved, and high-performance rainfall forecasting is realized under the condition of limited calculation cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a precipitation forecasting method, device and storage medium, belonging to the field of precipitation forecasting. Background Art

[0002] Deep learning precipitation forecasting is a technology that uses neural network models to process meteorological data and analyze weather patterns to predict future precipitation. Traditional precipitation forecasting relies on numerical weather prediction (NWP) models to simulate the behavior of the atmosphere based on physical processes, while deep learning methods capture complex spatial and temporal features by learning patterns in the data.

[0003] In deep learning precipitation forecasting, commonly used models include convolutional neural networks (CNNs) and recurrent neural networks (RNNs), or spatio-temporal networks that combine the two, to handle the spatial structure and temporal dependence of weather data. For example, the ConvLSTM (Convolutional Long Short-Term Memory) model is a method that combines a convolutional neural network (CNN) with a long short-term memory network (LSTM) for nowcasting precipitation. In ConvLSTM, the traditional LSTM gate structure is improved to a convolutional operation, replacing the fully connected operation, which enables it to maintain the spatial structure between the input and hidden states. Therefore, the ConvLSTM network can effectively capture the spatial features of precipitation data and the evolution trend over time. The PredRNN++ model: enhances the PredRNN network (a recurrent neural network for spatio-temporal prediction tasks) by combining gradient highway units (GHUs) and causal LSTM units, and solves the problem of vanishing gradients. In recent years, the UNet (U-shaped Network) model has also been used for precipitation forecasting tasks. SmaAt-UNet (a deep learning-based rainfall nowcasting model from the paper with the same name published in Pattern Recognition Letters) first introduced the attention mechanism into UNet and achieved good forecasting performance with fewer training parameters by introducing depthwise separable convolutions.

[0004] However, for the above-mentioned ConvLSTM and PredRNN++ models, their network structures are relatively complex, and training them requires a large amount of computing resources, especially when dealing with large-scale data, the computational overhead is large. Although SmaAt-UNet has fewer training parameters and a more lightweight architecture, solving the problem of limited computing resources, its forecasting performance is slightly inferior to that of UNet. Summary of the Invention

[0005] The purpose of the present invention is to provide a precipitation forecasting method, device and storage medium, so as to solve the problem in the prior art that it is difficult to achieve high-precision precipitation forecasting with limited computing costs.

[0006] To achieve the above purpose, the present invention is implemented by adopting the following technical solutions: In the first aspect, the present invention provides a precipitation forecasting method, including: Obtain a plurality of consecutive precipitation data within a past set time period, and the time difference between any two adjacent precipitation data is equal; Input all the obtained precipitation data into a trained lightweight precipitation forecasting model to obtain a plurality of consecutive precipitation data within a future preset time period; The lightweight precipitation forecasting model is obtained by improving the UNet model. The improvements include: adding a multi-scale adaptive attention module after the first double convolution and each encoder of the UNet model, adding a multi-branch feature extraction module after each upsampling module in the encoder of the UNet model, and using depthwise separable convolution to replace the convolution in the UNet model.

[0007] Further, the operations performed by the multi-scale adaptive attention module on its own input include: Divide the input x of the multi-scale adaptive attention module into blocks, each block contains channels, C is the number of bands of the Doppler weather radar station that generates precipitation data, perform depth convolution on each block to obtain multi-scale features, connect all the multi-scale features and aggregate them through ordinary convolution to obtain a first feature, modulate the first feature through an activation function, and multiply it with the input x to obtain a second feature; Process the second feature through the CBAM module to obtain a third feature; Perform a residual connection between the third feature and the input x to obtain the output of the multi-scale adaptive attention module.

[0008] Further, the operation of connecting all the multi-scale features and aggregating them through ordinary convolution to obtain a first feature, modulating the first feature through an activation function, and multiplying it with the input x to obtain a second feature is performed through the following formula: ; where, x out is the second feature, is the multi-scale feature obtained by performing depth convolution on the i th block, i takes values from 1 to The integer, concat() represents the concatenation operation, Conv() represents the ordinary convolution, and GELU represents a GELU activation function based on the Gaussian error function.

[0009] Furthermore, the operations performed by the multi-branch feature extraction module on its input x1 include: The input x1 is respectively input into the parallel first branch, second branch, third branch, and fourth branch to extract features through different convolution operations, and then the outputs of the first branch, second branch, third branch, and fourth branch are concatenated to obtain the output of the multi-branch feature extraction module.

[0010] Furthermore, the expression of the first branch is: ; Where out 1 is the output of the first branch, LR represents the LeakyReLU activation function, DSC represents the depthwise separable convolution, and C out represents the number of channels of each branch; The expression of the second branch is: ; Where out 2 is the output of the second branch; The expression of the third branch is: ; ; ; Where out 3 3 is the final output after the third-level processing in the third branch, out 3 1 is the intermediate feature after the first-level processing in the third branch, out 3 2 is the intermediate feature after the second-level processing in the third branch. The first-level processing includes first performing a 1×1 depthwise separable convolution and then modulating through the LeakyReLU activation function. The second-level processing includes first performing a 3×3 depthwise separable convolution and then modulating through the LeakyReLU activation function. The third-level processing includes first performing a 3×3 depthwise separable convolution and then modulating through the LeakyReLU activation function; The expression of the fourth branch is: ; Where out 4 is the output of the fourth branch, and MP represents the max pooling operation.

[0011] Further, the depthwise separable convolution includes: depth convolution and pointwise convolution; The operations performed by the depth convolution on the input of the depthwise separable convolution include: performing convolution operations on each channel in the input of the depthwise separable convolution using a single convolution kernel separately, and then inputting it into the pointwise convolution; The operations performed by the pointwise convolution on its own input include: fusing the features of all channels through 1×1 convolution.

[0012] Further, the precipitation data is rainfall, and the rainfall at a certain moment is the cumulative rainfall from the previous moment to that moment.

[0013] In a second aspect, the present invention provides a precipitation forecasting device, including: A precipitation data acquisition module, configured to: acquire a plurality of consecutive precipitation data within a past set time period, and the time difference between any two adjacent precipitation data is equal; A precipitation forecasting module, configured to: input all the acquired precipitation data into a trained lightweight precipitation forecasting model to obtain a plurality of consecutive precipitation data within a future preset time period; In the precipitation forecasting module, the lightweight precipitation forecasting model is obtained by improving the UNet model. The improvements include: adding a multi-scale adaptive attention module after the first double convolution and each encoder of the UNet model, adding a multi-branch feature extraction module after each upsampling module in the encoder of the UNet model, and using depthwise separable convolution to replace the convolution in the UNet model.

[0014] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program / instructions are stored. When the computer program / instructions are executed by a processor, the steps of the precipitation forecasting method described in any item of the first aspect are implemented.

[0015] Compared with the prior art, the beneficial effects achieved by the present invention are: A precipitation forecasting method, device, and storage medium provided by the present invention can extract features from different scales by introducing a multi-scale adaptive attention module, combining multi-scale feature processing and an attention mechanism, capture details and global information in the precipitation process, and ensure accurate identification of changes in precipitation areas. The introduction of channel and spatial attention mechanisms enables the network to automatically select important feature channels and regions, thereby enhancing the expression ability of precipitation-related features. The introduction of a multi-branch feature extraction module enables the network to extract features from multiple scales, further improving the performance of the model. The use of depthwise separable convolutions effectively reduces the computational overhead while maintaining good performance, enabling the model to efficiently capture the spatial distribution features of precipitation and improving the accuracy and speed of precipitation forecasting. Combining the above points improves the efficiency and accuracy of precipitation forecasting, achieving high-performance precipitation forecasting at a limited computational cost.

[0016] An efficient precipitation nowcasting model is constructed by using radar meteorological data and combining the nonlinear mapping ability of deep learning. Compared with the traditional UNet model, the number of model parameters is significantly reduced to about one-fifth of the original UNet, and the performance is better. This method significantly reduces the computational complexity while ensuring the accuracy of precipitation forecasting, thus achieving excellent precipitation forecasting results for the next half hour. In addition, residual connections are used to ensure the effective transmission of information in the network, avoiding problems such as information loss and gradient vanishing, and enhancing the training stability and robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a flowchart of a precipitation forecasting method corresponding to Embodiment 1 of the present invention; Figure 2 is a complete flowchart from model training to precipitation forecasting corresponding to Embodiment 2 of the present invention; Figure 3 is a schematic structural diagram of the multi-scale adaptive attention module provided by the embodiment of the present invention; Figure 4 is a schematic structural diagram of the multi-branch feature extraction module provided by the embodiment of the present invention; Figure 5 is a schematic structural diagram of the lightweight precipitation forecasting module provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention.

[0019] Embodiment 1, as Figure 1 shown, the present invention provides a precipitation forecasting method, including: Obtain multiple consecutive precipitation data within a past set time period, where the time difference between any two adjacent precipitation data is equal; Input all the obtained precipitation data into the trained lightweight precipitation forecasting model to obtain multiple consecutive precipitation data within a future preset time period; The lightweight precipitation forecasting model is obtained by improving the UNet model. The improvements include: adding a multi-scale adaptive attention module after the first double convolution and each encoder of the UNet model, adding a multi-branch feature extraction module after each upsampling module in the encoder of the UNet model, and using depthwise separable convolutions to replace the convolutions in the UNet model.

[0020] By introducing a multi-scale adaptive attention module, combining multi-scale feature processing and attention mechanism, the present invention can extract features from different scales, capture details and global information in the precipitation process, and ensure accurate identification of changes in the precipitation area; the introduction of channel and spatial attention mechanisms enables the network to automatically select important feature channels and regions, thereby enhancing the expression ability of precipitation-related features; the introduction of a multi-branch feature extraction module enables the network to extract features from multiple scales, further improving the performance of the model; the use of depthwise separable convolutions effectively reduces the computational overhead while maintaining good performance, enabling the model to efficiently capture the spatial distribution characteristics of precipitation and improving the accuracy and speed of precipitation forecasting. Combining the above points improves the efficiency and accuracy of precipitation forecasting, and realizes high-performance precipitation forecasting with limited computational costs.

[0021] Embodiment 2. To solve the problem that it is difficult to achieve high-performance precipitation forecasting with limited computational costs in existing precipitation forecasting methods, the present invention provides a precipitation forecasting method. Specifically, a multi-scale adaptive attention module and a multi-branch feature extraction module are used to improve the Unet model to improve the accuracy of precipitation forecasting, and at the same time, depthwise separable convolutions are used to reduce training parameters and reduce the computational burden.

[0022] As Figure 2 shown, the overall process from model training to precipitation forecasting specifically includes the following steps 1 to 4.

[0023] Step 1: Collect 5-minute interval precipitation data provided by a C-band Doppler weather radar station, and construct a training dataset after data preprocessing.

[0024] Step 1 specifically includes: First, download the precipitation data at 5-minute intervals generated by two C-band Doppler weather radar stations. This data contains the rainfall at 5-minute intervals in the Netherlands and its neighboring countries from 2016 to 2019. The data is generated by two C-band Doppler weather radar stations located in the Netherlands at 52.10°N, 5.18°E, 44 m MSL, and 52.96°N, 4.79°E, 51 m MSL. The two radars perform four 360° azimuth scans around the vertical axis, with beam elevation angles of 0.3°, 1.1°, 2.0°, and 3.0° respectively.

[0025] Make the downloaded precipitation data into a dataset and divide it into a training set and a test set. In this embodiment, the dataset is divided into a training set (precipitation data from 2016 to 2018) and a test set (precipitation data in 2019). In addition, for each training iteration, a validation set is created by randomly selecting 10% of the training set.

[0026] Step 2: Incorporate the multi-scale adaptive attention module into the UNet model, and at the same time introduce the multi-branch feature extraction module and depthwise separable convolution to construct a lightweight precipitation forecasting model that can effectively perform nowcasting.

[0027] The UNet model has a symmetric "U" - shaped structure, including an encoder and a decoder. The encoder extracts high - level features through a series of convolutional and pooling operations, gradually reducing the spatial dimension. The decoder then performs upsampling through transposed convolution to gradually restore the spatial dimension, and fuses the features of the corresponding layer of the encoder through skip connections to retain detailed information to improve the accuracy.

[0028] As Figure 5 shown, the specific improvements of the lightweight precipitation forecasting model provided by the present invention compared with the UNet model are as follows: After the first double convolution and each encoder of the UNet model, a multi - scale adaptive attention module is added to perform multi - scale feature extraction on the input and automatically focus on important regions and channels; after each upsampling step of the decoder, a multi - branch feature extraction module is introduced to extract features from multiple scales to provide richer context information; depthwise separable convolution is used to replace all convolutions in the original UNet model to reduce the number of parameters and computational burden.

[0029] The input of each encoder in the lightweight precipitation forecasting model is the convolutional and downsampled image from the previous encoder, rather than the image with the attention mechanism applied. The original image features are retained until the last encoder; each layer of the decoder receives the features of the skip connection from the corresponding layer of the encoder. The multi-scale adaptive attention module further helps to selectively filter the skip connection features to retain only the relevant spatial and channel information; the input of each layer of the decoder includes not only the skip connection features from the encoder but also the upsampled features from the previous layer of the decoder; a multi-branch feature extraction module is introduced after the decoder upsampling to generate a more accurate high-resolution feature map in the upsampling stage; depthwise separable convolutions are used to replace all convolutions in the model. However, in the multi-scale adaptive attention module, conventional convolutions are still used.

[0030] As Figure 3 shown, the operations performed by the multi-scale adaptive attention module on its input specifically include: Divide the input x of the multi-scale adaptive attention module into blocks, each block containing channels. C is the number of bands of the Doppler weather radar station that generates precipitation data. Figure 3 In , x1, x2, x3, and x4 are the four blocks into which the input x is divided. In this embodiment, = 4. Perform depthwise convolution on each block (i.e., the operation performed by the multi-scale feature generation unit in the figure) to obtain multi-scale features. Connect all the multi-scale features and aggregate them through ordinary convolution to obtain the first feature. Modulate the first feature through an activation function and multiply it with the input x to obtain the second feature; Process the second feature through the CBAM module to obtain the third feature; Perform a residual connection between the third feature and the input x to obtain the output of the multi-scale adaptive attention module.

[0031] Among them, connecting all the multi-scale features and aggregating them through ordinary convolution to obtain the first feature, modulating the first feature through an activation function, and multiplying it with the input x to obtain the second feature is performed through the following formula: ; out where x is the second feature, is the multi-scale feature obtained by performing depthwise convolution on the i th block. The value of i ranges from 1 to as an integer. concat() represents the connection operation, Conv() represents ordinary convolution, and GELU represents a GELU activation function based on the Gaussian error function.

[0032] Among them, the second feature is processed by the CBAM module to obtain the third feature, which is carried out through the following formula: ; Among them, x out1 is the third feature, CBAM represents CBAM module, CBAM The module is a module that weights and combines channel and spatial attention respectively, CBAM : Convolutional Block Attention Module, a channel-spatial attention mechanism module.

[0033] Among them, the third feature is connected with the input x by residual connection to obtain the output of the multi-scale adaptive attention module, which is carried out through the following formula: ; Among them, output is the output of the multi-scale adaptive attention module.

[0034] By combining multi-scale feature extraction and channel-spatial attention mechanism (CBAM module), the expression ability of the network for important features is enhanced, thereby improving the performance of the model. Through feature aggregation, attention weighting and residual connection, the model can better learn effective features and adapt to complex input data.

[0035] In the present invention, a multi-branch feature extraction module is introduced after the decoder upsampling. The ordinary convolution after the upsampling step of the original UNet model is replaced by multi-scale depthwise separable convolution to capture the multi-scale information of the input features to enhance the feature representation ability, while reducing the amount of calculation and improving the calculation efficiency. As Figure 4 shown, the multi-branch feature extraction module is composed of four parallel branches. Each branch extracts features through different convolution operations. Finally, the outputs of each branch are concatenated in the channel dimension, and two consecutive 3x3 convolutions are used to replace the 5x5 convolution to reduce the number of parameters and the amount of calculation.

[0036] The operations performed by the multi-branch feature extraction module on its input specifically include: The input x1 is respectively input into the parallel first branch, second branch, third branch and fourth branch to extract features through different convolution operations, and then the outputs of the first branch, second branch, third branch and fourth branch are concatenated to obtain the output of the multi-branch feature extraction module.

[0037] The expression of the first branch is: ; Among them,out 1 is the output of the first branch, LR represents the LeakyReLU activation function, and DSC represents depthwise separable convolution. C out represents the number of channels of each branch; The expression of the second branch is: ; where out 2 is the output of the second branch; The expression of the third branch is: ; ; ; where out 3 3 is the final output after the third-stage processing in the third branch, out 3 1 is the intermediate feature after the first-stage processing in the third branch, out 3 2 is the intermediate feature after the second-stage processing in the third branch. The first-stage processing includes first performing a 1×1 depthwise separable convolution and then modulating it through the LeakyReLU activation function. The second-stage processing includes first performing a 3×3 depthwise separable convolution and then modulating it through the LeakyReLU activation function. The third-stage processing includes first performing a 3×3 depthwise separable convolution and then modulating it through the LeakyReLU activation function; The expression of the fourth branch is: ; where out 4 is the output of the fourth branch, and MP represents the max pooling operation.

[0038] The number of channels of the output of the multi-branch feature extraction module is .

[0039] The depthwise separable convolution of the present invention is applied to all standard convolution operations except for the multi-scale adaptive attention module; the depthwise separable convolution decomposes the standard convolution into two independent steps: depthwise convolution and pointwise convolution; in the depthwise convolution, each input channel is operated on separately using a small convolution kernel, and information is not mixed between different channels; then in the pointwise convolution, the features of all channels are fused together through a 1x1 convolution; compared with the standard convolution, this method significantly reduces the amount of computation and the number of parameters, while maintaining good feature extraction capabilities.

[0040] For depth convolution, the output tensor for channel c is: ; where * represents the convolution operation, is the depth convolution kernel for channel c, is the output tensor for channel c, is the input for channel c.

[0041] In pointwise convolution, the output is: ; where is the output of the pointwise convolution, kernels_per_layer represents the number of convolution kernels used for each input channel, is the pointwise convolution kernel for channel c, c represents the specific channel index, represents the number of input channels (i.e., the number of input feature maps).

[0042] Step 3: Train and validate the dataset based on the lightweight precipitation forecasting model to obtain the trained lightweight precipitation forecasting model.

[0043] Train the lightweight precipitation forecasting model constructed in Step 2. Input 12 sets of precipitation data stacked along the channel dimension, corresponding to the precipitation data for the past hour (one set of precipitation data every 5 minutes, a total of 12 sets in one hour), and the output is the precipitation data 30 minutes later than the last set of precipitation data (precipitation data every 5 minutes within 30 minutes).

[0044] For each training iteration, a validation set is created by randomly selecting 10% of the training set; the epoch of model training (the process of passing a dataset through the model once and returning once is called an epoch) is set to 200, and an early stopping criterion is adopted. When the validation loss does not increase in the last 15 epochs, this criterion stops the training process; in addition, the present invention uses a learning rate scheduler that reduces the learning rate to one-tenth of the previous learning rate when the validation loss does not increase in four epochs. The initial learning rate is set to 0.001, and the present invention uses the Adam (Adaptive Moment Estimation) optimizer; the training is carried out on an NVidia 4090 graphics card with 24 Gb of video memory.

[0045] The loss function used in this embodiment is the mean squared error (MSE).

[0046] In this embodiment, the model with the best performance on the validation set is selected for testing. Three evaluation functions, CSI, FAR, and HSS, are used to evaluate the performance of the model. For the dataset, these scores are calculated for rainfall amounts greater than the threshold of 0.5 mm / h. To this end, the present invention uses this threshold (0.5 mm / h) to convert each pixel of the predicted output and the target image into a boolean mask; from this, true positives (TP) (prediction = 1, target = 1), false positives (FP) (prediction = 1, target = 0), true negatives (TN) (prediction = 0, target = 0), and false negatives (FN) (prediction = 0, target = 1) can be calculated.

[0047] CSI (Critical Success Index) represents the overall prediction ability of the model for precipitation events, taking into account the number of hits, misses, and false alarms. The closer the value is to 1, the stronger the comprehensive prediction ability of the model. The formula can be expressed as: ; FAR (False Alarm Rate, which is the proportion of the area where there is actually no precipitation in the forecast precipitation area in the total forecast precipitation area) is used to measure the degree of false alarms of the model, representing the proportion of precipitation predicted but not actually occurring. The lower the FAR, the better, indicating a lower false alarm rate of the model. If the FAR is very high, it means that the over-prediction problem of the model for precipitation events is serious. The formula can be expressed as: ; HSS (Heidke Skill Score, an index used to evaluate the forecast accuracy, measuring the performance of the forecast model compared to random forecasting) is used to evaluate the skill of the model prediction, measuring the improvement of the model prediction result compared to random prediction. The value range of HSS is [-1, 1]; HSS > 0: the model is better than random prediction; HSS = 0: the model has no difference from random prediction; HSS < 0: the model is worse than random prediction. The formula can be expressed as: ;

[0048] The optimal model is saved according to the evaluation results as the trained lightweight precipitation forecasting model.

[0049] Step Four: Input the precipitation data to be forecasted (multiple consecutive precipitation data within a past period of time, with an equal time difference between any two adjacent precipitation data) into the trained lightweight precipitation forecasting model to generate the precipitation forecast results for the next half hour, and visually plot and display the generated precipitation forecast results through the matplotlib tool.

[0050] Example 3. The present invention provides a precipitation forecasting device, including: A precipitation data acquisition module configured to: acquire a plurality of consecutive precipitation data within a past period of time, where the time difference between any two adjacent precipitation data is equal; A precipitation forecasting module configured to: input all the acquired precipitation data into a trained lightweight precipitation forecasting model to obtain a plurality of consecutive precipitation data within a preset future period; In the precipitation forecasting module, the lightweight precipitation forecasting model is obtained by improving the UNet model. The improvements include: adding a multi-scale adaptive attention module after the first double convolution and each encoder of the UNet model, adding a multi-branch feature extraction module after each upsampling module in the encoder of the UNet model, and using depthwise separable convolution to replace the convolution in the UNet model.

[0051] Example 4. The present invention provides a computer-readable storage medium, on which a computer program / instructions is stored. When the computer program / instructions is executed by a processor, the steps of the precipitation forecasting method provided in Example 1 are implemented: Acquire a plurality of consecutive precipitation data within a past period of time, where the time difference between any two adjacent precipitation data is equal; Input all the acquired precipitation data into a trained lightweight precipitation forecasting model to obtain a plurality of consecutive precipitation data within a preset future period; The lightweight precipitation forecasting model is obtained by improving the UNet model. The improvements include: adding a multi-scale adaptive attention module after the first double convolution and each encoder of the UNet model, adding a multi-branch feature extraction module after each upsampling module in the encoder of the UNet model, and using depthwise separable convolution to replace the convolution in the UNet model.

[0052] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0053] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate a means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0054] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means that implements the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0055] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0056] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A precipitation forecasting method, characterized in that: include: Get multiple continuous precipitation data within the past set time period, and the time difference between any two adjacent precipitation data is equal; Input all the acquired precipitation data into the trained lightweight precipitation forecast model to obtain multiple continuous precipitation data within a preset period in the future; The lightweight precipitation forecast model is an improvement of the UNet model, and the improvements include: adding a multi-scale adaptive attention module after the first double convolution and each encoder of the UNet model, adding a multi-branch feature extraction module after each upsampling module in the encoder of the UNet model, and using deep separable convolution to replace the convolution in the UNet model.

2. The precipitation forecasting method according to claim 1, characterized in that: The operations performed by the multi-scale adaptive attention module on its own input include: The input x of the multi-scale adaptive attention module is divided into blocks, each containing channels, C is the number of bands of the Doppler weather radar station that generates precipitation data, and each block is deep convolved to obtain Multi-scale features are connected and aggregated through ordinary convolution to obtain the first feature, the first feature is modulated by the activation function and multiplied with the input x to obtain the second feature; The second feature is processed by the CBAM module to obtain the third feature; The third feature is residually connected to the input x to obtain the output of the multi-scale adaptive attention module.

3. The precipitation forecasting method according to claim 2, characterized in that: After connecting all multi-scale features, they are aggregated through ordinary convolution to obtain the first feature, the first feature is modulated by the activation function, and multiplied with the input x to obtain the second feature, which is performed by the following formula: ; in, x out The second feature is It is for i The multi-scale features obtained by deep convolution of blocks, i The value range is 1 to integer, concat() Indicates a connection operation. Conv() represents ordinary convolution, GELU express GELU An activation function based on the Gaussian error function.

4. The precipitation forecasting method according to claim 1, characterized in that: The operations performed by the multi-branch feature extraction module on its own input x1 include: The input x1 is input into the parallel first branch, second branch, third branch and fourth branch respectively to extract features through different convolution operations, and then the outputs of the first branch, second branch, third branch and fourth branch are spliced ​​to obtain the output of the multi-branch feature extraction module.

5. The precipitation forecasting method according to claim 4, characterized in that: The expression of the first branch is: ; in, out 1 is the output of the first branch, LR represents the LeakyReLU activation function, DSC represents the depthwise separable convolution, C out Indicates the number of channels of each branch; The expression of the second branch is: ; in, out 2 is the output of the second branch; The expression of the third branch is: ; ; ; in, out 33 is the final output after the third level of processing in the third branch. out 31 is the intermediate feature after the first level of processing in the third branch. out 32 is an intermediate feature after the second-level processing in the third branch, the first-level processing includes first performing a 1×1 depthwise separable convolution and then modulating it through a LeakyReLU activation function, the second-level processing includes first performing a 3×3 depthwise separable convolution and then modulating it through a LeakyReLU activation function, and the third-level processing includes first performing a 3×3 depthwise separable convolution and then modulating it through a LeakyReLU activation function; The expression of the fourth branch is: ; in, out 4 is the output of the fourth branch, and MP represents the maximum pooling operation.

6. The precipitation forecasting method according to claim 1, characterized in that: The depth-wise separable convolution includes: depth-wise convolution and point-wise convolution; The operation performed by the depth convolution on the input of the depth separable convolution includes: performing a convolution operation on each channel in the input of the depth separable convolution using a convolution kernel separately, and then inputting it into the point-by-point convolution; The operation performed by the point-by-point convolution on its own input includes fusing the features of all channels together through a 1×1 convolution.

7. The precipitation forecasting method according to claim 1, characterized in that: The precipitation data is rainfall, and the rainfall at a certain moment is the cumulative rainfall from the previous moment to this moment.

8. A precipitation forecasting device, characterized in that: include: The precipitation data acquisition module is configured to: acquire a plurality of continuous precipitation data within a set time period in the past, and the time difference between any two adjacent precipitation data is equal; The precipitation forecast module is configured to: input all the acquired precipitation data into the trained lightweight precipitation forecast model to obtain a plurality of continuous precipitation data within a preset period in the future; In the precipitation forecast module, the lightweight precipitation forecast model is an improvement on the UNet model, and the improvement includes: adding a multi-scale adaptive attention module after the first double convolution and each encoder of the UNet model, adding a multi-branch feature extraction module after each upsampling module in the encoder of the UNet model, and using deep separable convolution to replace the convolution in the UNet model.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the precipitation forecasting method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Lightweight short-time rainfall prediction method based on context attention fusion

    CN120871304A