Precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer

By constructing the CNN-BiLSTM-At and ST-CFormer models, combined with meteorological site observation data, the problem of low accuracy in local areas of traditional precipitation forecasting methods is solved, and a higher precision precipitation forecast is achieved.

CN120334918APending Publication Date: 2025-07-18NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510745778.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing precipitation forecasting methods rely on numerical weather forecasting models, making it difficult to accurately predict the precipitation intensity and aging in local areas, and the spatio-temporal characteristics of radar precipitation images and meteorological site observation data are not fully utilized, resulting in low forecast accuracy.

Method used

The CNN-BiLSTM-At model was constructed to extract the multi-scale spatial characteristics of meteorological radar images, and the observation data of meteorological sites were corrected. The ST-CFormer model was used for secondary correction. The hyperparameters of the model were optimized through adaptive genetic algorithm and NSGA-II algorithm to enhance feature capture and accuracy.

Benefits of technology

The accuracy and efficiency of precipitation forecasts are improved, and the spatio-temporal characteristics of radar images and meteorological site data are fully utilized to achieve more accurate precipitation forecasts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334918A_ABST
    Figure CN120334918A_ABST
Patent Text Reader

Abstract

The invention discloses a rainfall forecast correction method based on CNN-BiLSTM-At and ST-CFormer. The rainfall forecast correction method comprises the following steps: acquiring a meteorological radar echo sequence image and meteorological station observation data, and preprocessing the meteorological radar echo sequence image and the meteorological station observation data; constructing a CNN-BiLSTM-At rainfall forecast model structure, training the structure by using the preprocessed meteorological radar echo sequence image, optimizing hyper-parameters by using an adaptive genetic algorithm, and obtaining a trained rainfall forecast target model; the method comprises the following steps: constructing an ST-CFormer rainfall forecast deviation correction model structure, training the ST-CFormer rainfall forecast deviation correction model structure by using data obtained by fusing a rainfall forecast image and observation data of a meteorological station, and optimizing hyper-parameters by using an NSGA-II algorithm to obtain a trained rainfall forecast deviation correction model. According to the method, secondary correction is carried out on the forecast result by utilizing meteorological station observation data and the global modeling capability of the Swindow-transformer, so that the rainfall forecast precision is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of precipitation forecasting, and particularly relates to a precipitation forecasting correction method based on CNN-BiLSTM-At and ST-CFormer. Background Art

[0002] Accurate precipitation forecasting has become increasingly important. Precipitation forecasting is not only crucial for fields such as agricultural production, urban planning, and flood management, but also directly affects the normal operation of social activities such as transportation and environmental protection. However, due to the complex occurrence process of precipitation and its high spatial and temporal uncertainty, traditional precipitation forecasting methods face great challenges.

[0003] Traditional precipitation forecasting methods mainly rely on numerical weather prediction (NWP) models. However, although NWP models have significant advantages in large-scale weather prediction, due to their sensitivity to initial conditions and the approximation of the models themselves, it is often difficult to accurately forecast the precipitation intensity and timeliness in local areas. Especially in the simulation of complex weather phenomena, the deviation and uncertainty of the models are relatively large.

[0004] In recent years, with the development of deep learning and artificial intelligence technologies, precipitation forecasting methods based on deep learning have gradually received attention. Convolutional neural networks (CNNs), recurrent neural networks (RNNs) and their variants have been widely applied in the field of precipitation forecasting. With the successful application of the Transformer model in the field of natural language processing (NLP), it has also shown excellent capabilities in the processing of images and time series data. As an improved Transformer model, Swin-Transformer has good hierarchical computing characteristics. In addition, the self-attention mechanism can effectively capture global information and long-range dependencies, overcoming the limitations of traditional RNNs in processing long sequence data. However, existing deep learning-based precipitation forecasting models do not fully exploit the spatio-temporal features of radar precipitation images and do not reasonably use meteorological observation data from meteorological stations, resulting in low forecasting accuracy. Summary of the Invention

[0005] Aiming at the problems in the prior art, the present invention proposes a precipitation forecasting correction method based on CNN-BiLSTM-At and ST-CFormer, which uses meteorological element data observed by meteorological stations to correct precipitation forecasting results, so as to improve the accuracy of precipitation forecasting.

[0006] To solve the above problems, the present invention adopts the following technical solutions:

[0007] A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer, which corrects the precipitation forecast results by using the meteorological element data observed by meteorological stations, includes the following steps:

[0008] S1. Collect meteorological data within the target time of the target area, including meteorological radar echo sequence images, measured precipitation, temperature, and wind speed data of meteorological stations within the target time of the target area; and preprocess the collected meteorological data.

[0009] S2. Construct the CNN-BiLSTM-At precipitation forecast model structure, including a multi-branch convolution module based on different-scale convolutions, an improved CSA attention module, a bidirectional long short-term memory network Bi-LSTM module, and a spatio-temporal feature fusion module; the multi-branch convolution module extracts multi-scale spatial features from the input meteorological radar image data and downsamples step by step; the improved CSA attention module and the Bi-LSTM module enhance the capture of spatial features and temporal features of the features extracted by each level of the multi-branch convolution module; the spatio-temporal feature fusion module fuses the features output by the improved CSA attention module and the Bi-LSTM module to obtain the spatio-temporal feature map of each level; upsample step by step and fuse with the spatio-temporal feature map of the same scale through skip connections, and finally generate a precipitation forecast image with the same size as the input meteorological radar image.

[0010] S3. Input the preprocessed meteorological radar echo sequence images and output the precipitation forecast images, and train the constructed CNN-BiLSTM-At precipitation forecast model structure to obtain a precipitation forecast target model.

[0011] S4. Construct the ST-CFormer precipitation forecast deviation correction model structure, including a local spatio-temporal feature extraction module, a global spatio-temporal feature extraction module, and a hybrid spatio-temporal bidirectional LSTM module; the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module extract the spatial features of the input image in parallel and downsample step by step; the hybrid spatio-temporal bidirectional LSTM module matches and fuses the features output by the local spatio-temporal feature extraction module and the features output by the global spatio-temporal feature extraction module, and upsamples step by step, and finally generates a precipitation forecast correction image with the same size as the input precipitation forecast image.

[0012] S5. Input the image data after fusing the precipitation forecast image output by S3 with the preprocessed measured precipitation, temperature, and wind speed data, and output the precipitation forecast correction image, and train the ST-CFormer precipitation forecast deviation correction model structure to obtain a precipitation forecast deviation correction model.

[0013] S6. Input the meteorological radar echo sequence image data of the target prediction area into the precipitation prediction target model to obtain a precipitation forecast image; after fusing the precipitation forecast image with the measured different meteorological elements such as precipitation, temperature, and wind speed data of the target prediction area, input it into the precipitation forecast deviation correction model to obtain a precipitation forecast corrected image.

[0014] Further, organize each frame of the meteorological radar echo sequence image in the meteorological data collected in step S1 into two-dimensional data, and use the set A ∈ {x1y1, x1y2, … x1y j ; …; x i y1, x i y2 … x i y j} to represent, where j and i are the row and column indexes of the pixels in each frame of the meteorological radar echo sequence image, x i represents the horizontal coordinate of the pixels in the i-th column of the image, and y j represents the vertical coordinate of the pixels in the j-th row of the image; the measured precipitation, temperature, and wind speed meteorological element data of the meteorological station are also organized into two-dimensional data, which are represented as sets B, C, and D respectively.

[0015] Further, preprocess the organized meteorological data, including aligning the meteorological radar echo sequence image data with the measured precipitation, temperature, and wind speed data according to longitude and latitude, and performing data cleaning; use the trend surface analysis method to interpolate the missing data. Specifically:

[0016] Based on the principle of regression analysis, use the three-dimensional coordinates of longitude, latitude, and height of the meteorological radar echo sequence image to realize the trend surface analysis of precipitation, fit the ternary nonlinear function by the least squares method, and fill in the outliers and missing data in the data. The specific formula is:

[0017] Z(x, y) = a0 + a1x + a2y + a3x 2 + a4y 2 + … + a n x m y n

[0018] Among them, Z(x, y) represents the values of meteorological elements including temperature and wind speed at the spatial position (x, y); a0, a1, a2, …, a n represent the polynomial model parameters, x and y are spatial coordinates, and m and n respectively represent the highest powers of the polynomial model;

[0019] Perform normalization processing on the data after the above trend surface analysis processing. The formula is:

[0020]

[0021] Among them, Zi is the preprocessed data sequence, Z max and Z min represent the maximum and minimum values in the preprocessed data sequence respectively, and Z' i is the data sequence after normalization processing.

[0022] Furthermore, the specific structure of the CNN - BiLSTM - At precipitation forecasting model constructed in step S2 is as follows: It includes multi - branch convolution modules in multiple levels connected in series and cross - level spatio - temporal feature fusion modules, and the multi - branch convolution modules and spatio - temporal feature fusion modules at each level are symmetrically distributed. After each multi - branch convolution module, an improved CSA attention module and a Bi - LSTM module are inserted in parallel; the multi - branch convolution module includes convolution layers and normalization layers with different scales. The multi - scale features are extracted by the multi - branch convolution module and downsampled level by level. The features extracted by each multi - branch convolution module are respectively input into the improved CSA attention module and the Bi - LSTM module. Each spatio - temporal feature fusion module fuses the features output by the corresponding improved CSA attention module and Bi - LSTM module at each level to obtain spatio - temporal feature maps at each level, upsamples them level by level, and fuses them with the spatio - temporal feature maps of the same scale through skip connections.

[0023] Furthermore, the process of obtaining the precipitation forecasting image using the CNN - BiLSTM - At precipitation forecasting model structure constructed in step S2 is as follows:

[0024] S2.1 The multi - branch convolution module performs multi - scale feature extraction on the input meteorological radar echo sequence image; and downsamples layer by layer through the pooling layer to fully extract the multi - scale features of the input meteorological radar echo sequence image;

[0025] S2.2 The improved CSA attention module and the Bi - LSTM module are used to enhance the spatial features and temporal features of the multi - scale features extracted by each multi - branch convolution module; the improved CSA attention module includes a channel attention mechanism and a spatial attention mechanism. The channel attention generates channel attention weights through global average pooling, and the spatial attention generates spatial attention weights through convolution in the X and Y directions respectively. The channel attention weights and spatial attention weights are fused with the multi - scale features extracted by the multi - branch convolution module to enhance the expression of the spatial features of the multi - scale features extracted by the multi - branch convolution module; the Bi - LSTM module is used to further capture the temporal features of the multi - scale features extracted by the multi - branch convolution module;

[0026] S2.3 The spatio - temporal feature fusion module fuses the features output by the improved CSA attention module and the Bi - LSTM module to obtain spatio - temporal feature maps at each level; starting from the spatio - temporal feature map with the smallest size, upsample level by level and fuse with the spatio - temporal feature maps of the same scale through skip connections, and finally output a precipitation forecasting image with the same size as the input meteorological radar echo sequence image.

[0027] Further, during the training process, an improved adaptive genetic algorithm is used to optimize the hyperparameters of the CNN-BiLSTM-At precipitation forecasting model structure, such as the learning rate, batch size, convolution kernel size, and time step; the adaptive genetic algorithm selects the result with the highest accuracy closest to the true value for crossover and mutation each time; to avoid the prediction result falling into a local optimum, a population density function is introduced to adaptively adjust the crossover operator and mutation operator. The expression of the population density function is:

[0028]

[0029] In the formula, r represents the population density, represents the average fitness of the population, and f j represents the fitness of the chromosome;

[0030] To improve the forecasting efficiency and accuracy of the precipitation forecasting model structure, the crossover probability P c and the mutation probability P m are changed according to the population iteration times and individual fitness. The calculation formulas are:

[0031]

[0032] In the formula, and are the upper and lower bounds of the maximum and minimum crossover probabilities respectively, are the upper and lower bounds of the maximum and minimum mutation probabilities, is the maximum fitness of the two crossover parties, f max is the maximum fitness value in the population, f m is the fitness of the mutated individual, f a is the average fitness of the current population, g is the iteration number, and G represents the maximum iteration number of the population;

[0033] Each individual in the population represents a set of hyperparameter settings. The hyperparameter settings are iteratively updated through genetic operations of selection, crossover, and mutation until the maximum iteration number is reached.

[0034] Further, the structure of the ST-CFormer precipitation forecast deviation correction model constructed in step S4 is specifically as follows: it includes a parallel multi-stage serial local spatiotemporal feature extraction module, a multi-stage serial global spatiotemporal feature extraction module and a cross-level hybrid spatiotemporal bidirectional LSTM module; the local spatiotemporal feature extraction module is composed of a multi-branch convolution module and an improved CSA attention module in series, the global spatiotemporal feature extraction module is composed of a Swin-Transformer module and a non-local attention module in series, the hybrid spatiotemporal bidirectional LSTM module is composed of a feature fusion module and a bidirectional long short-term memory network Bi-LSTM module in series, and the input and output of the bidirectional long short-term memory network Bi-LSTM module are residually connected;

[0035] The local spatiotemporal feature extraction modules and the global spatiotemporal feature extraction modules at each level extract the input image features in parallel and downsample them step by step. The hybrid spatiotemporal bidirectional LSTM modules at the corresponding levels fuse the features output by the local spatiotemporal feature extraction modules and the global spatiotemporal feature extraction modules to obtain spatiotemporal feature maps at each level, upsample them step by step, and fuse the spatiotemporal feature maps of the same scale through jump connections.

[0036] Furthermore, the process of obtaining the precipitation forecast correction image using the ST-CFormer precipitation forecast deviation correction model structure constructed in step S4 is as follows:

[0037] S4.1 The input image is subjected to the local spatiotemporal feature extraction module to extract spatial features, and the maximum pooling layer performs pooling operation to achieve downsampling, and the spatial features of the input image are fully extracted by downsampling layer by layer;

[0038] S4.2 At the same time, the input image is divided into small blocks, each of which is converted into a one-dimensional vector through linear embedding and input into the Swin-Transformer module. The self-attention of the segmented non-overlapping windows and the shifted windows is simultaneously calculated through the W-MSA (Window Multi-head Self-Attention) and SW-MSA (Shifted Window Multi-head Self-Attention) mechanisms to achieve information interaction between different windows and achieve the purpose of global feature extraction; then the non-local attention module is used to enhance the capture of global features; the feature map extracted by the global spatiotemporal feature extraction module is merged to match the size of the feature map obtained by the corresponding local spatiotemporal feature extraction module;

[0039] The S4.3 hybrid spatio-temporal bidirectional LSTM module matches and fuses the feature maps output by the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module, inputs the fused feature maps into the Bi-LSTM module to capture temporal features, makes a residual connection between the output of the Bi-LSTM module and the input fused feature maps, and performs upsampling for output; through skip connections, the same-scale feature maps obtained by the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module are spliced and fused; and upsampling is performed layer by layer until a precipitation forecast bias correction image with the same size as the input precipitation forecast image is output.

[0040] Furthermore, during the process of training the ST-CFormer precipitation forecast bias correction model structure in step S5, the NSGA-II algorithm is used to optimize its hyperparameters, including the following steps:

[0041] S5.1 Select the RMSE (root mean square error) and MAE (mean absolute error) of precipitation forecast as the evaluation indicators of the ST-CFormer precipitation forecast bias correction model structure;

[0042] S5.2 Determine the hyperparameters that need to be optimized for the ST-CFormer precipitation forecast bias correction model structure, such as the learning rate, regularization parameter, and training batch size; set the search space for each hyperparameter and initialize the parent population P(0);

[0043] S5.3 Sort all individuals according to the non-dominated relationship, and then use selection, crossover, and mutation operators to generate the next generation population Q(0) with a size of N;

[0044] S5.4 Merge the newly generated population Q(t) in the t-th generation with the parent population P(t) to obtain the combined population R(t), then perform fast non-dominated sorting on R(t), calculate the crowding degree, and select suitable individuals to form the new offspring population Q(t + 1); iterate the above operations in turn to find the optimal hyperparameter solution.

[0045] Furthermore, in step S5, the adaptive weighted method is used to fuse the precipitation forecast image with the preprocessed meteorological element data of precipitation, temperature, and wind speed, and the weights of each meteorological element in the model are adaptively adjusted based on the Bayesian model. The calculation formula is:

[0046]

[0047] Among them, X is the meteorological element data, θ is the model parameter such as the weights of each meteorological element data, P(θ|X) is the posterior distribution, P(X|θ) is the likelihood function, P(θ) is the prior distribution, and P(X) is the evidence, that is, the normalization constant;

[0048] The specific steps are as follows:

[0049] Step 1: Preset the prior distribution that each meteorological element follows, and assume that the weights of meteorological elements such as measured precipitation, temperature, and wind speed follow a normal distribution;

[0050] Step 2: Select a linear regression function as the likelihood function to describe the relationship between meteorological element data and model parameters;

[0051] Step 3: Use meteorological element data to update the posterior distribution by applying Bayes' theorem; the posterior distribution reflects the latest estimates of the weights of each meteorological element. For meteorological elements that have a greater impact on the forecast results, the weights are larger, that is, P(θ|X) ∝ P(X|θ)P(θ);

[0052] Step 4: Iterate the above operations, continuously and adaptively adjust the weights of each meteorological element until the optimal set of weights is found. This set of weights can accurately reflect the influence degree of each meteorological element on precipitation forecasting.

[0053] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention constructs a CNN - BiLSTM - At precipitation forecasting model structure and an ST - CFormer precipitation forecasting deviation correction model structure. The former makes full use of CNN to extract local information of meteorological images and combines channel - spatial attention mechanism to enhance CNN's understanding of radar precipitation images and more effectively explore the spatio - temporal complexity of radar images; the latter uses the measured data of meteorological stations and the global modeling ability of Swin - transformer to perform secondary correction on precipitation forecasting results, effectively improving the accuracy of precipitation forecasting. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flowchart of the method of the present invention;

[0055] Figure 2 is a schematic diagram of the overall process of the method of the present invention;

[0056] Figure 3 is a schematic diagram of the overall system structure of the present invention;

[0057] Figure 4 is a schematic diagram of the precipitation forecasting model structure of the CNN - BiLSTM - At stage of the present invention;

[0058] Figure 5 is a schematic diagram of the multi - branch convolution structure of the present invention;

[0059] Figure 6 is a schematic diagram of the CSA attention mechanism structure of the present invention;

[0060] Figure 7 is a flowchart of the improved adaptive genetic algorithm program of the present invention;

[0061] Figure 8It is a schematic diagram of the ST-CFormer precipitation forecast deviation correction model structure of the present invention;

[0062] Figure 9 It is a schematic diagram of the process of optimizing the hyperparameters of the ST-CFormer model by NSGA-II of the present invention. Specific implementation manners

[0063] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners.

[0064] As Figures 1 to 3 shown, the precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer provided by the present invention corrects the precipitation forecast results by using the meteorological element data observed by meteorological stations, and includes the following steps:

[0065] S1. Collect meteorological data within the target time of the target area, including meteorological radar echo sequence images, measured precipitation, temperature and wind speed data of meteorological stations within the target time of the target area; and preprocess the collected meteorological data;

[0066] S2. Construct a CNN-BiLSTM-At precipitation forecast model structure, including a multi-branch convolution module based on convolutions of different scales, an improved CSA attention module, a bidirectional long short-term memory network Bi-LSTM module, and a spatio-temporal feature fusion module; the multi-branch convolution module performs multi-scale spatial feature extraction on the input meteorological radar image data and down-samples it step by step; the improved CSA attention module and the Bi-LSTM module enhance the capture of spatial features and temporal features of the features extracted by each level of the multi-branch convolution module; the spatio-temporal feature fusion module fuses the features output by the improved CSA attention module and the Bi-LSTM module to obtain spatio-temporal feature maps at each level; upsample step by step and fuse with the spatio-temporal feature maps of the same scale through skip connections, and finally generate a precipitation forecast image with the same size as the input meteorological radar image;

[0067] S3. Use the preprocessed meteorological radar echo sequence images as the input and the precipitation forecast images as the output to train the constructed CNN-BiLSTM-At precipitation forecast model structure to obtain a precipitation forecast target model;

[0068] S4. Construct the ST-CFormer precipitation forecast deviation correction model structure, including the local spatiotemporal feature extraction module, the global spatiotemporal feature extraction module, and the hybrid spatiotemporal bidirectional LSTM module; the local spatiotemporal feature extraction module and the global spatiotemporal feature extraction module extract the spatial features of the input image in parallel, and downsample step by step; the hybrid spatiotemporal bidirectional LSTM module matches and fuses the features output by the local spatiotemporal feature extraction module with the features output by the global spatiotemporal feature extraction module, and upsamples step by step, and finally generates a precipitation forecast correction image with the same size as the input precipitation forecast image;

[0069] S5, taking the precipitation forecast image output by S3 and the image data obtained by fusing the measured precipitation, temperature and wind speed data after preprocessing as input, taking the precipitation forecast correction image as output, training the ST-CFormer precipitation forecast deviation correction model structure, and obtaining the precipitation forecast deviation correction model;

[0070] S6. Input the meteorological radar echo sequence image data of the target prediction area into the precipitation prediction target model to obtain a precipitation forecast image; fuse the precipitation forecast image with the measured different meteorological elements of the target prediction area such as precipitation, temperature, and wind speed data, and input them into the precipitation forecast deviation correction model to obtain a precipitation forecast corrected image.

[0071] The meteorological radar echo sequence images obtained in S1, the measured precipitation, temperature and wind speed data of the meteorological station are all framed at 5 minutes, and each frame of the image is organized into two-dimensional data; for the meteorological radar echo sequence images, each frame of the image is represented by the set A∈{x1y1,x1y2,…x1y j ;…;x i y1,x i y2…x i y j}, where j and i are the row and column indices of pixels in each frame of meteorological radar echo sequence image, and x i Represents the horizontal coordinate of the pixel in the i-th column of the image, y j Represents the vertical coordinate of the pixel in the jth row in the image; the two-dimensional data of each frame of the meteorological element data of measured precipitation, temperature and wind speed at the meteorological station are represented by sets B, C, and D respectively.

[0072] Furthermore, the sorted meteorological data is preprocessed, including aligning the meteorological radar echo sequence image data with the measured precipitation, temperature and wind speed data according to longitude and latitude, and cleaning the data to remove outliers and duplicate data; the trend surface analysis method is used to interpolate the missing data, specifically:

[0073] Based on the principle of regression analysis, the trend surface analysis of precipitation is realized using the three-dimensional coordinates of longitude, latitude, and altitude of radar images. The least squares method is used to fit the ternary nonlinear function, and based on the following polynomial formula, the outliers and missing data in the data are filled in:

[0074] Z(x,y) = a0 + a1x + a2y + a3x 2 + a4y 2 + … + a n x m y n

[0075] Among them, Z(x,y) represents the function value at the spatial position (x, y), including temperature and wind speed; a0, a1, a2, …, a n represents the polynomial model parameters, x and y are spatial coordinates, and m and n respectively represent the highest powers of the polynomial model;

[0076] After the above trend surface analysis and processing of the data, normalization processing is performed, and the formula is:

[0077]

[0078] Among them, Z i is the data sequence after preprocessing, Z max and Z min respectively represent the maximum and minimum values in the data sequence after preprocessing, and Z' i is the data sequence after normalization processing.

[0079] As Figure 4 shown, the process of obtaining the precipitation forecast image using the CNN-BiLSTM-At precipitation forecast model structure constructed in step S2 is as follows:

[0080] The multi-branch convolution module is implemented by four different-scale convolution layers of 1×1 convolution, 3×3 convolution, 5×5 convolution, and 7×7 convolution and normalization operations (as Figure 5 shown), and multi-scale feature extraction is performed on the input image by convolution layers of different scales;

[0081] The input image extracts multi-scale features through 5 layers of multi-branch convolution modules, and is downsampled layer by layer through the max pooling layer. The multi-scale features extracted by each layer of multi-branch convolution modules are respectively input into the CSA attention module and the Bi-LSTM module to obtain the enhanced multi-scale feature maps and temporal sequence feature maps of each layer. The spatio-temporal feature fusion module fuses the enhanced multi-scale feature maps and temporal sequence feature maps to obtain the spatio-temporal feature maps of each layer; starting from the spatio-temporal feature map with the smallest size, upsampling is performed level by level, and fused with the spatio-temporal feature map of the same scale through skip connections, and finally a precipitation forecast image with the same size as the input meteorological radar echo sequence image is output.

[0082] In step S3, taking the preprocessed meteorological radar echo sequence image data as input, the hyperparameters of the CNN-BiLSTM-At precipitation forecasting model structure are optimized using an improved adaptive genetic algorithm, and the precipitation forecasting image is used as the output to train the constructed CNN-BiLSTM-At precipitation forecasting model structure to obtain a precipitation forecasting model.

[0083] The adaptive genetic algorithm selects the result with the highest accuracy closest to the true value for crossover and mutation each time; to avoid the prediction result falling into a local optimum, a population density function is introduced to adaptively adjust the crossover operator and mutation operator. The expression of the population density function is:

[0084]

[0085] In the formula, r represents the population density, represents the average fitness of the population, and f j represents the fitness of the chromosome;

[0086] To improve the forecasting efficiency and accuracy of the precipitation forecasting model structure, the crossover probability P c and the mutation probability P m are changed according to the population iteration times and individual fitness. The calculation formulas are:

[0087]

[0088] In the formula, and are the boundaries of the maximum and minimum crossover probabilities respectively, are the boundaries of the maximum and minimum mutation probabilities, is the maximum fitness of the two crossover parties, f max is the maximum fitness value in the population, f m is the fitness of the mutated individual, f a is the average fitness of the current population, g is the iteration times, and G represents the maximum iteration times of the population; the software program flow is as Figure 7 shown. Each individual in the population represents a set of hyperparameter settings. The hyperparameter settings are iteratively updated through genetic operations of selection, crossover, and mutation until the maximum iteration times are reached.

[0089] As shown in (a) of Figure 8 , the process of obtaining the precipitation forecasting correction image using the ST-CFormer precipitation forecasting deviation correction model structure constructed in step S4 is as follows:

[0090] The local spatio-temporal feature extraction module in S4.1 is composed of a multi-branch convolution module combined with a CSA attention mechanism, as Figure 8as shown in (b); the input image is downsampled by performing 6 layers of local spatio-temporal feature extraction and 5 max-pooling operations with a window size of 2×2 in sequence;

[0091] S4.2 The global spatio-temporal feature extraction module consists of a Swin-Transformer module and a non-local attention module, as Figure 8 shown in (d); the input image is segmented into small patches, each patch is converted into a one-dimensional vector through linear embedding and input into the Swin-Transformer module. The self-attention of the non-overlapping windows and moving windows of the segmentation is calculated simultaneously through the W-MSA and SW-MSA mechanisms to achieve information interaction between different windows and the purpose of global feature extraction; furthermore, the non-local attention module is used to enhance the capture of global features; the feature map patches extracted by the global spatio-temporal feature extraction module are merged to match the size of the feature map obtained by the corresponding local spatio-temporal feature extraction module; 4 layers of global spatio-temporal feature extraction and 3 image merges are performed in sequence;

[0092] S4.3 The hybrid spatio-temporal bidirectional LSTM module includes a feature fusion module, a bidirectional long short-term memory network Bi-LSTM module, and a residual connection, as Figure 8 shown in (c); the hybrid spatio-temporal bidirectional LSTM module matches and fuses the feature maps output by the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module, inputs the fused feature map into the Bi-LSTM module to capture temporal features, performs a residual connection between the output of the Bi-LSTM module and the input fused feature map, and upsamples the output; through skip connections, the same-scale feature maps obtained by splicing and fusing the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module are obtained; upsampling is performed four times in this way, and the output result is fused with the features extracted by the local spatio-temporal feature extraction module of the corresponding layer, and upsampling continues until a precipitation forecast deviation correction image with the same size as the input precipitation forecast image is restored.

[0093] In step S5, the data obtained by fusing the precipitation forecast image with the preprocessed precipitation, temperature, and wind speed data is used as the input, and the NSGA-II algorithm is used to optimize the hyperparameters of the ST-CFormer precipitation forecast deviation correction model structure, with the corrected precipitation forecast image as the output, and the ST-CFormer precipitation forecast deviation correction model structure is trained to obtain a precipitation forecast correction model;

[0094] The precipitation forecast image is fused with the meteorological element data of precipitation, temperature, and wind speed after preprocessing by using the adaptive weighted method, and the weights of each meteorological element are adaptively adjusted based on the Bayesian model. The calculation formula is:

[0095]

[0096] Among them, X is meteorological element data, θ is model parameters such as the weights of each meteorological element data, P(θ|X) is the posterior distribution, P(X|θ) is the likelihood function, P(θ) is the prior distribution, and P(X) is the evidence, i.e., the normalization constant;

[0097] The specific steps are as follows:

[0098] Step 1: Preset the prior distribution that each meteorological element follows, and assume that the weights of meteorological elements such as measured precipitation, temperature, and wind speed follow a normal distribution;

[0099] Step 2: Select a linear regression function as the likelihood function to describe the relationship between meteorological element data and model parameters;

[0100] Step 3: Use the meteorological element data and apply Bayes' theorem to update the posterior distribution; the posterior distribution reflects the latest estimates of the weights of each meteorological element. For meteorological elements that have a greater impact on the forecast results, the weights are larger, i.e., P(θ|X) ∝ P(X|θ)P(θ);

[0101] Step 4: Iterate the above operations, continuously and adaptively adjust the weights of each meteorological element until an optimal set of weights is found, i.e., it can accurately reflect the influence degree of each meteorological element on precipitation forecasting.

[0102] The NSGA-II algorithm is used for hyperparameter optimization, including the following steps:

[0103] S5.1: Select RMSE (Root Mean Square Error) and MAE (Mean Absolute Error) of precipitation forecasting as the evaluation indicators of the model;

[0104] S5.2: Determine the hyperparameters that need to be optimized for the model, such as the learning rate, regularization parameter, and training batch size; set a reasonable search space for the hyperparameters, e.g., learning rate range: [0.0001, 0.1], regularization parameter range: [0.001, 0.1], batch size range: [16, 128], and initialize the parent population P(0);

[0105] S5.3: The program flow of the NSGA-II algorithm for optimizing the hyperparameters of the precipitation forecasting bias correction model is as Figure 9 shown. Sort all individuals according to the non-dominated relationship, and then use selection, crossover, and mutation operators to generate the next-generation population Q(0) with a size of N;

[0106] S5.4: Combine the newly generated population Q(t) in the t-th generation with the parent population P(t) to obtain the combined population R(t), then perform a fast non-dominated sort on R(t), calculate the crowding degree, and select suitable individuals to form a new offspring population Q(t + 1); iterate the above operations in turn to find an optimal set of hyperparameter solutions.

[0107] In S6, the meteorological radar data of the target prediction area is input into the precipitation prediction target model to obtain an uncorrected precipitation forecast image; the precipitation forecast image and the multi-meteorological element fusion data of the target prediction area are input into the correction model to obtain the final corrected result of the precipitation prediction.

[0108] Table 1 shows the feature map sizes and dimensions corresponding to each stage of feature extraction and feature fusion prediction of the ST-CFormer precipitation forecast deviation correction model; the size of the meteorological image after multi-element fusion input is 288×288, and the task of inputting 12-frame images and predicting the precipitation images of the next 12 frames is implemented and a second correction result is obtained.

[0109]

[0110] Table 1

[0111] The above is only a preferred specific embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the technical scope disclosed by the present invention according to the technical solution and inventive concept of the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer, which corrects precipitation forecast results by using meteorological element data observed at meteorological stations, is characterized in that, It includes the following steps: S1. Collect meteorological data within the target time in the target area, including meteorological radar echo sequence images, measured precipitation, temperature, and wind speed data at meteorological stations within the target time in the target area; and preprocess the collected meteorological data. S2. Construct a CNN-BiLSTM-At precipitation prediction model structure, including a multi-branch convolution module based on different-scale convolutions, an improved CSA attention module, a bidirectional long short-term memory network Bi-LSTM module, and a spatio-temporal feature fusion module; the multi-branch convolution module extracts multi-scale spatial features from the input meteorological radar image data and downsamples step by step; the improved CSA attention module and the Bi-LSTM module enhance the capture of spatial features and temporal features of the features extracted by each level of the multi-branch convolution module; the spatio-temporal feature fusion module fuses the features output by the improved CSA attention module and the Bi-LSTM module to obtain spatio-temporal feature maps at each level; upsample step by step and fuse with the spatio-temporal feature maps of the same scale through skip connections, and finally generate a precipitation prediction image with the same size as the input meteorological radar image. S3. Use the preprocessed meteorological radar echo sequence image as the input and the precipitation prediction image as the output to train the constructed CNN-BiLSTM-At precipitation prediction model structure to obtain a precipitation prediction target model. S4. Construct an ST-CFormer precipitation prediction bias correction model structure, including a local spatio-temporal feature extraction module, a global spatio-temporal feature extraction module, and a hybrid spatio-temporal bidirectional LSTM module; the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module extract spatial features of the input image in parallel and downsample step by step; the hybrid spatio-temporal bidirectional LSTM module matches and fuses the features output by the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module and upsamples step by step, and finally generates a precipitation prediction correction image with the same size as the input precipitation prediction image. S5. Use the image data after fusing the precipitation prediction image output in S3 with the measured precipitation, temperature, and wind speed data after preprocessing as the input and the precipitation prediction correction image as the output to train the ST-CFormer precipitation prediction bias correction model structure to obtain a precipitation prediction bias correction model. S6. Input the meteorological radar echo sequence image data of the target prediction area into the precipitation prediction target model to obtain a precipitation prediction image; input the precipitation prediction image after fusing with the measured different meteorological elements such as precipitation, temperature, and wind speed data in the target prediction area into the precipitation prediction bias correction model to obtain a precipitation prediction correction image.

2. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer according to claim 1, characterized in that Organize each frame of meteorological radar echo sequence image of the meteorological data obtained in S1 into two-dimensional data, and use the set A ∈ {x1y1, x1y2, … x1y j ; …; x i y1, x i y2 … x i y j}, where j and i are the row and column indices of the pixels in each frame of the meteorological radar echo sequence image, x i represents the horizontal coordinate of the i-th column pixel in the image, and y j represents the vertical coordinate of the j-th row pixel in the image; the meteorological element data of the measured precipitation, temperature and wind speed at the meteorological station are also organized into two-dimensional data, which are represented as sets B, C, and D respectively.

3. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer according to claim 2, characterized in that, Preprocess the sorted meteorological data, including aligning the meteorological radar echo sequence image data with the measured precipitation, temperature, and wind speed data according to longitude and latitude and performing data cleaning; use the trend surface analysis method to interpolate the missing data. Specifically: Based on the principle of regression analysis, trend surface analysis of precipitation is realized using the three-dimensional coordinates of longitude, latitude, and altitude of meteorological radar echo sequence images. The least squares method is used to fit a ternary non-linear function to fill in the outliers and missing data in the data. The specific formula is: Z(x,y) = a0 + a1x + a2y + a3x 2 + a4y 2 + … + a n x m y n Among them, Z(x, y) represents the values of meteorological elements including temperature and wind speed at the spatial position (x, y); a0, a1, a2, …, a n represent polynomial model parameters, x and y are spatial coordinates, and m and n respectively represent the highest powers of the polynomial model; The data processed by the above trend surface analysis is normalized, and the formula is: Among them, Z i is the preprocessed data sequence, Z max and Z min represent the maximum value and the minimum value in the preprocessed data sequence respectively, and Z' i is the data sequence after normalization processing.

4. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer according to claim 1, characterized in that, The specific structure of the CNN-BiLSTM-At precipitation forecasting model constructed in step S2 is as follows: It includes multi-branch convolution modules in series at multiple levels and cross-level spatio-temporal feature fusion modules, and the multi-branch convolution modules and spatio-temporal feature fusion modules at each level are symmetrically distributed. After each multi-branch convolution module, an improved CSA attention module and a Bi-LSTM module are inserted in parallel; the multi-branch convolution module includes convolution layers and normalization layers of different scales. Multi-scale features are extracted by the multi-branch convolution module and downsampled level by level. The features extracted by each multi-branch convolution module are respectively input into the improved CSA attention module and the Bi-LSTM module. Each level of spatio-temporal feature fusion module fuses the features output by the corresponding improved CSA attention module and Bi-LSTM module at each level to obtain spatio-temporal feature maps at each level, upsamples them level by level, and fuses them with spatio-temporal feature maps of the same scale through skip connections.

5. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer according to claim 1, characterized in that, During the training process, an improved adaptive genetic algorithm is used to optimize the hyperparameters of the CNN-BiLSTM-At precipitation forecasting model structure. The adaptive genetic algorithm selects the result with the highest accuracy closest to the true value for crossover and mutation each time; a population density function is introduced to adaptively adjust the crossover operator and mutation operator. The expression of the population density function is: where r represents population density, represents the average fitness of the population, and f j represents the fitness of the chromosome; Change the crossover probability $P$ according to the population iteration times and individual fitness c and the mutation probability $P$ m , and the calculation formula is as follows: where and are the boundaries of the maximum and minimum crossover probabilities respectively, are the boundaries of the maximum and minimum mutation probabilities, is the maximum fitness of the two crossover parties, f max is the maximum fitness value in the population, f m is the fitness of the mutated individual, f a is the average fitness of the current population, g is the number of iterations, and G represents the maximum number of iterations of the population; Each individual in the population represents a set of hyperparameter settings. The hyperparameter settings are iteratively updated through genetic operations of selection, crossover, and mutation until the maximum number of iterations is reached.

6. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer according to claim 1, characterized in that, The specific structure of the ST-CFormer precipitation forecasting bias correction model constructed in step S4 is as follows: It includes a local spatio-temporal feature extraction module in series at multiple levels in parallel, a global spatio-temporal feature extraction module in series at multiple levels, and a cross-level hybrid spatio-temporal bidirectional LSTM module; the local spatio-temporal feature extraction module is composed of a multi-branch convolution module and an improved CSA attention module connected in series, the global spatio-temporal feature extraction module is composed of a Swin-Transformer module and a non-local attention module connected in series, and the hybrid spatio-temporal bidirectional LSTM module is composed of a feature fusion module and a bidirectional long short-term memory network Bi-LSTM module connected in series, and the input and output of the bidirectional long short-term memory network Bi-LSTM module are connected with residual connections; Each level of local spatio-temporal feature extraction module and global spatio-temporal feature extraction module extract the input image features in parallel and downsample them level by level. The hybrid spatio-temporal bidirectional LSTM module at the corresponding level fuses the features output by the local spatio-temporal feature extraction module and the global spatio-temporal feature extraction module to obtain spatio-temporal feature maps at each level, upsamples them level by level, and fuses them with spatio-temporal feature maps of the same scale through skip connections.

7. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer according to claim 1, characterized in that, In step S5, the adaptive weighted method is used to fuse the precipitation forecast image with the meteorological element data of precipitation, temperature, and wind speed after preprocessing, and the weights of each meteorological element in the model are adaptively adjusted based on the Bayesian model. The calculation formula is as follows: Where X is the meteorological element data, θ is the model parameter such as the weights of each meteorological element data, P(θ|X) is the posterior distribution, P(X|θ) is the likelihood function, P(θ) is the prior distribution, and P(X) is the evidence, i.e., the normalization constant; The specific steps are as follows: Step 1: Preset the prior distribution followed by each meteorological element, and assume that the weights of the measured precipitation, temperature, and wind speed, which are meteorological elements, follow a normal distribution; Step 2: Select the linear regression function as the likelihood function to describe the relationship between the meteorological element data and the model parameters; Step 3: Use the meteorological element data to update the posterior distribution by applying Bayes' theorem; the posterior distribution reflects the latest estimates of the weights of each meteorological element. For meteorological elements that have a greater impact on the forecast result, the weights are larger, i.e., P(θ|X) ∝ P(X|θ)P(θ); Step 4: Iterate the above operations to continuously and adaptively adjust the weights of each meteorological element until the optimal set of weights is found, and this set of weights can accurately reflect the influence degree of each meteorological element on the precipitation forecast.

8. A precipitation forecast correction method based on CNN-BiLSTM-At and ST-CFormer according to claim 1, characterized in that During the training process of the ST-CFormer precipitation forecast bias correction model structure in step S5, the NSGA-II algorithm is used to optimize its hyperparameters, including the following steps: S5.1 Select the RMSE (Root Mean Square Error) and MAE (Mean Absolute Error) of the precipitation forecast as the evaluation indicators for the ST-CFormer precipitation forecast bias correction model structure; S5.2 Determine the hyperparameters that need to be optimized for the ST-CFormer precipitation forecast bias correction model structure, such as the learning rate, regularization parameter, and training batch size; set a search space for each hyperparameter and initialize the parent population P(0); S5.3 Sort all individuals according to the non-dominated relationship, and then use the selection, crossover, and mutation operators to generate the next-generation population Q(0) with a size of N; S5.4 Merge the newly generated population Q(t) in the t-th generation with the parent population P(t) to obtain the combined population R(t), then perform a fast non-dominated sort on R(t), calculate the crowding degree, and select suitable individuals to form the new offspring population Q(t + 1); iterate the above operations in turn to find the optimal hyperparameter solution.

Citation Information

Cited By

  • Weather forecasting method based on feature fusion and region correction and medium

    CN121524958A

  • Meteorological forecasting method and medium based on feature fusion and region revision

    CN121524958B

  • Meteorological numerical forecasting correction method and device based on EPFR multi-branch framework

    CN122172353A