Precipitation data downscaling method based on multi-scale attention residual block and sadeWOA algorithm
The precipitation data downscaling method using multi-scale attention residual blocks and the SadeWOA algorithm solves the problems of low computational efficiency and insufficient prediction performance of traditional meteorological downscaling methods, and achieves efficient and accurate precipitation data downscaling and extreme event prediction.
Patent Information
- Application Number
- CN202511277151.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-09-09
AI Technical Summary
Existing meteorological downscaling methods struggle to effectively capture the complex spatiotemporal relationships and nonlinear patterns in meteorological data, resulting in insufficient prediction performance, low computational efficiency, overly complex physical models, complex feature engineering, and poor performance of deep learning methods for precipitation data.
A precipitation data downscaling method using multi-scale attention residual blocks and the SadeWOA algorithm is employed. By constructing a TERAN model and combining it with a topographic data fusion layer, an adaptive optimization algorithm is used to optimize the model's hyperparameters, thereby enhancing its ability to capture local extreme precipitation events and improving the model's analytical accuracy for nonlinear meteorological processes.
It achieves efficient downscaling of precipitation data, avoids high computational costs, improves the ability to capture extreme precipitation events, enhances data quality and accuracy, and provides data support for extreme event prediction.
Smart Images

Figure CN120765467B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of meteorological data processing technology, and in particular to a method for downscaling precipitation data based on multi-scale attention residual blocks and the SadeWOA algorithm. Background Technology
[0002] Meteorological data downscaling aims to transform large-scale meteorological data into more refined-scale data, that is, to upgrade from low resolution to high resolution, thereby providing more detailed spatiotemporal distribution information. This allows for more accurate analysis and prediction of meteorological phenomena, serving a variety of application needs, enhancing the accuracy of forecasts and simulations, and adapting to meteorological and climate analysis at different scales.
[0003] Traditional meteorological downscaling methods mainly include three types: dynamic downscaling, statistical downscaling, and a combination of dynamic and statistical downscaling methods. Dynamic downscaling is based on the atmospheric thermodynamic equations of the system. Using initial and lateral boundary conditions provided by global climate models, it derives higher-resolution climate change scenarios through the relationships between dynamic equations. Statistical downscaling methods establish statistical models between grid output variables from historical climate models and station or regional observation variables, applying these statistical relationships to future climate simulation outputs to obtain a series of future climate elements at the station or regional scale. These methods primarily include transformation function methods, weather typology methods, and weather generator methods. The combination of dynamic and statistical downscaling methods first generates lateral boundary conditions based on global climate models, then generates regional-scale climate variables through thermodynamic equations, and finally uses statistical downscaling techniques to generate climate change scenarios for stations or regions. This approach combines the advantages of both dynamic and statistical downscaling to some extent, but it is essentially just a combination of the two methods and still has limitations in practical climate change assessment.
[0004] Therefore, traditional meteorological downscaling methods are unable to effectively capture the complex spatiotemporal relationships and nonlinear patterns contained in meteorological data, thus limiting their predictive performance. They also suffer from drawbacks such as low computational efficiency, over-reliance on physical models, limited generalization ability, and complex feature engineering.
[0005] More and more deep learning methods are being applied to downscaling meteorological data. However, due to the sparsity and high skewness of precipitation data, existing deep learning methods for spatiotemporal downscaling of precipitation data are relatively simple and have poor results in reconstructing precipitation data. The hyperparameters that need to be set based on experience often fail to achieve the best model performance. Summary of the Invention
[0006] To address the issues of existing deep learning methods being relatively simplistic and having poor performance in reconstructing precipitation data, this invention provides a precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm. This method can improve the ability to capture local extreme precipitation events (such as rainstorms and droughts) and enhance the model's analytical accuracy for nonlinear meteorological processes through deep learning and attention mechanisms.
[0007] This invention adopts the following technical solution: a precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm, comprising the following steps:
[0008] Step 1: Acquire meteorological and topographic data, extract precipitation information of the target area, obtain low-resolution data and high-resolution ground truth data, and preprocess the data to divide it into training set and test set.
[0009] Step 2: Construct a multi-scale attention residual block using CAB (Channel Attention Block), SAB (Spatial Attention Block), and skip connections. After feature extraction from the low-resolution data in the input data through convolutional layers, the data enters the multi-scale attention residual block. First, important channels are filtered through CAB, and then key spatial locations are located through SAB to obtain low-resolution feature maps.
[0010] Step 3: Construct an upsampling module. Input a low-resolution feature map and use sub-pixel convolution to convert the channel dimension of the input feature map into a spatial dimension to improve the resolution. Additionally, add convolutional layers to reduce block artifacts in the image.
[0011] Step 4: Construct a terrain data fusion layer, incorporating enhanced feature representations of terrain data;
[0012] Step 5: Based on the multi-scale attention residual block in Step 2, the upsampling module in Step 3, and the terrain data fusion layer in Step 4, construct the TERAN (Topography Enhanced Residual Attention Net) model to downscale the input original low-resolution data.
[0013] Step 6: Optimize the model hyperparameters using the training set and the sadeWOA (Self-Adaptive Differential Evolution WOA) algorithm, including: number of multi-scale residual block layers, learning rate, and skip connection switch. Train the model to find the best-performing group. Finally, the trained model can be used to process low-resolution data and generate high-resolution precipitation data.
[0014] Preferably, the meteorological data in step 1 includes:
[0015] Precipitation information of the target area is extracted from the ERA5 dataset and used as low-resolution data, which is then input into the multi-scale attention residual block.
[0016] Precipitation information for the target region was extracted from the CHIRPS dataset and used as high-resolution ground truth data.
[0017] The terrain data is obtained from SRTMDEMUTM elevation data, and the elevation information of the target area is extracted.
[0018] Preferably, step 1 involves preprocessing the data, including the following sub-steps:
[0019] Step 101: Crop and align the meteorological and topographic data of the target area to unify the latitude and longitude range and form an initial dataset;
[0020] Step 102: Based on the initial dataset, apply loglp transformation to normalize the precipitation data and topographic elevation data to reduce the impact of extreme values.
[0021] Preferably, in step 2, constructing the multi-scale attention residual block includes the following sub-steps:
[0022] Step 201: Generate feature maps by passing the original low-resolution data through a convolutional layer. The input channel attention block is used to generate a one-dimensional attention map through global max pooling, global average pooling, and MLP to focus on key features related to precipitation.
[0023] And so on, in the... Multi-scale residual attention blocks, input feature maps A one-dimensional attention map is obtained through channel attention blocks. ;in, These represent the width, height, and number of channels of the input feature map, respectively.
[0024] Step 202: In the i-th layer multi-scale residual attention block, ... The input spatial attention block is processed through a pair of channel max pooling and average pooling, combined with a convolutional layer, to generate a two-dimensional attention map. To emphasize important spatial locations, and then A refined feature map is obtained.
[0025] Step 203: Input feature map By adding the refined feature map element-wise through skip connections, the output feature map of the i-th layer multi-scale attention residual block is obtained. Output feature map Obtained through two convolutional layers Enter the (i+1)th layer multi-scale attention residual block.
[0026] Preferably, step 3, constructing the upsampling module, includes the following sub-steps:
[0027] Step 301: Input the low-resolution feature map into a filter. A convolutional layer with a kernel size of 3×3, a stride of 1, and padding set to SAME is used to extract features from the input image through convolution operations, generating a feature-rich image. The low-resolution convolutional feature maps of each channel are resized as follows:
[0028] ;
[0029] Where C is the number of channels, This is the magnification factor.
[0030] Step 302: The low-resolution convolutional feature map undergoes a periodic rearrangement operation through a sub-pixel convolutional layer, transforming each pixel in the low-resolution feature map into a pixel of size 1. The pixel blocks are rearranged into a single pixel in the high-resolution image to obtain the output of the subpixel convolutional layer. The transformation of the low-resolution convolutional feature map size is represented as:
[0031] .
[0032] Step 303: After the output of the sub-pixel convolutional layer, add a convolutional layer with a kernel size of 3×3, a filter count of 64, a stride of 1, and zero padding to reduce block artifacts in the output image and obtain the optimized convolutional feature map.
[0033] Preferably, step 4, constructing the terrain data fusion layer, includes the following sub-steps:
[0034] Step 401: Based on steps 1, 2, and 3, construct the main network feature map to obtain the shape of the optimized convolutional feature map and determine the batch size;
[0035] Step 402: Expand the preprocessed terrain data to the same batch size as the main network feature map;
[0036] Step 403: Incorporate terrain information as an additional channel into the feature map, and stitch the main network feature map and terrain data along the channel dimension to obtain a new feature map after stitching. The number of channels in the new feature map increases by 1 compared to the main network feature map.
[0037] Preferably, step 5, constructing the TERAN model, includes the following sub-steps:
[0038] Step 501, Input Layer: Input raw low-resolution data and terrain data ;
[0039] Step 502, Feature Processing Layer: First, pass through a convolutional layer with 64 kernels, a kernel size of 3×3, a stride of 1, zero padding, and the activation function of ReLU. Then, place multi-scale attention residual blocks, and place one multi-scale attention residual block every two convolutional layers. Continue this process, placing M layers of multi-scale attention residual blocks in a loop.
[0040] Step 503, Feature Fusion Layer: The feature maps extracted by the main network are... With the feature map of each multi-scale residual attention block, ...add along the channel dimension to obtain the feature map. ;
[0041] Step 504, Adjustment The number of channels, and Element-by-element addition is represented as: Then, the ReLU activation function is used to perform a non-linear transformation on the feature map;
[0042] Step 505, Upsampling Layer: Use a convolutional layer to upsample the input feature map. The number of channels was adjusted to , This is the amplification factor; and the number of channels is increased through a sub-pixel rearrangement method. Convert to spatial dimensions;
[0043] Step 506, Terrain Data Fusion Layer: Stitch together the main network feature map and terrain data along the channel dimension;
[0044] Step 507, Output Layer: Adjust the number of channels of the stitched feature map to 1 and output it.
[0045] Preferably, step 6 uses the training set and the SadeWOA algorithm to optimize the number of layers, skip connection switching coefficients, batch size, and learning rate of the multi-scale attention residual block in the TERAN model, including the following sub-steps:
[0046] Step 601, Initialize parameters: Set the maximum number of iterations. whale population size lower bound of search space and the Upper Realm The whale population is randomly initialized using random numbers uniformly distributed within the search space. Determine the initial position of each individual Set the mutation factor to decrease with iteration and the crossover probability to increase with iteration, and calculate the initial fitness.
[0047] Step 602, Surrounding the Prey Stage: Calculate the coefficient vector and Update whale location to get new location. ;
[0048] Step 603: Generate a random probability number p, perform contraction and enclosing when p < 0.5, and perform spiral update when p ≥ 0.5;
[0049] Step 604: Perform mutation and binomial crossover: Perform operations on each dimension, crossover the mutated individuals with the parent individuals, and select the better solution;
[0050] Step 605: Update boundary constraints to obtain... ,like or Then Set as boundary values, calculate the fitness of the new location, if If the fitness of an individual is less than that of the i-th individual, then update the individual's position:
[0051] Step 606: Return to step 602, repeat until the iteration count ends, and update the global optimal solution. ;
[0052] Step 607: Apply the obtained optimal hyperparameter combination to the TERAN model, input low-resolution precipitation data to obtain high-resolution precipitation data, and output the results.
[0053] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:
[0054] 1. The precipitation data downscaling method of this invention solves the problem of ultra-high computational cost caused by dynamic downscaling relying on high-resolution regional climate models such as RCM, and can avoid the limitation of refined meteorological analysis due to hardware resource constraints. At the same time, topographic data is added. For complex terrain such as mountainous areas, an elevation-precipitation coupling mechanism is established through a topographic data fusion layer, which solves the simulation distortion caused by traditional methods ignoring the physical relationship between topography and precipitation.
[0055] 2. Compared with traditional methods such as statistical / dynamic downscaling and CNN models, this invention enhances the model's analysis of nonlinear meteorological processes through deep learning and attention mechanisms, effectively improving data quality and accuracy, enhancing the ability to capture local extreme precipitation events (such as rainstorms and droughts), and providing data support for extreme event prediction. Attached Figure Description
[0056] Figure 1 This is a flowchart of the precipitation data downscaling method of the present invention;
[0057] Figure 2 This is a schematic diagram of the multi-scale attention residual block of the present invention;
[0058] Figure 3 This is a schematic diagram of the TERAN model architecture of the present invention;
[0059] Figure 4 This is a flowchart of the Sadewoa algorithm of the present invention. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the application will be further described in detail below with reference to the accompanying drawings. The described embodiments are only a part of the embodiments involved in this invention. All non-innovative embodiments based on these embodiments by other researchers in the art are within the protection scope of this invention. Furthermore, the step numbers in the embodiments of this invention are only set for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0061] In one embodiment of the present invention, a precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm is provided, such as... Figure 1 As shown, it includes the following steps:
[0062] Step 1: Acquire meteorological and topographic data, extract precipitation information of the target area, obtain low-resolution data and high-resolution ground truth data, and preprocess the data to divide it into training set and test set.
[0063] Step 2: Construct a multi-scale attention residual block using CAB, SAB and skip connections. After feature extraction of low-resolution data in the input data through convolutional layers, the data enters the multi-scale attention residual block. First, important channels are filtered through CAB, and then key spatial locations are located through SAB to obtain low-resolution feature maps.
[0064] Step 3: Construct an upsampling module. Input a low-resolution feature map, use subpixel convolution to convert the channel dimension of the input feature map into a spatial dimension to improve the resolution, and add additional convolutional layers to reduce block artifacts in the image.
[0065] Step 4: Construct a terrain data fusion layer, incorporating enhanced feature representations of terrain data;
[0066] Step 5: Based on the multi-scale attention residual block in Step 2, the upsampling module in Step 3, and the terrain data fusion layer in Step 4, construct the TERAN model to downscale the input original low-resolution data.
[0067] Step 6: Optimize the model hyperparameters using the training set and the SadeWOA algorithm, including: number of multi-scale residual block layers, learning rate, and skip connection switch. Train the model to find the best-performing set. Finally, the trained model can be used to process low-resolution data and generate high-resolution precipitation data.
[0068] Specifically, in step 1 of this embodiment, the meteorological data is obtained from the ERA5 dataset, and the precipitation information of the target area is extracted as low-resolution input data. It is also obtained from the CHIRPS dataset, and the precipitation information of the target area is extracted as high-resolution ground truth data for use as target values in model training. The terrain data is obtained from the SRTMDEMUTM elevation data, and the elevation information of the target area is extracted.
[0069] Further, the data is preprocessed, including the following sub-steps:
[0070] Step 101: Perform cropping based on a uniform latitude and longitude range, and align the dataset and terrain data of the target area.
[0071] Step 102: Based on the characteristics of the dataset, apply loglp transformation to normalize the precipitation data and topographic elevation data to reduce the impact of extreme values. The formula is as follows:
[0072] ;
[0073] in, , These represent the initial dataset data before and after normalization, respectively.
[0074] Specifically, in step 2 of this embodiment, a multi-scale attention residual block is constructed using CAB, SAB, and skip connections, such as... Figure 2 As shown, it includes the following sub-steps:
[0075] Step 201: The original low-resolution data is processed through a convolutional layer to generate feature maps. Then, CAB is used to generate a one-dimensional attention map through global max pooling, global average pooling and MLP to emphasize important channel features, so that the model can focus more on key precipitation-related features.
[0076] Similarly, in the i-th layer of the model, the feature map of the multi-scale residual attention block... A one-dimensional attention map is obtained through CAB. , Enter SAB;
[0077] in, These represent the width, height, and number of channels of the input feature map, respectively. This indicates element-wise multiplication.
[0078] Step 202: In the i-th layer of the model, in the multi-scale residual attention block, After entering SAB, a two-dimensional attention map is generated by combining a pair of channel max pooling and average pooling with a convolutional layer. To emphasize important spatial locations and suppress unimportant spatial locations, and then... A refined feature map is obtained.
[0079] Step 203: Input feature map By adding the refined feature map element-wise through skip connections, the output feature map of the i-th layer multi-scale attention residual block is obtained: , Obtained through two convolutional layers Enter the (i+1)th layer multi-scale attention residual block to form a complete multi-scale residual attention block.
[0080] Specifically, in step 3 of this embodiment, constructing the upsampling module includes the following sub-steps:
[0081] Step 301: Input a filter into the low-resolution feature map. A convolutional layer with a kernel size of 3×3, a stride of 1, and padding set to 'SAME' is used. This step extracts features from the input image through convolution operations and generates a convolutional layer with... The low-resolution convolutional feature map of each channel is transformed in size as follows:
[0082] ;
[0083] Where C is the number of channels, This is the magnification factor.
[0084] Step 302: The low-resolution convolutional feature map passes through a sub-pixel convolutional layer and undergoes a periodic shuffling operation (denoted as...). This rearranges each pixel block (of size r×r) in the low-resolution feature map into a single pixel in the high-resolution image.
[0085] Let the LR (low-resolution) feature map of the input sub-pixel convolutional layer be... The upsampling filter is The output of the sub-pixel convolutional layer can then be expressed as:
[0086] ;
[0087] in, The input sub-pixel convolutional layer contains low-resolution convolutional feature maps. , These represent the final function and the parent function, respectively. For upsampling filters, For bias, This is a subpixel rearrangement operation.
[0088] The scaling transformation of low-resolution convolutional feature maps is as follows:
[0089] .
[0090] As a preferred method, The specific steps are as follows:
[0091] ;
[0092] in, To output the position coordinates in the image, This refers to the channel index of the output image. Function representation Divide by The remainder, For input tensors.
[0093] Step 303: After that, add a convolutional layer with a kernel size of 3×3, a filter count of 64, a stride of 1, and zero padding to reduce block artifacts in the image and improve image quality, thus obtaining the optimized convolutional feature map.
[0094] Specifically, in step 4 of this embodiment, constructing the terrain data fusion layer includes the following sub-steps:
[0095] Step 401: Based on steps 1, 2, and 3, obtain the shape of the main network feature map, i.e., the optimized convolutional feature map, especially the batch size, to prepare for subsequent adjustments to the shape of the terrain data.
[0096] Step 402: Expand the terrain data to the same batch size as the main network feature map to ensure that the two can be stitched together.
[0097] Step 403: Incorporate terrain information as an additional channel into the feature map to help the model consider terrain factors when predicting precipitation distribution, thereby improving the model's accuracy and robustness.
[0098] The main network feature map is stitched together along the channel dimension. The terrain data is mathematically represented as follows:
[0099] ;
[0100] in, Represents the spatial location (height and width) of the feature map. This represents the channel index, where C is the number of channels in the main network feature map. This represents a terrain data tensor that, after expansion and duplication, is aligned with the main network feature map in both the batch and spatial dimensions, and its position... The Each channel value is used to obtain a new feature map after splicing. This feature map has 1 more channels than the main network feature map.
[0101] Specifically, in step 5 of this embodiment, the TERAN model is constructed, such as... Figure 3 As shown, it includes the following sub-steps:
[0102] Step 501, Input Layer: Input the master data (i.e., the original low-resolution meteorological data). Terrain data .
[0103] Step 502, Feature Processing Layer: A convolutional layer with 64 kernels, a kernel size of 3×3, a stride of 1, zero padding, and the activation function of ReLU. Then, multi-scale attention residual blocks are placed, with one multi-scale attention residual block placed every two convolutional layers. This process is repeated to place M layers of multi-scale attention residual blocks.
[0104] Step 503, Feature Fusion Layer: The feature maps extracted by the main network are... With the feature map of each multi-scale residual attention block ( , (etc.) Add them along the channel dimension to obtain the feature map. .
[0105] Step 504, Adjustment The number of channels after Element-by-element addition, i.e. Then, the ReLU activation function is used to perform a non-linear transformation on the feature map.
[0106] Step 505, Upsampling Layer: Use a convolutional layer to adjust the number of channels in the feature map. , The mathematical formula for convolution operation, where the amplification factor is the factor, is as follows:
[0107] ;
[0108] in, It is the value of the input feature map. These are the weights of the convolution kernel. It is the size of the convolution kernel.
[0109] Then, using the subpixel rearrangement method, the number of channels r×r is converted into spatial dimensions, as shown in the following formula:
[0110] ;
[0111] Where scale is the upsampling ratio.
[0112] Step 506, Terrain Data Fusion Layer: Combine the main network feature map and terrain data along the channel dimension.
[0113] Step 507, Output Layer: Adjust the number of channels in the final feature map to 1 and output it.
[0114] Specifically, in step 6 of this embodiment, the training set and the SadeWOA algorithm are used to optimize the model parameters and hyperparameters, such as... Figure 4 As shown, the trained model is used to process low-resolution data and generate high-resolution data, including the following sub-steps:
[0115] Step 601: Initialize parameters, set the maximum number of iterations T of the algorithm, the size N of the whale population, the lower bound lb and the upper bound ub of the search space, and randomly initialize the whale population.
[0116] The formula for determining the initial position of each individual using random numbers uniformly distributed within the search space is as follows:
[0117] ;
[0118] Set the mutation factor F to decrease with iteration:
[0119] .
[0120] The crossover probability increases with each iteration:
[0121] ;
[0122] Further calculate the initial fitness.
[0123] Step 602, the prey encirclement stage: Calculate the coefficient vectors A and C, using the following formula:
[0124] ;
[0125] ;
[0126] The formula for updating the whale's position is as follows:
[0127] ;
[0128] ;
[0129] Among them, parameters These are coefficients used to control the convergence process of the algorithm. It is the position of the current solution. It is the position of the current optimal solution. For the new location, It is an intermediate variable.
[0130] As a preferred option, , This represents the current iteration number. .
[0131] Step 603: Generate a random probability number p:
[0132] If p < 0.5, perform a contraction of the confinement area by reducing... The value is used to achieve the shrinking encirclement, directly using the prey encirclement stage. .
[0133] If p ≥ 0.5, spiral update is performed, and the formula is as follows:
[0134] ;
[0135] ;
[0136] in, It is a constant used to define the shape of the logarithmic spiral. for Random numbers between This represents the distance between the optimal individual and the i-th individual.
[0137] Step 604: Perform mutation operation:
[0138] ;
[0139] in, To randomly select an individual index from the population. Indicates the variable factor.
[0140] Next, perform binomial crossover: operate on each dimension, crossover the mutated individuals with the parent individuals, and select the better solution, as shown in the formula below:
[0141] ;
[0142] in, This ensures that at least one dimension is updated. This refers to the mutated individual.
[0143] Step 605: Update boundary constraints: If <lb or If the value is greater than ub, then set it as the boundary value; calculate the fitness of the new location. ;
[0144] like If the fitness is less than that of the i-th individual, then update:
[0145] ;
[0146] in, Function representation Limited to [ ], The function represents the fitness function, used to evaluate the quality of a solution. This represents the current fitness value of each individual.
[0147] Step 606: Return to step 602, repeat until the iteration count ends, and update the global optimal solution:
[0148] ;
[0149] After obtaining the optimal hyperparameter combination and applying it to the TERAN model, low-resolution data is input to obtain high-resolution output.
[0150] Furthermore, this embodiment uses the TensorFlow framework and an NVIDIA Tesla V100 GPU to perform precipitation data downscaling tests based on the test set data. The results show that the computation time of the TERAN model in this invention is reduced from tens of hours to several minutes for a single downscaling operation compared to traditional dynamic downscaling methods. Compared to the traditional statistical method QM (quantile mapping), the average SSIM for mountain precipitation prediction is improved from 0.607 to 0.829, an improvement of 36.6%. Under the sadeWOA algorithm, the number of hyperparameter search iterations in this invention is reduced by 40%. Compared to the average TS score of 0.485 for the YNet model in heavy rain events, the average TS score of the TERAN model in the same heavy rain case is 0.532, an improvement of 10.7%. The MAE (mean absolute error) of the TERAN model is reduced by 28.3% compared to the excellent deep learning model YNet.
[0151] In summary, this invention presents a precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm. Through three innovative methods—multi-scale attention mechanism, topographic physical coupling, and adaptive optimization algorithm—it achieves a lightweight model and single-step upscaling, effectively improving data quality and accuracy, and enhancing the ability to predict extreme events.
[0152] In this embodiment of the invention, an electronic device is also provided, comprising: one or more processors; a storage device storing one or more programs thereon; when the one or more programs are executed by the one or more processors, the one or more processors implement the precipitation data downscaling method based on multi-scale attention residual blocks and the sadeWOA algorithm described in any of the above embodiments.
[0153] In this embodiment of the invention, a computer-readable storage medium is also provided, on which a computer program is stored. When the program is executed by a processor, it implements the steps in any of the precipitation data downscaling methods based on multi-scale attention residual blocks and the SadeWOA algorithm in the above embodiments.
[0154] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm, characterized in that, Includes the following steps: Step 1: Acquire meteorological and topographic data, extract precipitation information of the target area, obtain raw low-resolution data, and preprocess the data, dividing it into training and test sets; Step 2: Construct a multi-scale attention residual block using channel attention blocks, spatial attention blocks, and skip connections. After feature extraction of the input low-resolution data through convolutional layers, the data enters the multi-scale attention residual block. First, important channels are filtered through channel attention blocks, and then key spatial locations are located through spatial attention blocks to obtain low-resolution feature maps. Step 3: Construct an upsampling module. Input a low-resolution feature map, use subpixel convolution to convert the channel dimension of the input feature map into a spatial dimension, and add convolutional layers to reduce block artifacts in the image. Step 4: Construct a terrain data fusion layer, incorporating enhanced feature representations of terrain data; Step 5: Construct the TERAN model. Based on the multi-scale attention residual block in Step 2, the upsampling module in Step 3, and the terrain data fusion layer in Step 4, construct a terrain enhancement residual attention network to downscale the input original low-resolution data. Step 6: Optimize the hyperparameters of the TERAN model using the training set and the SadeWOA algorithm, including: number of multi-scale residual block layers, learning rate, and skip connection switch. Train the TERAN model to find the best-performing group. Use the trained TERAN model to process low-resolution data and generate high-resolution precipitation data, including the following sub-steps: Step 601, Initialize parameters: Set the maximum number of iterations. whale population size lower bound of search space and the Upper Realm The whale population is randomly initialized using random numbers uniformly distributed within the search space. Determine the initial position of each individual Set the mutation factor to decrease with iteration and the crossover probability to increase with iteration, and calculate the initial fitness. Step 602, Surrounding the Prey Stage: Calculate the coefficient vector and The formula is as follows: ; ; The formula for updating the whale's position is as follows: ; ; Among them, parameters These are coefficients used to control the convergence process of the algorithm. This represents the current iteration number. It is the position of the current solution. It is the position of the current optimal solution. For the new location, As an intermediate variable; Step 603: Generate a random probability number p: If p < 0.5, perform a shrinking encirclement, using the encirclement prey phase. By reducing Values achieve contraction and enclosing; If p ≥ 0.5, spiral update is performed, and the formula is as follows: ; ; in, It is a constant used to define the shape of the logarithmic spiral. for Random numbers between This represents the distance between the optimal individual and the i-th individual; Step 604: Perform the mutation operation, using the following formula: ; in, To randomly select an individual index from the population. Indicates the variable factor; Perform binomial crossover: Operate on each dimension by crossing the mutated individual with the parent individual, and select the better solution. The formula is as follows: ; Among them, parameters ,parameter Used to ensure that at least one dimension is updated. For crossover probability, Indicates the mutated individual; Step 605: Update boundary constraints: ; like or Then Set the boundary values and calculate the fitness of the new location: ; like If the fitness is less than that of the i-th individual, then update: ; in, Function representation Limited to [ ], The function represents the fitness function. This represents the current fitness value of each individual; Step 606: Return to step 602, repeat until the iteration count ends, and update the global optimal solution: ; Step 607: Apply the obtained optimal hyperparameter combination to the TERAN model, input low-resolution precipitation data to obtain high-resolution precipitation data, and output the results.
2. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 1, characterized in that, The meteorological data mentioned in step 1 includes: Precipitation information of the target area is extracted from the ERA5 dataset and used as low-resolution data, which is then input into the multi-scale attention residual block. Precipitation information for the target region was extracted from the CHIRPS dataset and used as high-resolution ground truth data. The terrain data is obtained from SRTMDEMUTM elevation data, and the elevation information of the target area is extracted.
3. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 1, characterized in that, Step 1 involves data preprocessing, including the following sub-steps: Step 101: Crop and align the meteorological and topographic data of the target area to unify the latitude and longitude range and form an initial dataset; Step 102: Based on the initial dataset, apply the loglp transformation to normalize the precipitation data and topographic elevation data, as shown in the following formula: ; in, , These represent the initial dataset data before and after normalization, respectively.
4. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 1, characterized in that, Step 2 involves constructing a multi-scale attention residual block, which includes the following sub-steps: Step 201: Generate feature maps by passing the original low-resolution data through a convolutional layer. The input channel attention block is used to generate a one-dimensional attention map through global max pooling, global average pooling, and MLP to focus on key features related to precipitation. And so on, in the... Multi-scale residual attention blocks, input feature maps A one-dimensional attention map is obtained through channel attention blocks: , ; in, These represent the width, height, and number of channels of the input feature map, respectively. This indicates element-wise multiplication; Step 202: In the i-th layer multi-scale residual attention block, ... The input spatial attention block is processed through a pair of channel max pooling and average pooling, combined with a convolutional layer, to generate a two-dimensional attention map. To emphasize important spatial locations, and then Obtain a refined feature map; Step 203: Input feature map By adding the refined feature map element-wise through skip connections, the output feature map of the i-th layer multi-scale attention residual block is obtained. : ; in, Indicates element-wise addition; outputs feature map. Obtained through two convolutional layers Enter the (i+1)th layer multi-scale attention residual block.
5. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 4, characterized in that, Step 3 involves constructing the upsampling module, which includes the following sub-steps: Step 301: Input the low-resolution feature map into a filter. A convolutional layer with a kernel size of 3×3, a stride of 1, and padding set to SAME is used to extract features from the input image through convolution operations, generating a feature-rich image. The low-resolution convolutional feature maps of each channel are resized as follows: ; Where C is the number of channels, This is the magnification factor; Step 302: The low-resolution convolutional feature map undergoes a periodic rearrangement operation through a sub-pixel convolutional layer, transforming each pixel in the low-resolution feature map into a pixel of size 1. The pixel blocks are rearranged into a single pixel in a high-resolution image, and the output of the subpixel convolutional layer... Represented as: ; in, The input sub-pixel convolutional layer contains low-resolution convolutional feature maps. , These represent the final function and the parent function, respectively. For upsampling filters, For bias, This is a subpixel rearrangement operation; The transformation of the low-resolution convolutional feature map size is represented as: ; Step 303: After the output of the sub-pixel convolutional layer, add a convolutional layer with a kernel size of 3×3, a filter count of 64, a stride of 1, and zero padding to reduce block artifacts in the output image and obtain the optimized convolutional feature map.
6. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 5, characterized in that, The subpixel rearrangement operation is represented as: ; in, To output the position coordinates in the image, This refers to the channel index of the output image. Function representation Divide by The remainder, For input tensors.
7. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 5, characterized in that, Step 4 involves constructing the terrain data fusion layer, which includes the following sub-steps: Step 401: Based on steps 1, 2, and 3, construct the main network feature map to obtain the shape of the optimized convolutional feature map and determine the batch size; Step 402: Expand the preprocessed terrain data to the same batch size as the main network feature map; Step 403: Incorporate terrain information as an additional channel into the feature map, and stitch the main network feature map and terrain data along the channel dimension to obtain a new feature map after stitching. The number of channels in the new feature map increases by 1 compared to the main network feature map.
8. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 6, characterized in that, Step 5, constructing the TERAN model, includes the following sub-steps: Step 501, Input Layer: Input raw low-resolution data and terrain data ; Step 502, Feature Processing Layer: First, pass through a convolutional layer with 64 kernels, a kernel size of 3×3, a stride of 1, zero padding, and the activation function of ReLU. Then, place multi-scale attention residual blocks, and place one multi-scale attention residual block every two convolutional layers. Continue this process, placing M layers of multi-scale attention residual blocks in a loop. Step 503, Feature Fusion Layer: The feature maps extracted by the main network are... With the feature map of each multi-scale residual attention block, ...add along the channel dimension to obtain the feature map. ; Step 504, Adjustment The number of channels, and Element-by-element addition is represented as: Then, the ReLU activation function is used to perform a non-linear transformation on the feature map.
9. The precipitation data downscaling method based on multi-scale attention residual blocks and the SadeWOA algorithm according to claim 1, characterized in that, In step 601, random numbers uniformly distributed within the search space are used. The initial position of each individual is determined using the following formula: ; Set the mutation factor As the iteration decreases, the formula is as follows: ; Set crossover probability As the iteration increases, the formula is as follows: 。
Citation Information
Patent Citations
Deep learning-based ERA5 precipitation product downscaling method
CN116484189A
Spatial autocorrelation machine learning-based downscaling method and system of satellite precipitation data
US20220043182A1