A short-time heavy precipitation prediction method based on deep learning

CN122221040BActive Publication Date: 2026-08-11INST OF GEOGRAPHICAL SCI & NATURAL RESOURCE RES CAS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-20
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]为了解决上述技术问题,本发明提供一种基于深度学习的短时强降水预测方法,以解决现有技术中单一模型架构难以融合多尺度气象特征、无法有效建模降水系统的时空演变过程,且对稀少强降水事件识别能力弱、预测结果物理一致性差的问题

Benefits of technology

通过融合多尺度特征提取、时序依赖建模、对抗学习机制以及针对类别不平衡问题的优化策略,实现了短时强降水精细化时空预测能力的显著提升;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122221040B_ABST
    Figure CN122221040B_ABST
Patent Text Reader

Abstract

This invention relates to the fields of meteorological forecasting and artificial intelligence, specifically disclosing a deep learning-based method for predicting short-term heavy precipitation. The method includes: acquiring multi-source meteorological data and performing variable grouping and normalization; constructing samples using a time-sliding window and implementing time augmentation for heavy precipitation categories to alleviate sample imbalance; constructing a bi-branch convolutional network to extract and fuse large-scale circulation background and local convection fine features; using a convolutional long short-term memory network to model the multi-time-sequence fused feature sequence to capture the spatiotemporal evolution of the precipitation system; employing a UNet-style decoder to achieve high-resolution spatial reconstruction; introducing a conditional generative adversarial network during training to adversarially constrain the prediction results using the meteorological field as a condition; and designing a combination of weighted Focal-Tversky loss and soft critical success index loss to directly optimize operational indicators and enhance the learning of heavy precipitation categories.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of weather forecasting and artificial intelligence, specifically a method for predicting short-term heavy rainfall based on deep learning. Background Technology

[0002] Short-duration heavy rainfall refers to a weather phenomenon characterized by high intensity and large cumulative rainfall occurring within a short period (usually several hours), often accompanied by severe convective weather such as thunderstorms and strong winds. These weather systems are small in spatial scale and evolve rapidly, and are a major contributing factor to urban flooding, flash floods, and mudslides. Therefore, accurate and detailed forecasts of their timing, spatial location, and intensity are of significant scientific and practical value for disaster prevention, mitigation, and public safety.

[0003] From the perspective of technical approaches to meteorological forecasting, traditional methods mainly rely on numerical weather prediction models. These methods are based on equations governing atmospheric motion and physical processes, and simulate future weather conditions through discretized solutions. While numerical models are relatively mature in describing large-scale weather systems, they still face significant challenges in forecasting small- to medium-scale, rapidly forming and dissipating convective systems such as short-duration heavy precipitation: First, the initial field of the model often fails to accurately characterize convective-scale disturbances, and small errors are rapidly amplified during integration; second, the parameterization schemes describing cloud microphysics and convection triggering processes still have considerable uncertainties, limiting their ability to characterize the key physical mechanisms of heavy precipitation; and third, the enormous computational cost required to achieve high-resolution forecasts restricts their widespread application in real-time operational scenarios.

[0004] In recent years, with the rapid development of artificial intelligence technology, data-driven deep learning methods have provided new insights for weather forecasting. Among them, convolutional neural networks (CNNs) can automatically learn spatial features from gridded meteorological fields, long short-term memory (LSTM) networks excel at modeling the evolution of time series data, and generative adversarial networks (GANs) can be used to learn complex data distributions. Existing research has attempted to apply these models to precipitation forecasting, but these methods often employ a single model architecture, such as using only CNNs to extract spatial features or only LSTMs to process time series data. Such single architectures struggle to simultaneously and effectively capture the multi-scale coupling relationship between synoptic-scale circulation background and local convection triggering conditions, and also fail to fully model the continuous evolution of precipitation systems in the spatiotemporal dimensions. Furthermore, since heavy precipitation events are a rare category in historical observations, the training data suffers from severe class imbalance, causing the model to tend to predict no precipitation or weak precipitation. Meanwhile, the model has a high underreporting rate and weak identification ability for heavy precipitation events, which are of most concern to the business. The spatial structure of the forecast results also often deviates from the actual precipitation distribution, resulting in insufficient physical rationality. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a deep learning-based method for predicting short-term heavy precipitation. This method solves the problems in existing technologies where a single model architecture struggles to integrate multi-scale meteorological features, cannot effectively model the spatiotemporal evolution of precipitation systems, has weak identification capabilities for rare heavy precipitation events, and exhibits poor physical consistency in prediction results.

[0006] This invention provides a method for predicting short-term heavy precipitation based on deep learning, comprising the following steps: S1. Data Acquisition and Preprocessing: Collect multi-source meteorological observation and reanalysis data within the target area, and extract multiple meteorological variables related to precipitation physical processes; S2. Variable grouping and normalization: Based on the spatial influence range of the variables, the meteorological variables are divided into large-scale background field variables and local fine-scale variables, and normalization parameters are calculated based on the training set to normalize all data. S3. Training Sample Construction: A time sliding window strategy is adopted, using meteorological fields from multiple consecutive historical moments as input and precipitation classification results from future moments as prediction targets to construct training samples; for categories with scarce heavy precipitation samples, time neighborhood enhancement is performed to increase their sample proportion. S4. Multi-scale spatiotemporal feature extraction and prediction: Construct a dual-branch convolutional feature extraction network to extract and fuse the features of the large-scale background field variables and the local fine-scale variables respectively; input the fused multi-time features into a temporal convolutional long short memory network to extract temporal evolution features; restore the deep temporal features to high-resolution space through a spatial decoding network and output the probability distribution of precipitation levels at future times; S5. Adversarial Training and Loss Optimization: A conditional generative adversarial network framework is adopted, using the meteorological field as a condition to adversarially constrain the precipitation prediction results output by the generator; a combined loss function is designed, including weighted Focal-Tversky loss and soft critical success index loss, to optimize the model parameters. S6. Model Training and Evaluation: The model is trained using an optimizer and learning rate scheduling strategy, and the optimal model is selected on the validation set based on classification metrics and business metrics. S7. Prediction Product Generation: Input the test meteorological data into the trained model to obtain a precipitation level probability map. Determine the precipitation level by taking the maximum value and extract the probability of heavy precipitation risk to generate a refined grid forecast product.

[0007] Preferably, the meteorological variables in step S1 include at least 18 meteorological variables among total precipitation, convective precipitation, large-scale precipitation, wind speed components at different altitudes, temperature, air pressure, sea surface temperature, cloud cover, convective parameters, and total column water vapor.

[0008] Preferably, in step S2, the large-scale background field variables include sea surface temperature, sea level pressure, surface pressure, 2-meter temperature, 100-meter wind speed component, total column water vapor, and convective precipitation; the local fine-scale variables include 10-meter wind speed component, cloud base height, low, medium, and high cloud cover, total cloud cover, K index, and large-scale precipitation.

[0009] Preferably, in step S3, the precipitation classification includes four levels: no precipitation, light rain, moderate rain, heavy rain and above; the time sliding window length is 4 time periods, and the prediction target is the precipitation classification result of the 5th time period; for heavy precipitation samples, samples from adjacent time windows before and after them are extracted for enhancement.

[0010] Preferably, in step S4, the dual-branch convolutional feature extraction network includes: Large-scale branch: Large receptive field convolution kernels and dilated convolution are used to extract circulation background features, and pooling is used to reduce the resolution; Local branch: Small convolutional kernels are used to maintain high resolution and extract local convection and cloud physics features; Feature fusion layer: The features of the two branches are spatially aligned and then concatenated along the channel dimension; The temporal convolutional long short-term memory network is ConvLSTM (Convolutional Long Short-Term Memory Network), which is used to model the temporal dependencies of multi-time-step fused features; The spatial decoding network is an upsampling network based on transposed convolution, used to restore the feature map to its original spatial resolution.

[0011] Preferably, in step S5, the conditional generative adversarial network includes a generator and a discriminator; the generator is the whole of the feature extraction, temporal modeling and decoding network; the discriminator takes the precipitation prediction map and the corresponding conditional meteorological field as input and outputs its authenticity probability. During adversarial training, the discriminator is updated every 20 iterations, and the generator's total loss is the weighted sum of the content loss and the adversarial loss, with the adversarial loss having a weight of 0.1.

[0012] Preferably, in step S5, the content loss of the combined loss function is a weighted sum of the weighted Focal-Tversky loss and the soft critical success index loss; In the weighted Focal-Tversky loss, the parameters of the Tversky exponent are α=0.61 and β=0.48, and the Focal parameter is γ=3. The soft critical success index loss is for the heavy precipitation category, and is calculated based on the Softmax probability to determine the differentiable number of hits, false alarms, and missed alarms.

[0013] Preferably, in step S6, the AdamW optimizer is used in conjunction with a periodic learning rate scheduling strategy for model training. The periodic learning rate scheduling strategy causes the learning rate to undergo a cycle of change from low to high and then down to a lower level during the training process. Gradient clipping is used during the training process. Precision, recall and F1 score for each precipitation level are calculated on the validation set, and the macro-average F1 score is used as the basis for model selection.

[0014] Preferably, in step S7, the refined grid forecast product includes a precipitation level classification map and a heavy precipitation risk probability map, which are stored in NetCDF (Network Common Data Form) format and contain time, latitude and longitude coordinates and metadata information.

[0015] This invention also provides a short-term heavy precipitation prediction system based on deep learning, comprising: The data preprocessing module is used to read and standardize multi-source meteorological data; The feature engineering module is used to divide variable scales and construct time-sliding window samples; The multi-scale spatiotemporal prediction module includes a bi-branch convolutional network, ConvLSTM, and a spatial decoding network, which are used to extract features and generate precipitation probabilities. The adversarial training module is used to generate constrained prediction results for the adversarial network through conditions. The loss optimization module is used to calculate the weighted Focal-Tversky loss and the soft-critical success index loss; The model evaluation module is used to calculate classification indicators and business indicators; The product generation module is used to output precipitation level prediction maps and risk probability maps.

[0016] Compared with the prior art, the present invention has the following beneficial effects: By integrating multi-scale feature extraction, temporal dependency modeling, adversarial learning mechanisms, and optimization strategies for class imbalance problems, a significant improvement in the ability to make refined spatiotemporal predictions of short-term heavy precipitation was achieved. At the model architecture level, a dual-branch convolutional network is used to extract differentiated features for large-scale circulation background and local convection characteristics, and the receptive field is expanded by dilated convolution, effectively capturing multi-level meteorological information from the weather scale to the convective scale. In terms of temporal modeling, a Convolutional Long Short-Term Memory (ConvLSTM) network is introduced to model the evolution of precipitation systems while preserving spatial structure, overcoming the shortcomings of traditional methods in spatiotemporal dependency modeling. In terms of training and optimization, a combination of weighted FocalTversky loss and Critical Success Index (CSI) loss is designed to directly optimize indicators of business interest, and is supplemented by adversarial constraints from a Generative Adversarial Network (GAN) to enable the model to generate precipitation prediction maps with more reasonable spatial structure and more in line with meteorological laws. Furthermore, by constructing samples through a time-sliding window and combining it with a time-enhancing strategy, the class imbalance problem caused by the scarcity of heavy precipitation samples was alleviated. The organic combination of these techniques enables the model to more accurately identify the spatial location, intensity level, and evolution trend of heavy precipitation events, improving the precision and operational availability of short-term nowcasting, and providing more reliable technical support for urban flood prevention, watershed flood warning, and emergency response decision-making. Attached Figure Description

[0017] Figure 1 This is a flowchart of the prediction method according to Embodiment 1 of the present invention; Figure 2 This is a model structure diagram of Embodiment 1 of the present invention; Figure 3 This is a visualization comparison of the results of the short-term heavy precipitation spatiotemporal prediction model of this invention; Figure 4 This is a comparison chart of the comprehensive performance of the short-term heavy precipitation spatiotemporal prediction model of this invention; Figure 5 This is a schematic diagram of the structure of the electronic device of the present invention.

[0018] Figure 5 In Chinese: 10. Electronic device; 11. Processor; 12. Read-only memory (ROM); 13. Random access memory (RAM); 14. Bus; 15. Input / output (I / O) interface; 16. Input unit; 17. Output unit; 18. Storage unit; 19. Communication unit. Detailed Implementation

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

[0020] Example 1: Complete Prediction Process Figure 1 The flowchart of the short-term heavy precipitation prediction method provided by the present invention is shown in the figure. The method includes the following steps: 1.1 Data Reading and Quality Control In this embodiment, the Haihe River Basin was selected as the target study area. This invention uses the `read_nc_data` function to systematically read meteorological reanalysis data files in NetCDF (Network Common Data Form) format. NetCDF is a widely used self-describing, machine-independent data format in meteorology, capable of efficiently storing and accessing multidimensional array data. The data source is ERA5 reanalysis data from the European Centre for Medium-Range Weather Forecasts (ECMWF), with a spatial resolution of 0.25° × 0.25° and a temporal resolution of 6 hours, covering complete meteorological observation records for six years from January 2019 to December 2024.

[0021] The data reading process includes the following key steps: First, open the NetCDF file and extract the time dimension information. Time variables are usually stored in reference time formats such as "hours since 1900-01-01 00:00:00". The numeric time needs to be converted to a cftime date object using the num2date function, and then further converted to a Python standard datetime object and a Unix timestamp for subsequent processing and alignment. Second, read the three-dimensional data of 18 meteorological variables one by one, including total precipitation, convective precipitation, large-scale precipitation, the east-west and north-south components of wind speed at 10m and 100m altitudes, 2m temperature, sea level pressure, sea surface temperature, surface pressure, cloud base height, high, medium, and low cloud cover, total cloud cover, total column water vapor, and the K index. These variables comprehensively reflect the complete meteorological state from the surface to the upper atmosphere, from large-scale circulation to local convection.

[0022] In the data quality control phase, time-dimensional consistency checks are performed on all variables at each time point. If the time length of a variable is found to be inconsistent with the baseline time series, the program will throw an exception and display specific mismatch information to ensure data integrity. For potentially missing values ​​(NaN) in the data, a zero-filling strategy is adopted. This is because after normalization, the zero values ​​are within a reasonable range and will not have an abnormal impact on model training. Simultaneously, missing value statistics are recorded. If the missing value rate of a variable or at a certain time exceeds 10%, it is marked as low-quality data in the quality report for researchers' reference.

[0023] The entire data reading process employs a streaming approach, avoiding loading all data into memory at once and effectively controlling memory usage. The 6-year data set contains approximately 8760 complete 3D meteorological fields spanning 6 hours.

[0024] 1.2 Dataset Partitioning and Statistical Analysis Based on chronological order, the original dataset was divided into three parts: a training set, a validation set, and a test set. Data from January 2019 to December 2022 served as the training set, spanning four years and containing 5844 observation points. Data from the entire year of 2023 served as the validation set, containing 1460 observation points, used for model parameter tuning and early stopping strategy determination. Data from the entire year of 2024 served as an independent test set, containing 1464 observation points, used for final model performance evaluation. This ensures that the test data is completely independent of the training data in time, avoiding data leakage.

[0025] During the partitioning process, special attention is paid to maintaining the temporal continuity of the data. Because precipitation systems exhibit significant temporal evolution, randomly shuffling samples would disrupt temporal dependencies. Therefore, this invention employs a sequential partitioning strategy to ensure that the training, validation, and testing sets are strictly separated along the timeline, meeting the forward-looking requirements of real-world operational forecasts.

[0026] Statistical analysis of precipitation levels on the training set revealed a highly unbalanced sample distribution. By pixel, category 0 (no or trace precipitation), with precipitation less than 1 mm, comprised 8,263,701 samples (92.66%), making it the dominant category. Category 1 (light rain), with precipitation of 1-3.6 mm, comprised 371,504 samples (4.17%). Category 2 (moderate rain), with precipitation of 3.6-6.78 mm, comprised 141,508 samples (1.59%). Category 3 (heavy rain and torrential rain), with precipitation greater than or equal to 6.78 mm, comprised only 141,471 samples (1.59%).

[0027] This extreme sample imbalance is one of the core challenges in short-term heavy precipitation forecasting. In nature, heavy precipitation events are inherently low-probability, high-impact events, occurring far less frequently than periods of no or light precipitation. If imbalanced data is used directly to train the model, the optimization algorithm tends to predict most samples as the majority class 0 to minimize the overall loss function, resulting in extremely weak identification of the minority classes, especially the third class of heavy precipitation. For example, even if the model predicts all samples as class 0, the overall accuracy can still reach 94%, but it completely misses the heavy precipitation that is of most concern to the business, rendering the model useless.

[0028] To quantify the severity of sample imbalance, the Imbalance Ratio (IR) is calculated as the ratio of the number of majority class samples to the number of minority class samples. The IR of this dataset is approximately 638,918,184 / 141,471, which falls under the category of severe imbalance. To address this issue, this invention employs several strategies in subsequent steps, including sample augmentation, weighted loss functions, and the Focal mechanism, to ensure that the model has sufficient sensitivity to rare heavy precipitation events.

[0029] 1.3 Calculation of Normalized Parameters Data normalization is a key step in deep learning preprocessing. Its purpose is to scale input variables with different units and numerical ranges to a similar range, preventing variables with excessively large or small values ​​from dominating model training, accelerating gradient descent convergence, and improving model stability.

[0030] This invention employs the Min-Max Normalization method, which calculates the minimum and maximum values ​​of each input variable based on the training set. Then, all data sets (training, validation, and test) are linearly scaled using a formula to map them to the interval between zero and one. The normalization formula is: the standardized value equals the original value minus the minimum value, then divided by the difference between the maximum and minimum values, with a very small constant 1e-8 added to prevent the denominator from being zero.

[0031] In the specific calculation process, the total precipitation (tp) excluding the 17 input variables in the training set as the prediction target was statistically analyzed separately. Taking sea surface temperature (sst) as an example, the minimum value of this variable in the training set was 273.15 Kelvin, approximately 0 degrees Celsius, corresponding to the winter sea surface temperature; the maximum value was 303.45 Kelvin, approximately 30 degrees Celsius, corresponding to the high-temperature period in summer. After normalization, 273.15 K was mapped to 0, 303.45 K was mapped to 1, and the intermediate values ​​were linearly distributed.

[0032] The minimum sea level pressure (msl) is 98,500 Pascals, corresponding to low-pressure systems or typhoon influences; the maximum is 103,200 Pascals, corresponding to high-pressure control weather. The minimum temperature at 2 meters (t2m) is 253.15 K (approximately -20°C), occurring during winter cold waves; the maximum is 313.15 K (approximately 40°C), occurring during summer heat waves. The minimum wind speeds at 10 meters (u10, v10) are approximately -15 meters per second, and the maximum is approximately 15 meters per second, covering conditions ranging from calm to strong winds.

[0033] The convection parameter K-index has a minimum value of -10 and a maximum value of 40. A larger K-index indicates a more unstable atmospheric stratification, which is more conducive to convection development. The total column water vapor (tcrw) has a minimum value of 5 kg / m², corresponding to dry weather, and a maximum value of 70 kg / m², corresponding to abundant water vapor conditions. The cloud cover variables hcc, mcc, lcc, and tcc range from 0 to 1, representing the percentage of cloud cover. While these values ​​are already close to the normalized range, they are still standardized for consistent processing.

[0034] After normalizing all variables, a numerical stability check is performed. For potential infinity or non-numeric NaN values, the NumPy function `nan_to_num` is used: missing values ​​(NaN) are replaced with 0, positive infinity with 1, and negative infinity with 0. Finally, the `clip` function is used to strictly constrain all values ​​to the interval between zero and one, ensuring no outliers escape.

[0035] The minimum and maximum values ​​of each variable in the normalization parameters serve as important metadata for the model and are stored along with the trained model parameters. In practical business applications, upon receiving new real-time observation data, it must be standardized using the same normalization parameters before being input into the model for prediction. Using different normalization parameters will cause a shift in the distribution of the input data, resulting in a significant degrade in model performance.

[0036] 1.4 Precipitation classification and time series construction Precipitation intensity classification is the process of converting continuous precipitation into discrete category labels, which is the foundation for classification and prediction. This invention, taking into account the climate characteristics and flood control needs of the Haihe River Basin, divides 6-hour cumulative precipitation into four levels according to the proportion of precipitation data available. The division ratios are the 90th and 95th percentiles after removing zero values, corresponding to precipitation amounts of 3.6 mm and 6.78 mm, respectively.

[0037] Category 0 is defined as no precipitation or trace precipitation, with a 6-hour cumulative precipitation of less than 1 mm. This type of weather accounts for the vast majority of the time, corresponding to sunny, cloudy, or only scattered light rain, and will not cause significant impact. Category 1 is defined as light rain, with a 6-hour cumulative precipitation between 1 mm and 3.6 mm. This precipitation intensity is weak, usually caused by steady precipitation or weak convection, and may have a slight impact on traffic but no warning is required. Category 2 is defined as moderate rain, with a 6-hour cumulative precipitation between 3.6 mm and 6.78 mm. This precipitation intensity is moderate and may cause localized waterlogging, requiring attention. Category 3 is defined as heavy rain or above, with a 6-hour cumulative precipitation greater than or equal to 6.78 mm. This is the most concerning heavy precipitation event, which may cause urban flooding, agricultural waterlogging, and flash floods in small and medium-sized rivers, requiring early warning and prevention.

[0038] The selection of the precipitation classification threshold comprehensively considers meteorological significance and statistical distribution. From a statistical perspective, this threshold ensures that the sample size of each category maintains a certain proportion, preventing any one category from disappearing completely or becoming too balanced and losing practical significance. In practical applications, the classification threshold can be flexibly adjusted according to the climate characteristics and disaster prevention needs of different regions.

[0039] The time series data construction employs a sliding window strategy, a classic method for processing time series data. The window length is set to 4 time points, corresponding to historical observations every 6 hours over a 24-hour period. For each window, the 3D meteorological field of 17 input variables from 4 consecutive time points is extracted and combined into an input sequence, serving as the model's features. The precipitation at the 5th time point after the window is graded and used as the prediction target label. The window slides forward with a step size of 1, advancing one time point at a time to generate the next sample.

[0040] For example, for continuous observations from time t1 to t8, the first sample uses the meteorological field from t1 to t4 as input and the precipitation level at t5 as the target; the second sample uses t2 to t5 as input and the precipitation level at t6 as the target; and so on, until the last sample uses t4 to t7 as input and the precipitation level at t8 as the target. This sliding window strategy makes full use of the overlapping information of the time series, increases the number of training samples, and maintains the temporal dependencies between samples.

[0041] For the 5844 time points in the training set, subtracting the window length of 4, 5840 initial training samples can be generated. However, considering the sample imbalance problem, this invention further implements a temporal augmentation strategy. Specifically, all generated samples are scanned, and samples with the target label of three types of heavy precipitation are identified. For each of the three types of samples, if the preceding window and the following window exist in time, they are additionally extracted and added to the training set as augmented samples.

[0042] This time-enhancing strategy is based on the physical intuition of meteorology: heavy precipitation events are rarely isolated occurrences, but rather part of an evolving weather system. Before heavy precipitation, there is usually a stage of convective system organization and development, manifested by precursor signals such as enhanced low-level convergence, rising water vapor convergence, increased K-index, and increased cloud cover. After heavy precipitation, the system gradually weakens and dissipates, and the precipitation rate decreases, but the circulation characteristics retain a certain inertia. Therefore, the meteorological field before and after heavy precipitation also contains important information related to the heavy precipitation; incorporating this information into training can help the model learn the complete life cycle characteristics of heavy precipitation and improve its sensitivity to identifying heavy precipitation events.

[0043] After time augmentation, the number of training samples increased from 5840 to approximately 9034, and the proportion of samples from the three classes increased from 1.59% to 3.06%. Although still a minority class, the relative proportion has significantly improved. Simultaneously, because the augmented samples are temporally adjacent to the original heavy precipitation samples, they form a denser distribution region in the feature space, which helps the model learn the decision boundaries of heavy precipitation samples and reduces the risk of overfitting.

[0044] It should be noted that this enhancement strategy is only applied to the training set; the validation and test sets retain their original time series data to ensure the objectivity of the model evaluation. In practical business applications, no enhancement is performed; the model directly predicts based on a sliding window of real-time observations.

[0045] 1.5 Feature Extraction from a Two-Branch Convolutional Neural Network The occurrence and development of precipitation are influenced by multiple scale meteorological systems. On a large scale, the atmospheric circulation background, ranging from hundreds to thousands of kilometers, determines the basic conditions for water vapor transport and dynamic lifting, such as upper-level troughs, low-level jet streams, and water vapor channels. On a smaller scale, local convective processes, ranging from several kilometers to tens of kilometers, determine the fine distribution of precipitation, such as orographic forcing, land-sea temperature differences, and boundary layer convergence. Traditional numerical models need to simulate these multi-scale processes simultaneously, resulting in extremely high computational costs.

[0046] This invention innovatively designs a dual-branch convolutional neural network, DualBranchCNN, which optimizes large-scale background fields and local fine fields respectively through two parallel feature extraction paths, achieving efficient multi-scale feature fusion.

[0047] Large-scale branch architecture: This branch takes eight large-scale background field variables as input, including sea surface temperature, sea level pressure, surface pressure, 2-meter temperature, 100-meter wind speed, total column water vapor, and convective precipitation. These variables have large spatial correlation scales, and changes in single-point values ​​often reflect large-scale circulation anomalies. Therefore, the large-scale branch employs large receptive field convolution kernels and dilated convolution techniques to expand the spatial field of vision of neurons.

[0048] The first layer uses a 7×7 convolutional kernel, outputting 64 feature channels, with padding set to 3 to maintain the spatial size. The 7×7 kernel can perceive information within a 7×7 grid area, corresponding to a geographical distance of approximately 175 km × 175 km, and can capture mesoscale weather systems. The activation function used is LeakyReLU, with a slope parameter set to 0.1. Compared to traditional ReLU, this preserves small gradients in negative regions, alleviating the gradient vanishing problem and accelerating training convergence.

[0049] The second layer uses a 5×5 convolutional kernel combined with a dilated convolution with a dilation rate of 2, outputting 128 feature channels. Dilated convolution expands the receptive field exponentially without increasing the number of parameters by inserting holes between the kernel elements. With a dilation rate of 2, the effective receptive field of the 5×5 convolutional kernel expands to 9×9, corresponding to a spatial range of approximately 225 km × 225 km, capable of sensing weather-scale systems.

[0050] The third layer performs 2×2 max pooling, reducing the spatial resolution by half. This operation serves two purposes: first, to further abstract features and extract higher-level semantic information; and second, to reduce computational cost, saving resources for subsequent deeper layers. The spatial size of the feature map after pooling is reduced from 33×37 to 16×18.

[0051] The fourth layer again uses a 3×3 dilated convolution with a dilation rate of 2, outputting 256 feature channels. After multiple layers of receptive field expansion, the neurons are now able to integrate meteorological information over a range of hundreds of kilometers, effectively capturing large-scale circulation modes.

[0052] Local branch architecture: This branch takes nine local fine-field variables as input, including 10-meter wind speed, cloud base height, cloud cover at each layer, K-index, and large-scale precipitation. These variables exhibit significant spatial variations and local differences, requiring high resolution to capture fine structure.

[0053] The local branches all use small 3×3 convolutional kernels with padding of 1 to maintain the same spatial size. The first layer outputs 64 channels, the second layer outputs 128 channels, and the third layer outputs 256 channels, all using LeakyReLU activation. Compared to the large-scale branches, the local branches do not perform pooling operations, always maintaining the original 33×37 spatial resolution, ensuring the ability to recognize fine features such as local convection and boundary layer processes.

[0054] Feature fusion strategy: After feature extraction, the output size of the large-scale branch is the batch size, time step, 256 channels, 16 height, and 18 width, while the output size of the local branch is the batch size, time step, 256 channels, 33 height, and 37 width. Since the two are not aligned in spatial dimensions, they need to be aligned before fusion.

[0055] This invention uses bilinear interpolation to upsample the large-scale branch output, restoring a spatial resolution of 33×37. Bilinear interpolation is a smooth interpolation method that calculates the interpolation point value by weighted averaging of the surrounding four points, resulting in smoother interpolation compared to nearest neighbor interpolation and faster computation than bicubic interpolation. After upsampling, the spatial resolution of large-scale features is aligned with local features, while preserving the global information extracted from the large receptive field.

[0056] Finally, the outputs of the two branches are concatenated along the channel dimension to form a fused feature map of 512 channels: 256+256. This concatenation method ensures that the feature vector at each spatial location simultaneously contains local information of that location and background information of the entire region, achieving an organic combination of multi-scale information. The fused feature map has the following dimensions: batch size, time step, 512 channels, height 33, width 37. This maintains spatial refinement while incorporating multi-scale semantics, laying a solid foundation for subsequent temporal modeling.

[0057] 1.6 ConvLSTM Temporal Dependency Modeling Precipitation systems exhibit distinct temporal evolution characteristics. The formation, development, maturation, and dissipation of convective clouds is a continuous dynamic process with timescales ranging from hours to days. While traditional convolutional neural networks can extract spatial features, their ability to process the temporal dimension is limited. They typically simply concatenate or average features from multiple moments, failing to effectively model temporal dependencies.

[0058] Long Short-Term Memory (LSTM) networks are an improvement on recurrent neural networks. By introducing gating mechanisms—input gates, forget gates, output gates, and memory units—they can selectively remember and forget information, capturing long-term temporal dependencies. However, standard LSTMs are designed for one-dimensional sequential data. When directly applied to two-dimensional spatial data, the space needs to be flattened into vectors, which destroys the spatial structure information.

[0059] Convolutional Long Short-Term Memory (ConvLSTM) is an extension of LSTM for spatiotemporal data. It was proposed by Shi et al. in 2015 and applied to precipitation nowcasting. The core idea of ​​ConvLSTM is to replace matrix multiplication in LSTM with convolution operations, so that the state-to-state and input-to-state transitions maintain spatial structure, making it naturally suitable for processing spatiotemporal sequence data such as video and weather fields.

[0060] ConvLSTM cell structure: A ConvLSTM cell receives three inputs: the input features at the current time step, the hidden state at the previous time step, and the memory cell at the previous time step, and outputs two states: the hidden state at the current time step and the memory cell. The specific calculation process is as follows: First, the current input and the previous hidden state are concatenated along the channel dimension to form a combined feature. Then, a 3×3 convolutional kernel with padding of 1 is used to calculate the gating signal, with the output channel number being 4 times the number of hidden state channels, corresponding to four gates. The convolutional output is then divided into four blocks along the channel dimension, corresponding to the input gate, forget gate, output gate, and candidate memory unit, respectively.

[0061] The input and forget gates are activated by a sigmoid function, compressing their values ​​to between 0 and 1, representing the proportion of information that passes through. Candidate memory cells are activated by a tanh function, compressing their values ​​to between -1 and 1, representing the new information to be added. The output gate is also activated by a sigmoid function.

[0062] The update formula for the current memory unit is: forget gate multiplied by the previous memory unit, plus input gate multiplied by the candidate memory unit. This formula embodies the core mechanism of LSTM: selectively retaining historical memories through the forget gate and selectively adding new information through the input gate, thus achieving long-term storage and updating of information.

[0063] The current hidden state is calculated as: output gate multiplied by the tanh activation of the memory cell. The output gate controls how much memory information is passed to the next level or the next time step.

[0064] Temporal modeling process: For each training sample, there are 512-channel fused features across 4 time steps, with a spatial size of 33×37. The hidden state and memory unit dimensions of the ConvLSTM are set to 256 channels, with the same spatial size as the input. At the initial time step t=0, the hidden state and memory unit are initialized to all-zero tensors.

[0065] Starting from the first time step, the features from each time step are sequentially input into the ConvLSTM unit to update the hidden state and memory unit. In the first time step, the 512-channel input is concatenated with the all-zero hidden state, and after convolution and gating, the 256-channel hidden state and memory unit for the first time step are obtained. In the second time step, the 512-channel input is concatenated with the hidden state from the first time step to calculate the state for the second time step. The third and fourth time steps are iterated sequentially.

[0066] Ultimately, only the hidden state at the last moment of the fourth time step is retained as the output, with dimensions equal to the batch size: 256 channels, 33 pixels high, and 37 pixels wide. This hidden state integrates the temporal information from the four time steps, containing both the features of the latest moment and retaining the memory of historical evolution, making it the most informative representation for future precipitation prediction.

[0067] Compared to simple temporal concatenation or 3D convolution, ConvLSTM has two significant advantages. First, it is highly parameter-efficient; ConvLSTM shares weights through a recurrent structure, resulting in a much smaller number of parameters compared to 3D convolution. Second, it has strong temporal dependency modeling capabilities; its gating mechanism can learn which historical information is important for the current prediction and which should be forgotten, achieving adaptive temporal feature fusion. In precipitation prediction tasks, ConvLSTM has proven effective in capturing the evolutionary patterns of precipitation systems, including their movement, development, intensification, and weakening.

[0068] 1.7 Refined Reconstruction of UNet Decoder After temporal modeling using ConvLSTM, the feature map has a spatial size of 33×37 and 256 channels. However, due to the max pooling operation performed in the large-scale branches, the spatial resolution of the feature map actually undergoes a process of reduction and recovery. To generate the final precipitation prediction map, a decoder network is needed to reconstruct the abstract high-level features into pixel-level prediction results.

[0069] This invention employs a decoder architecture similar to UNet (U-shaped encoder-decoder network). UNet was originally designed by Ronneberger et al. in 2015 for medical image segmentation. Its core idea is to restore spatial resolution through progressive upsampling while preserving detailed information from the encoder through skip connections. Although the encoder in this invention differs from the standard UNet (dual-branch + ConvLSTM), the decoder part borrows the upsampling strategy from UNet.

[0070] First-layer upsampling: Upsampling is performed using transposed convolution, also known as deconvolution. The transposed convolution kernel size is 2×2 with a stride of 2, achieving a 2x upsampling, restoring the spatial size from 16×18 to 32×36. Since the ConvLSTM output is 33×37, this describes the size after pooling for the large-scale branch; the actual decoder input is already a fused 33×37. The transposed convolution outputs 128 channels, half the 256 channels of the input, gradually reducing feature complexity.

[0071] After upsampling, a 3×3 convolutional layer is applied, maintaining 128 channels and spatial dimensions to further refine the features. Both layers use the LeakyReLU activation function.

[0072] The second refinement layer involves adding another 3×3 convolutional layer, reducing the number of channels from 128 to 64 while maintaining the same spatial dimensions. The purpose of this layer is to compress the feature dimensions and focus on the most critical discriminative information.

[0073] Output layer: Finally, a 1×1 convolution is used as the classification head, mapping 64 channels to 4 channels, corresponding to 4 precipitation levels. The 1×1 convolution is equivalent to performing fully connected classification on the 64-dimensional feature vector at each spatial location, with a small number of parameters and high computational efficiency. The output 4-channel logits represent the raw score of each pixel belonging to each precipitation level, which has not yet been normalized to probability.

[0074] Resolution Alignment: Due to the potential for slight spatial dimension deviations caused by convolution and upsampling operations, bilinear interpolation is used after the output layer for final resolution alignment. This ensures that the output size is exactly the batch size: 4 channels, 33 pixels high, and 37 pixels wide, perfectly matching the spatial dimensions of the true labels. This alignment is crucial; if the output size does not match the label size, the loss function calculation will fail.

[0075] The decoder design balances the smoothness of upsampling with the fineness of features. Compared to simple nearest neighbor or bilinear interpolation upsampling, transposed convolution can learn more complex upsampling patterns and recover more details. The layer-by-layer reduction of the number of channels aligns with the feature pyramid concept: higher layers have abstract features and more channels, while lower layers have more concrete features and fewer channels. The final output is a 4-channel prediction map, with each channel corresponding to a score map of a precipitation level. After softmax normalization, the sum of the four channel values ​​for each pixel is 1, representing the probability distribution of the pixel belonging to each level.

[0076] 1.8 Generative Adversarial Networks Enhance Extreme Event Recognition Generative Adversarial Networks (GANs), proposed by Goodfellow et al. in 2014, represent a significant breakthrough in deep learning. A GAN consists of two competing networks: a generator attempts to produce realistic fake samples to deceive a discriminator, while the discriminator tries to distinguish between real and generated samples. Through adversarial training, the generator continuously improves, eventually generating high-quality samples that conform to the distribution of real data.

[0077] In precipitation prediction tasks, the motivation for introducing GANs is to enhance the model's ability to identify extreme events and address the problems of distribution bias and insufficient physical consistency. Standard classification loss functions, such as cross-entropy, optimize pixel-level classification accuracy but do not concern themselves with whether the generated precipitation map conforms to the spatial distribution pattern of actual precipitation. For example, real heavy precipitation often presents as continuous precipitation bands or convective cells, exhibiting a certain degree of spatial coherence and structure. If the model predicts heavy precipitation as isolated scattered points or an unreasonable spatial distribution, although the pixel-level accuracy may not be low, it is not realistic from a meteorological perspective.

[0078] The discriminator in a GAN can learn the overall distribution characteristics of real precipitation, including spatial structure, texture patterns, and edge shapes. Driven by adversarial loss, the generator not only needs to predict the correct precipitation level, but also needs to make the predicted results spatially indistinguishable from real precipitation, thereby generating more realistic and reasonable precipitation maps.

[0079] Discriminator Network Structure: This invention employs a Conditional Discriminator, whose input consists of two parts: a real or generated precipitation map and a conditional meteorological field. The precipitation map is a 4-channel one-hot encoded or softmax probability map, while the conditional meteorological field comprises 17 channels of large-scale and local variables at the last moment. The two are concatenated along the channel dimension to form a 21-channel input.

[0080] The discriminator employs a convolutional structure similar to PatchGAN, progressively reducing spatial resolution through multiple convolutional layers to extract global and local features. The first layer uses a 4×4 convolutional kernel with a stride of 2, outputting 64 channels. No normalization is used; LeakyReLU activation with a slope of 0.2 is applied, and a Dropout rate of 0.3 is added to prevent overfitting. The convolution with a stride of 2 achieves a 2x downsampling.

[0081] The second layer uses 4×4 convolutions with a stride of 2, outputting 128 channels. Instance normalization (InstanceNorm) is used instead of batch normalization. Instance normalization calculates the normalization statistic independently for each sample, without depending on other samples in the batch, resulting in more stable training, which is particularly suitable for GANs. LeakyReLU and Dropout are also used.

[0082] The third layer uses a 4×4 convolution with a stride of 2, outputting 256 channels, and continues downsampling and feature abstraction. After three layers of downsampling, the spatial size is reduced from 33×37 to approximately 4×5.

[0083] The fourth layer uses adaptive average pooling, pooling feature maps of arbitrary size into 1×1, i.e., global average pooling. This operation completely eliminates the spatial dimension, resulting in a 256-dimensional feature vector.

[0084] The fifth layer is flattened into one dimension, followed by a fully connected layer, which outputs a single numerical value. After sigmoid activation, it is mapped to a value between 0 and 1, representing the probability that the input is a real sample.

[0085] The role of conditional input: By using the meteorological field as a conditional input discriminator, the discriminator not only determines whether the precipitation map is accurate but also whether the precipitation map matches the meteorological field. For example, if the meteorological field shows strong low-level convergence, abundant water vapor, and a high K-index, but the precipitation map shows no precipitation, this combination, while potentially accurate on its own, contradicts the meteorological field, and the discriminator should classify it as false. This conditional constraint guides the generator to learn the physical relationship between the meteorological field and precipitation, improving the physical consistency of the prediction.

[0086] Adversarial training strategy: In each training iteration, the discriminator is trained first. Real precipitation maps and corresponding meteorological fields are extracted from the training set and input into the discriminator, with the label set to 1 (true). Then, a generator is used to generate pseudo precipitation maps, which are input into the discriminator along with the same meteorological fields, with the label set to 0 (false). The binary cross-entropy loss is calculated, and the discriminator parameters are updated via backpropagation.

[0087] To prevent the discriminator from becoming too powerful and hindering the generator's learning, this invention employs a strategy of updating the discriminator only once every 20 iterations. In the remaining 19 iterations, the discriminator parameters are frozen, and only the output is computed for the generator's use. This asymmetric update effectively balances the capabilities of the generator and discriminator, avoiding common GAN training problems such as mode collapse.

[0088] Next, the generator is trained. The generator produces a pseudo-precipitation map, which is input into the discriminator along with the weather field, but the label is set to 1 (true), meaning the generator aims to deceive the discriminator into believing the generated map is real. The adversarial loss is calculated as the binary cross-entropy between the discriminator output and label 1, while the content loss (Tversky and CSI losses of the generated map and the real label) is also calculated. The total generator loss is 0.9 times the content loss plus 0.1 times the adversarial loss; the weighting prioritizes prediction accuracy, with adversarial loss as a secondary factor. Backpropagation updates the generator parameters.

[0089] Label smoothing technique: In discriminator training, the labels of real samples are not hard 1, but soft labels between 0.7 and 0.9, while the labels of fake samples are 0. This one-sided label smoothing is a common technique in GAN training, which can prevent the discriminator from becoming overconfident, leave room for improvement in the generator, and improve training stability.

[0090] Through adversarial training, the generator not only learned to accurately predict precipitation levels but also learned to generate results that conform to the actual spatial distribution patterns of precipitation. In heavy precipitation forecasting, this realism translates into increased sensitivity to heavy precipitation events, reduced missed reports, and enhanced early warning capabilities.

[0091] 1.9 Optimization of Weighted Loss Function The loss function is the core of deep learning model training, directly determining the model's optimization objective and final performance. For the highly imbalanced and high-risk classification task of short-term heavy precipitation prediction, the standard cross-entropy loss function has significant shortcomings: it treats all classes and samples equally, leading to the model being dominated by the majority class (no precipitation) and having weak ability to identify the minority class (heavy precipitation).

[0092] This invention innovatively designs a combined loss function that integrates weighted Focal-Tversky loss and soft CSI loss, optimizing model performance from multiple perspectives.

[0093] The Tversky index, a generalization of the Jaccard index IoU, was proposed by Tversky in 1977 to measure the similarity between sets. In binary or multi-class classification tasks, the Tversky index is defined as true positives divided by the sum of true positives and false positives multiplied by α, plus false negatives multiplied by β. The parameters α and β control the relative importance of false positives and false negatives.

[0094] When α=β=0.5, the Tversky index degenerates into the Dice coefficient. When α=β=1, it degenerates into the Jaccard index. When α<β, the penalty for false negatives is greater than that for false positives. In precipitation forecasting operations, the consequences of missing heavy precipitation are often more severe than those of false positives. Missing a report means no early warning, which may lead to casualties and property damage; while false positives, although wasting defense resources, avoid greater losses. Therefore, this invention sets α=0.61 and β=0.48, making β slightly larger than α, reflecting the forecasting principle of "better safe than sorry."

[0095] The introduction of the Focal mechanism: Focal Loss, proposed by Lin et al. in 2017, is used to address the class imbalance problem in object detection. Its core idea is to reduce the weight of easily classified samples and increase the weight of difficult-to-classify samples by adjusting a factor. Specifically, for samples with high prediction probabilities, the model is already very confident, and the loss is significantly reduced; for samples with low prediction probabilities, the model is uncertain or makes incorrect predictions, and the loss remains at a higher level.

[0096] This invention applies the Focal mechanism to Tversky loss, resulting in Focal-Tversky loss. The loss value is equal to 1 minus the Tversky exponent, then raised to the power of γ, where γ is set to 3. When the Tversky exponent is close to 1, the prediction is good, and the loss is close to 0; when the Tversky exponent is low, the prediction is poor, and the loss is amplified. γ=3 means cubic amplification, giving more attention to difficult samples.

[0097] For example, assuming a Tversky index of 0.9 indicates good prediction performance, the base loss is 1 - 0.9 = 0.1, which decreases to 0.1 after Focal augmentation. 3 =0.001, the loss is almost negligible. Assuming another sample has a Tversky index of 0.3 and poor prediction, the base loss is 0.7, which is reduced to 0.7 after Focal augmentation. 3 =0.343, the loss is still very high. This mechanism automatically shifts the training focus to unpredictable samples, especially rare heavy precipitation samples.

[0098] Category-weighted strategy: Even within the same sample, different precipitation levels have different importance. Category 0 (no precipitation) has a large proportion, but the impact of prediction errors is small; Category 3 (heavy precipitation) has a small proportion, but the impact of prediction errors is large. To reflect this difference, this invention assigns different weights to the four categories.

[0099] The optimal weights are calculated using Optuna, an automated software framework for hyperparameter optimization of machine learning models. Optuna employs a "define-run" model for efficient hyperparameter search. Implemented in Python, its core functionalities include hyperparameter space definition, search algorithm scheduling, evaluation result recording, and optimal parameter extraction, enabling multi-round iterative experiments without manual intervention.

[0100] The weighted total loss is the weighted sum of the losses for each category divided by the sum of the weights, ensuring the numerical stability of the loss value. This weighting mechanism forces the model to pay more attention to the heavy precipitation category during optimization, even at the cost of sacrificing some accuracy for class 0, in order to improve the recall rate for class 3.

[0101] Operational Orientation of Soft CSI Loss: The Critical Success Index (CSI) is a core indicator for evaluating precipitation forecast performance in operational weather forecasting, defined as TP / TP+FP+FN. CSI comprehensively considers hits, false alarms, and missed alarms; a higher value indicates a better forecast. However, the standard CSI is based on a hard classification result of 0 or 1, is non-differentiable, and cannot be directly used for backpropagation optimization in neural networks.

[0102] This invention proposes the concept of Soft CSI, replacing hard classification with softmax probabilities, making CSI differentiable. Specifically, for three types of heavy precipitation, Soft TP equals the model output probabilities of the three types multiplied by an indicator function indicating whether the true label is 3, summed over all pixels. Soft FP equals the three types of probabilities multiplied by an indicator function indicating the true label is not 3, summed. Soft FN equals 1 minus the three types of probabilities, multiplied by an indicator function indicating the true label is 3, summed. Soft CSI equals Soft TP divided by Soft TP plus Soft FP plus Soft FN.

[0103] The soft CSI loss is defined as 1 minus the soft CSI; a smaller value indicates a higher CSI and better prediction. By directly optimizing the soft CSI, the model's training objective is aligned with the business evaluation metric, avoiding the inconsistency between proxy losses such as cross-entropy and the true objective. In experiments, after fusing the soft CSI loss, the model's hard CSI metric on the test set significantly improved, validating the effectiveness of this direct optimization strategy.

[0104] The final form of the combined loss is: content loss equals 0.6 times the weighted Focal-Tversky loss plus 0.4 times the soft CSI loss. The ratio of 0.6:0.4 was determined through grid search experiments, balancing the importance of pixel-level classification accuracy (Tversky's focus) and the importance of the business metric (CSI). The generator's total loss equals the content loss plus 0.1 times the adversarial loss. The adversarial loss has a relatively small weight, ensuring that the auxiliary role of the GAN does not interfere with the main prediction task.

[0105] All operations in the loss function—softmax, multiplication, addition, division, and exponentiation—are differentiable, supporting end-to-end gradient backpropagation. In each iteration, the model calculates the prediction result based on the current parameters, calculates the combined loss, calculates the gradient of the loss with respect to the parameters through automatic differentiation, and updates the parameters using the optimizer, gradually reducing the loss and improving performance.

[0106] 1.10 Test Set Performance Evaluation In this experiment, we adopted As the main evaluation indicator. Precision is the harmonic mean of precision and recall, widely used in machine learning and deep learning to comprehensively measure prediction accuracy and coverage. Precision is defined as the number of true positives divided by the total number of samples predicted as positive, i.e., The recall rate is defined as the number of true positive samples divided by the total number of samples that should have been identified as positive. .

[0107] The formula for the value is defined as follows: in, This represents the hit count, which is the number of events that were correctly predicted. This represents the number of false alarms, i.e., the number of events that were incorrectly predicted. This represents the number of missed reports, i.e., the number of events that were not predicted.

[0108] The score ranges from 0 to 1, with a higher score indicating better overall predictive performance of the model.

[0109] remove In addition, the experiment also used three evaluation metrics—CSI, POD (Probability of Detection), and FAR (False Alarm Ratio)—to evaluate the model from multiple perspectives.

[0110] CSI, also known as Threat Score (TS), is an indicator that measures the degree of match between predicted and observed events. It comprehensively considers hit (TP), false negatives (FN), and false positives (FP). A CSI closer to 1 indicates a more accurate prediction, while a CSI closer to 0 indicates a poorer prediction. CSI is very sensitive to extreme events (such as heavy precipitation) because it penalizes both false negatives and false positives. Probability Detection Rate (POD) measures the proportion of observed events that are correctly predicted, also known as the hit rate. A higher POD indicates that the model predicts the actual events more comprehensively. However, POD only focuses on whether the observed event is hit, without considering the number of false positives, so sometimes a high POD may be accompanied by a high number of false positives. False Alarm Rate (FAR) measures the degree to which the model produces false alarms when predicting heavy precipitation events. It indicates what proportion of all predicted events did not actually occur, thus reflecting the model's ability to control false alarms in the process of identifying short-term heavy precipitation.

[0111] Example 2: In order to gain a deeper understanding of the contribution of each technical component to the model performance, this example designed a series of ablation studies, that is, removing or replacing a component one by one and comparing the performance changes.

[0112] 2.1 Verification of the Necessity of Weighted Loss Function Experimental setup: Keep the model structure and other training settings unchanged, only change the loss function: Configuration A: Standard cross-entropy loss, no class weights Configuration B: Class-weighted cross-entropy loss, weights [1.38, 64.63, 100.86, 121.51] Configuration C: Weighted Focal-Tversky Loss (Full Version of this Invention) Results Comparison: Table 1: Comparison of Results for Different Loss Function Models The analysis is as follows: The performance of the standard cross-entropy configuration A is extremely poor, with an F1 score of only 0.1967, a CSI score of only 0.1091, a hit probability (POD) of only 14.54%, and a false alarm rate (FAR) as high as 69.63%. This verifies that for extremely imbalanced data, the standard loss function causes the model to be severely biased towards the majority class, almost losing its ability to identify the minority class. During training, in order to minimize the overall cross-entropy loss, the model tends to predict most samples as class 0, resulting in a false alarm rate of over 85% for heavy rainfall, which is of utmost concern to the business, rendering the early warning system virtually ineffective.

[0113] After introducing class weights in configuration B, performance improved significantly: F1 increased dramatically from 0.1967 to 0.4176 (a 112% improvement), CSI from 0.1091 to 0.2639 (a 142% improvement), and POD from 14.54% to 34.83% (a 140% improvement). This indicates that class weights effectively balanced the learning of each class, forcing the optimization algorithm to focus more on heavy precipitation features by amplifying the loss of the three classes of samples by 121.51 times. However, the hit rate was still less than 35%, meaning that nearly two-thirds of heavy precipitation warnings were still missed, and the false alarm rate remained at 47.85%, with about half of the heavy precipitation warnings being false alarms. This shows that while simple class weighting improved the problem, it was still insufficient, requiring a more refined loss function design.

[0114] Configuration C, employing a weighted Focal-Tversky combined loss, achieves the best overall performance: F1 improves to 0.5129 (a 160.8% improvement compared to Configuration A and a 22.8% improvement compared to Configuration B), CSI improves to 0.3449 (a 216.1% improvement compared to Configuration A and a 30.7% improvement compared to Configuration B), and POD improves to 52.48% (a 260.9% improvement compared to Configuration A and a 50.7% improvement compared to Configuration B). Configuration C achieves this performance leap through the following three mechanisms: Tversky asymmetric penalty: By adjusting α=0.61 and β=0.48, the penalty for false negatives is slightly greater than that for false positives, which is in line with the principle of "better safe than sorry" in heavy precipitation forecasts and effectively reduces the underreporting rate.

[0115] Focal Hard Sample Augmentation: By amplifying by a power of γ=3, a larger gradient is applied to samples with low prediction difficulty in the Tversky index, causing the model to shift its learning focus to hard-to-identify heavy precipitation samples, further improving the hit rate.

[0116] Soft CSI business metric optimization: Directly optimize the critical success index, a core business evaluation metric, to align training objectives with actual application needs. While improving POD, it controls FAR, achieving the optimal balance between hit rate and false alarm rate.

[0117] While configuration C may have a slightly lower overall accuracy than configuration A because it misclassifies some class 0 samples as other classes, this is a reasonable and necessary trade-off. In heavy rainfall warning operations, the losses in personnel casualties and property damage caused by missed reports far outweigh the losses and waste of defense resources caused by false alarms. Therefore, sacrificing a small amount of overall accuracy to significantly improve heavy rainfall identification capabilities is entirely in line with operational needs and public safety priorities.

[0118] 2.2 Effectiveness Analysis of Time Enhancement Strategy Experimental setup: Configuration A: No time augmentation, 5840 training samples, 3 classes accounting for 1.59% Configuration B: Temporal augmentation, 9034 training samples, 3 classes accounting for 3.06% Results Comparison: Table 2: Comparison of the impact of time augmentation strategies on the model The analysis is as follows: Configuration A, without time-based augmentation, had a limited sample size for heavy precipitation (class 3), accounting for only 1.59% of the training set. The model encountered very few heavy precipitation scenarios during training, resulting in insufficient statistical learning of this type of event. On the test set, the recall rate (POD) for all three classes was only 40.53%, meaning that more than half of the heavy precipitation events were not identified (severe false negatives). Although the false alarm rate was low (FAR=43.58%), the low recall rate resulted in a final F1 score of only 0.4718, indicating limited overall recognition capability.

[0119] With configuration B and time augmentation, the number of training samples increased from 5840 to 9034, with the proportion of samples from the three classes increasing from 1.59% to 3.06%, a relative improvement of approximately 92.5%. Although heavy precipitation remains a minority class, its number has increased significantly. More importantly, the time augmentation strategy introduces contextual information before and after heavy precipitation, enabling the model to learn the lifecycle characteristics of heavy precipitation: the signals before it occurs, the strong convective eruption structure during its occurrence, and the evolution of the event's decay phase.

[0120] Therefore, in the test set, the model's recall for all three classes significantly improved to 52.48%, while the false negative rate decreased markedly; the CSI improved from 0.3087 to 0.3449, and the F1 score improved from 0.4718 to 0.5129, a relative improvement of 8.7%, demonstrating that the model's sensitivity and stability to heavy precipitation events have both improved. Although the FAR increased slightly, which is typical of the cost of enhanced minority class recall, the overall recognition capability has still been comprehensively improved.

[0121] Conclusion: The time augmentation strategy effectively improves the model's learning ability for heavy precipitation events by expanding the number of heavy precipitation samples, compensating for their scarcity, and introducing evolutionary context features. It is an effective means to alleviate the problem of precipitation category imbalance.

[0122] 2.3 Contribution Evaluation of Generative Adversarial Networks Experimental setup: Configuration A: Pure generator training, no discriminator, loss function is weighted Focal-Tversky + soft CSI Configuration B: Introducing GAN adversarial training, with adversarial loss weights of 0.1. This invention adopts... Results Comparison: Table 3: Comparison of the impact of generative adversarial networks on the model The analysis is as follows: Configuration A (without GAN) achieved the highest precision across all three classes at 62.75%, indicating a conservative approach to heavy precipitation detection and a low false alarm rate (FAR = 37.25%). However, the recall rate was only 40.27%, meaning that over half of the heavy precipitation events were missed. While the model maintained good predictive reliability, its operational value for heavy precipitation early warning was limited due to insufficient coverage. The final F1 score was 0.4906, indicating only average overall recognition capability.

[0123] Configuration B, which incorporates a GAN (with an adversarial loss weight of 0.1) into the model, significantly improved the recall to 52.48% and reduced false negatives. Although the precision decreased to 50.16% (FAR increased to 49.84%), the overall recognition ability improved, with the F1 score increasing to 0.5129 and the CSI rising from 0.3250 to 0.3449. The GAN discriminator can learn the statistical characteristics of the spatial distribution of real heavy precipitation, thereby prompting the generator to output predictions that more closely approximate the actual structure of heavy precipitation, effectively enhancing the model's sensitivity to heavy precipitation.

[0124] Conclusion: Generative adversarial networks (GANs) can drive the generator to learn the spatial distribution characteristics of real precipitation fields through feedback from the discriminator, which is particularly helpful in improving the recall rate of the heavy precipitation category (3 categories). In this task, an adversarial loss weight of 0.1 can achieve a good balance between improving recall rate and maintaining training stability. If the weight is too small, the improvement is limited, while if it is too large, it may lead to training instability or the generator overfitting the discriminator.

[0125] 2.4 The Importance of Multi-Scale Feature Extraction Experimental setup: Configuration A: Adopts a single-branch network structure, merging all meteorological variables and inputting them uniformly; Configuration B: Adopts the dual-branch fusion network structure proposed in this invention.

[0126] Results Comparison: Table 4: Comparison of the impact of multi-scale feature extraction on the model The analysis is as follows: In Configuration A, all meteorological variables are directly merged and uniformly input into a single branch network without distinguishing or specifically modeling their spatial scale and physical properties. Although this structure can simultaneously receive multiple meteorological information, such as humidity fields, temperature fields, wind fields, and vertical velocity, the model struggles to automatically learn the structural differences between features from different sources and at different scales because all variables are processed in parallel within the same channel. For example, large-scale circulation background and local convection triggering signals differ significantly in spatial distribution characteristics, mechanisms of action, and spatiotemporal scales, but the single-branch structure cannot effectively distinguish and model these differences, leading to a mixture and ambiguity in the high-level features extracted by the model. While this "indiscriminate fusion" approach can capture some large-scale conditions related to precipitation, it weakens the ability to characterize local strong convection, micro-scale triggering, and fine-grained precipitation structures. Therefore, the model's performance in spatial detail and heavy precipitation identification is limited, with F1=0.4564, CSI=0.2957, and POD=0.4025, placing its overall performance at a moderate level.

[0127] Configuration B uses the dual-branch fusion structure proposed in this invention. This structure enables the model to simultaneously perceive two complementary sources of information: the large-scale circulation background provides the "weather environment base," while the local-scale branch captures fine structures such as convection triggering, vertical velocity, and local humidity abrupt changes. Dual-branch fusion achieves multi-scale joint feature representation from the synoptic scale to the mesoscale and then to the convective scale, which is more consistent with the physical mechanism of heavy precipitation formation.

[0128] Experimental results show that multi-scale fusion significantly improved model performance. F1 score increased from 0.4564 to 0.5129 (+12.4%), CSI from 0.2957 to 0.3449 (+16.6%), and recall (POD) increased dramatically from 40.25% to 52.48% (+30.3%). Although FAR increased slightly, which is a typical cost of enhanced recall, overall recognition performance and the ability to capture heavy precipitation were significantly improved.

[0129] Conclusion: Precipitation prediction is a typical multi-scale coupled problem, and relying solely on single-scale features cannot fully characterize the occurrence process of heavy precipitation. A two-branch multi-scale fusion structure can fully utilize the background circulation and local convection signals, and effectively integrate them into the model, representing a key technical approach to improve the performance of short-duration heavy precipitation prediction.

[0130] To comprehensively evaluate the effectiveness of the proposed method, this embodiment systematically compares the hybrid model under the GAN framework designed in this invention (denoted as the GAN-Hybrid model, i.e., the complete model of this invention) with two typical baseline models. These two baseline models are: the CNN-UNet model (a static prediction model based on spatial convolution and encoder-decoder structures) and the LSTM-UNet model (a temporal prediction model with recurrent neural networks at its core). All models were trained and tested on the same training set (2019-2022), validation set (2023), and independent test set (2024), using completely consistent data preprocessing procedures, sample partitioning strategies, and evaluation metrics to ensure the fairness of the comparison.

[0131] 3.1 Introduction to Experimental Setup and Comparison Model The GAN-Hybrid model (this invention): As described in Examples 1 and 2, this model integrates a dual-branch CNN (to extract large-scale circulation and local fine features respectively), ConvLSTM (to model spatiotemporal evolution dependencies), a UNet decoder (for refined spatial reconstruction), and a conditional generative adversarial network (to enhance the identification of extreme events and the rationality of spatial distribution). Its loss function adopts a combination of weighted Focal-Tversky loss and soft CSI loss, and is further optimized with adversarial loss.

[0132] The CNN-UNet baseline model employs a classic encoder-decoder (U-Net) architecture. The encoder uses multi-layer convolution and pooling operations to extract spatial features from the input meteorological field (features from multiple time points are concatenated across channels). The decoder uses transposed convolutions to progressively upsample and restore the image to high resolution, ultimately outputting a precipitation level classification map. This model primarily focuses on the extraction and reconstruction of spatial features, but its ability to model temporal dependencies is relatively weak.

[0133] The LSTM-UNet baseline model first inputs the multivariate time series data (4 historical moments) for each spatial grid point into an LSTM layer to capture the temporal evolution characteristics of each location. Then, the temporal features output by the LSTM (one feature vector per location) are reorganized into a two-dimensional feature map, which is then input into a U-Net decoder for spatial reconstruction to generate a precipitation prediction map. This model emphasizes temporal dependency modeling but has limitations in handling spatial correlations and multi-scale feature fusion.

[0134] The evaluation metrics include the F1 score (F1), critical success index (CSI), hit rate (POD), and false alarm rate (FAR) as defined in Example 2, with a focus on the prediction performance for Category 3 (heavy precipitation, ≥6.78 mm).

[0135] 3.2 Comparison of Visualization Results Figure 3 The results visually demonstrate the comparison between the predictions of the three models and the actual situation during a typical heavy rainfall event (selected from the test set).

[0136] In the figure, column (a) shows the true precipitation data, column (b) shows the prediction results of the GAN-Hybrid model, column (c) shows the prediction results of the CNN-UNet baseline model, and column (d) shows the prediction results of the LSTM-UNet baseline model. As can be seen from the figure: The CNN-UNet prediction results show scattered areas of heavy precipitation with poor spatial continuity, failing to fully capture the actual zonal structure, and significant deviations in the location and extent of the heavy precipitation centers. This confirms its lack of effective spatiotemporal correlation modeling. The LSTM-UNet prediction results show slightly better spatial structure of precipitation than CNN-UNet, but the heavy precipitation areas remain blurry with unclear boundaries, and the characterization of the precipitation band direction is still inaccurate. This indicates that point-based LSTMs are insufficient to reconstruct reasonable spatial morphology. The GAN-Hybrid prediction results are closest to the actual distribution. The model successfully predicted the direction of the main heavy precipitation bands, and the location, shape, and intensity of the heavy precipitation centers are highly consistent with reality. The spatial structure of the predicted map is clear and coherent, demonstrating the ConvLSTM's ability to capture system movement and the GAN discriminator's constraint on the actual spatial distribution characteristics of precipitation.

[0137] 3.4 Overall Performance Comparison Figure 4 The comparison of F1 score, CSI, POD, and FAR of the three models in the short-term heavy precipitation level is presented in the form of a bar chart.

[0138] This figure further confirms that the GAN-Hybrid model performs best in heavy precipitation (type 3), outperforming both baseline models across the board. This demonstrates that the multi-scale spatiotemporal features extracted by the method of this invention have universality, improving the overall predictive ability for various precipitation events, rather than optimizing only for extreme samples.

[0139] Conclusion: The system comparison experiments in this embodiment demonstrate that, compared to the CNN-UNet model which focuses only on spatial features and the LSTM-UNet model which focuses only on single-point time series, the proposed hybrid model (GAN-Hybrid) integrating dual-branch CNN, ConvLSTM, and GAN exhibits comprehensive and significant performance advantages in the task of refined spatiotemporal prediction of short-term heavy precipitation. This model can more accurately predict the location, intensity, and spatial morphology of heavy precipitation, and significantly improves key operational indicators (such as CSI and POD). It effectively addresses the shortcomings of traditional data-driven methods in spatiotemporal dependency modeling, multi-scale feature fusion, and extreme event identification, providing a more reliable technical solution for achieving high-resolution, accurate forecasting and early warning of short-term heavy precipitation.

[0140] Example 4: Electronic equipment for implementing short-term heavy rainfall prediction methods Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown in this embodiment, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed in this embodiment.

[0141] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0142] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0143] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 is configured to perform the short-term heavy precipitation fine spatiotemporal prediction method described in Embodiment 1 above.

[0144] In some embodiments, the refined spatiotemporal prediction method for short-duration heavy precipitation can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the refined spatiotemporal prediction method for short-duration heavy precipitation described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the refined spatiotemporal prediction method for short-duration heavy precipitation by any other suitable means (e.g., by means of firmware).

[0145] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A short-term heavy precipitation prediction method based on deep learning, characterized in that, Includes the following steps: S1. Data Acquisition and Preprocessing: Collect multi-source meteorological observation and reanalysis data within the target area, and extract multiple meteorological variables related to precipitation physical processes; S2. Variable grouping and normalization: Based on the spatial influence range of the variables, the meteorological variables are divided into large-scale background field variables and local fine-scale variables, and normalization parameters are calculated based on the training set to normalize all data. S3. Training Sample Construction: Using a time sliding window strategy, the meteorological fields at multiple consecutive historical moments are used as input, and the precipitation classification results at future moments are used as the prediction target to construct training samples. For categories with scarce heavy precipitation samples, temporal neighborhood enhancement is performed to increase their sample proportion; S4. Multi-scale spatiotemporal feature extraction and prediction: Construct a dual-branch convolutional feature extraction network to extract and fuse the features of the large-scale background field variables and the local fine-scale variables respectively; input the fused multi-time-time features into a temporal convolutional long short-term memory network to extract temporal evolution features; The deep temporal features are restored to high-resolution space through a spatial decoding network, and the probability distribution of precipitation levels at future times is output. S5. Adversarial Training and Loss Optimization: A conditional generative adversarial network framework is adopted, using the meteorological field as a condition to adversarially constrain the precipitation prediction results output by the generator; a combined loss function is designed, including weighted Focal-Tversky loss and soft critical success index loss, to optimize the model parameters. S6. Model Training and Evaluation: The model is trained using an optimizer and learning rate scheduling strategy, and the optimal model is selected on the validation set based on classification metrics and business metrics. S7. Prediction Product Generation: Input the test meteorological data into the trained model to obtain a precipitation level probability map. Determine the precipitation level by taking the maximum value and extract the probability of heavy precipitation risk to generate a refined grid forecast product.

2. The method according to claim 1, characterized in that, The meteorological variables mentioned in step S1 include at least 18 meteorological variables from total precipitation, convective precipitation, large-scale precipitation, wind speed components at different altitudes, temperature, air pressure, sea surface temperature, cloud cover, convective parameters, and total column water vapor.

3. The method according to claim 1, characterized in that, In step S2, the large-scale background field variables include sea surface temperature, sea level pressure, surface pressure, 2-meter temperature, 100-meter wind speed component, total column water vapor, and convective precipitation; the local fine-scale variables include 10-meter wind speed component, cloud base height, low, medium, and high cloud cover, total cloud cover, K index, and large-scale precipitation.

4. The method according to claim 1, characterized in that, In step S3, the precipitation classification includes four levels: no precipitation, light rain, moderate rain, heavy rain and above; the time sliding window length is 4 time periods, and the prediction target is the precipitation classification result of the 5th time period; for heavy precipitation samples, samples from adjacent time windows before and after them are extracted for enhancement.

5. The method according to claim 4, characterized in that, In step S4, the dual-branch convolutional feature extraction network includes: Large-scale branch: Large receptive field convolution kernels and dilated convolution are used to extract circulation background features, and pooling is used to reduce the resolution; Local branch: Small convolutional kernels are used to maintain high resolution and extract local convection and cloud physics features; Feature fusion layer: The features of the two branches are spatially aligned and then concatenated along the channel dimension; The temporal convolutional long short memory network is ConvLSTM, which is used to model the temporal dependencies of multi-time-step fusion features; The spatial decoding network is an upsampling network based on transposed convolution, used to restore the feature map to its original spatial resolution.

6. The method according to claim 5, characterized in that, In step S5, the conditional generative adversarial network includes a generator and a discriminator; the generator is the whole of the feature extraction, temporal modeling and decoding network; the discriminator takes the precipitation prediction map and the corresponding conditional meteorological field as input and outputs its authenticity probability. During adversarial training, the discriminator is updated every 20 iterations, and the generator's total loss is the weighted sum of the content loss and the adversarial loss, with the adversarial loss having a weight of 0.

1.

7. The method according to claim 1, characterized in that, In step S5, the content loss of the combined loss function is the weighted sum of the weighted Focal-Tversky loss and the soft critical success index loss; In the weighted Focal-Tversky loss, the parameters of the Tversky exponent are α=0.61 and β=0.48, and the Focal parameter is γ=3. The soft critical success index loss is for the heavy precipitation category, and is calculated based on the Softmax probability to determine the differentiable number of hits, false alarms, and missed alarms.

8. The method according to claim 1, characterized in that, In step S6, the AdamW optimizer is used in conjunction with a periodic learning rate scheduling strategy for model training. The periodic learning rate scheduling strategy causes the learning rate to undergo a cycle of change from low to high and then down to an even lower level during the training process. Gradient clipping was used during training; precision, recall, and F1 score were calculated for each precipitation level on the validation set, and the macro-average F1 score was used as the basis for model selection.

9. The method according to claim 1, characterized in that, In step S7, the refined grid forecast product includes a precipitation level classification map and a heavy precipitation risk probability map, which are stored in NetCDF format and contain time, latitude and longitude coordinates and metadata information.

Citation Information

Patent Citations

  • Heavy rainfall forecasting method based on double-branch convolution LSTM model

    CN119886214A

  • Summer rainfall forecast correction downscaling method and system based on deep learning

    CN121743832A