Fast prediction method for urban waterlogging based on deep learning
Through a deep learning-based method, urban areas are divided into multiple regions and SN-DL models are constructed, which solves the problem of difficulty in taking into account accuracy and real-time in the existing technology, and achieves high-precision and rapid urban flooding prediction.
Patent Information
- Application Number
- CN202311019804.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2043-08-14
AI Technical Summary
The existing urban flooding warning technology is difficult to take into account the accuracy and real-time of the model, and it fails to effectively simulate the two-dimensional ground flooding and reflux process of accumulated water.
Using a deep learning-based method, the region is divided into multiple regions through the image segmentation method SLIC, and the corresponding SN-DL model is constructed, each region is trained, and the prediction results of each region are integrated to obtain the prediction results of regional water accumulation.
The accuracy and speed of regional water accumulation prediction are improved, and the transient expression from input to output is achieved, with higher timeliness and faster and more accurate results of regional water accumulation prediction.
Smart Images

Figure CN117315318B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of urban rainwater system simulation, and particularly relates to a rapid urban waterlogging prediction method based on deep learning. Background Art
[0002] Due to climate change, increasing extreme weather, and rapid urban development, the urban waterlogging problem accompanied by heavy rain has seriously affected the normal operation of cities and damaged the lives and property safety of residents. Therefore, in order to alleviate waterlogging disasters and reduce losses caused by waterlogging, research on related technologies such as real-time monitoring means, systematic management methods, and waterlogging early warning technologies has gradually received attention.
[0003] The related research on urban waterlogging early warning technology was initially based on urban stormwater management models. By collecting topographic and geomorphic data, pipe network data, rainfall data, etc. of the region, modeling was carried out to conduct research on urban waterlogging simulation and early warning in this area. This method is mature in application, but the modeling process is limited by the understanding of hydrology and hydrodynamics, and usually cannot balance the accuracy and real-time performance of the model. With the development of cutting-edge technologies such as big data analysis, artificial intelligence, and machine learning, data-driven models based on deep learning architectures have entered the research field of urban waterlogging prediction and early warning technologies.
[0004] In the field of urban rainwater system research, some scholars have introduced deep learning models for the prediction of monitoring point liquid levels, system flows, etc., but generally there are problems such as a small amount of data in the training sample set and the accuracy of the data-driven model depending on the accuracy of the hydraulic model because the data set relies on hydraulic model simulation. Previous literature and patents have proposed methods for simulating rainfall runoff and one-dimensional pipe network confluence processes based on large data sets and methods for model correction according to monitoring data, but have not covered two-dimensional surface overland flow and backflow processes of ponding water. Therefore, corresponding methods need to be constructed for research. Summary of the Invention
[0005] The present invention is made to solve the above problems, and aims to provide a rapid urban waterlogging prediction method based on deep learning.
[0006] The present invention provides a rapid urban waterlogging prediction method based on deep learning, which is used to obtain the regional waterlogging prediction result at time t of a region according to the external inflow information and terrain information at time t of the region, and has the following characteristics, including the following steps: Step S1, dividing the region into each region according to the image segmentation method SLIC; Step S2, for each region, constructing a corresponding SN-DL model, and then using the existing terrain, external inflow and corresponding submerged water depth data of this region as training data to train the SN-DL model to obtain a trained SN-DL model; Step S3, for each region, inputting the external inflow time series L(t) of this region in the external inflow information and the regional terrain information H of this region in the terrain information into the corresponding trained SN-DL model to obtain the regional waterlogging prediction result at time t of this region; Step S4, integrating all the regional waterlogging prediction results at time t to obtain the regional waterlogging prediction result at time t. The network structure of the trained SN-DL model includes: a feature extraction module, which is used to extract features from the external inflow time series L(t) and the regional terrain information H to obtain a time series feature LM(t) and a spatial feature HP(t); a feature fusion module, which is used to fuse the time series feature LM(t) and the spatial feature HP(t) to obtain a fusion feature LH(t); an output module, which is used to obtain the regional waterlogging prediction result according to the fusion feature LH(t), wherein the feature extraction module includes an LSTM sub-module and an MLP sub-module. The LSRM sub-module is used to extract time series features from the external inflow time series L(t) to obtain the time series feature LM(t), and the MLP sub-module is used to extract spatial features from the regional terrain information H to obtain the spatial feature HP(t). The output module includes an MLP_A sub-module, a judgment sub-module and an MLP_B sub-module. The MLP_A sub-module is used to obtain the ground waterlogging position C(t) according to the fusion feature LH(t), and the judgment sub-module is used to judge whether there is waterlogging according to the ground waterlogging position C(t). If so, input the ground waterlogging position C(t) into the MLP_B sub-module. If not, use the regional non-waterlogging of the region as the regional waterlogging prediction result. The MLP_B sub-module is used to obtain the submerged water depth D(t) as the regional waterlogging prediction result according to the fusion feature LH(t) and the ground waterlogging position C(t). The external inflow information is the external inflow data of all nodes in the pipe network of the region at time t during rainfall, and the terrain information is the ground elevation data of the region.
[0007] In the method for rapid prediction of urban waterlogging based on deep learning provided by the present invention, it may further have the following characteristics: Among them, in the step S1, the parameters of the image segmentation method SLIC include the maximum number of iterations max_item of K-means, the number of labels n_segments in the segmented output image, and the balance of color proximity and spatial proximity compactness. The balance of color proximity and spatial proximity compactness and the number of labels n_segments are calculated by setting the objective function and constraint conditions.
[0008] In the method for rapid prediction of urban waterlogging based on deep learning provided by the present invention, it may further have the following characteristics: Among them, the specific setting of the objective function is: target2 = minmax(area j -area i ) i, j ∈ [1, Num], target3 = min p, where target1 is the first target, target2 is the second target, target3 is the third target, p is the proportion of the area with water accumulation, area i is the area of the i-th area with water accumulation after division, P is the total actual water accumulation area, Num is the total number of areas after division, and the constraint condition is set as: the average area of the divided areas is greater than 400m 2 , then the balance of color proximity and spatial proximity compactness = 0.6, and the number of labels n_segments in the cut output image = 100.
[0009] In the method for rapid prediction of urban waterlogging based on deep learning provided by the present invention, it may further have the following characteristics: Among them, the feature fusion module maps the spatial feature HP(t) through the activation function Sigmoid to obtain the encoded information, and then multiplies the encoded information with the temporal feature LM(t) correspondingly to obtain the fusion feature LH(t).
[0010] In the method for rapid prediction of urban waterlogging based on deep learning provided by the present invention, it may further have the following characteristics: Among them, the encoded information is a string of 0 or 1 encodings.
[0011] In the method for rapid prediction of urban waterlogging based on deep learning provided by the present invention, it may further have the following characteristics: Among them, the loss function used when training the SN-DL model is the loss function Lossfunc, and the expression of the loss function Lossfunc is: Lossfunc = α·MSELoss(D output , D) + β·BCELoss(C output , C) + λ·dis(Doutput , C output ), where α and β are hyperparameters used to adjust the learning rate to control the learning speed of different tasks, λ is a parameter used to balance the data loss term and the penalty term, MSELoss is the mean squared error, BCELoss is the binary cross-entropy loss, torch.gt(a, b) is to compare the magnitudes of matrices a and b element by element, with the result being 1 if greater and 0 if less than or equal, (·) is the dot product operation, D output is the inundation depth map output by the model, D is the simulated inundation depth map, C output is the ground inundation situation output by the model, and C is the simulated ground inundation situation.
[0012] Functions and Effects of the Invention
[0013] According to the deep learning-based rapid urban waterlogging prediction method of the present invention, since the region is divided into multiple regions by the image segmentation method SLIC, and the corresponding SN-DL model is constructed, and then each SN-DL model is trained using the training data, the training time of the model is reduced while the prediction accuracy of regional waterlogging is improved; the regional waterlogging prediction results are integrated to obtain the regional waterlogging prediction result, making the prediction result accurate while accelerating the entire prediction process, realizing the instantaneous expression from input to output, with higher timeliness. Therefore, the deep learning-based rapid urban waterlogging prediction method of the present invention can obtain the regional waterlogging prediction result more quickly and accurately. Description of the Drawings
[0014] Figure 1 is a schematic diagram of the topological structure of the pipe network in the JD area in the embodiment of the present invention;
[0015] Figure 2 is a schematic diagram of the process of obtaining the regional waterlogging prediction result in the embodiment of the present invention;
[0016] Figure 3 is a schematic diagram of the average inundation depth in the JD area in the embodiment of the present invention;
[0017] Figure 4 is a schematic diagram of the change result of the objective function value under different compactness and n_segments values in the embodiment of the present invention;
[0018] Figure 5 Schematic diagram of the regional division in the JD area in the embodiment of the present invention;
[0019] Figure 6 is a schematic diagram of the network structure of the SN-DL model in the embodiment of the present invention;
[0020] Figure 7It is a schematic diagram of the structure and working process of the feature extraction module in the embodiment of the present invention;
[0021] Figure 8 It is a schematic diagram of the working process of the feature fusion module in the embodiment of the present invention;
[0022] Figure 9 It is a schematic diagram of the structure and working process of the output module in the embodiment of the present invention;
[0023] Figure 10 It is a box diagram of six indicators in the embodiment of the present invention;
[0024] Figure 11 It is a schematic diagram of the rainfall data of the 57th rainfall in the embodiment of the present invention;
[0025] Figure 12 It is a comparison schematic diagram of the predicted inundation depth and the actual inundation depth in the embodiment of the present invention;
[0026] Figure 13 It is a schematic diagram of the framework and working process of the LSTM model in the embodiment of the present invention;
[0027] Figure 14 It is a schematic diagram of the framework and working process of the CNN model in the embodiment of the present invention;
[0028] Figure 15 It is a schematic diagram of the framework and working process of the MLP model in the embodiment of the present invention;
[0029] Figure 16 It is a comparison schematic diagram of the ACC, MAPE, CC, and NSE box plots of each model in the embodiment of the present invention. Specific embodiments
[0030] In order to make the technical means, creative features, achieved purposes, and effects of the present invention easy to understand, the following embodiments will specifically describe the urban waterlogging rapid prediction method based on deep learning of the present invention in conjunction with the accompanying drawings.
[0031] The urban waterlogging rapid prediction method based on deep learning of the present invention is used to obtain the regional waterlogging prediction result at time t of a region according to the external inflow information and terrain information at time t of the region. In this embodiment, the region is the JD region.
[0032] Among them, the external inflow information is the external inflow data of all nodes in the pipe network of the region at time t during rainfall, and the terrain information is the ground elevation data of the region.
[0033] Figure 1 It is a schematic diagram of the topological structure of the pipe network in the JD region in the embodiment of the present invention.
[0034] AsFigure 1 As shown, the dots are the nodes of the pipe network, and the line segments between two nodes are pipe segments. The pipe network in the JD area contains 340 nodes and 340 pipe segments, and among the 340 nodes, there are 4 water outlets.
[0035] Figure 2 It is a schematic flow chart of obtaining the regional waterlogging prediction result in the embodiment of the present invention.
[0036] As Figure 2 shown, obtaining the regional waterlogging prediction result includes the following steps:
[0037] Step S1, dividing the area into each region according to the image segmentation method SLIC.
[0038] Figure 3 It is a schematic diagram of the average inundation depth in the JD area in the embodiment of the present invention.
[0039] As Figure 3 shown, the abscissa and ordinate respectively represent the spatial position (x, y) of the JD area, and each pixel represents 1.14 m 2 , and the gray scale of the color block in the figure reflects the water depth degree. The deeper the inundation depth of a certain place, the closer the color of the corresponding position is to black. In this embodiment, the average inundation depth map of the JD area obtained under all existing rainfall scenarios is used as the regional map of the area to be divided.
[0040] Among them, in step S1, the parameters of the image segmentation method SLIC include the maximum number of iterations max_item of K-means, the number of labels n_segments in the segmented output image, and the balance of color proximity and spatial proximity compactness. The balance of color proximity and spatial proximity compactness and the number of labels n_segments are calculated by setting the objective function and constraint conditions.
[0041] The specific setting of the objective function is:
[0042]
[0043] target2 = min max(area j - area i ) i, j ∈ [1, Num],
[0044] target3 = min p,
[0045] In the formula, target1 is the first target, target2 is the second target, target3 is the third target, p is the proportion of the number of areas with waterlogging, area i$S_i$ is the area of the $i$-th waterlogged area after division, $P$ is the total actual waterlogged area, Num is the total number of areas after division, and the constraint condition is set as: the average area of the divided areas is greater than 400 m 2 , then the balance color proximity and spatial proximity compactness = 0.6, and the number of labels n_segments in the cut output image = 100.
[0046] Figure 4 It is a schematic diagram of the change results of the objective function values under different compactness and n_segments values in the embodiments of the present invention.
[0047] As Figure 4 shown, the abscissas of (a), (b) and (c) are all compactness values, and the ordinates are all objective function values. (a), (b) and (c) are the change situations of the objective function values corresponding to different compactness values under target1, target2 and target3 respectively. The abscissas of (d), (e) and (f) are all n_segments values, and the ordinates are all objective function values. (d), (e) and (f) are the change situations of the objective function values corresponding to different n_segments values under target1, target2 and target3 respectively. It can be seen that when the balance color proximity and spatial proximity compactness = 0.6 and the number of labels n_segments in the cut output image = 100, an ideal objective function value can be obtained.
[0048] Figure 5 Schematic diagram of the regional division of the JD area in the embodiments of the present invention.
[0049] As Figure 5 shown, the abscissa and ordinate respectively represent the spatial position (x, y) of the JD area, and each pixel represents 1.14 m 2 , and each irregular unit surrounded by thick black lines is the area of the JD area divided according to compactness = 0.6 and n_segments = 100.
[0050] Step S2, for each of the above areas, construct a corresponding SN-DL model, and then use the existing terrain, external inflow and corresponding inundation depth data of the area as training data to train the SN-DL model to obtain a trained SN-DL model.
[0051] Among them, the loss function used when training the SN-DL model 100 is the loss function Lossfunc, and the expression of the loss function Lossfunc is:
[0052] Lossfunc = α·MSELoss(D output , D) + β·BCELoss(C output , C) + λ·dis(D output , C output ),
[0053]
[0054] where α and β are hyperparameters used to adjust the learning rate to control the learning speed of different tasks, λ is a parameter used to balance the data loss term and the penalty term, MSELoss is the mean squared error, BCELoss is the binary cross-entropy loss, torch.gt(a, b) is to compare the magnitudes of matrices a and b element by element, with the result being 1 if greater and 0 if less than or equal, (·) is the dot product operation, D output is the inundation depth map output by the model, D is the simulated inundation depth map, C output is the ground inundation situation output by the model, and C is the simulated ground inundation situation.
[0055] In this embodiment, during the training of the SN-DL model, the designed model hyperparameters are shown in the following table:
[0056]
[0057]
[0058] In the table, the first column is the name of each hyperparameter, and the second column is the parameter setting corresponding to the hyperparameter. For example, the cell in the second column of the first row indicates that when the model training is less than 100 steps, the optimizer selects SGD (stochastic gradient descent) and the momentum is 0.95; when the training exceeds 100 steps, the optimizer is changed to AdamW.
[0059] Step S3, for each of the said regions, input the external inflow time series L(t) of the external inflow information of the region and the regional terrain information H of the region in the terrain information into the corresponding trained SN-DL model to obtain the regional water accumulation prediction result at the t-th moment of the region.
[0060] Figure 6 is the schematic diagram of the network structure of the SN-DL model in the embodiment of the present invention.
[0061] As Figure 6 shown, the network structure of the SN-DL model 100 includes a feature extraction module 10, a feature fusion module 20, and an output module 30.
[0062] Figure 7 is the schematic diagram of the structure and working process of the feature extraction module in the embodiment of the present invention.
[0063] As shown Figure 7 in FIG. 1, the feature extraction module 10 includes an LSTM sub-module 101 and an MLP sub-module 102, which are used to extract features from the external inflow time series L(t) and the regional terrain information H to obtain the time series feature LM(t) and the spatial feature HP(t). In this embodiment, the external inflow time series L(t) = {L 1 ,..., L k ,..., L N}, where N is the total number of nodes.
[0064] The LSRM sub-module 101 extracts time series features from the input external inflow time series L(t) to obtain the time series feature LM(t). h(t - 1) and h(t) are the hidden state parameters at times t and t - 1 respectively, and C(t - 1) and C(t) are the cell state parameters at times t - 1 and t respectively.
[0065] The MLP sub-module 102 is used to extract spatial features from the input regional terrain information H to obtain the spatial feature HP(t).
[0066] In this embodiment, the network structure parameters of the LSTM sub-module 101 and the MLP sub-module 102 are shown in the following table:
[0067] LSTM sub-module 101 MLP sub-module 102 Input unit Number of nodes with accumulated water Area of the region Number of network layers 2 1 Hidden layer units 512 - Output unit 512 512
[0068] The first row in the table is the name of each module. The second row to the fifth row are the parameter settings of the input unit, number of layers, hidden layer unit, and output unit of the corresponding module in sequence. For example, the cell in the third column of the second row indicates that the number of input units of the MLP sub-module 102 is the number of pixels of the area of this training region.
[0069] In this embodiment, during the training process of the SN-DL model 100, a noise layer is set before the LSRM sub-module 101 to add noise to the input external inflow to avoid overfitting of the model, thereby improving the generalization ability of the model.
[0070] The feature fusion module 20 is used to fuse the time series feature LM(t) and the spatial feature HP(t) to obtain the fused feature LH(t).
[0071] Figure 8 FIG. 2 is a schematic diagram of the working process of the feature fusion module in the embodiment of the present invention.
[0072] As shown Figure 8As shown, the feature fusion module 20 maps the spatial feature HP(t), that is, the feature matrix HP containing terrain information, through the activation function Sigmoid to obtain the encoded information. The encoded information is a string of 0s or 1s, that is, during the mapping process, the elements in the feature matrix HP are mapped to 0 - 1, and then the encoded information is multiplied element - wise with the temporal feature LM(t), that is, the matrix LM containing hydraulic information. Element - wise multiplication is performed for the corresponding elements between the two tensors of the encoded information and the temporal feature LM(t) to obtain the fused feature LH(t), that is, the fused feature matrix LH(t).
[0073] Figure 9 It is a schematic diagram of the structure and working process of the output module in the embodiment of the present invention.
[0074] As Figure 9 shown, the output module 30 includes an MLP_A sub - module 301, a judgment sub - module 302, and an MLP_B sub - module 303, and is used to obtain the regional waterlogging prediction result according to the fused feature LH(t).
[0075] The MLP_A sub - module 301 is used to perform task A: waterlogging judgment, that is, to obtain the ground waterlogging position C(t), that is, the waterlogging judgment result in the spatial position, according to the fused feature LH(t).
[0076] The judgment sub - module 302 is used to judge whether there is waterlogging at time t according to the ground waterlogging position C(t). If so, the ground waterlogging position C(t) is input into the MLP_B sub - module 303. If not, the area without waterlogging is used as the regional waterlogging prediction result.
[0077] The MLP_B sub - module 303 is used to perform task B: submerged water depth prediction, that is, to obtain the submerged water depth D(t) as the regional waterlogging prediction result according to the fused feature LH(t) and the ground waterlogging position C(t).
[0078] In this embodiment, the network structure parameters of the MLP_A sub - module 301 and the MLP_B sub - module 303 are shown in the following table:
[0079] MLP_A sub-module 301 MLP_B sub-module 303 Number of network layers 2 2 Hidden layer units 512 512 Dropout 0.1 0.1 Activation function Sigmoid LeakyReLU Output unit Area of the region Area of the region
[0080] The first row in the table is the name of each module, and the second row to the sixth row are the parameter settings of the corresponding module's number of layers, hidden layer units, Dropout (the probability of making a certain neuron stop working during forward propagation), activation function, and output unit in sequence. For example, the cell in the third column of the second row represents that the number of layers of the MLP_B sub - module 303 is 2.
[0081] In this embodiment, the external inflow information within T moments of S rainfall events in the JD area and the topographic information of the JD area are used as test data, and the test data is calculated according to the urban waterlogging rapid prediction method based on deep learning of the present invention to obtain a set of waterlogging prediction results. Then, it is compared with the actual ground waterlogging situation set in the JD area to calculate multiple indicators for verifying the effect of the present invention.
[0082] Among them,
[0083] In the formula, s is the number of rainfall events, t is the rainfall duration (min), p is the position of the p-th spatial point in the JD area, A is the total number of spatial points in the JD area, that is, the coverage range of the JD area. In addition, is in the same form as
[0084] The multiple indicators include accuracy ACC, false negative rate FNR, mean square error MSE, mean absolute percentage error MAPE, Pearson correlation coefficient CC, and Nash efficiency coefficient NSE. Among them, ACC and FNR are used to evaluate the accuracy of the waterlogging judgment results at spatial positions, and MSE, MAPE, CC, and NSE are used to evaluate the reliability of the waterlogging prediction results. The calculation formulas for these six indicators are as follows:
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093] In the formula, Conv(·) is the covariance, Var(·) is the variance, and E(·) is the mathematical expectation. is the number of rainfall events in which the waterlogging prediction result at spatial position p under rainfall duration t in all rainfall events is waterlogging and the actual waterlogging situation is waterlogging. is the number of rainfall events in which the waterlogging prediction result at spatial position p under rainfall duration t in all rainfall events is no waterlogging and the actual waterlogging situation is waterlogging. is the number of rainfall events where the predicted water accumulation at spatial position p for rainfall duration t in all rainfall events is water accumulation, but the actual water accumulation situation is no water accumulation. is the number of rainfall events where the predicted water accumulation at spatial position p for rainfall duration t in all rainfall events is no water accumulation, and the actual water accumulation situation is also no water accumulation.
[0094] According to the above index calculation formulas and test data, the scores of the six indexes are shown in the following table:
[0095] CC NSE MAPE MSE ACC FNR Median 0.6982 0.7159 0.4576 6.39E-06 99.00% 0.00% Mean - - 0.4885 6.90E-05 97.42% 5.36%
[0096] In the above table, the first row represents each index, the second row represents the median of each calculated index, and the third row represents the mean of each calculated index. For example, the cell in the second row and second column indicates that the median of the CC index is 0.6982.
[0097] Figure 10 is the box plot schematic diagram of the six indexes in the embodiment of the present invention.
[0098] As Figure 10 shown, from left to right are the box plots of ACC, FNR, MSE, MAPE, CC, and NSE drawn according to the calculation results of the test data. The vertical coordinates of each box plot are the values of the corresponding indexes. o is the mean, the dashed line is the median, the upper edge of the box is the upper quartile, that is, the 75% number when the data is sorted from small to large, the lower edge of the box is the lower quartile, that is, the 25% number when the data is sorted from small to large, the length of the box is the interquartile range IQR from the lower quartile to the upper quartile, the short line on the upper edge outside the box is the upper quartile + 1.5IQR, and the short line on the lower edge outside the box is the lower quartile - 1.5IQR.
[0099] In this embodiment, the rainfall data of an existing 57th rainfall event is input into the SN-DL model 100, and then a predicted inundation depth map is generated according to the obtained water accumulation prediction result, and compared with the actual inundation depth map generated from the actual water accumulation data.
[0100] Figure 11 is the schematic diagram of the 57th rainfall event data in the embodiment of the present invention.
[0101] As Figure 11 shown, the abscissa is the rainfall duration, with the unit of h, and the ordinate is the rainfall intensity, with the unit of mm / min. The rainfall peak in the 57th rainfall event is at the 30th minute, and the maximum value is 4.25 mm / min.
[0102] Figure 12 is the comparison schematic diagram of the predicted inundation depth and the actual inundation depth in the embodiment of the present invention.
[0103] As Figure 12As shown, on the left side of (a), (b), (c), (d), (e), and (f) is the submergence depth map, and on the right side is the color scale corresponding to the submergence depth. (a), (b), and (c) are the predicted submergence depth maps at the 30th minute, 60th minute, and 180th minute respectively, and (d), (e), and (f) are the actual submergence depth maps at the 30th minute, 60th minute, and 180th minute respectively. It can be seen that the predicted submergence depth maps at the three moments are basically similar to the corresponding actual submergence depth maps. Thus, it can be seen that in this embodiment, the regional waterlogging prediction results calculated by the deep learning-based urban waterlogging rapid prediction method of the present invention are basically consistent with the actual waterlogging data.
[0104] In this embodiment, based on the network structure of the SN-DL model 100, the traditional LSTM structure, CNN structure, and MLP structure are respectively used for structure replacement, thereby obtaining the LSTM model, CNN model, and MLP model respectively.
[0105] Figure 13 It is a schematic diagram of the framework and working process of the LSTM model in the embodiment of the present invention.
[0106] As Figure 13 shown, the LSTM model 200 includes an MLP sub-module 102, a traditional LSTM sub-module 104, a feature fusion module 20, and an MLP_B sub-module 303. Its working process is that the external inflow time series L(t) passes through the traditional LSTM sub-module 104 to obtain the time series feature LM(t), the regional terrain information H passes through the MLP sub-module 102 to obtain the spatial feature HP(t), then the feature fusion module 20 performs feature fusion to obtain the fusion feature LH(t), and finally it is input into the MLP_B sub-module 303 to obtain the submergence depth D(t) as the regional waterlogging prediction result.
[0107] Figure 14 It is a schematic diagram of the framework and working process of the CNN model in the embodiment of the present invention.
[0108] As Figure 14 shown, the CNN model 300 includes an MLP sub-module 102, a CNN sub-module 105, a feature fusion module 20, and an MLP_B sub-module 303. Its working process is that the external inflow time series L(t) passes through Reshape(40×40) and the CNN sub-module 105 in sequence to obtain the time series feature LM(t), the regional terrain information H passes through the MLP sub-module 102 to obtain the spatial feature HP(t), then the feature fusion module 20 performs feature fusion to obtain the fusion feature LH(t), and finally it is input into the MLP_B sub-module 303 to obtain the submergence depth D(t) as the regional waterlogging prediction result.
[0109] Figure 15It is a schematic diagram of the framework and working process of the MLP model in the embodiment of the present invention.
[0110] As Figure 15 shown, the MLP model 400 includes an MLP sub-module 102, a second MLP sub-module 106, a feature fusion module 20, and an MLP_B sub-module 303. Its working process is to sequentially obtain the time series feature LM(t) from the external inflow time series L(t) via Reshape(1,) and the second MLP sub-module 106, obtain the spatial feature HP(t) from the regional terrain information H via the MLP sub-module 102, then perform feature fusion via the feature fusion module 20 to obtain the fusion feature LH(t), and finally input it into the MLP_B sub-module 303 to obtain the inundation depth D(t) as the regional waterlogging prediction result.
[0111] In this embodiment, in order to realize the real-time prediction function of the model, the input data of the first 5 time steps are used in both the CNN model 300 and the MLP model 400 to predict the output of the current time step. Therefore, the external inflow time series L(t) is modified, and the formula for the modified external inflow time series L(t) is:
[0112]
[0113] In this embodiment, the parameter settings of the traditional LSTM sub-module 104, the CNN sub-module 105, and the second MLP sub-module 106 are shown in the following table:
[0114]
[0115]
[0116] The first column in the table is the name of each module, and the second to sixth columns are the input units, number of layers, activation function, hidden layer units, output units, and other parameter settings of the corresponding modules in sequence. For example, the cell in the third column of the second row represents that the number of layers of the traditional LSTM sub-module 104 is 2. In the table, T is the length of the time series, and the parameters of the traditional LSTM sub-module 104, the CNN sub-module 105, and the second MLP sub-module 106 that are not shown in the table are the same as those of the LSTM sub-module 101.
[0117] The performance of the LSTM model 200, the CNN model 300, and the MLP model 400 is compared with that of the SN-DL model 100. The ACC mean, MAPE mean, CC median, and NSE median of each model are calculated in the test data, and the results are shown in the following table:
[0118] ACC mean MAPE mean CC median NSE median SN-DL model 0.9705 0.2188 0.9612 0.9617 LSTM model 0.6500 0.6099 0.8604 0.8541 CNN model 0.6688 1.1863 0.0000 0.0000 MLP model 0.6871 1.1479 0.0000 0.0000
[0119] In the above table, the first column lists the names of each model. The second to fifth columns are the mean ACC, mean MAPE, median CC, and median NSE corresponding to each model in sequence. For example, the cell in the second column of the third row indicates that the mean ACC of model B in the test data is 0.6500. As can be seen from the above table, the ranking of the waterlogging prediction results of each model is: SN-DL model 100 > LSTM model 200 > CNN model 300 ≈ MLP model 400. It can be seen that the SN-DL model 100 has a better network structure compared to the existing methods, thus enabling a more accurate waterlogging prediction result.
[0120] Figure 16 It is a comparison schematic diagram of the ACC, MAPE, CC, and NSE box plots of each model in the embodiments of the present invention.
[0121] As Figure 16 shown, from left to right are the comparison schematic diagrams of the box plots of ACC, MAPE, CC, and NSE drawn according to the test data calculation results. A is the SN-DL model, B is the LSTM model, C is the CNN model, and D is the MLP model. The vertical coordinates of each box plot are the values of the corresponding indicators. o is the mean, the dashed line is the median, the upper edge of the box is the upper quartile, that is, the 75% number when the data is sorted from small to large, the lower edge of the box is the lower quartile, that is, the 25% number when the data is sorted from small to large, the length of the box is the interquartile range IQR from the lower quartile to the upper quartile, the short line on the upper edge outside the box is the upper quartile + 1.5IQR, and the short line on the lower edge outside the box is the lower quartile - 1.5IQR. It can be seen that compared with the traditional LSTM structure, CNN structure, and MLP structure, the network structure of the SN-DL model 100 has the best prediction effect.
[0122] Functions and effects of the embodiments
[0123] According to the method for rapid prediction of urban waterlogging based on deep learning involved in this embodiment, the region is divided into multiple areas by the image segmentation method SLIC, and the corresponding SN-DL models are constructed. Then, the training data is used to train each SN-DL model, reducing the model training time while improving the accuracy of regional waterlogging prediction; the regional waterlogging prediction results are integrated to obtain the regional waterlogging prediction result, making the prediction result accurate while accelerating the entire prediction process, realizing the instantaneous expression from input to output, and having higher timeliness. In short, this method can obtain the regional waterlogging prediction result more quickly and accurately.
[0124] The above embodiments are preferred cases of the present invention and are not used to limit the protection scope of the present invention.
Claims
1. A rapid urban waterlogging prediction method based on deep learning, which is used to obtain the regional waterlogging prediction result at time t of a region according to the external inflow information and terrain information at time t of the region. Characterized in that: It includes the following steps: Step S1, dividing the region into each area according to the image segmentation method SLIC; Step S2, for each of the areas, constructing a corresponding SN-DL model, and then using the existing terrain, external inflow and corresponding submerged water depth data of this area as training data to train the SN-DL model to obtain a trained SN-DL model; Step S3, for each of the areas, inputting the external inflow time series L(t) of this area in the external inflow information and the regional terrain information H of this area in the terrain information into the corresponding trained SN-DL model to obtain the regional waterlogging prediction result at time t of this area; Step S4, integrating all the regional waterlogging prediction results at time t to obtain the regional waterlogging prediction result at time t. Among them, the network structure of the trained SN-DL model includes: A feature extraction module, which is used to extract features from the external inflow time series L(t) and the regional terrain information H to obtain a time series feature LM(t) and a spatial feature HP(t); A feature fusion module, which is used to fuse the time series feature LM(t) and the spatial feature HP(t) to obtain a fused feature LH(t); An output module, which is used to obtain the regional waterlogging prediction result according to the fused feature LH(t). The feature extraction module includes an LSTM sub-module and an MLP sub-module. The LSTM sub-module is used to extract time series features from the external inflow time series L(t) to obtain the time series feature LM(t). The MLP sub-module is used to extract spatial features from the regional terrain information H to obtain the spatial feature HP(t). The output module includes an MLP_A sub-module, a judgment sub-module and an MLP_B sub-module. The MLP_A sub-module is used to obtain the ground waterlogging position C(t) according to the fused feature LH(t). The judgment sub-module is used to judge whether there is waterlogging according to the ground waterlogging position C(t). If so, input the ground waterlogging position C(t) into the MLP_B sub-module. If not, use the regional non-waterlogging of the region as the regional waterlogging prediction result. The MLP_B sub-module is used to obtain the submerged water depth D(t) as the regional waterlogging prediction result according to the fused feature LH(t) and the ground waterlogging position C(t). The external inflow information is the external inflow data of all nodes in the pipe network of the region at time t during rainfall. The terrain information is the ground elevation data of the region.
2. The rapid urban waterlogging prediction method based on deep learning according to claim 1, characterized in that: Among them, In the step S1, the parameters of the image segmentation method SLIC include the maximum number of iterations max_item of K-means, the number of labels n_segments in the segmented output image, and the balance of color proximity and spatial proximity compactness. The balance of color proximity and spatial proximity compactness and the number of labels n_segments are calculated by setting the objective function and constraint conditions.
3. The method for rapid prediction of urban waterlogging based on deep learning according to claim 2, wherein: Wherein, The specific setting of the objective function is: target2 = min max(area j - area i ) for i, j ∈ [1, Num] target3 = min p, In the formula, target1 is the first target, target2 is the second target, target3 is the third target, p is the proportion of the number of areas with water accumulation, area i is the area of the i-th area with water accumulation after division, P is the total actual water accumulation area, Num is the total number of areas after division, and the constraint condition is set as: the average area of the divided area is greater than 400 m 2 , Then the balance of color proximity and spatial proximity compacmess = 0.6, and the number of labels n_segments in the cut output image = 100.
4. The method for rapid prediction of urban waterlogging based on deep learning according to claim 1, wherein: Wherein, The feature fusion module maps the spatial feature HP(t) through the activation function Sigmoid to obtain encoded information, and then multiplies the encoded information with the temporal feature LM(t) correspondingly to obtain the fusion feature LH(t).
5. The method for rapid prediction of urban waterlogging based on deep learning according to claim 4, wherein: Wherein, The encoded information is a string of 0 or 1 codes.
6. The method for rapid prediction of urban waterlogging based on deep learning according to claim 1, wherein: Wherein, The loss function used when training the SN-DL model is the loss function Lossfunc, and the expression of the loss function Lossfunc is: Lossfunc = α·MSELoss(D output , D) + β·BCELoss(C output , C) + λ·dis(D output , C output ), where α and β are hyperparameters used to adjust the learning rate to control the learning speed of different tasks, λ is a parameter used to balance the data loss term and the penalty term, MSELoss is the mean squared error, BCELoss is the binary cross-entropy loss, torch.gt(a, b) is to compare the magnitudes of matrices a and b element by element, with values greater than 1 and less than or equal to 0, (·) is the dot product operation, D output is the inundation depth map output by the model, D is the simulated inundation depth map, C output is the ground inundation situation output by the model, C is the simulated ground inundation situation.
Citation Information
Patent Citations
High volume earth observation image processing
CN101493829A
Flood flow prediction method
CN112784479A