Flood prediction method based on deep learning algorithm
By integrating flood sample data and geospatial data of numerical models, combined with deep learning models of RS-Mamba and ECA modules, the problem of difficulty in capturing the global characteristics of floods in the existing technology is solved, and higher-precision flood risk prediction is achieved, and the support for disaster management is enhanced.
Patent Information
- Application Number
- CN202411731870.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
AI Technical Summary
The existing flood disaster prediction methods are difficult to effectively capture the global characteristics in the formation and evolution of flood disasters, resulting in insufficient prediction accuracy.
By integrating flood sample data from one-dimensional and two-dimensional numerical models, combining geospatial data and rainfall data, a deep learning model is built, combining the global feature capture capability of the RS-Mamba model and the channel attention mechanism of the ECA module, a higher precision flood risk prediction is achieved.
Improve the accuracy and robustness of flood risk prediction, and can more effectively capture the global characteristics of flood disasters, thereby providing more reliable support for disaster management and emergency response.
Smart Images

Figure CN119623744A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of flood disaster prediction, and in particular to a flood prediction method based on a deep learning algorithm, which is used to construct a deep learning model to predict the risk of flood occurrence by integrating geographic spatial data, rainfall data and flood simulation data. Background Art
[0002] Flood disasters are important natural disasters that affect human life and economic development worldwide. In order to cope with flood disasters, traditional prediction methods are mainly based on physical models and numerical simulations, such as hydrological and hydrodynamic models such as HEC-HMS and HEC-RAS. Although these models can provide a certain degree of accuracy, they are often limited by computing time and the complexity of input data. In recent years, with the rapid development of deep learning algorithms, machine learning methods have been widely used in meteorology, river basin hydrology and other fields. Using deep learning models to combine geospatial data with rainfall data can provide more efficient and real-time flood prediction. Convolutional neural networks (CNNs) perform well in deep learning, especially in extracting local features of data, with translation invariance, and can gradually capture spatial information of different scales through stacked convolution operations. This feature gives CNNs a clear advantage in local feature extraction. However, the convolution operation of CNNs is based on local receptive fields, and it is usually difficult to directly capture the global features of data. Although the receptive field can be expanded by increasing the number of network layers or using dilated convolutions, CNNs still have limitations in capturing global information.
[0003] For flood prediction, capturing global features is crucial. The formation and evolution of flood disasters are affected by multiple factors such as climate, topography, watershed characteristics and rainfall patterns, and there is a global spatial dependency between these factors. For example, rainfall conditions upstream may directly affect water flow downstream, and topographic changes across watersheds may change the flow path and speed of water bodies. Models that rely only on local features are unlikely to fully reflect these complex spatial relationships. Summary of the invention
[0004] The purpose of this invention is to provide a flood prediction method based on a deep learning algorithm to cope with the increasingly serious flood disaster problem. By integrating flood sample data of one-dimensional and two-dimensional numerical models, combining geospatial data and rainfall data, a deep learning model is constructed, and the global feature capture capability of the RS-Mamba model and the channel attention mechanism of the ECA module are combined to achieve higher-precision flood risk prediction, thereby providing effective support for disaster management and emergency response.
[0005] The present invention proposes a flood prediction method based on a deep learning algorithm, and the specific steps are as follows:
[0006] Step 1: Obtain and process geospatial data and rainfall data, including digital elevation data with a resolution of 12.5 meters, land use type data with a resolution of 10 meters, and rainfall design data with different return periods (such as 3 years, 5 years, 10 years, etc.). These data are used to construct the training set.
[0007] Step 2: Input the acquired data into the numerical flood model, use the hydrological model (such as HEC-HMS) and the hydrodynamic model (such as HEC-RAS) to calculate the flood depth under different rainfall scenarios, and obtain the flood sample data.
[0008] Step 3: Preprocess the geospatial data, rainfall data, and flood sample data, calculate terrain characteristics (such as slope, aspect, curvature, roughness, etc.), align the data, and build a training database.
[0009] Step 4: Use the constructed training database to train the input rainfall data and geospatial data using the deep learning model to output the flood depth prediction map of the study area.
[0010] Step 5: Input the data to be predicted into the flood prediction model, obtain flood depth data, and complete flood prediction.
[0011] Furthermore, the geospatial data of step 1 includes digital elevation data with a resolution of 12.5 meters and land use type data with a resolution of 10 meters; the rainfall data is calculated using a designed rainfall process with different rainstorm intensities at different return periods (3 years, 5 years, 10 years, 20 years, 30 years, 50 years, and 100 years). It is calculated according to the rainstorm intensity calculation formula, which is as follows:
[0012]
[0013] Where: q——rainstorm intensity (unit: L / (S·hm 2 )); p——recurrence period (unit: a); t——rainfall duration (unit: min); A1——rainfall parameter (unit: mm); C——rainfall variation parameter; b——rainfall duration correction parameter (unit: min); n——rainfall attenuation index;
[0014] Furthermore, the step 3 of constructing a model training database specifically includes the following steps:
[0015] Step (I): Data preprocessing: Using Python programming tools, calculate terrain curvature, terrain aspect, terrain slope, and terrain roughness based on digital elevation data, and store rainfall data in a NumPy array file.
[0016] Step (ii): Data alignment: align the spatial resolution, coordinate system, and grid boundaries of land use data, flood data, and digital elevation data, and then raster stack the digital elevation data, land use data, terrain curvature data, terrain aspect data, and terrain slope data.
[0017] Step (three): Label data processing. Label data is classified based on flood depth (m), and three risk levels are set: light risk (depth < 0.3m), medium risk (0.3m <= depth < 1m), and heavy risk (depth >= 1m). Python is used to read label data and classify flood risk levels.
[0018] Step 4: Data segmentation: Use the sliding window method to segment the stacked raster data and flood sample data into raster blocks with a resolution of 256×256 for subsequent model training data input. Each segment block has a unique identifier to ensure that the input data matches the label data.
[0019] Step (V): Construct a training data set and store the segmented spatial data, rainfall sequence data, and flood sample data as image, sequence, and label folders, respectively. Based on the common practice of machine learning models, the data is divided into training set, validation set, and test set in a ratio of 8:1:1.
[0020] Furthermore, the data used to train the deep learning model in step 4 includes two modal data, one of which is spatial data consisting of digital elevation data, land use data, terrain curvature data, terrain aspect data, and terrain slope data; the other is rainfall sequence data. The model output is a flood depth map of the input area.
[0021] Furthermore, the present invention uses RS-Mamba to extract the features of spatial data, and introduces an ECA module between the coding layer OSS modules to generate a new module as the OSS-ECA module, thereby increasing the model's attention to important features, and using the RNN model to extract the temporal features of the rainfall sequence to output a flood risk prediction map, thereby improving the accuracy and robustness of the prediction.
[0022] Furthermore, the present invention adopts a feature fusion method to effectively combine the two modal data (spatial features and temporal features). The specific steps include: first, using the stacked OSS-ECA module in the encoding layer to extract the features of the spatial data, and the generated feature shape is C1×W×H; second, using the LSTM model to extract the temporal features of the rainfall sequence data, and adjusting the output to C2×W×H; then, the two are fused by the splicing method to obtain a fused feature shape of (C1+C2)×W×H; by fusing the features of the corresponding layer of the encoder with the features of the decoding layer in the jump connection layer, the prediction result is finally obtained. Furthermore, the deep learning flood prediction model of the present invention can be combined with a meteorological monitoring system to obtain rainfall data in real time and make predictions in combination with geographic spatial information. The flood risk prediction map output by the model can be integrated into the GIS system to provide real-time warning and decision support for flood disaster prevention and mitigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flow chart of the method of the present invention, showing the overall process from data processing to model training and prediction.
[0024] Figure 2 It is the deep learning model framework of the present invention.
[0025] Figure 3 A comparison chart of the actual label and predicted results of flood risk. Specific embodiments
[0026] The specific implementation method and effect of the invention will be described in detail below with reference to the accompanying drawings.
[0027] A flood prediction method based on deep learning algorithm adopts the method of spatiotemporal feature fusion, integrates geographic spatial features and temporal characteristics of rainfall series, constructs and trains deep learning models, and thus realizes flood prediction.
[0028] like Figure 1 As shown, it is a specific implementation flow chart of a flood prediction method based on a deep learning algorithm of the present invention, and the method is divided into the following steps:
[0029] Step 1: Acquire and process geospatial data and rainfall data. In this embodiment, Mentougou District, Beijing is selected as the research area.
[0030] The geospatial data obtained include 12.5-meter resolution digital elevation data (DEM) obtained from Earth Science Data and 10-meter resolution land use type data obtained from Environmental Systems Research Institute, Inc. The boundary vector data of Mentougou District was obtained from the Beijing Geographic Information Public Service Platform. The administrative boundary data of Mentougou District was used to clip the digital elevation data and land use type data. The 12.5-meter resolution DEM was selected because it provides sufficient accuracy to depict the topographic characteristics of the Mentougou area, especially the slope and watershed distribution. For land use data, 10-meter resolution land use data is sufficient to meet the spatial resolution requirements of the model, but in the future, higher resolution data (such as 5-meter resolution) can be considered to improve the prediction accuracy.
[0031] In order to simulate flood conditions with different return periods, this study used the design rainfall process calculated according to the Beijing rainstorm intensity formula, covering data with different return periods of 3 years, 5 years, and 10 years. The rainfall intensity of each return period is calculated for different precipitation durations (t) to construct the input data for different rainstorm scenarios. The formula is shown below.
[0032]
[0033] Where: q——rainstorm intensity (unit: L / (S·hm 2 )); p——recurrence period (unit: a); t——rainfall duration (unit: min);
[0034] Step 2: Input the acquired data into the numerical flood model to obtain flood sample data.
[0035] The hydrological model of this embodiment adopts the HEC-HMS model, and the hydrodynamic model adopts the HEC-RAS model.
[0036] The digital elevation model (DEM) processed in step 1 is added to the HEC-HMS model to calculate the hydrological data. The calculated hydrological data is input into the HEC-RAS model, and the digital elevation data is imported at the same time. On this basis, the land use type data is input, and the permeability coefficient and other related hydrological parameters are calculated using the SCS-CN (Soil Conservation Service Curve Number) method to generate the geospatial model of the Mentougou area.
[0037] The rainfall data with different return periods obtained in step 1 are input into the HEC-RAS model. Based on these rainfall data and the geometric spatial data of Mentougou, the corresponding rainfall experiment is designed to simulate the flood characteristics under rainfall with different return periods, and the flood depth map of the Mentougou area under various rainfall scenarios is obtained.
[0038] Step 3: Building a model training database includes the following steps.
[0039] Step (i): Data preprocessing: Use GIS tools to calculate terrain curvature, terrain aspect, terrain slope, and terrain roughness based on digital elevation data, and save the rainfall sequence data as a NumPy array file as the time feature input of the deep learning model.
[0040] Step (2): Data alignment: align the spatial resolution, coordinate system, and grid boundaries of land use data, flood data, and digital elevation data. Then, stack the digital elevation data, land use data, terrain curvature data, terrain aspect data, and terrain slope data as spatial input data for the deep learning model.
[0041] Step (three): Label data processing. Label data is classified based on flood depth (m), and three risk levels are set: light risk (depth < 0.3m), medium risk (0.3m <= depth < 1m), and heavy risk (depth >= 1m). Python is used to read label data and classify flood risk levels.
[0042] Step (IV): Data segmentation: Use the sliding window method to simultaneously segment the spatial input data and label data into grid blocks of 256×256 pixels. The sliding distance of the sliding window is 80% of the width (height) of the segmentation block. Each movement has a 20% overlap area, so that the deep learning model can better learn the boundary data and filter the segmentation data according to the number of pixels without data to avoid obtaining too much invalid data, thereby obtaining the spatial input data blocks and label data blocks at the same spatial position.
[0043] Step 5: Construct a training data set, name each segmented spatial input data, label data, and corresponding rainfall sequence data with the same name. Store them in the image, label, and sequence folders respectively. Based on the common practice of machine learning models, divide the data into training set, validation set, and test set in a ratio of 8:1:1.
[0044] Step 4: Deep learning model construction and training.
[0045] The model uses the architecture of the U-Net model, in which the convolution module of the encoder is replaced by the OSS module of the RS-Mamba model. The OSS module performs an all-round scan of the image and realizes spatial feature extraction and global context modeling of spatial input data through the state space model. This method introduces the ECA module between the OSS modules in the encoding layer to generate a new module called the OSS-ECA module, which suppresses noise and irrelevant information, reduces unnecessary computational overhead, and enhances the robustness of the model. The RNN module is used to process rainfall sequence data and capture the temporal characteristics of rainfall changing over time. By splicing rainfall sequence data with spatial features at the bottleneck layer, spatial data and temporal data can be effectively integrated to enhance the spatiotemporal prediction ability of the model. Figure 2 Shows the data flow of the model.
[0046] The shape of the spatial input data x1 of the model is (24, 5, 256, 256) (batch size, channels, height, width). The model uses the patch_embed module to process the spatial input data, and processes the data x1 into a shape of (24, 64, 64, 96) (batch size, height, width, channels). After encoder_block1, x1 is processed into x1_1 with a shape of (24, 64, 64, 96). After encoder_block2, x1_1 is processed into x1_2 with a shape of (24, 32, 32, 192). After encoder_block3, x1_2 is processed into x1_3 with a shape of (24, 16, 16, 384). After encoder_block4, the shape of x13 is (24, 8, 8, 768). Then, the shapes of x1_1, x1_2, x1_3, and x1_4 are adjusted to (batch size, height, width, channels). size, channels, height, width).
[0047] Use the RNN module to process the rainfall sequence data x2 (24, 36, 1) into the data x2_1 of (24, 64, 8, 8), and then splice x2_1 to the output x1_4 of the bottleneck layer, and output it as the data x1_4_rnn with a shape of (24, 832, 8, 8). The decoder consists of two parts, one is the upsampling module, and the other is the feature fusion module. x1_4_rnn and x1_3 are input into the decoder_block3 module, x1_4_rnn is upsampled and feature fused with x1_3, and the output data is decoder_3(24, 384, 16, 16), decoder_3 is upsampled and feature fused with x1_2, and the output data is decoder_2(24, 192, 32, 32), decoder_2 is upsampled and feature fused with x1_1, and the output data is decoder_1(24, 96, 64, 64), then decoder_1 is processed by the upsampling module and the convolution module, and the shape of the output data output is (24, 3, 256, 256), and finally the classification probability of each pixel is obtained through the softmax function, thereby realizing the prediction of the flood danger level of each pixel.
[0048] Step 5: Input the data to be predicted into the flood prediction model, obtain flood depth data, and complete flood prediction.
[0049] Figure 3 The output of the trained deep learning model is shown compared to the labels.
Claims
1. A flood prediction method based on deep learning algorithm, characterized in that: include: Step 1: Obtain and process geospatial data and rainfall data; the specific steps are: Step 1.1, obtain geospatial data, which includes digital elevation data with a resolution of 12.5 meters and land use type data with a resolution of 10 meters; Step 1.2: Rainfall data is obtained using the designed rainfall process, and the rainstorm intensity with different return periods (3 years, 5 years, 10 years, 20 years, 30 years, 50 years, and 100 years) is calculated. It is calculated according to the rainstorm intensity calculation formula. Taking Beijing District II as an example, the formula is as follows: Where: q-rainstorm intensity (unit: L / (S·hm 2 )); p-recurrence period (unit: a); t-rainfall duration (unit: min); A1: rainfall parameter (unit: mm); C-rainfall variation parameter; b-rainfall duration correction parameter (unit: min); n-rainstorm attenuation index; Step 2: Input the geospatial data and rainfall data into a flood numerical model (such as HEC-RAS) to simulate flood conditions under different rainfall scenarios and obtain flood depth sample data; the specific steps are: Step 2.1: Add the elevation data obtained in step 1.1 to the hydrological model to calculate the hydrological data. Step 2.2: Input the hydrological data calculated in step 2.1 and the geospatial data obtained in step 1 into the hydrodynamic model to generate a geospatial model of the study area. Step 2.3: Based on the rainfall data with different return periods calculated in step 1.2, a flood simulation experiment is designed to simulate the flood depth sample data under different rainfall scenarios. Step 3: Data processing and building model training data set; the specific steps are: Step 3.1: Data preprocessing, using Python programming tools, calculate the terrain curvature, terrain aspect, terrain slope, and terrain roughness based on the digital elevation data obtained in step 1.1, and store the rainfall data calculated in step 1.2 in a NumPy array file. Step 3.2: Data alignment, align the spatial resolution, coordinate system, and grid boundary of the land use data obtained in step 1.1 and the flood sample data calculated in step 2.3 with the digital elevation data in step 1.1, and then raster stack the digital elevation data, land use data, terrain curvature data, terrain aspect data, and terrain slope data to generate stacked geospatial data. Step 3.3: Label data processing, label data is classified based on flood depth (m), and three risk levels are set: low risk (depth < 0.3m), medium risk (0.3m <= depth < 1m), and severe risk (depth >= 1m). Python is used to read the flood depth sample data obtained in step 2.3 and classify the flood risk level. Step 3.4: Data segmentation: Use the sliding window method to segment the stacked geospatial data and flood sample data in step 3.2 into grid blocks with a resolution of 256×256 for subsequent model training data input. Each segmented block has a unique identifier to ensure that the input data matches the label data. Step 3.5: Construct a training data set, and store the stacked geospatial data, flood sample data, and rainfall data processed in step 3.1 as two-dimensional input data, labels, and one-dimensional input data in the image, label, and sequence folders, respectively. Based on the common practice of machine learning models, the data is divided into a training set, a validation set, and a test set in a ratio of 8:1:
1. Step 4: Model building set training; the specific steps are: Step 4.1: Model construction. The present invention uses RS-Mamba to extract the features of spatial data, and introduces the ECA module between the OSS modules in the coding layer to generate a new module called the OSS-ECA module, which improves the model's attention to important features, and uses the RNN model to extract the temporal features of the rainfall sequence to output a flood risk prediction map, thereby improving the accuracy and robustness of the prediction. The present invention uses a feature fusion method to effectively combine the two modal data (spatial features and temporal features). The specific steps include: first, using stacked OSS-ECA modules in the coding layer to extract the features of spatial data, and the generated feature shape is C1×W×H; Secondly, the LSTM model is used to extract the temporal features of the rainfall sequence data, and the output is adjusted to C2×W×H. Then, the two are fused through the splicing method to obtain a fused feature shape of (C1+C2)×W×H. Through the jump connection layer, the features of the corresponding layer of the encoder are fused with the features of the decoding layer to finally obtain the prediction result. Step 4.2: Model training, using the one-dimensional input data and the two-dimensional input data in step 3.5 as inputs of the flood prediction model, using the labels in step 3.5 as outputs of the flood prediction model, and training to obtain the flood prediction model; Step 5: Input the data to be predicted into the flood prediction model, obtain flood depth data, and complete flood prediction.
Citation Information
Cited By
Robot action prediction method and device, equipment and storage medium
CN120002675A
End-to-end drainage basin flood risk influence forecasting method based on physical constraint
CN121390891A