Attention-based deep learning urban flood affected population assessment method and system
By adopting a deep learning model of attention mechanism in the assessment of flood-affected population, the problems of low data processing efficiency and lack of adaptability in the existing technology are solved, and more efficient and accurate assessment of flood-affected population is achieved.
Patent Information
- Application Number
- CN202510311952.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-13
AI Technical Summary
The data processing and predictive analysis of flood-affected population assessment methods in the prior art are insufficient, and lack dynamic adjustment and adaptability, making it difficult to deal with complex nonlinear relationships and high-dimensional data.
The deep learning method based on attention is adopted, and the first deep learning model with multi-head self-attention module and the second deep learning model with convolutional block attention module are constructed, combining rainfall, terrain and pipeline data and satellite image data to predict the depth of floods and land use segmentation, and then a flood population exposure model is constructed to calculate the number of affected populations.
The accuracy and efficiency of assessment of flood depth hazards and land use vulnerability are improved, accurate simulation of urban flood events and refined identification of land use categories have been achieved, and the accuracy, reliability and effectiveness of assessment of urban flood-affected populations has been significantly improved.
Smart Images

Figure CN120146694A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of flood-affected population assessment, and more specifically, relates to an attention-based deep learning method and system for urban flood-affected population assessment. Background Art
[0002] Flood risk consists of hazard and vulnerability factors. Hazard is related to the physical characteristics of flood events (i.e., flood depth), and the vulnerability of the bearer is related to land use, reflecting the potential consequences caused by infrastructure, human life and property in the face of flood events. Compared with the traditional single flood depth assessment, more people begin to use the flood risk assessment method that combines flood depth and land use, which can not only show the scale of flood events, but also analyze the possible consequences, such as economic losses, affected population, etc., providing a more comprehensive understanding from the perspective of time and space. However, both flood hazard and vulnerability assessments are labor-intensive, time-consuming and laborious. There is an urgent need to develop an automated flood-affected population assessment method that combines attention modules and deep learning models to improve the accuracy and efficiency of flood depth hazard and land use vulnerability assessments, and further combine with the population exposure analysis model to quantify the number and spatio-temporal distribution of flood-affected population caused by urban floods, and improve the scientificity of urban flood prevention and emergency management decisions.
[0003] The prior art patent with the publication number CN115240076A proposes an urban waterlogging risk assessment algorithm based on satellite remote sensing image target recognition, including: Urban waterlogging point acquisition module: Obtain urban waterlogging point data through social media platforms, use ArcGIS software to obtain the longitude and latitude information of the waterlogging points, and obtain the corresponding satellite remote sensing images and elevation data from the TianDiWang and Geospatial Data Cloud platforms respectively according to the longitude and latitude information; Satellite remote sensing image feature extraction module: Input the satellite remote sensing image into a deep learning model, identify the target classes in the satellite remote sensing image, and take the sum of the pixel points of each identified target as the feature value of the urban waterlogging influencing factors; Elevation data extraction module: Download through the Geospatial Data Cloud platform to obtain the elevation tif data centered on the waterlogging point, and then extract the elevation value and relative elevation value of the waterlogging point, including six features such as water body, road, green space, elevation, etc.; Prediction and analysis module based on the XGBoost model: Integrate the obtained feature values and elevation values into a data set, train the XGBoost model, and analyze the influencing factors of urban waterlogging risk through the weights of each index. This scheme relies on a fixed XGBoost model and lacks dynamic adjustment and adaptive capabilities, so it lacks accuracy and flexibility in dealing with complex non-linear relationships and high-dimensional data. Summary of the Invention
[0004] To overcome the problems of insufficient efficiency in data processing and predictive analysis of flood - affected population assessment methods in the prior art, as well as the lack of dynamic adjustment and adaptability, the present invention provides an attention - based deep - learning urban flood - affected population assessment method and system.
[0005] The primary objective of the present invention is to solve the above - mentioned technical problems, and the technical solution of the present invention is as follows:
[0006] The first aspect of the present invention provides an attention - based deep - learning urban flood - affected population assessment method, including the following steps:
[0007] Collect rainfall, flood water depth, terrain, pipe network, and satellite image data of the research area;
[0008] Pre - process the collected rainfall, terrain, and pipe network data, and merge the pre - processed rainfall, terrain, and pipe network data with the flood water depth data into a first data set; pre - process the satellite image data to obtain a land - use image, merge the satellite image data and the land - use image into a second data set, and divide the first data set and the second data set into a training set, a validation set, and a test set according to a preset ratio respectively;
[0009] Construct a first deep - learning model with a multi - head self - attention module and a second deep - learning model with a convolutional block attention module. Use the first data set to train and validate the first deep - learning model, use the second data set to train and validate the second deep - learning model. Input the test set of the first data set into the trained and validated first deep - learning model to output a flood water depth prediction image, and input the test set of the second data set into the trained and validated second deep - learning model network to output a land - use segmentation image;
[0010] Overlay the flood water depth prediction image and the land - use segmentation image, match the flood water depth with the land - use category, re - assign the land - use category as population density. Construct a flood - affected population exposure model, calculate the number of exposed people in the flood situation, calculate the flood - affected population rate by combining the flood water depth with a preset flood - disaster loss curve, and multiply the number of exposed people by the flood - affected population rate to obtain the number of affected people, thus completing the assessment of urban flood - affected population.
[0011] Furthermore, the method for collecting satellite images is as follows: Use a digital map to download satellite image data, and perform format conversion and projection processing on it to obtain high - resolution satellite image data of the research area;
[0012] The method for collecting rainfall data of the research area is as follows: Use the Chicago rainfall pattern method to calculate the rainfall data of the research area, and the expression is as follows:
[0013]
[0014] Among them, q is the designed rainfall intensity, P is the design return period, and t is the rainfall duration. Substitute the design return period and rainfall duration into the regional rainfall intensity formula to calculate the specific rainfall data under different return periods and rainfall durations;
[0015] The method for collecting flood water depth data is as follows: Use a one-dimensional pipe network model and a two-dimensional surface model to simulate the flood water depth. The one-dimensional pipe network model calculates the runoff by the time-area method, solves the unsteady flow in the pipe network using the Saint-Venant equations, and outputs the pipe network flow data; Input the pipe network flow data into the two-dimensional surface model, and establish a surface water accumulation model in combination with the rectangular grid component; The one-dimensional pipe network model and the two-dimensional surface model are dynamically coupled to simulate the interaction between the pipe network and the surface, and simulate the urban waterlogging and flood water accumulation processes under given rainfall conditions to obtain the flood water depth data of the study area;
[0016] The method for collecting terrain and pipe network data is as follows: Input the terrain and pipe network data of the study area into the elevation data processing process, calculate the flow direction, catchment water depth, and terrain wetness index based on the characteristics of DEM data, and generate raster impermeability, weighted raster impermeability, and pipe network data in combination with the existing land use data, and output the complete terrain and pipe network dataset.
[0017] Furthermore, the method for preprocessing the collected rainfall, terrain, and pipe network data is as follows: Use the linear transformation method to normalize the rainfall, terrain, and pipe network data, calculate the minimum and maximum values of each feature, map the data to the range between 0 and 1, eliminate the dimensional differences between different features, and output the normalized rainfall, terrain, and pipe network data;
[0018] The method for preprocessing satellite image data is as follows: Use an image annotation tool to annotate different urban land use types in the satellite image data to obtain the annotated land use image.
[0019] Furthermore, the first deep learning model is a deep learning model that combines a temporal convolutional network, an HRNet semantic segmentation network, and a multi-head self-attention module. The training method of the first deep learning model includes the following steps:
[0020] Input the terrain and pipe network data of the first dataset training set into the HRNet semantic segmentation network to output spatial features; Input the rainfall data into the temporal convolutional network to output temporal features; Perform feature fusion on the spatial features and temporal features, calculate the attention distribution at different time steps through the multi-head self-attention module, and output the fused feature map;
[0021] Calculate the predicted flood water depth based on the fused feature map. By comparing the predicted value with the observed value, use the mean square error as the loss function to iteratively train the model, update the model parameters, plot the change of the loss curve during the training process, and monitor whether there is underfitting or overfitting in the model. When there is underfitting, increase the complexity of the deep learning model to enable the model to converge more effectively; when there is overfitting, use regularization techniques to reduce overfitting, or stop training in advance when the error starts to rise.
[0022] Input the validation set of the first dataset into the model, evaluate the model performance based on the first preset evaluation metric. If the evaluation passes, output the model; otherwise, adjust the model structure according to the validation result, retrain the model, and use the validation set to evaluate again until the model performance meets the requirements of the preset evaluation metric.
[0023] Use the verified model to test the test set of the first dataset and output the flood water depth prediction image.
[0024] Furthermore, the first preset evaluation metric includes mean absolute error, root mean square error, Nash-Sutcliffe efficiency, and Kling-Gupta efficiency.
[0025] Furthermore, the second deep learning model is a deep learning network combining the PSPNet model and the convolutional block attention module. The training method of the second deep learning model includes the following steps:
[0026] Input the satellite image data of the training set of the second dataset into the convolutional block attention module, and successively pass through the channel attention and spatial attention mechanisms to enhance the expression ability of important features, suppress irrelevant features, and output the feature map processed by the convolutional block attention module.
[0027] Input the feature map processed by the convolutional block module into the PSPNet model, capture multi-scale context information through the pyramid pooling module, and output the land use segmentation image.
[0028] Perform pixel-level comparison between the land use segmentation image and the land use image data in the training set of the second dataset, calculate the weighted cross-entropy loss value as the loss function to iteratively train the model, update the model parameters, plot the change of the loss curve during the training process, and monitor whether there is underfitting or overfitting in the model. If there is underfitting, adjust the hyperparameters to ensure that the model has enough time for training; if there is overfitting, use regularization techniques to reduce overfitting, or stop training in advance when the error starts to rise.
[0029] Input the second dataset validation set into the model, evaluate the model performance based on the second preset evaluation metric. If the evaluation passes, output the model; otherwise, adjust the model structure according to the validation result, retrain the model, and use the validation set to evaluate again until the model performance meets the requirements of the preset evaluation metric.
[0030] Use the verified model to test the second dataset test set and output the land use segmentation image.
[0031] Furthermore, the second preset evaluation metric includes pixel accuracy, mean pixel accuracy, mean intersection over union, frequency weighted intersection over union, and F1 score.
[0032] Furthermore, the method for calculating the affected population number caused by flood using the flood disaster loss curve includes the following steps:
[0033] Overlay the flood water depth hazard prediction image and the land use vulnerability segmentation image, perform coordinate correction on the image, and match each grid of flood water depth to a land use category.
[0034] Reassign the matched land use category to population density to obtain the population distribution map, calculate the exposed population number of each grid using the flood exposed population formula, and generate the exposed population distribution map.
[0035] Input the matched flood water depth into the preset flood disaster loss curve, calculate the urban flood affected population rate of each grid according to the water depth-population affected rate curve, and generate the population affected rate distribution map.
[0036] Multiply the exposed population distribution map by the population affected rate distribution map, output the affected population data caused by urban flood, and quantify the spatial distribution of flood population loss.
[0037] Furthermore, the construction method of the preset flood disaster loss curve includes the following steps:
[0038] Use the flood affected information recorded in historical flood events to analyze the statistical relationship between the population affected rate and the flood.
[0039] Based on the analysis results of historical events, propose three types of flood hazard areas according to the population risk degree in different flood exposed areas. The three types of hazard areas are the flood embankment breakage area, the rapid flood rise area, and other affected areas.
[0040] According to the flood characteristics and regional characteristics of the three types of hazard areas, combined with the actual situation of the study area, propose the corresponding flood water depth-population affected rate curve for each type of hazard area.
[0041] In a second aspect of the present invention, there is provided a deep learning-based urban flood affected population assessment system with attention mechanism, including a memory and a processor. The memory includes a program for the deep learning-based urban flood affected population assessment method with attention mechanism. When the program for the deep learning-based urban flood affected population assessment method with attention mechanism is executed by the processor, it realizes the steps of a deep learning-based urban flood affected population assessment method with attention mechanism.
[0042] Compared with the prior art, the beneficial effects of the technical solution of the present invention are as follows:
[0043] The present invention uses a first deep learning model with a multi-head self-attention module (MSA) to predict the depth of urban flood water, improving the accuracy and efficiency of flood water depth risk assessment, reducing the calculation cost, and realizing accurate simulation of urban flood events; uses a second deep learning model with a convolutional block attention module to segment urban land use, improving the accuracy and efficiency of carrier vulnerability assessment, solving the problem of traditional manual data acquisition, and realizing refined identification of land use categories; through the setting of the attention module, the deep learning model in the present invention can flexibly adapt to new input data, dynamically optimize and adjust parameters according to the feedback of evaluation indicators, so as to improve the prediction effect and ensure that the model always performs optimally under the latest data conditions. Further construct a population exposure analysis model, combined with the flood disaster loss curve, to efficiently and automatically calculate the population loss caused by urban floods, significantly improving the accuracy, reliability and effectiveness of the assessment of urban flood affected population, meeting the decision-making needs of urban disaster prevention and mitigation, and having important engineering application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to make the objectives and technical solutions of the present invention clearer, the present invention provides the following drawings and descriptions:
[0045] Figure 1 It is a flowchart of the method provided by an embodiment of the present invention;
[0046] Figure 2 It is a schematic diagram of the first deep learning model provided by an embodiment of the present invention;
[0047] Figure 3 It is a schematic diagram of the second deep learning model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] In order to be able to more clearly understand the above objectives, features and advantages of the present invention, the present invention will be further described in detail below with reference to the drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.
[0049] In the following description, many specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention may be practiced in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited by the specific embodiments disclosed below.
[0050] Embodiment 1:
[0051] The present invention provides a method for evaluating the population affected by urban floods based on attention in deep learning, as Figure 1 shown in a flowchart of a method for evaluating the population affected by urban floods based on attention in deep learning. The specific steps are as follows:
[0052] S1: Collect rainfall, flood water depth, terrain, pipe network, and satellite image data of the research area.
[0053] More specifically, the method for collecting satellite images is as follows: Use a digital map to download satellite image data and perform format conversion and projection processing on it to obtain high-resolution satellite image data of the research area.
[0054] The method for collecting rainfall data of the research area is as follows: Use the Chicago rainfall pattern method to calculate the rainfall data of the research area. The expression is as follows:
[0055]
[0056] where q is the designed rainfall intensity, with the unit of (L / s) / hm 2 , P is the designed return period, with the unit of year, t is the rainfall duration, with the unit of minute. In this embodiment, the designed return period is selected from 1 to 100 years, and the rainfall durations are 2, 4, and 6 hours. Substitute the designed return period and rainfall duration into the regional rainfall intensity formula to calculate the specific rainfall data under different return periods and rainfall durations.
[0057] The method for collecting flood water depth data is as follows: Use a one-dimensional pipe network model and a two-dimensional surface model to simulate the flood water depth. The one-dimensional pipe network model calculates the runoff by the time-area method, solves the unsteady flow in the pipe network using the Saint-Venant equations, and outputs the pipe network flow data; input the pipe network flow data into the two-dimensional surface model, and establish a surface water accumulation model in combination with a rectangular grid component; dynamically couple the one-dimensional pipe network model and the two-dimensional surface model to simulate the interaction between the pipe network and the surface, and simulate the process of urban waterlogging and flood water accumulation under given rainfall conditions to obtain the flood water depth data of the research area.
[0058] The method for collecting terrain and pipe network data is as follows: Input the terrain and pipe network data of the research area into the elevation data processing process, calculate the flow direction, catchment water depth, and terrain wetness index based on the DEM data characteristics, generate raster impermeability, weighted raster impermeability, and pipe network data in combination with the existing land use data, and output a complete terrain and pipe network data set.
[0059] S2: Preprocess the collected rainfall, terrain, and pipe network data, and merge the preprocessed rainfall, terrain, and pipe network data with the flood water depth data into a first data set; preprocess the satellite image data to obtain a land use image, and merge the satellite image data and the land use image into a second data set. Divide the first data set and the second data set into a training set, a validation set, and a test set according to a preset ratio respectively.
[0060] More specifically, the method for preprocessing the collected rainfall, terrain, and pipe network data is as follows: Use the linear transformation method to normalize the rainfall, terrain, and pipe network data, calculate the minimum and maximum values of each feature, map the data to the range between 0 and 1, eliminate the dimensional differences between different features, and output the normalized rainfall, terrain, and pipe network data.
[0061] The method for preprocessing the satellite image data is as follows: Use purple, pink, blue, light blue, green, and light green to label different urban land use types in the satellite image data, including buildings, roads, water bodies, bare land, forest land, and farmland, and use yellow to label the background areas that are not the above land use types to obtain the labeled land use image.
[0062] The ratios of the training set, the validation set, and the test set of the first data set and the second data set are all 8:1:1, where 80% of the available data is used to train the deep learning network, 10% of the available data is used to verify the performance of the deep learning network, and 10% of the available data is used to test the performance of the deep learning network.
[0063] S3: Construct a first deep learning model with a multi-head self-attention module (MSA), use the training set of the first data set to train the first deep learning model, use the validation set to evaluate the network performance, input the test set into the trained and validated first deep learning model, and output the flood water depth prediction image.
[0064] More specifically, the first deep learning model is a deep learning model that combines a temporal convolutional network (TCN), an HRNet semantic segmentation network, and a multi-head self-attention module (MSA), such as Figure 2As shown, the terrain and pipe network data are processed by the HRNet semantic segmentation network to extract the regions of interest in the image data, improving the prediction accuracy of the network for the spatial distribution of floods. The rainfall data are processed by the TCN to identify the rainfall time series and capture the dynamic changes of rainfall over time, ensuring that the network can make predictions based on the time trend. To improve the network generalization performance, the MSA is introduced to process the time features, enabling the network to focus on the most relevant parts of the sequence and better understand the complex relationships in the rainfall sequence. The features processed by the TCN are connected to the HRNet semantic segmentation network to output the flood water depth data, obtaining the flood depth and scope. The principles of the TCN and HRNet are described separately below:
[0065] The TCN network is used to capture the time features in the rainfall sequence data. Compared with other recurrent neural networks that require gating mechanisms, the TCN can effectively extract the time-dependent information in the sequence data by stacking causal convolutions and dilated convolutions, with a simpler structure and lower computational cost. The core module of the TCN network is the residual module. The introduction of the residual connection method allows the network to transfer information between different layers, and one-dimensional convolutions are used for dimension matching, thus reducing the problem of information loss that may be caused by the increase in the number of layers.
[0066] The HRNet semantic segmentation network processes multi-scale features in parallel to ensure a high-resolution feature representation, effectively capturing the context spatial information in the input image. In this embodiment, the HRNet network constructs four parallel branches, each corresponding to a different resolution. The low-resolution branches introduce high-level semantic information, and the high-resolution branches retain the detailed information. The multi-scale features interact through repeated information exchange and fusion in the network, enabling the high-resolution branches to continuously receive rich semantic information from the low-resolution branches. Finally, the fused multi-scale features are output as a flood depth prediction map to complete accurate semantic segmentation.
[0067] The principle of the MSA attention is described below:
[0068] The MSA attention is introduced for the rainfall sequence to improve the network generalization ability. Compared with the single-head self-attention, the MSA enhances the network's expressive ability by using multiple attention heads to focus on different information subspaces, helping the network learn the relationships between different time steps and improving the flood prediction accuracy. The calculation formula for attention is as follows:
[0069]
[0070] where Q, K, and V are the query matrix, key matrix, and value matrix respectively, and d kIndicates the number of units in the hidden layer. In MSA, multiple independent linear mappings are performed on K and V using different parameter matrices, and then input into multiple parallel heads to perform the attention function operation. Subsequently, the calculation results of multiple similar heads are combined and linearly mapped to obtain the final output.
[0071] In this embodiment, the TCN-HRNet-MSA deep learning network is built using the MATLAB deep learning framework. The loss function is defined as the mean square error (MSE), and the adaptive moment estimation (Adam) is used as the optimizer for the TCN-HRNet-MSA network.
[0072] The training method of the first deep learning model includes the following steps:
[0073] Input the terrain and pipe network data of the training set of the first data set into the HRNet semantic segmentation network to output spatial features; input the rainfall data into the temporal convolutional network to output temporal features; in order to improve the network generalization performance, perform feature fusion on the spatial features and temporal features, calculate the attention distribution at different time steps through the multi-head self-attention module, and output the fused feature map.
[0074] Calculate the predicted flood water depth according to the fused feature map. By comparing the predicted value with the observed value, use the mean square error (MSE) as the loss function to iteratively train the model, update the model parameters, plot the change of the loss curve during the training process, and monitor whether there is underfitting or overfitting in the model. When there is underfitting, increase the complexity of the deep learning model, such as increasing the number of layers in the TCN network or the number of convolutional layers in the HRNet network, so that the model can converge more effectively; when there is overfitting, use regularization techniques, such as adding a Dropout layer to reduce overfitting, or stop training in advance when the error starts to rise.
[0075] Input the validation set of the first data set into the model, evaluate the model performance based on the first preset evaluation metrics. If the evaluation is passed, output the model; otherwise, adjust the model structure according to the validation results, retrain the model, and use the validation set to evaluate again until the model performance meets the requirements of the preset evaluation metrics. The four evaluation metrics are the mean absolute error (MAE), the root mean square error (RMSE), the Nash-Sutcliffe efficiency (NSE), and the Kling-Gupta efficiency (KGE). When the four evaluation metrics of the model on the validation set reach a better level (such as MAE < 0.01, RMSE < 0.03, NSE > 0.90, KGE > 0.70), it can be considered that the model validation is passed.
[0076] The evaluation standard formula is as follows:
[0077] The expression of the mean absolute error (MAE) is:
[0078]
[0079] Among them, n is the number of verification samples; Qobs and Qsim are the observed value and the predicted value respectively.
[0080] The expression of the root mean square error (RMSE) is:
[0081]
[0082] Among them, n is the number of verification samples; Q obs and Q sim are the observed value and the predicted value respectively.
[0083] The expression of the Nash-Sutcliffe efficiency (NSE) is:
[0084]
[0085] Among them, n is the number of verification samples, Qobs and Qsim are the observed value and the predicted value respectively, is the average value of the observed values.
[0086] The expression of the Kling-Gupta efficiency (KGE) is:
[0087]
[0088] Among them, r is the Pearson correlation coefficient, which is 0.994 in this embodiment, α is the ratio of the average observed water depth to the average predicted water depth, and β represents the deviation of the observed water depth and the predicted water depth in terms of variability (the ratio of the standard deviation to the mean).
[0089] The evaluation criteria are that the closer MAE and RMSE are to 0, and the closer NSE and KGE are to 1, the better the prediction performance of the network. After verification, under the same experimental conditions, using the TCN-HRNet-MSA model adopted by the present invention and other existing deep learning networks, such as LSTM-FCN (Long Short-Term Memory Network-Fully Convolutional Network), LSTM-UNet (Long Short-Term Memory Network-U-Net), and LSTM-SegNet (Long Short-Term Memory Network-Segmentation Network), to perform the task of predicting flood water depth simultaneously, the comparison results of the four evaluation indicators are shown in Table 1 below:
[0090] Table 1
[0091] Deep learning network MAE RMSE NSE KGE LSTM-FCN 0.009 0.033 0.952 0.703 LSTM-UNet 0.009 0.026 0.950 0.691 LSTM-SegNet 0.008 0.027 0.971 0.739 TCN-HRNet-MSA 0.007 0.025 0.973 0.750
[0092] As can be seen from the table, all four indicators of the TCN-HRNet-MSA used in this solution show optimal performance. Specifically, it has the lowest MAE and RMSE values, indicating the smallest prediction error; at the same time, its NSE and KGE values are also the highest, which means it is more accurate and effective in the task of predicting flood water depth. Therefore, the TCN-HRNet-MSA model performs better than the other three models in the task of predicting flood water depth hazards.
[0093] Use the verified model to test the test set of the first dataset and output the flood water depth prediction image.
[0094] S4: Construct a second deep learning model with a convolutional block attention module, use the training set of the second dataset to train the second deep learning model network, use the validation set to evaluate the network performance, and input the test set into the trained and verified second deep learning model network to output the land use segmentation image.
[0095] More specifically, the second deep learning model is a deep learning network CBAM-PSPNet that combines the PSPNet model and the convolutional block attention module (CBAM), as Figure 3 shown. The principle of the PSPNet model is described below:
[0096] PSPNet is a deep learning model designed specifically for semantic segmentation. It adopts and optimizes the pyramid pooling module to enhance the perception ability of satellite scene information at different scales. The model uses a deep convolutional neural network to extract high-level features of the image. Subsequently, multi-scale pooling is performed on the feature map in the pyramid pooling module, and pooling kernels with sizes of 1×1, 2×2, 3×3, and 6×6 are used respectively to capture context information from global to local. The pooled features are dimensionally compressed through a convolutional layer and upsampled to restore the size of the original feature map. Finally, they are concatenated and fused with the features extracted by the backbone network to generate the final land use segmentation result.
[0097] The principle of the convolutional block attention module (CBAM) is described below:
[0098] The CBAM module improves the generalization ability and long-range dependence ability of the network, helps the network adaptively learn the significant information in the channel and spatial dimensions of the feature map, and reduces the attention to irrelevant information. CBAM consists of two parts: channel attention and spatial attention, which optimize the feature map in sequence. First, the channel attention module performs global pooling on the input features and passes the result to the fully connected layer to generate the channel attention weights. Subsequently, the spatial attention module performs pooling on the channel-weighted feature map in the channel dimension, splices the results and feeds them into the convolutional layer to generate the spatial attention weights. Finally, the final output feature map is obtained by multiplying the channel attention weights and the spatial attention weights.
[0099] In this embodiment, the CBAM-PSPNet deep learning network is built using the MATLAB deep learning framework, the loss function is defined as weighted cross entropy (WCE), and stochastic gradient descent with momentum (SGDM) is used as the optimizer for the CBAM-PSPNet network.
[0100] The training method of the second deep learning model includes the following steps:
[0101] Input the satellite image data of the second dataset training set into the convolutional block attention module (CBAM), and sequentially pass through the channel attention and spatial attention mechanisms to enhance the expression ability of important features, suppress irrelevant features, and output the feature map processed by the convolutional block attention module.
[0102] Input the feature map processed by the convolutional block module into the PSPNet model, capture multi-scale context information through the pyramid pooling module, and output the land use segmentation image.
[0103] Perform pixel-level comparison between the land use segmentation image and the land use image data in the second dataset training set, calculate the weighted cross entropy (WCE) loss value as the loss function to iteratively train the model, update the model parameters, plot the change of the loss curve during training, and monitor whether there is underfitting or overfitting in the model. If there is underfitting, adjust the hyperparameters, such as increasing the number of training epochs or decreasing the learning rate, to ensure that the model has enough time for training; if there is overfitting, use regularization techniques, such as adding a Dropout layer to reduce overfitting, or stop training in advance when the error starts to rise.
[0104] Input the second dataset validation set into the model, evaluate the model performance based on the second preset evaluation metric. If the evaluation passes, output the model; otherwise, adjust the model structure according to the verification result, retrain the model, and use the validation set for evaluation again until the model performance meets the requirements of the preset evaluation metric. The five evaluation criteria are Pixel Accuracy (PA), Mean Pixel Accuracy (mPA), Mean Intersection over Union (mIoU), Frequency Weighted Intersection over Union (fwIoU), and F1-score. When the five evaluation metrics of the model on the validation set reach a relatively good level (e.g., PA > 0.70, mPA > 0.75, mIoU > 0.55, fwIoU > 0.50, F1-score > 0.50), it can be considered that the model verification passes.
[0105] The formulas for the evaluation criteria are as follows:
[0106] The expression for Pixel Accuracy (PA) is:
[0107]
[0108] Among them, TP represents the number of pixels correctly classified as the positive class, TN represents the number of pixels correctly classified as the negative class, FP represents the number of pixels misclassified as the positive class, and FN represents the number of pixels misclassified as the negative class.
[0109] The expression for Mean Pixel Accuracy (mPA) is:
[0110]
[0111] Among them, TP represents the number of pixels correctly classified as the positive class, TN represents the number of pixels correctly classified as the negative class, FP represents the number of pixels misclassified as the positive class, and FN represents the number of pixels misclassified as the negative class.
[0112] The expression for Mean Intersection over Union (mIoU) is:
[0113]
[0114] Among them, N is the number of land use categories, Area of overlap is the area of the intersection between the prediction result and the ground truth label, Area of union is the area of the union of the prediction result and the ground truth label (i.e., the total area of the predicted region and the ground truth label, with duplicates removed). IoU calculates the ratio of the intersection area to the union area, representing the degree of overlap. The higher the IoU value, the better the match between the prediction and the ground truth label.
[0115] The expression for Frequency Weighted Intersection over Union (fwIoU) is:
[0116]
[0117] Among them, TP represents the number of pixels correctly classified as the positive class, TN represents the number of pixels correctly classified as the negative class, FP represents the number of pixels misclassified as the positive class, FN represents the number of pixels misclassified as the negative class, and mIoU is the mean intersection over union.
[0118] The expression of the F1 score is:
[0119]
[0120] Among them, TP represents the number of pixels correctly classified as the positive class, TN represents the number of pixels correctly classified as the negative class, FP represents the number of pixels misclassified as the positive class, FN represents the number of pixels misclassified as the negative class, Precision represents the precision rate, and Recall represents the recall rate.
[0121] The evaluation criteria are that the closer PA, mPA, mIoU, fwIoU, and F1-score are to 1, the better the segmentation performance of the network. After verification, under the same experimental conditions, using the CBAM-PSPNet adopted in the present invention, when performing the task of generating land use segmentation images simultaneously with other existing deep learning networks, such as the Fully Convolutional Network (FCN), the Unified Perceptual Parsing Network (UPerNet), the Bi-Segmentation Network Version 2 (BiSeNetV2), and the DeepLabv3+ Enhanced Version of the DeepLab Network, the comparison results of the five evaluation indicators are shown in Table 2 below:
[0122] Table 2
[0123] Deep learning network PA mPA mIoU fwIoU F1-score FCN 0.695 0.782 0.565 0.526 0.447 UPerNet 0.699 0.685 0.542 0.540 0.488 BiSeNetV2 0.649 0.666 0.493 0.484 0.445 DeepLabv3+ 0.702 0.785 0.577 0.536 0.493 CBAM-PSPNet 0.733 0.786 0.581 0.582 0.538
[0124] As can be seen from the table, all five indicators of the CBAM-PSPNet used in this solution show the best performance. Specifically, it has obtained the highest scores in pixel accuracy (PA), mean pixel accuracy (mPA), mean intersection over union (mIoU), frequency-weighted intersection over union (fwIoU), and F1 score (F1-score). This indicates that the CBAM-PSPNet network has higher accuracy and robustness in the land use segmentation task, can handle the land use segmentation problem more effectively, and provide more accurate segmentation results. Therefore, the CBAM-PSPNet network performs better than the other four networks in the task of generating land use segmentation image vulnerability.
[0125] Use the verified model to test the test set of the second dataset and output the land use segmentation image.
[0126] Through the overall architecture design of the first and second deep learning models, the models can automatically perform feature selection, weight adjustment, and parameter optimization when processing complex data, thereby achieving automated optimization during end-to-end training. The design of these modules, including the combination of the multi-head self-attention module (MSA) and the CBAM module, enables the models to self-adjust and optimize based on the training data without manual intervention, thus improving the accuracy, flexibility, and performance of the models.
[0127] S5: Superimpose the flood water depth prediction image and the land use segmentation image, match the flood water depth with the land use category, and re-assign the land use category as the population density. Construct a flood population exposure model, calculate the number of exposed people in the flood situation, calculate the flood population affected rate by combining the preset flood disaster loss curve with the flood water depth, multiply the number of exposed people by the population affected rate to obtain the number of affected people, and complete the assessment of the number of urban flood affected people.
[0128] The specific process is as follows:
[0129] Superimpose the flood water depth hazard prediction image and the land use vulnerability segmentation image, correct the coordinates of the images, and match each grid of the flood water depth with a land use category;
[0130] Re-assign the matched land use category as the population density to obtain a population distribution map, calculate the number of exposed people in each grid using the flood exposed population formula, and generate an exposed population distribution map;
[0131] Input the matched flood water depth into the preset flood disaster loss curve, calculate the urban flood population affected rate of each grid according to the water depth-population affected rate curve, and generate a population affected rate distribution map;
[0132] Multiply the exposed population distribution map by the population affected rate distribution map, output the data of the number of affected people caused by urban floods, and quantify the spatial distribution of flood population losses.
[0133] In this step, spatial overlay and probability statistical analysis are performed using the ArcGIS platform. First, the flood depth prediction image and the land use segmentation image are imported into the ArcGIS platform as flood hazard and vulnerability maps. Second, the projection coordinate system of the map is defined as the WGS1984 coordinate system using the projection tool in the ArcGIS platform to complete the map coordinate correction, ensuring that all map spaces are aligned and matching each flood water depth raster with a corresponding land use category. Then, using the reclassification tool in the ArcGIS platform, the land use map is re-assigned raster cell values according to land use categories to the population density corresponding to each type of land use, obtaining the population distribution map. Finally, the raster calculator tool in the ArcGIS platform is used for three operations: 1) Using the flood-exposed population formula as an algebraic expression and the population distribution map as a layer variable, calculate the exposed population number under each raster to obtain the exposed population distribution map; 2) Using the flood disaster loss curve (i.e., the flood water depth-population affected rate curve) as an algebraic expression and the flood depth map as a layer variable, calculate the urban flood population affected rate for different return periods under each raster to obtain the population affected rate distribution map; 3) Through a multiplication algebraic expression, using the exposed population distribution map and the population affected rate map as layer variables, calculate the urban flood affected population number for different return periods under each raster to obtain the affected population distribution map, quantifying the spatial distribution of flood population losses and completing the assessment of urban flood affected population.
[0134] In this embodiment, population density data of the research area is collected from multiple sources such as the National Bureau of Statistics, the Ministry of Housing and Urban-Rural Development, and the "14th Five-Year" Central Urban Area Housing Development Plan of Hohhot. The population density data corresponding to various land uses in the research area are as follows: the population density of the building category is 0.0293 people / m 2 ; the population density of the road category is 0.0776 people / m 2 ; the population density of the water body category is 0 people / m 2 ; the population density of the bare land category is 0 people / m 2 ; the population density of the forest land category is 0.0510 people / m 2 ; the population density of the farmland category is 0.0006 people / m 2 .
[0135] The flood-exposed population formula comprehensively considers factors such as the evacuation feasibility, shelter effectiveness, and rescue possibility in the research area, and calculates the population distribution exposed to floods. The expression is:
[0136] N EXP =(1 - F E )(1 - F S )N PAR -N RES
[0137] Among them, N EXP is the distribution of flood-exposed population to be calculated; N PAR is the total population in the risk area before the flood occurs, that is, the population density value obtained after the land use is re-assigned; F E is the proportion of the population successfully evacuated before the flood occurs. Considering that some residents cannot receive warning information in time, it is defined as 0.8 in this embodiment; F S is the proportion of the population successfully finding a shelter during the flood. Generally speaking, the population living in high-rise buildings with three floors or more will not be threatened by the flood. It is defined as 0.8 in this embodiment; N RES represents the number of rescued people. Since it is very difficult to carry out rescue during extreme floods, it is defined as 0 in this embodiment.
[0138] More specifically, the construction method of the preset flood disaster loss curve includes the following steps:
[0139] Use the flood disaster information recorded in historical flood events (including event characteristics such as causes, dates, location information, and flood characteristics such as the number of affected people, exposed people, and reported flood factors) to analyze the statistical relationship between the population disaster-affected rate and the flood. Historical flood events include some typhoon, storm surge, river flood, and mountain flood events from 1934 to 2002 in the United States, the United Kingdom, Japan, and the Netherlands;
[0140] Based on the analysis results of historical events, according to the population risk levels in different flood-exposed areas, three types of flood risk areas are proposed. The three types of risk areas are the flood embankment breakage area, the rapid flood rise area, and other affected areas. Among them, the flood in the flood embankment breakage area has the highest flow velocity and the highest product of water depth and flow velocity, which will cause the buildings in this area to collapse and the people in this area to be unstable; the flood water level in the rapid flood rise area will rise rapidly, and people cannot go to shelters or high-rise buildings for shelter; the flood in other affected areas develops slowly, and people have more time to evacuate and find shelters.
[0141] According to the flood characteristics (such as flood water depth, flood flow velocity, and water level rise rate) of the three types of risk areas and the regional characteristics (such as the possibility of people finding shelters), combined with the actual situation of the research area, the corresponding flood water depth-population disaster-affected rate curves for each type of risk area are proposed. This population disaster-affected rate curve is applicable to the relationship between different flood water depths and the population disaster-affected rate, reflecting the specific population loss situation of different land use types (such as buildings, roads, water bodies, bare land, forests, farmland) in the research area at different flood water depths. These curves can help accurately evaluate the losses of different land types during floods, and ultimately provide more targeted and accurate data support for the assessment of disaster-affected populations. The curve expressions are as follows:
[0142] The expression of the flood depth - population affected rate curve in the flood - control dike fracture area is as follows:
[0143] F D = 1
[0144] When dv ≥ 7 m 2 / s and v ≥ 2 m / s
[0145] The expression of the flood depth - population affected rate curve in the rapid - rising flood area is as follows:
[0146]
[0147] When (d ≥ 2.1 m and w ≥ 0.5 m / h) and (dv < 7 m 2 / s or v < 2 m / s)
[0148] The expression of the flood depth - population affected rate curve in other affected areas is as follows:
[0149]
[0150] When and (dv < 7 m 2 / s or v < 2 m / s)
[0151] Among them, F D is the population affected rate of urban flood, that is, the affected proportion of the people present when the flood occurs; Φ N represents the log - normal distribution; d is the flood depth, with the unit of meter; v is the flood flow velocity, with the unit of meter per second; w is the flood water level rising speed, with the unit of meter per hour. According to the expression, the population affected rate of each grid can be calculated. The population affected rates of the six types of land use are 80.3%, 7.2%, 0%, 0%, 12.4%, and 0.1% respectively. Further, by multiplying the exposed population distribution by the population affected rate, the number of affected people in each grid is calculated, and the number of affected people of the six types of land use is 1.179, 0.105, 0, 0, 0.182, and 0.002 people respectively, and the total number of affected people is 1.468 people. The present invention combines the flood disaster loss curve, calculates the population loss caused by urban flood efficiently and automatically, significantly improves the accuracy, reliability and effectiveness of the assessment of the affected population in urban flood, meets the decision - making requirements for urban disaster prevention and reduction, and has important engineering application value.
[0152] Example 2:
[0153] This embodiment provides an attention-based deep learning system for evaluating the population affected by urban floods, including a memory and a processor. The memory includes a program for an attention-based deep learning method for evaluating the population affected by urban floods. When the program for the attention-based deep learning method for evaluating the population affected by urban floods is executed by the processor, it implements the steps of an attention-based deep learning method for evaluating the population affected by urban floods as described in Embodiment 1.
[0154] Obviously, the above embodiments of the present invention are merely examples for clearly explaining the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A method for assessing the population affected by urban floods based on deep learning based on attention, characterized in that: The steps include: Collect data on rainfall, flood depth, topography, pipe networks and satellite images of the study area; Preprocessing the collected rainfall, terrain and pipe network data, and merging the preprocessed rainfall, terrain and pipe network data with the flood depth data into a first data set; Preprocessing the satellite image data to obtain a land use image, merging the satellite image data and the land use image into a second data set, and dividing the first data set and the second data set into a training set, a validation set, and a test set according to a preset ratio; Construct a first deep learning model with a multi-head self-attention module and a second deep learning model with a convolutional block attention module, use the first data set to train and verify the first deep learning model, use the second data set to train and verify the second deep learning model, input the first data set test set into the trained and verified first deep learning model, output the flood depth prediction image, input the second data set test set into the trained and verified second deep learning model network, and output the land use segmentation image; The flood depth prediction image and the land use segmentation image are superimposed, the flood depth and the land use category are matched, the land use category is reassigned as the population density, a flood population exposure model is constructed, the number of exposed population under the flood scenario is calculated, the flood population disaster rate is calculated using the preset flood disaster loss curve combined with the flood depth, the number of exposed population is multiplied by the population disaster rate to obtain the number of affected population, and the urban flood-affected population assessment is completed.
2. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 1, characterized in that: The method of collecting satellite images is: using digital maps to download satellite image data, and performing format conversion and projection processing on them to obtain high-resolution satellite image data of the study area; The method for collecting rainfall data in the study area is to use the Chicago rain pattern method to calculate the rainfall data in the study area. The expression is as follows: Among them, q is the design rainfall intensity, P is the design return period, and t is the rainfall duration. The design return period and rainfall duration are substituted into the regional rainfall intensity formula to calculate the specific rainfall data under different return periods and rainfall durations. The method for collecting flood depth data is as follows: using a one-dimensional pipe network model and a two-dimensional surface model to simulate the flood depth, the one-dimensional pipe network model calculates the runoff by the time-area method, and uses the Saint-Venant equations to solve the unsteady flow in the pipe network, and outputs the pipe network flow data; the pipe network flow data is input into the two-dimensional surface model, and a surface water accumulation model is established in combination with a rectangular grid component; the one-dimensional pipe network model and the two-dimensional surface model are dynamically coupled to simulate the interaction between the pipe network and the surface, and the urban waterlogging and flood accumulation process are simulated under given rainfall conditions to obtain the flood depth data of the study area; The method for collecting terrain and pipeline network data is as follows: input the terrain and pipeline network data of the study area into the elevation data processing flow, calculate the flow direction, catchment depth and terrain wetness index based on the DEM data characteristics, combine the existing land use data to generate raster impermeability, weighted raster impermeability and pipeline network data, and output a complete terrain and pipeline network data set.
3. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 1, characterized in that: The method for preprocessing the collected rainfall, terrain and pipe network data is as follows: normalize the rainfall, terrain and pipe network data using a linear transformation method, calculate the minimum and maximum values of each feature, map the data to a range between 0 and 1, eliminate the dimensional differences between different features, and output the normalized rainfall, terrain and pipe network data; The method for preprocessing satellite image data is: using an image annotation tool to annotate different urban land use types in the satellite image data to obtain an annotated land use image.
4. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 1, characterized in that: The first deep learning model is a deep learning model that combines a temporal convolutional network, an HRNet semantic segmentation network, and a multi-head self-attention module. The training method of the first deep learning model includes the following steps: The terrain and pipe network data of the first dataset training set are input into the HRNet semantic segmentation network to output spatial features; the rainfall data is input into the temporal convolutional network to output temporal features; the spatial features and temporal features are fused, and the attention distribution at different time steps is calculated through the multi-head self-attention module, and the fused feature map is output; The flood depth is predicted based on the fused feature map. The predicted value is compared with the observed value, and the mean square error is used as the loss function to iteratively train the model. The model parameters are updated, and the loss curve changes during the training process are plotted. The model is monitored for underfitting or overfitting. When underfitting occurs, the complexity of the deep learning model is increased to enable the model to converge more effectively. When overfitting occurs, regularization techniques are used to reduce overfitting, or training is stopped in advance when the error starts to rise. Input the first data set validation set into the model, evaluate the model performance based on the first preset evaluation index, and output the model if the evaluation verification passes; otherwise, adjust the model structure according to the verification result, retrain the model, and evaluate it again using the validation set until the model performance meets the preset evaluation index requirements; The validated model is used to test the first dataset test set and output flood depth prediction images.
5. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 4, characterized in that: The first preset evaluation indicators include mean absolute error, root mean square error, Nash-Sutcliffe efficiency and Kling-Gupta efficiency.
6. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 1, characterized in that: The second deep learning model is a deep learning network combining a PSPNet model and a convolutional block attention module, and the training method of the second deep learning model comprises the following steps: The satellite image data of the second dataset training set is input into the convolutional block attention module, and the channel attention and spatial attention mechanisms are used in turn to enhance the expression ability of important features, suppress irrelevant features, and output the feature map processed by the convolutional block attention module; Input the feature map processed by the convolution block module into the PSPNet model, capture multi-scale context information through the pyramid pooling module, and output the land use segmentation image; Compare the land use segmentation image with the land use image data in the training set of the second data set at the pixel level, calculate the weighted cross entropy loss value as the loss function to iteratively train the model, update the model parameters, plot the change of the loss curve during the training process, monitor whether the model is underfitting or overfitting, and if there is underfitting, adjust the hyperparameters to ensure that the model has enough time to train; if there is overfitting, use regularization technology to reduce overfitting, or stop training in advance when the error starts to rise; Input the second data set validation set into the model, evaluate the model performance based on the second preset evaluation index, and output the model if the evaluation verification passes; otherwise, adjust the model structure according to the verification result, retrain the model, and evaluate it again using the validation set until the model performance meets the preset evaluation index requirements; The validated model is used to test the second dataset test set and output a land use segmentation image.
7. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 6, characterized in that: The second preset evaluation indicators include pixel accuracy, average pixel accuracy, average intersection-over-union ratio, frequency-weighted intersection-over-union ratio and F1 score.
8. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 1, characterized in that: The method for calculating the number of people affected by floods using the flood disaster loss curve includes the following steps: Overlay the flood depth hazard prediction image and the land use vulnerability segmentation image, perform coordinate correction on the image, and match the flood depth of each grid to a land use category; The matched land use categories are reassigned to population density to obtain a population distribution map. The flood exposed population formula is used to calculate the number of exposed populations in each grid to generate an exposed population distribution map. The matched flood water depth is input into the preset flood disaster loss curve, and the urban flood population disaster rate of each grid is calculated according to the water depth-population disaster rate curve to generate a population disaster rate distribution map; The exposed population distribution map is multiplied by the population disaster rate distribution map to output the data on the affected population caused by urban floods and quantify the spatial distribution of flood population losses.
9. The method for assessing the population affected by urban floods based on deep learning based on attention according to claim 1, characterized in that: The method for constructing the preset flood disaster loss curve comprises the following steps: Using flood damage information recorded from historical flood events, the statistical relationship between population damage rate and floods was analyzed; Based on the analysis results of historical events, three types of flood risk areas are proposed according to the population risk levels of different flood-exposed areas. The three types of risk areas are flood levee break areas, rapid flood rise areas, and other affected areas. According to the flood characteristics and regional characteristics of the three types of dangerous areas and the actual situation of the study area, the corresponding flood depth-population disaster rate curve for each type of dangerous area is proposed.
10. A deep learning urban flood-affected population assessment system based on attention, characterized in that: The system includes: a memory and a processor, wherein the memory includes an attention-based deep learning urban flood-affected population assessment method program, and when the attention-based deep learning urban flood-affected population assessment method program is executed by the processor, the steps of an attention-based deep learning urban flood-affected population assessment method as described in any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Urban inland inundation risk assessment algorithm based on satellite remote sensing image target recognition
CN115240076A
Cited By
Urban flood disaster early warning method and system based on artificial intelligence
CN121191305A
An artificial intelligence-based urban flood disaster early warning method and system
CN121191305B
Urban inland inundation rapid prediction method based on deep learning
CN121525970A
Early warning method and system for rainstorm flood disasters based on extreme rainfall index
CN121861819A
Flood disaster population exposure calculation method and system based on spatial constraint
CN121882484A