Precipitation forecast correction method based on u-cs-net model

By improving the U-Net model to U-CS-Net, and utilizing channel and spatial attention mechanisms and multilayer perceptrons, combined with a loss function, the problems of sample imbalance and insufficient feature utilization in precipitation forecasting of the U-Net model are solved, thereby improving the accuracy of precipitation forecasting.

CN119830734BActive Publication Date: 2025-12-05CHANGGUANG SATELLITE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411899103.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-12-05
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

The existing U-Net model lacks the ability to distinguish the importance of features in different time phases when dealing with complex multi-temporal meteorological data, and cannot fully reflect the nonlinear relationship of meteorological elements. Furthermore, the unbalanced sample in precipitation forecasting leads to significant forecasting errors.

Method used

The U-Net model is improved to a U-CS-Net model. It learns the importance of time points by adding a channel attention mechanism (CAM), captures spatial location correlation by a spatial attention mechanism (SAM), and combines a multilayer perceptron (MLP) to enhance feature representation capabilities. It is trained using a loss function that combines mean absolute error and PR curve.

Benefits of technology

This improved the model's performance in identifying precipitation and non-precipitation events, and reduced forecast errors, especially in precipitation forecast accuracy under complex terrain and extreme weather conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830734B_ABST
    Figure CN119830734B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of meteorological forecast element correction technology. To address the technical problem of insufficient utilization of data features in existing U-Net models, which fail to fully reflect the nonlinear relationships of meteorological elements, this invention proposes a "precipitation forecast correction method based on the U-CS-Net model," comprising: Step 1, dataset construction; Step 2, in the skip connection part between the encoder and decoder of the U-Net model, adding a channel attention mechanism (CAM) to learn the importance of different time points in precipitation forecasts, adding a spatial attention mechanism (SAM) to calculate the correlation between spatial locations to generate attention weights, and adding a multilayer perceptron (MLP) to enhance the representational ability of features; Step 3, training the U-CS-Net model to obtain a regional precipitation correction model; fully extracting the correlation features between multiple elements and multiple time phases, thus realizing the correction of WRF numerical weather prediction model data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of meteorological forecast element correction technology. Background Technology

[0002] Against the backdrop of globalization and increasingly intense human activity, the impact of meteorological phenomena on key sectors such as agriculture, transportation, and energy has become increasingly prominent, making the demand for accurate weather forecasts particularly urgent. Although numerical weather prediction technology has made significant leaps and is widely used in operational weather forecasting, it still faces many challenges in handling certain complex local meteorological events. Particularly in precipitation correction, due to the uneven spatial distribution, dramatic temporal variations, and significant local characteristics of precipitation, the forecast errors of numerical models are often more pronounced, especially under complex terrain or extreme weather conditions.

[0003] Deep learning is a derivative of machine learning, featuring a multi-layered structure that extracts hierarchical deep features from initial features through layer-by-layer transformation. The U-Net model is a fully convolutional neural network (FCN) in deep learning, and it has gradually become the most widely used deep learning model in atmospheric science research. It consists of an encoder and a decoder. The encoder extracts features by downsampling layer by layer, while the decoder restores resolution by upsampling layer by layer. Features from corresponding layers of the encoder and decoder are then fused through skip connections.

[0004] However, when dealing with complex multi-temporal meteorological data, the U-Net model lacks the ability to distinguish the importance of features of different temporal data, has limited ability to capture the correlation between spatial locations, and is insufficient in its feature representation ability to fully reflect the nonlinear relationship of meteorological elements. It cannot make full use of the spatial and temporal characteristics of the data, and the sample is unbalanced in precipitation forecast. Summary of the Invention

[0005] To address the technical problem that existing U-Net models do not fully utilize data features and cannot adequately reflect the nonlinear relationships of meteorological elements, this invention improves the U-Net model and proposes a "precipitation forecast correction method based on the U-CS-Net model".

[0006] Precipitation forecast correction method based on U-CS-Net model, such as Figure 1 As shown, it includes the following steps:

[0007] Step 1: Dataset Construction: Obtain precipitation data output from the WRF model as the data to be corrected, various meteorological elements in ERA5 as auxiliary data, and ERA5-Land as the real data to form a dataset. Perform data preprocessing on the data to be corrected and the auxiliary data.

[0008] Step 2: Construct the U-CS-Net model: In the skip connection part between the encoder and decoder of the U-Net model, add a channel attention mechanism (CAM) to learn the importance of different time points in precipitation forecasting, add a spatial attention mechanism (SAM) to calculate the correlation between spatial locations to generate attention weights, and add a multilayer perceptron (MLP) to enhance the representation ability of features.

[0009] CAM generates the Query matrix, Key matrix, and Value matrix for each time channel through a fully connected layer. It obtains the correlation between time channels by calculating the dot product between the Query matrix and the Key matrix, and generates normalized attention weights through the Softmax function. The attention weights are then weighted on the Value matrix.

[0010] SAM treats each spatial location in the matrix output by CAM as a Query matrix, Key matrix, and Value matrix, calculates the correlation between spatial locations to generate attention weights, generates normalized attention weights through the Softmax function, amplifies important spatial location features, and generates weighted features by multiplying the attention weights with the original feature matrix to enhance the U-CS-Net model's ability to capture complex spatial information.

[0011] The output features of SAM are input into MLP, first flattened into a one-dimensional vector, and then processed through multiple fully connected layers. After the output of each layer, MLP performs regularization through Dropout. At the same time, residual connections are added to the MLP structure to add the input features to the output of each layer and then combine them with the output of the decoder.

[0012] Step 3: U-CS-Net Model Training: The dataset obtained in Step 1 is trained using the U-CS-Net model constructed in Step 2. A loss function combining Mean Absolute Error (MAE) and Precipitation Reduction (PR) curves (Loss) is used to obtain the regional precipitation correction model.

[0013] Where n is the time length of the data, y i It is the actual value for the i-th hour. It is the predicted value for the i-th hour;

[0014] The PR curve consists of precision and recall. Where TP is the number of true positives, FP is the number of false positives, and FN is the number of false negatives.

[0015]

[0016] Therefore, the loss function is Loss = αMAE + (1-α)PR, where α is a weighting parameter used to control the contribution ratio of MAR and PR in the loss function. Finally, the data to be corrected and the auxiliary data are input into the regional precipitation correction model for processing to generate the final forecast correction data.

[0017] Technical effects:

[0018] To address the technical problem that most correction algorithms and existing U-Net models cannot fully utilize the spatial and temporal features of data, this invention uses a channel attention mechanism to extract the temporal features of the data, learning the importance of different time points in precipitation forecasting. It also uses a spatial attention mechanism to extract the spatial features of the data, learning the importance of different spatial points in precipitation forecasting. This fully extracts the correlation features between multiple elements and multiple time phases, achieving the correction of WRF numerical weather prediction model data. Furthermore, to address the problem of sample imbalance in precipitation forecasting, a loss function combining mean absolute error and PR curves is used to improve the model's performance in identifying precipitation and absence.

[0019] To make the precipitation forecast correction effect of this invention more intuitive, Northeast China (38.61°~53.51°N, 118.83°~135.13°E) was selected as an example. This region has a large latitudinal span and has a variety of terrains such as mountains and plains. The precipitation correction model for Northeast China was trained to correct the hourly precipitation data predicted by the WRF model, and compared with the 24-hour precipitation data of ERA5-Land reanalysis data, which is the real data. At the same time, the existing U-Net model was also introduced as a comparison model.

[0020] like Figure 3 and 4As shown in the figures, the root mean square error (RMSE) and bias are used as evaluation parameters. The RMSE of hourly precipitation data predicted by the WRF model before correction was 0.103. After correction using the U-Net model, the RMSE remained at 0.103, while the RMSE decreased to 0.087 after correction using the U-CS-Net model of this invention. The bias of hourly precipitation data predicted by the WRF model before correction was -0.006. After correction using the U-Net model, the bias was 0.004, while the bias increased to 0.002 after correction using the U-CS-Net model of this invention. This indicates a significant improvement in the accuracy of precipitation predictions after correction using the U-CS-Net model. The figures also illustrate that the U-CS-Net precipitation data correction algorithm proposed in this invention can fully extract the correlation features between multiple elements and multiple time phases, achieving the correction of WRF numerical weather prediction model data. Furthermore, the correction effect is superior to that of ordinary U-Net, and the data error is reduced after correction, making it a preferred method for error correction in meteorological numerical forecasts. Attached Figure Description

[0021] Figure 1 This is a flowchart of the overall process of this invention.

[0022] Figure 2 This is a schematic diagram of the U-CS-Net model.

[0023] Figure 3 This is a schematic diagram of the RMSE evaluation results before and after correction by the U-Net model and the U-CS-Net model in the example.

[0024] Figure 4 This is a schematic diagram of the bias evaluation results before and after correction by the U-Net model and U-CS-Net model in the example. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art without creative effort using the embodiments of the present invention are within the scope of protection of the present invention.

[0026] In step 1, data preprocessing is performed on the data to be corrected and the auxiliary data, including spatial alignment, missing value handling, and standardization: bilinear interpolation is used to uniformly adjust the data to be corrected and the auxiliary data to a resolution of 0.09° in space to ensure consistency in data comparison and analysis; NaN values ​​are converted to 0; in addition, to prevent certain factors from dominating the model training process, Z-Score standardization is used to standardize the data.

[0027] After data preprocessing, multi-temporal and multi-element input data are generated for the data to be corrected and the auxiliary data. In the time dimension, a 24×24×X×Y input data is constructed with 1-hour intervals and 24-hour periods as a time period, where X and Y are the latitude and longitude of the input data, respectively. In the time dimension, the real data is constructed with 1-hour intervals and 24-hour periods as a time period, a 24×X'×Y' multi-temporal true value data is generated, where X' and Y' are the latitude and longitude of the forecast correction data.

[0028] Furthermore, various meteorological elements in ERA5 are used as auxiliary data, including U-wind and V-wind at 10 meters altitude, dew point temperature at 2 meters altitude, temperature at 2 meters altitude, mean sea level pressure, and U-wind, V-wind, temperature, vertical velocity, specific humidity, and height field data at three isobaric layers of 200hPa, 500hPa, and 850hPa. The spatial resolution of this data is 0.25°, and the temporal resolution is hourly.

[0029] In the Channel Attention (CAM) part, the time dimension is treated as a channel, with features at each time point considered as an independent channel. First, CAM generates Query, Key, and Value matrices for each time channel through a fully connected layer. The correlation between time channels is obtained by calculating the dot product between the Query and Key matrices, representing the importance of features at a particular time point to other time points. Next, normalized attention weights are generated using the Softmax function, and these weights are then used to weight the Value matrix, amplifying important time features and weakening less important ones. Thus, the CAM model can dynamically learn the importance of different time points in precipitation forecasting.

[0030] The core principle of Spatial Attention (SAM) is similar to that of CAM, but it focuses on the spatial dimension of the input features. SAM treats each spatial location in the matrix output by CAM as a Query matrix, Key matrix, and Value matrix, and generates attention weights by calculating the correlation between spatial locations. Similar to CAM, SAM normalizes the weights using Softmax to amplify important spatial features, and generates weighted features by multiplying the attention weights with the original feature matrix to enhance the U-CS-Net model's ability to capture complex spatial information.

[0031] The specific processing procedure of the multilayer perceptron is as follows: The output features of the SAM are input into the MLP, first flattened into a one-dimensional vector, and then processed through multiple fully connected layers. After the output of each layer, the MLP performs regularization through Dropout to reduce the risk of overfitting. At the same time, to further enhance the fluidity of the features, residual connections are added to the MLP structure. By adding the input features to the output of each layer, the residual connections ensure that information is effectively propagated in the network, mitigating the gradient vanishing problem. Finally, the features processed by the MLP are combined with the output of the decoder.

[0032] Furthermore, terrain data, along with other features, can be added to the matrix output by CAM. Figure 1 The data is then fused into SAM to further enhance the model's ability to capture spatial features. The elevation data is expanded to the same resolution as other feature maps through interpolation.

[0033] The loss function is Loss = αMAE + (1-α)PR, where α ranges from [0,1]. Since there are far more instances of no precipitation than precipitation in the precipitation prediction data, the PR curve, as an indicator of imbalanced datasets for evaluating classification models, can effectively help the model improve its performance in identifying precipitation and no precipitation events. In the early stages of the model, it will rely more on regression loss, focusing primarily on minimizing numerical error. As the model trains and its performance gradually stabilizes, the weight of regression loss will gradually decrease, while the weight of PR loss will gradually increase to improve the model's classification performance. As the number of training iterations increases, the weight parameter α gradually decreases.

[0034] To further improve computational efficiency and model robustness, the network was batch trained with a batch size of 1, an initial learning rate r of 0.001, and a total of 200 training iterations. The validation set score was calculated once per iteration. Finally, the model with the highest validation set score was selected and transferred to the test set for correction and score calculation.

[0035] Furthermore, the entire training process of the U-CS-Net model uses a GPU server with an NVIDIA GeForce RTX 3090 GPU chip and 24GB of memory.

[0036] All content not described in detail in this specification belongs to the prior art known to those skilled in the art. Furthermore, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A precipitation forecast correction method based on the U-CS-Net model, characterized in that, Includes the following steps: Step 1: Dataset Construction: Obtain precipitation data output from WRF model as data to be corrected, various meteorological elements in ERA5 as auxiliary data, and ERA5-Land as real data to form a dataset. Perform data preprocessing on the data to be corrected and the auxiliary data, and then create multi-temporal and multi-element input data for the data to be corrected and the auxiliary data. Step 2: Construct the U-CS-Net model: In the skip connection part between the encoder and decoder of the U-Net model, add a channel attention mechanism (CAM) to learn the importance of different time points in precipitation forecasting, add a spatial attention mechanism (SAM) to calculate the correlation between spatial locations to generate attention weights, and add a multilayer perceptron (MLP) to enhance the representation ability of features. CAM generates the Query matrix, Key matrix, and Value matrix for each time channel through a fully connected layer. It obtains the correlation between time channels by calculating the dot product between the Query matrix and the Key matrix, and generates normalized attention weights through the Softmax function. The attention weights are then weighted on the Value matrix. SAM treats each spatial location in the matrix output by CAM as a Query matrix, Key matrix, and Value matrix, calculates the correlation between spatial locations to generate attention weights, generates normalized attention weights through the Softmax function, and generates weighted features by multiplying the attention weights with the original feature matrix. The output features of SAM are input into MLP, first flattened into a one-dimensional vector, and then processed through multiple fully connected layers. After the output of each layer, MLP performs regularization through Dropout. At the same time, residual connections are added to the MLP structure to add the input features to the output of each layer and then combine them with the output of the decoder. Step 3: U-CS-Net Model Training: The dataset obtained in Step 1 is trained using the U-CS-Net model constructed in Step 2. A loss function combining Mean Absolute Error (MAE) and Precipitation Reduction (PR) curves (Loss) is used to obtain the regional precipitation correction model. Where n is the time length of the data, y i It is the actual value for the i-th hour. It is the predicted value for the i-th hour; The PR curve consists of precision and recall. Where TP is the number of true positives, FP is the number of false positives, and FN is the number of false negatives. Therefore, the loss function is Loss = αMAE + (1-α)PR, where α is a weighting parameter used to control the contribution ratio of MAR and PR in the loss function. Finally, the data to be corrected and the auxiliary data are input into the regional precipitation correction model for processing to generate the final forecast correction data.

2. The precipitation forecast correction method based on the U-CS-Net model according to claim 1, characterized in that, In step 1, data preprocessing is performed on the data to be corrected and the auxiliary data, including spatial alignment, missing value handling, and standardization: bilinear interpolation is used to uniformly adjust the data to be corrected and the auxiliary data to a resolution of 0.09° in space; NaN values ​​are converted to 0; and Z-Score standardization is used to standardize the data. Subsequently, multi-temporal and multi-element input data were generated for the data to be corrected and the auxiliary data. In the time dimension, a 24×24×X×Y input data was constructed with 1-hour intervals and 24-hour periods as a time period, where X and Y are the latitude and longitude of the input data, respectively. In the time dimension, the real data was constructed with 1-hour intervals and 24-hour periods as a time period, a 24×X'×Y' multi-temporal true value data was generated, where X' and Y' are the latitude and longitude of the forecast correction data.

3. The precipitation forecast correction method based on the U-CS-Net model according to claim 2, characterized in that, The auxiliary data includes U-wind and V-wind at a height of 10 meters, dew point temperature at a height of 2 meters, temperature at a height of 2 meters, mean sea level pressure, and U-wind, V-wind, temperature, vertical velocity, specific humidity, and height field data at three isobaric layers of 200hPa, 500hPa, and 850hPa. The spatial resolution of this data is 0.09°, and the temporal resolution is in hours.

4. The precipitation forecast correction method based on the U-CS-Net model according to claim 1, characterized in that, Terrain data is added to the matrix output by CAM and fused with other feature maps into SAM. Elevation data is expanded to the same resolution as other feature maps through interpolation.

5. The precipitation forecast correction method based on the U-CS-Net model according to claim 1, characterized in that, In step 3, the U-CS-Net model is trained in batches with a batch size of 1. The initial learning rate r is set to 0.001, and the total number of training iterations is 200. The validation set score is calculated once per iteration. Finally, the model with the highest validation set score is selected and transferred to the test set for correction and score calculation.

6. The precipitation forecast correction method based on the U-CS-Net model according to claim 5, characterized in that, The entire training process of the U-CS-Net model uses a GPU server with an NVIDIA GeForce RTX 3090 GPU chip and 24GB of memory.

Citation Information

Patent Citations

  • Mode rainfall forecast correction method based on deep learning and wind cloud satellite

    CN116840941A

  • LGU-Net meteorological element correction system and temperature forecast correction method

    CN118962861A