Urban time sequence flood rapid prediction method based on Swin Transform and hydrological hydrodynamic model

By combining Swin Transformer and hydrological and hydrodynamic model, the problems of high computational complexity and insufficient physical interpretation in urban flood simulation and prediction are solved, and fast and accurate flood prediction is achieved, providing efficient flood control decision support.

CN120387390APending Publication Date: 2025-07-29EAST CHINA NORMAL UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510433554.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In the urban flood simulation and prediction, the existing technology has problems such as high computational complexity, difficult parameter adjustment and insufficient physical interpretation of deep learning models in urban flood simulation and prediction, making it difficult to achieve rapid and accurate flood disaster prediction.

Method used

Combined with Swin Transformer and hydrological and hydrodynamic model, by acquiring multi-source data for preprocessing, a flood simulation model is constructed and multiple sets of rain-type data are designed. Swin Transformer is used to construct a flood prediction model, and dynamic flood prediction results are output. Combined with Bayesian optimization and remote sensing verification, the model accuracy and reliability are improved.

Benefits of technology

While maintaining high accuracy, the calculation time is significantly shortened, the real-time and reliability of flood prediction is improved, and it can adapt to variable climatic conditions and urban under-surface characteristics, providing a reliable basis for flood control scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387390A_ABST
    Figure CN120387390A_ABST
Patent Text Reader

Abstract

The invention relates to the field of urban flood prediction, and discloses an urban time sequence flood rapid prediction method based on a Swin Transform and a hydrological hydrodynamic model, and the method comprises the following steps: obtaining multi-source data of a target region, carrying out the preprocessing, and generating a standardized data set; constructing a flood simulation model based on the hydrological hydrodynamic model, and generating time sequence flood ponding depth data; designing multiple groups of rain pattern data, and driving the flood simulation model to generate diversified flood scenes; constructing a flood prediction model based on Swi n Transform, and training the model by using the flood scene data; and reasoning real-time rainfall data based on the flood prediction model, and outputting a dynamic flood prediction result. According to the method, through advantage complementation of the physical model and deep learning, the calculation efficiency is remarkably improved while the prediction precision is guaranteed, and efficient and reliable technical support is provided for urban flood control emergency and planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of urban flood prediction, and in particular to a method for rapid urban time-series flood prediction based on Swin Transformer and a hydrological and hydrodynamic model. Background Art

[0002] With the intensification of global climate change and the continuous acceleration of urbanization, urban flooding is becoming increasingly serious. Frequent extreme rainfall events lead to urban waterlogging, damage to infrastructure, disruption to residents' lives, and increased economic losses, posing a significant challenge to urban safety and sustainable development. Domestic and international scholars have conducted extensive research in the field of flood prediction and simulation. On the one hand, traditional physics-based flood simulation methods (such as LISFLOOD and MIKE models) use rigorous hydrophysical theory to describe rainfall, runoff, infiltration, and other processes in detail, providing an important basis for flood risk assessment and prevention. On the other hand, deep learning-based prediction methods, such as CNN and LSTM models, utilize big data and spatiotemporal feature extraction techniques to achieve fast and efficient flood simulation and prediction, meeting some of the needs for real-time early warning.

[0003] However, several pressing challenges remain in the field of urban flood simulation and prediction. First, while traditional physical models can accurately reproduce flood processes, their high computational complexity and difficulty in parameter tuning limit their real-time application in emergency situations. Second, while deep learning models offer rapid prediction speeds, they rely heavily on high-quality training data and are relatively inadequate in interpreting physical processes, making it difficult to fully capture the complex dynamics of flood disasters. Therefore, achieving rapid simulation and prediction of urban floods while maintaining accurate predictions has become a pressing challenge. Summary of the Invention

[0004] In response to the shortcomings of the existing technology, the present invention provides a rapid urban time-series flood prediction method based on Swin Transformer and hydrological and hydrodynamic models, aiming to improve the accuracy and real-time performance of urban flood simulation and reduce the computational complexity in the flood prediction process.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for rapid prediction of urban time series flooding based on Swin Transformer and hydrological and hydrodynamic models, comprising the following steps:

[0006] Acquire multi-source data of the target area and preprocess it to generate a standardized dataset;

[0007] Construct a flood simulation model based on the hydrological and hydrodynamic model to generate time-series flood water depth data;

[0008] Design multiple sets of rain pattern data to drive the flood simulation model to generate diverse flood scenarios;

[0009] Construct a flood prediction model based on Swin Transformer and train the model using the flood scenario data;

[0010] Infer the real-time rainfall data based on the flood prediction model and output the dynamic flood prediction results.

[0011] Preferably, the step of obtaining and preprocessing the multi-source data of the target area includes:

[0012] Perform missing value imputation and outlier removal on the multi-source data;

[0013] Unify the spatial data to a preset coordinate system and resolution;

[0014] Calculate the terrain parameters, soil parameters, and river channel parameters.

[0015] Preferably, in the step of calculating the terrain parameters, soil parameters, and river channel parameters:

[0016] The terrain parameters include surface gradient, flow direction data, and elevation standard deviation;

[0017] The soil parameters include Van Genuchten model parameters and saturated hydraulic conductivity;

[0018] The river channel parameters include Manning coefficient, river channel width, and floodplain width.

[0019] Preferably, the step of constructing a flood simulation model based on the hydrographic hydrodynamic model to generate time-series flood water depth data includes:

[0020] Solve the surface runoff and river channel confluence processes based on the hydrographic hydrodynamic equations;

[0021] Generate time-series flood water depth by combining physical parameters and rain pattern data.

[0022] Preferably, in the step of generating time-series flood water depth by combining physical parameters and rain pattern data, the Bayesian optimization algorithm is used to calibrate the parameters of the hydrographic hydrodynamic model, and the remote sensing data is used to verify the consistency of the inundation range.

[0023] Preferably, the step of designing multiple sets of rain pattern data to drive the flood simulation model to generate diverse flood scenarios includes:

[0024] Use the Chicago rain pattern method to design the storm hydrograph and divide the total rainfall duration into the pre-peak duration and the post-peak duration;

[0025] Based on the local rainstorm intensity formula for the target area, calculate the instantaneous rainfall intensities before and after the peak. The formula is as follows:

[0026]

[0027] where t b is the duration before the peak, t a is the duration after the peak, P is the rainstorm recurrence period, r is the rain peak position coefficient, and α, K, C, D are the parameters of the regional rainstorm formula;

[0028] Generate multiple sets of rainfall hyetographs covering different recurrence periods and rainfall durations as the input boundary conditions for the hydrological and hydrodynamic model.

[0029] Preferably, the steps of constructing the flood prediction model based on Swin Transformer include:

[0030] Construct a flood prediction model based on Swin Transformer. The input of the model includes time-series rainfall data and spatial feature parameters, and the output is the prediction result of the time-series water accumulation depth;

[0031] The flood prediction model includes:

[0032] Fusion layer: Perform dimensional fusion and compression on the time-series rainfall data and spatial feature parameters to generate multi-channel input features;

[0033] Swin Transformer block: Alternately extract spatio-temporal features through window multi-head self-attention and shifted window multi-head self-attention;

[0034] Transposed convolution decoder: Gradually restore the spatial resolution through transposed convolution operations and output the prediction result of the water accumulation depth at the preset grid resolution.

[0035] Preferably, the training steps of the flood prediction model based on Swin Transformer include:

[0036] Train the model using the time-series rainfall data and the corresponding flood water accumulation depth data, and optimize the model performance based on the automated hyperparameter search algorithm.

[0037] Preferably, the method further includes:

[0038] Steps of evaluating the accuracy of the flood prediction model using the root mean square error and the Nash efficiency coefficient.

[0039] The present invention also provides an urban time-series flood rapid prediction system based on Swin Transformer and a hydrological and hydrodynamic model, including:

[0040] Data preprocessing unit, used to process multi-source data and generate standardized parameters;

[0041] Flood simulation model unit, which generates flood scenario data based on a hydrological and hydrodynamic model;

[0042] Rain pattern generation unit, used to design multiple groups of rainfall hyetographs;

[0043] Flood prediction model unit, which uses the Swin Transformer algorithm to achieve fast prediction;

[0044] Result analysis and visualization unit, used for accuracy verification and dynamic result display.

[0045] The present invention provides a method for rapid urban temporal flood prediction based on the Swin Transformer and hydrological and hydrodynamic models. It has the following beneficial effects:

[0046] 1. By combining a high-precision hydrological model with a deep learning framework, the present invention realizes real-time prediction by utilizing the parallel computing power of deep learning while retaining the rigor of hydrological physical mechanisms. This method overcomes the limitation of long computing time of traditional physical models and avoids the distortion problem caused by pure data-driven models ignoring physical laws. Thus, while ensuring prediction accuracy, it significantly shortens the operation time and provides efficient support for emergency decision-making.

[0047] 2. The present invention adopts a deep learning architecture based on a window attention mechanism. By fusing multi-scale spatio-temporal features and modeling long-range dependencies, it accurately captures the dynamic laws of flood evolution. This mechanism can simultaneously analyze local waterlogging characteristics and global hydrological correlations, significantly improving the prediction ability of the spatio-temporal distribution of waterlogging depth under complex urban terrains, especially showing stronger robustness during the peak stage of heavy rain.

[0048] 3. Based on a standardized rain pattern design method, the present invention generates rainfall scenarios covering different extreme intensities and combines an automated hyperparameter search technique to dynamically optimize the model structure. This method enables the model to adapt to variable climate conditions and urban underlying surface characteristics, ensuring stable prediction performance in unknown rainfall events and geographical environments and providing a reliable basis for flood control scheduling in multiple scenarios.

[0049] 4. By integrating multi-dimensional data such as geography, meteorology, and soil, and generating key parameters based on hydrological physical formulas, the present invention constructs a highly reliable model input dataset. Combining with the Bayesian parameter calibration method, it significantly reduces the impact of parameter uncertainty on simulation results, provides training labels with clear physical meanings for deep learning models, and ensures the rationality of prediction results from the data source.

[0050] 5. The present invention intuitively demonstrates the evolution process of waterlogging depth through spatio-temporal dynamic visualization technology, and constructs a multi-dimensional verification system by combining statistical indicators and remote sensing inversion data. This method can not only quantify the prediction accuracy of the model, but also identify high-risk inundation areas and evolution paths, providing a decision-making basis with timeliness and scientificity for urban flood control planning and emergency response. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a schematic flow chart of the method of the present invention;

[0052] Figure 2 is a schematic diagram of evapotranspiration parameter calculation based on the LISVAP model in an embodiment of the present invention;

[0053] Figure 3 is a schematic diagram of the Bayesian parameter calibration process in an embodiment of the present invention;

[0054] Figure 4 is a schematic diagram of precipitation scenario generation in an embodiment of the present invention;

[0055] Figure 5 is a schematic diagram of the selected flood-prone area in an embodiment of the present invention;

[0056] Figure 6 is a schematic diagram of the waterlogging change process in an embodiment of the present invention;

[0057] Figure 7 is a schematic diagram of the flood simulation model in an embodiment of the present invention;

[0058] Figure 8 is a schematic diagram of the system structure of the present invention.

[0059] Among them, 10 is a data preprocessing unit; 20 is a flood simulation model unit; 30 is a rainfall pattern generation unit; 40 is a flood prediction model unit; 50 is a result analysis and visualization unit. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0060] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0061] Please refer to the attached Figure 1, the present invention provides a method for rapid prediction of urban temporal flood based on Swin Transformer and hydrological and hydrodynamic models. By integrating the high reliability of physical models and the fast inference ability of deep learning models, it solves the problems of low computational efficiency of traditional methods, poor physical interpretability of data-driven models, and difficulty in comprehensively reflecting the complex dynamics of flood disasters.

[0062] As Figure 1 shown, the method for rapid prediction of urban temporal flood based on Swin Transformer and hydrological and hydrodynamic models may include the following steps:

[0063] S1. Obtain multi-source data of the target area and perform preprocessing to generate a standardized data set;

[0064] S2. Build a flood simulation model based on the hydrological and hydrodynamic model to generate temporal flood water depth data;

[0065] S3. Design multiple groups of rainfall pattern data to drive the flood simulation model to generate diverse flood scenarios;

[0066] S4. Build a flood prediction model based on Swin Transformer and train the model using flood scenario data;

[0067] S5. Infer the real-time rainfall data based on the flood prediction model and output the dynamic flood prediction result.

[0068] The following is a detailed description of each step in the method of the present invention, comprehensively elaborating on the specific implementation principles, technical details, and processes for each step.

[0069] For step S1, in this embodiment, step S1 is used to preprocess and prepare parameters for the multi-source data of the target area to generate a standardized data set, providing an input basis for the subsequent hydrological and hydrodynamic models and deep learning models. The specific implementation method is as follows:

[0070] The multi-source data includes spatial distribution data and time series data. Specifically, the spatial distribution data at least includes digital elevation model (DEM), land use type, soil properties (such as clay content, silt content, sand content, organic carbon content), building height, and vegetation cover index; the time series data includes historical hourly rainfall observation data and measured flood water depth data.

[0071] In this embodiment, data quality control includes missing value imputation and outlier removal. Exemplarily, for the missing areas in the spatial data, Kriging interpolation method is used for filling to ensure the continuity of terrain and soil parameters; for the abnormal records in the time series data (such as sudden change of rainfall intensity to extreme values or negative water depth), they are removed based on the 3σ principle to avoid noise interfering with model training.

[0072] It should be noted that the differences in the spatial coordinate system and resolution of multi-source data will lead to inconsistent model inputs. To solve this problem, this embodiment realizes standardization through the following steps:

[0073] Coordinate system conversion: Use the GDAL tool to uniformly convert multi-source data to the Web Mercator projection coordinate system (EPSG: 3857). It can be understood that this coordinate system maintains the shape and direction unchanged under planar projection and is suitable for spatial analysis at the urban scale.

[0074] Resolution unification: Use the bilinear interpolation method to unify the data spatial resolution to a preset value (for example, 25 meters). As a possible implementation method, for discrete data such as land use types, the nearest neighbor interpolation method is preferably used to avoid category confusion.

[0075] In this embodiment, the calculation of terrain parameters is based on extracting terrain parameters from the digital elevation model (DEM), including surface gradient, flow direction data, and elevation standard deviation:

[0076] Depression filling: Use the ArcGIS Fill module to eliminate local depression areas in the DEM.

[0077] Surface flow direction and gradient: Based on the D8 algorithm, determine the flow direction parameter (ldd) of each pixel, and calculate the surface gradient according to the flow direction:

[0078]

[0079] where elvdiff is the elevation difference, pixelLength is the pixel length, and ldd is the flow direction parameter.

[0080] Elevation standard deviation: Calculate the elevation fluctuation of each pixel in the 3×3 neighborhood. The formula is:

[0081]

[0082] where N is the number of pixels within the specified range, and elv avg is the average elevation within the range.

[0083] In this embodiment, the calculation of soil parameters is based on extracting soil attributes from the national soil information grid dataset, and calculating the Van Genuchten model parameters and saturated hydraulic conductivity:

[0084] Saturated volumetric water content (Thetas):

[0085] Thetas = a - bD + cC + dS

[0086] Among them, D is the soil density, C and S are the percentage contents of clay and silt respectively, and a, b, c, and d are empirical coefficients.

[0087] Residual volumetric water content (Thetar): It is segmented and valued according to the sand content (Sand), and the formula is:

[0088]

[0089] Sand = 100 - S - C

[0090] The pore size index (Lambda) is used to quantify the comprehensive influence of the soil pore structure on water movement, and its calculation formula is:

[0091]

[0092] Among them, a1 to f1 are empirical coefficients, OC is the organic carbon content, T is the difference between topsoil and subsoil. FAO_2008 defines the topsoil as the 0 - 30 cm layer and the subsoil as the 30 - 100 cm layer. When the soil depth is within the defined range of the topsoil, T = 1, otherwise T = 0.

[0093] Van Genuchten parameter (Alpha): It is related to the soil organic carbon content (OC) and the layer identifier (T, 1 for topsoil and 0 for subsoil), and the calculation formula is:

[0094]

[0095] Among them, k0 to k5 are fitting coefficients.

[0096] Saturated hydraulic conductivity (KSat): It is calculated based on parameters such as soil pH value and cation exchange capacity (CEC):

[0097]

[0098] Among them, m0 to m5 are regression coefficients.

[0099] In this embodiment, the model uses three layers of soil (topsoil, upper soil, lower soil) as the basis for soil stratification. Among them, the depth of the topsoil SD1 is defined as:

[0100] SD1 = 50mm

[0101] For the depth of the upper soil SD2 is defined as:

[0102]

[0103] For the depth of the lower soil SD3 is defined as:

[0104] SD3 = SD - (SD1 - SD2)

[0105] Among them, RD is the rhizome length.

[0106] In this embodiment, the calculation of the river channel parameters is based on the DEM and the upstream catchment area of the river channel to calculate the river channel hydraulic parameters:

[0107] The river channel gradient (changrad) represents the elevation undulation in the direction of the river channel flow, and the calculation formula is:

[0108]

[0109] Among them, elevationDifference is the elevation difference where the flow direction is located, and chanlength is the river channel pixel length.

[0110] The river channel slope (chans) represents the elevation undulation perpendicular to the flow direction, and its calculation formula is:

[0111]

[0112] Among them, dx is the horizontal distance and dy is the vertical distance.

[0113] Manning coefficient (chanman): Reflects the river channel roughness, and the calculation formula is:

[0114]

[0115] Among them, b0, b1, b2 are empirical coefficients, and A0 and h max are preset thresholds.

[0116] River channel bottom width (chanbw): Has a linear relationship with the upstream catchment area:

[0117] chanbw = k · upstreamArea

[0118] Among them, k is the proportionality coefficient.

[0119] Floodplain width (Wfp): Obtained by expanding according to the river channel width:

[0120] Wfp = n · chanbw

[0121] Among them, n is the expansion multiple.

[0122] Initial depth (chanbnkf1): Estimate the initial depth of the river channel based on the upstream catchment area (upstreamArea), and its formula is:

[0123]

[0124] Among them, k1 and k2 are set according to the regional hydrogeological conditions.

[0125] Correction of depth calculation: The depth is dynamically corrected by combining the Manning coefficient (chanman), average flow rate (avgdis), channel width (chanbw), and channel slope (changrad). The formula is as follows:

[0126]

[0127] Among them, k3 to k7 are empirical coefficients.

[0128] It should be noted that the calculation and standardization of the above parameters are the keys to accurately simulating the flood process by the hydrological and hydrodynamic model. For example, the surface gradient directly affects the runoff direction and velocity; the Van Genuchten parameters determine the spatial heterogeneity of soil infiltration capacity; the Manning coefficient is used to quantify the resistance characteristics of the channel to water flow. By unifying the coordinate system and resolution, the geometric consistency of spatial data in the model can be ensured, and simulation errors caused by coordinate offset or scale difference can be avoided.

[0129] For step S2, in this embodiment, step S2 is used to construct a flood simulation model based on the hydrological and hydrodynamic model to generate time-series flood water depth data. The specific implementation method is as follows:

[0130] In this embodiment, the hydrological and hydrodynamic model adopts the LISFLOOD model framework. Specifically, the model generates a model configuration file by integrating evapotranspiration parameters, terrain parameters (including surface gradient, flow direction data, and elevation standard deviation), soil parameters (including Van Genuchten model parameters, pore size index, and saturated hydraulic conductivity), and channel parameters (Manning coefficient, channel width, and floodplain width) generated by the preprocessing unit. It should be noted that the configuration file needs to clarify the input data path, time range, and boundary conditions. Exemplarily, the time range can be set as a continuous period covering the rainfall peak stage (such as 72 hours), and the time step is set to a preset value (such as 5 minutes).

[0131] The boundary conditions include rainfall input, initial soil moisture content, and initial channel water level. Exemplarily, the rainfall input adopts multiple sets of rainfall pattern data generated in step S3, the initial soil moisture content is set based on soil type and previous meteorological conditions, and the initial channel water level is determined by measured data or steady-state flow calculation.

[0132] The hydrological and hydrodynamic model realizes flood simulation by solving the coupled physical processes of surface runoff and channel confluence:

[0133] Surface runoff: Based on the kinematic wave equation to describe the dynamic changes of surface water depth and runoff, its control equation is:

[0134]

[0135] Among them, q x and q y are the unit-width flows in the x and y directions respectively, R is the rainfall intensity, and I is the soil infiltration rate (calculated by the Van Genuchten model).

[0136] Channel Confluence: The one-dimensional Saint-Venant equations are used to solve the process of channel flow propagation. The continuity equation and the momentum equation are respectively:

[0137]

[0138] Among them, A is the cross-sectional area of the water passage, Q is the flow rate, q l is the lateral inflow, and S f is the friction slope (calculated based on the Manning formula).

[0139] Exemplarily, the numerical solution of the equations uses the finite difference method, the spatial discretization uses the Preissmann implicit format, and the time integration uses the Crank-Nicolson method to ensure the calculation stability.

[0140] It should be noted that the calibration of model parameters is a key step in improving the simulation accuracy. In one possible implementation, the Bayesian optimization algorithm is used to jointly calibrate the Manning coefficient and the Van Genuchten parameters:

[0141] Objective Function: The root mean square error (RMSE) between the simulated ponding depth and the measured data is used as the optimization objective.

[0142] Parameter Space Search: Construct a prior distribution of parameters (such as the Manning coefficient follows a lognormal distribution), obtain the posterior distribution of parameters through Markov chain Monte Carlo (MCMC) sampling, and finally select the parameter combination that minimizes the objective function.

[0143] Furthermore, remote sensing data is used to verify the spatial consistency of the simulation results. Exemplarily, the inundation area is inverted based on Sentinel-1 SAR data, and the simulated ponding area and the remote sensing inversion result are subjected to spatial overlay analysis, and the Kappa coefficient is calculated to evaluate the consistency. It can be understood that the Kappa coefficient needs to reach a preset threshold (such as 0.75) to be considered that the model verification is passed.

[0144] In this embodiment, after the simulation is completed, the Spearman correlation coefficient is used to analyze the correlation between the ponding depth and the input parameters (such as the Van Genuchten parameters, pore size index, saturated volumetric soil water content). Exemplarily, the analysis results are used to identify the key parameters that have a significant impact on the flood process, and then guide the optimization and screening of the model input parameters.

[0145] It should be noted that the hydrological and hydrodynamic model accurately depicts the interaction process between surface runoff and river channel flow through physical mechanisms. The ponding depth data obtained by its solution not only contains spatial distribution information but also has temporal continuity. Exemplarily, the time series data will be used as the training label of the deep learning model in step S4 to provide a high-confidence benchmark for rapid prediction. In addition, the combination of Bayesian parameter calibration and remote sensing verification effectively solves the problem that traditional parameter calibration methods are prone to falling into local optima, and at the same time ensures the physical rationality of the model at the spatial scale.

[0146] For step S3, in this embodiment, step S3 is used to design multiple sets of rainfall pattern data and drive the hydrological and hydrodynamic model to generate diverse flood scenarios. The specific implementation method is as follows:

[0147] In this embodiment, the rainfall pattern data is generated based on the Chicago rainfall pattern method. Specifically, this method divides the total rainfall duration into the pre-peak duration and the post-peak duration, and combines the local rainfall intensity formula of the target area to construct a rainfall process line with different rainfall peak positions and intensities. It should be noted that the rainfall peak position coefficient r (0 < r < 1) is used to control the relative position of the rainfall peak in the total duration. For example, when r = 0.4, the rainfall peak is located at the first 40% of the total duration.

[0148] It can be understood that the Chicago rainfall pattern method can effectively simulate the asymmetric distribution characteristics of rainfall peaks in actual rainfall events, so as to cover different extreme rainfall scenarios. Exemplarily, the total rainfall duration D can be set within a preset range (such as 1 hour to 24 hours) according to the historical meteorological data of the target area.

[0149] In this embodiment, the instantaneous rainfall intensities of the pre-peak duration t b and the post-peak duration t a are calculated respectively based on the local rainfall intensity formula of the target area. Specifically, the formula structure is as follows:

[0150]

[0151] where P is the rainfall recurrence period, and α, K, C, D are regional rainfall formula parameters, and their values are related to the climate characteristics of the target city. Exemplarily, for different cities, the above parameters can be obtained by fitting historical rainfall data.

[0152] It should be noted that by introducing the rainfall peak position coefficient r and the duration segmentation mechanism, the formula can flexibly generate rainfall process lines with different rainfall peak intensities and time distributions.

[0153] In this embodiment, by adjusting the rainfall recurrence period P, the total rainfall duration D, and the rainfall peak position coefficient r, rainfall process lines covering different extreme scenarios are generated. Exemplarily:

[0154] Rainstorm recurrence period: It covers the range from short durations (such as once in 2 years) to long durations (such as once in 100 years) to reflect rainfall events with different probabilities.

[0155] Rain peak position: By setting r as multiple discrete values (such as 0.3, 0.5, 0.7), rainfall patterns with the rain peak being ahead, in the middle, or behind are simulated.

[0156] Furthermore, the generated rainfall hydrograph is used as the input boundary condition of the hydrological and hydrodynamic model to drive the model to simulate the spatio-temporal evolution process of the corresponding floodwater accumulation depth. It can be understood that by inputting diverse rainfall pattern data, the comprehensiveness of the model training data can be ensured, thereby enhancing the generalization ability of the subsequent deep learning model.

[0157] It should be noted that the rainfall pattern generation method combines the local rainstorm intensity formula and the Chicago rainfall pattern design, which not only retains the physical rationality of the regional rainfall characteristics but also achieves diverse scenario coverage through parametric adjustment.

[0158] For step S4, in this embodiment, step S4 is used to construct a flood prediction model based on Swin Transformer and train the model using the flood scenario data generated in step S3 to achieve rapid prediction of the temporal floodwater accumulation depth. The specific implementation method is as follows:

[0159] In this embodiment, the input of the flood prediction model includes temporal rainfall data and spatial feature parameters. Specifically, the temporal rainfall data is the rainfall hydrograph generated in step S3, and its time step and total duration need to be consistent with the simulation settings of the hydrological and hydrodynamic model; the spatial feature parameters at least include the terrain parameters (such as surface gradient, elevation standard deviation) extracted in step S1, soil parameters (such as Van Genuchten model parameters, pore size index, saturated hydraulic conductivity), and river channel parameters (such as Manning coefficient). Exemplarily, the input data is processed through dimension alignment and normalization to form a three-dimensional tensor of time-space-channel.

[0160] It can be understood that the output of the model is the prediction result of the temporal water accumulation depth, and its spatial resolution is consistent with the input data, and the time step covers the entire rainfall cycle. It should be noted that the output is restored to the preset grid resolution through a deconvolution decoder to ensure comparability with the simulation results of the physical model at the spatial scale.

[0161] In this embodiment, the Swin Transformer flood prediction model includes the following core modules:

[0162] Fusion layer: Dimension compression and splicing are performed on the time-series rainfall data (with a time dimension of T) and the spatial feature parameters (with a spatial dimension of H×W). Exemplarily, the time-series rainfall data is compressed into a two-dimensional feature map through one-dimensional convolution, and then spliced with the spatial features along the channel dimension to generate multi-channel input features.

[0163] Swin Transformer block: Spatiotemporal features are extracted by alternately stacking window multi-head self-attention (W-MSA) and shifted window multi-head self-attention (SW-MSA) modules.

[0164] Window partitioning and shifting mechanism: The input feature map is divided into non-overlapping local windows (such as 8×8), and self-attention is calculated within the windows; cross-region information interaction between windows is achieved through cyclic shift operations to solve the boundary effect of local windows.

[0165] Transposed convolution decoder: The feature map is gradually upsampled through multiple layers of transposed convolution operations to restore to the target spatial resolution. Exemplarily, each layer of transposed convolution is followed by batch normalization (BatchNorm) and ReLU activation function to suppress the problem of gradient vanishing.

[0166] It should be noted that the training data of the model is composed of the time-series floodwater accumulation depth data generated in step S2 and the rainfall pattern data in step S3. Specifically, the loss function adopts a weighted combination of mean squared error (MSE) and Huber loss to balance the sensitivity to outliers and the gradient stability.

[0167] In this embodiment, an automated hyperparameter search algorithm is used to optimize the model structure parameters and training parameters. Exemplarily, the hyperparameters include the number of attention heads, window size, embedding dimension, learning rate, etc. In a possible implementation, the Hyperband algorithm is used to efficiently search the hyperparameter space:

[0168] Resource allocation: Dynamically allocate the number of training epochs according to the validation set loss, and terminate the training of low-potential parameter combinations in advance;

[0169] Parameter sampling: Generate candidate parameters based on Bayesian optimization, and preferentially explore the regions where the loss drops rapidly.

[0170] It can be understood that the Swin Transformer block can capture long-range spatiotemporal dependence relationships while reducing the computational complexity through window attention and position bias matrices.

[0171] For step S5, in this embodiment, step S5 is used to perform inference on real-time rainfall data based on the trained Swin Transformer flood prediction model, output dynamic flood prediction results, and verify the model accuracy and visual display. The specific implementation is as follows:

[0172] In this embodiment, the real-time rainfall data is sourced from meteorological observation stations or numerical weather prediction systems. Specifically, after dimension alignment and normalization processing of the real-time rainfall sequence with the spatial feature parameters (such as terrain gradient, soil Van Genuchten parameters) generated in step S1, it is input into the flood prediction model trained in step S4. It can be understood that through the step-by-step processing of the fusion layer, Swin Transformer blocks, and deconvolution decoder, the model generates a spatial distribution map of water accumulation depth at each time step within a preset future time period (e.g., the next 3 hours).

[0173] It should be noted that the dynamic prediction results are stored in the form of time series grid data, with its time resolution consistent with the input rainfall data (e.g., 5 minutes) and the spatial resolution consistent with the training data (such as 25 meters). Exemplarily, the output data can be stacked along the time dimension to form a four-dimensional tensor (time × height × width × channel), facilitating subsequent visualization processing.

[0174] In this embodiment, the root mean square error (RMSE) and Nash efficiency coefficient (NSE) are used to quantify the model prediction accuracy:

[0175] Root mean square error (RMSE): Measures the absolute difference between the predicted value and the simulated value of the physical model generated in step S2. The calculation formula is:

[0176]

[0177] where N is the total number of samples, y pred,i is the predicted value, and y sim,i is the simulated value of the hydro - hydrodynamic model.

[0178] Nash efficiency coefficient (NSE): Evaluates the model's ability to capture the dynamic changes in the flood process. The calculation formula is:

[0179]

[0180] where is the mean value of the simulated values.

[0181] It should be noted that the validation dataset needs to cover different rainfall scenarios (such as short - duration heavy rainfall, long - duration gentle rainfall) to ensure the statistical significance of the evaluation results.

[0182] In this embodiment, the spatio - temporal evolution process of flood water accumulation depth is displayed through a dynamic visualization module. Specifically, the module is developed based on a geographic information system (GIS) platform, and the prediction results are overlaid and rendered with a geographic base map (such as road network, building outlines). Exemplarily, the visualization process includes the following steps:

[0183] Data mapping: Map the gridded waterlogging depth values to a color gradient. For example, water depth from 0 to 0.1 meters is shown as light blue, 0.1 to 0.5 meters as dark blue, and over 0.5 meters as red.

[0184] Temporal animation generation: Play the spatial distribution maps of waterlogging depth in chronological order of time steps to form an animation of the dynamic inundation process.

[0185] Statistical index output: Extract the maximum waterlogging depth, inundation duration, and peak occurrence time at each grid point to generate a statistical report.

[0186] It can be understood that the dynamic visualization results can provide intuitive support for urban flood control emergency decision-making, such as identifying high-risk inundation areas or planning drainage paths.

[0187] It should be noted that the model inference process realizes efficient prediction through the parallel computing ability of Swin Transformer, and its inference speed is significantly better than the iterative solution process of traditional hydrographic and hydrodynamic models.

[0188] Generally speaking, the present invention constructs an end-to-end prediction framework by integrating the high credibility of physical models and the fast inference ability of deep learning models. First, integrate multi-source data (topography, soil, rainfall, etc.), generate temporal flood waterlogging depth data based on hydrographic and hydrodynamic models, and design diverse rainfall scenarios in combination with the Chicago rainfall pattern method; then construct a deep learning model based on Swin Transformer, extract spatio-temporal features through the window multi-head self-attention mechanism, and use the transposed convolutional decoder to restore the spatial resolution to achieve dynamic prediction of flood waterlogging depth in future time periods; finally, verify the model accuracy through the root mean square error (RMSE) and Nash efficiency coefficient (NSE), and dynamically visualize the spatio-temporal evolution process based on geographic information systems. This method solves the problems of low computational efficiency of traditional physical models and insufficient physical interpretability of pure data-driven models, and provides an efficient and reliable technical support for urban flood control decision-making.

[0189] To better understand the present invention, the above method will be described in detail below in conjunction with specific embodiments.

[0190] Embodiment:

[0191] Please refer to the appendix Figure 2 - Appendix Figure 7 , this embodiment provides a method for rapid prediction of urban temporal floods based on Swin Transformer and hydrographic and hydrodynamic models, including the following steps:

[0192] 1. Data preprocessing and parameter preparation

[0193] In this embodiment, a standardized data set is generated through the following steps:

[0194] Data Reading and Quality Control: Read spatial data such as DEM, soil properties, building heights, etc. in the target area (Pudong New Area, Shanghai), as well as historical rainfall and flood measurement time series data. The data quality control module uses Kriging interpolation to fill in missing values and eliminates outliers based on the 3σ principle.

[0195] In this embodiment, the LISVAP evapotranspiration model is used to calculate evapotranspiration time series data, as Figure 2 shown.

[0196] Coordinate and Resolution Unification: Use the GDAL tool to unify the data into the Web Mercator coordinate system (EPSG: 3857), and use bilinear interpolation to unify the resolution of all spatial data to 25 meters.

[0197] Topographic Parameters:

[0198] Depression Filling: Use the ArcGIS Fill module to correct the depressed areas of the DEM and eliminate local water accumulation errors.

[0199] Surface Gradient Calculation: Based on the D8 flow direction algorithm, according to the formula:

[0200]

[0201] Calculate the surface gradient of each pixel.

[0202] Elevation Standard Deviation: Calculate the elevation fluctuation within a 3×3 neighborhood, and the formula is:

[0203]

[0204] In this embodiment, soil parameters are calculated according to soil data:

[0205] Van Genuchten Model Parameters:

[0206] Saturated Volumetric Water Content:

[0207] Thetas = 0.83080 - 0.28217*D + 0.0002728*C + 0.000187*S

[0208] where D is the soil density (g / cm 3 ), C is the clay content (%), and S is the silt content (%).

[0209] Residual Volumetric Soil Water Content:

[0210]

[0211] Sand = 100 - S - C

[0212] Aperture index:

[0213] Lamba = 10 0.22236-0.3189*D-0.05558*T-0.005306*C-0.003084*S-0.01072*OC

[0214] Where T is the soil layer identifier (topsoil T = 1, subsoil T = 0), and OC is the organic carbon content (%).

[0215] Van Genuchten parameters:

[0216] Alpha = 10 -0.43348-0.41729*D-0.04762*OC+0.21810*T-0.01581*C-0.01207*S

[0217] Saturated conductivity:

[0218] KSat = 10 0.40220+0.26122*pH+0.44565*T-0.02329*C-0.01265*S-0.01038*CEC

[0219] Where pH is the soil acidity and alkalinity, and CEC is the cation exchange capacity.

[0220] Soil stratification: the depth of the surface soil SD1 = 50mm, and the depths of the upper soil layer SD2 and the lower layer SD3 are stratified according to the formula:

[0221]

[0222] SD3 = SD - (SD1 - SD2)

[0223] Where RD = 450mm is the root length.

[0224] In this embodiment, the river channel parameters are calculated based on the DEM and the upstream area data of the river channel:

[0225] River channel gradient:

[0226]

[0227] River channel slope:

[0228]

[0229] River channel Manning coefficient:

[0230]

[0231] Floodplain width:

[0232] Wfp = 3 * chanbw

[0233] River channel bottom width:

[0234] chanbw = 0.0032 * upstreamArea

[0235] Initial depth and corrected depth of the river channel:

[0236] chanbnkf1 = 0.27 * upstreamArea 0.33

[0237] chanbnkf2 = 1.004 * chanman 0.6 *(2 * avgdis) 0.6 *chnbw -0.6 *changrad -0.3

[0238] 2. Flood simulation model construction and parameter calibration

[0239] Model configuration: Based on the LISFLOOD model to simulate the coupled process of surface runoff and river channel confluence.

[0240] Boundary conditions: Set the simulation time range from 11:00 on July 25, 2021 to 5:00 on July 28 (Typhoon In-Fa event), and the time step is 5 minutes.

[0241] Parameter calibration: As Figure 3 shown, the Bayesian optimization algorithm is used to calibrate the Manning coefficient and Van Genuchten parameters, and the objective function is the root mean square error (RMSE) between the simulated waterlogging depth and the measured data.

[0242] Remote sensing verification: Use Sentinel-1 SAR data to invert the inundation area and calculate the Kappa coefficient (threshold ≥ 0.75) to verify the spatial consistency.

[0243] 3. Generation of diverse rainfall patterns

[0244] The Chicago rainfall pattern method is used to generate 400 rainfall scenarios, covering return periods P = 2 - 100 years and durations D = 5 - 180 minutes, which are used to drive the hydrological and hydrodynamic models to obtain flood simulation data under different rainfall conditions, as Figure 4 shown.

[0245] Calculation of instantaneous rainfall intensity: According to the rainstorm intensity formula in Shanghai:[[]]

[0246]

[0247] where t b is the rainfall duration before the peak, t a is the rainfall duration after the peak, i(t b ) is the instantaneous rainfall intensity before the peak, i(t a ) is the instantaneous rainfall intensity after the peak, P is the rainstorm return period, and r is the comprehensive rainfall peak position coefficient, where the rainfall peak coefficient in Shanghai is 0.405.

[0248] 4. Flood prediction model based on Swin Transformer

[0249] In this embodiment, flood-prone areas such as Figure 5 As shown, this area, located on the east bank of the Huangpu River in Shanghai, is low-lying and has poor drainage, which easily leads to waterlogging. According to historical disaster data, it is one of the most flood-prone areas. On August 25, 2008, torrential rain caused over 100 roads in Pudong New Area and other areas to flood, and over 10,000 residential homes were flooded. In October 2013, Typhoon Fitow brought torrential rain to Shanghai, causing over 80 sections of roads in Pudong New Area and other districts to accumulate water exceeding 20-50 centimeters, causing two subway lines to malfunction and paralyzing traffic during the evening rush hour. In July 2021, Typhoon Fireworks caused torrential rain and flooding at over eight interchanges in Pudong New Area, resulting in economic losses exceeding 100 million yuan.

[0250] Furthermore, the corresponding cumulative rainfall of the rain type obtained from 400 rain type process lines was input into the LISFLOOD model. The simulation interval was set to five minutes and the simulation duration was set to three hours. 400 waterlogging process data were obtained in the flood-prone area. The waterlogging change process is as follows: Figure 6 shown.

[0251] Furthermore, a flood simulation model was constructed using precipitation time series data, Van Genuchten parameter, aperture coefficient and saturated volume soil water content as network data input and waterlogging process data as network output. Figure 7 The input data are 464x464 Van Genuchten parameters, 464x464 aperture coefficient, 464*464 saturated volumetric soil moisture content, and 36x464x464 precipitation data. The precipitation data is the cumulative rainfall corresponding to the design rain pattern. 280 sets of scene data are used for model training, and 120 sets are used for model result verification.

[0252] The constructed Swin Transformer-based flood prediction model consists of a fusion layer, a patch embedding layer, a Swin Transformer layer, a patch merging layer, and a prediction output layer. Specifically, the fusion layer integrates two-dimensional and three-dimensional data and reduces feature dimensionality to reduce computational complexity; the patch embedding layer performs positional encoding on the input data, making it suitable for the input of the self-attention mechanism to extract local features; the Swin Transformer layer utilizes the window attention mechanism and the shifting window attention mechanism to efficiently capture the spatial and temporal characteristics of flood evolution; the patch merging layer re-integrates local features into global features; and finally, a deconvolution output module reconstructs the spatial resolution and outputs the flood depth prediction results.

[0253] Specific parameter settings include training using AdamW as the optimizer, optimizing model parameters using the Hyperband algorithm, and the optimized model parameters including dropout rate, number of attention heads, embedding dimension, size of the multi-layer perceptron layer, attention window size, offset window size, learning rate, batch size, number of iterations, and weight decay coefficient.

[0254] 5. Result Analysis and Visualization

[0255] In this embodiment, the accuracy of flood prediction is evaluated by indicators such as root mean square error (RMSE), Nash-Sutcliffe efficiency coefficient (NSE), and mean absolute error (MAE). To further verify the model performance, a convolutional neural network model (CNN) is used for comparison. The model structure mainly consists of Conv2D (two-dimensional convolutional layer), BatchNormalization (batch normalization), Dropout (dropout), Flatten (flattening), and Dense (fully connected layer). In addition, this unit also includes an animation display module and a flood feature analysis module, which are respectively used to display the dynamic evolution animation of the inundation depth and the spatial distribution of the inundated area, and provide statistical indicators such as average inundation time, average water depth, average flow velocity, and maximum flow velocity.

[0256] In summary, the real-time simulation and prediction of urban floods proposed in this embodiment, through the effective integration of the hydrological and hydrodynamic model and the deep learning model, significantly improves the real-time performance and accuracy of urban flood prediction, and can provide strong support for urban flood disaster management and emergency response.

[0257] The urban temporal flood rapid prediction system based on the Swin Transformer and the hydrological and hydrodynamic model described below can be correspondingly referred to the urban temporal flood rapid prediction method based on the Swin Transformer and the hydrological and hydrodynamic model described above.

[0258] Please refer to the attached Figure 8 , the present invention also provides an urban temporal flood rapid prediction system based on the Swin Transformer and the hydrological and hydrodynamic model, including:

[0259] A data preprocessing unit 10, which is used to process multi-source data and generate standardized parameters;

[0260] A flood simulation model unit 20, which generates flood scenario data based on the hydrological and hydrodynamic model;

[0261] A rainfall pattern generation unit 30, which is used to design multiple groups of rainfall hydrographs;

[0262] A flood prediction model unit 40, which uses the Swin Transformer algorithm to achieve rapid prediction;

[0263] A result analysis and visualization unit 50, which is used for accuracy verification and dynamic result display.

[0264] The system of this embodiment can be used to execute the above method embodiment, and its principle and technical effect are similar, which will not be elaborated here.

[0265] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for rapid prediction of urban sequential floods based on Swin Transformer and hydrological and hydrodynamic models, characterized in that, It includes the following steps: Obtain multi-source data of the target area and perform preprocessing to generate a standardized data set; Construct a flood simulation model based on a hydrological and hydrodynamic model to generate time-series flood water depth data; Design multiple groups of rainfall pattern data to drive the flood simulation model to generate diverse flood scenarios; Construct a flood prediction model based on Swin Transformer and use the flood scenario data to train the model; Infer the real-time rainfall data based on the flood prediction model and output a dynamic flood prediction result.

2. The urban time-series flood rapid prediction method based on Swin Transformer and hydrological and hydrodynamic models according to claim 1, characterized in that The step of obtaining multi-source data of the target area and performing preprocessing includes: Perform missing value imputation and outlier removal on the multi-source data; Unify the spatial data to a preset coordinate system and resolution; Calculate terrain parameters, soil parameters, and river channel parameters.

3. The urban temporal flood rapid prediction method based on Swin Transformer and hydrological and hydrodynamic models according to claim 2, characterized in that, In the step of calculating terrain parameters, soil parameters, and river channel parameters: The terrain parameters include surface gradient, flow direction data, and elevation standard deviation; The soil parameters include Van Genuchten model parameters and saturated hydraulic conductivity; The river channel parameters include Manning coefficient, river channel width, and floodplain width.

4. The rapid urban temporal flood prediction method based on Swin Transformer and hydrodynamic model according to claim 1, characterized in that, The step of constructing a flood simulation model based on a hydrological and hydrodynamic model to generate time-series flood water depth data includes: Solve the surface runoff and river channel confluence processes based on the hydrological and hydrodynamic equations; Generate time-series flood water depth by combining physical parameters and rainfall pattern data.

5. The urban time-series flood rapid prediction method based on Swin Transformer and hydrological and hydrodynamic models according to claim 4, wherein In the step of generating time-series flood water depth by combining physical parameters and rainfall pattern data, the Bayesian optimization algorithm is used to calibrate the parameters of the hydrological and hydrodynamic model, and remote sensing data is used to verify the consistency of the inundation range.

6. The urban time - series flood rapid prediction method based on Swin Transformer and hydrodynamic model according to claim 1, wherein, The step of designing multiple groups of rainfall pattern data to drive the flood simulation model to generate diverse flood scenarios includes: Use the Chicago rainfall pattern method to design the storm hydrograph and divide the total rainfall duration into pre-peak duration and post-peak duration; Based on the local storm intensity formula of the target area, calculate the instantaneous rainfall intensity before and after the peak. The formula is: where t b is the duration before the peak, t a is the duration after the peak, P is the storm return period, r is the rain peak position coefficient, and α, K, C, D are parameters of the regional storm formula; Generate multiple groups of rainfall hydrographs covering different return periods and rainfall durations as the input boundary conditions of the hydrological and hydrodynamic model.

7. The urban time - series flood rapid prediction method based on Swin Transformer and hydrodynamic model according to claim 1, characterized in that, The step of constructing a flood prediction model based on Swin Transformer includes: Construct a flood prediction model based on Swin Transformer. The input of the model includes time-series rainfall data and spatial feature parameters, and the output is the time-series water depth prediction result; The flood prediction model includes: Fusion layer: Perform dimensional fusion and compression on the time-series rainfall data and spatial feature parameters to generate multi-channel input features; Swin Transformer block: Alternately extract spatio-temporal features through window multi-head self-attention and shifted window multi-head self-attention; Transposed convolution decoder: Gradually restore the spatial resolution through transposed convolution operations and output the water depth prediction result at the preset grid resolution.

8. The urban temporal and sequential flood rapid prediction method based on Swin Transformer and hydrological and hydrodynamic models according to claim 7, wherein The training step of the flood prediction model based on Swin Transformer includes: Use the time-series rainfall data and the corresponding flood water depth data to train the model, and optimize the model performance based on the automated hyperparameter search algorithm.

9. The urban time-series flood rapid prediction method based on Swin Transformer and hydrological and hydrodynamic models according to claim 1, characterized in that, The method further includes: Steps for evaluating the accuracy of the flood prediction model using the root mean square error and Nash efficiency coefficient.

10. A rapid urban time - series flood prediction system based on Swin Transformer and a hydrological - hydrodynamic model, applied to the method according to any one of claims 1 - 9, characterized in that, Including: A data preprocessing unit for processing multi-source data and generating standardized parameters; A flood simulation model unit for generating flood scenario data based on a hydrological and hydrodynamic model; A rainfall pattern generation unit for designing multiple groups of rainfall hyetographs; A flood prediction model unit for achieving fast prediction using the Swin Transformer algorithm; A result analysis and visualization unit for accuracy verification and dynamic result display.

Citation Information

Cited By

  • Multi-scale progressive short-term flood intelligent early warning method, device, equipment and medium

    CN120612790A

  • Short temporary rainfall real-time flood analysis method based on TELEMAC-2D

    CN121212821A

  • End-to-end drainage basin flood risk influence forecasting method based on physical constraint

    CN121390891A