A short-impending precipitation prediction method based on a CAMS-Unet model
By optimizing the data preprocessing and feature extraction modules of the CAMS-Unet model, the problems of multi-scale modeling imbalance and spatiotemporal heterogeneity in short-term precipitation forecasting of the U-Net network were solved, and higher accuracy short-term precipitation forecasting was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2026-03-31
AI Technical Summary
Existing short-term precipitation forecasting methods based on U-Net networks suffer from imbalances in multi-scale modeling and insufficient capture of spatiotemporal heterogeneity, leading to forecast errors and insufficient accuracy in local areas. Furthermore, interference information in radar echo images affects model training and prediction performance.
The CAMS-Unet model is adopted. Through data preprocessing, outlier and missing value handling, denoising and data augmentation, a model architecture including a global feature extraction module (CAMM) and a local feature extraction module (MSFM) is constructed. Combined with 3D convolution and CBAM channel attention mechanism, residual connections are introduced to optimize model training.
It significantly improves the accuracy of short-term precipitation forecasts. By effectively filtering and denoising data, it improves data quality. Combined with multi-scale feature extraction and attention mechanisms, it enhances the model's ability to capture the spatiotemporal features of radar echo images, thereby improving the accuracy and stability of forecasts.
Smart Images

Figure CN120953681B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more specifically, to a short-term precipitation forecasting method based on the CAMS-Unet model. Background Technology
[0002] Short-term precipitation forecasting is a method that predicts the unpredictable state of radar echo sequences by analyzing the spatiotemporal coupling relationships in historical radar echo image sequences. Its core task is to simultaneously capture the dynamic evolution patterns in the temporal dimension and the heterogeneous correlation patterns in the spatial dimension, and the spatiotemporal correlation also changes dynamically over time. As a key technology for meteorological disaster early warning, short-term precipitation forecasting (0-6 hours) focuses on solving the problem of predicting high-dimensional spatiotemporal sequences and simultaneously modeling the nonlinear spatiotemporal dependence and multi-scale evolution mechanisms of the atmospheric system.
[0003] With the development of computing power, deep learning-based short-term precipitation forecasting methods have made some progress in spatiotemporal feature modeling. For example, the U-Net-based short-term precipitation forecasting method effectively extracts image features due to its encoder-decoder structure, while the U-shaped structure simplifies the information transmission path and optimizes the transmission of multi-scale information flow in radar echo image sequences. However, the encoder-decoder process is prone to multi-scale modeling imbalance and insufficient capture of the spatiotemporal heterogeneity of radar echo image sequences, leading to problems such as local area forecast errors and insufficient accuracy in short-term precipitation forecasting. In addition, if the radar echo images required for short-term precipitation forecasting contain a large amount of interference information, it will have a certain impact on subsequent model training and prediction performance. Summary of the Invention
[0004] This invention provides a short-term precipitation forecasting method based on the CAMS-Unet model. It preprocesses radar echo images through three stages: dataset selection, outlier and missing value processing, and denoising and data augmentation, to obtain target radar echo images. By constructing a CAMS-Unet model that includes a global feature extraction module (CAMM) and a local feature extraction module (MSFM), it addresses the problems of multi-scale modeling imbalance and insufficient capture of spatiotemporal heterogeneity, thereby improving the accuracy of short-term precipitation forecasts.
[0005] The technical solution adopted in this invention is:
[0006] A short-term precipitation forecasting method based on the CAMS-Unet model includes:
[0007] S1. Acquire raw radar echo image data and preprocess it to obtain target radar echo image data;
[0008] S2. Construct a CAMS-Unet short-term precipitation forecast model, which includes:
[0009] The U-net model, based on an encoder-decoder architecture, connects the encoder and decoder via skip connections. A three-layer global feature extraction module (CAMM) is introduced in the encoder stage, and a corresponding three-layer CAMM' is introduced in the decoder stage. Each CAMM layer in the encoder stage contains a 3D convolutional layer, a CBAM channel attention mechanism layer, and a downsampling layer; each CAMM' layer in the decoder stage contains a 3D convolutional layer, a CBAM channel attention mechanism layer, and an upsampling layer. The 3D convolutional operation of the 3D convolutional layer captures the spatiotemporal continuity of the image; the CBAM channel attention mechanism layer enhances key feature channels of the image through dual-path pooling and dynamic weight allocation.
[0010] A multi-layer local feature extraction module MSFM and a corresponding multi-layer local feature extraction module MSFM' are introduced between the global feature extraction module CAMM in the encoder stage and the global feature extraction module CAMM' in the decoder stage. Each layer local feature extraction module MSFM and its corresponding layer local feature extraction module MSFM' are connected through residuals.
[0011] Each layer's local feature extraction module MSFM and its corresponding local feature extraction module MSFM' both include spatial multi-scale convolution, temporal multi-granularity convolution, and feature fusion mechanisms. Spatial multi-scale convolution and temporal multi-granularity convolution are connected in series. Specifically, spatial multi-scale convolution extracts spatial dimension features, temporal multi-granularity convolution extracts temporal dimension features, and the feature fusion mechanism fuses spatial dimension features and temporal dimension features through tensor multiplication.
[0012] S3. Based on the target radar echo image data, the CAMS-Unet short-term precipitation forecast model is trained and optimized to obtain the target CAMS-Unet short-term precipitation forecast model.
[0013] S4. Obtain the radar echo image to be predicted, input it into the target CAMS-Unet short-term precipitation forecast model, and output the predicted radar echo image to achieve short-term precipitation forecast.
[0014] Furthermore, the preprocessing in S1 includes:
[0015] S11, Dataset Filtering;
[0016] S12. Handling outliers and missing values;
[0017] S13, Denoising and Data Augmentation Processing.
[0018] Furthermore, the dataset filtering in S11 includes:
[0019] Acquire the target area and its raw radar echo image data;
[0020] Geographic information of the target area is removed to obtain the first radar echo image data.
[0021] Furthermore, the handling of outliers and missing values in S12 includes:
[0022] Outlier processing was performed on the first radar echo image data to obtain the second radar echo image data:
[0023] 1) Perform outlier detection according to the time frame steps, using the time series as a benchmark, and detect abnormal fluctuations in radar reflectivity frame by frame;
[0024] 2) If the reflectance change rate of more than 30% of pixels within a certain time frame (i.e., the difference between adjacent frames) is greater than 50 dBZ / s, it is judged as a significant anomaly and all outliers are deleted; otherwise, it is judged as a non-significant anomaly and outliers are deleted using Mahalanobis distance.
[0025] Let the position within each boundary in the image be... Set the ratio of pixel values from 1 to 225 as the feature. ;
[0026] Calculate the sample mean of each feature separately. Covariance Matrix The calculation formula is as follows:
[0027]
[0028]
[0029] Calculate the Mahalanobis distance of the features The calculation formula is as follows:
[0030]
[0031] Calculate the average distance of each feature and standard deviation The calculation formula is as follows:
[0032]
[0033]
[0034] When Mahalanobis distance is calculated Greater than average distance and three standard deviations The sum of these values is considered an outlier and is removed.
[0035]
[0036] By filling in missing values in the second radar echo image data, the third radar echo image data is obtained:
[0037] After outlier handling, the process is performed according to the time frame steps, using the natural day as the statistical unit, to calculate the percentage of missing values in all frames for each day: if the percentage of missing values on a certain day is >25%, all data for that day are directly removed; if the percentage of missing values is <25%, the data before and after the missing values in the radar echo image data are filled in using the inverse range weighted interpolation method.
[0038] Specifically, 1) Calculation and European spatial distance between them:
[0039]
[0040] in, Indicates the first i Nearby observation points The measured radar echo intensity This represents the predicted radar echo intensity of the point to be interpolated;
[0041] 2) Based on and The Euclidean spatial distance between them is obtained by inverse distance weighted interpolation. Radar echo intensity:
[0042] .
[0043] Furthermore, the denoising and data augmentation processing in S13 includes:
[0044] The reflectivity factor in the third radar echo image data Converting to radar echo intensity, the reflectivity factor is transformed using a base-10 logarithmic transformation. Converted to decibel form The formula is as follows:
[0045]
[0046] Based on the physical masking method, reflectivity factors below 15 are used to... The radar echo intensity of the third radar echo image data is set to 0, and the assignment formula is as follows:
[0047]
[0048] in, represent t Radar echo intensity at any given time;
[0049] To model the noise distribution, a three-component Gaussian Mixture Model (GMM) is established for the noise pixels, with the following parameters:
[0050]
[0051] in, Indicates the first The probability density function of a Gaussian distribution; Corresponding ground clutter ( ), Corresponding transient disturbances ( ), Corresponding system noise ( );
[0052] Based on the posterior probability calculation results of the GMM model, differentiated processing is applied to ground clutter, transient interference, and system noise to achieve accurate denoising:
[0053] For ground clutter, first... The pixels are labeled as ground clutter, and a binary mask is generated. Then, a closing operation is performed on the mask to fill the holes, and the occluded area is repaired based on the effective pixels in the neighborhood using the inverse distance weighting method.
[0054] For transient interference, the current value is replaced by the median value of 5 consecutive frames for pixels marked as transient interference:
[0055]
[0056] In addition, isolated points are eliminated. Transient interference pixels with a similar ratio of less than 30% in their 8-neighborhood are identified as isolated interference such as birds, and their values are directly set to -15. ;
[0057] For system noise, nonlocal mean filtering is used to suppress random noise in low signal-to-noise ratio regions:
[0058]
[0059]
[0060] in, The search box is .
[0061] Furthermore, the operation flow of the global feature extraction module (CAMM) at each layer in the encoding stage and the global feature extraction module (CAMM') in the decoder stage is as follows:
[0062] In the encoder stage, the input sequence Global spatiotemporal features are generated through 3D convolution, ReLU activation function, and batch normalization (BatchNorm). :
[0063]
[0064]
[0065] global spatiotemporal features Perform global average pooling and global max pooling operations respectively:
[0066]
[0067]
[0068] in, , This represents the output of global average pooling. This represents the output of global max pooling;
[0069] The outputs of global average pooling and global max pooling are respectively input into independent fully connected layers:
[0070]
[0071]
[0072] in, Represents the ReLU activation function;
[0073] A weighted summation operation is performed on the dual-path outputs, and a channel weight vector is generated based on the Sigmoid function. To achieve weight fusion operation:
[0074]
[0075] in, This represents the adaptive weight coefficient, with an initial value of [value]. Then, optimization is performed based on backpropagation;
[0076] Output features are obtained based on feature recalibration. :
[0077]
[0078] Among them, weight Decision Channel c Retention strength, This indicates that the channels associated with heavy rainfall have been strengthened;
[0079] Output features After downsampling operation Complete one CAMM module process:
[0080]
[0081] Repeat the above steps three times, that is, pass through the three-layer global feature extraction module CAMM one after another. The output features obtained each time are:
[0082]
[0083] in, This represents the output features obtained after successive passes through the three-layer global feature extraction module CAMM;
[0084] Similarly, in the decoder stage, the operations of each layer of the global feature extraction module (CAMM) are consistent with those of each layer of the global feature extraction module (CAMM) in the encoding stage, with the only difference being in the upsampling layer stage. The formula is as follows:
[0085] .
[0086] Furthermore, the operation flow of the local feature extraction module (MSFM) at each layer in the encoding stage is as follows:
[0087] The output features obtained after passing through the three-layer global feature extraction module CAMM Features used as input to the local feature extraction module MSFM;
[0088] Spatial dimensional features are extracted through spatial multi-scale convolution: local details are captured by small convolution kernels, medium-scale semantic perception is achieved by rectangular kernels, and global context is modeled and extracted by large convolution kernels.
[0089] Temporal dimension features are extracted through temporal multi-granularity convolution: short-term fluctuation perception captures minute-level precipitation intensity abrupt changes through small convolution kernels, medium-term trend tracking models hour-scale system movement through medium-shaped kernels, and long-term period memory associates daily variation patterns through large kernels;
[0090] Based on the feature fusion mechanism, spatial dimension features and temporal dimension features are fused using tensor multiplication:
[0091] Spatial dimension feature extraction is achieved by concatenating four-dimensional convolutions with channels and reducing the dimensionality with 1×1 convolutions.
[0092] The three-dimensional convolutions are reduced in dimensionality by concatenating channels and performing 1×1 convolutions to achieve temporal dimension feature extraction.
[0093] spatial features With time characteristics Perform tensor multiplication fusion;
[0094] Similarly, in the decoder stage, the operations of each layer of the local feature extraction module MSFM' are consistent with those of each layer of the local feature extraction module MSFM in the encoding stage.
[0095] Furthermore, the performance of the CAMS-Unet model was evaluated using the SSIM, MAE, and MSE metrics:
[0096] 1) The Mean Squared Error (MSE) is an evaluation metric for the sharpness of images generated by the target model on the data. The smaller the value, the better the model's performance. The calculation formula is as follows:
[0097]
[0098] 2) Mean Absolute Error (MAE) is a regression model evaluation metric used to measure the average absolute difference between predicted and true values. In some specific problems, it is called the loss function and is interpreted as a measure of the difference between the predicted and true values for each pixel. The smaller the value, the better the model's performance. The calculation formula is as follows:
[0099]
[0100] 3) The Structural Similarity Index Measure (SSIM) is an evaluation metric for the structural similarity of images generated by the target model on the data. It assesses the model's predictive performance by comparing the generated image with the actual image in terms of brightness, contrast, and structural quality. A higher SSIM value indicates better model performance. The value ranges from [value missing in original text]. The calculation formula is as follows:
[0101]
[0102]
[0103]
[0104] in, It is the actual value. It is a predicted value; yes The average value, yes The average value; yes variance yes The variance; yes and covariance; and It is a constant used to maintain stability and avoid calculation errors caused by dividing by zero. L is the dynamic range of pixel values.
[0105] Compared with the prior art, the present invention has the following advantages:
[0106] This invention significantly improves the accuracy of short-term precipitation forecasts by preprocessing radar echo image data and constructing a short-term precipitation forecast model from a basic model.
[0107] 1) In terms of data preprocessing, a three-stage hybrid filtering framework was constructed to address ground clutter, missing data, and non-uniform noise in the original radar echo images. Valid data frames were screened through spatiotemporal continuity analysis, and inverse range weighted interpolation was used to repair incomplete regions. A Gaussian mixture model was combined to separate meteorological targets from noise. A multimodal denoising strategy was innovatively introduced, with processing modules designed for steady-state noise, impulse noise, and dynamic noise. An adaptive smoothing mechanism based on the anisotropic diffusion equation was used to suppress noise while preserving echo edge details. The preprocessed dataset effectively improved the data distribution characteristics, providing high-quality input for model training.
[0108] 2) At the model architecture level, the CAMS-Unet model is obtained by introducing a global feature extraction module (CAMM) and a local feature extraction module (MSFM) based on the channel attention mechanism based on the U-net model. That is, the encoder end uses a three-dimensional convolutional kernel to construct a global spatiotemporal feature extraction module, which breaks through the time modeling limitations of traditional two-dimensional convolution and realizes the overall capture of the dynamic evolution law of radar echo. The improved channel attention mechanism automatically calibrates the feature channel weight distribution through joint perception of spatiotemporal dimensions, and enhances the representation ability of key meteorological targets. The decoder end innovatively designs a multi-scale feature fusion module, which extracts local features of different receptive fields through a parallel multi-branch convolutional structure, effectively balancing the modeling needs of large-scale weather systems and small-scale convective cells. The CAMS-Unet model introduces a residual skip connection mechanism to promote the deep coupling of global features of the encoder and local features of the decoder, effectively conveying contextual information. Attached Figure Description
[0109] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:
[0110] Figure 1 This is a flowchart illustrating a short-term precipitation forecasting method based on the CAMS-Unet model according to the present invention.
[0111] Figure 2 This invention relates to a short-term precipitation forecasting method based on the CAMS-Unet model, and includes radar echo images before and after removing geographic information.
[0112] Figure 3 This is a radar echo image before and after denoising and data augmentation processing in a short-term precipitation forecasting method based on the CAMS-Unet model of the present invention;
[0113] Figure 4 This is a schematic diagram of the CAMS-Unet model architecture in this invention;
[0114] Figure 5 yes Figure 4 A schematic diagram of the structure of the global feature extraction module (CAMM);
[0115] Figure 6 yes Figure 4 A schematic diagram of the structure of the local feature extraction module (MSFM);
[0116] Figure 7 This is a schematic diagram illustrating a qualitative comparison between the CAMS-Unet model and other models in radar echo image data in this invention. Detailed Implementation
[0117] Example
[0118] In this embodiment, CAMS-Unet is a short-term precipitation forecasting network with multi-scale channel attention and multi-scale UNet.
[0119] like Figures 1 to 7 As shown, a short-term precipitation forecasting method based on the CAMS-Unet model includes:
[0120] S1. Acquire raw radar echo image data and preprocess it to obtain target radar echo image data;
[0121] S11. Dataset Filtering:
[0122] Acquire the target area and its raw radar echo image data;
[0123] After removing the geographic information of the target area, the first radar echo image data is obtained:
[0124] Specifically, relying on deep analysis of geospatial data, and utilizing the administrative division vector boundary file published by a basic geographic information center, the data is then superimposed onto the radar echo image coordinate system through coordinate transformation and spatial registration.
[0125] 1) Delineate vector boundaries: Access the national-level administrative division vector database through the GIS platform to directly obtain the boundary line data of Central China; use the feature-to-line tool to convert the administrative division surface data into accurate vector boundary lines; use the spatial query function to filter out the administrative division boundary line layer to ensure that the boundary coordinates are consistent with the geographic coordinate system of the radar echo image;
[0126] 2) Overlay of boundaries with radar echo images: The extracted administrative division vector boundary lines are overlaid onto the radar echo image; spatial matching is ensured through raster-vector alignment; with the help of the geopandas library in the Python ecosystem, the system rasterizes the vector boundaries into a binary mask matrix that strictly matches the spatial resolution (1km×1km) of the radar echo image, where pixels outside the mask area are batch-zeroed or set to transparent channels through matrix operations.
[0127] Note: Removing the geographic information of the target area can effectively eliminate the interference of provincial and municipal administrative boundaries on precipitation analysis, and finally obtain radar echo image data containing only meteorological information, which is denoted as the first radar echo image data.
[0128] Furthermore, the sequence files are saved in PNG format. If the extracted radar echo image data is imported into the Python toolkit h5py, relevant program code can be written using the toolkit to complete the sequence extraction operation. For ease of storage, viewing, and visualization, it is converted into a radar echo image format, and the radar echo intensity values in the radar echo image data are mapped to a grayscale value range of 0-255. The extracted radar echo image is a 480×480 grayscale image with a bit depth of 8, and the radar echo intensity range is 0-70dBZ. The image is still stored in PNG format. In the subsequent testing and verification phase, to more accurately and consistently reflect the radar echo situation under different intensities, and to facilitate observation and analysis of the rich echo evolution details in the image, the radar echo image is visualized again. The radar echo image after dataset filtering and processing is shown below. Figure 2 As shown:
[0129] S12. Handling outliers and missing values:
[0130] Outlier processing was performed on the first radar echo image data to obtain the second radar echo image data:
[0131] 4) Perform outlier detection according to the time frame steps, using the time series as a benchmark, and detect abnormal fluctuations in radar reflectivity frame by frame;
[0132] 5) If the reflectance change rate of more than 30% of pixels within a certain time frame (i.e., the difference between adjacent frames) is greater than 50 dBZ / s, it is judged as a significant anomaly and all outliers are deleted; otherwise, it is judged as a non-significant anomaly and outliers are deleted using Mahalanobis distance.
[0133] Let the position within each boundary in the image be... Set the ratio of pixel values from 1 to 225 as the feature. ;
[0134] Calculate the sample mean of each feature separately. Covariance Matrix The calculation formula is as follows:
[0135]
[0136]
[0137] Calculate the Mahalanobis distance of the features The calculation formula is as follows:
[0138]
[0139] Calculate the average distance of each feature and standard deviation The calculation formula is as follows:
[0140]
[0141]
[0142] When Mahalanobis distance is calculated Greater than average distance and three standard deviations The sum of these values is considered an outlier and is removed.
[0143]
[0144] By filling in missing values in the second radar echo image data, the third radar echo image data is obtained:
[0145] After outlier handling, the process is performed according to the time frame steps, using the natural day as the statistical unit, to calculate the percentage of missing values in all frames for each day: if the percentage of missing values on a certain day is >25%, all data for that day are directly removed; if the percentage of missing values is <25%, the data before and after the missing values in the radar echo image data are filled in using the inverse range weighted interpolation method.
[0146] Specifically, 1) Calculation and European spatial distance between them:
[0147]
[0148] in, Indicates the first i Nearby observation points The measured radar echo intensity This represents the predicted radar echo intensity of the point to be interpolated;
[0149] 2) Based on and The Euclidean spatial distance between them is obtained by inverse distance weighted interpolation. Radar echo intensity:
[0150]
[0151] Note: During debugging, it was found that the power parameter... Outlier filling is relatively effective; inverse distance weighted interpolation is a spatial interpolation method that calculates location points by inverse distance weighting, and is mainly used for modeling continuous points in spatial data to infer values at unknown locations;
[0152] S13. Noise reduction and data augmentation processing:
[0153] The reflectivity factor in the third radar echo image data Converting to radar echo intensity, the reflectivity factor is transformed using a base-10 logarithmic transformation. Converted to decibel form The formula is as follows:
[0154]
[0155] Based on the physical masking method, reflectivity factors below 15 are used to... The radar echo intensity of the third radar echo image data is set to 0, and the assignment formula is as follows:
[0156]
[0157] in, represent t Radar echo intensity at any given time;
[0158] To model the noise distribution, a three-component Gaussian Mixture Model (GMM) is established for the noise pixels, with the following parameters:
[0159]
[0160] in, Indicates the first The probability density function of a Gaussian distribution; Corresponding ground clutter ( ), Corresponding transient disturbances ( ), Corresponding system noise ( );
[0161] Based on the posterior probability calculation results of the GMM model, differentiated processing is applied to ground clutter, transient interference, and system noise to achieve accurate denoising:
[0162] For ground clutter, first... The pixels are labeled as ground clutter, and a binary mask is generated. Then, a closing operation is performed on the mask to fill the holes, and the occluded area is repaired based on the effective pixels in the neighborhood using the inverse distance weighting method.
[0163] For transient interference, the current value is replaced by the median value of 5 consecutive frames for pixels marked as transient interference:
[0164]
[0165] In addition, isolated points are eliminated. Transient interference pixels with a similar ratio of less than 30% in their 8-neighborhood are identified as isolated interference such as birds, and their values are directly set to -15. ;
[0166] For system noise, nonlocal mean filtering is used to suppress random noise in low signal-to-noise ratio regions:
[0167]
[0168]
[0169] in, The search box is ;
[0170] Enhancement through anisotropic diffusion Weak signal information in the vicinity, while using an unsharpened mask to recover the edge information of the smoothed strong echo image;
[0171] Specifically, for The anisotropic diffusion enhancement steps for weak signal information in the vicinity are as follows:
[0172] Input the original radar echo intensity matrix The resolution is 1km×1km, and the numerical range is -30dBZ to 70dBZ.
[0173] The gradient and diffusion coefficient are calculated separately:
[0174] Gradient calculation: Calculate the gradient for each pixel. exist x and y gradient components of direction and Horizontal gradient detection of vertical edges, vertical gradient detection of horizontal edges;
[0175]
[0176]
[0177] in, This represents the convolution operation, which is a local weighted summation operation between the filter kernel and the image matrix;
[0178] The gradient (edge strength value) is:
[0179]
[0180] Diffusion coefficient ( c The calculation formula is:
[0181]
[0182] in, =5dBZ, used to distinguish edge critical values;
[0183] Next, the gradient and diffusion coefficient are used to determine the image region. When the gradient is below 5 dBZ / km (such as in the stratus precipitation area), the diffusion coefficient is close to 1, and strong smoothing of the blurred area image is allowed; when the gradient is above 5 dBZ / km (such as in the edge of thunderstorms), the diffusion coefficient approaches 0, and smoothing is suppressed to preserve the original structure.
[0184] After obtaining the diffusion coefficient and determining the image region, the image is updated incrementally through explicit Euler iteration;
[0185] The anisotropic diffusion is calculated as follows:
[0186]
[0187] The divergence is calculated as follows:
[0188]
[0189] Then, the current pixel value is obtained through discretization iteration. The current pixel value is the original value plus the time step multiplied by the divergence value, as shown in the following formula:
[0190]
[0191] in, n Repeat the iteration 50 times, starting from 1.
[0192] Finally, an unsharpened mask is used to enhance the smooth transition regions (gradient descent greater than 20%) to restore the true image:
[0193]
[0194] in, , This represents the image after Gaussian blurring.
[0195] Note: For The surrounding area (-15 dBZ to 5 dBZ) often corresponds to low-intensity precipitation particles such as light fog and drizzle, which are easily ignored during noise reduction. Therefore, this paper adopts anisotropic diffusion to enhance the noise reduction process. Weak signal information in the vicinity is obtained by using a non-sharpening mask to restore the smoothed edge information of the strong echo image; the third radar echo image data is preprocessed by a hybrid filtering method based on a statistical model to remove most of the noise information, thus obtaining the target radar echo image data.
[0196] like Figure 3 As shown, where Figure 3 (a) represents the second radar echo image data before denoising. Figure 3 (b) represents the third radar echo image data after denoising and data augmentation, from... Figure 3 As can be seen in (a), the original radar echo image contains ground clutter in areas A and D, transient interference in area B, and system noise in area C. After the above denoising processing, from Figure 3 As can be seen in (b), the noise in the AD region is well processed; in addition, the information lost at the edges of the radar echo image due to denoising is also recovered through data augmentation, i.e. Figure 3 (b) Edge contour ratio Figure 3 (a) is clearer, and finally we get Figure 3 (b) shows the third radar echo image.
[0197] Explanation: Dataset screening removes irrelevant information to reduce the computational burden on the model; missing and outlier handling effectively mitigates prediction errors caused by missing and outlier values; denoising and data augmentation not only reduce noise interference generated during image collection but also alleviate the conflict between noise suppression and detail preservation during image denoising through anisotropic diffusion enhancement; the target sample dataset obtained after preprocessing provides favorable data support for subsequent model experiments.
[0198] S2. Construct a CAMS-Unet short-term precipitation forecast model, which includes:
[0199] The U-net model, based on an encoder-decoder architecture, connects the encoder and decoder via skip connections. A three-layer global feature extraction module (CAMM) is introduced in the encoder stage, and a corresponding three-layer CAMM' is introduced in the decoder stage. Each CAMM layer in the encoder stage contains a 3D convolutional layer, a CBAM channel attention mechanism layer, and a downsampling layer; each CAMM' layer in the decoder stage contains a 3D convolutional layer, a CBAM channel attention mechanism layer, and an upsampling layer. The 3D convolutional operation of the 3D convolutional layer captures the spatiotemporal continuity of the image; the CBAM channel attention mechanism layer enhances key feature channels of the image through dual-path pooling and dynamic weight allocation.
[0200] A multi-layer local feature extraction module MSFM and a corresponding multi-layer local feature extraction module MSFM' are introduced between the global feature extraction module CAMM in the encoder stage and the global feature extraction module CAMM' in the decoder stage. Each layer local feature extraction module MSFM and its corresponding layer local feature extraction module MSFM' are connected through residuals.
[0201] Each layer's local feature extraction module MSFM and its corresponding local feature extraction module MSFM' both include spatial multi-scale convolution, temporal multi-granularity convolution, and feature fusion mechanisms. Spatial multi-scale convolution and temporal multi-granularity convolution are connected in series. Specifically, spatial multi-scale convolution extracts spatial dimension features, temporal multi-granularity convolution extracts temporal dimension features, and the feature fusion mechanism fuses spatial dimension features and temporal dimension features through tensor multiplication.
[0202] The operation flow of the global feature extraction module (CAMM) at each layer in the encoding stage and the global feature extraction module (CAMM') in the decoder stage:
[0203] In the encoder stage, the input sequence Global spatiotemporal features are generated through 3D convolution, ReLU activation function, and batch normalization (BatchNorm). :
[0204]
[0205]
[0206] global spatiotemporal features Perform global average pooling and global max pooling operations respectively:
[0207]
[0208]
[0209] in, , This represents the output of global average pooling. This represents the output of global max pooling;
[0210] The outputs of global average pooling and global max pooling are respectively input into independent fully connected layers:
[0211]
[0212]
[0213] in, Represents the ReLU activation function;
[0214] A weighted summation operation is performed on the dual-path outputs, and a channel weight vector is generated based on the Sigmoid function. To achieve weight fusion operation:
[0215]
[0216] in, This represents the adaptive weight coefficient, with an initial value of [value]. Then, optimization is performed based on backpropagation;
[0217] Output features are obtained based on feature recalibration. :
[0218]
[0219] Among them, weight Decision Channel c Retention strength, This indicates that the channels associated with heavy rainfall have been strengthened;
[0220] Output features After downsampling operation Complete one CAMM module process:
[0221]
[0222] Repeat the above steps three times, that is, pass through the three-layer global feature extraction module CAMM one after another. The output features obtained each time are:
[0223]
[0224] in, This represents the output features obtained after successive passes through the three-layer global feature extraction module CAMM;
[0225] Similarly, in the decoder stage, the operations of each layer of the global feature extraction module (CAMM) are consistent with those of each layer of the global feature extraction module (CAMM) in the encoding stage, with the only difference being in the upsampling layer stage. The formula is as follows:
[0226] ;
[0227] The operation flow of the local feature extraction module (MSFM) at each layer during the encoding stage:
[0228] The output features obtained after passing through the three-layer global feature extraction module CAMM Features used as input to the local feature extraction module MSFM;
[0229] Spatial dimensional features are extracted through spatial multi-scale convolution: local details are captured by small convolution kernels, medium-scale semantic perception is achieved by rectangular kernels, and global context is modeled and extracted by large convolution kernels.
[0230] Specifically, let the input features be... The spatial multi-scale convolution group contains four parallel branches:
[0231] The standard square convolution is:
[0232]
[0233] Large-scale square convolution is:
[0234]
[0235] The horizontal rectangular convolution is:
[0236]
[0237] Vertical rectangular convolution is:
[0238]
[0239] in, , , , ;
[0240] Temporal dimension features are extracted through temporal multi-granularity convolution: short-term fluctuation perception captures minute-level precipitation intensity abrupt changes through small convolution kernels, medium-term trend tracking models hour-scale system movement through medium-shaped kernels, and long-term period memory associates daily variation patterns through large kernels;
[0241] Specifically, the temporal multi-granularity convolution group contains three parallel branches:
[0242] Short-time convolution is:
[0243]
[0244] The convolution in the middle is:
[0245]
[0246] Long-term convolution is:
[0247]
[0248] in, , , ;
[0249] Based on the feature fusion mechanism, spatial dimension features and temporal dimension features are fused using tensor multiplication:
[0250] Spatial dimension feature extraction is achieved by concatenating the channels of the four-dimensional convolutions and performing 1×1 convolutions to reduce the dimensionality.
[0251]
[0252] in, Indicates splicing along the channel. , Indicates the number of channels after fusion;
[0253] The three-dimensional convolutions are reduced in dimensionality by concatenating channels and performing a 1×1 convolution to extract features in the time dimension.
[0254]
[0255]
[0256] in, It is calculated using GAP and the learnable matrix A.
[0257] spatial features With time characteristics Perform tensor multiplication fusion:
[0258]
[0259] in, This indicates an element-wise multiplication and addition operation. It is a 1×1×1 convolutional projection used for dimension matching.
[0260] Similarly, in the decoder stage, the operations of each layer of the local feature extraction module MSFM' are consistent with those of each layer of the local feature extraction module MSFM in the encoding stage.
[0261] Explanation: An improved channel attention (CBAM) module is introduced in the encoding stage to construct the global feature extraction module (CAMM), which simultaneously captures the overall spatial morphological features and temporal motion trajectory of the radar echo image sequence; a local feature extraction module (MSFM) is constructed on the basis of the original U-Net architecture, which expands the receptive field through multi-scale convolution to capture local spatiotemporal features at different scales; residual connections are combined between the encoder and decoder on the basis of the original skip connections to effectively pass contextual information.
[0262] S3. Based on the target radar echo image data, the CAMS-Unet short-term precipitation forecast model is trained and optimized to obtain the target CAMS-Unet short-term precipitation forecast model.
[0263] During model training, considering the imbalance in the sample distribution of the dataset, a sample weight adjustment mechanism is introduced into the loss function to alleviate the class imbalance problem and improve the model's prediction ability for minority class samples. The loss function adopts a weighted combination of mean squared error and mean absolute error, specifically defined as:
[0264]
[0265] in, and They are respectively and Weighting coefficients;
[0266] Optimizer selection: Adam
[58] The optimizer's parameters are set as follows: the initial learning rate is 0.0001. and Furthermore, to improve the stability and convergence speed of model training, a dynamic learning rate adjustment strategy is adopted, updating the learning rate every 5 epochs with a decay rate of 0.7; the specific formula for updating the learning rate is as follows:
[0267] ;
[0268] S4. Obtain the radar echo image to be predicted, input it into the target CAMS-Unet short-term precipitation forecast model, and output the predicted radar echo image to achieve short-term precipitation forecast.
[0269] To verify the accuracy of the CAMS-Unet short-term precipitation forecast model, experiments were conducted on radar echo image data to compare it with other models such as ConvLSTM, PredRNN, PredRNN++, MIM, MotionRNN, PrecipLSTM, U-Net, SmaAt-Unet, and SE_ResUnet. Model performance was evaluated using SSIM, MAE, and MSE metrics.
[0270] The Mean Squared Error (MSE) is an evaluation metric for the sharpness of images generated by the target model on the data. The smaller the value, the better the model's performance. The calculation formula is as follows:
[0271]
[0272] Mean Absolute Error (MAE) is a metric used to measure the average absolute difference between predicted and true values in regression models. In certain problems, it is referred to as a loss function and is interpreted as a measure of the difference between the predicted and true values for each pixel. A smaller MAE value indicates better model performance. The calculation formula is as follows:
[0273]
[0274] The Structural Similarity Index Measure (SSIM) is an evaluation metric representing the degree of structural similarity between the generated images and the actual images generated by the target model. It assesses the model's predictive performance by comparing the generated images with the actual images in terms of brightness, contrast, and structural quality. A higher SSIM value indicates better model performance. The value ranges from [value missing in original text]. The calculation formula is as follows:
[0275]
[0276]
[0277]
[0278] in, It is the actual value. It is a predicted value; yes The average value, yes The average value; yes variance yes The variance; yes and covariance; and It is a constant used to maintain stability and avoid calculation errors caused by dividing by zero. L is the dynamic range of pixel values.
[0279] The quantitative comparison results of different models in radar echo image data are shown in Table 1:
[0280] Table 1. Quantitative comparison of different models in radar echo image data.
[0281]
[0282] Table 1 shows that the CAMS-Unet short-term precipitation forecasting model achieves a breakthrough in balancing accuracy and efficiency during the forecasting process. CAMS-Unet's MAE (91.55) and MSE (45.3) are the best among the compared models, achieving a 51.9% reduction in error compared to the traditional time-series model ConvLSTM (MAE=190.2). It also reduces errors by 16.7% and 9.3% compared to the better PredRNNv2 (MAE=109.86) and PrecipLSTM (MAE=100.89), respectively. Furthermore, CAMS-Unet's SSIM index reaches 0.816, a 32.5% improvement over ConvLSTM (SSIM=0.616). Although lower than PredRNNv2's 0.891, considering the overall error index, when SSIM>0.8, the marginal improvement in actual visual effect decreases. Therefore, the 16.7% reduction in MAE is more practically valuable. Among similar U-Net improved models, CAMS-Unet reduces the error by 25.7% compared to U-Net (MAE=123.26); it also reduces the error by 16.7% compared to the channel attention benchmark SmaAt-Unet (MAE=110.2). This fully verifies the synergistic effect of multi-scale feature fusion (MSE from 55.66 to 45.3) and channel attention mechanism (SSIM from 0.812 to 0.816), especially in high-frequency detail recovery, where its MSE is optimized by 14.6% compared to SE_Res-Unet (53.11).
[0283] like Figure 7The figure shows a qualitative comparison of different models in radar echo image data. From the visualization comparison of the prediction results in the figure, it can be seen that each model predicts the motion trend of each radar echo image relatively well, but there are still differences in the ability of each model to capture the motion trend of the radar echo images. The CAMS-Unet prediction results can accurately reflect the direction of precipitation. Although ConvLSTM and U-Net can roughly reflect the overall direction of echo movement, their subsequent 5 frames of predicted images show obvious detail blurring and boundary diffusion, especially in areas of heavy precipitation (such as cloud clusters with echo intensity ≥40dBZ).
[0284] The spatial misalignment between the predicted contours and the actual data in the images is due to the generation of false precipitation patches and the weakening of the actual rainstorm center. Compared with other models, the predicted images of SmaAt-Unet and SE_ResUnet improve the clarity of the predicted images, but the trend of the rainstorm gradually becomes distorted; CAMS-Unet provides more accurate short-term precipitation forecasts while ensuring the accuracy of the rainstorm cloud movement trend and the clarity of the overall results.
[0285] Furthermore, ablation experiments were conducted on the CAMS-Unet model in the CAMM and MSFM modules using this data. It is clear from the figures that both modules are indispensable, and the model's predictive performance is significantly reduced when only one module is used.
[0286] This invention addresses the limitations of traditional U-Net models in capturing the continuity of motion within spatiotemporal sequences, extracting global image information, and extracting features from local image regions. Considering the spatial heterogeneity and temporal evolution characteristics of radar echo image data, this invention proposes a short-term precipitation forecasting method based on the CAMS-Unet model. This model, building upon the U-Net encoder-decoder architecture, introduces a global feature extraction module (CAMM), extending two-dimensional convolution operations to three-dimensional convolution, effectively capturing the continuous motion features within radar echo image data. An improved channel attention mechanism (CBAM) module is embedded in the encoder stage to enhance the model's ability to extract global spatiotemporal features from the image. A local feature extraction module (MSFM) is designed based on the original U-Net architecture, employing a concatenated operation of temporal multi-granularity convolution and spatial multi-scale convolution to extract spatiotemporal features from local image regions. Furthermore, improved residual connection context information is incorporated into the original skip connections to effectively integrate global and local image feature information. To verify the model's performance, experiments on radar echo image data showed that CAMS-Unet's MAE and MSE were lower than the benchmark U-Net, while SSIM was significantly improved, outperforming comparative models such as SmaAt-Unet and SE_ResNet. This demonstrates, from both quantitative and qualitative perspectives, that CAMS-Unet plays a crucial role in improving the predictive ability of precipitation pattern evolution.
[0287] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the principles and essence of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A short-term precipitation forecast method based on a CAMS-Unet model, characterized in that, The method comprises the following steps: S1, obtaining original radar echo image data and preprocessing to obtain target radar echo image data; S2, constructing a CAMS-Unet short-term precipitation prediction model, the CAMS-Unet short-term precipitation prediction model comprising: a U-net model based on an encoder-decoder architecture, the encoder and the decoder being spliced through a skip connection, a three-layer global feature extraction module CAMM being introduced in the encoder stage, and a corresponding three-layer global feature extraction module CAMM' being introduced in the decoder stage, each layer of the global feature extraction module CAMM in the encoder stage comprising a three-dimensional convolution layer, a CBAM channel attention mechanism layer and a down-sampling layer; each layer of the global feature extraction module CAMM' in the decoder stage comprising a three-dimensional convolution layer, a CBAM channel attention mechanism layer and an up-sampling layer; wherein the three-dimensional convolution operation of the three-dimensional convolution layer captures the spatio-temporal continuity of the image; the CBAM channel attention mechanism layer enhances the key feature channels of the image through double-path pooling and dynamic weight distribution; a plurality of layers of local feature extraction modules MSFM and corresponding plurality of layers of local feature extraction modules MSFM' are introduced between the global feature extraction module CAMM in the encoder stage and the global feature extraction module CAMM' in the decoder stage, each layer of the local feature extraction module MSFM and its corresponding each layer of the local feature extraction module MSFM' being connected through a residual connection; each layer of the local feature extraction module MSFM and its corresponding local feature extraction module MSFM' both comprise a spatial multi-scale convolution, a temporal multi-granularity convolution and a feature fusion mechanism, the spatial multi-scale convolution and the temporal multi-granularity convolution being connected in series; wherein the spatial dimension features are extracted through the spatial multi-scale convolution, the time dimension features are extracted through the temporal multi-granularity convolution, and the spatial dimension features and the time dimension features are fused through tensor multiplication based on the feature fusion mechanism; S3, training and optimizing the CAMS-Unet short-term precipitation prediction model based on the target radar echo image data to obtain a target CAMS-Unet short-term precipitation prediction model; S4, obtaining a radar echo image to be predicted, inputting the radar echo image to be predicted into the target CAMS-Unet short-term precipitation prediction model, and outputting a predicted radar echo image to realize short-term precipitation prediction; wherein the operation process of each layer of the local feature extraction module MSFM in the encoding stage is as follows: The output features obtained through the three-layer global feature extraction module CAMM are input into the local feature extraction module MSFM as input features of the local feature extraction module MSFM. The output features obtained through the three-layer global feature extraction module CAMM are input into the local feature extraction module MSFM as input features of the local feature extraction module MSFM. spatial dimension features are extracted through the spatial multi-scale convolution: local details are captured through a small convolution kernel, mesoscale semantics are perceived through a rectangular kernel, and global context is extracted through a large convolution kernel modeling; time dimension features are extracted through the temporal multi-granularity convolution: short-time fluctuations are perceived through a small convolution kernel to capture minute-level precipitation intensity mutations, medium-time trend tracking is performed through a medium-shaped kernel to model hour-scale system movement, and long-time periodic memory is associated through a large kernel to record daily variation rules; spatial dimension features are extracted through channel concatenation and 1x1 convolution dimension reduction of four-dimensional convolution, and the spatial dimension features are extracted; The three-dimensional convolution is spliced through the channel and reduced dimension by 1x1 convolution to realize the time dimension feature extraction. spatial features with temporal features tensor multiplication fusion; Similarly, in the decoder stage, each operation of each local feature extraction module MSFM' of each layer is consistent with the local feature extraction module MSFM of each layer in the encoding stage.
2. The short-term precipitation forecast method based on the CAMS-Unet model according to claim 1, characterized in that, The preprocessing in S1 includes: S11, data set screening; S12, outlier and missing value processing; S13, denoising and data enhancement processing.
3. The short-term precipitation forecast method based on the CAMS-Unet model according to claim 2, characterized in that, The data set screening in S11 includes: Obtaining the target area and the original radar echo image data of the target area; Removing the geographic information of the target area to obtain the first radar echo image data.
4. The short-term precipitation forecast method based on the CAMS-Unet model according to claim 2, characterized in that, The outlier and missing value processing in S12 includes: Outlier processing is performed on the first radar echo image data to obtain the second radar echo image data: 1) Outlier detection is performed according to the time frame step, and the radar reflectivity abnormal fluctuation is detected frame by frame based on the time sequence; 2) If the reflectivity change rate of more than 30% of the pixels in a time frame is greater than 50 dBZ / s, it is determined to be a significant anomaly and the outlier is deleted as a whole; otherwise, it is determined to be not significant and the outlier is deleted using Mahalanobis distance: Setting a position within each boundary in the image Setting the ratio of 1-225 pixel values as a feature ; The sample mean of the features is computed separately and the covariance matrix , computed as follows: mahalanobis distance of the computed features The formula for computing is as follows: The average distance of the features is calculated respectively and the standard deviation , the calculation formula is as follows: When the Mahalanobis distance calculated value is greater than the average distance plus three times the standard deviation , it is an outlier and is removed: Missing value processing is performed on the second radar echo image data to obtain the third radar echo image data: After outlier processing, the operation is performed according to the time frame step, and the missing value proportion of all frames is calculated based on the natural day as the statistical unit: if the missing value proportion of a day is > 25%, the entire data of the day is directly removed; if the missing value proportion is < 25%, the data before and after the missing value of the radar echo image data is filled based on the inverse distance weighted interpolation method: In particular, 1) compute The Euclidean space distance between and wherein, represents the measured radar return intensity of the i adjacent observation point , represents the predicted radar return intensity of the point to be interpolated; 2) based on The Euclidean space distance between The radar echo intensity of is obtained by inverse distance weighted interpolation method. 。 5. The short-term precipitation forecast method based on the CAMS-Unet model according to claim 2, characterized in that, The denoising and data enhancement processing in S13 includes: The reflectivity factor in the third radar echo image data is converted to a radar echo intensity representation by a base 10 logarithmic transformation of the reflectivity factor to decibel form presented as follows: Based on the physical mask method, the radar echo intensity of the third radar echo image data with reflectivity factor less than 15 is set to 0, and the assignment formula is as follows: wherein representing t the radar echo intensity at the time instant; Modeling the noise distribution, and establishing three components GMM for noise pixels using the Gaussian Mixture Model (GMM), with parameters: wherein, denotes a probability density function of the th Gaussian distribution; corresponds to a ground clutter , corresponds to a transient jammer , corresponds to a system noise ; Based on the posterior probability calculation result of the GMM model, different processing is adopted for ground clutter, transient interference and system noise to achieve accurate denoising: For ground clutter, the pixels of are marked as ground clutter, and a binary mask is generated; then, the mask is closed to fill the holes, and the occluded areas are repaired based on the neighboring valid pixels by the inverse distance weighting method. For transient interference, the median value of the continuous 5 frames is used to replace the current value for the pixels marked as transient interference: In addition, the isolated points are removed, and the same kind of points in the 8-neighborhood of the transient interference pixel are less than 30% to determine the isolated interference such as flying birds, and directly set to -15 ; For system noise, non-local mean filtering is used to suppress random noise in low signal-to-noise ratio areas. wherein , the search box is .
6. The short-term precipitation forecast method based on the CAMS-Unet model according to claim 1, characterized in that, The operation process of each global feature extraction module CAMM in the encoding stage and the global feature extraction module CAMM' in the decoder stage: At the encoder stage, the input sequence The global spatio-temporal features are generated by 3D convolution, ReLU activation function and BatchNorm : global spatio-temporal features global average pooling and global max pooling operations are performed respectively: wherein, , denotes the output result of the global average pooling, denotes the output result of the global maximum pooling; The output results of global average pooling and global maximum pooling are respectively input into independent fully connected layers: wherein, denotes a ReLU activation function; performing a weighted sum operation on the dual-path outputs and generating a channel weight vector based on a sigmoid function to implement a weight fusion operation: wherein, denotes an adaptive weight coefficient, with an initial value of and is then optimized based on backpropagation; output features based on feature re-labeling : where the weights determined channels c of the reserved intensity, indicate that the rain-related channels are enhanced; Output features After the downsampling operation , a CAMM module process is completed: The above step is repeated three times, i.e. passing through three global feature extraction modules CAMM in turn, and the output features obtained each time are: wherein, represents the output feature ultimately obtained by sequentially passing through the three-layer global feature extraction module CAMM. Similarly, in the decoder stage, each operation of each global feature extraction module CAMM' of each layer is consistent with each global feature extraction module CAMM of each layer in the encoding stage, and only the up-sampling layer stage is different, and the formula is: 。 7. The short-term precipitation forecast method based on the CAMS-Unet model according to claim 1, characterized in that, The SSIM, MAE and MSE indicators are used to evaluate the performance of the CAMS-Unet model: 1) The Mean Squared Error (MSE) represents the evaluation index of the image definition generated by the target model on the data, and the smaller the value, the better the performance of the model, and the calculation formula is as follows: 2) Mean Absolute Error (MAE) is a regression model evaluation index for measuring the average absolute difference between predicted values and true values; in some specific problems, it is called a loss function, which is interpreted as the difference between the predicted value of each pixel and the true value. The smaller the value, the better the performance of the model, and the calculation formula is as follows: 3) The Structural Similarity Index Measure (SSIM) represents the evaluation index of the degree of structural similarity of the generated image of the target model on the data, and evaluates the prediction effect of the model by comparing the brightness, contrast and structural quality of the generated image and the actual image. The higher the value, the better the performance of the model, and the value range is , and the calculation formula is as follows: in, It is the actual value. It is a predicted value; yes The average value, yes The average value; yes variance yes The variance; yes and covariance; and It is a constant used to maintain stability and avoid calculation errors caused by dividing by zero. L is the dynamic range of pixel values.
Citation Information
Patent Citations
Short temporary rainfall prediction method and device
CN114139690A
Short-time rainfall prediction method based on MSPTS-Net network model
CN119516206A