A method for constructing a flash flood risk prediction large model combined with physical constraints
By embedding physical constraints into a large-scale AI model for flash flood risk prediction, the problem of insufficient model universality and accuracy in existing technologies has been solved, achieving more efficient and accurate flash flood risk prediction, applicable to the prevention and control of different types of flash flood disasters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-04-07
AI Technical Summary
In the prediction of flash flood disaster risks, existing technologies suffer from poor universality and low computational efficiency of physical mechanism models, while data-driven AI models suffer from poor interpretability and low accuracy, making it difficult to meet the high requirements of defense work.
A large-scale model for flash flood risk prediction that integrates physical constraints is constructed. This is achieved by embedding the physical constraints of the hydrological and hydrodynamic model, including the water balance equation and the two-dimensional shallow water equation, into the AI large-scale model architecture of Transformer-Unet and performing coupled optimization to form a large-scale model for flash flood risk prediction.
It significantly improves the model's generalization ability and risk prediction accuracy, enhances computational efficiency, and enables a better understanding of the formation and evolution of flash floods, providing reliable technical support for prevention and control.
Smart Images

Figure CN121303351B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of mountain torrent disaster prevention, and particularly relates to a construction method of a mountain torrent risk prediction large model fusing physical constraints. BACKGROUND
[0002] Mountain torrent disaster is the main disaster causing death and disappearance in flood season. Influenced by climate change and the increasing human activities in mountainous areas, mountain torrent disasters induced by extreme rainfall are showing a trend of more, more frequent, more intense and more extensive, and the defense work is facing more severe challenges. The natural endowments and climate conditions are quite different in different regions of China, and the mountain torrent disasters are complex and diverse, the mountain torrent processes and their disaster-causing mechanisms are obviously different, and the risk prediction is difficult. At present, the research at home and abroad mainly focuses on predicting rainfall to drive hydrological and hydrodynamic models and cooperating with mountain torrent disaster warning indicators to carry out risk prediction, and the accuracy of prediction for different regions and different disaster processes is quite different, and the calculation efficiency is relatively low. Therefore, how to construct a mountain torrent risk prediction model with strong adaptability to improve the accuracy of mountain torrent risk prediction is a key and difficult problem to be solved in the practice of mountain torrent disaster prevention.
[0003] In recent years, artificial intelligence (AI) has developed rapidly and has been tried to be applied to flood prediction, and AI large models will find more application scenarios in the field of earth science and play a more important role in disaster prevention and mitigation. After the implementation of the national mountain torrent disaster prevention project for more than ten years, a large amount of data for mountain torrent disaster prevention has been formed, which provides conditions for the construction of a mountain torrent risk prediction large model. Mountain torrent risk prediction needs to consider natural factors and social factors, and is more complex than the prediction and prediction of hydrological and meteorological processes. The universality of physical mechanism models is poor, and the calculation efficiency is relatively low, while the data-driven AI large model has poor interpretability and low accuracy, which is difficult to meet the high requirements of mountain torrent disaster prevention in the new period. Therefore, it is urgent to construct a mountain torrent disaster risk prediction large model coupling physical mechanism and AI large model, to give full play to the advantages of physical models and AI large models and improve the accuracy of risk prediction. SUMMARY
[0004] The purpose of the present application is to provide a construction method of a mountain torrent risk prediction large model fusing physical constraints to solve the above technical problems.
[0005] To achieve the above purpose, the present application provides the following technical solutions:
[0006] The present application discloses a construction method of a mountain torrent risk prediction large model fusing physical constraints, which comprises the following steps:
[0007] Step 1: Construct a large-scale AI model architecture based on Transformer-Unet. First, determine the number of layers in the Transformer encoder and decoder. Generate a matrix of query Q, key K, and value V in the self-attention mechanism. Split Q, K, and V into multiple heads to construct the Transformer model. Second, adopt the Unet network structure. Given the initial number of output channels, input channels, and convolutional kernel size, extract high-level features through downsampling and combine low-level features during upsampling. Finally, embed the Transformer model as the convolutional layer and fully connected layer in the Unet network structure to construct the Transformer-Unet large-scale AI model architecture. Determine the large-scale model structure by adjusting the convolutional layers, connection methods, and attention mechanism.
[0008] Step 2: Constructing a hydrological and hydrodynamic model: Divide the study area into small watershed calculation units and construct a distributed hydrological model that couples the calculations of areal rainfall fusion, evapotranspiration, runoff generation, confluence, evolution, and reservoir regulation processes to achieve flow process calculation for each river segment; establish hydrodynamic models for areas within the small watershed that are vulnerable to flash floods, including a one-dimensional hydrodynamic model of channels and a two-dimensional hydrodynamic model of flood inundation, to achieve dynamic calculation of channel flood elements and flood inundation evolution processes, and obtain the inundation range, water depth, and flow velocity;
[0009] Step 3: Couple the AI large model with the hydrological and hydrodynamic model: Based on the AI large model architecture based on Transformer-Unet, add the constructed physical constraints to the loss function of Transformer-Unet to achieve coupling with the hydrological and hydrodynamic model. That is, embed the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model into the loss function of Transformer-Unet as physical constraints to participate in the adjustment and optimization of the AI large model parameters. The output of the AI large model includes the runoff generation and confluence parameters required by the distributed hydrological model and the roughness required by the hydrodynamic model, thereby realizing the coupling of the hydrological and hydrodynamic model and the AI large model to construct a large model for flash flood risk prediction.
[0010] Step 4: Construct training sample big data and conduct large-scale model training for flash flood risk prediction: Integrate historical flash flood disaster data, small watershed design rainstorm floods, and water level rise processes in small watersheds with hydrological station observation data. Based on the hydrological and hydrodynamic model constructed in Step 2, calculate and form a complete set of data on rainfall events and their resulting soil moisture changes, flow processes, inundation ranges, inundation depths, and flow velocity distributions in different small watersheds within the study area. Together with the data from flash flood disaster investigation and evaluation, this constitutes a flash flood disaster sample big data, which serves as training data for the large-scale model of flash flood risk prediction.
[0011] Furthermore, the areas within the small watershed that are vulnerable to flash floods mentioned in step 2 include riverside village clusters and riverside towns.
[0012] Furthermore, the specific process described in step 3, which involves embedding the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model into the loss function of Transformer-Unet as physical constraints to participate in the adjustment and optimization of the AI large model parameters, is as follows:
[0013] The prior information of the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model is embedded into the loss function L of the AI large model, as shown in formula (1), to construct the physical constraint loss term L. phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb :
[0014] (1)
[0015] The physical constraints set are the water balance equation and the two-dimensional shallow water equation that satisfy the conservation of mass and momentum. By integrating the basic equations of three-dimensional flow along the water depth and averaging them along the water depth, and ignoring the effects of wind stress, Coriolis force and second-order diffusion term, the shallow water control equations of the two-dimensional hydrodynamic model are obtained. The form is a set of nonlinear hyperbolic partial differential equations. Among them, formula (2) is the continuity equation that satisfies the conservation of mass, formulas (3) and (4) are the momentum equations that satisfy the conservation of momentum, and formula (5) is the water balance equation of the whole watershed.
[0016] (2)
[0017] (3)
[0018] (4)
[0019] (5)
[0020] In the formula, h is the water depth (m); u and v are the flow velocities in the x and y directions (m / s), respectively; q is the source and sink term; and g is the gravitational acceleration (m / s²). 2 z represents the water level, in meters (m). and Let x and y be the friction terms, respectively. , n is the Manning coefficient; V is the total surface water storage of the region, mm; I is the surface runoff production of the region, mm; O is the outflow of the region boundary, mm;
[0021] Physical constraint loss term L phyConstruct L as the regularization term for large AI models. phy At that time, by moving the terms of formulas (2) to (4) to the left side of the equation, the solution of the partial differential equation is transformed into an optimization problem, that is, with the goal of maximizing the risk prediction hit rate, minimizing the physical constraint residual and the error of "water level and flood rise rate"; in the process of minimizing the loss function, the AI large model makes L phy The equations tend to 0, meaning that both the continuity equation and the momentum equation in the two-dimensional shallow water equation can be satisfied, allowing the model training process to proceed under the condition of satisfying the physical constraints of the two-dimensional shallow water equation.
[0022] For the regression loss term L of hydrological elements hydro Risk prediction hit rate loss item L risk And water balance loss term L wb It only performs data-driven calculations on the model, using the output values obtained from the model's forward propagation and the true values from the training data, including L. hydro L risk The mean squared error loss;
[0023] Water balance loss term L wb It is a constraint on the overall water conservation relationship of the watershed. This term minimizes the difference between the change in total surface water storage and the difference between the total surface runoff and the total watershed outflow by combining the various income and expenditure quantities of the water balance equation into a residual form.
[0024] In calculating the physical constraint loss term L phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb Then, the model parameters are iteratively optimized by minimizing the loss function that includes prior physical knowledge, so that the training process of the model can be carried out under the condition of simultaneously satisfying physical knowledge and data, thereby constructing a large model based on the dual drive of knowledge and data of two-dimensional shallow water equations.
[0025] Physical constraint loss term L phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb The formulas are as follows:
[0026] (6)
[0027]
[0028]
[0029]
[0030]
[0031]
[0032] In the formula: and These are the water depth, flood rise rate, and risk prediction hit rate in the training data, respectively. , , These are measured water depth, measured flood rise rate, and expected hit rate, respectively; the measured water depth and flood rise rate are obtained from flash flood disaster surveys or water level station observations; This represents the change in the total surface water storage in the region. This refers to the total surface runoff in the region. The total outflow from the regional boundary; N represents the sample size;
[0033] Risk prediction accuracy The calculation formula is:
[0034] .
[0035] Furthermore, the data from the flash flood disaster investigation and evaluation results mentioned in step 4 include the boundaries of the small watershed, DEM, land use, soil texture, confluence paths, township boundaries, river network systems, flash flood hazard zones within the watershed, and village locations within the watershed.
[0036] Furthermore, in step 4, when training the large model, the input data is divided into steady-state data and time-varying data. The steady-state data includes the boundaries of the small watershed, DEM, land use, soil texture, runoff paths, township boundaries, river network, flash flood hazard zones within the watershed, and village locations within the watershed. The time-varying data includes rainfall, soil moisture, and blockage of potential hazard points. The output results include the location of channel cross-sections, runoff generation parameters, roughness coefficient, water level, flow velocity, and risk points. Based on the generated flash flood data, the large model for flash flood risk prediction is trained with the goal of maximizing the risk prediction hit rate, minimizing the physical constraint residuals, and minimizing the errors of "water level and flood rise rate". The training of the large model for flash flood risk prediction is completed when the physical constraint residual is less than 0.01, the water level error is less than 0.1m, the flood rise rate error is less than 10%, and the flash flood risk prediction hit rate is not less than 65%.
[0037] The beneficial effects of this invention are as follows: By integrating physical constraints into a large AI model, this invention couples the artificial intelligence model with the physical model, fully leveraging the advantages of the strong learning and adaptability of the large AI model and the strong interpretability of the physical model. This significantly improves the model's generalization ability and makes it applicable to risk prediction of different types of flash floods. The large flash flood risk prediction model constructed by this invention, which integrates physical constraints, has a significantly higher computational efficiency than the traditional rainfall-driven hydrodynamic model combined with flash flood disaster early warning indicators for risk prediction. This improves the accuracy and speed of flash flood risk prediction, and enables the mining of the correlation between inputs and outputs behind big data and the revelation of disaster-causing mechanisms. It helps to understand the formation, evolution, and disaster-causing process of flash floods, providing reliable technical support for flash flood prevention and control.
[0038] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the method flow described in this invention;
[0040] Figure 2 This is a diagram of the architecture of the large-scale flash flood risk prediction model that incorporates physical constraints, as shown in Example 1.
[0041] Figure 3 This is a general overview map of the Hanbei River small watershed in Example 1;
[0042] Figure 4 This is a schematic diagram showing the distribution of villages that generated forecasts and early warnings in the Hanbei River small watershed in Example 1;
[0043] Figure 5 This is a schematic diagram of the statistical results of the early warning situation in the Hanbei River small watershed in Example 1. Detailed Implementation
[0044] This invention discloses a method for constructing a large-scale model for flash flood risk prediction that incorporates physical constraints, such as... Figure 1 As shown, the method includes the following steps:
[0045] Step 1: Constructing a large-scale AI model architecture based on Transformer-Unet. First, determine the number of layers in the Transformer encoder and decoder. In the self-attention mechanism, generate a matrix of ①Query (Q), ②Key (K), and ③Value (V). Decompose Q, K, and V into multiple heads to construct the Transformer model, capturing long-range dependencies in the input data, understanding the correlations between different time points, and effectively capturing and modeling complex feature relationships. Second, adopt the Unet network structure. Given the initial number of output channels, input channels, and convolutional kernel size, extract high-level features through downsampling and combine low-level features during upsampling to effectively preserve spatial information. Finally, embed the Transformer model as the convolutional layer and fully connected layer in the Unet network structure, constructing the Transformer-Unet large-scale AI model architecture. Determine a suitable large-scale model structure by adjusting the convolutional layers, connection methods, and attention mechanisms.
[0046] Step 2: Constructing a hydrological and hydrodynamic model: A distributed hydrological model is constructed for the study area, dividing it into small watershed calculation units. A distributed hydrological model is constructed that couples the calculations of processes such as areal rainfall fusion, evapotranspiration, runoff generation, confluence, evolution, and reservoir regulation, enabling the calculation of flow processes for each river segment. For key areas within the small watershed that are vulnerable to flash floods (including riverside village clusters and riverside towns), a hydrodynamic model is established, including a one-dimensional hydrodynamic model of the channel and a two-dimensional hydrodynamic model of flood inundation, enabling the dynamic calculation of channel flood elements and the evolution process of flood inundation, and obtaining the inundation range, water depth, and flow velocity.
[0047] Step 3: Couple the AI large-scale model with the hydrological and hydrodynamic model: Define the physical constraints and loss function for constructing the AI large-scale model. Utilize the Transformer-Unet architecture, composed of basic units such as layer normalization, multi-head attention mechanisms, and multilayer perceptrons, to build the AI large-scale model. Based on this Transformer-Unet-based AI large-scale model architecture, couple it with the hydrological and hydrodynamic model. The key to this coupling is adding physical constraints based on "flow," "dependency," "coercion," and "perturbation" to the Transformer-Unet loss function. The characteristics of "flow," "dependency," and "coercion" are reflected in three aspects: First, "flow" represents the time dimension; flash flood simulation is a dynamic process that evolves over time. Second, "dependency" indicates that the calculation result of the physical model at a certain moment depends on the calculation results at several past moments. Finally, "coercion" refers to using physical constraints as boundary conditions to provide necessary constraints for the large model, preventing the calculation results of the large model under new scenarios from not conforming to physical laws. "Perturbation" specifically refers to the impact of blockage and breaching of key risk points such as bridges and culverts within a small watershed on the flash flood process.
[0048] By constructing physical constraints, the hydrological and hydrodynamic models and the large-scale model are organically integrated. Specifically, the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model are embedded in the loss function of Transformer-Unet as physical constraints to participate in the adjustment and optimization of the parameters of the large-scale model. The output of the large-scale model includes the runoff generation and confluence parameters required by the distributed hydrological model and the roughness required by the hydrodynamic model, thereby realizing the coupling of the hydrological and hydrodynamic models and the large-scale model to construct a large-scale model for flash flood risk prediction.
[0049] Specifically, prior information such as the water balance equation and the two-dimensional shallow water equation from the distributed hydrological model and hydrodynamic model is embedded into the loss function L of the large model, as shown in formula (1), to construct the physical constraint loss term L. phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb :
[0050] (1)
[0051] The physical constraints set are the water balance equation and the two-dimensional shallow water equation that satisfy the conservation of mass and momentum. The shallow water equation is a simplification of the Navier-Stokes equation and is used to simulate the surface water flow problem with a free water surface. By integrating the basic equations of three-dimensional flow along the water depth and averaging them along the water depth, and ignoring the effects of wind stress, Coriolis force and second-order diffusion term, the shallow water control equations of the two-dimensional hydrodynamic model are obtained, which are in the form of a set of nonlinear hyperbolic partial differential equations. Among them, formula (2) is the continuity equation that satisfies the conservation of mass, formulas (3) and (4) are the momentum equations that satisfy the conservation of momentum, and formula (5) is the water balance equation for the entire watershed.
[0052] (2)
[0053] (3)
[0054] (4)
[0055] (5)
[0056] In the formula, h is the water depth (m); u and v are the flow velocities in the x and y directions (m / s), respectively; q is the source and sink term; and g is the gravitational acceleration (m / s²). 2 z represents the water level, in meters (m). and These are the friction terms in the x and y directions, respectively. n is the Manning coefficient; V is the total surface water storage of the region, mm; I is the surface runoff production of the region, mm; O is the outflow of the region boundary, mm; Formulas (2) to (5) describe the "flow" and "dependence" relationship of physical quantities such as water depth. For example, formula (2) can be discretized as .
[0057] L phy (As shown in formula (6)) is the regularization term for the large model, ensuring that the model satisfies the laws of water flow motion during training, and reducing the complexity of the model to prevent overfitting, thereby improving the generalization ability of the model. Construct L phy At that time, by moving the terms of equations (2) to (4) to the left side of the equation, the solution of the partial differential equation is transformed into an optimization problem, that is, with the goal of maximizing the risk prediction hit rate, minimizing the physical constraint residuals and the errors of "water level and flood rise rate". In the process of minimizing the loss function, the large model makes L phy The equations tend towards 0, meaning that both the continuity and momentum equations in the shallow water equations are satisfied, allowing the model training process to proceed under the physical constraints of the shallow water equations. By employing automatic differentiation, the errors introduced by numerical discretization methods in traditional solution methods are avoided. The specific calculations for automatic differentiation are performed using the Autograd package in the PyTorch library.
[0058] For the regression loss term L of hydrological elements hydro (as in formula (7)), risk prediction hit rate loss term L risk (as in formula (10)) and water balance loss L wb (As in formula (11)), only the model is data-driven, and the calculation is performed using the output value obtained by the model in the forward propagation and the true value of the training data, including L hydro L risk The mean squared error loss.
[0059] Water balance loss term L wb It is a constraint on the overall water conservation relationship of the watershed. This term minimizes the difference between "the change in total surface water storage" and "the difference between total surface runoff and total watershed outflow" by combining the various income and expenditure quantities of the water balance equation into residual form.
[0060] In calculating the physical constraint loss term L phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk and water balance loss L wbSubsequently, the model parameters are iteratively optimized by minimizing the loss function that incorporates prior physical knowledge, so that the model training process can be carried out under the condition of simultaneously satisfying physical knowledge and data, thereby constructing a large model driven by both shallow water equation knowledge and data.
[0061] Physical constraint loss term L phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb The formulas are as follows:
[0062] (6)
[0063]
[0064]
[0065]
[0066]
[0067]
[0068] In the formula: and These are water depth, flood rise rate, and risk prediction hit rate from the training data, respectively. , , These are the measured water depth, the measured flood rise rate, and the expected hit rate (65%), respectively. This represents the change in total surface water storage. Total surface runoff, The total outflow from the basin is represented by N, which represents the sample size. Measured water depth and measured flood rise rate were obtained from flash flood disaster surveys or water level station observations.
[0069] Risk prediction accuracy The calculation formula is:
[0070] (12).
[0071] Step 4: Construct a large training sample dataset and train a large-scale model for flash flood risk prediction: Integrate historical flash flood disaster data, designed rainstorm floods in small watersheds, and significant rises in water levels in small watersheds with hydrological station observation data. Based on the hydrological and hydrodynamic model constructed in Step 2, calculate a complete set of data for different small watersheds in the study area, including rainfall events and their resulting soil moisture changes, flow processes, inundation ranges, inundation depths, and flow velocity distributions. This dataset, together with data from flash flood disaster surveys and assessments, including watershed boundaries, DEMs, land use, soil texture, runoff paths, township boundaries, river networks, flash flood hazard zones within the watershed, and village locations within the watershed, constitutes a large sample dataset for flash flood disasters. This dataset serves as training data for the large-scale model for flash flood risk prediction.
[0072] During large-scale model training, the input data is divided into steady-state data and time-varying data. Steady-state data includes the boundaries of small watersheds, DEM, land use, soil texture, runoff paths, township boundaries, river network systems, flash flood hazard zones within the watershed, and village locations within the watershed. Time-varying data includes rainfall, soil moisture, and hazard point blockages, among which hazard point blockages are random data, either manually set or randomly generated by the model. The output results include channel cross-section location, runoff generation parameters, roughness coefficient, water level, flow velocity, and risk point locations. The spatial resolution of the data is fixed at 30m*30m, the window size is fixed at 1000*1000 raster, the temporal resolution of the output results is fixed at 1h, and the time series length is fixed at 24h. Based on the spatiotemporal distribution of designed rainfall according to the hydrological manuals of each province, the raster Xin'anjiang model is used to calculate the runoff, and LISFLOOD-FP is used to calculate the water level and flow velocity. Sample generation is completed in a high-performance computing cluster environment, containing 1000 computing nodes, each node is configured with dual Intel Xeon Gold 6248 CPUs (2.50GHz, 20 cores / CPU), 192 GB of memory, access to PB-level shared memory, and Slurm scheduling is used. Based on the generated flash flood data, the large-scale flash flood risk prediction model is trained with the goal of maximizing the risk prediction hit rate, minimizing the physical constraint residuals and the errors of "water level and flood rise rate". The training of the large-scale flash flood risk prediction model is complete when the physical constraint residual is less than 0.01, the water level error is less than 0.1m, the flood rise rate error is less than 10%, and the flash flood risk prediction accuracy is not less than 65%. Since the output includes runoff generation and confluence parameters and roughness, it can be used as input to the physical constraints, enabling coupling and information exchange between the hydrological and hydrodynamic model and the Transformer-Unet model.
[0073] Example 1
[0074] This embodiment discloses a method for constructing a large-scale model for flash flood risk prediction that incorporates physical constraints. The method includes the following steps:
[0075] Step 1: Constructing a large-scale AI model architecture based on Transformer-Unet. First, determine the number of layers in the Transformer encoder and decoder. In the self-attention mechanism, generate a matrix of ①Query (Q), ②Key (K), and ③Value (V). Decompose Q, K, and V into multiple heads to construct the Transformer model, capturing long-range dependencies in the input data, understanding the correlations between different time points, and effectively capturing and modeling complex feature relationships. Second, adopt the Unet network structure. Given the initial number of output channels, input channels, and convolutional kernel size, extract high-level features through downsampling and combine low-level features during upsampling to effectively preserve spatial information. Finally, embed the Transformer model as the convolutional layer and fully connected layer in the Unet network structure, constructing the Transformer-Unet large-scale AI model architecture. Determine a suitable large-scale model structure by adjusting the convolutional layers, connection methods, and attention mechanisms.
[0076] Step 2: Constructing hydrological and hydrodynamic models: For the entire country, construct the China Mountain Flood Hydrological Model (CNFF), divide the country into small watershed calculation units, and construct a distributed hydrological model that couples the calculation of processes such as areal rainfall fusion, evapotranspiration, runoff generation, confluence, evolution, and reservoir regulation to realize the calculation of flow processes for each river segment; for key areas of small watersheds, establish hydrodynamic models, including the HEC-RAS channel one-dimensional hydrodynamic model and the flood inundation two-dimensional hydrodynamic model, to realize the dynamic calculation of channel flood elements and flood inundation evolution process, and obtain the inundation range, water depth, and flow velocity.
[0077] Step 3: Couple the large AI model with the hydrological and hydrodynamic model: such as Figure 2 As shown, the physical constraints and loss function for building the large AI model are defined. The large AI model is built using the Transformer-Unet architecture, which consists of basic units such as layer normalization, multi-head attention mechanism, and multilayer perceptron. Based on the large model architecture of Transformer-Unet, its coupling with the hydrological and hydrodynamic model is realized. The key to coupling is to add physical constraints based on "flow", "dependency", "forced" and "perturbation" to the loss function of Transformer-Unet.
[0078] By constructing physical constraints, the hydrological and hydrodynamic models and the large-scale model are organically integrated. Specifically, the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model are embedded in the loss function of Transformer-Unet as physical constraints to participate in the adjustment and optimization of the parameters of the large-scale model. The output of the large-scale model includes the runoff generation and confluence parameters required by the distributed hydrological model and the roughness required by the hydrodynamic model, thereby realizing the coupling of the hydrological and hydrodynamic models and the large-scale model to construct a large-scale model for flash flood risk prediction.
[0079] Step 4: Construct a large training sample dataset and conduct large-scale model training: Integrate nearly 60,000 historical flash flood disaster data from across the country, small watershed design rainstorm floods, and significant rises in water levels in small watersheds with hydrological station observation data. Based on the hydrological and hydrodynamic model constructed in Step 2, calculate and form a complete set of data corresponding to rainfall events and their resulting soil moisture changes, flow processes, inundation ranges, inundation depths, and flow velocity distributions in different small watersheds across the country. This dataset, together with data from flash flood disaster surveys and assessments, including watershed boundaries, DEMs, land use, soil texture, runoff paths, township boundaries, river networks, flash flood hazard zones within the watershed, and village locations within the watershed, constitutes a large flash flood disaster sample dataset. This dataset serves as training data for the large-scale flash flood risk prediction model.
[0080] During large-scale model training, the input data is divided into steady-state data and time-varying data. Steady-state data includes the boundaries of small watersheds, DEM, land use, soil texture, runoff paths, township boundaries, river network systems, flash flood hazard zones within the watershed, and village locations within the watershed. Time-varying data includes rainfall, soil moisture, and damming of potential hazard points. The output results are channel cross-section locations, runoff generation and confluence parameters, roughness coefficient, water level, flow velocity, and risk points. Based on the generated flash flood data, the large-scale flash flood risk prediction model is trained with the goal of maximizing the risk prediction accuracy, minimizing the physical constraint residuals, and minimizing the errors in water level and flood rise rate. The training of the large-scale flash flood risk prediction model is complete when the physical constraint residual is less than 0.01, the water level error is less than 0.1m, the flood rise rate error is less than 10%, and the flash flood risk prediction accuracy is not less than 65%.
[0081] This embodiment utilizes a heavy rainfall event that occurred in the Hanbei River basin of Zhongxiang City, Hubei Province, from 18:00 to 19:00 on August 6, 2024. The general situation of the Hanbei River small watershed is as follows: Figure 3 As shown, a large-scale model for predicting flash flood risk, based on a trained system incorporating physical constraints, is used for forecasting and early warning. The affected area in the Hanbei River basin is approximately 284 km². 2 The average rainfall was 48.5 mm. Jinxing Village in Changtan Town, which was severely affected, received 60.4 mm of rainfall, with a maximum hourly rainfall of 52.5 mm, which caused a flash flood. No casualties were reported.
[0082] The epicenter of this rainstorm and flood was located near Jinxing Village in Changtan Town. Warnings were issued both inside and outside the town. The distribution of villages that issued warnings in the Hanbei River basin is as follows: Figure 4 As shown, early warnings were issued for 13 administrative villages and 31 natural villages in Changtan Town, a small watershed of the Hanbei River, affecting a total of 3,412 households and 9,714 people. Specific statistics are as follows: Figure 5 As shown in the figure, the statistical results show that the large-scale flash flood risk prediction model based on the trained model with integrated physical constraints achieved simulation results with higher prediction accuracy, longer lead time, and faster timeliness.
[0083] This invention integrates physical constraints into a large model, fully leveraging the advantages of strong learning and adaptability of artificial intelligence models and strong interpretability of physical models. This improves the generalization ability of the large model, making it applicable to risk prediction of different types of flash floods. It can improve the accuracy and speed of flash flood risk prediction and provide reliable technical support for flash flood prevention and control.
[0084] Finally, it should be noted that the above description is only used to illustrate the technical solution of the present invention and not to limit it. Although the present invention has been described in detail with reference to the preferred arrangement, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for constructing a large-scale model for flash flood risk prediction that integrates physical constraints, characterized in that, The method includes the following steps: Step 1: Construct a large-scale AI model architecture based on Transformer-Unet. First, determine the number of layers in the Transformer encoder and decoder. Generate a matrix of query Q, key K, and value V in the self-attention mechanism. Split Q, K, and V into multiple heads to construct the Transformer model. Second, adopt the Unet network structure. Given the initial number of output channels, input channels, and convolutional kernel size, extract high-level features through downsampling and combine low-level features during upsampling. Finally, embed the Transformer model as the convolutional layer and fully connected layer in the Unet network structure to construct the Transformer-Unet large-scale AI model architecture. Determine the large-scale model structure by adjusting the convolutional layers, connection methods, and attention mechanism. Step 2: Constructing a hydrological and hydrodynamic model: Divide the study area into small watershed calculation units and construct a distributed hydrological model that couples the calculations of areal rainfall fusion, evapotranspiration, runoff generation, confluence, evolution, and reservoir regulation processes to achieve flow process calculation for each river segment; establish hydrodynamic models for areas within the small watershed that are vulnerable to flash floods, including a one-dimensional hydrodynamic model of channels and a two-dimensional hydrodynamic model of flood inundation, to achieve dynamic calculation of channel flood elements and flood inundation evolution processes, and obtain the inundation range, water depth, and flow velocity; Step 3: Couple the AI large model with the hydrological and hydrodynamic model: Based on the AI large model architecture based on Transformer-Unet, add the constructed physical constraints to the loss function of Transformer-Unet to achieve coupling with the hydrological and hydrodynamic model. That is, embed the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model into the loss function of Transformer-Unet as physical constraints to participate in the adjustment and optimization of the AI large model parameters. The output of the AI large model includes the runoff generation and confluence parameters required by the distributed hydrological model and the roughness required by the hydrodynamic model, thereby realizing the coupling of the hydrological and hydrodynamic model and the AI large model to construct a large model for flash flood risk prediction. Step 4: Construct training sample big data and conduct large-scale model training for flash flood risk prediction: Integrate historical flash flood disaster data, small watershed design rainstorm floods, and water level rise processes in small watersheds with hydrological station observation data. Based on the hydrological and hydrodynamic model constructed in Step 2, calculate and form a complete set of data on rainfall events and their resulting soil moisture changes, flow processes, inundation ranges, inundation depths, and flow velocity distributions in different small watersheds within the study area. Together with the data from flash flood disaster investigation and evaluation, this constitutes a flash flood disaster sample big data, which serves as training data for the large-scale model of flash flood risk prediction.
2. The method for constructing a large-scale flash flood risk prediction model incorporating physical constraints according to claim 1, characterized in that, The areas within the small watershed that are vulnerable to flash floods, as mentioned in step 2, include riverside village clusters and riverside towns.
3. The method for constructing a large-scale flash flood risk prediction model incorporating physical constraints according to claim 1, characterized in that, The specific process described in step 3, which involves embedding the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model into the loss function of Transformer-Unet as physical constraints to participate in the adjustment and optimization of the AI large model parameters, is as follows: The prior information of the water balance equation of the distributed hydrological model and the two-dimensional shallow water equation of the hydrodynamic model is embedded into the loss function L of the AI large model, as shown in formula (1), to construct the physical constraint loss term L. phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb : (1) The physical constraints are set to satisfy the water balance equation and the two-dimensional shallow water equation that satisfy the conservation of mass and momentum. By integrating the basic equations of three-dimensional flow along the water depth and averaging them along the water depth, and ignoring the effects of wind stress, Coriolis force and second-order diffusion term, the shallow water control equations of the two-dimensional hydrodynamic model are obtained, which are in the form of a nonlinear hyperbolic partial differential equation system. Formula (2) is the continuity equation that satisfies the mass conservation, formulas (3) and (4) are the momentum equations that satisfy the momentum conservation, and formula (5) is the water balance equation for the entire watershed. (2) (3) (4) (5) In the formula, h is the water depth (m); u and v are the flow velocities in the x and y directions (m / s), respectively; q is the source and sink term; and g is the gravitational acceleration (m / s²). 2 z represents the water level, in meters (m). and These are the friction terms in the x and y directions, respectively. , n is the Manning coefficient; V is the total surface water storage of the region, mm; I is the surface runoff production of the region, mm; O is the outflow of the region boundary, mm; Physical constraint loss term L phy Construct L as the regularization term for large AI models. phy At that time, by moving the terms of formulas (2) to (4) to the left side of the equation, the solution of the partial differential equation is transformed into an optimization problem, that is, with the goal of maximizing the risk prediction hit rate, minimizing the physical constraint residual and the error of "water level and flood rise rate"; in the process of minimizing the loss function, the AI large model makes L phy The equations tend to 0, meaning that both the continuity equation and the momentum equation in the two-dimensional shallow water equation can be satisfied, allowing the model training process to proceed under the condition of satisfying the physical constraints of the two-dimensional shallow water equation. For the regression loss term L of hydrological elements hydro Risk prediction hit rate loss item L risk And water balance loss term L wb It only performs data-driven calculations on the model, using the output values obtained from the model's forward propagation and the true values from the training data, including L. hydro L risk The mean squared error loss; Water balance loss term L wb It is a constraint on the overall water conservation relationship of the watershed. This term minimizes the difference between the change in total surface water storage and the difference between the total surface runoff and the total watershed outflow by combining the various income and expenditure quantities of the water balance equation into a residual form. In calculating the physical constraint loss term L phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb Then, the model parameters are iteratively optimized by minimizing the loss function that includes prior physical knowledge, so that the training process of the model can be carried out under the condition of simultaneously satisfying physical knowledge and data, thereby constructing a large model based on the dual drive of knowledge and data of two-dimensional shallow water equations. Physical constraint loss term L phy Hydrological element regression loss term L hydro Risk prediction hit rate loss item L risk And water balance loss term L wb The formulas are as follows: (6) In the formula: and These are the water depth, flood rise rate, and risk prediction hit rate in the training data, respectively. , , These are measured water depth, measured flood rise rate, and expected hit rate, respectively; the measured water depth and flood rise rate are obtained from flash flood disaster surveys or water level station observations; This represents the change in the total surface water storage in the region. This refers to the total surface runoff in the region. This represents the total outflow from the regional boundary. N represents the number of samples; Risk prediction accuracy The calculation formula is:
4. The method for constructing a large-scale flash flood risk prediction model incorporating physical constraints according to claim 1, characterized in that, The data from the flash flood disaster investigation and evaluation results mentioned in step 4 include the boundaries of the small watershed, DEM, land use, soil texture, confluence paths, township boundaries, river network system, flash flood hazard zones within the watershed, and village locations within the watershed.
5. The method for constructing a large-scale flash flood risk prediction model incorporating physical constraints according to claim 4, characterized in that, In step 4, when training the large model, the input data is divided into steady data and time-varying data. The steady data includes the boundaries of the small watershed, DEM, land use, soil texture, runoff paths, township boundaries, river network, flash flood hazard zones within the watershed, and village locations within the watershed. The time-varying data includes rainfall, soil moisture, and blockage of potential hazard points. The output results include the location of channel cross-sections, runoff generation and confluence parameters, roughness coefficient, water level, flow velocity, and risk points. Based on the generated flash flood data, the large model for flash flood risk prediction is trained with the goal of maximizing the risk prediction hit rate, minimizing the physical constraint residuals, and minimizing the errors of "water level and flood rise rate". The training of the large model for flash flood risk prediction is completed when the physical constraint residual is less than 0.01, the water level error is less than 0.1m, the flood rise rate error is less than 10%, and the flash flood risk prediction hit rate is not less than 65%.
Citation Information
Patent Citations
Tidal river reach storm surge rapid forecasting method based on deep learning and AI large model
CN119200041A