A precipitation prediction method, system and electronic device
By constructing an end-to-end deep neural network architecture, explicitly decoupling temporal, spatial, and intensity features, and combining dynamic reweighting and online correction, the three-dimensional imbalance problem in precipitation prediction is solved, improving the accuracy of extreme precipitation prediction and the model's generalization ability, and supporting real-time early warning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN SANJIANG CLP TECH
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-12
Smart Images

Figure CN122194346A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of meteorological and hydrological forecasting technology, and in particular to a precipitation forecasting method, system, and electronic equipment. Background Technology
[0002] Currently, precipitation forecasting faces a triple challenge of temporal, spatial, and intensity imbalances: temporally, it exhibits dramatic fluctuations in seasonal concentration and diurnal rhythm differences (nighttime precipitation is less frequent than daytime precipitation, but more destructive). Spatially, it suffers from stratified geographical patterns (significant differences in precipitation between mountainous and plain areas) and regional heterogeneity. In terms of precipitation intensity, it follows a heavy-tailed distribution of extreme events (heavy rainstorms account for less than 5% of the sample, yet contribute 30%-40% of the total). This imbalance leads to a chain reaction of "sample scarcity - feature failure - physical mismatch" for deep learning models, causing existing static weighting methods (such as SMOTE and Focal Loss) to fail due to their inability to adapt to multi-scale dynamic coupling and physical continuity constraints. These shortcomings severely limit the application of deep learning in precipitation forecasting.
[0003] To address the uneven intensity of precipitation values in long-term time-series forecasts, patent CN202110931255.X proposes a dual-branch, dual-stage deep model. This model uses a classification branch as an auxiliary task, dividing 6-minute precipitation into five intervals (0, 0.1-1mm, 1-2mm, 2-3mm, >3mm). It employs a reweighted cross-entropy loss (with weights inversely proportional to the sample size of each interval), forcing the model to enhance its feature extraction capabilities for tail-end heavy precipitation samples during the training phase. The regression branch is responsible for outputting continuous precipitation values, and the dual-stage training strategy further refines the mapping relationship of heavy precipitation. To address the limitations of spatial correlation modeling between meteorological stations (i.e., "spatial sparsity"), patent CN202510947666.6 proposes a graph reconstruction and spatial self-attention mechanism. This mechanism calculates the similarity of meteorological time-series data using Pearson correlation coefficient + DTW dynamic time warping, constructing a sparse dynamic graph structure (KNN retains Top-K correlation connections) to replace the geographical adjacency matrix; it introduces a spatial self-attention mechanism, fusing static association graphs and dynamic attention weights to adaptively adjust the information aggregation intensity between nodes. Addressing the spatial regional differences and systematic biases in sub-seasonal (15-60 days) precipitation forecasting, patent CN202510321416.1 uses K-means clustering to divide the country into 16 climatic sub-regions, with joint modeling within each sub-region to amplify the sample size; it introduces the Indian Ocean Basin Consistent Mode (IOBM) as a sea surface temperature background constraint, classifying historical return data into three categories: positive anomaly years, negative anomaly years, and normal years, constructing CDF correction curves for each, achieving probability mapping correction under the dual elements of "climate zoning + physical constraints." The above three patents propose different solutions to the single-dimensional problems of intensity, space, and physical constraints, respectively, and have achieved good results in practical applications, effectively improving the practical application of precipitation forecasting.
[0004] Existing technologies fail to systematically address the three-dimensional imbalance between time, space, and intensity in precipitation forecasting, and lack a collaborative architecture for explicit multi-scale decoupling and dynamic adaptive reweighting, leading to: 1. Training bias: The model is biased towards the majority class of samples (light rain, plain stations, and stable periods), resulting in low prediction accuracy for extreme precipitation, sparse stations, and turning point weather. 2. Feature aliasing: Spatiotemporal feature coupling leads to the loss of fine structure of rapidly evolving weather such as strong convection; 3. Generalization bottleneck: Static weights and partitions cannot adapt to the differences in the spatiotemporal evolution rate of weather conditions.
[0005] While CN202110931255.X alleviates the long-tail distribution problem of precipitation intensity through a classification-regression bi-branch and static reweighting mechanism, its reweighting coefficients remain fixed and cannot adapt to the dynamic changes in the probability of precipitation of different intensities during the evolution of weather systems. At the same time, this method only focuses on single-station radar time-series data and does not consider the unevenness of spatial distribution of multiple stations (such as the difference between sparse stations for heavy rain in mountainous areas and dense stations for light rain in plains), resulting in bias in spatial feature extraction. In addition, it does not distinguish the time scale differences between short-term strong convective precipitation and continuous precipitation. The detailed features of strong precipitation are easily submerged in the time-series smoothing process, making it difficult to capture the refined evolution features of minute-level extreme precipitation. Although CN202510947666.6 breaks through the traditional geographical adjacency limitation through graph reconstruction and spatial self-attention mechanism, spatiotemporal features are still implicitly coupled in attention calculation, failing to achieve explicit decoupling to independently optimize temporal dynamics and spatial heterogeneity. Although the graph structure it constructs can be dynamically updated, it lacks a multi-scale spatial hierarchy from mesoscale convective systems to large-scale weather systems, and cannot capture cross-scale spatial dependencies. More importantly, this method does not design a special spatial association reinforcement learning mechanism for sparse but high-impact events such as extreme precipitation (>50mm / h), resulting in weak prediction ability for rare heavy precipitation. While CN202510321416.1 uses K-means climate zoning and sea surface temperature background constraints to improve the physical consistency of sub-seasonal predictions, its offline clustering results are static and cannot adapt to the dynamic spatial evolution of weather system movement. The method does not introduce an online reweighting mechanism during training, resulting in insufficient robustness for predictions of boundary areas or transition zone samples. In addition, its technical framework focuses on long-term predictions of 15-60 days and does not involve short-term (0-6 hours) multi-scale time modeling, making it difficult to transfer to minute-level early warning scenarios and limiting its generalization ability. Summary of the Invention
[0006] This invention provides a precipitation prediction method, system, and electronic device to address the shortcomings of existing technologies.
[0007] In a first aspect, the present invention provides a method for predicting precipitation, comprising: Acquire multi-source meteorological observation data of the target area, and preprocess and construct multi-scale labels for the multi-source meteorological observation data; The preprocessed multi-source meteorological observation data is input into an end-to-end deep neural network architecture. The multi-scale spatiotemporal decoupling encoder contained in the deep neural network architecture extracts decoupling features from the data in the three dimensions of time, space and intensity. The extracted features are then fused into a unified high-dimensional representation through cross-scale feature interaction and fusion. Using the three-dimensional dynamic reweighting network contained in the deep neural network architecture, a time-space-intensity joint weight tensor is dynamically generated based on real-time weather characteristics, and the importance of samples during the training process is recalibrated. The hierarchical prediction decoder contained in the deep neural network architecture outputs the prediction results of precipitation probability distribution at multiple future time scales. The deep neural network architecture is optimized during training using an imbalanced perception joint loss function to improve the prediction accuracy of extreme heavy precipitation events.
[0008] According to the precipitation prediction method provided by the present invention, the multi-scale spatiotemporal decoupling encoder includes: The time-decoupled encoder employs parallel dilated causal convolution branches with different dilation rates to extract multi-resolution dynamic features of minute-level strong convection and hour-level continuous precipitation, respectively, and achieves multi-resolution feature fusion through cross-scale residual connections. A spatially decoupled encoder is constructed to create a dynamic multi-scale graph structure, which includes L1-level mesoscale nodes and L2-level synoptic-scale nodes. A cross-scale graph attention mechanism is used to achieve bidirectional information interaction between the two levels of nodes. The intensity decoupled encoder performs quantile transformation on the original precipitation regression labels to alleviate the long-tail problem of distribution and extracts the specific feature representations of precipitation at different intensity levels. The cross-scale feature interaction and fusion module is used to enable bidirectional interaction of three-dimensional decoupled features of time, space and intensity through a cross-scale attention mechanism, and to generate a unified high-dimensional representation by using a gated fusion mechanism and residual connection.
[0009] According to the precipitation prediction method provided by the present invention, the time decoupling encoder has four layers of dilated causal convolution with a dilation rate of [1,2,4,8]. The short-time branch d=8 is used to capture minute-level meteorological element pulse disturbance characteristics, and the long-time branch d=1 is used to extract hourly weather system gradual trend characteristics.
[0010] According to the precipitation prediction method provided by the present invention, the L1 level mesoscale nodes in the spatial decoupled encoder are generated by spatial-meteorological element dual-constraint clustering, and the edge weights between nodes are dynamically calculated based on the time-delay correlation of inter-regional mass flux and energy exchange; the L2 level synoptic scale nodes are constructed by matching the geopotential height field with historical rainstorm weather modes.
[0011] According to the precipitation prediction method provided by the present invention, the three-dimensional dynamic reweighting network includes a meta-weight generator, which takes the current spatiotemporal encoded features as input and outputs a three-dimensional weight tensor; wherein: Time weight Based on the dynamic calculation of the temporal change rate of convective effective potential energy, pressure gradient and wind speed change rate, the sample weight of the corresponding time period is increased when a turning weather signal is detected. Spatial weight The system adaptively adjusts the weighting of samples from sparsely populated areas based on the complexity of the site terrain and the consistency of historical precipitation. Intensity weight A gradient harmonic mechanism is adopted to dynamically adjust the sample gradient distribution during training, thereby improving the effective participation of extreme precipitation samples.
[0012] According to the precipitation prediction method provided by the present invention, the imbalance sensing joint loss function is a multi-task loss, and the total loss is... ;in, Focal-MAE loss is applied to multi-scale time labels to enhance the prediction accuracy for transitional periods. To predict the structural similarity loss between the precipitation field and the actual precipitation field, and to constrain the data similarity between different regions; The classification weight coefficient is dynamically decayed with each training round as it combines the regression loss of precipitation intensity and the classification loss of intensity level.
[0013] According to the precipitation prediction method provided by the present invention, the method further includes the following during training: A maximum mean difference constraint is added to align the feature distributions of the training set in densely populated sites with those of the validation set in sparsely populated sites after reweighting, in order to prevent the model from overfitting.
[0014] The precipitation prediction method provided by the present invention further includes an online rolling correction step: Set an incremental learning cycle and input the latest observation data into the meta-weight generator of the three-dimensional dynamic reweighted network; By combining the time difference between the forecast lead time and the actual situation, the network parameters are dynamically fine-tuned to enable the model to adapt to the rapid evolution of weather conditions.
[0015] Secondly, the present invention also provides a precipitation prediction system, comprising: The data preprocessing and label building module is used to acquire multi-source meteorological observation data of the target area, and to preprocess and build multi-scale labels for the multi-source meteorological observation data. The multi-scale spatiotemporal decoupling coding module is used to input preprocessed multi-source meteorological observation data into an end-to-end deep neural network architecture. The multi-scale spatiotemporal decoupling encoder contained in the deep neural network architecture extracts decoupling features from the data in the three dimensions of time, space and intensity. The extracted features are then fused into a unified high-dimensional representation through cross-scale feature interaction and fusion. The three-dimensional dynamic reweighting module is used to dynamically generate a time-space-intensity joint weight tensor based on real-time weather characteristics using the three-dimensional dynamic reweighting network contained in the deep neural network architecture, and to recalibrate the importance of samples during the training process. The hierarchical prediction decoding module is used to output the prediction results of precipitation probability distribution at multiple future time scales through the hierarchical prediction decoder contained in the deep neural network architecture. The deep neural network architecture is optimized during training using an imbalanced perception joint loss function to improve the prediction accuracy of extreme heavy precipitation events.
[0016] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described precipitation prediction methods.
[0017] This invention systematically solves the problem of imbalanced 3D data by constructing an explicit 3D decoupling architecture, a 3D dynamic reweighting mechanism, and a designed imbalance-aware joint loss function. This significantly improves the effective participation and gradient contribution of extreme precipitation samples, thereby effectively increasing the hit rate of rainstorm prediction. When training with a mixture of sparse and dense regions of the data stations, the difference between the two is significantly reduced, enhancing the model's generalization ability.
[0018] The online correction mechanism proposed in this invention greatly reduces the performance degradation rate of the model in rapidly evolving weather conditions such as typhoons and fronts, and supports real-time access to heterogeneous site data and dynamic adaptation, providing a robust and interpretable end-to-end solution for short-term precipitation warnings. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the precipitation prediction method provided by the present invention. Figure 2This is one of the schematic diagrams of the overall framework of the precipitation prediction method provided by the present invention; Figure 3 This is a schematic diagram of the multi-scale spatiotemporal decoupling encoder structure provided by the present invention; Figure 4 This is a schematic diagram of the cross-scale feature interaction and fusion mechanism provided by the present invention; Figure 5 This is a schematic diagram of the three-dimensional dynamic reweighted network provided by the present invention; Figure 6 This is the second schematic diagram of the overall framework of the precipitation prediction method provided by the present invention; Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] It should be noted that, in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.
[0023] This invention constructs an end-to-end deep neural network architecture, with three core collaborative modules: a multi-scale spatiotemporal decoupling encoder that explicitly separates the time, space, and intensity feature extraction paths through dilated causal convolution and a dynamic multi-scale graph structure, and achieves information fusion using cross-scale residual interaction; a three-dimensional dynamic reweighting network that generates a time-space-intensity joint weight tensor in real time based on current weather characteristics, dynamically guiding the training of the main network to solve the three-dimensional imbalance problem; and a hierarchical prediction decoder that outputs the multi-scale precipitation probability distribution for the next 0-6 hours and uses an imbalance-aware loss function (Focal-MAE+SSIM) for collaborative optimization, thereby systematically improving the prediction accuracy and generalization ability of extreme heavy precipitation events. Specifically, this network can: In the time dimension, multi-resolution dynamic features of minute-level strong convection and hour-level persistent precipitation are independently extracted using dilated causal convolution towers, avoiding the aliasing of different time-varying mechanisms. For the short-term branch, a smaller dilation rate is used to accurately capture minute-level pulse disturbances and rapid abrupt changes in meteorological elements; the long-term branch uses an exponentially increasing dilation rate to extract the gradual trends and periodic evolution information of large-scale weather systems. The outputs of each branch are fused through cross-scale residual connections to achieve multi-resolution feature fusion, ensuring that short-term predictions retain long-term contextual dependencies, and long-term predictions fuse short-term detailed information, forming a unified representation of the complete time spectrum from instantaneous convection to persistent precipitation. In the spatial dimension, a dynamic multi-scale map structure (convective cell → weather system) is constructed. This structure achieves two-way information interaction through a cross-scale map attention mechanism, transmitting weather system regulation signals from top to bottom and feeding back local convection triggering characteristics from bottom to top, forming a closed cross-scale information loop, and adaptively strengthening the spatial correlation modeling between sparse stations and extreme precipitation events. In the intensity dimension, to address the long-tailed distribution characteristics of skewed precipitation height, a quantile transformation is employed to map the original precipitation regression labels to an approximate standard normal distribution. This transformation preserves the original order relation and the relative position information of extreme values, ensuring a balanced gradient distribution between sparse heavy precipitation samples and dense weak precipitation samples, effectively mitigating the gradient flooding problem caused by sample imbalance. Building upon this, the intensity decoupled encoder further extracts specific feature representations for precipitation of different intensity levels, providing a discriminative basis for the subsequent dynamic reweighting mechanism.
[0024] Based on this network, this invention also proposes an online adaptive correction step / module, which automatically feeds back to the model through the model's prediction results and evaluation indicators, guiding the correction and optimization of parameters and continuously improving the model's prediction accuracy. Figure 1 This is a flowchart illustrating the precipitation prediction method provided by the present invention. Figure 2 This is one of the schematic diagrams illustrating the overall framework of the precipitation prediction method provided by this invention. The specific method steps are as follows: Step 1: Obtain multi-source meteorological observation data of the target area, and preprocess and construct multi-scale labels for the multi-source meteorological observation data.
[0025] Step S1.1: Acquire multi-source meteorological observation data: The data on wind speed, wind direction, temperature, humidity, air pressure, precipitation, and radiation intensity, which are related to precipitation prediction, are obtained by ground-based automatic weather stations. The original dataset is constructed by combining these data with static attributes such as topographic elevation and distance from the sea.
[0026] Step S1.2: Data preprocessing: Due to the instability of the acquisition equipment and transmission devices, there may be some null values and outliers in the acquired raw data. Hermite interpolation is used for single-point null values, and continuous null values are marked as invalid. Outlier removal and quality control are performed on the acquired data based on the extreme values of historical meteorological data in the local area.
[0027] Step S1.3: Data Imbalance Feature Analysis and Multi-Scale Label Generation. Multi-scale labels include time-scale labels in the time dimension, spatial-scale labels in the spatial dimension, and level labels in the intensity dimension. Statistical analysis of the raw data across time, space, and intensity dimensions was conducted to confirm the existence of significant imbalances in these dimensions and to determine the data distribution intervals. Based on the data distribution, four time scale labels ({10min, 30min, 1h, 3h}) were generated using multi-resolution sliding flattening. Spatially, the prediction area was divided into two spatial masks: a 10km mesoscale region and a 50km synoptic region. In terms of intensity, precipitation was classified into seven levels according to the national standard "Precipitation Grades" (GB / T28592-2012), generating grade labels. Simultaneously, Z-score standardization is performed on the real values to generate regression labels. .
[0028] Step 2: Input the preprocessed multi-source meteorological observation data into an end-to-end deep neural network architecture. The multi-scale spatiotemporal decoupling encoder contained in the deep neural network architecture extracts decoupling features from the data in the three dimensions of time, space and intensity. The extracted features are then fused into a unified high-dimensional representation through cross-scale feature interaction and fusion.
[0029] Multi-scale spatiotemporal decoupling encoders mainly include time decoupling encoders, spatial decoupling encoders, and intensity decoupling encoders, with specific structures as follows: Figure 3 As shown, Figure 3This is a schematic diagram of the multi-scale spatiotemporal decoupling encoder structure provided by the present invention. The encoder can decouple the acquired data in terms of time, space and intensity, thereby independently extracting discriminative features of each dimension, avoiding the aliasing interference of different spatiotemporal scales and intensity mechanisms, providing a decoupling representation basis for subsequent cross-scale fusion and dynamic reweighting, and improving the accuracy of extreme precipitation modeling.
[0030] Step S2.1: Temporal Decoupling Encoder: A multi-resolution temporal pyramid is constructed using multi-layer dilated causal convolution. Parallel branches with receptive fields of 1 hour, 3 hours, and 6 hours are formed by setting different dilation rates. The short-time branch captures minute-level impulse perturbations and rapid abrupt changes in meteorological elements; the long-time branch extracts the gradual trends and periodic evolution information of large-scale weather systems. The outputs of each branch are connected across scale residuals to achieve multi-resolution feature fusion, ensuring that short-time predictions retain long-time context, and long-time predictions fuse short-time details.
[0031] Step S2.2: Spatial Decoupling Encoder: Construct a purely observation-driven dynamic multi-scale graph structure, and explicitly model spatial dependencies through a two-level hierarchical graph mesh. Level L1 (10km mesoscale region): Stations are directly aggregated into mesoscale regions through spatial-meteorological dual-constraint clustering. Convective boundaries are identified using temperature-dew point difference gradient, wind convergence intensity, and humidity advection characteristics. In densely populated areas, 5-10 stations are aggregated into a mesoscale node every 10km, while in sparsely populated areas, 3-5 stations are aggregated into a node. The edge weights between nodes are dynamically calculated based on the time-delay correlation of inter-regional mass flux and energy exchange, capturing the organization process of convective cells.
[0032] Level L2 (50KM synoptic scale area): The geopotential height field of each mesoscale unit is inverted by the pressure height formula, and model matching is performed with historical rainstorm weather modes to construct synoptic scale system node connections and establish cross-scale correlation channels between large-scale circulation background and local convection.
[0033] The two-level graph structure achieves bidirectional information interaction through a cross-scale graph attention mechanism, transmitting weather system control signals from top to bottom and feeding back local convection triggering characteristics from bottom to top, forming a closed cross-scale information loop.
[0034] Step S2.3: Intensity Decoupling Encoder: Performs a quantile transformation on the original precipitation regression labels, mapping the highly skewed long-tailed distribution to an approximate standard normal distribution. This transformation preserves the original order relation and the relative positions of extreme values, ensuring a balanced gradient distribution between sparse heavy precipitation samples and dense weak precipitation samples, effectively mitigating the gradient flooding problem caused by sample imbalance.
[0035] Step S2.4: Cross-scale Feature Interaction and Fusion: The hierarchical features output by the decoupled encoder in terms of time, space, and intensity dimensions achieve bidirectional interaction through a cross-scale attention mechanism. Residual connections are used to preserve the original information, and gated fusion adaptively selects relevant features to form a unified high-dimensional representation, providing a discriminative basis for subsequent dynamic reweighting. The specific structure is as follows: Figure 4 As shown, Figure 4 This is a schematic diagram of the cross-scale feature interaction and fusion mechanism provided by the present invention.
[0036] Step 3: Utilize the three-dimensional dynamic reweighting network contained in the deep neural network architecture to dynamically generate a time-space-intensity joint weight tensor based on real-time weather characteristics, and recalibrate the importance of samples during the training process.
[0037] Figure 5 This is a schematic diagram of the three-dimensional dynamic reweighted network provided by the present invention. See below for reference. Figure 5 Explanation: Step S3.1: Meta-weight generator: Taking the current spatiotemporal encoded features as input, outputs a three-dimensional weight tensor. Its generation logic is as follows: Time weight Based on the temporal variation rate of convective effective potential energy Pressure gradient and wind speed mutation rate Dynamic calculation. When a sudden drop in air pressure or a sudden change in wind speed is detected, the weight of the corresponding time period is automatically increased by 3-5 times, enhancing the model's ability to learn from sudden weather changes.
[0038] Spatial weight Based on the complexity of the site terrain Consistency between (slope standard deviation) and historical precipitation (Coefficient of variation) is adaptively adjusted. The weight of sparse site regions is 2.5-3.5 times that of dense site regions to ensure that samples from areas with few sites and insufficient observations are adequately trained.
[0039] Intensity weight The algorithm employs the Gradient Harmonizing Mechanism (GHM) to dynamically adjust the weights based on the gradient distribution of samples during training. For easily classifiable light rain samples with dense gradient distributions, the weights are reduced to 0.3, while for difficult-to-classify thunderstorm rain samples with sparse gradient distributions, the weights are increased to over 2.5, thereby enhancing the effective participation of extreme precipitation events.
[0040] Step S3.2: Weight application mechanism: Apply the generated three-dimensional weight tensor By multiplying each element into the loss function of each task in the main network, the importance of samples in real time is recalibrated during training to address the three-dimensional imbalance of time, space, and intensity.
[0041] The deep neural network architecture is optimized during training using an imbalanced perception joint loss function to improve the prediction accuracy of extreme heavy precipitation events.
[0042] (1) Multi-task loss design: The total loss function is designed as follows: ,in For time-scale loss function, For spatial scale loss function, This is the intensity scale loss function. These are the weighting coefficients for the temporal, spatial, and intensity loss functions, used to balance their contributions to the total loss and adjust the model's emphasis on temporal consistency, spatial structure fidelity, and intensity accuracy. The implementation principles of each loss function are as follows: Focal-MAE loss is applied to multi-scale time labels.
[0043] By focus parameters Nonlinear amplification of MAE error at time points of heavy precipitation This multiplies the accuracy of predictions for pivotal periods. Among them, This represents the actual observed precipitation value at time step t. This represents the predicted precipitation value output by the model. These are manually set hyperparameters that control the error amplification factor during periods of heavy precipitation. The larger the γ value, the higher the required accuracy of the model's prediction of precipitation inflection points. This indicates the current precipitation intensity, during the heavy precipitation phase. The value has increased significantly, enabling a focus on key weather events.
[0044] : Employing Structural Similarity Loss (SSIM Loss) between graph convolution output and the actual precipitation field:
[0045] Explicit constraints are applied to spatial texture details to overcome the loss of structural information caused by excessive smoothing in densely populated site areas. Here, GCN(X) represents the predicted precipitation field features output by the graph convolutional neural network. This represents the characteristics of the actual observed precipitation field. SSIM is the structural similarity function, which is used to calculate the similarity between the predicted precipitation field and the actual observed precipitation field.
[0046] Constructing a dual-branch loss function Among them, regression loss Processing precise values of precipitation intensity, among which These are measured precipitation values. Predict precipitation values for the model. Classification loss. Weighted cross-entropy is used to process 7 intensity levels. Weighting coefficients. The algorithm dynamically decays with each training epoch, achieving a gradual transition from classification-dominated to regression-dominated systems. The weight coefficients at step t. These are the initial weighting coefficients.
[0047] (2) Regularization: Add maximum mean difference constraint By aligning the feature distributions of the training set in densely populated site regions and the validation set in sparsely populated site regions after reweighting, the MMD distance is kept within a manageable range to prevent the model from overfitting to the majority class. This represents the feature distribution of the dense site training set after dynamic reweighting. For the sparse site validation set distribution, the two are through The mean embedding vector is generated by mapping to the reproducing kernel Hilbert space, and then the squared norm distance under the Gaussian kernel is calculated to obtain the maximum mean difference value L. MMD .
[0048] Step 4: Output the predicted precipitation probability distribution results for multiple future time scales through the hierarchical prediction decoder contained in the deep neural network architecture; Multi-scale output decoder: Outputs precipitation prediction fields at four time scales in parallel: {10 minutes, 30 minutes, 1 hour, 3 hours}. Through cross-scale consistency loss constraints, it is required that the cumulative deviation between long-term and short-term predictions be less than a threshold, ensuring the logical consistency of predictions at different scales.
[0049] Furthermore, the present invention also includes: Step 5: Online rolling correction mechanism: An incremental learning time is set, and at the set time, incremental learning inputs the latest observation data into the meta-weight generator. The network parameters are dynamically fine-tuned by combining the time difference between the prediction lead and the actual situation. This mechanism enables the model to continuously adapt to the evolution of weather conditions and maintain stable prediction skills during rapid changes such as typhoons and fronts.
[0050] This invention systematically solves the problem of imbalanced 3D data by constructing an explicit 3D decoupling architecture, a 3D dynamic reweighting mechanism, and a designed imbalance-aware joint loss function. This significantly improves the effective participation and gradient contribution of extreme precipitation samples, thereby effectively increasing the hit rate of rainstorm prediction. When training with a mixture of sparse and dense regions of the data stations, the difference between the two is significantly reduced, enhancing the model's generalization ability.
[0051] The online correction mechanism proposed in this invention greatly reduces the performance degradation rate of the model in rapidly evolving weather conditions such as typhoons and fronts, and supports real-time access to heterogeneous site data and dynamic adaptation, providing a robust and interpretable end-to-end solution for short-term precipitation warnings.
[0052] To more clearly illustrate the technical solution of the present invention, the following description is provided in conjunction with... Figure 6 The technical solution of the present invention will be described in conjunction with preferred embodiments. Figure 6 This is the second schematic diagram of the overall framework of the precipitation prediction method provided by this invention.
[0053] Example: Multi-site precipitation prediction based on CSV multi-factor data (1) Data access layer 1.1) Data Acquisition: The raw data consists of 10-minute interval series data on wind speed, wind direction, temperature, humidity, air pressure, precipitation, and radiation collected from 87 stations between 2023 and 2025. Static topographic data was obtained from official data sources, and slope was extracted from the data. Slope aspect and altitude The initialization formula for the slope weight coefficient is as follows: ,in The standard deviation of the slope in the 3km buffer zone of the station is given, with a weighted interval of [1.17, 2.50].
[0054] 1.2) Data Preprocessing: For data with single-point null values in the original data, interpolation is used to complete the data. For datasets with multiple consecutive null values, data removal is required. Historical records of meteorological elements such as wind speed, wind direction, temperature, humidity, air pressure, precipitation, and radiation for the station are compiled, and data exceeding 20% of the historical extreme values are removed. Z-score standardization is used for the processed continuous variables such as air pressure and temperature; sine and cosine decomposition is used to represent wind direction.
[0055] 1.3) Multi-scale label construction: Precipitation values are standardized and used as real-value labels. Then, based on the actual precipitation values and the "Precipitation Grades" (GB / T28592-2012), they are classified into grades to obtain intensity grade labels. The final data is then uniformly stored and retrieved.
[0056] (2) Implementation of multi-scale spatiotemporal decoupling encoder 2.1) For the time encoder, a four-layer dilated causal convolution is used, with 128 filters per layer, a kernel size of k=3, and a dilation rate [d=1,2,4,8], resulting in a receptive field of 155 time steps. The short-time branch (d=8) is specifically used to identify abrupt changes in severe convective weather, specifically when the wind speed changes over 10 minutes. Time-activated weight gain Long-term branch (d=1): Captures low-frequency trends, based on the 24-hour moving average rate of change of air pressure. Empowerment of the low-pressure development process .
[0057] 2.2) For the space encoder, a dynamic secondary map is constructed. The L1 level mesoscale region, with a spatial scale of 10 kilometers, aggregates the original observation stations into physically consistent regional nodes. This process employs a space-meteorological element dual-constraint clustering algorithm, using the temperature-dew point difference gradient... Wind field convergence intensity and temperature advection As a core clustering feature, it accurately identifies convection triggering boundaries. In densely distributed plains areas, this invention clusters 5 to 10 stations within a 10km radius into a mesoscale node; in mountainous areas with complex terrain or sparse observations, it clusters 3 to 5 stations into a node, ensuring the spatial representativeness of meteorological elements within the node. The L2-level synoptic scale extends the spatial span to 50km, and the pressure-potential height relationship at the location of each mesoscale unit is inverted using the pressure-height formula:
[0058] in, For potential height, The gas constant for dry air. The temperature is virtual. The geopotential height field obtained by inversion is matched with a two-dimensional model database of historical rainstorm weather patterns. The matching degree is calculated using a normalized cross-correlation algorithm. When the correlation coefficient exceeds 0.7, a synoptic-scale system node connection is established, forming a cross-scale correlation channel between the large-scale circulation background and local convection. This level, by introducing macroscopic constraints such as pressure and temperature fields, provides synoptic-significant control signals for L1-level mesoscale convection processes.
[0059] 2.3) The quantile normalization calculation for intensity decoupling requires statistical analysis of precipitation distribution characteristics. This invention analyzes historical precipitation data to determine the 90th quantile. and 10th percentile For any precipitation value R, its normalized mapping function is:
[0060] in This represents the inverse function of the standard normal distribution. It is at the 99th percentile. This mapping transforms the highly skewed precipitation distribution into an approximately normal distribution, making sparse, high-value precipitation samples more sensitive in the feature space, and its gradient contribution can be increased by 3-5 times.
[0061] 2.4) Cross-scale feature fusion is achieved through a three-headed cross-attention model. In this model, the event feature vector... Spatial feature vectors and intensity eigenvectors In the head dimension The model interacts with other features. Through interactive computation, it learns the correlations between different features and assigns appropriate weights to each feature. Finally, the model outputs a high-dimensional feature vector. The vector retains 30% of the original information through residual connection, ensuring that the fused feature vector retains sufficient original information, thereby improving the prediction accuracy of the model.
[0062] (3) Training of three-dimensional dynamic reweighted network During training, a weight generator based on a meta-learning structure is introduced to dynamically generate time-space-intensity three-dimensional weight tensors. .
[0063] 3.1) Time weight generation: Time weight components Based on pressure gradient Wind speed change rate and a sudden increase in radiation Calculate when detected or When this period is reached, its weight is automatically increased to 2-5 times the baseline value. The specific calculation formula is as follows: .in It is a comprehensive meteorological gradient intensity index.
[0064] 3.2) Spatial weight generation: Spatial weight The standard deviation of slope in the station buffer zone is determined by both terrain complexity and observation density. First, the standard deviation of slope in the station buffer zone is calculated. and historical precipitation variability coefficient Then, the spatial imbalance index is obtained by combining the results. ,in and This is the maximum value for the entire region. Final weight. For sites with complex terrain and sparse observations, the weight can be up to three times that of dense and flat areas, effectively compensating for the problem of insufficient gradient contribution.
[0065] 3.3) Strength Weight Generation: Strength Weight A gradient harmonic mechanism is employed. This invention statistically analyzes the gradient norm distribution of samples at each intensity level in real time. For easily classifiable samples such as light rain or no rain, the gradient norm is adjusted according to the mean of the gradient. Calculate the weight decay factor ,in To prevent division by zero by small constants, a weighting enhancement is applied to the rainstorm samples. This dynamic adjustment ensures that difficult-to-classify extreme precipitation events dominate the loss function, with a weight that is 2-3 times that of regular samples.
[0066] The aforementioned dynamic weight tensor will participate in the final loss calculation, enabling the model to continuously focus on key data segments and key regions during training, thereby improving overall prediction performance.
[0067] (4) Calculation of joint loss for imbalance perception Imbalance sensing joint loss calculation organically combines the losses in the temporal, spatial, and intensity directions, and introduces a reweighted tensor into the calculation. This achieves dynamic recalibration of samples. The specific calculation process is as follows: The model first calculates the baseline error for each input sample along the time, space, and intensity dimensions—the time scale branch uses a modified Focal-MAE: for each time step… Calculate the absolute error and multiplied by the focus factor (in The weighted time error is calculated by taking the probability of precipitation at that moment (or by using the "transition strength" factor detected by meteorological gradients). , here The time dimension is reweighted to amplify the loss during transition periods; secondly, the spatial structure loss uses structural similarity (SSIM) to measure the local brightness, contrast, and structural consistency between the predicted and observed fields, defined as... And during the calculation, each spatial unit is multiplied by a spatial weight. To compensate for the impact of sparse sites or areas with complex terrain; the intensity loss consists of two branches: classification and regression, with the classification branch using dynamically weighted cross-entropy based on intensity level. (where intensity weight) (From gradient harmonic or inverse sample frequency ratio), the regression branch uses weighted MAE. To implement the training strategy of first identifying and then fitting, the classification weight coefficients... As the intensity decreases monotonically with each training round, the final strength loss is: Finally, we introduce a distribution alignment regularization term—Maximum Mean Difference (MMD): In the reweighted feature representation space, we calculate the MMD of the feature distributions of the training set and the validation / test set, i.e. (A Gaussian kernel approximation is typically used) to constrain the means of the two domains in the RKHS to be similar, thereby reducing the distribution bias between regions. The overall loss is in the form of a weighted sum:
[0068] Among them, each This is an adjustable hyperparameter. All components in the computational process are first normalized and then compared with the three-dimensional reweighted tensor. Element-wise multiplication is performed to ensure that extreme spatiotemporal-intensity samples obtain amplified gradients during optimization, thereby systematically mitigating the training bias caused by temporal sparsity, spatial unevenness, and long intensity tails. (5) Hierarchical prediction output 5.1): Output Consistency Consistency of Prediction Results Across Scales: To ensure consistency of predictions across multiple time scales, the model simultaneously outputs forecasts at four scales: 10 minutes, 30 minutes, 1 hour, and 6 hours, and imposes hard constraints: The allowable error A consistency penalty term is added to the loss function: Penalty coefficient Ensure that the mean square error of long-term forecasting and short-term cumulative forecasting is less than 0.8.
[0069] 5.2): Formatted output of regional forecast results: The API output of this invention adopts JSON format, which includes fields such as station number, forecast time, multi-scale precipitation, 95% confidence interval, and intensity level, for example: {"station_id":"SUX23","forecast_time":"2025-12-12T14:00:00Z","precipitation_10min":2.3,"precipitation_30min":6.8,"precipitation_1h":12.5,"precipitation_6h":28.3,"confidence_interval":[1.8,2.9],"intensity_level":2}, facilitating integration and invocation by business systems.
[0070] (6) Monitoring and feedback layer 6.1): Real-time performance monitoring: This is achieved through rolling calculations of evaluation indicators from the most recent 1000 forecast periods. The MAE evaluation standard is: target error less than 0.5mm for light rain and less than 3.2mm for heavy rain. For events with moderate to heavy rain, the critical success index is calculated as CSI = hit / (hit + miss + false_alarm), with a target value greater than 0.45. When the CSI is below 0.38 for 6 consecutive hours, an early warning mechanism is automatically triggered.
[0071] 6.2): Online Rolling Learning and Updates: The incremental learning threshold for online rolling learning is set at more than 20,000 new observations per day (approximately covering the entire site for 16 hours), and the validation set loss increases. Incremental training is performed periodically. The meta-learner uses a learning rate... The weight generator parameters are adjusted accordingly after each batch update. This mechanism enables the model to adapt to new weather modes such as seasonal transitions (e.g., from the plum rain season to the typhoon season), and actual measurements show that the stability of rolling forecasts is improved by 12%–15%.
[0072] Through training and validation in this example, the dynamic reweighting of this invention increases the effective gradient contribution of sparse but critical rainstorm samples during training by 3-5 times, greatly improving the model's ability to identify high-intensity precipitation. Thanks to temporal decoupling coding and dynamic temporal weights, the prediction error for short-duration abrupt precipitation events also decreases significantly by 12%, improving the model's ability to predict sudden, short-duration heavy rainfall. The multi-scale graph structure and spatial reweighting mechanism effectively avoid the problem of densely packed stations dominating training while sparse stations are ignored, thus enhancing the model's generalization ability across different regions. A single model can be used to predict precipitation in multiple regions. Online rolling model correction allows the model to continuously adjust itself in real time based on current weather conditions, improving the model's prediction accuracy for the monitored area.
[0073] In summary, the explicit three-dimensional decoupling architecture constructed in this invention decouples time (capturing multi-resolution dynamics through dilated causal convolution towers), space (building a three-level dynamic graph structure of mesoscale-weather system), and intensity (mapping long-tailed distribution through quantile normalization), achieving explicit separation of spatiotemporal intensity features and cross-scale residual interaction, breaking through the bottleneck of traditional feature aliasing.
[0074] The three-dimensional dynamic reweighting mechanism proposed in this invention is based on a meta-learning framework. It dynamically generates a time-space-intensity joint weight tensor according to real-time weather characteristics (pressure gradient, sudden wind speed changes, and terrain complexity), adaptively strengthening transitional weather, sparse station and rainstorm samples, and solving the core defect that static weights cannot adapt to weather evolution.
[0075] The imbalance-aware joint loss function (Focal-MAE, SSIM Loss, and dual-branch dynamic transition) designed in this invention, combined with MMD distribution alignment and online rolling correction, realizes the whole-chain imbalance-cooperative optimization from data preprocessing to incremental learning.
[0076] On the other hand, the present invention also provides a precipitation prediction system, comprising: The data preprocessing and label building module is used to acquire multi-source meteorological observation data of the target area, and to preprocess and build multi-scale labels for the multi-source meteorological observation data. The multi-scale spatiotemporal decoupling coding module is used to input preprocessed multi-source meteorological observation data into an end-to-end deep neural network architecture. The multi-scale spatiotemporal decoupling encoder contained in the deep neural network architecture extracts decoupling features from the data in the three dimensions of time, space and intensity. The extracted features are then fused into a unified high-dimensional representation through cross-scale feature interaction and fusion. The three-dimensional dynamic reweighting module is used to dynamically generate a time-space-intensity joint weight tensor based on real-time weather characteristics using the three-dimensional dynamic reweighting network contained in the deep neural network architecture, and to recalibrate the importance of samples during the training process. The hierarchical prediction decoding module is used to output the prediction results of precipitation probability distribution at multiple future time scales through the hierarchical prediction decoder contained in the deep neural network architecture. The deep neural network architecture is optimized during training using an imbalanced perception joint loss function to improve the prediction accuracy of extreme heavy precipitation events.
[0077] It should be noted that the precipitation prediction system provided in this embodiment of the invention can execute the precipitation prediction method described in any of the above embodiments during actual operation, which will not be elaborated in this embodiment.
[0078] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 7 As shown, the electronic device may include a processor 710, a communications interface 720, a memory 730, and a communications bus 740. The processor 710, communications interface 720, and memory 730 communicate with each other via the communications bus 740. The processor 710 can call logical instructions from the memory 730 to execute a precipitation prediction method.
[0079] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting precipitation, characterized in that, include: Acquire multi-source meteorological observation data of the target area, and preprocess and construct multi-scale labels for the multi-source meteorological observation data; The preprocessed multi-source meteorological observation data is input into an end-to-end deep neural network architecture. The multi-scale spatiotemporal decoupling encoder contained in the deep neural network architecture extracts decoupling features from the data in the three dimensions of time, space and intensity. The extracted features are then fused into a unified high-dimensional representation through cross-scale feature interaction and fusion. Using the three-dimensional dynamic reweighting network contained in the deep neural network architecture, a time-space-intensity joint weight tensor is dynamically generated based on real-time weather characteristics, and the importance of samples during the training process is recalibrated. The hierarchical prediction decoder contained in the deep neural network architecture outputs the prediction results of precipitation probability distribution at multiple future time scales. The deep neural network architecture is optimized during training using an imbalanced perception joint loss function to improve the prediction accuracy of extreme heavy precipitation events.
2. The precipitation prediction method according to claim 1, characterized in that, The multi-scale spatiotemporal decoupling encoder includes: The time-decoupled encoder employs parallel dilated causal convolution branches with different dilation rates to extract multi-resolution dynamic features of minute-level strong convection and hour-level continuous precipitation, respectively, and achieves multi-resolution feature fusion through cross-scale residual connections. A spatially decoupled encoder is constructed to create a dynamic multi-scale graph structure, which includes L1-level mesoscale nodes and L2-level synoptic-scale nodes. A cross-scale graph attention mechanism is used to achieve bidirectional information interaction between the two levels of nodes. The intensity decoupled encoder performs quantile transformation on the original precipitation regression labels to alleviate the long-tail problem of distribution and extracts the specific feature representations of precipitation at different intensity levels. The cross-scale feature interaction and fusion module is used to enable bidirectional interaction of three-dimensional decoupled features of time, space and intensity through a cross-scale attention mechanism, and to generate a unified high-dimensional representation by using a gated fusion mechanism and residual connection.
3. The precipitation prediction method according to claim 2, characterized in that, The time-decoupled encoder has four layers of dilated causal convolution with a dilation rate of [1,2,4,8]. The short-time branch d=8 is used to capture minute-level meteorological element pulse disturbance features, and the long-time branch d=1 is used to extract hourly weather system gradual trend features.
4. The precipitation prediction method according to claim 2, characterized in that, In the spatial decoupled encoder, the L1 level mesoscale nodes are generated by spatial-meteorological element dual-constraint clustering, and the edge weights between nodes are dynamically calculated based on the time-delay correlation of mass flux and energy exchange between regions; the L2 level synoptic scale nodes are constructed by matching the geopotential height field with historical rainstorm weather modes.
5. The precipitation prediction method according to claim 1, characterized in that, The three-dimensional dynamic reweighting network includes a meta-weight generator, which takes the current spatiotemporal encoded features as input and outputs a three-dimensional weight tensor; wherein: Time weight Based on the dynamic calculation of the temporal change rate of convective effective potential energy, pressure gradient and wind speed change rate, the sample weight of the corresponding time period is increased when a turning weather signal is detected. Spatial weight The system adaptively adjusts the weighting of samples from sparsely populated areas based on the complexity of the site terrain and the consistency of historical precipitation. Intensity weight A gradient harmonic mechanism is adopted to dynamically adjust the sample gradient distribution during training, thereby improving the effective participation of extreme precipitation samples.
6. The precipitation prediction method according to claim 1, characterized in that, The imbalance-aware joint loss function is a multi-task loss, with a total loss. ;in: Focal-MAE loss is applied to multi-scale time labels to enhance the prediction accuracy for transitional periods. To predict the structural similarity loss between the precipitation field and the actual precipitation field, and to constrain the data similarity between different regions; The classification weight coefficient is dynamically decayed with each training round as it combines the regression loss of precipitation intensity and the classification loss of intensity level.
7. The precipitation prediction method according to claim 6, characterized in that, The method also includes the following during training: A maximum mean difference constraint is added to align the feature distributions of the training set in densely populated sites with those of the validation set in sparsely populated sites after reweighting, in order to prevent the model from overfitting.
8. The precipitation prediction method according to claim 1, characterized in that, It also includes an online rolling correction step: Set an incremental learning cycle and input the latest observation data into the meta-weight generator of the three-dimensional dynamic reweighted network; By combining the time difference between the forecast lead time and the actual situation, the network parameters are dynamically fine-tuned to enable the model to adapt to the rapid evolution of weather conditions.
9. A precipitation prediction system, characterized in that, include: The data preprocessing and label building module is used to acquire multi-source meteorological observation data of the target area, and to preprocess and build multi-scale labels for the multi-source meteorological observation data. The multi-scale spatiotemporal decoupling coding module is used to input preprocessed multi-source meteorological observation data into an end-to-end deep neural network architecture. The multi-scale spatiotemporal decoupling encoder contained in the deep neural network architecture extracts decoupling features from the data in the three dimensions of time, space and intensity. The extracted features are then fused into a unified high-dimensional representation through cross-scale feature interaction and fusion. The three-dimensional dynamic reweighting module is used to dynamically generate a time-space-intensity joint weight tensor based on real-time weather characteristics using the three-dimensional dynamic reweighting network contained in the deep neural network architecture, and to recalibrate the importance of samples during the training process. The hierarchical prediction decoding module is used to output the prediction results of precipitation probability distribution at multiple future time scales through the hierarchical prediction decoder contained in the deep neural network architecture. The deep neural network architecture is optimized during training using an imbalanced perception joint loss function to improve the prediction accuracy of extreme heavy precipitation events.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the precipitation prediction method as described in any one of claims 1 to 8.