Short temporary rainfall intensity prediction and identification method based on space-time composite attention
By constructing a spatiotemporal composite attention network and a C-DWABP loss function, the problem of neglecting the spatiotemporal feature coupling relationship in traditional methods is solved, achieving high-precision prediction and identification of short-term precipitation intensity, and improving the effectiveness and applicability of the early warning system.
Patent Information
- Application Number
- CN202511555013.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-10-29
AI Technical Summary
Traditional precipitation forecasting methods rely on limited ground observation data and numerical weather prediction models, resulting in insufficient data coverage and low temporal resolution, making it difficult to identify key patterns of short-term precipitation. Furthermore, existing neural network models neglect the coupling relationship between space and time when processing spatiotemporal features, leading to underestimation of heavy precipitation events and insufficient early warning.
A short-term precipitation intensity prediction method based on spatiotemporal composite attention is adopted. By constructing a spatiotemporal composite attention network, combining channel, spatial and location features, the prediction error is penalized using the C-DWABP loss function, and a learnable thresholded ordered layer is introduced for stable training to generate hourly precipitation forecasts for the next 1-6 hours.
It significantly improves the accuracy and identification effect of short-term precipitation intensity forecasting, reduces the false alarm rate, enhances the effectiveness of the early warning system, and has a stronger generalization ability applicable to precipitation intensity forecasting in different regions and time ranges.
Smart Images

Figure CN121033697A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of short-time and short-range precipitation intensity prediction and identification, and particularly relates to a short-time and short-range precipitation intensity prediction and identification method based on spatiotemporal composite attention. BACKGROUND
[0002] Short-time and short-range precipitation usually occurs in a short time, has large precipitation intensity and short duration, and higher requirements are put forward for disaster prevention and mitigation work. However, the current traditional precipitation prediction method, especially the prediction of strong precipitation events, has the following problems: the traditional meteorological prediction method is mostly dependent on ground observation data and numerical weather prediction models, but due to the limited number of meteorological stations and the influence of geographical factors and equipment update lag, the data coverage is insufficient and the time resolution is low, especially for high-precision prediction of short-time and short-range precipitation, there is a lack of effective data support. The existing precipitation intensity prediction model has low prediction accuracy for strong precipitation. Especially the deep neural network model, due to the complexity of feature learning, it is often difficult to identify the key mode of short-time and short-range precipitation, resulting in underestimation of strong precipitation events and causing serious warning deficiency. The precipitation event is affected by many meteorological factors and has significant spatial and temporal characteristics. The traditional model often ignores the coupling relationship between space and time when dealing with complex spatiotemporal characteristics, resulting in insufficient learning ability for temporal changes and spatial distribution, and further affecting the prediction of precipitation intensity. SUMMARY
[0003] The purpose of the application is to provide a short-time and short-range precipitation intensity prediction and identification method based on a spatiotemporal composite attention mechanism, which solves the problem that the traditional model often ignores the coupling relationship between space and time when dealing with complex spatiotemporal characteristics, resulting in insufficient learning ability for temporal changes and spatial distribution.
[0004] Technical scheme: the short-time and short-range precipitation intensity prediction and identification method based on spatiotemporal composite attention provided by the application is characterized by comprising the following steps:
[0005] (1) acquiring an IMERG satellite precipitation dataset, resampling, spatially aligning and quality masking the original time series image, constructing an hourly precipitation true value and forming an ordered level label according to a preset threshold; and splicing multi-time and multi-channel images into a network input tensor in the channel dimension according to a fixed time window;
[0006] (2) Construct a spatio-temporal composite attention network with an encoder-decoder symmetric structure, embed an MFGA module layer by layer on the encoding side to jointly model channel-space-location features and suppress pseudo-correlation, embed a TSMA module at the jump connection on the decoding side, and set an independent and non-negative constraint light regression output head for each prediction time interval for the shared decoder; wherein the MFGA module comprises: a channel attention unit, a spatial attention unit, a position encoding item unit, a spatial displacement unit, a multi-branch convolution fusion unit, and a gated residual fusion unit; wherein the spatial displacement unit equally divides the channel dimension into several subblocks, cyclically shifts the four subblocks in the up, down, left and right directions, performs zero padding on the out-of-bound positions, and then extracts local responses through 3x3 convolution;
[0007] (3) Take the unfolded pixel-level samples as units, use C-DWABP loss to impose super-linear amplification on the underestimation of heavy rain and impose reduced punishment on the overestimation, and introduce discrete weights that monotonically increase with the real rain intensity grade; wherein the C-DWABP loss for the unfolded pixel-level samples is defined as:
[0008] ;
[0009] wherein, is a super-linear amplification coefficient, is a super-linear power exponent, C is a scale constant, is an overestimation penalty reduction coefficient, is a discrete weight mapped according to the real rain intensity grade; L is the C-DWABP loss function; is the real rainfall intensity; is the predicted rainfall intensity;
[0010] (4) Based on the output, perform intensity classification through a differentiable thresholding ordered layer, and set a learnable multi-level threshold that satisfies monotonicity to stabilize training and inference;
[0011] (5) Generate a prediction product to obtain a future 1-6 hour hourly precipitation grid and its corresponding intensity identification result.
[0012] Further, in step (1), the ordered grade label is generated according to a threshold set { }; wherein k is the grade index, indicating the corresponding grade of the rain intensity in the threshold set; t j represents the threshold set; y is the rain intensity, and j is the index of traversing the threshold set.
[0013] Further, the MFGA module is specifically as follows: a channel attention unit is used for performing global average pooling and maximum pooling on the features respectively, the pooling results are added after two 1x1 convolution and ReLU nonlinearity and Sigmoid to obtain channel weights, and are point by point multiplied with the input by channel; a spatial attention unit is used for taking the channel mean and channel maximum of the channel weighted features and splicing, inputting 7x7 convolution and Sigmoid to obtain spatial weights and weighting by pixel position; a position coding item unit is used for constructing the sine function position coding in the high and wide two space dimensions respectively, and fusing with the features with a learnable scale factor; a multi-branch convolution fusion unit is used for setting three branches in parallel with “3x3 convolution-batch normalization-ReLU-1x1 convolution” as a unit, and weighting and summing the outputs of each branch after normalization by Softmax using learnable parameters; a gated residual fusion unit is used for generating a gating tensor by 1x1 convolution and Sigmoid on the residual branch, and performing gated weighting and adding on the fusion branch output and the residual to obtain the MFGA output.
[0014] Further, the position coding occupies an equal share of the channel dimension in the two spatial dimensions, and is added to the features through a learnable scaling factor to enhance the absolute position information.
[0015] Further, the TSMA module is specifically as follows: a channel attention unit: performing adaptive global average pooling on the input features, and weighting the input by channel weight obtained through two 1x1 convolution and ReLU, Sigmoid; a spatial attention unit: concatenating the channel mean and channel maximum of the weighted features, inputting 7x7 convolution and Sigmoid to obtain spatial weights and weighting; a temporal feature extraction unit: obtaining temporal sensitive features by 3x3 convolution and batch normalization and ReLU; a temporal attention unit: performing global average pooling on the temporal sensitive features, and weighting by temporal weight obtained through two 1x1 convolution and ReLU, Sigmoid; a memory gating fusion unit: when there is a previous time or upper layer memory tensor, concatenating the temporal features and the memory in the channel dimension, obtaining a gate by 1x1 convolution and Sigmoid, and fusing by g temporal + (1 - g) *memoryg; wherein, g is a weight coefficient calculated by the memory gating network, temporal is the feature of the input sequence at the current time, and memoryg is the memory feature of the previous time; an output fusion unit: adding the output of the module after 1x1 convolution and batch normalization to the residual, and outputting, and the fused features are used as the optional memory input of the next TSMA.
[0016] Further, the spatio-temporal compound attention network sets an independent light output head for each prediction time, which includes two layers of 3x3 convolution and ReLU in turn, and a terminal 1x1 convolution and non-negative activation function, so as to ensure that the precipitation prediction is non-negative.
[0017] Further, the discrete weights According to the threshold set Calculate the rank index And select the corresponding weight from the weight table, which monotonically increases with the rain intensity rank.
[0018] The electronic device described in the application comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the method described in any one of the embodiments when executing the program.
[0019] The computer readable storage medium described in the application has a computer program stored thereon, and the program is executed by the processor to implement the steps of the method described in any one of the embodiments.
[0020] Advantages: Compared with the prior art, the technical scheme of the application can significantly improve the effect of short-term precipitation intensity prediction and identification, mainly in the following aspects: the application accurately extracts the key space-time features of the precipitation event through the space-time composite attention mechanism, and achieves higher precision than traditional methods in the prediction of short-term precipitation, especially strong precipitation events; the C-DWABP loss function is used to punish overestimation and underestimation, so that the model is more accurate in predicting strong precipitation, reduces the false alarm rate, and improves the effectiveness of the early warning system; through the fusion of multi-dimensional features and the weighting of space-time information, the model can adapt to complex meteorological environment and has stronger generalization ability, and is suitable for precipitation intensity prediction tasks in different regions and time ranges; through the design of ordered layers and learnable thresholds, the stability of the model in the training process is ensured, and reasonable and accurate prediction results can be obtained during inference. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 The flowchart of the application;
[0022] Figure 2 The improved deep learning model architecture diagram of the application;
[0023] Figure 3 The MFGA module structure diagram of the application;
[0024] Figure 4 The TSMA module structure diagram of the application;
[0025] Figure 5 The CSI of the precipitation intensity prediction of the application changes with the prediction time. DETAILED DESCRIPTION
[0026] The technical scheme of the application will be further described below with reference to the accompanying drawings.
[0027] AsFigure 1 As shown, the present application provides a short-term precipitation intensity prediction and identification method based on spatio-temporal composite attention, comprising the following steps:
[0028] (1) Obtain the IMERG satellite precipitation dataset, and perform data construction and labeling on the target region; Specifically as follows: Obtain the IMERG satellite precipitation dataset, resample, spatially align and quality mask the original time series image, construct the hourly precipitation true value and form the ordered level label according to the preset threshold; According to the fixed time window, the multi-time and multi-channel image is spliced into a network input tensor in the channel dimension; The ordered level label is generated according to the threshold set }Optimal threshold [0, 2.5, 8, 16, 30] mm·h -1 , level index .
[0029] (2) Build a spatio-temporal composite attention network, and sequentially connect MFGA modules and TSMA modules, and output non-negative activation to ensure physical interpretability; Specifically as follows: Construct a spatio-temporal composite attention network with an encoder-decoder symmetric structure, embed MFGA modules at each layer on the encoding side to jointly model channel-space-location features and suppress false correlations, and embed TSMA modules at the jump connection on the decoding side. The decoder is a shared decoder, and an independent and non-negative constrained lightweight regression output head is set for each prediction time, as shown in Figure 2 ;
[0030] The MFGA module (as shown in Figure 3 ) includes:
[0031] Channel attention branch: The features are respectively subjected to global average pooling and maximum pooling, and the pooling results are added after two 1×1 convolution and ReLU nonlinearity and obtained by Sigmoid to obtain channel weights. Multiply by channel by channel.
[0032] Spatial attention branch: Take the channel mean and channel maximum of the channel weighted features and concatenate them, input 7×7 convolution and Sigmoid to obtain spatial weights and weight by pixel position;
[0033] Position encoding term: Construct the sine function position encoding in the high and wide spatial dimensions respectively, and fuse them with a learnable scale factor and feature weighting;
[0034] Spatial displacement sub-branch: Divide the channel dimension into several sub-blocks, cyclically shift the four sub-blocks along the up, down, left and right directions, perform zero padding on the out-of-bound positions, and then extract local responses through 3×3 convolution;
[0035] Multi-branch convolution fusion: Three branches are set up in parallel with "3×3 convolution - batch normalization - ReLU - 1×1 convolution" as the unit. The outputs of each branch are weighted and summed after learningable parameters are normalized by Softmax.
[0036] Gated residual fusion: A gated tensor is generated by applying a 1×1 convolution and a sigmoid function to the residual branch. The output of the fusion branch and the residual are then added together with gated weights to obtain the MFGA output.
[0037] TSMA module ( Figure 4 (As shown) includes:
[0038] Channel attention: Adaptive global average pooling is applied to the input features, followed by two 1×1 convolutions and ReLU and Sigmoid functions to obtain channel weights, which are then weighted and input.
[0039] Spatial attention: The channel mean and channel maximum of the weighted features are concatenated, and then input into a 7×7 convolution and a Sigmoid function to obtain spatial weights and perform weighted summation.
[0040] Temporal feature extraction: Temporally sensitive features are obtained by using 3×3 convolution, batch normalization, and ReLU;
[0041] Temporal attention: Global average pooling is performed on temporally sensitive features, followed by two 1×1 convolutions and ReLU and Sigmoid to obtain temporal weights, which are then weighted.
[0042] Memory-gated fusion: When a previous time step or a higher-level memory tensor exists, the temporal features and the memory are concatenated along the channel dimension, and then gated by a 1×1 convolution and a sigmoid function. The gating is then applied according to g*. temporal + (1 - g) *memoryg fusion;
[0043] Output fusion: After 1×1 convolution and batch normalization, the output is added to the module input residual and the fused features are used as the optional memory input for the next TSMA.
[0044] (3) A C-DWABP loss function is proposed, which penalizes pixel-level prediction errors with directional asymmetry and introduces hierarchical weights mapped to the actual rainfall intensity level. Specifically, the dataset is segmented according to the year-time series order to maintain the integrity of the temporal dependency relationship; a random batch sampling strategy is used to iteratively optimize and train the model. The C-DWABP loss function is innovatively designed: taking the expanded pixel-level samples as units, the C-DWABP loss is used to apply superlinear amplification to the underestimation of heavy precipitation and to apply a mitigation penalty to the overestimation, and a discrete weight that monotonically increases with the actual rainfall intensity level is introduced.
[0045] C-DWABP loss is applied to the expanded pixel-level samples. is defined as:
[0046]
[0047] where, is a super-linear amplification coefficient, set to 5, is a super-linear power exponent, set to 2, and C is a scale constant, set to 30, is an overestimation penalty reduction coefficient, set to 0.4, is a discrete weight mapped by the true rain intensity level. The discrete weight is calculated according to the threshold set , the level index is obtained, and the corresponding weight is selected from the weight table, which monotonically increases with the rain intensity level; by <1 To reduce the overestimation penalty and reduce the false alarm rate.
[0048] Adjust the model structure and parameters (mainly including convolution layer setting, pooling layer setting, learning rate, weight decay, optimization algorithm, etc.) during training to obtain a model with the smallest prediction error.
[0049] (4) Based on the output, the intensity classification is performed through the differentiable thresholding ordered layer, and the learnable threshold is set to stabilize the training; specifically: based on the output, the intensity classification is performed through the differentiable thresholding ordered layer, and the learnable multi-level threshold satisfying monotonicity is set to stabilize the training and reasoning, and the ordered intensity classification is based on the threshold set , the preferred threshold is [0, 2.5, 8, 16, 30] mm·h -1 , and the level index .
[0050] (5) Generate the prediction product to obtain the future 1-6 hour precipitation grid and the corresponding intensity identification result. Specifically: as Figure 5As shown, the comparison results under different precipitation intensity threshold conditions show that as the forecast time from 1 hour to 6 hours, the CSI index as a whole shows a downward trend, wherein the method of the present application is significantly better than the optical flow method under each threshold condition, especially in the short time and small rain, medium rain grade scene, the improvement effect is the most obvious. When the threshold is 0.1 mm / h and 2.5 mm / h, the method of the present application can maintain a high CSI value within 1-3 hours, compared with the optical flow method, it has stronger stability and accuracy; When the threshold is 8.0 mm / h, the method of the present application can still maintain a good detection rate within 1-2 hours, while the performance of the optical flow method decays rapidly; When the threshold is 16.0 mm / h, the method of the present application is still better than the optical flow method within 1 hour. As can be seen, in the prediction of hourly precipitation in the future 1-6 hours, the method of the present application can effectively improve the recognition and prediction accuracy of different rain intensity grades, especially in the short-term prediction of heavy rain, it shows stronger robustness and applicability.
Claims
1. A method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention, characterized in that, Includes the following steps: (1) Obtain the IMERG satellite precipitation dataset, resample, spatially align and quality mask the original time series images, construct the hourly precipitation true value and form ordered level labels according to the preset threshold; Multi-time, multi-channel images are stitched together in the channel dimension into a network input tensor according to a fixed time window; (2) Construct a spatiotemporal composite attention network with an encoder-decoder symmetric structure. On the encoding side, embed MFGA modules layer by layer to jointly model channel-space-location features and suppress spurious correlations. On the decoding side, embed TSMA modules at skip connections. The decoder is a shared decoder. Set an independent and non-negative constraint lightweight regression output head for each prediction time. The MFGA module includes: channel attention unit, spatial attention unit, location coding term unit, spatial displacement unit, multi-branch convolution fusion unit, and gated residual fusion unit. The spatial displacement unit divides the channel dimension into several sub-blocks, cyclically translates the four sub-blocks along the up, down, left, and right directions, performs zero-padding on out-of-bounds positions, and then extracts the local response through 3×3 convolution. (3) Using the expanded pixel-level samples as units, the C-DWABP loss is applied to apply superlinear amplification to the underestimation of heavy precipitation and to apply a mitigation penalty to the overestimation, and a discrete weight that monotonically increases with the true rainfall intensity level is introduced; wherein, the C-DWABP loss is applied to the expanded pixel-level samples Defined as: ; in, This is the superlinear amplification factor. Where C is a superlinear power exponent and C is a scaling constant, To overestimate the penalty reduction factor, Discrete weights mapped to the actual rainfall intensity level; This represents the actual rainfall intensity. The predicted rainfall intensity; (4) Based on the output, intensity classification is performed through a differentiable thresholded ordered layer, and a learnable multi-level threshold that satisfies monotonicity is set to stabilize training and inference; (5) Generate forecast products and obtain hourly precipitation grids for the next 1-6 hours and their corresponding intensity identification results.
2. The method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention according to claim 1, characterized in that, In step (1), the ordered level labels are based on the threshold set { Generate, level index Where k is the level index, representing the level corresponding to the precipitation intensity in the threshold set; t j y represents the threshold set; y is the precipitation intensity, and j is the index for traversing the threshold set.
3. The method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention according to claim 1, characterized in that, The MFGA module is as follows: The channel attention unit performs global average pooling and max pooling on the features. The pooling results are summed after two layers of 1×1 convolutions and ReLU nonlinearity, and then processed by a sigmoid function to obtain channel weights, which are then multiplied with the input point-by-point according to channel. The spatial attention unit takes the channel mean and maximum values of the channel-weighted features and concatenates them. A 7×7 convolution and sigmoid function are used to obtain spatial weights, which are then weighted according to pixel position. The positional encoding unit constructs sine and cosine function positional codes in both height and width spatial dimensions, and fuses them with the features using a learnable scaling factor. The multi-branch convolutional fusion unit sets up three branches in parallel, each with a unit of "3×3 convolution—batch normalization—ReLU—1×1 convolution." The outputs of each branch are weighted and summed after Softmax normalization using learnable parameters. The gated residual fusion unit applies a 1×1 convolution and a sigmoid function to the residual branch to generate a gated tensor. The output of the fusion branch is then gated and weighted and summed with the residual to obtain the MFGA. Output.
4. The method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention according to claim 3, characterized in that, The location encoding occupies an equal share of the channel dimension in both spatial dimensions, and the absolute location information is enhanced by adding the features with a learnable scaling factor.
5. The method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention according to claim 1, characterized in that, Spatial displacement operations perform zero-filling on cell locations translated outside the boundary to suppress cross-boundary spurious correlations and stabilize gradient propagation.
6. The method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention according to claim 1, characterized in that, The TSMA module is as follows: Channel Attention Unit: Adaptive global average pooling is applied to the input features, followed by two 1×1 convolutions, ReLU, and Sigmoid to obtain channel weights, which are then weighted and input. Spatial Attention Unit: The channel mean and maximum value of the weighted features are concatenated, and then input into a 7×7 convolution with Sigmoid to obtain spatial weights, which are then weighted. Temporal Feature Extraction Unit: Temporal-sensitive features are obtained using 3×3 convolutions, batch normalization, and ReLU. Attention Unit: Performs global average pooling on temporally sensitive features, then performs two 1×1 convolutions followed by ReLU and Sigmoid functions to obtain temporal weights, which are then weighted. Memory Gated Fusion Unit: When a previous time step or upper-level memory tensor exists, concatenates the temporal features and the memory along the channel dimension, performs a 1×1 convolution followed by a Sigmoid function to obtain gating, and then performs g* fusion. temporal+(1-g) *memoryg fusion; where g is the weight coefficient calculated by the memory-gated network, temporal is the feature of the input sequence at the current time step, and memoryg is the memory feature of the previous time step; Output fusion unit: After 1×1 convolution and batch normalization, it is added to the module input residual and output, and the fused features are used as the optional memory input for the next TSMA.
7. The method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention according to claim 1, characterized in that, The empty composite attention network sets up an independent lightweight output head for each prediction time, which includes two layers of 3×3 convolution and ReLU, and a terminal 1×1 convolution and non-negative activation function, thereby ensuring that the precipitation prediction is non-negative.
8. The method for predicting and identifying short-term precipitation intensity based on spatiotemporal composite attention according to claim 1, characterized in that, Discrete weights Based on the threshold set { } Calculate the level index Then, the corresponding weights are selected from the weight table, which monotonically increases with the rainfall intensity level.
9. 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 program, it implements the steps of the method as described in any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Aero-engine service life prediction method and system based on binary quantization
CN116956751A
Short-time rainfall prediction method based on radar image and reanalysis data fusion
CN120337179A
Short temporary rainfall prediction method based on multi-source multi-temporal-spatial-feature fusion
CN120635694A
Predicted forecast offset from remote location sensor
US20210326723A1
Rainfall prediction method, system, device and medium based on machine learning
US20250156688A1
Cited By
Deep learning prediction method and system for multi-source space-time lattice point data
CN121581261A
Remote sensing water quality inversion black and odorous water body identification method based on time sequence convolutional network
CN122289947A