Flood forecasting methods, devices, electronic equipment and computer-readable storage media
By clustering stormwater pipe networks and training them using a two-layer long short-term memory neural network, the problems of low data processing efficiency and insufficient prediction accuracy in existing technologies for stormwater pipe networks are solved, achieving rapid response and high-precision flood forecasting.
Patent Information
- Application Number
- CN202511093632.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-08-06
AI Technical Summary
Existing technologies are inefficient when processing large-scale stormwater pipe network data, making it difficult to meet the needs of rapid response. Traditional methods have insufficient prediction accuracy under extreme conditions, lack intelligent and automated data analysis capabilities, and have long calculation times, which affects response speed.
By clustering the nodes in the rainwater pipe network and dividing them into multiple categories, a two-layer long short-term memory neural network is used for training, including a first long short-term memory neural network and a second long short-term memory neural network, to perform intelligent and automated data analysis and improve response speed.
It meets the need for rapid response in extreme situations, reduces computation time, improves prediction accuracy and response speed, and satisfies the needs of large-scale data processing.
Smart Images

Figure CN120598136B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban drainage network technology, and in particular to a flood forecasting method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Urban flooding has become a significant problem hindering modern urban development. Its main contributing factors include increased rainfall intensity, increased surface runoff coefficient due to urbanization, aging drainage systems, and inadequate management measures. The application of early warning systems provides crucial support for urban flood prevention, disseminating warning information through weather forecasts and real-time monitoring data to guide relevant departments and residents in taking emergency measures.
[0003] However, existing technologies have revealed many limitations in practical applications. First, they are inefficient when processing large-scale stormwater drainage network data, making it difficult to meet the need for rapid response. Second, traditional statistical methods and models lack sufficient prediction accuracy under extreme conditions, failing to accurately assess the risk of urban flooding. Third, existing technologies lack intelligent and automated data analysis capabilities, making it difficult to dynamically analyze and predict complex drainage systems. Finally, existing technologies take a long time to process large-scale data, affecting response speed. Summary of the Invention
[0004] The purpose of this invention is to provide a flood forecasting method, device, electronic device, and computer-readable storage medium. First, the nodes in the stormwater pipe network are clustered, and the stormwater pipe network is divided into multiple blocks according to different categories. Historical data from different blocks are used to train a prediction model including a two-layer long short-term memory neural network. The trained model has intelligent and automated data capabilities, which can meet the needs of rapid response. Especially in extreme cases, when processing large-scale data, it reduces the calculation time and improves the response speed.
[0005] In a first aspect, the present invention provides a flood prediction method, comprising:
[0006] Acquire data on the stormwater drainage network; this data includes: basic network data, catchment area data, and historical precipitation data.
[0007] Cluster analysis is performed based on the basic data of the pipeline network to divide the target locations within the stormwater pipeline network into multiple cluster blocks. The target locations include: inspection wells and stormwater pipes. There is a one-to-one correspondence between the cluster blocks and the cluster categories. The cluster categories represent the flood risk level of the cluster blocks.
[0008] The water depth within clustered blocks is classified according to multiple preset flood risk levels to determine the prediction accuracy corresponding to the clustered blocks; different flood risk levels correspond to different water depths.
[0009] A basic flood prediction model is trained based on stormwater pipe network data within clustered blocks until the prediction accuracy is achieved, thus obtaining the flood prediction model. The basic flood prediction model includes: a first long short-term memory neural network and a second long short-term memory neural network connected in sequence. The input data of the first long short-term memory neural network is the stormwater pipe network data, and the output data is the liquid level in the inspection well and the fullness of the stormwater pipe. The input data of the second long short-term memory neural network are the stormwater pipe network data, the liquid level in the inspection well, and the fullness of the stormwater pipe, and the output data is the water depth.
[0010] Input rainfall event data into the flood prediction model and output the predicted water depth.
[0011] In some preferred embodiments of the present invention, the step of performing cluster analysis based on pipeline network basic data to divide target locations within the stormwater pipeline network into multiple cluster blocks includes:
[0012] Based on preset screening rules, target points with a preset proportion are determined in the rainwater pipe network.
[0013] Determine the elevation difference of the manholes and the fullness of the rainwater pipes at the target location;
[0014] The elevation difference of the inspection well and the fullness of the rainwater pipe are normalized and used as feature vectors;
[0015] A Gaussian clustering model is trained based on feature vectors until the preset conditions are met, and the clustering results are obtained.
[0016] In some preferred embodiments of the present invention, the step of training a Gaussian clustering model based on feature vectors until a preset condition is met to obtain the clustering result includes:
[0017] Initialize parameters; these parameters include: mixture weights, mean, and covariance matrix;
[0018] Calculate the probability of a Gaussian distribution based on eigenvectors;
[0019] The posterior probability is determined using the expectation-maximization algorithm based on the probability of the Gaussian distribution.
[0020] The parameters are updated based on the posterior probability, and the probability of the Gaussian distribution is recalculated by recalculating the feature vector until the change in the log-likelihood function of the Gaussian clustering model is less than the preset threshold or the preset number of iterations is reached.
[0021] Cluster analysis is performed on the feature vectors to obtain the clustering results.
[0022] In some preferred embodiments of the present invention, the log-likelihood function is constrained by the following formula:
[0023] ;
[0024] in, Let be the log-likelihood function. The k-th Gaussian distribution is located at x. i The probability density function at point K, where K is the number of Gaussian distributions. Let i be the feature vector of the i-th data point. These are the parameters of the Gaussian clustering model.
[0025] In some preferred embodiments of the present invention, the method further includes: determining a flood prediction model through the following steps:
[0026] After standardizing the data from the rainwater pipe network, the first training data was constructed based on the time series.
[0027] The first long short-term memory neural network is trained based on the first training data, and the parameters of the first long short-term memory neural network are updated based on the optimizer until the preset training conditions are met.
[0028] Based on the first long short-term memory neural network that has been trained, the output shows the liquid level in the inspection well and the fullness of the rainwater pipe.
[0029] After standardizing the data of the rainwater pipe network, the liquid level in the inspection well, and the fullness of the rainwater pipe, a second training data was constructed based on the time series.
[0030] The second long short-term memory neural network is trained based on the second training data, and the parameters of the second long short-term memory neural network are updated based on the optimizer until the preset training conditions are met.
[0031] The water depth is output based on the trained second long short-term memory neural network.
[0032] In some preferred embodiments of the present invention, the parameters of the first long short-term memory neural network and the parameters of the second long short-term memory neural network both include: one long short-term memory layer, 10 hidden units, and a learning rate of 0.001.
[0033] In some preferred embodiments of the present invention, the method further includes:
[0034] Sort the multiple risk levels from low to high;
[0035] Sort the multiple prediction accuracies in ascending order;
[0036] The sorted risk levels are mapped to the sorted prediction accuracies.
[0037] Secondly, the present invention provides a flood forecasting device, comprising:
[0038] The data acquisition module is used to acquire data from the stormwater drainage network; the stormwater drainage network data includes: basic network data, catchment area data, and historical precipitation data.
[0039] The clustering analysis module is used to perform clustering analysis based on the basic pipeline network data, dividing the target locations within the stormwater pipeline network into multiple cluster blocks. The target locations include: inspection wells and stormwater pipes. There is a one-to-one correspondence between the cluster blocks and the cluster categories. The cluster categories represent the flood risk level of the cluster blocks.
[0040] The prediction accuracy determination module is used to classify the water depth within the clustered blocks according to multiple preset waterlogging risk levels and determine the prediction accuracy corresponding to the clustered blocks; where different waterlogging risk levels correspond to different water depths.
[0041] The flood prediction model determination module is used to train a basic flood prediction model based on stormwater pipe network data within clustered blocks until the prediction accuracy is achieved, thus obtaining the flood prediction model. The basic flood prediction model includes: a first long short-term memory neural network and a second long short-term memory neural network connected in sequence. The input data for the first long short-term memory neural network is stormwater pipe network data, and the output data is the liquid level in the manhole and the fullness of the stormwater pipes. The input data for the second long short-term memory neural network are stormwater pipe network data, the liquid level in the manhole, and the fullness of the stormwater pipes, and the output data is the water depth.
[0042] The water depth prediction module is used to input rainfall event data into the flood prediction model and output the predicted water depth.
[0043] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the flood forecasting method provided in the first aspect above.
[0044] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the flood prediction method provided in the first aspect.
[0045] This invention brings the following beneficial effects:
[0046] This invention provides a flood prediction method, device, electronic device, and computer-readable storage medium. The method includes: acquiring data from a stormwater drainage network; wherein the stormwater drainage network data includes: basic network data, catchment area data, and historical precipitation data; performing cluster analysis based on the basic network data to divide target locations within the stormwater drainage network into multiple cluster blocks; wherein the target locations include: manholes and stormwater pipes; each cluster block corresponds one-to-one with a cluster category; the cluster category characterizes the flood risk level of the cluster block; classifying the water depth within the cluster blocks according to multiple preset flood risk levels to determine the prediction accuracy corresponding to the cluster blocks; wherein different flood risk levels correspond to different water depths; training a basic flood prediction model based on the stormwater drainage network data within the cluster blocks until the prediction accuracy is reached, thereby obtaining a flood prediction model; wherein the basic flood prediction model includes: sequentially connecting... The system connects a first long short-term memory (LSTM) neural network and a second LSM neural network. The input data for the first LSM neural network is the stormwater pipe network data, and the output data is the liquid level in the manhole and the fullness of the stormwater pipes. The input data for the second LSM neural network is the stormwater pipe network data, the liquid level in the manhole, and the fullness of the stormwater pipes, and the output data is the water depth. Rainfall event data is input into the flood prediction model, which outputs the predicted water depth. First, the nodes in the stormwater pipe network are clustered, and the stormwater pipe network is divided into multiple blocks according to different categories. Historical data from different blocks are used to train the prediction model, which includes a two-layer LSM neural network. The trained model has intelligent and automated data capabilities, which can meet the needs of rapid response, especially in extreme cases, reducing computation time and improving response speed when processing large-scale data. Attached Figure Description
[0047] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0048] Figure 1 A flowchart of a flood forecasting method provided in an embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of the structure of a flood forecasting device provided in an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0051] Icons: 310 - Data acquisition module; 320 - Cluster analysis module; 330 - Prediction accuracy determination module; 340 - Flood prediction model determination module; 350 - Water depth prediction module; 400 - Memory; 401 - Processor; 402 - Bus; 403 - Communication interface. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0053] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0054] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0055] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0056] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0057] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0058] Urban flooding has become a significant problem hindering modern urban development. Its main contributing factors include increased rainfall intensity, increased surface runoff coefficient due to urbanization, aging drainage systems, and inadequate management measures. To address this challenge, current flood prevention and mitigation strategies primarily rely on the construction of hardware infrastructure, such as stormwater pumping stations and drainage pipes, combined with software technologies, including Geographic Information Systems (GIS), hydraulic models (such as SWMM), and sensor monitoring technologies, to build models of drainage systems and achieve real-time monitoring of drainage conditions. Furthermore, the application of early warning systems provides crucial support for urban flood prevention, disseminating warning information through weather forecasts and real-time monitoring data to guide relevant departments and residents in taking emergency measures.
[0059] However, existing technologies have revealed several limitations in practical applications. First, GIS and hydraulic models are computationally inefficient when processing large-scale stormwater drainage network data, making it difficult to meet the demands for rapid response. Second, traditional statistical methods and SWMM simulations lack sufficient prediction accuracy under extreme rainfall conditions, failing to accurately assess the risk of urban flooding. Furthermore, existing technologies lack intelligent and automated data analysis capabilities, making it difficult to dynamically analyze and predict complex drainage systems. Finally, existing monitoring and early warning systems experience long computation times when processing large-scale data and complex models, impacting response speed.
[0060] Currently, numerous physical models and machine learning algorithms are used for early warning and prediction of urban flooding. Commonly used models include SWMM (Storm Water Management Model), InfoWorks ICM (Integrated Catchment Management), and Mike Urban (a software for modeling and simulating urban drainage systems). These models simulate water flow conditions by solving hydrodynamic equations, providing high-precision numerical simulation results. These models are widely used, such as the SWMM model and the InfoWorks ICM model. Similar models exist in China, such as the urban stormwater accumulation forecasting model proposed by Zhang Min et al. Machine learning methods include random forests, support vector machines, and XGBoost (an optimized distributed gradient boosting library), while deep learning methods include recurrent neural networks and artificial neural networks. These methods achieve rapid prediction by learning feature factors (such as rainfall intensity, slope, and drainage network density).
[0061] However, in large-scale and complex underlying surface conditions, hydrodynamic models are complex and time-consuming to solve, making it difficult to meet the needs of rapid prediction. These models require large amounts of input data and complex parameter calibration, placing high demands on data quality and computational power. Machine learning models require extensive training with historical data; insufficient or low-quality data can negatively impact prediction accuracy. Furthermore, the models have limited generalization ability, making them ill-suited for extreme rainfall or unseen scenarios.
[0062] The purpose of this invention is to provide a flood forecasting method, device, electronic device, and computer-readable storage medium. First, the nodes in the stormwater pipe network are clustered, and the stormwater pipe network is divided into multiple blocks according to different categories. Historical data from different blocks are used to train a prediction model including a two-layer long short-term memory neural network. The trained model has intelligent and automated data capabilities, which can meet the needs of rapid response. Especially in extreme cases, when processing large-scale data, it reduces the calculation time and improves the response speed.
[0063] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0064] Example 1
[0065] This invention provides a flood forecasting method, see [link to relevant documentation]. Figure 1 The flowchart shown in this embodiment of the invention provides a flood forecasting method, which includes:
[0066] Step S102: Obtain data of the stormwater pipe network; wherein, the stormwater pipe network data includes: basic pipe network data, catchment area data and historical precipitation data.
[0067] Specifically, the stormwater drainage system mainly consists of stormwater wells, stormwater pipes, stormwater pumping stations, and stormwater outfalls. Basic data on the stormwater drainage system is collected and organized, including: ground elevation at the stormwater well opening, ground elevation at the stormwater well, bottom elevation of the stormwater pipe, stormwater pipe level elevation H, pipe slope i, and stormwater outfall elevation. Data on catchment areas, catchment areas, and runoff coefficients within the region are also collected. Historical rainfall intensity within the region is collected and organized, and rainfall types are categorized.
[0068] Historical data from monitoring points are set up in the stormwater pipe network system. Under different rainfall conditions, data such as liquid level, flow rate in stormwater pipes, and water depth near stormwater wells are analyzed.
[0069] Step S104: Perform cluster analysis based on the basic pipeline network data to divide the target locations within the stormwater pipeline network into multiple cluster blocks; among which, the target locations include: inspection wells and stormwater pipes; the cluster blocks correspond one-to-one with the cluster categories; the cluster categories represent the flood risk level of the cluster blocks.
[0070] Specifically, since the stormwater drainage network is a very large system, if all stormwater inspection wells and stormwater pipes are considered as nodes, there would be tens of thousands or even hundreds of thousands of such nodes in a large city, which would be detrimental to data processing.
[0071] Furthermore, in some preferred embodiments of the present invention, the step of performing cluster analysis based on pipeline network basic data to divide target locations within the stormwater pipeline network into multiple cluster blocks includes: determining a preset proportion of target locations in the stormwater pipeline network based on preset screening rules; determining the elevation difference of manholes and the fullness of stormwater pipes in the target locations; normalizing the elevation difference of manholes and the fullness of stormwater pipes and using them as feature vectors; and training a Gaussian clustering model based on the feature vectors until preset conditions are met to obtain clustering results.
[0072] Specifically, several key points are selected as target points in the vast rainwater pipe network system for real-time monitoring. These monitoring points typically account for about 1% to 5% of the total number of rainwater nodes.
[0073] Target locations are generally prioritized at the junctions of main and branch pipes, such as the intersections of main pipes, branch pipe connections, and upstream and downstream of pumping stations. These locations reflect the overall operational status of the pipe network. Alternatively, low-lying areas, typically high-risk areas for flooding, such as downstream of catchment areas or depressions in the terrain, can be selected. Hydraulically sensitive points can also be chosen, generally locations in the pipe network where sudden changes in water flow velocity, pipe diameter, or slope inflection are prone to hydraulic anomalies.
[0074] The elevation difference data of each rainwater inspection well in the study area was collected under various rainfall intensities in the statistical analysis area. The elevation difference was constrained by the following formula: ΔE = E1-E2; where E1 is the ground elevation of the rainwater inspection well; E2 is the water level elevation of the rainwater inspection well; and ΔE is the elevation difference.
[0075] The liquid level of the rainwater pipe with the liquid level monitoring point is collected and recorded as h. The pipe diameter D is collected, and the degree of filling a = h / D is calculated.
[0076] In some preferred embodiments of the present invention, parameters such as the slope, catchment area, precipitation curve, and runoff coefficient of the rainwater pipe are obtained, a simulation model is run to obtain the predicted ΔE and a in the drainage network, and then the error is analyzed and the model is adjusted with the actual ΔE and a until the error is less than 10%. Subsequently, the simulation model can be used to fit ΔE and a.
[0077] For example, SWMM software is used to fit ΔE and a in the entire drainage network, and then the fitting results of SWMM software are exported as an INP file. Specifically, the data of the entire rainwater pipe network system, such as E1, E2, h, and D, are read and calculated to obtain the analysis data ΔE and a of the entire rainwater pipe network.
[0078] Furthermore, ΔE and a are standardized to ensure that the values of each feature are on the same scale. Generally, this is achieved by subtracting the mean from each data point and dividing by the standard deviation, using the following standardization formula: Where z represents the standardized data, x represents the original data, μ represents the mean, and σ represents the standard deviation. ΔE and a are used as inputs to the feature vector.
[0079] Furthermore, in some preferred embodiments of the present invention, the step of training a Gaussian clustering model based on feature vectors until a preset condition is met to obtain clustering results includes: initializing parameters; wherein the parameters include: mixture weights, mean, and covariance matrix; calculating the probability of a Gaussian distribution based on the feature vectors; determining the posterior probability using an expectation-maximization algorithm based on the probability of the Gaussian distribution; updating the parameters based on the posterior probability, and continuing to recalculate the probability of a Gaussian distribution based on the feature vectors until the change in the log-likelihood function of the Gaussian clustering model is less than a preset threshold or reaches a preset number of iterations; and performing clustering analysis on the feature vectors to obtain clustering results.
[0080] Specifically, the first step is to initialize the parameters of the Gaussian clustering model. Among them, the mixture weights π: initialize the weights of each Gaussian distribution, usually set to a uniform distribution; the mean μ: initialize the mean of each Gaussian distribution, which can be pre-initialized by randomly selecting data points or using K-Means (an iterative clustering analysis algorithm); and the covariance matrix Σ: initialize the covariance matrix of each Gaussian distribution, usually set to the identity matrix or the covariance matrix of the data.
[0081] The second step is to calculate the probability that each data point belongs to each Gaussian distribution:
[0082] ;
[0083] Where, x i Let π be the feature vector of the i-th data point. k The mixed weights for the updated k-th Gaussian distribution, where k is the total number of data points, and μ k Let Σk be the mean vector of the k-th Gaussian distribution, and let Σk be the covariance matrix of the k-th Gaussian distribution.
[0084] The third step involves the Expectation-Maximization algorithm, which calculates the posterior probability and updates the mixture weights, mean, and covariance matrix. See the following calculation formulas for details:
[0085] ;
[0086] ;
[0087] ;
[0088] ;
[0089] Where, π k The mixed weights are the updated k-th Gaussian distribution weights, where N is the total number of data points and r is the weights. ik For data point x i The posterior probability of belonging to the k-th Gaussian distribution, x i For the i-th data point, μ k Let Σk be the mean of the updated k-th Gaussian distribution, and let Σk be the covariance matrix of the updated k-th Gaussian distribution. For data point x i The probability density under the k-th Gaussian distribution, μ k Let Σk be the mean vector of the Gaussian distribution, Σk be the covariance matrix of the Gaussian distribution, and the summation part in the denominator is... To sum the weighted probability densities over all Gaussian distributions, this is used to normalize the posterior probability, ensuring that the sum of all posterior probabilities is 1. For data point xi With mean μ k The outer product.
[0090] Fourth, repeat steps two and three until the change in the log-likelihood function is less than a certain threshold (e.g., e). -6 ) or reach the maximum number of iterations, when |L (t+1) -L (t) |<ϵ (e.g., ϵ=10) -6 The iteration terminates when ().
[0091] Furthermore, in some preferred embodiments of the present invention, the log-likelihood function is constrained by the following formula: ;in, Let be the log-likelihood function. The k-th Gaussian distribution is located at x. i The probability density function at point K, where K is the number of Gaussian distributions. Let i be the feature vector of the i-th data point. These are the parameters of the Gaussian clustering model.
[0092] Gaussian Mixture Clustering (GMM) is used to perform cluster analysis on stormwater drainage systems, identifying risk areas and significantly improving data processing efficiency. GMM can effectively handle large-scale data, reduce computational complexity, and ensure the system's high efficiency and rapid response capability when dealing with complex urban drainage systems.
[0093] Step S106: Based on the water depth within the clustered blocks, classify them according to multiple preset waterlogging risk levels to determine the prediction accuracy corresponding to the clustered blocks; wherein, different waterlogging risk levels correspond to different water depths.
[0094] Specifically, cluster analysis under different rainfall intensities can yield cluster analysis results for the entire stormwater drainage network system. For example, the stormwater drainage network system can be classified into categories such as I, II, III, V, VI, VII, and VIII.
[0095] It should be emphasized that the risk level of urban flooding can be determined by experience. In this embodiment of the invention, seven levels are used: I, II, III, V, VI, VII, and VIII.
[0096] The data corresponding to the waterlogging risk level correspond to different prediction accuracies when training waterlogging models.
[0097] In some preferred embodiments of the present invention, the method further includes: sorting multiple risk levels in ascending order; sorting multiple prediction accuracies in ascending order; and mapping the sorted multiple risk levels to the sorted multiple prediction accuracies.
[0098] Generally, in areas with lower risk levels, the elevation difference of inspection wells is larger, the filling degree is lower, and the risk of flooding is lower. Therefore, the required prediction accuracy in the prediction model can be appropriately lower. In areas with higher risk levels, the elevation difference is smaller, the filling degree is higher, and the risk of flooding is higher. Therefore, the required prediction accuracy in the prediction model needs to be higher. This can be achieved by ranking the risk levels separately and then matching the ranked risk levels with the ranked prediction accuracies. This can be one prediction accuracy per risk level or several adjacent risk levels corresponding to one prediction accuracy.
[0099] For example, taking 5 inspection wells as an example, see the original data list shown in Table 1:
[0100] Table 1
[0101]
[0102] Standardize the above raw numbers and calculate the mean and standard deviation:
[0103] μ ΔE =(2.5+1.8+0.9+0.5+1.2) / 5=1.38;μ a =(0.3+0.5+0.7+0.8+0.4) / 5=0.54;σ ΔE ≈0.72; σ a ≈0.18; The data is standardized using the following formula:
[0104] ;
[0105] ;
[0106] The standardized values for each inspection well are shown in Table 2:
[0107] Table 2
[0108]
[0109] Taking three Gaussian distributions as an example, that is, K=3.
[0110] First, initialize the parameters: the mixed weights π: Mean μ: Randomly select the feature vectors of three inspection wells as the initial mean, for example, select inspection wells 1, 3, and 4. , , Covariance matrix (Σ): Identity matrix.
[0111] Calculate the Gaussian distribution probability:
[0112] For each data point x iCalculate its probability density under each Gaussian distribution: .
[0113] Taking inspection well 1 (feature vector [1.55, -1.33]) as an example:
[0114] For the first Gaussian distribution ( ): ;
[0115] Similarly, calculate the probabilities under other Gaussian distributions: for the second Gaussian distribution ( ), , , .
[0116] For the third Gaussian distribution ( ): , , .
[0117] Expectation-Maximization Algorithm: Calculating the posterior probability: ; obtained: r 11 ≈0.9925; r 12 ≈0.00741; r 13 ≈0.000496; Similarly, calculate the posterior probability for other inspection wells.
[0118] Update the mixed weights: Update the mean: Update the covariance matrix: .
[0119] Perform a convergence check: Repeat the calculation steps until the change in the log-likelihood function is less than a certain threshold (e.g., e^(-1 / 2)). -6 (or reach the maximum number of iterations.)
[0120] Clustering the results: After multiple iterations, the final cluster categories for each inspection well are shown in Table 3 below:
[0121] Table 3
[0122]
[0123] Category I: Low-risk area. Manholes 1, 2, and 5 belong to this category. These manholes have a large elevation difference and low fill rate, resulting in a low risk of flooding. Category II: Medium-risk area. Manhole 3 belongs to this category. Its elevation difference and fill rate are moderate. Category III: High-risk area. Manhole 4 belongs to this category. Its elevation difference is low, its fill rate is high, resulting in a high risk of flooding.
[0124] For example, the prediction accuracy for low-risk areas is ≥85%, for medium-risk areas it is ≥90%, and for high-risk areas it is ≥95%. Given that the entire stormwater drainage network system has tens or hundreds of thousands of nodes, achieving consistent overall accuracy during training is difficult due to large model computations, numerous iterations, long computation times, and the inability to converge. Therefore, a step-by-step prediction accuracy system is implemented based on the probability of occurrence to improve overall prediction accuracy while achieving rapid convergence and quick early warning response.
[0125] Step S108: Train a basic flood prediction model based on the rainwater pipe network data within the clustered blocks until the prediction accuracy is achieved, thus obtaining the flood prediction model; wherein, the basic flood prediction model includes: a first long short-term memory neural network and a second long short-term memory neural network connected in sequence; the input data of the first long short-term memory neural network is the rainwater pipe network data, and the output data is the liquid level height in the inspection well and the fullness of the rainwater pipe; the input data of the second long short-term memory neural network is the rainwater pipe network data, the liquid level height in the inspection well and the fullness of the rainwater pipe, and the output data is the water depth.
[0126] Specifically, the training data preparation mainly includes: basic values such as the ground elevation of the rainwater well opening, the ground elevation of the rainwater well, the top elevation of the rainwater pipe, the bottom elevation of the rainwater pipe, the pipe slope i, and the elevation of the rainwater discharge outlet; and collecting the catchment block attributes, catchment area, runoff coefficient, etc. of the area.
[0127] Historical monitoring data (mainly precipitation data) was divided into 80% as the training group and 20% as the test group. The historical monitoring data and basic data of the training group were input into the long short-term memory neural network.
[0128] Furthermore, in some preferred embodiments of the present invention, the flood prediction model is determined through the following steps: After standardizing the data from the stormwater pipe network, first training data is constructed based on time series data; a first long short-term memory (LSTM) neural network is trained based on the first training data, and the parameters of the first LSM neural network are updated based on an optimizer until preset training conditions are met; based on the trained first LSM neural network, the liquid level in the manhole and the fullness of the stormwater pipe are output; after standardizing the data from the stormwater pipe network, the liquid level in the manhole, and the fullness of the stormwater pipe, second training data is constructed based on time series data; a second LSM neural network is trained based on the second training data, and the parameters of the second LSM neural network are updated based on an optimizer until preset training conditions are met; based on the trained second LSM neural network, the water depth is output.
[0129] Specifically, the training process mainly includes two stages: the first stage outputs the elevation difference ΔE and the rainwater pipe filling degree a, and the second stage outputs the surface water depth H.
[0130] For the first stage: Step 1, input basic data:
[0131] 1. Basic GIS data for rainwater drainage network system:
[0132] These basic data represent the fundamental attributes of the stormwater drainage network and are invariants: including pipe length, pipe diameter, pipe slope, pipe top elevation, pipe bottom elevation, manhole ground elevation, manhole bottom elevation, and elevation at which stormwater is discharged into natural waterways.
[0133] 2. Parameters for which there is no basic data but there is guidance or recommended data and which require adjustment and verification:
[0134] 1) Total catchment area S1: The surface area of the water flowing into the inspection well;
[0135] 2) Surface runoff area S2: The surface runoff area along the pipeline connected to the manhole;
[0136] 3) Slope i of surface runoff area: the average slope of surface runoff area;
[0137] 4) Effective runoff coefficient u: The effective runoff coefficient allocated to the surface runoff area.
[0138] 3. External dynamic parameters:
[0139] 1) Rainfall intensity (q): The rainfall intensity over the past T hours, including the rainfall intensity at the current time;
[0140] 2) Rainwater manhole level (GH): The height of the liquid level in the rainwater manhole under the current rainfall intensity.
[0141] 3) Rainwater pipe fullness (a): The fullness of the rainwater pipe under the current rainfall conditions.
[0142] The second step is training the first long short-term memory neural network model:
[0143] 1. Data preprocessing:
[0144] Standardize the underlying data so that the values of each feature are on the same scale.
[0145] Construct time series data, with each sample containing data from the past few time steps, to predict the liquid level in the storm drain manhole and the fullness of the storm drain pipes at the next time step.
[0146] 2. Model Building:
[0147] Define the first Long Short-Term Memory neural network model, which includes LSTM layers and fully connected layers.
[0148] LSTM layers are used to process time series data, and fully connected layers are used to output prediction results.
[0149] 3. Training process
[0150] Set hyperparameters such as the number of input features, the number of hidden layer units, the number of LSTM layers, the learning rate, and the training cycle.
[0151] In each training cycle, training data is input into the model, and the loss between the predicted value and the target value is calculated.
[0152] Use an optimizer (such as Adam) to update the model parameters to minimize the loss.
[0153] 4. Prediction Results:
[0154] Input historical rainfall intensity data for 20% of the test group to predict the liquid level in the manholes of the rainwater pipe system and the fullness of the rainwater pipes.
[0155] For the second stage: predicting the water depth (JH) at flood-prone points on the street:
[0156] Step 1, Data Preparation:
[0157] 1. The liquid level and rainwater pipe filling degree of the nodes in the rainwater pipe system predicted in the first stage.
[0158] 2. Basic GIS data for the rainwater drainage network system:
[0159] These basic data represent the fundamental attributes of the stormwater drainage network and are invariants: including pipe length, pipe diameter, pipe slope, pipe top elevation, pipe bottom elevation, manhole ground elevation, manhole bottom elevation, and elevation at which stormwater is discharged into natural waterways.
[0160] 3. Parameters for which there is no basic data but there is guidance or recommended data and which require adjustment and verification:
[0161] 1) Total catchment area: The total drainage area contributed to the inspection well.
[0162] 2) Surface runoff area: The surface runoff area along the pipeline connected to the manhole.
[0163] 3) Slope of surface runoff area: The average slope of surface runoff area.
[0164] 4) Effective runoff coefficient: The effective runoff coefficient allocated to the surface runoff area.
[0165] 4. External dynamic parameters:
[0166] 1) Rainfall intensity (q): Rainfall intensity over the past T hours, including the current time.
[0167] 2) Water depth at the point of waterlogging (JH): The depth of water accumulation on the surface where waterlogging occurs under a certain rainfall intensity.
[0168] The second step is training the second long short-term memory neural network model:
[0169] 1. Data preprocessing:
[0170] Standardize the data so that the values of each feature are on the same scale.
[0171] Construct time series data, with each sample containing data from the past few time steps, to predict the water depth at the flood-prone points in the next time step.
[0172] 2. Model Building:
[0173] Define a second long short-term memory neural network model, which includes LSTM layers and fully connected layers.
[0174] LSTM layers are used to process time series data, and fully connected layers are used to output prediction results.
[0175] 3. Training process:
[0176] Set hyperparameters such as the number of input features, the number of hidden layer units, the number of LSTM layers, the learning rate, and the training cycle.
[0177] In each training cycle, training data is input into the model, and the loss between the predicted value and the target value is calculated.
[0178] Use an optimizer (such as Adam) to update the model parameters to minimize the loss.
[0179] 4. Prediction:
[0180] Input new rainfall event data to predict the depth of waterlogging points (JH) at street nodes.
[0181] Furthermore, in some preferred embodiments of the present invention, the LSTM model is constrained by the following formula:
[0182] 1. Input Gate: .
[0183] Where t is the activation vector of the input gate, and W i and R i These are the weight matrices for the input and the recurrent connection, respectively. i Let x be the bias vector. th is the input vector at the current time step. t-1 It is the hidden state of the previous time step.
[0184] 2. Forget Gate: .
[0185] Among them, f t W is the activation vector of the forget gate. f and R f These are the input and the weight matrices for the loop connection, respectively. f It is the bias vector.
[0186] 3. Output Gate: .
[0187] Among them, o t W is the activation vector of the output gate. o and R o These are the input and the weight matrices for the loop connection, respectively. o This is the bias vector.
[0188] 4. Cell State: .
[0189] Among them, c t This represents the cell state at the current time step. The candidate cell state is... This is an element-wise product.
[0190] 5. Hidden State: .
[0191] Among them, h t It is the hidden state of the current time step.
[0192] By using Long Short-Term Memory (LSTM) networks to process time-series data, it is possible to accurately predict the liquid level and fullness of stormwater drainage networks, as well as the depth of floodwater accumulation. LSTM models learn time-series features from historical data, effectively capturing the dynamic relationship between rainfall intensity and flood depth, thereby improving prediction accuracy.
[0193] Furthermore, in some preferred embodiments of the present invention, the parameters of the first long short-term memory neural network and the parameters of the second long short-term memory neural network both include: one long short-term memory layer, 10 hidden units, and a learning rate of 0.001.
[0194] Specifically, taking the simulation data shown in Table 4 as an example:
[0195] Table 4
[0196]
[0197] 1. Data preprocessing:
[0198] After standardizing the data, a time series is constructed. Input features: rainfall intensity, manhole liquid level, and pipe filling degree; Output target: water depth.
[0199] 2. LSTM model training:
[0200] Suppose we use one LSTM layer with 10 hidden units and a learning rate of 0.001. The model parameters are obtained after training.
[0201] Step S110: Input the rainfall event data into the flood prediction model and output the predicted water depth.
[0202] Specifically, taking the data shown in Table 4 above as an example, input new rainfall event data (e.g., rainfall intensity of 45 mm / h) to predict the water depth. Prediction result: Water depth is 50 cm (belonging to the severe waterlogging risk level).
[0203] By combining GMM clustering analysis and LSTM prediction results, the system dynamically assesses and issues early warnings for urban flooding risks. The system can set different prediction accuracies based on risk levels, ensuring more accurate predictions for high-risk areas and providing city managers with a scientific basis to help them take timely countermeasures.
[0204] This invention provides a flood prediction method, comprising: acquiring stormwater pipe network data; wherein the stormwater pipe network data includes: basic pipe network data, catchment area data, and historical precipitation data; performing cluster analysis based on the basic pipe network data to divide target locations within the stormwater pipe network into multiple cluster blocks; wherein the target locations include: manholes and stormwater pipes; each cluster block corresponds one-to-one with a cluster category; the cluster category characterizes the flood risk level of the cluster block; classifying the water depth within the cluster block according to multiple preset flood risk levels to determine the prediction accuracy corresponding to the cluster block; wherein different flood risk levels correspond to different water depths; training a basic flood prediction model based on the stormwater pipe network data within the cluster blocks until the prediction accuracy is reached, thereby obtaining the flood prediction model; wherein the basic flood prediction model includes: a first long short-term memory neural network sequentially connected to the target location. The system employs a first long short-term memory (LSTM) neural network and a second long short-term memory (LSTM) neural network. The input data for the first LSM is the stormwater pipe network data, and the output data is the liquid level in the manhole and the fullness of the stormwater pipes. The input data for the second LSM is the stormwater pipe network data, the liquid level in the manhole, and the fullness of the stormwater pipes, and the output data is the water depth. Rainfall event data is input into the flood prediction model, which outputs the predicted water depth. First, the nodes in the stormwater pipe network are clustered, dividing the network into multiple blocks according to different categories. Historical data from different blocks is used to train the prediction model, which includes a two-layer LSM neural network. The trained model possesses intelligent and automated data processing capabilities, meeting the needs for rapid response, especially in extreme cases when processing large-scale data, reducing computation time and improving response speed.
[0205] Example 2
[0206] Based on the above embodiments, this invention provides a flood forecasting device, see [link to previous embodiment]. Figure 2 The diagram shown is a structural schematic of a flood forecasting device provided in an embodiment of the present invention. The device includes:
[0207] The data acquisition module 310 is used to acquire data from the stormwater pipe network; the stormwater pipe network data includes: basic pipe network data, catchment area data, and historical precipitation data.
[0208] The clustering analysis module 320 is used to perform clustering analysis based on the basic pipeline network data, dividing the target locations within the stormwater pipeline network into multiple cluster blocks; among which, the target locations include: inspection wells and stormwater pipes; the cluster blocks correspond one-to-one with the cluster categories; the cluster categories represent the flood risk level of the cluster blocks;
[0209] The prediction accuracy determination module 330 is used to classify the water depth within the clustered blocks according to multiple preset waterlogging risk levels and determine the prediction accuracy corresponding to the clustered blocks; wherein, different waterlogging risk levels correspond to different water depths.
[0210] The flood prediction model determination module 340 is used to train a basic flood prediction model based on the stormwater pipe network data within the clustered blocks until the prediction accuracy is reached, thus obtaining the flood prediction model. The basic flood prediction model includes a first long short-term memory neural network and a second long short-term memory neural network connected in sequence. The input data of the first long short-term memory neural network is the stormwater pipe network data, and the output data is the liquid level height in the inspection well and the fullness of the stormwater pipe. The input data of the second long short-term memory neural network are the stormwater pipe network data, the liquid level height in the inspection well, and the fullness of the stormwater pipe, and the output data is the water depth.
[0211] The water depth prediction module 350 is used to input rainfall event data into the flood prediction model and output the predicted water depth.
[0212] Furthermore, in some preferred embodiments of the present invention, the clustering analysis module 320 is used to determine a preset proportion of target locations in the rainwater pipe network based on preset screening rules; determine the elevation difference of manholes and the fullness of rainwater pipes in the target locations; normalize the elevation difference of manholes and the fullness of rainwater pipes and use them as feature vectors; train a Gaussian clustering model based on the feature vectors until the preset conditions are met, and obtain the clustering results.
[0213] Furthermore, in some preferred embodiments of the present invention, the clustering analysis module 320 is used to initialize parameters; wherein the parameters include: mixture weights, mean, and covariance matrix; calculate the probability of a Gaussian distribution based on the eigenvectors; determine the posterior probability using the expectation-maximization algorithm based on the probability of the Gaussian distribution; update the parameters based on the posterior probability, and continue to recalculate the probability of the Gaussian distribution based on the eigenvectors until the change in the log-likelihood function of the Gaussian clustering model is less than a preset threshold or reaches a preset number of iterations; perform clustering analysis on the eigenvectors to obtain the clustering results.
[0214] Furthermore, in some preferred embodiments of the present invention, the log-likelihood function is constrained by the following formula: ;in, Let be the log-likelihood function. The k-th Gaussian distribution is located at x. i The probability density function at point K, where K is the number of Gaussian distributions. Let i be the feature vector of the i-th data point. These are the parameters of the Gaussian clustering model.
[0215] Furthermore, in some preferred embodiments of the present invention, the apparatus further includes: a model training module, used to determine a flood prediction model through the following steps: standardizing the data of the stormwater pipe network and constructing first training data based on time series; training a first long short-term memory neural network based on the first training data, and updating the parameters of the first long short-term memory neural network based on an optimizer until a preset training condition is reached; outputting the liquid level height in the inspection well and the fullness of the stormwater pipe based on the trained first long short-term memory neural network; standardizing the data of the stormwater pipe network, the liquid level height in the inspection well, and the fullness of the stormwater pipe, and constructing second training data based on time series; training a second long short-term memory neural network based on the second training data, and updating the parameters of the second long short-term memory neural network based on an optimizer until a preset training condition is reached; and outputting the water depth based on the trained second long short-term memory neural network.
[0216] Furthermore, in some preferred embodiments of the present invention, the parameters of the first long short-term memory neural network and the parameters of the second long short-term memory neural network both include: one long short-term memory layer, 10 hidden units, and a learning rate of 0.001.
[0217] Furthermore, in some preferred embodiments of the present invention, the apparatus further includes: a prediction accuracy determination module, used to sort multiple risk levels in ascending order; sort multiple prediction accuracies in ascending order; and correspond the sorted multiple risk levels with the sorted multiple prediction accuracies.
[0218] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the flood forecasting device described above can be referred to the corresponding process in the embodiments of the aforementioned flood forecasting method, and will not be repeated here.
[0219] Example 3
[0220] This invention also provides an electronic device for running a flood forecasting method; see [link to related documentation]. Figure 3 The diagram shown is a structural schematic of an electronic device provided by an embodiment of the present invention. The electronic device includes a memory 400 and a processor 401. The memory 400 is used to store one or more computer instructions, which are executed by the processor 401 to implement the above-mentioned flood prediction method.
[0221] Furthermore, Figure 3 The electronic device shown also includes a bus 402 and a communication interface 403. The processor 401, the communication interface 403 and the memory 400 are connected via the bus 402.
[0222] The memory 400 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 403 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 402 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0223] Processor 401 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 401 or by instructions in software form. Processor 401 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 400, and processor 401 reads information from memory 400 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0224] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the aforementioned flood prediction method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0225] The computer program products of the flood forecasting method, apparatus and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0226] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0227] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0228] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0229] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A flood forecasting method, characterized in that, include: Acquire data on the stormwater drainage network; wherein, the stormwater drainage network data includes: basic network data, catchment area data, and historical precipitation data; Cluster analysis is performed based on the basic pipeline network data to divide the target locations within the stormwater pipeline network into multiple cluster blocks; wherein, the target locations include: inspection wells and stormwater pipes; each cluster block corresponds one-to-one with a cluster category; the cluster category represents the flood risk level of the cluster block; Based on the water depth within the clustered blocks, the prediction accuracy corresponding to the clustered blocks is determined according to multiple preset waterlogging risk levels. A basic flood prediction model is trained based on the stormwater pipe network data within the clustered blocks until the prediction accuracy is achieved, thus obtaining the flood prediction model. The basic flood prediction model includes: a first long short-term memory neural network and a second long short-term memory neural network connected sequentially. The input data of the first long short-term memory neural network is the stormwater pipe network data, and the output data is the liquid level height in the inspection well and the fullness of the stormwater pipe. The input data of the second long short-term memory neural network are the stormwater pipe network data, the liquid level height in the inspection well, and the fullness of the stormwater pipe, and the output data is the water depth. Input rainfall event data into the flood prediction model to output the predicted water depth; The steps of performing cluster analysis based on the basic pipeline network data to divide the target locations within the stormwater pipeline network into multiple cluster blocks include: Based on preset screening rules, a preset proportion of target locations are determined in the rainwater pipe network; Determine the elevation difference of the inspection wells and the fullness of the rainwater pipes at the target location; The elevation difference of the inspection well and the fullness of the rainwater pipe are normalized and used as feature vectors. A Gaussian clustering model is trained based on the feature vectors until the preset conditions are met, and the clustering results are obtained.
2. The flood forecasting method according to claim 1, characterized in that, The steps for training a Gaussian clustering model based on the feature vectors until a preset condition is met, and obtaining the clustering results, include: Initialize parameters; wherein the parameters include: mixture weights, mean, and covariance matrix; Calculate the probability of the Gaussian distribution based on the eigenvectors; The posterior probability is determined using the expectation-maximization algorithm based on the probability of the Gaussian distribution. The parameters are updated based on the posterior probability, and the probability of calculating the Gaussian distribution of the feature vector is recalculated until the change in the log-likelihood function of the Gaussian clustering model is less than a preset threshold or the preset number of iterations is reached. Cluster analysis is performed on the feature vectors to obtain the clustering results.
3. The flood forecasting method according to claim 2, characterized in that, The log-likelihood function is constrained by the following formula: ; in, Let be the log-likelihood function. The k-th Gaussian distribution is located at x. i The probability density function at point K, where K is the number of Gaussian distributions. Let i be the feature vector of the i-th data point. represents the parameters of the Gaussian clustering model.
4. The flood forecasting method according to claim 1, characterized in that, The method further includes: determining the flood prediction model through the following steps: After standardizing the data of the rainwater pipe network, the first training data is constructed based on the time series. The first long short-term memory neural network is trained based on the first training data, and the parameters of the first long short-term memory neural network are updated based on the optimizer until the preset training conditions are met. Based on the first long short-term memory neural network that has been trained, the liquid level height in the inspection well and the fullness of the rainwater pipe are output. After standardizing the data of the rainwater pipe network, the liquid level in the inspection well and the fullness of the rainwater pipe, a second training data is constructed based on the time series. The second long short-term memory neural network is trained based on the second training data, and the parameters of the second long short-term memory neural network are updated based on the optimizer until the preset training conditions are met. The water depth is output based on the trained second long short-term memory neural network.
5. The flood forecasting method according to claim 4, characterized in that, The parameters of the first long short-term memory neural network and the parameters of the second long short-term memory neural network both include: one long short-term memory layer, 10 hidden units, and a learning rate of 0.
001.
6. The flood forecasting method according to claim 1, characterized in that, The method further includes: Sort the multiple risk levels in ascending order; The multiple prediction accuracies are sorted in ascending order; The sorted risk levels are correlated with the sorted prediction accuracies.
7. A flood forecasting device, characterized in that, include: The data acquisition module is used to acquire data from the stormwater drainage network; wherein, the stormwater drainage network data includes: basic network data, catchment area data, and historical precipitation data; The clustering analysis module is used to perform clustering analysis based on the pipeline network basic data, dividing the target locations within the stormwater pipeline network into multiple cluster blocks; wherein, the target locations include: inspection wells and stormwater pipes; the cluster blocks correspond one-to-one with the cluster categories; the cluster categories characterize the flood risk level of the cluster blocks; The prediction accuracy determination module is used to classify the water depth within the clustered blocks according to multiple preset waterlogging risk levels and determine the prediction accuracy corresponding to the clustered blocks; wherein, different waterlogging risk levels correspond to different water depths; A flood prediction model determination module is used to train a basic flood prediction model based on the stormwater pipe network data within the clustered blocks until the prediction accuracy is achieved, thereby obtaining the flood prediction model. The basic flood prediction model includes: a first long short-term memory neural network and a second long short-term memory neural network connected in sequence. The input data of the first long short-term memory neural network is the stormwater pipe network data, and the output data is the liquid level height in the inspection well and the fullness of the stormwater pipe. The input data of the second long short-term memory neural network are the stormwater pipe network data, the liquid level height in the inspection well, and the fullness of the stormwater pipe, and the output data is the water depth. The water depth prediction module is used to input rainfall event data into the flood prediction model and output the predicted water depth. The clustering analysis module is used to determine a preset proportion of target locations in the rainwater pipe network based on preset screening rules; determine the elevation difference of the manholes and the fullness of the rainwater pipes in the target locations; normalize the elevation difference of the manholes and the fullness of the rainwater pipes and use them as feature vectors; train a Gaussian clustering model based on the feature vectors until preset conditions are met, and obtain the clustering results.
8. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the flood forecasting method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the flood prediction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Waterlogging prediction model training method, waterlogging prediction model, waterlogging prediction method and storage device
CN113516203A
Urban flood deep learning prediction method considering disaster-pregnant environment clustering
CN116523114A