Urban rainfall flood risk early warning method and system based on multi-source data

By constructing a risk index and decision matrix to evaluate the recognition accuracy of decision trees, and assigning different voting weights to different decision trees, the problem of insufficient prediction accuracy caused by the same weights of decision trees in traditional random forest models is solved, thereby improving the accuracy and robustness of urban stormwater risk early warning.

CN122020574APending Publication Date: 2026-05-12GUANGZHOU PLANNING DESIGN OFFICE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU PLANNING DESIGN OFFICE
Filing Date
2026-04-14
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In traditional random forest models, the decision tree weights are the same, which leads to insufficient prediction accuracy and cannot meet the high accuracy requirements of urban stormwater risk early warning.

Method used

A risk index is constructed to assess the degree of potential stormwater risk in cities. The identification accuracy of decision trees is evaluated through decision matrix and decision index. Different voting weights are assigned to different decision trees to improve the model's predictive robustness and accuracy in high-risk events.

Benefits of technology

This improves the prediction accuracy and robustness of random forest models for high-risk events, reduces the underreporting rate of catastrophic events, and provides more accurate and reliable technical support for urban disaster prevention and mitigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020574A_ABST
    Figure CN122020574A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to an urban rainfall flood risk early warning method and system based on multi-source data, and the method comprises the steps: constructing a risk index of any historical multi-source rainfall flood data; historical multi-source rainfall flood data is divided into a training set and a test set, and the training set is used to construct a random forest; obtaining a prediction risk level of each decision tree of the test set in the random forest, constructing a decision matrix of each decision tree based on a risk index of historical multi-source rainfall flood data in the test set and the prediction risk level, and further obtaining a voting weight of each decision tree; voting is carried out on the prediction risk level of each decision tree according to the voting weight, a real-time multi-source rainfall flood data prediction result is obtained, and early warning is given out according to the prediction result. According to the technical scheme, the accuracy of rainfall flood risk early warning can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology. More specifically, this application relates to a method and system for early warning of urban stormwater risk based on multi-source data. Background Technology

[0002] An urban stormwater risk early warning system is a comprehensive information management system that integrates multi-source data, including meteorological, hydrological, geographic information, and urban infrastructure data, to monitor, analyze, predict, and issue real-time warnings of flood risks such as surface water accumulation, pipe overflows, and river overtopping caused by heavy rainfall within cities. The system's main function is to provide scientific decision-making support to city managers and the public by issuing early warnings, enabling timely activation of emergency plans, evacuation of personnel, and deployment of flood control facilities, thereby minimizing losses caused by stormwater disasters.

[0003] In existing technologies, random forest models are used for early warning of urban stormwater risk. This model constructs multiple decision trees through ensemble learning and combines their results for prediction. However, due to the different data sources used to construct the decision trees, different decision trees have varying accuracy rates in predicting stormwater risk. Standard random forest models, in their final decision-making, use simple voting or averaging to assign equal weights to each decision tree in the forest. This means that different decision trees have varying predictive abilities for different types and stages of stormwater events. For example, some decision trees may be more accurate in predicting short-term heavy rainfall events, while others may be more accurate in predicting long-term cumulative rainfall events. Therefore, this undifferentiated voting mechanism averages out the decision-making power of expert trees that perform better in specific early warning scenarios, thus limiting the overall prediction accuracy of the model and failing to meet the high precision requirements for urban stormwater risk early warning. Summary of the Invention

[0004] This application provides a method and system for urban stormwater risk early warning based on multi-source data, aiming to solve the problem of insufficient prediction accuracy caused by the same decision tree weights in traditional random forest models.

[0005] In a first aspect, this application provides a method for urban stormwater risk early warning based on multi-source data. The method includes: constructing a risk index for arbitrary historical multi-source stormwater data, comprising: within a monitoring window, multiplying the difference between the numerical value and the maximum value of any dimension data in the historical multi-source stormwater data with the trend of change of the dimension data within the monitoring window, and using the sum of the products of each dimension data as the risk index of the historical multi-source stormwater data; dividing the historical multi-source stormwater data into a training set and a test set, and constructing a random forest using the training set; obtaining the predicted risk level of each decision tree in the random forest for the test set, and constructing a decision matrix for each decision tree based on the risk index and predicted risk level of the historical multi-source stormwater data in the test set; performing a weighted summation of the elements in the decision matrix to obtain the decision index of each decision tree, and normalizing the decision index to obtain the voting weight of each decision tree; inputting real-time multi-source stormwater data into the random forest, voting on the predicted risk level of each decision tree according to the voting weight, obtaining the prediction result, and issuing an early warning based on the prediction result.

[0006] This study analyzes the changes in historical multi-source stormwater data, combining the current state with the changing trends to construct a risk index reflecting the degree of potential stormwater risk in the city. A decision matrix is ​​constructed by combining the risk index with the predicted risk levels of the test set data using decision trees. This matrix is ​​used in subsequent steps to evaluate the identification effectiveness of decision trees for multi-source stormwater data with different risk levels. A further decision index reflecting the accuracy of the decision trees in identifying high-risk multi-source stormwater data is constructed by analyzing the magnitude and position of each element in the decision matrix. Different voting weights are assigned to different decision trees based on the decision index, solving the problem of insufficient prediction accuracy caused by identical weights in traditional random forest models, and improving the robustness and accuracy of random forest models in predicting high-risk events.

[0007] Furthermore, the method for obtaining the changing trend within the monitoring window includes: using a sequence of data of any dimension within the monitoring window as input to the Thiel-Sen estimation trend analysis algorithm to obtain the changing trend of the dimensional data.

[0008] The Thiel-Sen trend analysis algorithm can efficiently and stably describe the changing trends of the dimensional data.

[0009] Furthermore, the method for constructing the decision matrix includes: using the actual risk level as the row and the predicted risk level as the column, statistically analyzing the historical multi-source rainfall and flood data at each position in the decision matrix within the test set, and using the average risk index of the historical multi-source rainfall and flood data at any position as the element value of that position, thereby completing the construction of the decision matrix.

[0010] The decision matrix, constructed by combining the actual risk level of the data in the test set with the predicted risk level of the data in the test set by the decision tree and the risk index of the test set data, can further accurately describe the classification accuracy of the decision tree at times with greater potential risks, in addition to reflecting the basic classification accuracy of the decision tree.

[0011] Furthermore, the method for constructing the decision index includes: accumulating the product of the values ​​of each element in the decision matrix and the weight coefficients to obtain the decision index; wherein, the weight coefficients are inversely proportional to the absolute value of the difference between the true risk level and the predicted risk level in the classification results.

[0012] The decision index of the decision tree, constructed by weighted summation of each element in the decision matrix, reflects the classification effect of the decision tree on high-potential-risk moments. A decision tree that performs better in classifying high-potential-risk moments has a larger decision index, which facilitates subsequent comparison of the classification effects of different decision trees on high-potential-risk moments.

[0013] Furthermore, the normalization method for the voting weight of the decision tree includes: dividing the decision index of the decision tree by the sum of the decision indices of all decision trees in the random forest to obtain the voting weight of the decision tree.

[0014] The voting weights constructed by normalizing the decision index of the decision tree give a larger voting weight to decision trees that accurately identify high-potential-risk moments.

[0015] Furthermore, the multi-source rainfall and flood data includes meteorological data and hydrological data.

[0016] Furthermore, the meteorological data includes rainfall intensity and cumulative rainfall data; the hydrological data includes water level and flow velocity data at key nodes of urban main rivers, flood-prone areas, and drainage networks.

[0017] Furthermore, the early warning method also includes: preprocessing multi-source rainfall and flood data, wherein the preprocessing includes filling and normalization processing.

[0018] Furthermore, the monitoring window includes a preset number of time points prior to the collection time of historical multi-source rainfall and flood data.

[0019] In a second aspect, this application also provides an urban stormwater risk early warning system based on multi-source data, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the urban stormwater risk early warning system based on multi-source data according to the first aspect of this application is implemented.

[0020] This application has the following technical effects: By constructing a risk index to assess the degree of potential stormwater risk in a city, a decision matrix is ​​constructed using decision trees on test set data and the risk index. A decision index is then constructed from the decision matrix to evaluate the accuracy of the decision trees in identifying multi-source stormwater data under high-risk conditions. Different decision weights are assigned to different decision trees based on the decision index, giving more weight to decision trees with accurate identifications. This improves the robustness and accuracy of the random forest model in predicting high-risk events, reduces the underreporting rate of catastrophic events, and provides more accurate and reliable technical support for urban disaster prevention and mitigation. Attached Figure Description

[0021] Figure 1 This is a flowchart of an urban stormwater risk early warning method based on multi-source data according to an embodiment of this application.

[0022] Figure 2 This is a structural block diagram of an urban stormwater risk early warning system based on multi-source data, according to an embodiment of this application. Detailed Implementation

[0023] Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] The first aspect of this application provides a method for urban stormwater risk early warning based on multi-source data. Figure 1 This is a flowchart of an urban stormwater risk early warning method based on multi-source data according to an embodiment of this application. The specific implementation process of this method will be described in detail below.

[0025] S101: Collect historical multi-source rainfall and flood data and perform preprocessing.

[0026] In this embodiment, to comprehensively assess urban stormwater risk, it is first necessary to collect historical multi-source stormwater data. For example, multi-source stormwater data includes, but is not limited to, the following two types: Meteorological data: This is obtained by calling the API of a third-party weather service platform to acquire minute-level data such as rainfall intensity and cumulative rainfall. This data constitutes two data dimensions. Hydrological data: This is obtained by deploying water level gauges and flow velocity meters at locations such as main urban rivers, historically flood-prone areas, and key nodes in the drainage network to collect real-time water level and instantaneous flow rate data. For example, this embodiment collects data from six key nodes, constituting six data dimensions. The collection frequency is synchronized with the meteorological data, for example, once per minute.

[0027] Multi-source stormwater data is labeled using risk levels. These risk levels are derived from historical disaster records, relevant news reports, and professional assessments by water resources and flood control experts, classifying urban stormwater risk levels accordingly. In this embodiment, the risk levels are defined into seven categories: light rain, moderate rain, heavy rain, torrential rain, extremely heavy rain, and exceptionally heavy rain, and are labeled accordingly. , , , , , , .

[0028] By integrating historically collected meteorological and hydrological data, a total of historical multi-source rainfall and flood data was formed. Each data dimension uses risk level as a label for multi-source rainwater and flood data, which is then used to construct a random forest model.

[0029] It should be noted that during the historical data collection process, due to network instability or API call failures, the raw data may contain missing values. Additionally, multi-dimensional data may have inconsistent units of measurement, necessitating preprocessing to improve data quality. Specifically: forward imputation is used to fill in missing values, and min-max normalization is used to map all data to... This interval improves the stability and effectiveness of historical data in subsequent analysis and calculation. The forward filling method and the max-min normalization method are well-known techniques and will not be elaborated upon here.

[0030] S102: Construct a risk index for arbitrary historical multi-source rainwater and flood data.

[0031] The evolution of urban stormwater risk is a dynamic process, depending not only on the current absolute state value but also closely related to the trend of state change. In one embodiment, a pipe network with a water level at 50% of the safety threshold but rising rapidly should have a higher potential risk than a pipe network with a water level at 70% of the safety threshold but having stabilized.

[0032] Therefore, this step constructs a risk index to reflect the potential risk level of the current state and changing trend of historical multi-source rainstorm data. The construction process of the risk index is as follows: within the monitoring window, the difference between the value and the maximum value of any dimension data in the historical multi-source rainstorm data is multiplied by the changing trend of the dimension data within the monitoring window, and the sum of the products of each dimension data is used as the risk index of the historical multi-source rainstorm data.

[0033] Specifically, for historical multi-source rainfall and flood data, the endpoint is the time when the historical multi-source rainfall and flood data was collected, and the length is... The time window is denoted as the monitoring window. The first data dimension Each dimension forms a length within the monitoring window. The time series data is used as input to the Thiel-Sen trend analysis algorithm, which outputs the trend of change in that dimension of the data. In this embodiment, The value is 15.

[0034] Based on the above characteristics, a risk index for historical multi-source rainfall and flood data is constructed, and the calculation method is as follows: In the formula This represents a risk index based on historical multi-source rainfall and flood data. This indicates the number of dimensions in multi-source stormwater data. This indicates that multi-source rainfall and flood data were collected on the [date]. Values ​​in each dimension This indicates that the multi-source rainfall and flood data within the monitoring window are in the [number]th [period]. The maximum value in each dimension This indicates that the multi-source stormwater data calculated by the Thiel-Sen estimation trend analysis algorithm is in the [number]th [period]. The changing trends of the time series across multiple dimensions This indicates that the data collection time is the first multi-source rainfall and flood data collected at the previous time. Differences in each dimension.

[0035] In the formula This item reflects the multi-source rainfall and flood data in the first... Static risk in each dimension, when The closer the value is to the historical maximum value When this happens, the value of this term will increase rapidly and non-linearly; the 1 in the denominator is to avoid... and When the values ​​are equal, the denominator becomes zero, making the calculation impossible.

[0036] In the formula This item reflects the first of the multi-source rainwater and flood data. The dynamic risk level in each dimension, i.e., the degree to which rainfall and flood data changes in the direction of increasing risk, when multi-source rainfall and flood data in the [missing information] dimension... The more pronounced the growth trend across all dimensions, the significantly greater the value of this term will be compared to 1. When multi-source rainwater data exhibits a growth trend across the [number] dimensions, the value of this term will be significantly greater than 1. The smoother the surface in each dimension, the closer the value of this term will be to 1, thus suppressing static risk.

[0037] Based on the above analysis, the risk index combines static and dynamic risks, and can more accurately measure the potential danger of urban stormwater.

[0038] S103: Divide historical multi-source rainwater data into training set and test set, and use the training set to construct a random forest; obtain the predicted risk level of each decision tree in the random forest in the test set, and construct the decision matrix of each decision tree based on the risk index and predicted risk level of historical multi-source rainwater data in the test set.

[0039] In one embodiment, the preprocessed historical multi-source rainfall and flood data is divided into a training set and a test set. For example, the division can be 70% training set and 30% test set.

[0040] Using multi-source rainfall and flood data and their corresponding risk levels from the training set as input to a standard random forest model, we obtain... In this embodiment, the number of decision trees is [number]. The value is set to 100, the maximum depth of the decision tree is preset to 10, and the minimum number of samples required for node splitting is preset to 2.

[0041] For the first in random forest Each decision tree is used to construct its decision matrix based on its performance on the test set. The specific construction process of the decision matrix is ​​as follows: A decision matrix is ​​constructed with the actual risk level as the rows and the predicted risk level as the columns. In other words, the number of rows and columns in the decision matrix are equal, both being the total number of risk level categories. In this embodiment The decision matrix is ​​initialized by setting all values ​​to 0; for any multi-source stormwater data in the test set, its true risk level is denoted as... The multi-source rainwater and flood data are input to the first... After setting up decision trees, the predicted risk level is denoted as... Simultaneously, the risk index of the multi-source rainwater data is calculated through step S102. The risk index is then added to the decision matrix. The first in line, number On the elements of the column; traverse the entire test set according to the above steps, then the decision matrix will have the element of column 1. Line 1 The element values ​​in the column represent all true risk levels. Predicted as The sum of the risk indices of multi-source rainwater and flood data is divided by the number of multi-source rainwater and flood data to obtain the mean. This mean is used as the final value at the corresponding position in the decision matrix to obtain the final decision matrix, which can be expressed in the following form:

[0042] in In a random forest, the i-th The decision matrix of a decision tree. The total number of risk level categories in this embodiment , This indicates that all real risk levels in the test set are... The first Decision trees predict the following: The average of the risk index of multi-source rainwater and flood data.

[0043] Based on the above analysis, the decision matrix It intuitively reflects the first The performance of a decision tree is, in an ideal situation, the diagonal elements of the decision matrix of a high-performing decision tree should be significantly larger than the values ​​of the off-diagonal elements, indicating that the decision tree has a high accuracy in identifying high-risk events.

[0044] S104: The decision index of each decision tree is obtained by weighted summation of the elements in the decision matrix.

[0045] In one embodiment, to specifically measure the decision tree's effectiveness on the test set, a decision index needs to be constructed based on the decision matrix. The construction principle is as follows: all elements in the decision matrix are weighted and summed, with the diagonal elements assigned the largest weight, while the off-diagonal elements are attenuated according to the difference between the actual risk level and the predicted risk level. The larger the difference, the smaller the weight.

[0046] Specifically, the method for constructing the decision index includes: accumulating the product of the values ​​of each element in the decision matrix and the weight coefficients to obtain the decision index; wherein, the weight coefficients are inversely proportional to the absolute value of the difference between the true risk level and the predicted risk level in the classification results.

[0047] The formula for calculating the decision index in this embodiment is: In the formula Represents the first in a random forest The decision index of a decision tree The total number of categories representing risk levels is 7 in this application. Indicates the first The decision matrix of the decision tree line, number The value of the column element, Indicates the first The sum of all element values ​​in the decision matrix of the decision tree is used, with 1 in the denominator to avoid situations where the denominator is zero and cannot be calculated.

[0048] In the formula The term reflects the weighting coefficients, when When the decision tree accurately classifies the multi-source rainwater and flood data in the test set, the weight coefficient is at its maximum, taking a value of 1; when... When the decision tree cannot accurately classify the multi-source rainwater data in the test set, the weight coefficient becomes smaller, i.e., less than 1, and the weight coefficient becomes smaller as the deviation from the correct risk level increases.

[0049] In the formula The term represents the normalization process applied to the elements of the decision matrix, reflecting the proportion of potential risk associated with each decision outcome. A larger value for this term indicates a higher risk level. Decision trees are used to evaluate all real risk levels in the test set. Predicted as The higher the average risk index of multi-source rainwater and flood data, the greater the potential danger of the multi-source rainwater and flood data. When making decision classifications, more attention should be paid to the decision effect of the decision tree on the sample.

[0050] Following the above analysis, in the decision matrix, the larger the weight coefficient and the larger the proportion of risk weight, the stronger the... The higher the accuracy of a decision tree in identifying multi-source rainwater and flood data with a high degree of potential danger, the better the overall decision-making effect of the decision tree, and therefore the larger the calculated decision index.

[0051] S105: Normalize the decision index to obtain the voting weight of each decision tree, input real-time multi-source rain and flood data into the random forest, vote on the prediction risk level of each decision tree according to the voting weight, obtain the prediction result, and issue an early warning based on the prediction result.

[0052] In one embodiment, in a standard random forest model, the voting weight of each decision tree is equal. This embodiment, based on the decision index of each decision tree obtained in step S104, redistributes the voting weight of each decision tree, giving greater voting weight to decision trees with higher accuracy in identifying multi-source stormwater data with higher potential risk. Specifically, normalizing the decision index to obtain the voting weight of each decision tree includes dividing the decision index of each decision tree by the sum of the decision indices of all decision trees in the random forest.

[0053] No. The voting weights of each decision tree are calculated as follows: In the formula Indicates the first The final voting weight of each decision tree. Indicates the first The decision index of a decision tree This represents the sum of the decision indices of all decision trees in the random forest, enabling dynamic weighting of the voting weights for the decision trees.

[0054] When issuing real-time early warnings for urban stormwater risks, multi-source stormwater data collected and preprocessed in real time is input into a pre-trained random forest model with updated voting weights. Each decision tree in the model outputs a predicted risk level. The voting weights of decision trees belonging to the same risk level are summed to obtain a total score for that risk level. The total scores of all risk levels are compared, and the risk level with the highest total score is taken as the final early warning result. This warning is then released to city managers and the public to facilitate timely flood prevention and drainage measures.

[0055] According to a second aspect of this application, this application also provides an urban stormwater risk early warning system based on multi-source data. Figure 2 This is a structural block diagram of an urban stormwater risk early warning system based on multi-source data, according to an embodiment of this application. Figure 2 As shown, the system 50 includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the urban stormwater risk early warning method based on multi-source data according to the first aspect of this application. The system also includes other components well-known to those skilled in the art, such as a communication bus and a communication interface. Their configuration and functions are known in the art and will not be described further here.

Claims

1. A method for early warning of urban stormwater risk based on multi-source data, characterized in that, The early warning method includes: constructing a risk index for any historical multi-source rainfall and flood data, including: within a monitoring window, multiplying the difference between the value and the maximum value of any dimension data in the historical multi-source rainfall and flood data with the changing trend of the dimension data within the monitoring window, and using the sum of the products of each dimension data as the risk index of the historical multi-source rainfall and flood data; Historical multi-source rainfall and flood data are divided into training set and test set. Random forest is constructed using training set. The predicted risk level of each decision tree in the random forest is obtained in test set. Decision matrix of each decision tree is constructed based on the risk index and predicted risk level of historical multi-source rainfall and flood data in test set. The decision index of each decision tree is obtained by weighted summation of the elements in the decision matrix; the decision index is normalized to obtain the voting weight of each decision tree; real-time multi-source rain and flood data is input into the random forest; the prediction risk level of each decision tree is voted on according to the voting weight to obtain the prediction result; and an early warning is issued based on the prediction result.

2. The urban stormwater risk early warning method based on multi-source data according to claim 1, characterized in that, The method for obtaining the changing trend of the dimensional data within the monitoring window includes: using a sequence of arbitrary dimensional data within the monitoring window as input to the Thiel-Sen estimation trend analysis algorithm to obtain the changing trend of the dimensional data.

3. The urban stormwater risk early warning method based on multi-source data according to claim 1, characterized in that, The method for constructing the decision matrix includes: using the actual risk level as the row and the predicted risk level as the column, statistically analyzing the historical multi-source rainfall and flood data at each position in the decision matrix within the test set, and using the average risk index of the historical multi-source rainfall and flood data at any position as the element value of that position, thus completing the construction of the decision matrix.

4. The urban stormwater risk early warning method based on multi-source data according to claim 3, characterized in that, The method for constructing the decision index includes: summing the products of the values ​​of each element in the decision matrix and the weight coefficients to obtain the decision index; wherein, the weight coefficients are inversely proportional to the absolute value of the difference between the true risk level and the predicted risk level in the classification results.

5. The urban stormwater risk early warning method based on multi-source data according to claim 1, characterized in that, The process of normalizing the decision index to obtain the voting weight of each decision tree includes: dividing the decision index of the decision tree by the sum of the decision indices of all decision trees in the random forest to obtain the voting weight of the decision tree.

6. The urban stormwater risk early warning method based on multi-source data according to claim 1, characterized in that, The multi-source rainfall and flood data includes meteorological data and hydrological data.

7. The urban stormwater risk early warning method based on multi-source data according to claim 6, characterized in that, The meteorological data includes rainfall intensity and cumulative rainfall data; the hydrological data includes water level and flow velocity data at key nodes of urban main rivers, flood-prone areas, and drainage networks.

8. The urban stormwater risk early warning method based on multi-source data according to claim 1, characterized in that, The early warning method further includes: preprocessing multi-source rainwater and flood data, wherein the preprocessing includes filling and normalization.

9. A method for urban stormwater risk early warning based on multi-source data according to claim 1, characterized in that, The monitoring window contains a preset number of time points prior to the collection time of historical multi-source rainfall and flood data.

10. A city stormwater risk early warning system based on multi-source data, characterized in that, include: The system includes a processor, a memory, and a communication interface. The memory stores a computer program, which, when executed by the processor, implements a method for urban stormwater risk early warning based on multi-source data as described in any one of claims 1 to 9.