Real-time collaborative sensing method based on extreme climate risk
By constructing a three-dimensional tensor structured feature matrix and dynamically adjusting feature weights, the problem of insufficient spatiotemporal correlation feature extraction in extreme climate risk perception is solved, enabling accurate assessment and dynamic response of key factors, and improving the accuracy and adaptability of risk perception.
Patent Information
- Application Number
- CN202511693056.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-11-18
AI Technical Summary
Existing technologies are insufficient in extracting spatiotemporal correlation features in extreme climate risk perception, and the weight allocation of core influencing factors is unbalanced, causing the model to be unable to focus on core spatiotemporal features and thus unable to achieve accurate risk assessment.
By collecting multi-source data, a three-dimensional tensor structured feature matrix is constructed. A spatiotemporal attention mechanism is introduced to dynamically correct the feature weights. A multi-head attention network is used for dimensionality reduction. The coupling coefficients are fine-tuned online using a gradient descent algorithm in combination with pre-trained basic coupling coefficients and real-time data, forming a dynamically adjusted closed-loop mechanism.
It effectively enhances the ability to extract features from complex spatiotemporal relationships, ensures that the weights of key influencing factors are accurately adapted to the actual scenario, avoids weight imbalance, and achieves more efficient risk perception and emergency response.
Smart Images

Figure CN121144768B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of climate risk perception technology, and more specifically, relates to a real-time collaborative perception method based on extreme climate risk. Background Technology
[0002] This year, the intensification of global climate change has led to frequent extreme weather events (such as torrential rains, persistent heat waves, and strong typhoons), posing a serious threat to socio-economic development, ecological environment stability, and human life and property safety. This highlights the urgency of improving the ability to detect, warn, and respond to extreme weather risks early, and real-time and accurate risk perception is a core component of the disaster prevention and mitigation system.
[0003] Currently, with the development of IoT, big data, and AI technologies, data-driven machine learning methods are gradually becoming mainstream. By integrating multi-source data to achieve end-to-end risk assessment, they have significantly improved perception efficiency. However, they still suffer from problems such as insufficient extraction of spatiotemporal features and unbalanced weighting of core influencing factors. Specifically, in terms of time, the current risk level is jointly affected by historical events and future trends (such as atmospheric circulation evolution); in terms of space, the risk distribution is closely related to terrain features (such as mountain barriers) and regional linkages (such as upstream and downstream watersheds). Existing methods often extract time or space features separately, failing to construct a spatiotemporally integrated feature representation, and lack a dynamic adjustment mechanism for the feature weights of key influencing factors, resulting in the technical problem that the model cannot focus on core spatiotemporal features. Summary of the Invention
[0004] This invention provides a real-time collaborative perception method based on extreme climate risk, which aims to solve the technical problems of insufficient extraction of spatiotemporal correlation features and unbalanced weight allocation of core influencing factors in existing technologies.
[0005] A real-time collaborative sensing method based on extreme climate risk includes the following steps:
[0006] S1. Collect multi-source datasets and unify the multi-source data into JSON format to obtain multi-source data in a unified format;
[0007] S2. Process outliers and missing values in multi-source data with a unified format to obtain clean spatiotemporal data;
[0008] S3. Based on clean spatiotemporal data, organize it into a three-dimensional tensor according to time, space and attributes to form a structured feature matrix. Introduce a spatiotemporal attention mechanism to correct the feature weights, and then reduce the dimensionality of the three-dimensional tensor through a multi-head attention network to obtain the fused spatiotemporal feature vector.
[0009] S4. Based on the pre-trained basic coupling coefficients from historical disaster cases, the coupling coefficients are then fine-tuned online using the gradient descent algorithm in conjunction with real-time data. The coupling coefficients are dynamically updated based on a predetermined period. The dynamic coupling coefficients and the fused spatiotemporal feature vectors are then input into the LSTM network to obtain the risk value and uncertainty range.
[0010] S5. Classify risk levels based on risk values, activate corresponding emergency push mechanisms according to risk levels, and optimize feature weights and coupling coefficients based on feedback data.
[0011] In this invention, multi-source data is organized into a three-dimensional tensor according to time, space, and attributes to construct a structured feature matrix. A spatiotemporal attention mechanism is combined to capture the correlation features at different spatiotemporal scales. A multi-head attention network is used to process multi-subspace features in parallel to enhance the extraction capability of complex spatiotemporal correlations, effectively overcoming the limitations of traditional methods in characterizing spatiotemporal correlations. Secondly, the feature weights are dynamically corrected through the spatiotemporal attention mechanism to give key influencing factors higher attention. On the other hand, the basic coupling coefficients are pre-trained and fine-tuned online using the gradient descent algorithm based on real-time data, and the coupling coefficients are periodically and dynamically updated. At the same time, the feature weights and coupling coefficients are continuously optimized using feedback data, forming a closed-loop mechanism of dynamic allocation-real-time adjustment-feedback optimization. This ensures that the weights of core influencing factors are accurately adapted to the actual scenario and avoids weight imbalance.
[0012] Preferably, the processing of outliers includes the following steps:
[0013] Physical rule verification: A physical rule library is preset, and reasonable value ranges for various sensors are set in the physical rule library. The sensor type is matched by the device ID prefix. The preset physical rule library is called according to the sensor type. The original value obtained by the sensor is compared with the value range set in the physical rule library. If it is not within the reasonable value range, it is marked as invalid and abnormal. If it is within the reasonable value range, the original value is retained and a normal dataset is obtained.
[0014] Isolation Forest Detection: Based on the normal dataset obtained from the physical rule verification results, a feature vector with 4 dimensions is generated for each data point. The 4-dimensional feature vector includes current value normalization, time rate of change, spatial consistency, and extreme climate correction. The 4-dimensional feature vector is input into the isolation forest model, and the anomaly score and confidence score of each data point are output. Data with a confidence score below the threshold are marked as invalid data.
[0015] Preferably, the processing of missing values includes the following steps:
[0016] Missing data identification: Filter out invalid data and missing values caused by sensor offline, mark them as missing points, and record the corresponding spatiotemporal coordinates;
[0017] Spatiotemporal reference set filtering: Select valid time points within n minutes before the current time of the missing point, retain the data with confidence height threshold, and record them as m time reference points; select neighboring sensor nodes within a predetermined spatial range centered on the missing point, and take multiple confidence data points higher than the threshold, and record them as n spatial reference points. Based on this, the time reference set and the spatial reference set are obtained.
[0018] Spatiotemporal weight calculation: Based on the principle that the more recent the time point, the greater the weight and the closer the distance, the greater the influence, weights are assigned to each time reference point and each spatial reference point to obtain the weights of time reference points and spatial reference points. The sum of the weights of all time reference points is 1, and the sum of the weights of all spatial reference points is 1.
[0019] Spatiotemporal fusion completion: Based on the obtained time reference point weights, all time reference points are weighted and summed to obtain the predicted value of the time trend; based on the obtained spatial reference point weights, all spatial reference points are weighted and summed to obtain the predicted value of spatial correlation; the fusion ratio is dynamically allocated according to the time and spatial reference point numbers, and the predicted value of the time trend and the predicted value of spatial correlation are multiplied by their respective fusion ratios to obtain the completion value of the missing points.
[0020] Preferably, the structured feature matrix is formed based on the following steps:
[0021] Based on the obtained clean spatiotemporal data, a sliding time window is used in the time dimension, with the window size and step size adaptively adjusted according to the extreme climate type to form a corresponding number of time slices; in the spatial dimension, the assessment area is divided into latitude and longitude grids, with urban areas having higher resolution than mountainous areas, resulting in a fixed number of spatial grids; in the attribute dimension, three types of key risk drivers are integrated, including multiple meteorological dynamic attributes, geographical static attributes, and human semi-dynamic attributes. The integrated data is converted into a structured spatiotemporal attribute tensor, and each attribute is standardized according to historical mean and standard deviation to obtain a structured feature matrix.
[0022] Preferably, the spatiotemporal attention mechanism is as follows:
[0023] Temporal attention calculation: The attribute features of all spatial grids in each time slice are averaged to obtain a vector reflecting the global time trend. Then, the query, key, and value vectors of temporal attention for the corresponding time slice are generated through linear transformation. When calculating the temporal attention weight, the dependencies between different times and historical similarity patterns are considered, and a mutation enhancement term is introduced. By calculating the time derivative of key meteorological attributes and combining it with the mutation sensitivity coefficient, the weight of the moment of trend mutation is amplified. Finally, based on the calculated temporal attention weight, the attribute features of each spatial grid in each time slice are weighted and summed to obtain the temporal fusion feature.
[0024] Spatial attention calculation: For each spatial grid, a query, key, and value vector of spatial attention is generated through linear transformation based on the temporal fusion features. When calculating the spatial attention weight, a risk enhancement term obtained by weighting the historical risk index and the geographical risk index is introduced. Then, the spatial attention weight is used to perform a weighted summation of the temporal fusion features to output the spatiotemporal fusion features.
[0025] Multiple attributes are divided into meteorological dynamic attributes, geographical static attributes, and human semi-dynamic attributes based on attribute type. Each attention head independently performs temporal and spatial attention calculations to obtain the sub-fusion features corresponding to each attribute. The sub-fusion features of the three heads are then concatenated to form a complete fusion feature set. Dimensionality reduction is then performed through a linear projection layer to obtain the preliminary fusion feature vector.
[0026] Preferably, the coupling coefficient is obtained based on the following steps:
[0027] By combining the risk formation mechanism to screen the core influencing factors, and then by using mutual information analysis to quantify the synergistic effect strength among the factors, we can screen out factor pairs with significant synergistic effects and form a set of factor pairs.
[0028] The product of the two factors in a factor pair is used as the input to the regression model, with the disaster outcome as the output target. The regression coefficients of the regression model are solved by optimization methods, and the regression coefficients are used as the basic coupling coefficients of each factor pair.
[0029] A dual update triggering mechanism is set up to perform fine-tuning within a predetermined time. When the rate of change of the key factor exceeds a threshold, an update is immediately triggered to obtain a dynamic coupling coefficient. The dynamic coupling coefficient is obtained by superimposing the basic coupling coefficient and the real-time adjustment term. The adjustment term is 1 plus the product of the adjustment coefficient and the normalized adjustment amount. The adjustment amount is calculated based on the difference of the key factor.
[0030] Preferably, the risk value and uncertainty range are obtained based on the following steps:
[0031] The product of each factor pair is multiplied by the corresponding dynamic coupling coefficient through a dynamic coupling layer to obtain the weighted collaborative features. The weighted collaborative features are then integrated with the single-factor features and input into an LSTM layer. The time memory capability of the LSTM layer is used to capture the time series dependence of risk factors. Finally, the risk value is output through a fully connected layer.
[0032] Bayesian LSTM is used to estimate the posterior distribution of model weights through variational inference, and then the variance of the prediction results is calculated. Then, the confidence interval is obtained by combining the risk mean and the corresponding confidence quantile by adding or subtracting the product of the quantile and the variance, which serves as the uncertainty interval.
[0033] The beneficial effects of this invention include:
[0034] In this invention, multi-source data is organized into a three-dimensional tensor according to time, space, and attributes to construct a structured feature matrix. A spatiotemporal attention mechanism is combined to capture the correlation features at different spatiotemporal scales. A multi-head attention network is used to process multi-subspace features in parallel to enhance the extraction capability of complex spatiotemporal correlations, effectively overcoming the limitations of traditional methods in characterizing spatiotemporal correlations. Secondly, the feature weights are dynamically corrected through the spatiotemporal attention mechanism to give key influencing factors higher attention. On the other hand, the basic coupling coefficients are pre-trained and fine-tuned online using the gradient descent algorithm based on real-time data, and the coupling coefficients are periodically and dynamically updated. At the same time, the feature weights and coupling coefficients are continuously optimized using feedback data, forming a closed-loop mechanism of dynamic allocation-real-time adjustment-feedback optimization. This ensures that the weights of core influencing factors are accurately adapted to the actual scenario and avoids weight imbalance. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is an overall step diagram provided for an embodiment of the present invention.
[0037] Figure 2 A flowchart illustrating the execution steps of the attention mechanism provided in an embodiment of the present invention.
[0038] Figure 3 A flowchart illustrating the model iteration process provided in this embodiment of the invention. Detailed Implementation
[0039] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0040] See Figure 1 As shown, the real-time collaborative sensing method based on extreme climate risk includes the following steps:
[0041] S1. Collect multi-source datasets and unify the multi-source data into JSON format to obtain multi-source data in a unified format;
[0042] In this embodiment, for automatic identification of device type, the structured prefix of the device's unique identifier is used to automatically match the device type and the corresponding protocol parsing rules. That is, the device ID adopts a three-segment structure of type prefix-region code-device number. For example: MET-330105-001, meteorological station (MET), A city A district (330105), device number 001; SOIL-440306-012, soil moisture sensor (SOIL), B city B district (440306), device number 0.12.
[0043] Access the grid and resolve the device ID prefix, matching it against a preset device type-protocol mapping table, as shown in Table 1:
[0044] Table 1: Device Type-Protocol Mapping Table (Example)
[0045]
[0046] It automatically calls the corresponding protocol parsing library to complete the data format conversion, such as Modbus to JSON.
[0047] S2. Process outliers and missing values in multi-source data with a unified format to obtain clean spatiotemporal data;
[0048] In this embodiment, firstly, based on sensor type and common sense, values that clearly exceed a reasonable range are filtered out. That is, the device ID prefix (e.g., WS: representing a wind speed sensor, RH: representing a humidity sensor) is matched against a preset physical rule table, as shown in Table 2:
[0049] Table 2: Typical Sensor Physical Rule Thresholds (Examples)
[0050]
[0051] The raw data values are compared with the thresholds in the rule base. If... or If it is not, it is directly marked as an invalid exception, with a confidence level of 1. ;
[0052] For data that passes the physical rule verification, further combine historical trends and spatial correlations to identify logically abnormal data and output confidence scores;
[0053] First, construct the input feature vector. This includes current value normalization, time rate of change, spatial consistency, and extreme climate correction.
[0054] The current value is normalized by subtracting the historical average value of the same period in the past 7 days from the current value and then dividing by the historical standard deviation, which reflects the degree of deviation of the current value from the historical norm.
[0055] The rate of change over time is calculated by dividing the difference between the current value and the value 5 minutes ago by 5 minutes to obtain the change per minute, reflecting short-term jumps.
[0056] The spatial consistency is obtained by subtracting the average value of the three neighboring nodes within a 5-kilometer range from the current value, and then dividing by the standard deviation of the neighboring nodes, reflecting the difference from surrounding sensors;
[0057] The extreme climate correction is set to 1 if the current region triggers an extreme event warning (such as a red rainstorm warning), otherwise it is 0. This is used to correct normal fluctuations in extreme scenarios, such as the sudden increase in wind speed during a typhoon, which is a reasonable phenomenon.
[0058] This embodiment deploys a lightweight isolated forest model (100 trees, 256 sample subsets) at edge nodes, using pre-training data of the corresponding region's sensor operation data over the past year; the feature vectors are then... Input model, output anomaly score The higher the score, the greater the probability of an anomaly;
[0059] Data confidence Among them, the high confidence level is This indicates that the data is normal and can be used directly for subsequent processing; medium confidence level. Marked as "Unverified", retain original values but reduce model weights; low confidence. Trigger edge node device self-test (send commands via Modbus protocol, such as restarting the sensor or calibrating the zero point), and mark the data as "invalid".
[0060] For data that passes the validation, output a value + confidence tuple to provide a quality label for subsequent interpolation completion and model input.
[0061] For missing data, combining the continuity of time trends and the correlation of spatial distribution, high-precision imputation values are dynamically generated, as follows:
[0062] Time weighting determination: Select effective time points within the last 30 minutes. For example: 6 points at 5-minute intervals: ( Only high-confidence data is retained. By introducing a trend factor k to adjust the time weight, the data's increasing or decreasing trend can be reflected.
[0063] ;
[0064] In the formula: This represents the time weight of the i-th time reference point, with a value ranging from 0 to 1; This represents the i-th valid time point in the time reference set; Represents the time decay constant; Indicates trend factor;
[0065] ;
[0066] In the formula: This represents the data value of the last valid time point in the time reference set. This represents the data value of the first valid time point in the time reference set; This represents the last valid time point in the time reference set; This indicates the first valid time point in the time reference set.
[0067] Spatial weight determination: Selecting based on Effective spatial nodes within a 5km radius centered on [the point / location] A maximum of 5 nodes are selected, and data is filtered in ascending order of distance, retaining only high-confidence data. We use an inverse square distance weighting method to ensure that nearest neighbor nodes contribute more. The specific expression is as follows:
[0068] ;
[0069] In the formula: This represents the spatial weight of the i-th spatial reference node, with a value ranging from 0 to 1. The sum of the weights of all reference nodes is 1. This represents the i-th valid spatial node in the spatial reference set; Representing spatial nodes The straight-line distance from the missing point P; Represents the smoothing term ;
[0070] Spatiotemporal fusion and completion: First, event trend prediction values are generated through time weighting. Then, spatial collaborative prediction values are generated through spatial weights. Finally, the two are combined to obtain the complete result, the specific expression of which is as follows:
[0071] ;
[0072] In the formula: Indicates a time-trend forecast value; Indicates time reference point The corresponding data value;
[0073] ;
[0074] In the formula: Indicates spatially coordinated prediction values; Representing spatial nodes At the present moment The corresponding data value;
[0075] ;
[0076] In the formula: This represents the spatiotemporal fusion weight, with a value ranging from 0 to 1. The more time reference points m there are, the better. The larger the value, the higher the contribution of the time trend prediction value; the more spatial reference points n, the greater the contribution. The smaller the value, the higher the contribution of spatial collaborative predictions. Indicates the padding value;
[0077] Furthermore, in this embodiment, the padded value... The accuracy is evaluated through posterior validation. After the missing data is recovered, the accuracy is calculated. If the error exceeds 10% for three consecutive times, the time reference window will be automatically increased, such as extending the time reference window to 45 minutes or expanding the spatial search range to 8km.
[0078] S3. Based on clean spatiotemporal data, organize it into a three-dimensional tensor according to time, space and attributes to form a structured feature matrix. Introduce a spatiotemporal attention mechanism to correct the feature weights, and then reduce the dimensionality of the three-dimensional tensor through a multi-head attention network to obtain the fused spatiotemporal feature vector.
[0079] See Figure 2 As shown, in this embodiment, the clean spatiotemporal data obtained after step S2 is converted into a three-dimensional spatiotemporal attribute tensor, which serves as the basis for the input of the attention mechanism. The three-dimensional spatiotemporal attribute tensor includes a time dimension, a spatial dimension, and an attribute dimension.
[0080] Time dimension T: A sliding time window is used for partitioning, with the window size adaptively adjusted according to the extreme weather type (e.g., for rainstorm events, data from the past hour is used, with a step size of 5 minutes, for a total of 12 time slices; for typhoon events, data from the past 3 hours is used, with a step size of 10 minutes, for a total of 18 time slices, which can be preset according to the extreme weather type), denoted as T. ;
[0081] Spatial Dimension S: The assessment area (e.g., a city / mountain area) is divided into latitude and longitude grids (resolution 100m×100m, suitable for refined urban assessments; resolution is relaxed to 500m×500m for mountainous areas), totaling... A spatial grid, denoted as , ;
[0082] Attribute dimension K: Integrates key risk drivers, divided into 3 categories of attributes:
[0083] Meteorological dynamic attributes: rainfall intensity, wind speed, humidity, air pressure, temperature, cumulative rainfall, rainfall abrupt change rate, and visibility;
[0084] Geographic static attributes: terrain slope, altitude, soil type, vegetation cover, and river network density;
[0085] Human-related semi-dynamic attributes: population density, infrastructure density, historical risk level, and emergency resource index;
[0086] The final constructed 3D tensor: ,in , As a dynamic meteorological attribute, For geographic static attributes, It is a semi-dynamic attribute of humanities; and each attribute is standardized. , and These represent the historical mean and standard deviation of attribute k, respectively. This represents the original data values of the time slice t, spatial grid s, and attribute k in the tensor.
[0087] Time-based attention mechanism: In the time dimension, it identifies key moments for risk assessment (such as sudden increases in rainfall intensity or peak typhoon wind speed) and assigns them high attention weights. This involves using the features of each time slice as a time vector and calculating the dependencies between different moments through self-attention, focusing on the rate of trend change and historical similar patterns, as detailed below:
[0088] For each time t within the time window, define the temporal attention. All of these are derived from the spatial-attribute features of the current moment:
[0089] ;
[0090] In the formula: , , Representing the query vector, key vector, and value vector of temporal attention; This represents the mean vector of attributes for all spatial grids at time t; , , Represents a linear transformation matrix; , , Indicates the bias term;
[0091] ;
[0092] In the formula: This represents the dimension of temporal attention features; This represents the attention weight for the k-th time slice; Indicates mutation enhancement term , This indicates the index of key attributes, which is adjusted according to extreme climate types (e.g., rainfall intensity for rainstorms, wind speed for typhoons, determined based on predefined criteria). Represents the time derivative of a key attribute. This indicates that at time slice t, all spatial grids are in key properties The set of eigenvalues on, This represents the mutation sensitivity coefficient; This represents the transpose of the key vector for the t-th time slice; Indicates the first Transpose of the key vectors of each time slice;
[0093] Based on the obtained Weighted fusion is performed to obtain temporal fusion features. for: , This indicates the total time slice.
[0094] Spatial attention mechanism: In the spatial dimension, the feature weights of high-risk areas (such as steep slopes in mountains and low-lying urban areas) are increased, while the interference of low-risk areas (such as plains without historical disasters) is weakened. That is, by combining geographical static attributes (such as slope and altitude) and historical risk data (the frequency of disasters in the past 5 years), a basic risk index is calculated for each spatial grid, and then the weights are dynamically adjusted by overlaying the current feature values, as follows:
[0095] For each spatial grid s, define the spatial attention. Based on features after time fusion :
[0096] ;
[0097] In the formula: Represents a linear transformation matrix; Indicates the bias term; , , The query vector, key vector, and value vector represent the spatial attention mechanism;
[0098] Then, spatial attention weights are calculated based on the query vector and key vector:
[0099] ;
[0100] In the formula: This represents the risk enhancement term for the spatial grid s; This represents the risk enhancement term for the spatial grid s'; Represents the spatial attention feature dimension; This represents the attention weight of the s-th spatial grid. This represents the transpose of the key vector of the s-th spatial grid in the spatial attention mechanism; This represents the transpose of the key vector of the s'-th spatial grid in the spatial attention mechanism;
[0101] The formula for calculating the risk enhancement item is as follows:
[0102] ;
[0103] In the formula: The geographical risk index is obtained by weighted summation of attributes such as slope and altitude. This represents the historical risk index of grid s, such as ; and These are the weighting coefficients, where historical data has the most weight. The weight of geographical attributes is 1.2. It is 0.8;
[0104] Spatial fusion features are obtained by weighting based on the spatial attention weights. for: .
[0105] In this embodiment, different types of features are captured in parallel through a multi-head attention mechanism, and low-dimensional fused features are output through linear dimensionality reduction, as detailed below:
[0106] The attribute dimension K=17 is divided into 3 attention heads according to type, such as:
[0107] Meteorological dynamic header: focuses on dynamic meteorological attributes (such as rainfall intensity, wind speed, etc.); Geographical static header: focuses on static geographical attributes (such as slope, altitude, etc.); Human semi-dynamic header: focuses on dynamic human attributes (such as population density, historical risk level, etc.).
[0108] Each head independently performs the computation of temporal and spatial attention mechanisms, outputting sub-fusion features. , , ;
[0109] Then splice the multi-head features Then, dimensionality reduction is achieved through linear layers:
[0110] ;
[0111] In the formula: Represents the projection matrix. ; This indicates the bias term.
[0112] In this embodiment, multi-source heterogeneous data are integrated into a structured tensor according to the three dimensions of time, space and attributes, and a temporally correlated feature matrix is constructed. The attention of multiple feature sub-controls is processed in parallel by a multi-head attention grid, which captures complex nonlinear spatiotemporal interaction patterns from different perspectives, enhancing the model's ability to understand complex correlations. The three-dimensional tensor provides the structural foundation, and the spatiotemporal and multi-head attention mechanisms enable in-depth mining of cross-scale, nonlinear spatiotemporal dynamic correlations, overcoming the shortcomings of traditional statistical models or machine learning models in characterizing complex spatiotemporal features such as long-distance dependence, multiple degree coupling, and sudden evolution.
[0113] S4. Based on the pre-trained basic coupling coefficients from historical disaster cases, the coupling coefficients are then fine-tuned online using the gradient descent algorithm in conjunction with real-time data. The coupling coefficients are dynamically updated based on a predetermined period. The dynamic coupling coefficients and the fused spatiotemporal feature vectors are then input into the LSTM network to obtain the risk value and uncertainty range.
[0114] See Figure 3 As shown, in this embodiment, it is first necessary to screen the core environmental and human factors that affect the target risk. Taking flash flood risk as an example (other risks such as waterlogging and high temperature processes refer to the flash flood risk screening process, the only difference being the different core environmental and human factors).
[0115] The key factors for flash floods are: ,in Rainfall intensity; The slope of the terrain; Soil moisture content; Vegetation coverage; River network density;
[0116] Then, mutual information analysis is used to screen for factor pairs with significant synergistic effects, for example: ; Indicates rainfall intensity minus terrain slope; This represents rainfall intensity minus soil moisture content. Indicates terrain slope - vegetation cover;
[0117] Furthermore, based on the coupling coefficient, the strength of the synergistic effect of factors is quantified. Through historical disaster cases, the long-term statistical patterns of factors on risk are learned, as follows:
[0118] Using a dataset of flash flood disaster cases from the past 10 years, including factor values and disaster outcomes, a total of m samples are provided. ,in This indicates that a flash flood has occurred; 0 indicates that it did not occur;
[0119] Then, logistic regression or gradient boosting trees are used, with the factor pair product as the input feature, to solve for the basic coupling coefficient. Taking logistic regression pre-training as an example, the specific steps are as follows:
[0120] probability of flash floods The model expression is:
[0121] ;
[0122] In the formula: is the log-odds function, and is the linear output of logistic regression; Represents the intercept term; This represents the regression coefficient of the factor on p, i.e., the basic coupling coefficient; This indicates that the factors in p represent two independent factors;
[0123] Optimization through maximum likelihood estimation :
[0124] ;
[0125] In the formula: This represents the product vector of factors; This represents the estimated optimal parameter vector, which is used as the optimal basic coupling coefficient. ;
[0126] The coupling coefficient is then adjusted through real-time monitoring data to reflect the impact of environmental dynamics on the synergistic effects of factors. The triggering conditions for adjusting the coupling coefficient are: fine-tuning the coefficient every five minutes or an immediate update triggered when the rate of change of a key factor (such as soil moisture content) exceeds a preset threshold. Specifically, the dynamic coupling coefficient... It is obtained by superimposing the basic coupling coefficient and the real-time term, and the expression is as follows:
[0127]
[0128] In the formula: Indicates the adjustment factor; The table shows the normalized function of real-time auxiliary factors, quantifying the impact of environmental dynamics on coupling strength. For example:
[0129]
[0130] In the formula: This indicates the current soil moisture content; This indicates the threshold for soil saturation moisture content; Indicates the standard deviation of historical soil moisture content;
[0131] Spatiotemporal fusion feature vectors Input features for improving LSTM architecture , d represents the feature dimension. For example, if d=12, it contains 5 single factors + 3 factor pairs product.
[0132] Factor pair product is achieved through a dynamic coupling layer. With dynamic coupling coefficient Multiplying them together yields the weighted collaborative features: ;
[0133] Next, an LSTM layer is used to capture time-series dependent features, with the hidden layer dimension set to 64 and the activation function set to tanh. Finally, a fully connected layer is used to output the risk value, i.e., the expression for the probability of flash flood occurrence is as follows:
[0134] ;
[0135] In the formula: This represents the hidden state of the LSTM at the previous time step; Indicates weight; Indicates bias; This represents the sigmoid activation function; This represents the probability of a flash flood occurring at time t.
[0136] The uncertainty interval is based on the probability output of a Bayesian LSTM, and the mean and variance of the prediction distribution are estimated through variational inference, as shown in the following expression:
[0137]
[0138] In the formula: This represents the 90% confidence interval for the risk value at time t, i.e., the uncertainty interval. This represents the mean of the risk values; The standard deviation of the risk value; It is -1.645, which is the 95th percentile of the standard normal distribution and corresponds to the lower bound offset coefficient of the 90% confidence interval; It is 1.645, which is the 5th percentile of the standard normal distribution and corresponds to the upper bound offset coefficient of the 90% confidence interval.
[0139] S5. Classify risk levels based on risk values, activate corresponding emergency push mechanisms according to risk levels, and optimize feature weights and coupling coefficients based on feedback data.
[0140] In this embodiment, a multi-level classification threshold is established based on the output risk value and industry standards for various types of risks; taking flash flood risk as an example: Level 5: Level 4: Level 3: Level 2: Level 1: ;
[0141] Level 1-2 risk: Data is only pushed to meteorological departments (such as provincial meteorological bureaus) for dynamic adjustment of monitoring frequency (e.g., Level 1 risk data is updated hourly, Level 2 data is updated every 30 minutes).
[0142] Level 3 risk: Simultaneously push notification to meteorological department + emergency management department (activate Level III response plan);
[0143] Level 4-5 risk: The information is sent to multiple departments including meteorology, emergency response, transportation, civil affairs, and housing and construction (Level 4 activates Level II response, Level 5 activates Level I response, such as evacuating people and closing major traffic arteries).
[0144] The feedback data includes early warning accuracy, response timeliness, and measure effectiveness; the early warning accuracy is used to measure the degree of matching between the early warning and the actual disaster, that is, whether the early warning level is consistent with the actual level; the response timeliness is used to measure the time from the early warning being sent to the department initiating the response; the measure effectiveness is used to measure the percentage decrease in risk value before and after implementation.
[0145] Combining the above three objectives, with the goal of maximizing long-term accumulated rewards, the following reward function is constructed:
[0146] ;
[0147] In the formula: Represents the reward function; , , This represents the weighting coefficients, which sum to 1. Indicates the expected response event; Indicates response time; Indicates the effectiveness of the measures; Indicates the accuracy rate of early warnings;
[0148] Calculate the deviation of the reward value : ;in This represents the actual reward value, i.e., the reward function R described above; This represents the expected reward value, such as 0.6;
[0149] Adjust the temporal or spatial attention weights based on the reward value deviation:
[0150] ;
[0151] In the formula: This indicates the weights before adjustment (the time or spatial attention weights before adjustment). This represents the reward deviation coefficient; The mean is 0 and the variance is Gaussian noise; This indicates the adjusted weights (adjusted temporal or spatial attention weights).
[0152] Adjusting the dynamic coupling coefficient based on cumulative reward gradient :
[0153] ;
[0154] ;
[0155] In the formula: The dynamic coupling coefficient before adjustment; Adjusted dynamic coupling coefficients; Indicates the learning rate; The cumulative reward G represents the coupling coefficient. The gradient; This represents the reward value at time step t; This represents the discount factor, with a value of 0.95. This indicates the number of time steps in the cumulative reward.
[0156] In this embodiment, big data is used to learn the basic coupling relationship between core climate factors. Combined with real-time streaming data, the coupling coefficient is fine-tuned online through the gradient descent algorithm and updated regularly to ensure that the model continuously adapts to environmental changes. Furthermore, a closed-loop weight correction mechanism is used to prevent key factors from being underestimated in specific scenarios, thereby improving the scenario adaptability of risk assessment.
[0157] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A real-time collaborative perception method based on extreme weather risks, characterized in that, The method comprises the following steps: S1. Collecting a multi-source data set, unifying the multi-source data into a JSON format, and obtaining multi-source data in a unified format; S2. Processing the unified format multi-source data for abnormal values and missing values to obtain clean spatio-temporal data; S3. Based on the clean spatio-temporal data, organizing the data into a three-dimensional tensor according to time, space and attributes to form a structured feature matrix, introducing a spatio-temporal attention mechanism to correct the feature weight, and then reducing the dimension of the three-dimensional tensor through a multi-head attention network to obtain a fused spatio-temporal feature vector; The structured feature matrix is formed based on the following steps: Based on the obtained clean spatio-temporal data, the time dimension is divided by a sliding time window, the window size and step are adaptively adjusted according to the extreme climate type, and a corresponding number of time slices are formed; the evaluation area is divided into a grid according to the latitude and longitude in the spatial dimension, and the resolution of the urban area is higher than that of the mountain area, a fixed number of spatial grids are obtained; three types of key risk driving factors are integrated in the attribute dimension, including multiple meteorological dynamic attributes, geographical static attributes and human semi-dynamic attributes, the integrated data is converted into a structured spatio-temporal attribute tensor, and each attribute is standardized according to the historical mean and standard deviation to obtain a structured feature matrix; The spatio-temporal attention mechanism is as follows: Time attention calculation: the average value of the attribute features of all spatial grids for each time slice is obtained to obtain a vector reflecting the global time trend, and then linear transformation is performed to generate the query, key and value vectors of the time attention corresponding to the time slice; when calculating the time attention weight, the dependence between different time points and the historical similar mode are considered, and a mutation enhancement term is introduced, the time derivative of the key meteorological attribute is calculated, and combined with the mutation sensitive coefficient, the weight of the trend mutation moment is amplified; Finally, based on the calculated time attention weight, the attribute features of each spatial grid in each time slice are weighted and summed to obtain time fusion features; Spatial attention calculation: for each spatial grid, the query, key and value vectors of the spatial attention are generated based on the time fusion features through linear transformation, and when calculating the spatial attention weight, a risk enhancement term weighted by the historical risk index and the geographical risk index is introduced; The spatial attention weight is used to weight and sum the time fusion features to output the spatio-temporal fusion features; According to the attribute type, the multiple attributes are divided into meteorological dynamic attributes, geographical static attributes and human semi-dynamic attributes attention heads, each attention head independently performs time attention and spatial attention calculation to obtain the corresponding sub-fusion features of each attribute, then the sub-fusion features of the three heads are spliced to form a complete fusion feature set, and then a linear projection layer is used for dimension reduction to obtain a preliminary fusion feature vector; S4. Based on the historical disaster case pre-training of the basic coupling coefficient, the coupling coefficient is fine-tuned online through the gradient descent algorithm combined with real-time data, and the coupling coefficient is dynamically updated based on a predetermined period, and the dynamic coupling coefficient and the fused spatio-temporal feature vector are input into an LSTM network to obtain a risk value and an uncertainty interval; The coupling coefficient is obtained based on the following steps: The core influencing factors are screened in combination with a risk formation mechanism, and the synergy strength between the factors is quantified through mutual information analysis to screen factor pairs with significant synergy effect and form a factor pair set; The product of the two factors in the factor pair is taken as the input of the regression model, and the disaster result is taken as the output target to solve the regression coefficient of the regression model, which is taken as the basic coupling coefficient of the factor pair; A double update trigger mechanism is set to perform fine tuning within a predetermined time and trigger an update immediately when the change rate of the key factor exceeds a threshold to obtain a dynamic coupling coefficient, which is obtained by superimposing the basic coupling coefficient and a real-time adjustment term, wherein the adjustment term is the product of 1 and an adjustment coefficient and a normalized adjustment amount, and the adjustment amount is calculated based on the difference of the key factor; S5. Dividing the risk level based on the risk value, starting the corresponding emergency pushing mechanism according to the risk level, and optimizing the feature weight and the coupling coefficient based on the feedback data.
2. The real-time collaborative situational awareness method based on extreme weather risks according to claim 1, characterized in that, The processing of the abnormal values includes the following steps: Physical rule verification: a preset physical rule library is set, and reasonable value ranges of various sensors are set in the physical rule library; the sensor type is matched through the device ID prefix; the preset physical rule library is called according to the sensor type; the original value obtained by the sensor is compared with the value range set in the physical rule library; if it is not within the reasonable value range, it is marked as invalid abnormality; if it is within the reasonable value range, the original value is retained to obtain a normal data set; Isolation forest detection: based on the normal data set obtained through the physical rule verification, a feature vector with 4 dimensions is generated for each data point, including current value normalization, time change rate, spatial consistency and extreme climate correction; the 4-dimensional feature vector is input into the isolation forest model, and the abnormal score and confidence of each data point are output; data with a confidence lower than a threshold is marked as invalid data. 3.The real-time collaborative perception method based on extreme climate risk according to claim 1, wherein, The processing of the missing values includes the following steps: Missing data identification: invalid data and missing values caused by sensor offline are screened out and marked as missing points, and the corresponding space-time coordinates are recorded; Time-space reference set screening: selecting valid time points within n minutes before the current time of the missing point, retaining data with a high confidence threshold, and recording m time reference points; selecting adjacent sensor nodes within a predetermined spatial range centered on the missing point, taking multiple data points with a confidence higher than a threshold, and recording n space reference points, to obtain a time reference set and a space reference set based thereon; Time-space weight calculation: based on the principle that recent time points have greater weights and closer distances have greater influences, weights are assigned to each time reference point and each space reference point to obtain time reference point weights and space reference point weights, wherein the sum of all time reference point weights is 1 and the sum of all space reference point weights is 1; The time-space fusion completion: based on the obtained time reference point weight, all time reference points are weighted and summed to obtain the prediction value of the time trend; based on the obtained space reference point weight, all space reference points are weighted and summed to obtain the prediction value of the space correlation; according to the number of time and space reference points, the fusion proportion is dynamically allocated, the prediction value of the time trend and the prediction value of the space correlation are multiplied by the respective fusion proportion respectively, and the completion value of the missing point is obtained.
4. The real-time co-sensing method based on extreme climate risk according to claim 1, characterized in that, The risk value and the uncertainty interval are obtained based on the following steps: The product of each factor pair is multiplied by the corresponding dynamic coupling coefficient through the dynamic coupling layer to obtain the weighted synergistic feature, and then the weighted synergistic feature and the single-factor feature are integrated and input into the LSTM layer, the time sequence dependence of the risk factors is captured by using the time memory ability of the LSTM layer, and then the risk value is output through the full connection layer; The posterior distribution of the model weight is estimated by Bayesian LSTM through variational inference, and then the variance of the prediction result is calculated, and then the confidence interval is obtained by adding and subtracting the product of the quantile and the variance from the mean, which is used as the uncertainty interval.
Citation Information
Patent Citations
Gas leakage time-space correlation early warning method and system based on multi-modal data fusion
CN120312994A
Data analysis method for engineering consultation digital intelligent management
CN120653941A