Rainfall forecast correction method based on U-CS-Net model

By introducing channel attention mechanism and spatial attention mechanism into the U-Net model, combining multi-layer perceptron and residual connection, the U-CS-Net model of the precipitation forecast model is improved, solving the shortcomings of the existing models when processing complex multi-phase meteorological data, and significantly improving the accuracy of precipitation forecast.

CN119830734AActive Publication Date: 2025-04-15CHANGGUANG SATELLITE TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

When processing complex multi-phase meteorological data, the existing U-Net model lacks the distinction between the characteristics of different phase data, the correlation capture ability between spatial positions is limited, and the nonlinear relationship of meteorological elements cannot be fully reflected, resulting in uneven sample samples in precipitation forecasts.

Method used

Improve the U-Net model, increase the channel attention mechanism (CAM) and spatial attention mechanism (SAM), enhance feature representation ability by learning the importance of different time points and spatial locations, and combine multi-layer perceptron (MLP) and residual connections to improve the capture ability of the model.

Benefits of technology

Through the proposed U-CS-Net model, the spatial and timing characteristics of the data can be used more effectively, and the understanding and reflection of the nonlinear relationships of meteorological elements can be improved, which significantly improves the accuracy of precipitation forecasts, especially in complex terrain and extreme weather conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830734A_ABST
    Figure CN119830734A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of meteorological forecast element correction, and provides a rainfall forecast correction method based on a U-CS-Net model in order to solve the technical problems that data features of an existing U-Net model are not fully utilized and the nonlinear relation of meteorological elements cannot be fully reflected, the rainfall forecast correction method based on the U-CS-Net model comprises the steps that 1, a data set is constructed; step 2, adding a channel attention mechanism (CAM) for learning importance of different time points in rainfall forecast in a jump connection part between an encoder and a decoder of the U-Net model, adding a space attention mechanism (SAM) for calculating correlation between space positions to generate attention weight, and adding a multi-layer perceptron (MLP) for enhancing representation capability of features; 3, training the U-CS-Net model to obtain a regional precipitation correction model; and related characteristics among multiple elements and multiple time phases are fully extracted, and correction of WRF numerical weather forecast mode data is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of meteorological forecast element correction. Background Art

[0002] Against the backdrop of globalization and increasing human activities, the impact of meteorological phenomena on key areas such as agriculture, transportation, and energy has become increasingly prominent, and the need for accurate weather forecasts has become particularly urgent. Although numerical weather forecasting technology has achieved significant leaps and is widely used in weather forecasting operations, it still faces many challenges in dealing with certain complex local meteorological events. In particular, in terms of precipitation correction, due to the uneven spatial distribution of precipitation, drastic temporal changes, and its significant local characteristics, the forecast errors of numerical models are often more significant, and this problem is particularly prominent in complex terrain or extreme weather conditions.

[0003] Deep learning is a derivative form of machine learning with a multi-layer structure. It obtains 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. 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, and the decoder restores the resolution by upsampling layer by layer. The features of the corresponding layers of the encoder and decoder are fused through jump connections.

[0004] However, when processing complex multi-temporal meteorological data, the above-mentioned U-Net model lacks the ability to distinguish the importance of features of data in different temporal phases, has limited ability to capture the correlation between spatial positions, and is not capable of fully reflecting the nonlinear relationship between meteorological elements in terms of feature representation. It is unable to fully utilize the spatial and temporal characteristics of the data, and the samples in precipitation forecasts are also unbalanced. Summary of the invention

[0005] In order to solve the technical problem that the existing U-Net model does not fully utilize the data features and cannot fully reflect the nonlinear relationship between meteorological elements, the present invention improves the U-Net model and proposes a "precipitation forecast correction method based on U-CS-Net model".

[0006] The precipitation forecast correction method based on the U-CS-Net model, such as Figure 1 As shown, the following steps are included:

[0007] Step 1, data set construction: obtain the precipitation data output by the WRF model as the data to be corrected, various meteorological elements in ERA5 as auxiliary data, and ERA5-Land as real data to form a data set, and perform data preprocessing on the data to be corrected and the auxiliary data;

[0008] Step 2: Build the U-CS-Net model: In the jump connection part between the encoder and decoder of the U-Net model, add the channel attention mechanism CAM to learn the importance of different time points in precipitation forecasting, add the spatial attention mechanism SAM to calculate the correlation between spatial positions to generate attention weights, and add the multi-layer perceptron MLP to enhance the representation ability of features;

[0009] CAM generates the Query matrix, Key matrix, and Value matrix of each time channel through the fully connected layer. The correlation between the time channels is obtained by calculating the dot product between the Query matrix and the Key matrix. The normalized attention weight is generated through the Softmax function, and the attention weight is used to weight the Value matrix.

[0010] SAM regards each spatial position in the matrix output by CAM as the Query matrix, Key matrix and Value matrix, calculates the correlation between spatial positions to generate attention weights, generates normalized attention weights through the Softmax function, amplifies important spatial position 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 is regularized by 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 U-CS-Net model constructed in step 2 is used to train the data set obtained in step 1. The loss function Loss, which combines the mean absolute error (MAE) and the PR curve, is used to obtain the regional precipitation correction model.

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

[0014] The PR curve is composed of precision and recall. Among them, TP is the number of true positive examples, FP is the number of false positive examples, and FN is the number of false negative examples.

[0015]

[0016] Therefore, the loss function Loss = αMAE + (1-α)PR, where α is a weight 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] In view of the technical problem that most correction algorithms and existing U-Net models cannot fully utilize the spatial and temporal characteristics of data, the present invention uses a channel attention mechanism to extract the temporal characteristics of data, learns the importance of different time points in precipitation forecasting, uses a spatial attention mechanism to extract the spatial characteristics of data, learns the importance of different spatial points in precipitation forecasting, fully extracts the relevant features between multiple factors and multiple time phases, and realizes the correction of WRF numerical meteorological forecast model data; in view of the problem of sample imbalance in precipitation forecasting, a loss function combining mean absolute error and PR curve is used to improve the performance of the model in identifying precipitation and no precipitation.

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

[0020] like Figure 3 and 4As shown, the root mean square error RMSE and bias Bias are used as evaluation parameters, wherein the RMSE of precipitation data predicted hourly by the WRF model before correction is 0.103, and the RMSE after correction using the U-Net model remains at 0.103, while the RMSE after correction using the U-CS-Net model of the present invention is reduced to 0.087; the Bias of precipitation data predicted hourly by the WRF model before correction is -0.006, and the Bias after correction using the U-Net model is 0.004, while the Bias after correction using the U-CS-Net model of the present invention is increased to 0.002, indicating that the accuracy of precipitation prediction after correction using the U-CS-Net model has been significantly improved. It can be illustrated by the above-mentioned accompanying drawings that the U-CS-Net precipitation data correction algorithm proposed by the present invention can fully extract the relevant features between multiple factors and multiple phases, realize the correction of the WRF numerical meteorological forecast model data, and the correction effect is better than that of the ordinary U-Net, and the data error after correction is reduced, which can be used as the preferred method for error correction of meteorological numerical forecasts. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is the overall flow chart of the present invention.

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

[0023] Figure 3 It is a schematic diagram of the RMSE evaluation results of the embodiment before average hourly correction and after correction by the U-Net model and the U-CS-Net model.

[0024] Figure 4 It is a schematic diagram of the average hourly Bias evaluation results of the embodiment before correction and after correction by the U-Net model and the U-CS-Net model. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by ordinary technicians in the field without creative work by adopting the embodiments of the present invention are within the scope of protection of the present invention.

[0026] In step 1, the data to be corrected and the auxiliary data are preprocessed, including spatial alignment, missing value processing, and standardization. The bilinear interpolation method is used to uniformly adjust the data to a resolution of 0.09° in space to ensure the consistency of the data during comparison and analysis. The NaN value is converted to 0. In addition, in order to prevent certain elements from dominating the model training process, the Z-Score standardization method is used to standardize the data.

[0027] After data preprocessing, multi-phase and multi-factor input data are produced for the data to be corrected and the auxiliary data. In the time dimension, 1 hour is used as an interval and 24 hours is used as a time period to construct a 24×24×X×Y input data, where X and Y are the longitude and latitude of the input data respectively; in the time dimension, the real data is used as a time interval of 1 hour and 24 hours is used as a time period to construct a 24×X'×Y' multi-phase true value data, where X' and Y' are the longitude and latitude of the forecast correction data.

[0028] Furthermore, various meteorological elements in ERA5 are used as auxiliary data, including 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 speed, specific humidity, and height field data of three isobaric layers of 200hPa, 500hPa and 850hPa. The spatial resolution of the data is 0.25° and the temporal resolution is hourly.

[0029] In the channel attention CAM part, the time dimension is processed as a channel, and the features of each time point are regarded as an independent channel. First, CAM generates the Query, Key, and Value matrices of each time channel through the fully connected layer, and calculates the dot product between the Query matrix and the Key matrix to obtain the correlation between the time channels, that is, the importance of the features of a certain time point to other time points. Then, the normalized attention weights are generated through the Softmax function, and these weights are used to weight the Value matrix to amplify important time features and weaken minor time features. Therefore, 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 CAM, but it focuses on the spatial dimension of the input features. SAM regards each spatial position in the matrix output by CAM as the query matrix, key matrix and value matrix, and generates attention weights by calculating the correlation between spatial positions. Similar to CAM, SAM normalizes the weights through Softmax, amplifies important spatial position 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 process of the multi-layer perceptron is as follows: the output features of 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 is regularized by Dropout to reduce the risk of overfitting. At the same time, in order 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 connection ensures that the information is effectively propagated in the network, alleviating the problem of gradient disappearance. Finally, the features processed by the MLP will be combined with the output of the decoder.

[0032] Furthermore, terrain data can be added to the matrix output by CAM, along with other features. Figure 1 The two maps are 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 Loss = αMAE + (1-α)PR, where α ranges from [0,1]. Since there are far more cases of no precipitation than cases of precipitation in precipitation forecast data, the PR curve, as an indicator of imbalanced data sets for classification model evaluation, can effectively help the model improve its performance in identifying precipitation and no precipitation events. At the same time, in the early stages of the model, the model will rely more on regression loss, so that the model will focus on minimizing numerical errors in the initial stage. As the model is trained and its performance gradually stabilizes, the weight of regression loss will gradually decrease, and the weight of PR loss will gradually increase to improve the model's classification performance. As the number of model training rounds increases, the weight parameter α gradually decreases.

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

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

[0036] The contents not described in detail in this specification belong to the prior art known to those skilled in the art. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A precipitation forecast correction method based on the U-CS-Net model, characterized in that: The steps include: Step 1, data set construction: obtain precipitation data output by the WRF model as the data to be corrected, various meteorological elements in ERA5 as auxiliary data, and ERA5-Land as real data to form a data set, and perform data preprocessing on the data to be corrected and the auxiliary data, and then make multi-temporal and multi-element input data for the data to be corrected and the auxiliary data; Step 2: Build the U-CS-Net model: Add the channel attention mechanism CAM to the jump connection between the encoder and decoder of the U-Net model to learn the importance of different time points in precipitation forecasting, add the spatial attention mechanism SAM to calculate the correlation between spatial positions to generate attention weights, and add the multi-layer perceptron MLP to enhance the representation ability of features; CAM generates the Query matrix, Key matrix, and Value matrix of each time channel through the fully connected layer. The correlation between the time channels is obtained by calculating the dot product between the Query matrix and the Key matrix. The normalized attention weight is generated through the Softmax function, and the attention weight is used to weight the Value matrix. SAM regards each spatial position in the matrix output by CAM as the Query matrix, Key matrix and Value matrix, calculates the correlation between spatial positions 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 is regularized by 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 U-CS-Net model constructed in step 2 is used to train the data set obtained in step 1. The loss function Loss, which combines the mean absolute error (MAE) and the PR curve, is used to obtain the regional precipitation correction model. Where n is the time length of the data, y i is the true value of the ith hour, is the predicted value for the i-th hour; The PR curve is composed of precision and recall. Among them, TP is the number of true positive examples, FP is the number of false positive examples, and FN is the number of false negative examples. Therefore, the loss function Loss = αMAE + (1-α)PR, where α is a weight 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, the data to be corrected and the auxiliary data are preprocessed, including spatial alignment, missing value processing and standardization: the bilinear interpolation method is used to uniformly adjust the data to be corrected and the auxiliary data to a resolution of 0.09° in space; the NaN value is converted to 0; the Z-Score standardization method is used to standardize the data; Then, multi-phase and multi-factor input data are produced for the data to be corrected and the auxiliary data. In the time dimension, 1 hour is used as an interval and 24 hours is used as a time period to construct a 24×24×X×Y input data, wherein X and Y are the longitude and latitude of the input data respectively; in the time dimension, the real data is used as a time interval of 1 hour and 24 hours is used as a time period to construct a 24×X'×Y' multi-phase true value data, wherein X' and Y' are the longitude and latitude of the forecast correction data.

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

4. The precipitation forecast correction method based on the U-CS-Net model according to claim 1, characterized in that: The terrain data is added to the matrix output by CAM and entered into SAM for fusion together with other feature maps. The 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: The U-CS-Net model training in step 3 is batch training processing and the batch size is set to 1. The initial learning rate r of the network is set to 0.

001. The total number of training iterations is 200. The validation set score is calculated once for each iteration. Finally, the model with the highest validation set score is selected and migrated 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 is characterized in that: The entire U-CS-Net model training process uses a GPU server, the GPU chip is NVIDIA GeForce RTX 3090, and the memory capacity is 24GB.

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

  • Deep-learning-based method for predicting residual life of aero-engine

    WO2024045377A1

Cited By

  • WRF wind speed correction method fusing land surface coverage and time period coding

    CN121389031A

  • Meteorological element forecast correction method and system based on CS-UNet model and visualization device

    CN121502353A