A short-term precipitation 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
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-13
- 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, low temporal resolution, difficulty in identifying key patterns of short-term precipitation, and neglect of the coupling relationship between space and time, which affects the prediction accuracy of heavy precipitation events.
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, using the C-DWABP loss function for penalty, and introducing a learnable threshold design, accurate precipitation prediction results are generated.
It significantly improves the accuracy of short-term precipitation intensity forecasting, reduces the false alarm rate, enhances the effectiveness of the early warning system, and has the ability to adapt to complex meteorological environments, enabling accurate forecasting across different regions and time ranges.
Smart Images

Figure CN121033697B_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) Using C-DWABP loss, the unfolded pixel-level samples are used as units to impose super-linear amplification on the underestimation of heavy rain and to impose reduced punishment on overestimation, and a discrete weight that monotonically increases with the real rain intensity grade is introduced; 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, the intensity classification is performed through a differentiable thresholding ordered layer, and a learnable multi-level threshold that satisfies monotonicity is set 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 sine function position coding in the high and wide two spatial 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 construct and label the data of the target area; 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 space 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 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 short-term precipitation intensity prediction and identification method based on space-time compound attention, characterized in that, The method comprises the following steps: (1) 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 intensity label according to the preset threshold; The multi-time and multi-channel images are spliced into network input tensors in the channel dimension according to a fixed time window; (2) Construct a spatio-temporal composite attention network with an encoder-decoder symmetric structure, embed an MFGA module at each layer on the encoding side to jointly model channel-space-location features and suppress pseudo correlations, embed a TSMA module at the jump connection on the decoding side, the decoder is a shared decoder, and set an independent and non-negative constrained lightweight regression output head for each prediction time; 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 3*3 convolution; the MFGA module is as follows: the channel attention unit is used to perform global average pooling and maximum pooling on the features respectively, the pooling results are added after two layers of 1*1 convolution and ReLU nonlinearity, and then the channel weight is obtained through Sigmoid, and the input is multiplied point by point according to the channel; the spatial attention unit is used to take the channel mean and channel maximum of the channel weighted features, and the input 7*7 convolution and Sigmoid are used to obtain the spatial weight and weight by pixel position; the position encoding item unit is used to construct the sine function position encoding in the high and wide spatial dimensions respectively, and the features are fused with a learnable scale factor and weighted; the multi-branch convolution fusion unit is used to set three branches in parallel, with "3*3 convolution-batch normalization-ReLU-1*1 convolution" as a unit, and the output of each branch is weighted and summed after normalization by Softmax; the gated residual fusion unit is used to generate a gating tensor by 1*1 convolution and Sigmoid on the residual branch, and the MFGA output is obtained by gated weighted addition of the fusion branch output and the residual; the TSMA module is as follows: the channel attention unit: performs adaptive global average pooling on the input features, and obtains the channel weight through two layers of 1*1 convolution, ReLU and Sigmoid, and weights the input; the spatial attention unit: concatenates the channel mean and channel maximum of the weighted features, inputs 7*7 convolution and Sigmoid to obtain the spatial weight and weight; the temporal feature extraction unit: adopts 3*3 convolution, batch normalization and ReLU to obtain temporal sensitive features; the temporal attention unit: performs global average pooling on the temporal sensitive features, and obtains the temporal weight through two layers of 1*1 convolution, ReLU and Sigmoid, and weights; the memory gating fusion unit: when there is a memory tensor of the last time or the last layer, the temporal features and the memory are concatenated in the channel dimension, and the gating is obtained through 1*1 convolution and Sigmoid, and the output is weighted according to g* 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 feature is used as the optional memory input for the next TSMA; (3) Taking the unfolded pixel-level sample as the unit, using the C-DWABP loss to impose super-linear amplification on the underestimation of heavy rain and impose mitigation punishment on the overestimation, and introducing a discrete weight that monotonically increases with the real rain intensity grade; wherein the C-DWABP loss for the unfolded pixel-level sample is defined as: Definition: ; wherein, is a super-linear amplification coefficient, is a super-linear power exponent, C is a scale constant, is a high-estimation penalty reduction coefficient, is a discrete weight mapped per real rain intensity class; is a real rainfall intensity; is a predicted rainfall intensity; (4) Based on the output, the intensity classification is performed through the differentiable thresholding ordered layer, and a learnable multi-level threshold satisfying monotonicity is set to stabilize the training and reasoning; (5) Generate the prediction product to obtain the future 1-6 hour hourly precipitation grid and the corresponding intensity identification result.
2. The short-term precipitation intensity prediction and identification method based on space-time composite attention according to claim 1, characterized in that, In step (1), the ordered rank label is generated according to a threshold set } and a rank index , where k is the rank index, indicating the corresponding rank of the precipitation intensity in the threshold set; t j represents the threshold set; y is the precipitation intensity, and j is the index of traversing the threshold set.
3. The short-term precipitation intensity prediction and identification method based on space-time composite attention according to claim 1, characterized in that, The position encoding occupies an equal share of the channel dimension in two spatial dimensions, and is added to the features through a learnable scaling factor to enhance the absolute position information.
4. The short-time precipitation intensity prediction and identification method based on space-time composite attention according to claim 1, characterized in that, The spatial displacement operation performs zero padding on the pixel positions that are translated outside the boundary to suppress the cross-boundary pseudo correlation and stabilize the gradient propagation.
5. The short-term precipitation intensity prediction and identification method based on space-time composite attention according to claim 1, characterized in that, The spatial displacement operation performs zero padding on the pixel positions that are translated outside the boundary to suppress the cross-boundary pseudo correlation and stabilize the gradient propagation.
6. The short-term precipitation intensity prediction and identification method based on space-time 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.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The spatial displacement operation performs zero padding on the pixel positions that are translated outside the boundary to suppress the cross-boundary pseudo correlation and stabilize the gradient propagation.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The processor implements the steps of the method of any one of claims 1-6 when executing the program. The program is executed by the processor to implement the steps of the method of any one of claims 1-6. The program is executed by the processor to implement the steps of the method of any one of claims 1-6.
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