Short-term precipitation forecasting method and device based on multi-source data, equipment and memory

By employing a multi-source data fusion method based on a Transformer-based multi-branch generator and a PatchGAN discriminator, the problems of accuracy and reliability in short-term precipitation forecasting are solved, achieving high-resolution and timely short-term precipitation forecasts.

CN120821005BActive Publication Date: 2025-12-23NAT UNIV OF DEFENSE TECH +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511337800.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-12-23
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

Existing short-term precipitation forecasting methods have shortcomings in accuracy and reliability, especially in 3-12 hour short-term precipitation forecasts. A single data source is difficult to accurately capture the complex evolution of precipitation processes, and the different spatiotemporal scales and physical meanings of multi-source data features increase the difficulty of feature fusion.

Method used

A Transformer-based multi-branch generator is employed. By preprocessing radar combined reflectivity factor data and numerical model data, an improved Swing Transformer module is used for feature extraction and cross-attention mechanism fusion. Combined with PatchGAN discriminator for adversarial training, deep learning and feature fusion of multi-source data are achieved to generate high-resolution short-term precipitation forecast results.

Benefits of technology

It significantly improves the accuracy and timeliness of short-term precipitation forecasts, enabling more accurate capture of the complex dynamics of precipitation processes, reflecting the wide-ranging impact of weather systems, and enhancing the performance of short-term precipitation forecasts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821005B_ABST
    Figure CN120821005B_ABST
Patent Text Reader

Abstract

The application relates to a short-impending precipitation prediction method, device, equipment and memory based on multi-source data. The method is based on a short-impending precipitation prediction network fusing radar data and numerical mode prior data, effectively combines the advantages of both, fully excavates the correlation and complementarity between the radar data and the numerical mode, and realizes higher precision and timeliness in short-impending precipitation prediction. Through deep learning training on the multi-source data, the trained network can provide high-resolution and accurate precipitation prediction results, and significantly improves the performance of short-impending precipitation prediction. The short-impending precipitation prediction method based on the fusion of radar data and numerical mode prior data in the method can more accurately capture the complex dynamics of the precipitation process, fully reflect the extensive influence of the weather system, and effectively improve the precision of short-impending precipitation prediction; the network structure can be adjusted to increase the output data frame number of the prediction sequence to further improve the extrapolation timeliness.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of weather forecasting, in particular to a short-term and nowcasting precipitation forecasting method and device based on multi-source data, equipment and memory. BACKGROUND

[0002] Short-term and nowcasting precipitation, especially heavy precipitation, is an important means of disaster prevention and reduction. In recent years, the rapid development of weather radar technology and radar extrapolation algorithm has significantly improved the near-term (0-3 hours) prediction capability of precipitation, especially severe convective precipitation. At the same time, the development of modern numerical weather prediction has also enhanced the short-term (12-72 hours) prediction capability of precipitation to some extent. However, due to the nonlinear characteristics of precipitation height, the accuracy of radar extrapolation decreases significantly with the passage of time. And due to the influence of the "spin-up" phenomenon, the reliability of the prediction results of numerical models in the first 6 hours is relatively low. Therefore, there has been a great uncertainty in the short-term and nowcasting precipitation prediction of 3-12 hours. How to effectively improve the accuracy and reliability of short-term and nowcasting precipitation prediction is of great significance for the monitoring and early warning of disastrous weather in the whole period. The existing short-term and nowcasting precipitation prediction methods are mainly based on numerical prediction and radar echo extrapolation.

[0003] The short-term and nowcasting precipitation prediction method based on numerical model simulates the state, properties and movement of the atmosphere through existing physical models, and the effect on medium and long-term weather prediction has been verified by business practice. However, its inherent defects lead to the following bottlenecks in the near-term prediction of numerical models: the numerical prediction model has a delay in starting the prediction, and the calculation time of the numerical model is too long to meet the timeliness requirements of near-term prediction; the prediction quality of numerical prediction products is good for large-scale weather systems, but the fine degree of prediction for small-scale weather systems is not enough, and the short-term and nowcasting prediction in the first 6 hours shows great uncertainty; considering the uncertainty of observation and the uncertainty of physical processes in numerical models, ensemble prediction is proposed. However, due to the need for repeated calculation under multiple initial field conditions and model parameter schemes, the calculation cost is large, and the spatial and temporal resolution is still limited by the resolution of the model itself, which cannot effectively solve the shortcomings of low-resolution models in short-term and nowcasting precipitation prediction.

[0004] Short-term precipitation forecasting methods based on radar echo extrapolation can be divided into two categories: traditional echo extrapolation methods and deep learning-based extrapolation methods. Traditional echo extrapolation methods, such as centroid tracking and optical flow methods, are mostly based on certain approximate assumptions. These assumptions are generally only applicable to analyzing relatively stable echo motion trends and are difficult to effectively predict the complex and rapid formation and dissipation processes of strong convection. Limited by the complexity of the echo extrapolation model, they still have shortcomings in forecast timeliness and accuracy. Deep learning-based radar echo extrapolation methods have significantly improved forecast accuracy and effective duration compared to traditional methods, but relying solely on reflectivity factors as input often fails to fully capture the complex evolutionary mechanisms inherent in weather systems. As the extrapolation duration increases, forecast uncertainty gradually increases, and model prediction accuracy decreases.

[0005] Because precipitation processes involve numerous factors, a single data source is often insufficient to accurately capture their complex evolutionary patterns. In actual forecasting, forecasters can comprehensively analyze weather radar data, meteorological satellite remote sensing data, and numerical model output data to forecast precipitation from different perspectives and at different spatiotemporal scales. Therefore, fusing features from multiple data sources can enhance forecast reliability. However, the different spatiotemporal scales and physical meanings of features from different data sources increase the difficulty of feature-level fusion. Summary of the Invention

[0006] Therefore, it is necessary to provide a method, apparatus, device, and memory for short-term precipitation forecasting based on multi-source data to address the aforementioned technical problems.

[0007] A method for short-term precipitation forecasting based on multi-source data, the method comprising:

[0008] Step S1: Preprocess the acquired radar combined reflectivity factor data and the combined data at the first and second preset altitudes to obtain three sample sequences.

[0009] Step S2: Input the three sample sequences into the Transformer-based multi-branch generator after adversarial training to obtain the short-term precipitation forecast results; the multi-branch generator includes: a feature extraction network, an encoding layer and a decoding layer; the encoding layer includes multiple stacked improved Swing Transformer modules.

[0010] Step S2 specifically includes:

[0011] Three sample sequences are input into a feature extraction network to obtain multi-source data features. The multi-source data features include: combined features at the first and second preset altitudes, data fusion features of combined features at the first and second preset altitudes, and data features of radar combined reflectivity factor.

[0012] The multi-source data features are positionally encoded to obtain a positionally encoded result.

[0013] The positionally encoded result is input into the encoding layer, a plurality of Swin modules are used for feature extraction in each improved Swin Transformer module, data fusion is performed through the cross-attention mechanism and the MLP layer, and finally encoded features are obtained.

[0014] The finally encoded features are input into the decoding layer, prediction is performed through a plurality of prediction heads, and a short-term precipitation prediction result is obtained.

[0015] A short-term precipitation prediction device based on multi-source data, the device comprises:

[0016] A data preprocessing module is configured to preprocess the obtained radar combined reflectivity factor data and the combined data at the first and second preset altitudes to obtain three sample sequences.

[0017] A short-term precipitation prediction module is configured to input the three sample sequences into a multi-branch generator based on the Transformer after being subjected to the adversarial training to obtain a short-term precipitation prediction result; the multi-branch generator comprises a feature extraction network, an encoding layer, and a decoding layer; the encoding layer comprises a plurality of stacked improved Swin Transformer modules.

[0018] The short-term precipitation prediction module is further configured to input the three sample sequences into the feature extraction network to obtain multi-source data features; the multi-source data features comprise combined features at the first and second preset altitudes, data fusion features of the combined features at the first and second preset altitudes, and data features of the radar combined reflectivity factor; the multi-source data features are positionally encoded, a plurality of Swin modules are used for feature extraction in each improved Swin Transformer module, data fusion is performed through the cross-attention mechanism and the MLP layer, and a positionally encoded result is obtained; the positionally encoded result is input into the encoding layer to obtain finally encoded features; the finally encoded features are input into the decoding layer, prediction is performed through a plurality of prediction heads, and a short-term precipitation prediction result is obtained.

[0019] A computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of any of the above short-term precipitation prediction methods based on multi-source data when executing the computer program.

[0020] A computer-readable memory stores a computer program, and the computer program implements the steps of any of the above short-term precipitation prediction methods based on multi-source data when executed by a processor.

[0021] The aforementioned method, apparatus, device, and storage for short-term precipitation forecasting based on multi-source data, utilizes a short-term precipitation forecasting network that fuses radar data and numerical model prior data. By effectively combining the advantages of both, it fully leverages the correlation and complementarity between radar data and numerical models, achieving higher accuracy and timeliness in short-term precipitation forecasting. Through deep learning training on multi-source data, the trained network provides high-resolution and accurate precipitation forecast results, significantly improving the performance of short-term precipitation forecasting. This method, based on fused radar data and numerical model prior data, can more accurately capture the complex dynamics of precipitation processes, fully reflecting the widespread impact of weather systems and effectively improving the accuracy of short-term precipitation forecasts. The extrapolation timeliness can be further improved by adjusting the network structure to increase the number of output data frames in the prediction sequence. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating a short-term precipitation forecasting method based on multi-source data in one embodiment.

[0023] Figure 2 This is a schematic diagram of the overall process of a short-term precipitation forecasting method based on multi-source data in one embodiment;

[0024] Figure 3 This is a general framework diagram of a short-term precipitation forecasting model based on multi-source data in another embodiment;

[0025] Figure 4 This is a schematic diagram of the encoding and decoding layers of a Transformer-based multi-branch prediction generator network in another embodiment;

[0026] Figure 5 Here is a structural diagram of the Swin module in another embodiment;

[0027] Figure 6 Here is a diagram of the Cross-Attention structure in another embodiment;

[0028] Figure 7 This is a schematic diagram of a discriminator network based on PatchGAN in another embodiment. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0030] In one embodiment, such as Figure 1 , Figure 2As shown, a short-term precipitation forecast method based on multi-source data is provided, which comprises the following steps:

[0031] Step S1: Preprocessing the obtained radar combined reflectivity factor data and combined data at the first and second preset heights to obtain three sample sequences.

[0032] Specifically, numerical product data and weather radar echo product data are read and data preprocessing is performed. The normalized data after data processing is cropped, labeled, and outputted to gridize the numerical product and the high spatiotemporal resolution combined reflectivity factor product. The gridized numerical product includes meteorological data such as potential height and relative humidity at the first preset height (850 hPa) and potential height and relative humidity at the second preset height (500 hPa). The radar combined reflectivity factor data is the weather radar echo product data.

[0033] The three sample sequences are: the first sample sequence corresponding to the combined data at the first preset height, the second sample sequence corresponding to the combined data at the second preset height, and the third sample sequence corresponding to the radar combined reflectivity factor data.

[0034] Step S2: inputting the three sample sequences into the multi-branch generator based on Transformer after the adversarial training to obtain the short-term precipitation forecast result; the multi-branch generator includes a feature extraction network, an encoding layer, and a decoding layer; the encoding layer includes a plurality of stacked improved Swin Transformer modules.

[0035] Step S2 specifically includes:

[0036] Step S2-1: inputting the three sample sequences into the feature extraction network to obtain multi-source data features; the multi-source data features include combined features at the first and second preset heights, data fusion features of the combined features at the first and second preset heights, and data features of the radar combined reflectivity factor.

[0037] Step S2-2: position encoding is performed on the multi-source data features to obtain a position encoding result.

[0038] Step S2-3: inputting the position encoding result into the encoding layer, using a plurality of Swin modules for feature extraction in each improved Swin Transformer module, and performing data fusion through the cross-attention mechanism and the MLP layer to obtain the final encoding features.

[0039] Step S2-4: inputting the final encoding features into the decoding layer, performing prediction through a plurality of prediction heads to obtain the short-term precipitation forecast result.

[0040] Specifically, a multi-branch generator based on the Transformer is constructed: a feature extraction network uses a VGG19 network to extract numerical mode data features and radar data features of the training samples, wherein the numerical mode data features include: data features of the potential height Z and the relative humidity RH sample set at 850 hPa, data features of the potential height Z and the relative humidity RH sample set at 500 hPa, and the radar data features include: data features of the combined reflectivity factor CR sample set.

[0041] The encoding layer includes a plurality of improved Transformer modules to extract and fuse multi-modal input features; the improved Transformer module adopts an encoder-decoder architecture, receives a plurality of meteorological feature sequences of different height layers as input, including a combined reflectivity factor feature sequence and a potential height and relative humidity combined feature of different pressure layers, and realizes deep modeling of complex weather phenomena through multi-branch parallel processing and feature fusion mechanism.

[0042] The decoding layer generates different types of prediction results through a plurality of special output heads. The improved Swin Transformer module is used to extract features through a plurality of Swin modules, and to fuse multi-source data through a cross-attention mechanism and an MLP layer.

[0043] Based on the network structure of VGG19 and Transformer, in order to improve the accuracy and prediction time of short-term precipitation forecast, numerical prediction can provide large-scale background information and reveal the dynamics of a wider meteorological system, and radar echo data mainly reflects local weather phenomena, has strong timeliness and spatial resolution characteristics, a short-term precipitation forecast model of radar data and numerical mode prior data fusion is designed, the correlation and complementarity of multi-source data features are modeled through fusion, the problem that a single data source is difficult to accurately capture its complex evolution law, the extrapolation accuracy is low, and the effective time is short is solved.

[0044] The trained network can fully mine the correlation and complementarity between multi-source data, improve the spatial resolution and timeliness of precipitation forecast, and has important significance for short-term precipitation forecast.

[0045] In the short-time precipitation forecasting method based on multi-source data, the short-time precipitation forecasting network based on the fusion of radar data and numerical model prior data effectively combines the advantages of both, fully excavates the correlation and complementarity between radar data and numerical model, and realizes higher accuracy and timeliness in short-time precipitation forecasting. Through deep learning training of multi-source data, the trained network can provide high-resolution and accurate precipitation forecasting results, significantly improving the performance of short-time precipitation forecasting. The short-time precipitation forecasting method based on the fusion of radar data and numerical model prior data in the method can more accurately capture the complex dynamics of the precipitation process, fully reflect the extensive influence of the weather system, and effectively improve the accuracy of short-time precipitation forecasting. The network structure can be adjusted to increase the number of output data frames in the prediction sequence to further improve the extrapolation timeliness.

[0046] In one embodiment, the combined data includes geopotential height and relative humidity; step S1 includes obtaining numerical product data and weather radar echo product data; the numerical product data includes geopotential height and relative humidity at a first preset height and a second preset height; the weather radar echo product data includes radar combined reflectivity factor data; the geopotential height and relative humidity at the first preset height and the second preset height are processed by gridding, normalization, and cropping to obtain two groups of size-cropped normalized data corresponding thereto; the two groups of size-cropped normalized data are processed according to a preset time sequence length and a preset sliding window width to obtain sequence samples of the geopotential height and relative humidity at the first preset height and the second preset height, as a first sample sequence and a second sample sequence; the radar combined reflectivity factor data is preprocessed, and the preprocessing result is normalized and cropped to obtain size-cropped normalized radar combined reflectivity factor data; a data sequence sample of the radar combined reflectivity factor is generated according to the preset sliding window width and twice the preset time sequence length, as a third sample sequence; and the data sequence sample of the numerical model product data and the data sequence sample of the radar combined reflectivity factor are used to determine a multi-source data sample.

[0047] Specifically, as a preferred, the first preset height is 850 hPa, and the second preset height is 500 hPa.

[0048] Step S1-1: Numerical model product preprocessing: reading the numerical model product of geopotential height Z and relative humidity RH at 850 hPa and 500 hPa and performing data preprocessing to obtain gridded normalized numerical data, and dividing into a training sample set, a validation sample set, and a test sample set.

[0049] Step S1-1-1: reading numerical pattern product data: according to the numerical pattern output product format, reading product data and decoding, extracting the potential height Z and relative humidity RH data information of the corresponding layer as the extraction field of the 850 hPa and 500 hPa height layers.

[0050] Step S1-1-2: data preprocessing: reading the data in step S1-1-1, mapping the original data to a regular grid through gridding operation, and then performing normalization processing, and cutting the normalized data to the same size.

[0051] Step S1-1-3: data set division: according to a certain time sequence length and sliding window width, the normalized data after size cutting obtained in step S1-1-2 is used to generate a data sample set, and the sample set is divided into a training sample set, a verification sample set and a test sample set according to a certain proportion.

[0052] Step S1-1-3-1, generate data sequence sample set: set sample sequence length , sliding window width , step of the first frame in the sample sequence , step of the last frame in the sample sequence , the first frame data as the model input sequence , the last frame data as the label sequence , the sample sequence sequence_length is represented as: ; the data sequence sample set sequence is:

[0053] ;

[0054] ;

[0055] ;

[0056] wherein, , , , , , , , , represents the first to the data in the input sequence, which are continuous in time; , , , , , , , , , , denote the 1st to the 4th data in the label sequence, and the time interval is , , , , , , , , , , , , , , , , , , denote the data , , , , , , , , , , , , , , , , , corresponding time;

[0057] the 1st data in the input sequence and the 1st data in the label sequence are separated by ; the time interval between the latter sequence and the former sequence corresponding data is the time length corresponding to the sliding window width ; wherein, denotes the numerical product category, denotes the multi-source product set, , and , . .

[0058] ​​​Step S1-2: Weather radar echo product preprocessing: read the weather radar echo product of combined reflectivity factor CR and perform data preprocessing, crop the normalized data obtained after data processing, and divide into a training sample set, a verification sample set and a test sample set.

[0059] Step S1-2-1, read weather radar echo product data: according to the weather radar data format, read and decode the data, the data starting point starts from the top left corner, the data is written according to the column sequence number increasing with the increase of longitude and the row sequence number decreasing with the decrease of latitude, obtain the data block, convert the data block to regular grid data of meteorological elements according to the number of data layers and longitude and latitude in the file header, and store the decoded data file according to the file header and data block respectively;

[0060] Step S1-2-2, radar data preprocessing: read the data block in step S1-2-1, convert the stored value to the actual value of the meteorological element according to the coding relationship, and then perform normalization processing to obtain normalized data;

[0061] Step S1-2-3, data set division: for the normalized data obtained in step S1-2-2, select the main echo area in the same regional range as the numerical mode product, crop the normalized data to the same size, generate a data sample set according to a certain time sequence length and sliding window width, and divide the sample set into a training sample set, a verification sample set and a test sample set according to a certain proportion.

[0062] Step S1-2-3-1, generate data sequence sample set: set the sample sequence length , the sliding window width , the step of the first 10 frames in the sample sequence , the step of the last 10 frames in the sample sequence , the first frame data as the model input sequence , the last frame data as the label sequence , the sample sequence sequence is represented as:

[0063] ;

[0064] ;

[0065] ;

[0066] wherein, , , , , , , , , This represents the first to Lth data points in the input sequence, which are continuous in time. , , , , , , , , , , This represents the first to Lth data items in the label sequence, with a time interval of . , , , , , , , , , , , , , , , , , , Representing data respectively , , , , , , , , , , , , , , , , , The corresponding moment.

[0067] Input sequence The Lth data and label sequence The first data The time interval is The time interval between corresponding data in the next sequence and the previous sequence is the width of the sliding window. The corresponding duration; among which, Represents the radar combined reflectivity factor data CR. Indicates a collection of products from multiple sources. , .

[0068] In one of the embodiments, the short-term precipitation prediction model based on multi-source data includes a multi-branch generator based on a Transformer and a PatchGAN discriminator; the PatchGAN discriminator is used to determine the authenticity of the short-term precipitation prediction result of the multi-branch generator in the model training stage; the combined data includes geopotential height and relative humidity; the adversarial training process of the multi-branch generator based on the Transformer includes: obtaining a training sample set, each training sample including a first sample sequence corresponding to the geopotential height and relative humidity at a first preset height, a second sample sequence corresponding to the geopotential height and relative humidity at the first preset height, and a third sample sequence corresponding to radar combined reflectivity factor data; inputting the training sample into the multi-branch generator based on the Transformer to obtain the predicted value of the geopotential height and relative humidity at the first preset height, the predicted value of the geopotential height and relative humidity at the second height, the predicted precipitation, and the predicted return sequence; in the PatchGAN discriminator, the predicted value of the geopotential height and relative humidity at the first preset height, the predicted value of the geopotential height and relative humidity at the second height, the predicted precipitation, and the predicted return sequence are compared with the true value of the geopotential height and relative humidity at the first preset height, the true value of the geopotential height and relative humidity at the second height, the true value of the hourly precipitation, and the true value of the radar echo sequence respectively, and the multi-branch generator based on the Transformer is reversely trained according to the comparison result and a loss function until a preset stop condition is met, thereby obtaining the trained multi-branch generator based on the Transformer.

[0069] Specifically, the short-term precipitation prediction model based on multi-source data includes a multi-branch generator based on a Transformer and a PatchGAN discriminator; the multi-branch generator based on the Transformer includes a feature extraction network, an encoding layer, and a decoding layer; the encoding layer includes a plurality of stacked improved Transformer modules; the decoding layer includes a plurality of prediction heads; the feature extraction network is used to extract numerical pattern data features and radar data features of the training sample by using a VGG network; the improved Transformer module is used to process each type of feature sequence by using a plurality of Swin modules, and then fuse by using a cross-attention layer and an MLP layer to obtain encoded features; the decoding layer is used to predict the short-term precipitation prediction result according to the output of the encoding layer; and the PatchGAN discriminator is used to determine the authenticity of the short-term precipitation prediction result of the multi-branch generator in the model training stage.

[0070] The PatchGAN discriminator network receives the multi-branch predicted image and the real image output by the generator, discriminates the true and false samples through a convolutional neural network structure, adopts a plurality of convolutional layers and down-sampling layers, and finally outputs a true and false discrimination probability.

[0071] The multi-branch generator based on the Transformer and the PatchGAN discriminator construct an adversarial generation network. The multi-branch generator based on the Transformer adopts an attention mechanism to fuse multi-source data features for prediction. The PatchGAN discriminator is responsible for evaluating the authenticity of the generated results. The network is optimized through an adversarial training mechanism, and the network parameters are saved after training. The test model: input the sample data in the test set into the trained generator, and finally obtain the predicted radar echo image, hourly precipitation and numerical product prediction results, thereby realizing short-term and short-range precipitation prediction. The overall framework of the short-term and short-range precipitation prediction model based on multi-source data is as shown in Figure 3

[0072] The training process: initialize the network model, train the multi-branch generator based on the Transformer using the training sample set, and train the PatchGAN discriminator using the prediction results of the multi-branch generator based on the Transformer and the real label data in step S1. The network parameters are optimized through an adversarial training mechanism, and the network parameters are saved after training.

[0073] Input the data in the test sample set into the trained multi-branch generator based on the Transformer, predict the geopotential height Z and relative humidity RH at 850 hPa and 500 hPa, and output the prediction results of the combined reflectivity product and the hourly precipitation, thereby realizing short-term and short-range precipitation prediction.

[0074] In one embodiment, the loss function used in the training process of the short-term and short-range precipitation prediction model is the mean square error, and the expression of the total loss function of the short-term and short-range precipitation prediction model is:

[0075] ;

[0076] wherein, is the total loss; is the combined reflectivity factor prediction loss, is the geopotential height Z and relative humidity RH prediction loss at 850 hPa, is the geopotential height Z and relative humidity RH prediction loss at 500 hPa, is the hourly precipitation preset loss at the corresponding time, and are the combined reflectivity factor prediction data and label data, respectively, and ​The data are the geopotential height Z at 850 hPa and the predicted relative humidity (RH). and The data are the geopotential height Z at 500 hPa and the predicted relative humidity (RH). and These are the hourly precipitation data for the corresponding time points. These are the weighted hyperparameters for each meteorological element.

[0077] In one embodiment, the feature extraction network includes multiple feature extraction modules; the feature extraction module is a VGG network; step 2-1 specifically includes: performing feature extraction on the first sample sequence, the second sample sequence, and the third sample sequence using a VGG network to obtain data features of geopotential height and relative humidity at a first preset height, data features of geopotential height and relative humidity at the first preset height, and data features of radar combined reflectivity factor; concatenating the data features of geopotential height and relative humidity at the same height to obtain combined features at the corresponding height; and concatenating the combined feature vectors at the first preset height and the second preset height to obtain data fusion features.

[0078] Specifically, step S2-1-1: Feature extraction network initialization. Define the VGG19 network structure and configure relevant parameters for the model. Initialize the network weights using the pre-training method. Train the model using the Adam optimizer, initialize the model hyperparameters, and set the learning rate. The number of samples input in each batch during the training phase Maximum number of training iterations .

[0079] Step S2-1-1-1: Construct convolutional block C1: Convolutional block C1 consists of two convolutional... It consists of an activation function and a pooling layer, applied after each convolution. Activation function. Kernel size. convolution stride Fill zero dimensions Max pooling is adopted. Operations, pooling step size Number of feature maps output by C1 layer The width of the output feature map .

[0080] Step S2-1-1-2: Construct convolution block C2: Convolution block C2 consists of two convolutional blocks... It consists of an activation function and a pooling layer, applied after each convolution. Activation function. Kernel size. convolution stride Fill zero dimensions Max pooling is adopted. Operations, pooling step size Number of feature maps output by C2 layer The width of the output feature map .

[0081] Step S2-1-1-3: Construct convolutional block C3: Convolutional block C3 consists of four convolutional... It consists of an activation function and a pooling layer, applied after each convolution. Activation function. Kernel size. convolution stride Fill zero dimensions Max pooling is adopted. Operations, pooling step size Number of feature maps output by C3 layer The width of the output feature map ;

[0082] Step S2-1-1-4: Construct convolution block C4: Convolution block C4 consists of four convolutional layers... It consists of an activation function and a pooling layer, applied after each convolution. Activation function. Kernel size. convolution stride Fill zero dimensions Max pooling is adopted. Operations, pooling step size Number of feature maps output by C4 layer The width of the output feature map ;

[0083] Step S2-1-1-5: Construct convolutional block C5: Convolutional block C5 consists of four convolutional... It consists of an activation function and a pooling layer, applied after each convolution. Activation function. Kernel size. convolution stride Fill zero dimensions Max pooling is adopted. Operations, pooling step size Number of feature maps output by C5 layer The width of the output feature map ;

[0084] Step S2-1-1-6: Constructing a fully connected layer T1: The fully connected layer T1 consists of three fully connected layers FC1, FC2, and FC3. The number of input feature maps for layer T1 is... Number of output images of FC1 layer Output feature map size Number of output images of FC2 layer Output feature map size Number of output images of FC3 layer Output feature map size Number of output images of T1 layer Output data size .

[0085] Step S2-1-2: Multi-source data feature extraction: Features are extracted from various data in the input model through convolution operations, including geopotential height Z and relative humidity RH at 850 hPa, geopotential height Z and relative humidity RH at 500 hPa, and combined reflectivity factor CR.

[0086] Step S2-1-2-1: Multi-source data feature extraction: For the multi-source data sample set obtained in steps S1-1-3 and S1-2-3, for each sample sequence , The data features of geopotential height Z at 850 hPa, relative humidity RH at 850 hPa, geopotential height Z at 500 hPa, relative humidity RH at 500 hPa, and combined reflectivity factor CR are extracted through convolution operations, and the input sample frames are then processed. With corresponding convolution kernel Convolution, the result of which is then subjected to a bias parameter. After Function activation, output encoded features , to obtain the feature sequence The calculation formula is as follows:

[0087] );

[0088] in, For the input sample frame, To output encoded features, For convolution kernel, For bias parameters, This represents the convolution operation. To modify the activation function of the linear unit;

[0089] The feature vectors of geopotential height Z and relative humidity RH at the same altitude layer are concatenated to form a combined feature vector, resulting in a new feature sequence. , Let the characteristic sequences of the combined reflectivity factors be denoted as follows: Let the characteristic sequence of all combinations of potential height Z and relative humidity RH be denoted as The combined characteristic sequence of geopotential height Z at 850 hPa and relative humidity RH is as follows: The combined characteristic sequence of geopotential height Z at 500 hPa and relative humidity RH is as follows: wherein , , , .

[0090] Step S2-1-3: Network parameter training and updating: In the model training process, the batch training method is adopted, and the training sample set is obtained from step S1-1 and step S1-2 each time. The training data batch size used when inputting the network is defined as Through this process, the network parameters are trained and optimized. The parameters in the training process are denoted as the weights and the bias in the convolution kernel. Parameter learning is performed through the error back propagation algorithm. When the data set is iterated for one round, the validation sample set is used to evaluate the current model effect, and the hyperparameter setting is optimized.

[0091] Step 2-1-3-1: Training the generator network using fused features: input the training sample set data into the generator network model. For a multi-source sample sequence of length , , is the sample number, the first frame data is used as training data for feature extraction and feature fusion, and is input into the multi-branch prediction generator network based on the Transformer. After decoding layer D1, output L frames of prediction data , respectively select the combined albedo factor data , the combined data of potential height Z and relative humidity RH at 850 hPa , the combined data of potential height Z and relative humidity RH at 500 hPa , and the hourly precipitation data at the corresponding time as the label data. The generator prediction result is used as the false sample, and the true label data is used as the true sample. They are respectively input into the PatchGAN discriminator for true-false discrimination.

[0092] Step 2-1-3-2: Calculate the loss: the loss includes the discriminator loss and the multi-branch generator loss Two parts, the discriminator discriminates true or false for each patch area of the input data, and outputs an N x N discrimination result matrix, and its loss function is:

[0093] ;

[0094] ;

[0095] ;

[0096] in, The data must be real labeled data, i.e., genuine samples. The generator's prediction results are fake samples. This indicates that the discriminator evaluates the true sample. The probability that a patch is considered true. Indicates the first fake sample The probability that a patch is considered true. This refers to the size of the discrimination matrix output by PatchGAN. To determine the loss for real samples, To generate a sample discrimination loss, the discriminator should output a high probability value (close to 1) for real samples and a low probability value (close to 0) for generated samples. By minimizing the sum of these two losses, the discriminator is trained to correctly distinguish between real and fake samples.

[0097] The multi-branch generator needs to fool the PatchGAN discriminator into believing that each patch of the generated data is real. Its loss function is... By adversarial loss function and content loss function composition:

[0098] ;

[0099] ;

[0100] in, For the generator's prediction results, This indicates that the discriminator considers the generated data to be the first... The probability that each patch is true. These are the weight hyperparameters of the loss function.

[0101] Content loss function Using a combination of L1 loss and mean squared error (MSE) loss, the difference between the generator's predicted data and the true label data is calculated:

[0102] ;

[0103] ;

[0104] Mean Square Error (MSE) Loss Select the combined reflectivity factor prediction data output from decoding layer D1 Predicted data on geopotential height Z at 850 hPa and relative humidity RH Predicted data on geopotential height Z at 500 hPa and relative humidity (RH). hourly precipitation data corresponding to the time respectively with respective label data , , , Calculate the loss, the formula is as follows:

[0105] ;

[0106] ;

[0107] ;

[0108] ;

[0109] ;

[0110] wherein, , is the sample serial number, is the sample sequence length, is each meteorological element weight hyperparameter, is the loss function hyperparameter;

[0111] Step 2-1-3-3: error back propagation updates parameters: according to the loss function, the parameter is updated by using the alternating training strategy.

[0112] Fixed generator parameters , using the discriminator loss Gradient descent update is performed on the discriminator parameters :

[0113] ;

[0114] Fixed discriminator parameters , using the generator loss Gradient descent update is performed on the discriminator parameters :

[0115] ;

[0116] wherein, and are the gradients of the discriminator parameters and the generator parameters respectively, and are the updated and pre-updated discriminator parameters respectively; and are the updated and pre-updated generator parameters respectively, and are the learning rates of the discriminator and the generator respectively, usually set < To maintain training stability, gradient backpropagation and parameter updates are achieved through automatic differentiation using the Adam optimizer;

[0117] Step 2-1-3-4: Optimize the selection of network hyperparameters: Based on the results of the model on the validation sample set during the training process, select the hyperparameters of the model with the best performance as the final hyperparameters of the network model.

[0118] In one embodiment, the location encoding result includes: the combined feature location encoding result at a first preset height, the combined feature location encoding result at a second preset height, the data fusion feature location encoding result, and the data feature location encoding result of the radar combined reflectivity factor; step 2-2 specifically includes: inputting the combined feature location encoding result at the first preset height, the combined feature location encoding result at the second preset height, the data fusion feature location encoding result, and the data feature location encoding result of the radar combined reflectivity factor into the first improved Transformer module, where each feature is processed by the corresponding Swing module, and the outputs of all Swing modules are processed through a cross-attention mechanism and then processed by an MLP layer to obtain the first encoding. Features; the first encoded features include: a first encoded feature that fuses the combined reflectivity factor with the combined features at a first preset height, a first encoded feature that fuses the combined reflectivity factor with the combined features at a second preset height, and a first encoded feature that fuses the combined reflectivity factor with the data fusion features at all preset heights; the first encoded features are used as input to the next improved Transformer module until the last Transformer module, to obtain the final encoded features; the final encoded features include: the final encoded features that fuse the combined reflectivity factor with the combined features at a first preset height, the final encoded features that fuse the combined reflectivity factor with the combined features at a second preset height, and the final encoded features that fuse the combined reflectivity factor with the data fusion features at all preset heights.

[0119] Specifically, step S2-2-1: Initialization of the encoder and decoder models based on the Transformer-based multi-branch generator and the PatchGAN discriminator network. Define the PatchGAN discriminator and the encoder and decoder network structures based on the Transformer-based multi-branch generator and configure relevant parameters for the models. Initialize the encoder and decoder weights using the Orthogonal method, and initialize the discriminator weights using a normal distribution. Train the multi-branch generator and discriminator using the Adam optimizer, initialize the model hyperparameters, and set the learning rates for the generator and discriminator. (Discriminator learning rate is slightly low), the number of samples input in each batch during the training phase. Maximum number of training iterations .

[0120] The encoding layer and decoding layer network principles of the Transformer-based multi-branch prediction generator are as shown in Figure 4 Figure 4 The improved Transformer module structure diagram is given in Figure 5 , and the Swin module structure is as shown in

[0121] Step S2-2-1-1: The extracted combined reflectivity factor feature sequence , the combined feature sequence of the potential height Z and the relative humidity RH at 850 hPa , the combined feature sequence of the potential height Z and the relative humidity RH at 500 hPa , and the combined feature sequence of all potential height Z and the relative humidity RH are taken as model inputs, converted into Token form and subjected to position coding to obtain an input feature representation with position coding.

[0122] Step S2-2-1-1-1: Calculate the Token size: cut the obtained combined reflectivity factor feature sequence , the combined feature sequence of the potential height Z and the relative humidity RH at 850 hPa , the combined feature sequence of the potential height Z and the relative humidity RH at 500 hPa , and the combined feature sequence of all potential height Z and the relative humidity RH into multiple Patches, each Patch corresponding to a data Token, and the calculation formula is:

[0123] ;

[0124] ;

[0125] ;

[0126] ;

[0127] wherein, is the combined reflectivity factor feature Token, and , wherein represents the combined reflectivity factor feature sequence, a is the Token number of the combined reflectivity factor feature, and d is the dimension of each Token. The combined feature Token of all potential height Z and the relative humidity RH is represented as , and , wherein ​represents the combined feature sequence of potential height Z and relative humidity RH, b is the Token number of the combined feature of potential height Z and relative humidity RH, and d is the dimension of each Token. The combined feature Token of potential height Z and relative humidity RH at 850hpa is represented as , and wherein represents the combined feature sequence of potential height Z and relative humidity RH at 850hpa, c is the Token number of the combined feature of potential height Z and relative humidity RH at 850hpa, and d is the dimension of each Token. The combined feature Token of potential height Z and relative humidity RH at 500hpa is represented as , and wherein represents the combined feature sequence of potential height Z and relative humidity RH at 500hpa, e is the Token number of the combined feature of potential height Z and relative humidity RH at 500hpa, and d is the dimension of each Token.

[0128] Step S2-2-1-1-2: Calculate position encoding: for the obtained token feature , , , , apply position embedding respectively, for each Token, according to its position pos in the input sequence, calculate the corresponding position encoding , the calculation process is represented as:

[0129] ;

[0130] ;

[0131] wherein represents the current position, represents the dimension index in the position encoding, represents the total dimension of the position encoding, i.e. for any position in the sequence , according to its position and dimension index , a unique position encoding value is calculated. If it is an even dimension , the sine function is used for calculation, and if it is an odd dimension , the cosine function is used for calculation. The position encoding is added to the sequence feature Token to obtain the input feature with position encoding, and the calculation formula is represented as:

[0132] ;

[0133] ;

[0134] ;

[0135] ;

[0136] wherein, is the Token of the combined reflectivity factor with position enhancement, is the Token of all potential height Z and relative humidity RH with position enhancement, is the Token of potential height Z and relative humidity RH at 850hpa with position enhancement, is the Token of potential height Z and relative humidity RH at 500hpa with position enhancement;

[0137] Step S2-2-1-1-2-1: Calculate the windowed self-attention mechanism: for the obtained input feature matrix , , , , respectively, the self-attention of each feature matrix window is calculated in the respective Swin Block module. In the first layer of the Swin Block module, the input feature is divided into non-overlapping local windows, each window has a size of , and the self-attention is calculated within each window , and the calculation formula is as follows:

[0138] ;

[0139] ;

[0140] ;

[0141] wherein, is the feature representation of the th window in the input feature matrix, is the weight matrix learned during the training process, is the weight for generating the Query matrix, is the weight for generating the Key matrix, is the weight for generating the Value matrix. Through the weight matrix , the input feature is converted into the Query matrix , the Key matrix and the Value matrix , so as to calculate the correlation between Tokens. Then, the self-attention formula is used to calculate each window, and the calculation formula is as follows:

[0142] ;

[0143] wherein, is the dot product of query matrix and key matrix , the similarity measure, is a scaling factor to avoid the result of inner product too large, is the dimension of key, i.e., the column number of key matrix , and the function normalizes the result of dot product to ensure that the attention weight of each Token is between [0, 1], and the sum of all weights is 1, and the weight calculated by the function is applied to the value matrix to obtain the weighted representation of each Token, i.e., .

[0144] For the result of self-attention output, layer normalization processing is performed, and then a multi-layer perceptron is used for nonlinear transformation, and the calculation formula is as follows:

[0145] ;

[0146] ;

[0147] wherein, is a layer normalization function, is a multi-layer perceptron transformation. After the data is processed by the above processing, it enters the skip connection, and the data after one round of processing obtains the final output of this layer, which is then passed to the next layer, and the calculation process is as follows:

[0148] .

[0149] In the subsequent layer of the Swin Block module, the window offset is calculated again, and the self-attention within the window is calculated. For the offset window , new query , key and value matrices are obtained, and the offset window is calculated. The calculation process is as follows:

[0150] ;

[0151] ;

[0152] ;

[0153] .

[0154] Repeat the layer normalization and residual connection operations until all Blocks are processed, and then obtain the processed combined reflectivity factor output through the multi-layer perception (MLP) , the combined output of all potential height Z and relative humidity RH , the combined output of potential height Z and relative humidity RH at 850hpa , the combined output of potential height Z and relative humidity RH at 500hpa .

[0155] Step S2-2-1-1-2-2: Feature fusion: using a feature fusion strategy based on cross-attention (Cross-Attention layer structure as shown in Figure 6 , the processed combined reflectivity factor output and the position-enhanced output of the combined features of potential height Z and relative humidity RH are weighted and fused through the cross-attention mechanism (Cross-Attention) to obtain the fused feature output . Then, the combined reflectivity factor output and the combined feature output , under different hpa levels are cross-attention fused respectively to obtain the fused feature output , The calculation process is as follows:

[0156] First, the combined reflectivity factor attention combined feature output of potential height Z and relative humidity RH is obtained, which is:

[0157] ;

[0158] ;

[0159] ;

[0160] ;

[0161] Among them, is the query vector obtained by mapping the combined reflectivity factor, is the key vector and value vector obtained by mapping the combined features of potential height Z and relative humidity RH, is the weight matrix learned in the training process, is the position-enhanced output of the combined reflectivity factor mapped to the weight matrix of the query space, is the output of the combined feature of the potential height Z and the relative humidity RH after position enhancement is the weight matrix mapped to the key space, is the output of the combined feature of the potential height Z and the relative humidity RH after position enhancement is the weight matrix mapped to the value space, is the bias vector learned in the linear transformation process, is the scaling factor to avoid the result of inner product being too large, is the dimension of the key, i.e., the column number of the key matrix .

[0162] Similarly, the output of the combined feature of the potential height Z and the relative humidity RH focusing on the combined reflectivity factor is

[0163] .

[0164] .

[0165] .

[0166] .

[0167] wherein, is the query vector mapped from the combined feature of the potential height Z and the relative humidity RH, is the key vector and the value vector mapped from the combined reflectivity factor, is the weight matrix learned in the training process, is the output of the combined feature of the potential height Z and the relative humidity RH after position enhancement is the weight matrix mapped to the query space, is the output of the combined reflectivity factor after position enhancement is the weight matrix mapped to the key space, is the output of the combined reflectivity factor after position enhancement is the weight matrix mapped to the value space, is the bias vector learned in the linear transformation process, is the scaling factor to avoid the result of inner product being too large, is the dimension of the key, i.e., the column number of the key matrix .

[0168] After the cross-attention is calculated, two weighted representations are obtained, i.e., the output of the combined feature of the potential height Z and the relative humidity RH focusing on the combined reflectivity factor and the output of the combined feature of the potential height Z and the relative humidity RH focusing on the combined reflectivity factor The outputs are spliced and processed through a multi-layer perception (MLP) to obtain a processed fusion token output, denoted as , and the calculation formula is as follows:

[0169] ;

[0170] ;

[0171] wherein, represents splicing of two weighted outputs, the length of the spliced fusion feature sequence and the feature map size remain unchanged, and the fusion feature channel number is expanded to twice the original number.

[0172] The above method is repeated to obtain the outputs of the fusion combined reflectivity factor and the potential height Z at 850hpa and the relative humidity RH , the outputs of the fusion combined reflectivity factor and the potential height Z at 500hpa and the relative humidity RH , and the specific process is as follows:

[0173] ;

[0174] .

[0175] Step S2-2-1-2: Constructing sequence encoding layer E1: The encoding layer E1 is composed of B Transformer Block modules, each of which contains a Swin Block module and a cross-attention layer Cross-Attention. The Swin Block module calculates the self-attention mechanism of a single feature sequence window, and the cross-attention layer realizes feature fusion. The output of each Transformer Block is transmitted to the next Transformer Block after residual connection and layer normalization, until B blocks complete all processing. Through a multi-layer perception (MLP), the outputs of the fusion combined reflectivity factor and the potential height Z at 850hpa and the relative humidity RH, the outputs of the fusion combined reflectivity factor and the potential height Z at 500hpa and the relative humidity RH, and the outputs of the fusion combined reflectivity factor and all potential heights Z and the relative humidity RH are obtained, denoted as , , ;

[0176] Step S2-2-1-3: Constructing the sequence decoding layer D1: The decoding layer D1 is composed of multiple output heads, and the output results of step S2-2-1-2 are passed to different output heads, each of which is responsible for outputting different types of feature representations, and each output head further maps the decoded features to the final prediction space through a fully connected layer FC Layer, and the calculation process of each head can be represented as: where FC represents a fully connected layer, represents the size of the target image frame by frame, is the decoded feature;

[0177] Step S2-2-1-3-1, decoding layer D1 processing: the feature sequence 、 、 that has undergone position encoding and attention fusion enters different output heads as input to this layer, and each input head is composed of a fully connected layer (FC) and is responsible for mapping the input feature sequence and outputting the prediction result. The calculation formula of each output head is as follows:

[0178] ;

[0179] where, represents the prediction result, is the fully connected layer of the th output head, is the input feature of the th output head.

[0180] Step S2-2-2: Network parameter training and updating: During model training, batch training is used, and each time a training sample set is obtained, and the corresponding real label data is also obtained. The batch size of the training data used when inputting the network each time is defined as . The generator prediction result is input into the discriminator as a fake sample, and the real label is input as a true sample to distinguish between true and false, and the discriminator parameters are updated. Then the generator is trained, and the generator parameters are trained and optimized through the generative adversarial loss and the content loss. The parameters in the training process are denoted as the weights and the bias in the convolution kernel, and parameter learning is performed through error backpropagation; when the data set is iterated for one round, the prediction effect of the generator is evaluated using the validation sample set, and the hyperparameter setting is optimized.

[0181] Step S2-3-1: Constructing a PatchGAN discriminator network: The discriminator receives the multi-branch prediction image output by the generator and the real image, and discriminates between true and false samples through a convolutional neural network structure, and finally outputs the true and false discrimination probability. The schematic diagram of the PatchGAN-based discriminator network is as follows Figure 7as shown.

[0182] Step S2-3-1-1, constructing a first convolutional layer C64: the first convolutional layer C64, as the first layer of the discriminator, receives an input image, the convolution kernel size , the convolution step size , the padding zero size , the output channel number is 64, and an activation function with a slope parameter of 0.2 is applied after each convolution.

[0183] Step S2-3-1-2, constructing a second convolutional layer C128: the second convolutional layer C128 is composed of two sub-layers, the first sub-layer n128s2 has a convolution kernel size , a convolution step size , an output channel number of 128, and the second sub-layer n128s1 has a convolution kernel size , a convolution step size , an output channel number of 128, and a batch normalization and an activation function are applied after each sub-layer.

[0184] Step S2-3-1-3, constructing a third convolutional layer C256: the third convolutional layer C256 is composed of two sub-layers, the first sub-layer n256s2 has a convolution kernel size , a convolution step size , an output channel number of 256, and the second sub-layer n256s1 has a convolution kernel size , a convolution step size , an output channel number of 256, and a batch normalization and an activation function are applied after each sub-layer.

[0185] Step S2-3-1-4, constructing a fourth convolutional layer C512: the fourth convolutional layer C512 is composed of three sub-layers, the first sub-layer n512s2 has a convolution kernel size , a convolution step size , an output channel number of 512, the second sub-layer n512s1 has a convolution kernel size , a convolution step size , an output channel number of 512, and the third sub-layer n512s2 has a convolution kernel size , a convolution step size , an output channel number of 512, and a batch normalization and an activation function are applied after each sub-layer.

[0186] Step S2-3-1-5, constructing an output layer: the output layer n8s2 receives the output of step S2-3-1-4 as input, the convolution kernel size​​​​ convolution step output channel number is 1, followed by activation function, output true or false discriminant probability value, and multiple output points are set at different levels of the network , so as to realize multi-scale feature discrimination, wherein represents the total number of network layers.

[0187] In one of the embodiments, the step 2-4 specifically comprises: processing the fusion combined reflectivity factor and the final encoding features of the combined features at the first preset height, the fusion combined reflectivity factor and the final encoding features of the combined features at the second preset height, and the fusion combined reflectivity factor and the final encoding features of the data fusion features at all preset heights through a prediction head respectively to obtain the short-term precipitation prediction result; the short-term precipitation prediction result includes the radar combined reflectivity factor prediction result, the hourly precipitation prediction result, and the potential height and relative humidity prediction results at the two preset heights.

[0188] It should be understood that, although Figure 1 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, Figure 1 at least part of the steps in may include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.

[0189] In one embodiment, a short-term precipitation prediction device based on multi-source data is provided, comprising:

[0190] A data preprocessing module is configured to preprocess the obtained radar combined reflectivity factor data and the combined data at the first and second preset heights to obtain three sample sequences.

[0191] A short-term precipitation prediction module is configured to input the three sample sequences into a multi-branch generator based on Transformer after adversarial training to obtain a short-term precipitation prediction result; the multi-branch generator comprises a feature extraction network, an encoding layer, and a decoding layer; the encoding layer comprises multiple stacked improved Swin Transformer modules.

[0192] The short-time precipitation forecasting module is further configured to input the first sample sequence, the second sample sequence, and the third sample sequence into a feature extraction network to obtain multi-source data features; the multi-source data features include: combined features at the first and second preset altitudes, data fusion features of the combined features at the first and second preset altitudes, and data features of a radar combined reflectivity factor; the multi-source data features are positionally encoded to obtain a positionally encoded result; the positionally encoded result is input into an encoding layer to obtain final encoded features; and the final encoded features are input into a decoding layer, and are predicted through multiple prediction heads to obtain a short-time precipitation forecasting result.

[0193] In one of the embodiments, the combined data includes: potential height and relative humidity; the data preprocessing module is further configured to acquire numerical product data and weather radar echo product data; the numerical product data includes: potential height and relative humidity at the first preset altitude and the second preset altitude; and the weather radar echo product data includes: radar combined reflectivity factor data; the potential height and the relative humidity at the first preset altitude and the second preset altitude are processed through gridding, normalization, and clipping to obtain two groups of size-clipped normalized data corresponding thereto; the two groups of size-clipped normalized data are processed according to a preset time sequence length and a preset sliding window width to obtain sequence samples of the potential height and the relative humidity at the first preset altitude and the second preset altitude corresponding thereto, as the first sample sequence and the second sample sequence; the radar combined reflectivity factor data is preprocessed, and the preprocessing result is normalized and clipped to obtain size-clipped normalized radar combined reflectivity factor data; data sequence samples of the radar combined reflectivity factor are generated according to the preset sliding window width and twice the preset time sequence length, as the third sample sequence; and multi-source data samples are determined according to the data sequence samples of the numerical model product data and the data sequence samples of the radar combined reflectivity factor.

[0194] In one of the embodiments, the short-time precipitation prediction model based on multi-source data comprises a multi-branch generator based on a Transformer and a PatchGAN discriminator; the PatchGAN discriminator is used to determine the authenticity of the short-time precipitation prediction result of the multi-branch generator in the model training stage; the combined data comprises potential height and relative humidity; the adversarial training process of the multi-branch generator based on the Transformer in the short-time precipitation prediction module comprises: obtaining a training sample set, each training sample comprising a first sample sequence corresponding to the potential height and relative humidity at a first preset height, a second sample sequence corresponding to the potential height and relative humidity at the first preset height, and a third sample sequence corresponding to radar combined reflectivity factor data; inputting the training sample into the multi-branch generator based on the Transformer to obtain the predicted value of the potential height and relative humidity at the first preset height, the predicted value of the potential height and relative humidity at the second height, the predicted precipitation, and the predicted return sequence; in the PatchGAN discriminator, the predicted value of the potential height and relative humidity at the first preset height, the predicted value of the potential height and relative humidity at the second height, the predicted precipitation, and the predicted return sequence are compared with the true value of the potential height and relative humidity at the first preset height, the true value of the potential height and relative humidity at the second height, the true value of the hourly precipitation, and the true value of the radar echo sequence respectively, and the multi-branch generator based on the Transformer is reversely trained according to the comparison result and the loss function until a preset stop condition is met, thereby obtaining the trained multi-branch generator based on the Transformer.

[0195] In one of the embodiments, the loss function in the short-time precipitation prediction model training process in the short-time precipitation prediction module adopts mean square error, and the total loss function of the short-time precipitation prediction model is shown in the expression of the total loss function of the short-time precipitation prediction model.

[0196] In one of the embodiments, the feature extraction network comprises a plurality of feature extraction modules; the feature extraction module is a VGG network. The short-time precipitation prediction module is further configured to extract features of the first sample sequence, the second sample sequence, and the third sample sequence by using the VGG network respectively to obtain data features of the potential height and relative humidity at the first preset height, data features of the potential height and relative humidity at the first preset height, and data features of the radar combined reflectivity factor; the data features of the potential height and relative humidity at the same height are spliced to obtain the combined features at the corresponding height; the combined feature vectors at the first preset height and the second preset height are spliced to obtain the data fusion features.

[0197] In one of the embodiments, the position coding result includes: a combined feature position coding result at a first preset height, a combined feature position coding result at a second preset height, a data fusion feature position coding result, and a data feature position coding result of a radar combined reflectivity factor. The short-time precipitation prediction module is further configured to input the combined feature position coding result at the first preset height, the combined feature position coding result at the second preset height, the data fusion feature position coding result, and the data feature position coding result of the radar combined reflectivity factor into a first improved Transformer module, each feature is processed by a corresponding Swin module, the outputs of all Swin modules are processed by a cross-attention mechanism, and then processed by an MLP layer to obtain a first coding feature; the first coding feature includes: a first coding feature of the combined reflectivity factor fused with the combined feature at the first preset height, a first coding feature of the combined reflectivity factor fused with the combined feature at the second preset height, and a first coding feature of the combined reflectivity factor fused with the data fusion feature at all preset heights; the first coding feature is taken as an input of a next improved Transformer module until a last Transformer module, and a final coding feature is obtained; the final coding feature includes: a final coding feature of the combined reflectivity factor fused with the combined feature at the first preset height, a final coding feature of the combined reflectivity factor fused with the combined feature at the second preset height, and a final coding feature of the combined reflectivity factor fused with the data fusion feature at all preset heights.

[0198] In one of the embodiments, the short-time precipitation prediction module is further configured to process the final coding feature of the combined reflectivity factor fused with the combined feature at the first preset height, the final coding feature of the combined reflectivity factor fused with the combined feature at the second preset height, and the final coding feature of the combined reflectivity factor fused with the data fusion feature at all preset heights by a prediction head respectively to obtain a short-time precipitation prediction result; the short-time precipitation prediction result includes a radar combined reflectivity factor prediction result, an hourly precipitation prediction result, and a potential height and relative humidity prediction result at two preset heights.

[0199] The specific limitations of the short-time precipitation prediction device based on multi-source data can be referred to the limitations of the short-time precipitation prediction method based on multi-source data in the above, which will not be repeated here. Each module in the short-time precipitation prediction device based on multi-source data described above can be realized by software, hardware, and a combination thereof, in whole or in part. The modules described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.

[0200] In an embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.

[0201] It can be understood that, in addition to the memory and the processor described above, the computer device described above further comprises other software and hardware components not listed in the specification, which can be determined according to the specific image processing computer model in different application scenarios, and the specification will not be listed in detail.

[0202] In an embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0203] It can be understood by those skilled in the art that all or part of the processes in the above embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above embodiments. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0204] The technical features of the above embodiments can be combined in any way. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the specification.

[0205] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the present application. It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A nowcasting precipitation forecasting method based on multi-source data, characterized in that, The method comprises: Step S1: preprocessing the obtained radar combined reflectivity factor data and the combined data at the first and second preset altitudes to obtain three sample sequences; Step S2: inputting the three sample sequences into a multi-branch generator based on a Transformer after being trained in an adversarial manner to obtain a short-term precipitation prediction result; the multi-branch generator comprises a feature extraction network, an encoding layer and a decoding layer; the encoding layer comprises a plurality of stacked improved Swin Transformer modules, and each of the improved Swin Transformer modules comprises a plurality of Swin modules, and each of the Swin modules comprises a window self-attention mechanism and a shift window self-attention mechanism; Step S2 specifically comprises: inputting the three sample sequences into the feature extraction network to obtain multi-source data features; the multi-source data features comprise combined features at the first and second preset altitudes, data fusion features of the combined features at the first and second preset altitudes, and data features of the radar combined reflectivity factor; wherein the feature extraction network adopts a VGG network; position encoding is performed on the multi-source data features to obtain a position encoding result; the position encoding result is input into the encoding layer, feature extraction is performed in each improved Swin Transformer module by using a plurality of Swin modules, data fusion is performed by using a cross-attention mechanism and an MLP layer to obtain final encoding features; wherein in the cross-attention mechanism, the data features of the radar combined reflectivity factor are taken as Query, and the combined features at the first and second preset altitudes are taken as Key and Value; the final encoding features are input into the decoding layer, prediction is performed by using a plurality of prediction heads to obtain the short-term precipitation prediction result.

2. The nowcasting precipitation forecasting method based on multi-source data according to claim 1, characterized in that, The combined data comprises potential height and relative humidity; step S1 comprises: obtaining numerical product data and weather radar echo product data; the numerical product data comprises potential height and relative humidity at the first preset altitude and the second preset altitude; the weather radar echo product data comprises radar combined reflectivity factor data; the potential height and the relative humidity at the first preset altitude and the second preset altitude are processed by gridding, normalization and cropping to obtain two groups of size-cropped normalized data corresponding thereto; the two groups of size-cropped normalized data are respectively processed according to a preset time sequence length and a preset sliding window width to obtain sequence samples of the potential height and the relative humidity at the first preset altitude and the second preset altitude as a first sample sequence and a second sample sequence; the radar combined reflectivity factor data is preprocessed, and the preprocessing result is normalized and cropped to obtain size-cropped normalized radar combined reflectivity factor data; a data sequence sample of the radar combined reflectivity factor is generated according to a preset sliding window width and a preset time sequence length twice as long as the preset time sequence length to obtain a third sample sequence; determine the multi-source data samples according to the data sequence samples of the numerical model product data and the data sequence samples of the radar combined reflectivity factor.

3. The nowcasting precipitation forecasting method based on multi-source data according to claim 1, characterized in that, The short-term precipitation prediction model based on multi-source data comprises a multi-branch generator based on a Transformer and a PatchGAN discriminator; the PatchGAN discriminator is used to determine the authenticity of the short-term precipitation prediction result of the multi-branch generator in a model training stage; and the combined data comprises potential height and relative humidity. The adversarial training process of the multi-branch generator based on the Transformer comprises the following steps: obtaining a training sample set, each of the training samples comprising a first sample sequence corresponding to potential height and relative humidity at a first preset height, a second sample sequence corresponding to potential height and relative humidity at a second preset height, and a third sample sequence corresponding to radar combined reflectivity factor data; inputting the training samples into the multi-branch generator based on the Transformer to obtain predicted values of potential height and relative humidity at the first preset height, predicted values of potential height and relative humidity at the second height, predicted precipitation, and a predicted return sequence; in the PatchGAN discriminator, comparing the predicted values of potential height and relative humidity at the first preset height, the predicted values of potential height and relative humidity at the second height, the predicted precipitation, and the predicted return sequence with true values of potential height and relative humidity at the first preset height, true values of potential height and relative humidity at the second height, true values of hourly precipitation, and true values of radar echo sequence respectively, and performing reverse training on the multi-branch generator based on the Transformer according to a comparison result and a loss function until a preset stop condition is met, thereby obtaining a trained multi-branch generator based on the Transformer.

4. The nowcasting precipitation forecasting method based on multi-source data according to claim 3, characterized in that, The loss function used in the training process of the short-term precipitation prediction model is mean square error, and the total loss function of the short-term precipitation prediction model is: wherein, is the total loss; is the combined reflectivity factor prediction loss, is the geopotential height Z and relative humidity RH prediction loss at 850 hPa, is the geopotential height Z and relative humidity RH prediction loss at 500 hPa, is the hourly precipitation at the corresponding time step prediction loss, and are the combined reflectivity factor prediction data and label data, respectively, and are the geopotential height Z and relative humidity RH prediction data at 850 hPa, respectively, and are the geopotential height Z and relative humidity RH prediction data at 500 hPa, respectively, and are the hourly precipitation data at the corresponding time step, respectively, is the meteorological element weight hyperparameter.

5. The nowcasting precipitation forecasting method based on multi-source data according to claim 1, characterized in that, The feature extraction network comprises a plurality of feature extraction modules; The feature extraction module is a VGG network; inputting the first sample sequence, the second sample sequence, and the third sample sequence into the feature extraction network to obtain multi-source data features, comprising: performing feature extraction on the first sample sequence, the second sample sequence, and the third sample sequence respectively by using a VGG network to obtain data features of potential height and relative humidity at the first preset height, data features of potential height and relative humidity at the first preset height, and data features of radar combined reflectivity factor; splicing the data features of potential height and relative humidity at the same height to obtain combined features at the corresponding height; splicing the combined feature vectors at the first preset height and the second preset height to obtain data fusion features.

6. The short-term precipitation prediction method based on multi-source data according to claim 1, wherein the position encoding result comprises a combined feature position encoding result at the first preset height, a combined feature position encoding result at the second preset height, a data fusion feature position encoding result, and a data feature position encoding result of radar combined reflectivity factor; inputting the position encoding result into the encoding layer to obtain final fusion features, comprising: The combined feature position encoding result at the first preset height, the combined feature position encoding result at the second preset height, the data fusion feature position encoding result and the data feature position encoding result of the radar combined reflectivity factor are input into a first improved Transformer module, each feature is processed through a corresponding Swin module, the outputs of all Swin modules are processed through a cross-attention mechanism, and then an MLP layer is adopted for processing to obtain a first encoding feature; the first encoding feature includes: a first encoding feature of the fusion combined reflectivity factor and the combined feature at the first preset height, a first encoding feature of the fusion combined reflectivity factor and the combined feature at the second preset height, and a first encoding feature of the fusion combined reflectivity factor and the data fusion feature at all preset heights; The first encoding feature is taken as the input of a next improved Transformer module until a last Transformer module, and a final encoding feature is obtained; the final encoding feature includes: a final encoding feature of the fusion combined reflectivity factor and the combined feature at the first preset height, a final encoding feature of the fusion combined reflectivity factor and the combined feature at the second preset height, and a final encoding feature of the fusion combined reflectivity factor and the data fusion feature at all preset heights.

7. The nowcasting precipitation forecasting method based on multi-source data according to claim 1, characterized in that, The final encoding feature is input into the decoding layer, and prediction is performed through a plurality of prediction heads to obtain a short-term precipitation prediction result, including: The final encoding feature of the fusion combined reflectivity factor and the combined feature at the first preset height, the final encoding feature of the fusion combined reflectivity factor and the combined feature at the second preset height, and the final encoding feature of the fusion combined reflectivity factor and the data fusion feature at all preset heights are processed through a prediction head respectively to obtain a short-term precipitation prediction result; the short-term precipitation prediction result includes a radar combined reflectivity factor prediction result, a per-hour precipitation prediction result, and potential height and relative humidity prediction results at two preset heights.

8. A short-term precipitation forecasting device based on multi-source data, characterized by, The device includes: A data preprocessing module is configured to preprocess radar combined reflectivity factor data and combined data at first and second preset heights to obtain three sample sequences; A short-term precipitation prediction module is configured to input the three sample sequences into a Transformer-based multi-branch generator subjected to adversarial training to obtain a short-term precipitation prediction result; the multi-branch generator includes a feature extraction network, an encoding layer and a decoding layer; the encoding layer includes a plurality of stacked improved Swin Transformer modules, each module of the improved Swin Transformer module includes a plurality of Swin modules, and each Swin module includes a window self-attention mechanism and a shift window self-attention mechanism; The short-time precipitation forecasting module is further configured to input the three sample sequences into the feature extraction network to obtain multi-source data features, wherein the multi-source data features include combined features at the first and second preset altitudes, data fusion features of the combined features at the first and second preset altitudes, and data features of a radar combined reflectivity factor; perform position encoding on the multi-source data features to obtain a position encoding result; input the position encoding result into the encoding layer, perform feature extraction on the position encoding result by using a plurality of Swin modules in each improved Swin Transformer module, perform data fusion by using a cross-attention mechanism and an MLP layer, and obtain final encoding features; input the final encoding features into the decoding layer, perform prediction by using a plurality of prediction heads, and obtain a short-time precipitation forecasting result; wherein the feature extraction network uses a VGG network; and in the cross-attention mechanism, the data features of the radar combined reflectivity factor are used as Query, and the combined features at the first and second preset altitudes are used as Key and Value. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The computer program is executed by the processor to implement the steps of the short-time precipitation forecasting method based on multi-source data in any one of claims 1 to 7.

10. A computer readable memory having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the short-time precipitation forecasting method based on multi-source data in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Short-time rainfall prediction method based on radar image and reanalysis data fusion

    CN120337179A