Disaster-causing rain similarity mining method
By using a disaster-oriented feature mapping model and combining multimodal disaster-causing data, temporal and spatial feature components are extracted, and the comprehensive disaster-causing similarity distance is calculated. This solves the problem of ignoring the cumulative effect of rainfall energy and environmental heterogeneity in existing technologies, and achieves more accurate risk assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING HYDRAULIC RES INST
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-19
Smart Images

Figure CN122241264A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of meteorological disaster risk assessment, and in particular, it is a method for mining the similarity of disaster-causing rainstorms. Background Technology
[0002] Similarity retrieval for rainstorm disasters is a key technology for risk extrapolation based on historical data. By accurately identifying historical cases in the database that are highly similar to current rainstorm events in terms of their disaster-causing mechanisms, historical disaster data can be directly reused for rapid risk prediction. This technology not only compensates for the time-consuming calculations of hydrodynamic models but also effectively uncovers the nonlinear coupling patterns between the spatiotemporal distribution of rainfall and the disaster-bearing environment. It has significant technical value for improving the scientific rigor and timeliness of urban flooding early warning, watershed flood control scheduling, and emergency response decision-making.
[0003] Currently, rainstorm similarity retrieval mainly relies on rainfall pattern matching techniques from the meteorological field. Mainstream methods typically simplify rainfall events into time-series rainfall curves or total rainfall distribution maps, using Euclidean distance, Pearson correlation coefficient, or standard dynamic time warping (DTW) algorithms to calculate similarity. For example, some existing flood forecasting systems search historical databases for events with similar statistical indicators based on current rainfall peaks and cumulative amounts. Some improved schemes attempt to introduce spatial image retrieval techniques, comparing the texture features of radar echo images to find similarly shaped rain clouds.
[0004] However, existing meteorological rainfall pattern retrieval methods suffer from significant physical mismatch issues in disaster risk assessment. Specifically, traditional DTW algorithms focus only on waveform geometric alignment, neglecting the cumulative effect of rainfall energy, often leading to the incorrect classification of early-stage (early-stage disaster-causing) and late-stage (later-stage disaster-causing) rainfall patterns as similar. Furthermore, purely image or rainfall distance calculations sever the connection between rainfall and the disaster-bearing environment. The same rainfall distribution can produce drastically different consequences in low-lying urban areas and permeable woodlands, and existing methods cannot identify such differences in disaster-causing factors due to environmental heterogeneity. Finally, retrieval models based on discrete labels struggle to capture the continuously changing physical gradient between disaster levels (such as mild and severe flooding), resulting in a lack of physical basis for setting similarity thresholds and a high false alarm rate. Summary of the Invention
[0005] The purpose of this invention is to provide a method for mining the similarity of disastrous rainstorms, so as to solve the above-mentioned problems existing in the prior art.
[0006] Technical solutions, including methods for mining similarity of disastrous rainstorms, include:
[0007] Acquire multimodal disaster-causing data of the rainstorm event to be analyzed, as well as a pre-constructed historical rainstorm event database; the multimodal disaster-causing data includes at least time-series rainfall sequences, spatial rainfall distribution fields, and corresponding disaster-bearing environment data;
[0008] Using a pre-trained disaster-oriented feature mapping model, and combining multimodal disaster-oriented data, the disaster-oriented feature representations corresponding to the rainstorm events to be analyzed and historical events in the historical rainstorm event database are mapped to obtain their respective disaster-oriented feature representations. The disaster-oriented feature representations include at least temporal feature components that preserve the temporal evolution structure and spatial feature components that preserve the spatial geometric structure.
[0009] Based on the disaster-causing characteristic representation, the comprehensive disaster-causing similarity distance between the rainstorm event to be analyzed and various historical events is calculated; the calculation integrates the temporal similarity measurement results based on temporal feature components and the spatial similarity measurement results based on spatial feature components;
[0010] Based on the comprehensive disaster similarity distance, the set of historical rainstorm events most similar to the rainstorm event to be analyzed is determined from the historical rainstorm event database, and the disaster risk assessment results are generated based on the historical disaster records of the historical rainstorm event set.
[0011] Beneficial effects: This invention solves the problem of physical mismatch caused by neglecting environmental heterogeneity and time-series cumulative effects in traditional methods, thereby improving the accuracy of risk assessment. Attached Figure Description
[0012] Figure 1 A flowchart illustrating the steps of a disaster-causing rainstorm similarity mining method provided in this application embodiment.
[0013] Figure 2 A flowchart illustrating the steps for calculating the comprehensive disaster-causing similarity distance between the rainstorm event to be analyzed and various historical events, provided in an embodiment of this application.
[0014] Figure 3 A flowchart illustrating the steps for calculating normalized temporal similarity distance based on temporal feature components, as provided in this application embodiment.
[0015] Figure 4 A flowchart illustrating the steps for calculating normalized spatial similarity distance based on spatial feature components, provided in this application embodiment. Detailed Implementation
[0016] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0017] It should be noted that the terms include and have, and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0018] like Figure 1 As shown, a method for mining the similarity of disastrous rainstorms includes the following steps:
[0019] Acquire multimodal disaster-causing data of the rainstorm event to be analyzed, as well as a pre-constructed database of historical rainstorm events; the multimodal disaster-causing data includes at least time-series rainfall sequences, spatial rainfall distribution fields, and corresponding disaster-bearing environmental data.
[0020] In this embodiment, the rainstorm event to be analyzed refers to the current rainstorm object input by the user that requires risk assessment or historical backtracking, such as a heavy rainfall event that is currently occurring or has just ended. The historical rainstorm event database refers to a large collection of pre-stored historical rainstorm samples, each of which is associated with a disaster level label that has been manually verified or automatically calculated, such as no disaster, minor waterlogging, or severe urban flooding.
[0021] Specifically, multimodal disaster-causing data refers to a dataset describing at least three key dimensions of a rainstorm event. Among these, the time-series rainfall sequence can be represented by a one-dimensional vector Z. T =[r1, r2, ..., r N ] indicates that r t Z represents the rainfall at the t-th time step, and N is the sequence length. For example, for a 24-hour rainstorm, if the time step is 1 hour, then Z... T This is a vector containing 24 values. The spatial rainfall distribution field can be represented by a two-dimensional matrix I(x, y), describing the cumulative rainfall or maximum rainfall intensity at each grid point within the analysis area. The disaster-bearing environment data is a set of static environmental layers aligned with geographical locations, specifically including but not limited to topographic elevation data, river network distribution data, and land use type data. These data together constitute a comprehensive description of rainstorm-induced disasters.
[0022] In some alternative implementations, data acquisition can be achieved by real-time reading of rain gauge readings from automatic weather stations and Doppler radar mosaic products via a meteorological monitoring interface, or by loading offline meteorological reanalysis data files in NetCDF or HDF5 format. For disaster-affected environmental data, it is typically loaded from a pre-built geographic information system database, eliminating the need for real-time data collection.
[0023] Using a pre-trained disaster-oriented feature mapping model, multimodal disaster-oriented data are combined with the rainstorm events to be analyzed and historical events in the historical rainstorm event database to perform mapping processing, so as to obtain the corresponding disaster-oriented feature representations. The disaster-oriented feature representations include at least temporal feature components that preserve the temporal evolution structure and spatial feature components that preserve the spatial geometric structure.
[0024] In this embodiment, the disaster-oriented feature mapping model is a neural network model pre-trained through deep metric learning. Its function is to project the original physical quantities into a potential feature space in which events with similar physical disaster consequences are closer together.
[0025] Specifically, the disaster-oriented feature mapping model adopts a multi-channel parallel processing architecture. For the input time-series rainfall sequence, a one-dimensional convolutional network or a long short-term memory network is used to extract deep features, outputting a time-step scalar feature sequence that maintains the original time-step order, denoted as the time-series feature component F. time =[f1, f2, ..., f N ], where f t Let be the temporal feature scalar value at time step t, whose magnitude reflects the contribution of that time step to the disaster-causing energy accumulation process. For spatial rainfall distribution fields and disaster-bearing environment data, channel overlay is usually performed first, and then a two-dimensional convolutional network is used to extract features, outputting a feature map that maintains the original spatial location correspondence, denoted as the spatial feature component F. space (x, y). By preserving the structure, subsequent steps can apply dynamic programming-based temporal alignment algorithms and optimal transmission-based spatial distribution comparison algorithms, instead of compressing all information into a fixed-length vector as in traditional methods.
[0026] Furthermore, in some preferred embodiments, the disaster-oriented feature mapping model may also include a statistical feature channel, which is used to extract feature representations of global statistics such as total rainfall, maximum rainfall intensity, and rainfall duration as auxiliary components.
[0027] Based on the disaster-causing characteristic representation, the comprehensive disaster-causing similarity distance between the rainstorm event to be analyzed and each historical event is calculated; the calculation integrates the temporal similarity measurement results based on temporal feature components and the spatial similarity measurement results based on spatial feature components.
[0028] In this embodiment, the comprehensive disaster similarity distance is a scalar value used to quantify the degree of difference in the disaster-causing mechanisms of two rainstorm events. The smaller the distance, the more similar the disaster-causing risks of the two events.
[0029] Specifically, the calculation process is not a simple addition of Euclidean distances, but rather a fusion of heterogeneous distances from different modalities. Let the event to be analyzed be A, and a historical event be B. Using time series measurement algorithms, such as Dynamic Time Warping (DTW), the differences between the temporal feature components of A and B are calculated, yielding a normalized temporal similarity measurement result D. time Using spatial metric algorithms, such as Wasserstein distance, the differences between the spatial feature components of A and B are calculated to obtain the normalized spatial similarity metric result D. space Using the weighted summation formula D total = w1 * D time + w2 * D space The calculated composite distance D total , where w1 and w2 are different weighting coefficients.
[0030] For example, if w1 is set to 0.4 and w2 is set to 0.6, D time The calculated result is 0.2, D space If the calculated result is 0.3, then the comprehensive distance D is... total = 0.4 * 0.2 + 0.6 * 0.3 = 0.26. By adjusting the weighting coefficients, the system's emphasis on rainfall pattern similarity or precipitation area similarity can be flexibly controlled.
[0031] Based on the comprehensive disaster similarity distance, the set of historical rainstorm events most similar to the rainstorm event to be analyzed is determined from the historical rainstorm event database, and the disaster risk assessment results are generated based on the historical disaster records of the historical rainstorm event set.
[0032] In this embodiment, the Top-K search strategy is typically used to determine the set of most similar historical rainstorm events. That is, all calculated composite distances are sorted in ascending order, and the top K historical events are selected, for example, K=5.
[0033] Specifically, the assessment results can be generated using a weighted voting method. Assume that of the five retrieved historical events, three are marked as severe flooding, one as minor waterlogging, and one as no disaster, with distances from the event to be analyzed ranging from d1 to d5. The system can calculate a weighted score for each disaster level, with historical events having higher weights for closer distances. The highest-scoring level is then output as the prediction result for the event to be analyzed, or a detailed disaster description of the K historical events can be directly output as a reference report.
[0034] In some optional implementations, the system can also calculate the disaster probability distribution of retrieved historical events, such as outputting a 60% probability of severe flooding and a 30% probability of mild waterlogging, providing a more refined reference for flood control decisions.
[0035] This embodiment achieves physically interpretable similarity mining by introducing disaster-oriented feature mapping and multimodal physical constraint distance.
[0036] It should be noted that disaster-causing orientation refers to an optimization approach that uses the similarity of disaster-causing outcomes as the optimization objective, rather than the similarity of meteorological characteristics themselves. Specifically, traditional rainstorm similarity retrieval methods focus on whether the rainfall, intensity, and spatiotemporal distribution of two rainstorms are similar, implicitly assuming that similar meteorological characteristics necessarily lead to similar disaster consequences. However, due to the heterogeneity of disaster-bearing environments, this assumption often does not hold true in practice. For example, two rainstorms with identical spatial distributions, if they fall on steep mountain slopes and plain farmland respectively, will cause significant differences in the type and severity of disasters they trigger. The core idea of this application is to directly use the similarity of disaster-causing consequences as the learning objective. Through supervised metric learning methods, the system automatically learns which feature combinations are most critical for disaster prediction, thereby achieving truly disaster-causing risk-oriented retrieval.
[0037] In one possible implementation, the disaster-bearing environmental data specifically includes topographic elevation data, water system distribution data, and land use type data covering the area to be analyzed.
[0038] In this embodiment, the terrain elevation data typically uses digital elevation model (DEM) data. It is a two-dimensional grid matrix H(x, y), where each value represents the elevation of the center point of that grid. The spatial resolution of the DEM data should be consistent with the spatial rainfall distribution field, for example, both using a 1 km x 1 km grid. For cases where the resolution is inconsistent, resampling alignment is required using bilinear interpolation or nearest-neighbor interpolation.
[0039] Specifically, river system distribution data describes the spatial location of water bodies such as rivers and lakes. In computer storage, it may initially be linear or planar features in vector format. Preferably, to facilitate subsequent calculations of disaster sensitivity, it needs to be converted to a raster format. One specific conversion method is to calculate the Euclidean distance from each grid point to the nearest water body, generating the river network distance field matrix R. dist (x, y), the smaller the value, the closer to the river, and the higher the potential risk of disaster.
[0040] Furthermore, land use data describes the types of land cover, such as arable land, forest land, impervious surfaces (urban built-up areas), and water bodies. Structurally, land use data is a classification label matrix L(x, y), where each integer value corresponds to a type code, such as 1 representing forest land and 2 representing urban areas. For numerical calculations, a runoff coefficient table is typically predefined, mapping the classification labels to runoff coefficient values between 0 and 1, characterizing the surface's runoff generation capacity. For example, the runoff coefficient for urban impervious surfaces can be set to 0.9, while that for forest land can be set to 0.3.
[0041] In some alternative implementations, the disaster-affected environment data can be further expanded to include soil type data, such as data affecting infiltration rate; drainage network density data, such as data affecting urban drainage capacity, to construct a more refined description of the disaster-causing background.
[0042] Correspondingly, the spatial feature components output by the disaster-oriented feature mapping model are two-dimensional grid feature fields that retain the correspondence between geographic locations; the temporal feature components are one-dimensional feature vector sequences that retain the time step order.
[0043] Specifically, in order to apply optimal transport theory to calculate spatial similarity, the original spatial data needs to undergo specific probability distribution processing. For spatial feature components or the original spatial rainfall distribution field before inputting into the model, a full-field normalization method is used to convert it into a probability distribution form. Let the original spatial rainfall distribution be I(x, y), then the normalized probability value p(x, y) at each grid point (x, y) can be calculated using the following formula:
[0044] p(x, y) = I(x, y) / ∑ I ;
[0045] Where p(x, y) is the normalized probability value, representing the proportion of rainfall at this grid point to the total rainfall across the entire field; I(x, y) is the original rainfall value at this grid point; ∑ I This is the sum of rainfall values for all grid points within the entire analysis area.
[0046] After the above processing, the sum of all values in the entire two-dimensional grid feature field is strictly equal to 1, i.e., ∑(p(x,y)) = 1. This makes the spatial rainfall distribution field mathematically equivalent to a discrete two-dimensional probability distribution, satisfying the prerequisite for Wasserstein distance calculation.
[0047] For time-series feature components, in addition to preserving the time step order, in order to eliminate the interference of the absolute numerical difference between different levels of rainstorms, such as 50 mm and 200 mm, on the morphological similarity judgment, Z-score standardization or maximum value normalization is usually used.
[0048] For example, when using maximum value normalization, for the original time-series rainfall sequence Z T =[r1, r2, ..., r N The normalized sequence z' t The calculation is as follows:
[0049] z' t = r t / max(Z T );
[0050] Among them, z' t Let r be the normalized rainfall value at time t; t This represents the original rainfall value at time t; max(Z) T ) represents the maximum rainfall intensity value in this sequence.
[0051] Through normalization, the output one-dimensional feature vector sequence focuses more on expressing the peak structure and concentrated periods of the rainfall process, rather than the absolute amount of rainfall. This aligns with the design intent of using similarity to disaster-causing mechanisms.
[0052] Optionally, the normalized sequence z' t The calculation can also be:
[0053] z' t = f t / max(F time );
[0054] Where f t t is the time step value of the time-series feature component.
[0055] In some alternative implementations, if the disaster-oriented feature mapping model uses a multi-channel feature map output, the two-dimensional mesh feature field can be a multi-channel tensor. In this case, the above normalization operation can be performed separately on each channel, or the feature vector magnitude at each position can be normalized in the spatial dimension of the feature map.
[0056] This embodiment establishes a unified computational benchmark through standardized mesh mapping and normalization.
[0057] like Figure 2 As shown, according to one aspect of this application, the comprehensive disaster-causing similarity distance between the rainstorm event to be analyzed and various historical events is calculated, specifically as follows:
[0058] Normalized temporal similarity distance is calculated based on temporal feature components.
[0059] In this embodiment, the temporal similarity distance is not calculated directly using Euclidean distance, but is based on an improved dynamic time warping algorithm.
[0060] like Figure 3 As shown, in a preferred implementation, calculating the normalized temporal similarity distance based on temporal feature components includes:
[0061] The temporal feature components of the rainstorm event to be analyzed and the historical events to be compared are extracted respectively to construct two temporal feature sequences to be compared.
[0062] Specifically, let the temporal characteristic sequence of the rainstorm event to be analyzed be Q=[q1, q2, ..., q...]. M The sequence of historical events to be compared is C = [c1, c2, ..., c3], with a length of M; N The sequences are of length N. Both sequences have been normalized. It should be noted that each scalar feature value in the time-series feature sequences Q and C corresponds to the output value of the time-series feature component at that time step; to eliminate numerical differences between rainstorms of different magnitudes, each sequence is normalized to its maximum value, i.e., q... t = f t / max(F time ), c t = f t' / max(F time' ), where f t and f t' These represent the time-step values of the temporal characteristic components of the two events; F time and F time' These are the temporal characteristic components of the two events, respectively.
[0063] Calculate the feature difference between any two time steps in two time series feature sequences and construct a local distance matrix.
[0064] In a further implementation, physical constraints on the rainfall accumulation process are introduced when constructing the local distance matrix.
[0065] In this embodiment, to facilitate understanding of the physical mechanism of the cumulative process constraint, its principle is further explained. Standard dynamic time warping algorithms, when searching for the optimal alignment path, allow arbitrary local scaling of the time axis, with the sole objective of matching waveform geometry as closely as possible. This purely geometric alignment strategy ignores the physical nature of rainfall processes: rainfall is a continuous energy release process, and soil moisture content monotonically accumulates over time. When the accumulated amount exceeds a certain threshold, it triggers runoff or causes disasters. Therefore, aligning the initial stage of one rainfall event (when the soil is still dry) with the final stage of another rainfall event (when the soil is saturated) is physically unreasonable. To address this issue, a cumulative process constraint is introduced. Only when two time points to be aligned are at similar energy release stages in their respective rainfall processes are they considered reasonable matching candidates; if the cumulative processes of the two time points differ significantly, a high distance penalty is imposed, forcing the dynamic programming algorithm to abandon this matching.
[0066] Furthermore, physical constraints on the rainfall accumulation process are introduced, specifically including:
[0067] The normalized cumulative eigenvalues of the two time series feature sequences at each time step are calculated to obtain their respective cumulative progress curves; the normalized cumulative eigenvalues represent the proportion of the cumulative rainfall up to the current time to the total rainfall.
[0068] In this embodiment, for sequence Q, its normalized cumulative eigenvalue A at the m-th time step is... Q (m) is calculated as follows:
[0069] A Q (m) =∑ i=1 m q i / ∑ i=1 M q i ;
[0070] Among them, A Q (m) represents the cumulative percentage at time m, ranging from 0 to 1; the numerator is the sum of the characteristic values (rainfall) from the initial time to time m; the denominator is the total characteristic value of the entire sequence, i.e., the total rainfall; q i Let M be the temporal feature value of the rainstorm event to be analyzed at the i-th time step, and let M be the total length of the sequence Q.
[0071] Similarly, for sequence C, its normalized cumulative eigenvalue A at the nth time step C (n) is calculated as follows:
[0072] A C (n) = ∑ j=1 n c j / ∑j=1 N c j ;
[0073] Among them, A C (n) represents the cumulative percentage at time n; c j The time series feature values of historical rainstorm events at the j-th time step are used for comparison, and N is the total length of sequence C.
[0074] Two sequences A Q and A C These are their respective cumulative progress curves, which are monotonically increasing and both have a final value of 1. The two curves intuitively reflect the pace of rainfall energy release. For example, the cumulative curve of the first-peak rainfall will rise rapidly and approach 1, while the curve of the second-peak rainfall will be flat in the early stage and rise sharply in the later stage.
[0075] Based on the cumulative process curve, calculate the cumulative process difference between two time steps to be compared.
[0076] Specifically, for the m-th point in sequence Q and the n-th point in sequence C, their cumulative process difference value Diff A (m, n) is defined as the absolute value of the difference between the cumulative proportions of the two:
[0077] Diff A (m, n) = abs(A Q (m) - A C (n));
[0078] Here, abs() represents the absolute value function.
[0079] A penalty term is constructed using the accumulated process difference value, and the feature difference is weighted and corrected using the penalty term to obtain the corrected local distance.
[0080] In one exemplary implementation, a penalty term is constructed using the cumulative process difference value. Specifically, the power of the cumulative process difference value is added to the base weight to construct a non-linear penalty factor; the power is greater than 1 to apply a significantly enhanced penalty for larger cumulative process differences.
[0081] In this embodiment, the corrected local distance δ mod The specific formula for calculating (m, n) is as follows:
[0082] δ mod (m, n) = dist base (m, n) * [1 + γ* (Diff A (m, n) q )];
[0083] Where, δmod (m, n) represents the corrected local distance; dist base (m, n) are the differences in basic features, usually expressed as Euclidean distance (q). m - c n ) 2 Or absolute distance abs(q) m - c n ); γ is the preset base weight coefficient, which usually ranges from 2 to 10 and is used to adjust the overall strength of the cumulative constraint; q is the power parameter, and it is recommended to take a value of 2 or greater.
[0084] The exponent q is introduced here to construct a nonlinear penalty mechanism. When the cumulative process difference is small, such as 0.1, the penalty term is close to 1, and the algorithm degenerates into standard DTW, allowing small temporal misalignments to adapt to natural variations; however, when the cumulative process difference is large, such as 0.5, it means that one rain has stopped while another has just started, (0.5) 2 *γ will generate a huge penalty value, forcing the avoidance of this physically unreasonable alignment in subsequent optimal path searches.
[0085] For example, suppose γ=4 and q=2. If Diff A If the value is 0.1, then the correction factor is 1 + 4 * 0.01 = 1.04, which is a slight penalty; if Diff... A =0.5, then the correction factor is 1 + 4 * 0.25 = 2.0, doubling the distance, which is a strong penalty.
[0086] It should be noted that the recommended value for γ is 2 to 10, representing the amplification factor of the cumulative process constraint on the total distance. When γ=2, the cumulative difference is 100%, and the maximum penalty coefficient is 1+2×1=3; when γ=10, the maximum penalty coefficient can reach 11. In practical applications, if the rainstorm events in the analyzed area are mainly short-duration heavy rainfall, it is recommended to take a larger value for γ, such as 8-10, to enhance the sensitivity to differences in the concentrated rainfall period; if it is a long-duration slow rainfall scenario, such as watershed flood control, γ can be appropriately reduced to 3-5.
[0087] Additionally, a value of 2 is recommended for q because the squared penalty has mathematical convexity and computational stability. When q=2, the penalty function is a quadratic function, and the gradient changes smoothly. If q takes a larger value, such as 3 or 4, although the penalty for large differences is stronger, it may lead to the gradient being too small in regions of small differences, affecting optimization efficiency.
[0088] The local distance matrix is constructed using the corrected local distances, so that the time step with the larger the cumulative process difference has a higher cost to be matched in the optimal alignment path.
[0089] It should be noted that the cumulative progress curve refers to the monotonically increasing curve formed after converting the time-series rainfall of a rainstorm into a cumulative percentage sequence. The physical meaning of this curve lies in characterizing the temporal rhythm of rainfall energy release. Taking typical early-peak and late-peak rainfall patterns as examples: Early-peak rainfall's main rainfall is concentrated in the first half of the rainfall process, so its cumulative progress curve rises rapidly in the initial stage and quickly approaches 100%, exhibiting an overall upward convex shape; late-peak rainfall's main rainfall is concentrated in the second half of the rainfall process, so its cumulative progress curve rises slowly in the initial stage and then rises sharply in the later stage, exhibiting an overall downward concave shape. Although the instantaneous rainfall waveforms of these two types of rainfall processes may become geometrically similar after time-axis scaling, their corresponding disaster-causing effects are drastically different: early-peak rainfall, because the soil is not yet saturated in the early stages, may only cause mild waterlogging; late-peak rainfall, because the soil is already close to saturation due to the earlier rainfall, can easily trigger urban flooding or flash floods due to the subsequent heavy rainfall. Therefore, introducing a cumulative progress constraint into the temporal similarity measurement forces the algorithm to consider the consistency of energy release rhythm when performing temporal alignment.
[0090] In the local distance matrix, a dynamic programming algorithm is used to search for an optimal alignment path from the start time step pair to the end time step pair, such that the cumulative local distance on the optimal alignment path is minimized.
[0091] In this embodiment, DTW recursive logic is used, and the modified local distance is preferred. The recursive formula for the cumulative distance matrix D(m, n) is as follows:
[0092] D(m, n) = δ mod (m,n)+min(D(m-1,n),D(m,n-1),D(m-1,n-1));
[0093] Where D(m,n) represents the minimum cumulative cost of matching from the starting point (1,1) to the current point (m,n); min() represents taking the minimum value among the three, corresponding to the temporal extension, compression and diagonal matching operations respectively.
[0094] The minimum cumulative local distance corresponding to the optimal alignment path is taken as the temporal similarity distance.
[0095] Specifically, the final normalized temporal similarity distance D time The calculation is as follows:
[0096] D time =D(M,N) / (M+N);
[0097] Where D(M, N) is the value of the endpoint of the cumulative distance matrix; (M+N) is the normalization factor for the path length.
[0098] In some optional implementations, if some historical data lacks cumulative information, the parameter γ can be set to 0. In this case, the algorithm automatically degenerates into the standard DTW algorithm, ensuring backward compatibility of the system. Furthermore, for long sequence calculations, global path constraint windows such as Sakoe-Chiba bands or Itakura parallelograms can be introduced to further reduce computational load and prevent the generation of ill-conditioned curved paths.
[0099] Execute optimal alignment path backtracking based on the cumulative distance matrix to obtain the time correspondence between two time series.
[0100] In this embodiment, the backtracking of the optimal alignment path adopts a greedy backtracking strategy. Starting from the end position of the cumulative distance matrix, it backtracks gradually towards the starting point, selecting the predecessor position that maximizes the decrease in cumulative distance at each step.
[0101] Specifically, let the current position be coordinates (m, n), then the selection rule for the predecessor position is as follows:
[0102] (m prev n prev ) = argmin(D(m-1,n),D(m,n-1),D(m-1,n-1));
[0103] Among them, (m prev n prev ) represents the coordinates of the selected predecessor position; D(m-1, n) represents the cumulative distance value of the position to the left of the current position, corresponding to the extension operation of time sequence C; D(m, n-1) represents the cumulative distance value of the position to the bottom of the current position, corresponding to the extension operation of time sequence Q; D(m-1, n-1) represents the cumulative distance value of the position to the bottom left of the current position, corresponding to the synchronous forward operation of the two time sequences; argmin represents taking the position with the smallest cumulative distance value among the three candidate positions.
[0104] Repeat the backtracking operation from the endpoint (M, N) until the starting point (1, 1) is reached. Record all the coordinates of the positions along the path in sequence to obtain the complete optimal alignment path. Each coordinate (m, n) on the path represents the match between the m-th time of time series Q and the n-th time of time series C.
[0105] In some alternative implementations, the optimal alignment path can be used to visualize the temporal correspondence between two rainstorms, helping forecasters understand the system's retrieval logic.
[0106] Calculate the normalized spatial similarity distance based on spatial feature components.
[0107] Specifically, the optimal transmission theory is preferred for implementation.
[0108] like Figure 4 As shown, in a preferred implementation, calculating the normalized spatial similarity distance based on spatial feature components includes:
[0109] The spatial feature components of the rainstorm event to be analyzed and the historical events to be compared are normalized to obtain two spatial feature probability distributions.
[0110] In this embodiment, the normalized spatial distribution of the rainstorm event to be analyzed is assumed to be P={p k The distribution of the historical events being compared is Q = {q} l}. Where k and l are indices of spatial grid points, and the total number of grids is N. grid The normalization method satisfies ∑(p k ) = ∑(q l = 1.
[0111] Construct a cost matrix that describes the transmission cost between spatial grid points.
[0112] Specifically, the cost matrix C is N grid * N grid The square matrix, where element C(k, l) represents the unit catastrophic cost required to move a unit of rainfall from grid k to grid l.
[0113] Furthermore, to clearly explain the reasons for adopting optimal transport theory, the advantages of Wasserstein distance over traditional Euclidean distance are elaborated here. Traditional spatial rainfall field similarity measures typically use grid-by-grid Euclidean distance or correlation coefficients. These methods treat two spatial fields as high-dimensional vectors, directly comparing the numerical differences at corresponding locations. However, this metric fails to capture the geometric transport characteristics of spatial distribution. For example, a rainfall event concentrated in the eastern part of a region and another concentrated in the western part may have a large Euclidean distance between them; however, transporting the rainfall from the east to the west may require a relatively small distance. Wasserstein distance is defined based on this transport perspective.
[0114] Wasserstein distance can be understood as the average transport distance required to transform one spatial distribution into another. It naturally perceives the overall displacement, deformation, and aggregation / dispersion of a spatial distribution, reflecting the true differences in spatial configuration relationships better than point-by-point comparisons using Euclidean distance. This embodiment further introduces disaster sensitivity weighting on top of the standard Wasserstein distance, ensuring that transport costs reflect not only geometric distance but also differences in the disaster-causing environment.
[0115] In one possible embodiment, a cost matrix describing the transmission cost between spatial grid points is constructed, including:
[0116] Based on disaster-bearing environment data, the disaster sensitivity index of each spatial grid point in the spatial characteristic component is calculated.
[0117] In this embodiment, multi-source environmental data are fused into a scalar field. Optionally, the disaster sensitivity index of each spatial grid point in the spatial feature component is calculated, specifically based on a weighted calculation of at least one of the following sensitivity factors: a terrain slope sensitivity factor, whose value is positively correlated with the terrain slope of the spatial grid point; a water system distance sensitivity factor, whose value is negatively correlated with the Euclidean distance from the spatial grid point to the nearest river; and a land use sensitivity factor, whose value is determined according to the preset disaster weight corresponding to the land cover type of the spatial grid point.
[0118] Specifically, for any grid point k, the formula for calculating its comprehensive disaster susceptibility index s(k) is shown below:
[0119] s(k)=w slope *s slope (k)+w river *s river (k)+w land *s land (k);
[0120] Among them, w slope w river w land The weight coefficients of each factor must satisfy a sum of 1.
[0121] Furthermore, the calculation methods for each factor are as follows:
[0122] Topographic slope sensitivity factor s slope (k): s slope (k)=min(1, slope(k) / slope) crit );
[0123] Where slope(k) is the slope value of grid k; crit The critical slope is 25 degrees. If the slope exceeds this, the flow generation is considered to be extremely fast and the sensitivity is saturated.
[0124] Water system distance sensitivity factor s river (k): s river (k)=exp(-dist river (k) / λ river );
[0125] Among them, dist river (k) is the distance from grid k to the nearest river; λ river The attenuation characteristic distance is 2000 meters. The closer the distance, the closer the exponent value is to 1.
[0126] Land use sensitivity factor s land (k): s land (k)=LUT(type(k));
[0127] Where LUT is a lookup table, for example: urban land = 1.0, cultivated land = 0.6, forest land = 0.2; type(k) is the land cover type of spatial grid point k.
[0128] In some preferred embodiments, the disaster sensitivity index may further include a historical disaster frequency sensitivity factor. The historical disaster frequency sensitivity factor is calculated by statistically analyzing the frequency of disaster-causing events occurring at each grid point within the region historically, and then normalizing the data. Areas with high historical disaster frequencies often have specific disaster-promoting factors, such as aging drainage networks, concentrated underground space entrances, and low-lying transportation hubs. These factors may be difficult to fully characterize using explicit data such as topography, water systems, and land use. Therefore, introducing a historical disaster frequency factor can compensate for the aforementioned information gaps and improve the predictive ability of the disaster sensitivity index.
[0129] For example, the formula for calculating the historical disaster frequency sensitivity factor is as follows:
[0130] s hist (k) = N disaster (k) / N max ;
[0131] Among them, s hist (k) is the historical disaster-causing frequency sensitivity factor for grid point k, with a value ranging from zero to one; N disaster (k) represents the cumulative number of disaster-causing events occurring at grid point k during the statistical period; N max To analyze the maximum number of disaster occurrences across all grid points within the region, a normalization method is used.
[0132] Calculate the basic geometric distance between any two spatial grid points.
[0133] For example, the basic geometric distance c geo (k, l) is usually represented by Euclidean distance:
[0134] c geo (k, l) = sqrt((x) k -x l ) 2 +(y k -y l ) 2 );
[0135] Among them, (x k y k ) and (x l yl ) represents the geographic coordinates of the grid center.
[0136] A sensitivity weighting factor is constructed using the disaster sensitivity index of the start and end grid points, and the basic geometric distance is corrected using the sensitivity weighting factor to obtain the disaster cost distance.
[0137] In an optional embodiment, a sensitivity weighting factor is constructed using the disaster susceptibility index of the start and end grid points, including at least a portion of the following:
[0138] Calculate the larger values of the disaster sensitivity index for the start and end grid points to increase the cost of transmission paths involving highly sensitive areas;
[0139] Calculate the absolute value of the difference between the disaster sensitivity indices of the starting and ending grid points to increase the cost of transmission paths across different sensitivity levels.
[0140] In this embodiment, the corrected disaster cost distance c D The formula for calculating (k, l) is as follows:
[0141] c D (k, l) = c geo (k, l)*[1+α*max(s(k), s(l))]*[1+β*abs(s(k)-s(l))];
[0142] Wherein, s(l) is the disaster sensitivity index of spatial grid point l; the max(s(k), s(l)) term ensures that if any point between the start and end points is located in a high-risk area, such as an urban waterlogging point, the transmission cost of the path will be amplified, making the algorithm tend to consider rain areas falling in high-sensitivity areas as highly dissimilar events to rain areas falling in low-sensitivity areas; the abs(s(k)-s(l)) term increases the transmission resistance across areas with different risk levels; α and β are adjustment coefficients, and it is generally recommended that the values be between 0.5 and 2.0.
[0143] Optionally, before calculating the transmission cost between spatial grid points, the geographic coordinates of all grid points are normalized and mapped to the interval [0, 1] so that subsequent distance calculations are performed on a uniform dimensionless scale.
[0144] It should be noted that the disaster sensitivity index is a dimensionless indicator that comprehensively reflects the intensity of a spatial location's response to rainstorm-induced disasters. The same rainfall falling in different geographical environments can significantly affect the likelihood and severity of disasters. The main factors influencing disaster sensitivity include topographic slope, distance from water systems, land use type, and historical disaster frequency. A steeper topographic slope results in faster runoff velocity and a higher risk of flash floods; proximity to rivers increases the risk of overflow flooding; a higher proportion of impervious surfaces weakens surface infiltration capacity and increases the risk of waterlogging; areas with a history of frequent disasters often possess unidentified disaster-sensitive factors. By weighting and integrating these factors, a disaster sensitivity field covering the analysis area is constructed and incorporated into the calculation of spatial similarity distance.
[0145] The disaster-causing cost distance refers to the modified distance formed by superimposing disaster-causing sensitivity weights on traditional geometric distance. Within the framework of optimal transport theory, the cost of transporting rainfall from one spatial location to another should not only depend on the geometric distance between the two points but also reflect the differences in disaster-causing effects. Specifically, if the transport path involves a highly disaster-sensitive area, a higher cost penalty should be imposed, as this means that a small shift in the rainfall area can lead to significant changes in disaster consequences. Similarly, if the transport path crosses areas with different sensitivity levels, additional penalties should be imposed, as this reflects the difference in the degree of matching between the two rainfall events in terms of disaster-causing environment. By introducing the disaster-causing cost distance instead of simple geometric distance, spatial similarity measures can naturally perceive the heterogeneity of the disaster-bearing environment.
[0146] A cost matrix is constructed based on the disaster-causing cost distance, resulting in higher transmission costs for transmission paths involving grid points with high disaster-causing sensitivity.
[0147] Specifically, the elements of the final cost matrix C are the c calculated above. D (k, l).
[0148] To clearly illustrate the mathematical foundation of the optimal transport algorithm, the constraints of the optimal transport problem are fully described here. The goal of the optimal transport problem is to find a transport plan matrix that describes how to transport mass from each location in the source distribution to each location in the target distribution, minimizing the total transport cost. The transport plan matrix must satisfy the following marginal constraints:
[0149] The first constraint is the source distribution marginal constraint:
[0150] ∑ l (γ(k, l)) = p(k), which holds for all source positions k;
[0151] Where γ(k, l) is the (k, l)th element of the transport plan matrix, representing the proportion of mass transported from source location k to target location l; ∑ l This represents the summation over all target locations l; p(k) is the probability value of the source distribution (the rainstorm event to be analyzed) at location k. The physical meaning of this constraint is: the total mass removed from any source location must be equal to the original mass at that location.
[0152] The second constraint is the marginal constraint of the target distribution:
[0153] ∑ k (γ(k, l)) = q(l), holds for all target positions l;
[0154] Where, ∑ k Let q(l) represent the summation over all source locations k; q(l) is the probability value of the target distribution (historical rainstorm events) at location l. The physical meaning of this constraint is: the total mass moved into any target location must be equal to the mass required for that location.
[0155] The third constraint is a nonnegativity constraint:
[0156] γ(k, l) ≥ 0 holds for all position pairs (k, l);
[0157] The physical meaning of this constraint is: the transmission quality cannot be negative, that is, it can only be transported and cannot be created or disappeared out of thin air.
[0158] Among all transmission plans that satisfy the above three constraints, the plan that minimizes the total transmission cost is called the optimal transmission plan. The total transmission cost is defined as the sum of the element-wise products of the transmission plan matrix and the cost matrix.
[0159] In this embodiment, due to the high computational complexity of directly solving the linear programming problem, an entropy-regularized Sinkhorn algorithm is used for approximate solution. Entropy regularization adds an entropy term to the transfer plan matrix in the objective function, making the optimal solution smoother and the iteration process converge faster. The convergence criterion for the Sinkhorn iteration is: when the change in the scaling vector u obtained from two consecutive iterations is less than a preset threshold, the iteration is considered convergent. The specific criterion formula is:
[0160] max k (abs(u new (k) - u old (k))) < ε conv ;
[0161] Among them, u new (k) represents the k-th component of the scaling vector obtained in the current iteration; u old(k) represents the k-th component of the scaling vector obtained in the previous iteration; abs indicates taking the absolute value; max k This indicates taking the maximum value over all components; ε conv For the convergence threshold, a value range of 1×10 is recommended. -6 Up to 1×10 -4 .
[0162] Based on the cost matrix, the minimum total transmission cost required to transform one spatial feature probability distribution into another spatial feature probability distribution is calculated using the optimal transmission algorithm.
[0163] In a preferred implementation of this embodiment, to address the slow solution speed of standard linear programming under large-scale grid conditions, the Sinkhorn iterative algorithm is used to solve the entropy-regularized optimal transport problem. The specific calculation process is as follows: Calculate the Gibbs kernel matrix K:
[0164] K(k, l) = exp(-c D (k, l) / ε);
[0165] Here, ε is the entropy regularization parameter, and its value should match the typical order of magnitude of the cost matrix elements; under the condition of coordinate normalization to [0, 1], it is recommended that ε range from 0.01 to 0.5. A smaller ε makes the transmission scheme more concentrated, while a larger ε makes the transmission scheme smoother and the Sinkhorn iteration converges faster. A suitable ε value can be selected experimentally according to the grid density and accuracy requirements. ε is used to control the sparsity of the transmission plan.
[0166] Perform Sinkhorn iterations to update vectors u and v:
[0167] u new =P / (K*v); v new =Q / (transpose(K)*u new );
[0168] Where P and Q are the probability distribution vectors of the rainstorm event to be analyzed and the historical event to be compared, respectively; / indicates element-wise division; * indicates matrix multiplication; u is the scaling vector used to normalize the rows of the Gibbs kernel matrix K in the Sinkhorn iteration; v is the scaling vector used to normalize the columns of the Gibbs kernel matrix K in the Sinkhorn iteration; u new Scale the new row vector; v new Scale the new column vector; transpose(K) denotes the transpose of matrix K. Repeat the iteration until u and v converge.
[0169] Calculate the minimum total transmission cost W sinkhorn That is, the Sinkhorn distance:
[0170] W sinkhorn =∑(u*((K*C)*v)).
[0171] For example, assuming the analysis region is simplified to a 3×3 grid, the normalized spatial distributions of the two rainstorms are as follows:
[0172] P=[[0.1, 0.2, 0.1], [0.1, 0.3, 0.1], [0.0, 0.1, 0.0]];
[0173] Q=[[0.0, 0.1, 0.0], [0.1, 0.3, 0.1], [0.1, 0.2, 0.1]];
[0174] Assume the disaster sensitivity index of each grid is s=[[0.2, 0.5, 0.2], [0.3, 0.9, 0.3], [0.2, 0.5, 0.2]], with the central urban area having the highest sensitivity. Calculate the disaster cost distance matrix C (9×9 matrix), where the value of C(center, corner) is significantly higher than the pure geometric distance due to sensitivity weighting. Through Sinkhorn iteration (assuming ε=0.1), after approximately 50 iterations and convergence, the minimum transmission cost W is calculated. sinkhorn = 0.42. If sensitivity weighting is not used (α=β=0), the standard Wasserstein distance is only 0.28. The difference between the two, 0.42 and 0.28, is precisely because the high rainfall area of P is located in the low sensitivity corner, while the high rainfall area of Q is close to the high sensitivity center. This embodiment correctly identifies this difference in disaster.
[0175] The minimum total transmission cost is used as the spatial similarity distance.
[0176] In some alternative implementations, if computational resources are extremely limited and the number of grids is small, such as less than 20×20, linear programming can be used directly to solve for the exact Wasserstein distance, in which case the parameter ε is not required.
[0177] In one embodiment of this application, the temporal similarity measurement results and spatial similarity measurement results are calculated using Euclidean distance or cosine distance.
[0178] In other words, in scenarios where computing resources are limited or data precision is insufficient, temporal similarity measurement is calculated using Euclidean distance or cosine distance based on temporal feature components to obtain a normalized temporal similarity distance; spatial similarity measurement is calculated using Euclidean distance or cosine distance based on spatial feature components to obtain a normalized spatial similarity distance.
[0179] This embodiment provides two different levels of distance calculation strategies. The first is a high-level strategy based on physical constraints, and the second is a basic strategy based on geometric statistics. The system can automatically switch between these strategies based on the actual computing load of the operating environment or user configuration.
[0180] When using the basic strategy, the temporal similarity distance D time_base The calculation can be directly based on the Euclidean distance:
[0181] D time_base =sqrt(∑((q i -c i ) 2 ));
[0182] Where, q i and c i ...
[0183] Alternatively, cosine distance can be used, focusing on evaluating the directional consistency of rain pattern vectors, i.e., waveform similarity:
[0184] D time_cos =1-(dot(Q,C) / (norm(Q)*norm(C)));
[0185] Where dot(Q, C) is the vector dot product; norm is the L2 norm of the vector; D time_cos This is a temporal similarity distance based on cosine distance.
[0186] Similarly, for spatial similarity distance D spacebase If detailed disaster-bearing environmental data is unavailable or for rapid initial screening, the Frobenius norm distance between the two two-dimensional rainfall field matrices can be directly calculated:
[0187] D spacebase =sqrt(∑((p k -q k ) 2 ));
[0188] Where, p k and q k This represents the normalized rainfall value for the corresponding grid point.
[0189] It should be noted that although the basic strategy has extremely fast computation speed, its retrieval accuracy is usually lower than that of the advanced strategy because it lacks awareness of cumulative effects and disaster-causing environments. Therefore, this application preferably adopts the advanced strategy and only uses the basic strategy as a fallback option.
[0190] The temporal similarity distance and spatial similarity distance are linearly weighted and summed according to preset weight coefficients to obtain the comprehensive disaster-causing similarity distance.
[0191] Specifically, regardless of the strategy used to calculate the component distances, multimodal fusion is ultimately required. The comprehensive disaster-causing similarity distance D... total The general calculation formula is as follows:
[0192] D total = w T * D time + w S * D space + w O * D stat ;
[0193] Among them, D time D is the normalized temporal similarity distance; space D is the normalized spatial similarity distance; stat This is an auxiliary distance based on statistical characteristics such as the difference in total rainfall and the difference in maximum rainfall intensity; w T w S w O For the corresponding weighting coefficients, w must satisfy... T + w S + w O = 1.
[0194] For example, in a typical urban flooding warning scenario, since the spatial distribution of short-duration heavy rainfall has the greatest impact on flooding, w can be set. S = 0.5, w T = 0.3, w O = 0.2.
[0195] Furthermore, to eliminate the dimensional differences between different distance metrics, it is usually necessary to perform Sigmoid mapping or minimum-maximum normalization on each component distance before weighted summation, mapping it to the [0, 1] interval. For example:
[0196] D norm = 1 / (1 + exp(-k * (D raw - D mean )));
[0197] Among them, D norm D is the distance after mapping; raw This is the original calculated distance; D mean is the historical statistical mean of this distance; k is the scaling factor.
[0198] Through the fusion mechanism, the comprehensive characteristics of rainstorm events in the three dimensions of time, space, and quantity can be captured, making the search results highly consistent in terms of disaster-causing mechanisms. If two rainstorms have the same spatial distribution shape, but one falls on wasteland (low sensitivity) and the other falls on urban areas (high sensitivity), the spatial similarity distance between them will increase due to the presence of a sensitivity weighting factor, thus correctly reflecting the huge differences in their disaster-causing consequences.
[0199] Alternatively, regarding the method for determining the weighting coefficients, the following two options are provided:
[0200] The first approach is an automatic optimization method based on cross-validation. Labeled historical rainstorm samples are divided into a training set and a validation set. On the validation set, retrieval accuracy is used as the evaluation metric. A grid search or Bayesian optimization method is employed to traverse candidate combinations of weight coefficients, and the weight combination that achieves the highest accuracy on the validation set is selected as the final set value.
[0201] The second approach is a manual setting method based on business experience. Initial weights are set by domain experts according to the disaster-causing characteristics of the analyzed area. For example, for mountainous watersheds with complex terrain, the spatial component weight can be appropriately increased; for plains and urban areas with mature drainage systems, the temporal component weight can be appropriately increased.
[0202] This embodiment describes the fusion of heterogeneous temporal and spatial distances into a unified metric, and provides a basic alternative computing solution for scenarios with limited computing resources or insufficient data precision.
[0203] In one possible embodiment, the disaster-oriented feature mapping model is obtained through pre-training via the following steps:
[0204] Construct a training set of historical rainstorm samples with disaster severity labels.
[0205] In this embodiment, the training set consists of thousands of historical rainstorm events. Each sample includes multimodal data containing rainfall sequences, spatial field data, and environmental data, as well as a disaster severity label Y. For ease of calculation, discrete text labels are mapped to numerical codes. For example: no disaster = 0, slight flooding = 1, moderate flooding = 2, severe urban flooding = 3.
[0206] Furthermore, regarding the labeling standards for disaster severity levels, the following four-level classification system is preferred:
[0207] No disaster level (marked as L0, numerical code 0): The rainfall process did not cause any observable disaster consequences, the city's drainage system was operating normally, and there were no reports of waterlogging.
[0208] Mild disaster level (marked as L1, numerical code 1): The rainfall process caused localized short-term water accumulation or slight flooding of farmland, but did not significantly affect transportation and residents' lives. The water receded naturally within two hours after the rainfall stopped.
[0209] Moderate disaster level (marked as L2, numerical code 2): The rainfall process causes large-scale water accumulation, resulting in road traffic interruption, vehicles stalling in water, and water entering the first floor of buildings, requiring the activation of emergency drainage measures, and the economic losses reach a certain amount.
[0210] Severe disaster level (marked as L3, numerical code 3): The rainfall process causes disaster consequences, such as casualties, large-scale building collapse, and damage to important infrastructure, requiring the activation of a high-level emergency response.
[0211] The above labeling standards can be adjusted and refined according to specific application scenarios. Labeling work is usually based on a comprehensive assessment of multi-source data, including post-disaster investigation reports, emergency management department records, news media reports, and social media information.
[0212] Training samples are constructed from a historical rainstorm sample training set, and the similarity label of the training samples is determined based on the difference in the disaster severity of each pair of training samples.
[0213] Specifically, the system randomly or according to a specific strategy selects two samples A and B to form a sample pair (A, B). The difference in their disaster severity Δ is then calculated. Y :
[0214] Δ Y = abs(Y A - Y B );
[0215] Among them, Y A and Y B These are the disaster severity values for samples A and B, respectively.
[0216] If Δ Y = 0 (same level), then the similarity label is set as a positive sample pair; if Δ Y If Δ > 0, then it is set as a negative sample pair, and Δ Y The magnitude of the value quantitatively reflects the degree of negativity.
[0217] In a preferred implementation, a hard example mining strategy is employed when constructing paired training samples, specifically including:
[0218] Select sample pairs that are close in feature space but have a difference in disaster severity greater than a preset threshold as hard negative samples;
[0219] Alternatively, select sample pairs whose feature space distance is in the boundary region and satisfy the disaster level difference constraint as semi-hard negative samples.
[0220] Add hard negative samples or semi-hard negative samples to the historical rainstorm sample training set to optimize model parameters.
[0221] In this embodiment, to improve the model's discriminative ability, an Online Hard Example Mining (OHEM) strategy is preferred. During training, the distance d between sample pairs in the current model's feature space is calculated in real time. Hard negative samples refer to those that the model considers to be very similar (i.e., the distance d is small), but whose actual disastrous consequences differ greatly (i.e., Δ). Y Large sample pairs. These samples are the most frequent sources of model errors and therefore need to be prioritized for inclusion in the training batch. Semi-hard negative samples refer to sample pairs whose distance *d* is slightly greater than the distance to positive sample pairs, but are still near the decision boundary. These samples help the model refine the boundary adjustments.
[0222] The specific filtering logic is as follows: If d(A, B) < margin and Δ Y If the value is greater than θ, it is labeled as a hard negative sample.
[0223] Where margin is the preset distance boundary; θ is the disaster difference threshold, such as 1.
[0224] Alternatively, the selection criteria for hard negative samples can be expressed as:
[0225] condition hard = (d(A, B) < d threshold_hard AND (Δ) Y (A, B) > θ hard );
[0226] Among them, condition hard The result of the hard negative sample judgment is either true or false; d(A, B) is the distance between sample A and sample B in the current model feature space; d threshold_hard For the distance threshold of hard negative samples, it is recommended to take 1.5 times the average distance of positive sample pairs; Δ Y (A, B) represents the absolute value of the difference in disaster severity between sample A and sample B; θ hard For the threshold of disaster difference, it is recommended to set the value to 1 or 2; AND represents logical AND operation.
[0227] The selection criteria for semi-hard negative samples can be expressed as:
[0228] condition semihard = (d pos < d(A, B) < dpos + margin) AND (Δ Y (A, B) > 0);
[0229] Among them, condition semihard This is the result of a semi-hard negative sample judgment; d pos is the average distance between positive sample pairs in the current batch; margin is the boundary parameter in the contrastive loss function; this condition filters out negative sample pairs whose distance is slightly greater than that of positive sample pairs but are still near the decision boundary.
[0230] The feature representations of paired training samples are extracted using a disaster-oriented feature mapping model, and the distance between the training sample pairs in the feature space is calculated.
[0231] Specifically, samples A and B are input into a neural network model to extract feature vector f. A and f B And calculate the Euclidean distance d:
[0232] d = norm(f A -f B );
[0233] It should be noted that the model structure here can use a lightweight fully connected network to process statistical features, for example:
[0234] Z = ReLU(W * X + b);
[0235] Where X is the input statistical index vector; W and b are the learnable weights and biases; and Z is the output feature of the fully connected network layer. For spatiotemporal features, a convolutional network is used.
[0236] Furthermore, to clearly illustrate the mathematical structure of the feature mapping model, the specific form of the feature transformation function is given here. In a typical implementation of this embodiment, for the input rainstorm statistical feature vector, a single-layer nonlinear transformation is used to map it to the disaster-oriented feature space. The mathematical expression of the feature transformation function is:
[0237] Z = ReLU(W * X + b);
[0238] Where Z is the output disaster-causing feature vector with dimension m; X is the input original rainstorm feature vector with dimension d, which includes statistical indicators such as total rainfall, maximum rainfall intensity, rainfall duration, and spatial standard deviation of rainfall; W is a learnable weight matrix with dimension m multiplied by d; b is a learnable bias vector with dimension m; and ReLU is a modified linear unit activation function, which performs element-wise nonlinear processing on the linear transformation result, setting negative values to zero and keeping positive values unchanged.
[0239] The mathematical expression for the modified linear unit activation function is:
[0240] ReLU(x) = max(0, x);
[0241] Where x is the input value; max(0, x) represents the larger of zero and the input value.
[0242] Each row of the weight matrix W can be viewed as a catastrophic correlation detector, used to detect a specific combination pattern of input features; the bias vector b is used to adjust the activation threshold of each detector; and the nonlinear activation function endows the network with the ability to express complex nonlinear catastrophic laws. During training, the weight matrix W and the bias vector b are iteratively optimized using the gradient descent algorithm. The optimization objective is to make samples with the same catastrophic level closer together in the feature space Z, and samples with large differences in catastrophic level farther apart in the feature space.
[0243] A loss function is constructed based on distance and similarity labels, and the parameters of the disaster-oriented feature mapping model are optimized using the gradient descent algorithm, so that samples with the same disaster level are closer in the feature space, and samples with large differences in disaster level are farther apart in the feature space.
[0244] For example, the mathematical expression for the basic contrastive loss function is:
[0245] L contrastive = y * d 2 + (1 - y) * max (0, margin - d) 2 ;
[0246] Among them, L contrastive To compare the loss values; y is the similarity label of the sample pair, with a value of one for positive sample pairs and zero for negative sample pairs; d is the Euclidean distance between the sample pairs in the feature space; margin is a preset distance boundary hyperparameter used to control the minimum separation distance between negative sample pairs, and it is recommended to take a value between 1.0 and 2.0; max(0, margin - d) means taking the larger of zero and (margin - d), and this term only produces a non-zero gradient when d is less than margin.
[0247] For positive sample pairs with the same severity level, the square of their distance d is directly penalized, forcing the model to bring them closer in the feature space; for negative sample pairs with different severity levels, the penalty is only applied when their distance d is less than the boundary margin, forcing the model to push them away from the boundary.
[0248] In a further embodiment, the loss function incorporates a continuity constraint on the catastrophic effect, specifically including:
[0249] The discrete disaster severity levels are converted into continuous numerical codes, and the difference in disaster effects between pairs of training samples is calculated.
[0250] In this embodiment, the difference in disaster-causing effect Δ effect The normalization formula is:
[0251] Δ effect =Δ Y / (Y max - Y min );
[0252] Among them, Y max and Y min These represent the maximum and minimum values for the disaster severity level, such as 3 and 0.
[0253] An effect proportion constraint term is constructed to constrain the distance difference between sample pairs in the feature space to be proportional to the difference in catastrophic effects.
[0254] Specifically, the effect proportion constraint term L prop This results in a linear correlation between the feature distance and the difference in disaster causation. The calculation formula is as follows:
[0255] L prop = (d - k *Δ effect ) 2 ;
[0256] Where d is the feature distance between sample pairs; k is a preset scaling factor, such as 1.0. The effect scaling constraint forces the model to: if the catastrophic difference is twice the original, the feature distance should also be twice the original.
[0257] Optionally, in a more stringent implementation, the effect proportion constraint term is constructed using a triplet form to more precisely constrain the proportional relationship between distance difference and effect difference. Specifically, triplet samples (i, j, k) are constructed from the training set, where sample i is the anchor sample, sample j is a sample with a small difference in catastrophic effect from the anchor, and sample k is a sample with a large difference in catastrophic effect from the anchor, satisfying condition Δ effect (i, j) is less than Δ effect (i, k).
[0258] The formula for calculating the effect proportion constraint loss in the form of a ternary tuple is:
[0259] L prop_triplet = ∑ T (max(0,d(i,j) - d(i,k) + m * (Δ effect (i, k) - Δ effect (i, j))));
[0260] Among them, L prop_triplet For the proportional constraint loss of the triplet effect; ∑ T This represents the summation over all valid triples; d(i,j) is the distance between anchor sample i and sample j in the feature space; d(i,k) is the distance between anchor sample i and sample k in the feature space; Δ effect (i, j) represents the normalized difference in catastrophic effect between sample i and sample j; Δ effect (i, k) represents the normalized difference in catastrophic effect between sample i and sample k; m is the marginal proportionality coefficient, which controls the conversion ratio between distance difference and effect difference, and it is recommended to take a value range of 0.5 to 2.0; max(0, ) indicates taking the positive part, and a non-zero loss is generated only when the expression in parentheses is positive.
[0261] If the difference in catastrophic effect between sample k and the anchor point is greater than the difference in catastrophic effect between sample j and the anchor point, then d(i, k) in the feature space must also be greater than d(i, j), and the difference should be proportional to the difference in effect. If this constraint is violated, a penalty loss is incurred.
[0262] Construct an effect regression constraint term to constrain the distance in the feature space to predict the difference in disaster-causing effects through a preset monotonic mapping function.
[0263] In this embodiment, the effect regression constraint term L reg A more rigorous function mapping relationship can be established. Construct a monotonically increasing exponential mapping function g(d):
[0264] g(d) = 1 - exp(-λ*d);
[0265] Where λ is the shape parameter, such as 1.0. The exponential mapping function maps the non-negative distance d to the interval [0, 1), which corresponds exactly to the normalized catastrophic difference value.
[0266] The corresponding loss term is:
[0267] L reg = (g(d) -Δ effect ) 2 ;
[0268] The effect regression constraint requires that, using the feature distance d, the disaster-causing difference Δ can be directly predicted by the function g(d). effect .
[0269] The loss function is obtained by weighting and summing the effect proportion constraint term and the effect regression constraint term with the baseline comparison loss term.
[0270] Specifically, the final total loss function L total The calculation is as follows:
[0271] L total = L contrastive + w prop * L prop + w reg * L reg ;
[0272] Among them, L contrastive Based on contrast loss; w prop and w reg These are the weighting coefficients.
[0273] By minimizing L total The model not only learned to separate different classes, but also learned to separate them in an orderly manner according to the magnitude of the disaster-causing differences, thus achieving true disaster-causing-oriented metric learning.
[0274] In a typical training experiment, the training set contains 5000 historical rainstorm samples. The model uses the Adam optimizer with an initial learning rate of 0.001. During training, the typical changes of each loss term are as follows:
[0275] Round 1: L total = 2.45, where L contrastive = 1.80, L prop = 0.45, L reg = 0.20;
[0276] Round 10: L total = 0.85, where L contrastive = 0.55, L prop = 0.18, L reg = 0.12;
[0277] Round 50: L total = 0.32, where L contrastive = 0.20, L prop = 0.07, L reg = 0.05;
[0278] After 100 rounds of training, on a validation set containing 1000 samples, the Top-5 accuracy (i.e., the proportion of the top 5 retrieved historical events with at least one having the same catastrophic level as the queried event) reached 87.3%, which is an improvement compared to the baseline model that did not use continuity constraints.
[0279] It's important to note that the continuity constraint of disaster effects refers to a constraint term introduced into the training loss function. Its purpose is to ensure that distances in the feature space quantitatively reflect the magnitude of differences in disaster severity, rather than simply distinguishing between similar and dissimilar binary categories. Traditional contrastive loss functions use rigid similarity labels, only requiring positive sample pairs to be brought closer and negative sample pairs to be pushed further apart, failing to perceive the differences in the degree of negativity between negative sample pairs. However, disaster severity is inherently an ordered variable; the difference between mild flooding and severe flooding is clearly greater than the difference between mild and moderate flooding. By imposing a continuity constraint, the feature space learned by the model is forced to possess this orderliness, ensuring that greater distances correspond to greater differences in disaster severity.
[0280] According to one aspect of this application, after the model training is completed, the preset acceptable disaster effect difference threshold is mapped to a distance threshold in the feature space using the inverse function of the monotonic mapping function, and the distance threshold is used as the criterion for determining whether two rainstorm events are similar.
[0281] According to another aspect of this application, it also includes: determining a target disaster similarity threshold based on a preset disaster level difference tolerance, wherein the determination process utilizes the inverse function of the monotonic mapping function established in the effect regression constraint term.
[0282] In this embodiment, the disaster severity level difference tolerance refers to the range of retrieval errors that a user can accept in actual business operations. For example, a user might consider the retrieval result usable if the difference between the disaster severity level of the retrieved historical event and the actual level of the current event is within 0.5 levels, such as an intermediate state between mild and moderate flooding; if the difference exceeds 1 level, it is unusable. This 0.5 level is the tolerance, denoted as Δ. Y_th This tolerance is normalized to the disaster-causing effect difference threshold Δ. effect_th :
[0283] Δ effect_th =Δ Y_th / (Y max - Y min );
[0284] Since the mapping function g(d) = 1 - exp(-λ*d) is monotonically increasing and invertible, its inverse function g can be used directly. inv (y) is used to inversely deduce the corresponding feature distance threshold.
[0285] The derivation of the inverse function is as follows:
[0286] y = 1 - exp(-λ * d);
[0287] exp(-λ * d) = 1 – y;
[0288] -λ * d = ln(1 - y);
[0289] d = - (1 / λ) * ln(1 - y);
[0290] Therefore, the adaptively calculated distance threshold d threshold for:
[0291] d threshold = - (1 / λ) * ln(1 -Δ effect_th );
[0292] Distance threshold d threshold This means that, statistically speaking, two events with a feature space distance less than this value have a very high probability that the difference in their catastrophic severity is less than the user-defined tolerance Δ. Y_th .
[0293] For example, let λ = 1.0, Y max -Y min =3. If the user sets the tolerance Δ Y_th =0.3, meaning a 10% tolerance for gradation error is allowed, the normalized difference is 0.1. The calculated distance threshold at this point is:
[0294] d threshold = - ln(0.9) ≈ 0.105;
[0295] If the user relaxes the tolerance to 0.9, that is, allows for a 30% error, then:
[0296] d threshold = - ln(0.7) ≈ 0.357;
[0297] Through this mechanism, the threshold is no longer a random number, but a dynamic variable that is strictly linked to business needs (tolerance).
[0298] If the overall disaster-causing similarity distance is less than the target disaster-causing similarity threshold, then the corresponding historical rainstorm event is determined to have high disaster-causing reference value.
[0299] In this embodiment, after obtaining d threshold Then, the system filters the overall distance. Specifically, the system iterates through all historical events to calculate the overall distance D. total If D total ≤d threshold If so, the historical event is marked as a high-confidence reference sample, and its disaster-causing records will be directly used for current risk warnings, with the highest weight set. If D total >d threshold If so, the historical event is used only as a general reference sample or is discarded.
[0300] Furthermore, based on the selected high-confidence sample set, the system can generate a quantitative disaster risk estimate (Risk). pred :
[0301] Risk pred = ∑(w i * Y i ) / ∑(w i );
[0302] Among them, Y i The catastrophic level of the i-th high-confidence historical event; w i As the weight, it can be set as (d threshold -D total_i The smaller the distance, the greater the weight if it is below the threshold.
[0303] In some optional implementations, the system can also dynamically adjust the λ parameter based on the current flood control situation. For example, during a severe rainstorm warning, λ can be decreased or Δ can be increased. Y_th This allows for a relaxation of the threshold, enabling the retrieval of more potential risk cases for decision-makers to consider.
[0304] In a detailed embodiment, suppose a city's flood control department needs to conduct a rapid risk assessment of a rainstorm that occurs on a certain day. The rainstorm lasts for 6 hours, with a total rainfall of approximately 120 mm, mainly affecting the eastern part of the city. The system obtains the time-series rainfall data Z of this rainstorm from the meteorological monitoring interface. T = [5, 12, 35, 40, 20, 8], obtain the spatial distribution field (100×100 grid) from the radar mosaic, and load pre-stored topographic, water system, and land use data. Input the above data into the pre-trained disaster-oriented feature mapping model to obtain the temporal feature component F. time (6×64-dimensional) and spatial feature components F space (100×100×32 dimensions). The system compares this event with 2000 historical events in the historical database one by one. For each of the 2000 historical events, the temporal distance D is calculated using the cumulative constraint DTW algorithm. time The spatial distance D is calculated using the sensitivity-weighted Wasserstein algorithm. space The comprehensive disaster-causing similarity distance D is obtained by weighted summation according to the weights. total Set the disaster severity tolerance level Δ Y_th =0.3, corresponding to the normalized difference threshold Δ effect_th =0.1, the distance threshold d is calculated. threshold =-ln(0.9)≈0.105. For all historical events, D... total Sort by ascending order and filter by D. totalEvents with a distance less than the threshold are used as high-confidence reference samples. After filtering, three historical events have a combined distance less than the threshold: H 127 (Combined distance 0.08), H 456 (Combined distance 0.09), H 789 (Comprehensive distance 0.10). The historical disaster records for these three events are: moderate flooding, severe flooding, and moderate flooding. The system outputs the risk assessment result: The current disaster risk level caused by the rainstorm is: moderate to severe flooding, with a probability of approximately 67% for moderate flooding and 33% for severe flooding.
[0305] According to one aspect of this application, in the data acquisition stage, the system also includes an anomaly data processing mechanism, specifically: for cases where time-series rainfall data is missing, such as when a sensor malfunctions at a certain moment, the system uses linear interpolation or weighted data from adjacent stations to fill in the missing data. If more than three consecutive time steps are missing, the event is marked as incomplete data and will not participate in subsequent historical retrieval matching, but a rough risk assessment based on statistical characteristics can still be generated. For outliers in the spatial rainfall distribution field, such as a single grid point value far exceeding the physical threshold, exceeding 500 mm / hour, the system performs median filtering; if anomalies still exist, the mean of the surrounding grids is used as a substitute. For cases where disaster-affected environmental data is not updated in a timely manner, such as missing land use data in newly built urban areas, the system defaults to using a higher sensitivity coefficient for urban land use for conservative estimation, and marks some environmental data as needing to be updated in the output results.
[0306] In summary, the method for mining the similarity of disaster-causing rainstorms includes: acquiring temporal rainfall, spatial distribution, and disaster-bearing environment data of the rainstorm to be analyzed; extracting feature representations that preserve spatiotemporal structure using a pre-trained disaster-oriented feature mapping model; fusing and calculating the comprehensive disaster-causing similarity distance: in the temporal dimension, introducing a cumulative process difference penalty term to modify the dynamic time warping algorithm and forcibly aligning the rainfall energy accumulation process; in the spatial dimension, using sensitivity factors such as terrain and water system to weight the optimal transmission cost and quantify the disaster-causing differences of rainfall areas under different environments; and using a monotonic mapping based on the distance-disaster-causing effect to back-calculate an adaptive threshold to identify high-value historical cases.
[0307] According to one aspect of this application, a disaster-causing rainstorm similarity mining system includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the disaster-causing rainstorm similarity mining method described in any of the above embodiments.
[0308] In this embodiment, the disaster-causing rainstorm similarity mining system can be a computer device, which can be a single high-performance workstation or a distributed server cluster deployed in the cloud. From a hardware perspective, the device mainly consists of a core computing unit, a data storage unit, and an input / output interface unit.
[0309] Specifically, the processor is the central processing unit of the entire system, and can be a heterogeneous combination of a central processing unit (CPU) and a graphics processing unit (GPU). The CPU is responsible for logic control, data preprocessing, and simple statistical distance calculations; while the GPU, leveraging its powerful parallel computing capabilities, is specifically used to accelerate the inference process of deep neural network feature mapping models and matrix iterative operations for optimal transmission across large-scale grids. For example, when processing a spatial rainfall field with a 1000×1000 grid covering an entire city, GPU acceleration can reduce the calculation time for Sinkhorn distance from minutes to milliseconds, meeting the timeliness requirements of real-time early warning.
[0310] The memory includes high-speed random access memory (RAM) and non-volatile storage media, such as SSD hard drives. RAM is mainly used to temporarily store real-time rainstorm data to be analyzed and intermediate matrices during operation, such as the cumulative distance matrix D and the transmission cost matrix C; the non-volatile storage media is used to persistently store the historical rainstorm event database and the weight file of the pre-trained disaster-oriented feature mapping model.
[0311] The computer program is logically divided into multiple functional modules and runs on a processor. Specifically, it includes:
[0312] The data acquisition module is used to retrieve rainfall and environmental data in real time from the meteorological bureau server or radar base station via a network interface;
[0313] The feature extraction module is used to load the pre-trained model and convert the original multimodal data into temporal and spatial feature components.
[0314] The distance calculation module is the core computing engine of the system. It integrates the DTW algorithm subroutine and the Wasserstein algorithm subroutine to calculate the comprehensive distance between massive historical events and the current event in parallel.
[0315] The risk assessment module is used to perform Top-K search, adaptive threshold determination, and generate the final disaster risk report.
[0316] In some alternative implementations, the computer device can also display visualized analysis results to the user via a display terminal. For example, the current rainfall distribution map can be displayed on the left side of the screen, while the five most similar historical rainstorm cases retrieved can be listed on the right side, with the temporal alignment path and spatial difference heatmap of the two highlighted in a high-key color. This visually explains why the system considers them similar, enhancing the interpretability of the system.
[0317] Furthermore, those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0318] This embodiment transforms theoretical algorithms into a practical, operational disaster risk assessment tool through the collaborative work of software and hardware.
[0319] This invention introduces a nonlinear cumulative process difference penalty term into the dynamic time warping algorithm. By forcing time sequence alignment to follow the physical rhythm of rainfall energy release, it effectively distinguishes between immediate and delayed disaster-causing rainfall processes, ensuring the physical consistency of time sequence matching in the energy accumulation dimension. An optimal transmission distance based on disaster sensitivity weighting is constructed. By fusing terrain slope, water system distance, and land use data into a transmission cost matrix, the movement of rainfall towards high-risk areas is considered a high computational cost. This mathematically accurately distinguishes scenarios with the same rainfall pattern but different consequences, achieving deep coupling between meteorological data and the heterogeneity of the geographical environment. A disaster-oriented continuous metric learning strategy is adopted. By embedding regression constraints into the training loss function, a strict monotonic mapping relationship between feature space distance and disaster level difference is established. An adaptive threshold is derived using the inverse function logic of this relationship, enabling dynamic adjustment of retrieval sensitivity based on business tolerance.
[0320] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.
Claims
1. A method for mining the similarity of disastrous rainstorms, characterized in that, include: Acquire multimodal disaster-causing data of the rainstorm event to be analyzed, as well as a pre-constructed historical rainstorm event database; the multimodal disaster-causing data includes at least time-series rainfall sequences, spatial rainfall distribution fields, and corresponding disaster-bearing environment data; Using a pre-trained disaster-oriented feature mapping model, and combining multimodal disaster-oriented data, the disaster-oriented feature representations corresponding to the rainstorm events to be analyzed and historical events in the historical rainstorm event database are mapped to obtain their respective disaster-oriented feature representations. The disaster-oriented feature representations include at least temporal feature components that preserve the temporal evolution structure and spatial feature components that preserve the spatial geometric structure. Based on the disaster-causing characteristic representation, the comprehensive disaster-causing similarity distance between the rainstorm event to be analyzed and various historical events is calculated; the calculation integrates the temporal similarity measurement results based on temporal feature components and the spatial similarity measurement results based on spatial feature components; Based on the comprehensive disaster similarity distance, the set of historical rainstorm events most similar to the rainstorm event to be analyzed is determined from the historical rainstorm event database, and the disaster risk assessment results are generated based on the historical disaster records of the historical rainstorm event set.
2. The method according to claim 1, characterized in that, The disaster-affected environmental data specifically includes topographic elevation data, water system distribution data, and land use type data covering the area to be analyzed; Correspondingly, the spatial feature components output by the disaster-oriented feature mapping model are two-dimensional grid feature fields that retain the correspondence between geographic locations; The temporal feature components are one-dimensional feature vector sequences that preserve the time step order.
3. The method according to claim 1, characterized in that, Calculate the comprehensive disaster-causing similarity distance between the rainstorm event to be analyzed and various historical events, specifically as follows: Calculate the normalized temporal similarity distance based on temporal feature components; Calculate the normalized spatial similarity distance based on spatial feature components; The temporal similarity distance and spatial similarity distance are linearly weighted and summed according to preset weight coefficients to obtain the comprehensive disaster-causing similarity distance.
4. The method according to claim 3, characterized in that, Calculating normalized temporal similarity distance based on temporal feature components includes: The temporal feature components of the rainstorm event to be analyzed and the historical events to be compared are extracted respectively to construct two temporal feature sequences to be compared. Calculate the feature difference between any two time steps in two time series feature sequences and construct a local distance matrix; In the local distance matrix, a dynamic programming algorithm is used to search for an optimal alignment path from the start time step pair to the end time step pair, so as to minimize the cumulative local distance on the optimal alignment path. The minimum cumulative local distance corresponding to the optimal alignment path is taken as the temporal similarity distance.
5. The method according to claim 4, characterized in that, When constructing the local distance matrix, physical constraints for the rainfall accumulation process are introduced, specifically including: The normalized cumulative eigenvalues of the two time series feature sequences at each time step are calculated to obtain their respective cumulative progress curves; where the normalized cumulative eigenvalues represent the proportion of the cumulative rainfall up to the current time to the total rainfall. Based on the cumulative process curve, calculate the cumulative process difference between two time steps to be compared; A penalty term is constructed using the accumulated process difference value, and the feature differences are weighted and corrected accordingly to obtain the corrected local distance; The corrected local distance matrix is constructed using the corrected local distance.
6. The method according to claim 3, characterized in that, Calculating normalized spatial similarity distance based on spatial feature components includes: The spatial feature components of the rainstorm event to be analyzed and the historical events to be compared are normalized to obtain two spatial feature probability distributions. Construct a cost matrix that describes the transmission cost between spatial grid points; Based on the cost matrix, the minimum total transmission cost required to transform one spatial feature probability distribution into another spatial feature probability distribution is calculated using the optimal transmission algorithm. The minimum total transmission cost is used as the spatial similarity distance.
7. The method according to claim 6, characterized in that, Construct a cost matrix describing the transmission cost between spatial grid points, including: Based on disaster-bearing environment data, calculate the disaster sensitivity index of each spatial grid point in the spatial characteristic component; Calculate the basic geometric distance between any two spatial grid points; A sensitivity weighting factor is constructed using the disaster sensitivity index of the start and end grid points, and the basic geometric distance is corrected accordingly to obtain the disaster cost distance. A cost matrix is constructed based on the distance to the disaster cost.
8. The method according to claim 7, characterized in that, The disaster susceptibility index of each spatial grid point in the spatial characteristic components is calculated, specifically based on a weighted calculation using at least one of the following sensitivity factors: The terrain slope sensitivity factor is positively correlated with the terrain slope of the spatial grid points; The water system distance sensitivity factor is negatively correlated with the Euclidean distance from the spatial grid point to the nearest river; The land use sensitivity factor is determined based on the preset disaster-causing weight corresponding to the land cover type of the spatial grid points.
9. The method according to claim 3, characterized in that, Temporal similarity and spatial similarity are calculated using Euclidean distance or cosine distance.
10. The method according to claim 1, characterized in that, The disaster-causing feature mapping model is obtained through pre-training using the following steps: Construct a training set of historical rainstorm samples labeled with disaster severity levels; Training samples are constructed in pairs from a historical rainstorm sample training set, and the similarity label of each pair of training samples is determined based on the difference in the disaster severity of each pair of training samples. The feature representations of paired training samples are extracted using a disaster-oriented feature mapping model, and the distance between training sample pairs in the feature space is calculated. A loss function is constructed based on distance and similarity labels, and the parameters of the disaster-oriented feature mapping model are optimized using the gradient descent algorithm.