Training method of generative physical distillation neural network and flood prediction method
Through the generative physical distillation neural network (GPDNN) combined with the spatiotemporal neural network and shallow water equation solver, the problem of dynamic prediction of space-time flood under sparse sample conditions is solved, and real-time, accurate and physically consistent flood prediction effect is achieved.
Patent Information
- Application Number
- CN202510660431.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-22
AI Technical Summary
The prior art is difficult to achieve real-time, accurate and physical laws predictions of flood space-time dynamics under sparse samples or even zero samples.
Generative physical distillation neural network (GPDNN) is used, which combines spatiotemporal neural networks and shallow water equation solvers to model complex flood systems through deep learning and macroscopic time step sizes, and generate physically consistent results with microscopic time step sizes through physical solvers.
Real-time, accurate and physically consistent water depth prediction and flow field reconstruction under sparse samples or even zero samples are achieved, breaking through the shackles of scarcity of flood observation data on machine learning methods, and significantly better than the accuracy and physical consistency of existing methods in flood prediction.
Smart Images

Figure CN120180946A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of flood prediction, and in particular to a training method of a generative physical distillation neural network and a flood prediction method. Background Art
[0002] Floods are the most frequent natural disasters in recent years. The causes of floods are complex and diverse, including heavy rains, river overflows, and dam breaches. Existing methods usually use two-dimensional shallow water equations (SWE) to describe the spatiotemporal dynamic evolution of complex flood systems. Classical numerical solvers, such as the finite volume method (FVM), can accurately solve shallow water equations under high spatiotemporal resolution discretization, and the simulation results conform to the laws of physics. However, they are limited by stability (CFL) conditions, and the computational overhead of large-scale spatiotemporal simulations increases exponentially, resulting in high computational costs. Deep learning DL needs to automatically learn complex nonlinear relationships between variables from a large amount of labeled data. Although it is not restricted by CFL conditions, the prediction results cannot guarantee physical consistency, and due to the sparse distribution of flow meters, it lacks sufficient measured hydrological data. The emerging scientific modeling paradigm that combines physical knowledge with machine learning, such as embedding partial differential equations (PDEs) into machine learning, takes physical information neural networks (PINNs) as an example, which evaluates PDE residuals at the point assignment of microscopic time steps through automatic differentiation (AD) technology to learn a continuous solution space; although PINNs can provide accurate and physically consistent predictions, they are limited to in-domain and out-of-domain extrapolation of the computational domain of the specific instance for which they have been trained, and retraining is required for any out-of-domain scenarios, such as new parameter combinations, boundary conditions, initial conditions or external forcings.
[0003] In addition, PINNs still have many inherent limitations in the field of flood modeling, including: the point matching needs to meet the microscopic time step locked by the CFL condition (such as 1 second), which leads to the need to deal with large-scale PDE residual point matching (the number of matching points can reach billions) when performing spatiotemporal fine-grained modeling, making the training process extremely difficult; and it can only impose local physical constraints on adjacent microscopic time steps, resulting in the inability to accurately model long time series tasks (i.e., long-range dependency problems) when monitoring samples are insufficient; in addition, AD technology cannot guarantee the continuity of boundary fluxes of adjacent units in a highly spatially heterogeneous computational domain, which affects the accuracy, stability and convergence of the neural network, and the reasoning speed is also limited due to the use of microscopic time steps; Therefore, how to achieve real-time, accurate and physically accurate prediction of the spatiotemporal dynamics of floods under the conditions of sparse or even zero samples has become a key issue that needs to be urgently addressed in the field of flood modeling. Summary of the invention
[0004] The main technical problem to be solved by the present invention is how to achieve real-time, accurate and physically consistent prediction of the spatio-temporal dynamics of floods under the conditions of sparse samples or even zero samples.
[0005] According to a first aspect, in one embodiment, a training method for a generative physical distillation neural network is provided. The generative physical distillation neural network includes a spatio-temporal neural network and a shallow water equation solver, and the method includes: Obtain a training set for training the generative physical distillation neural network, where the training set involves different flood types, including initial conditions, boundary conditions, and source term and / or sink term conditions corresponding to each moment within a preset time period for different flood types; Input the training data in the training set into the spatio-temporal neural network in the generative physical distillation neural network to obtain a global prediction result for each moment; For any moment: Input the global prediction results corresponding to this moment and a preset number of moments before this moment into the shallow water equation solver for multi-path parallel inference to obtain multiple global simulation results corresponding to this moment, where the number of global simulation results is the preset number; According to the prediction results corresponding to each moment of multiple preset sampling points in the preset time period and the multiple simulation results corresponding to this moment, obtain a comprehensive loss function; Optimize the network parameters of the spatio-temporal neural network according to the comprehensive loss function to obtain a trained generative physical distillation neural network.
[0006] According to a second aspect, in one embodiment, a flood prediction method based on a generative physical distillation neural network is provided, including: Obtain network input data, where the network input data includes boundary conditions, initial conditions, and source term and / or sink term conditions at the current moment; Input the network input data into a pre-trained generative physical distillation neural network to obtain an output result of the generative physical distillation neural network; wherein, the pre-trained generative physical distillation neural network is obtained by the training method of the generative physical distillation neural network; Obtain a flood prediction result according to the output result of the generative physical distillation neural network.
[0007] A training method for a generative physical distillation neural network and a flood prediction method according to the above embodiments, wherein the generative physical distillation neural network GPDNN models a complex flood system through deep learning methods and macroscopic time steps, and combines a physical solver with microscopic time steps to generate physically consistent results; in this process, physics-based multi-path parallel reasoning is used to solve the long-range dependence problem; since GPDNN can distill prior knowledge in physical equations into a spatio-temporal neural network, it can ensure that the spatio-temporal neural network strictly adheres to the given physical laws and gets rid of the dependence on sample data, realizing real-time, accurate and physically consistent water depth prediction and flow field reconstruction under sparse samples or even zero samples, breaking through the shackles of scarce flood observation data on machine learning methods, and then realizing real-time, accurate and physically regular prediction of the spatio-temporal dynamics of floods. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a flowchart of a method for a training method of a generative physical distillation neural network; Figure 2 It is a flowchart of a flood prediction method based on a generative physical distillation neural network; Figure 3 It is a schematic diagram of the network architecture of a generative physical distillation neural network; Figure 4 It is a schematic diagram of the cumulative mean absolute error of water depth of different flood prediction methods during extrapolation inside and outside the domain; Figure 5 It is a schematic diagram of the cumulative mean absolute error of flow velocity of different flood prediction methods during extrapolation inside and outside the domain; Figure 6 It is a schematic diagram of the goodness of fit of water depth of different flood prediction methods during extrapolation inside and outside the domain; Figure 7 It is a schematic diagram of the goodness of fit of flow velocity of different flood prediction methods during extrapolation inside and outside the domain; Figure 8 It is a schematic diagram of the cumulative mean absolute error of water depth of different flood prediction methods during out-of-domain generalization; Figure 9 It is a schematic diagram of the cumulative mean absolute error of flow velocity of different flood prediction methods during out-of-domain generalization; Figure 10 It is a schematic diagram of the goodness of fit of water depth of different flood prediction methods during out-of-domain generalization; Figure 11 It is a schematic diagram of the goodness of fit of flow velocity of different flood prediction methods during out-of-domain generalization. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0009] The present invention will be further described in detail below in conjunction with the specific embodiments and the accompanying drawings. Similar elements in different embodiments are denoted by related similar element numbers. In the following embodiments, many detailed descriptions are provided to enable a better understanding of the present application. However, those skilled in the art can readily recognize that some of the features can be omitted in different situations, or can be replaced by other elements, materials, or methods. In some cases, some operations related to the present application are not shown or described in the specification, which is to avoid overwhelming the core part of the present application with excessive descriptions. For those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations based on the descriptions in the specification and the general technical knowledge in the art.
[0010] In addition, the features, operations, or characteristics described in the specification can be combined in any appropriate manner to form various embodiments. At the same time, the steps or actions in the method description can also be reordered or adjusted in an obvious manner by those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for clearly describing a certain embodiment, and do not mean that they are the necessary sequences, unless it is stated that a certain sequence must be followed.
[0011] The serial numbers assigned to the components herein, such as "first", "second", etc., are only used to distinguish the described objects and do not have any sequential or technical meaning. The terms "connected" and "coupled" used in the present application, unless otherwise specified, both include direct and indirect connections (couplings).
[0012] In numerical analysis, mathematical modeling, and engineering calculations, collocation points are a set of discrete points selected artificially to transform continuous mathematical problems (such as differential equations and integral equations) into solvable discrete equation systems. Essentially, they are specific position points selected from the problem domain (such as the research area), which can be uniformly, randomly, or adaptively distributed to cover the entire research area or key areas and are used to discretize continuous problems.
[0013] The SWE solver is widely used to describe the fluid motion in shallow water areas and thus constitutes the physical basis of most hydrodynamic flood models. When viscosity, turbulence, wind effects, and the Coriolis force are ignored, a complex flood system can be described by the following governing equations: where ∂ represents the partial derivative symbol; t corresponds to time; x and y represent the x - direction and y - direction in a two - dimensional Cartesian coordinate system; U represents a state variable defined over a research region Ω within a preset time period T; F is a column vector used to represent the flux in the x - direction; G is also a column vector used to represent the flux in the y - direction; S is a source term used to describe the influence of source / sink term conditions, initial conditions, and boundary conditions on the mass and momentum of the system; An embodiment of the present invention proposes a generative physical distillation neural network GPDNN, which is a general flood prediction model capable of predicting different flood types. It provides a two - time - scale physical - embedding neural network training framework, and its network architecture is as Figure 3 shown. The two key components of this neural network are: a spatio - temporal neural network that parameterizes physical processes and a shallow water equation (SWE) solver. The spatio - temporal neural network predicts the spatio - temporal dynamic changes of water depth and flow field of various flood types with a macroscopic time step; while the SWE solver driven by the spatio - temporal neural network simulates the physically - conserved solutions at different macroscopic time intervals with a microscopic time step; this SWE solver realizes discrete multi - path parallel generation for transmitting distilled physical knowledge to the spatio - temporal neural network, making the output of the spatio - temporal neural network physically consistent; by using deep learning methods with macroscopic time steps to model complex flood systems and using physical solvers with microscopic time steps to generate physically - consistent results, the prediction error is minimized, thereby seamlessly integrating mass and momentum conservation into the learning model to achieve real - time and physically - consistent flood prediction without observations.
[0014] Please refer to Figure 1 , in some embodiments, a training method for a generative physical distillation neural network is provided, which includes the following steps: Step S100: Obtain a training set for training the generative physical distillation neural network.
[0015] The training set in this embodiment involves different flood types, including initial conditions, boundary conditions corresponding to different flood types, and source and / or sink term conditions corresponding to each moment within a preset time period.
[0016] The flood types in this embodiment include at least three common flood types: dam - break flood, river flood, and urban flood; among them, the dam - break flood experiment is used to test the ability of the method in simulating rapid transient flow and complex hydraulic behavior; the research region scenario involved in this experiment includes a simple terrain, a 1 - m - wide dam opening, and a single building behind the dam; in this embodiment, 24 groups of initial upstream and downstream water depths and flow velocities are randomly generated, and simulations are carried out for 60 minutes using the finite volume method (FVM) and saved at 1 - minute resolution; then the preset time period corresponding to the dam - break flood type is 60 minutes; River flood experiments were used to examine the performance of the method in simulating large-scale and long-duration (72-hour) inundation events affected by natural river dynamics and variable terrain. Since this embodiment focuses on simulating hydrodynamic forces, the influence of bridges and culverts was ignored, and 32 sets of upstream boundary inflow rates and downstream boundary discharge-water level curves for the corresponding study area of the experiment were randomly generated. Each event lasted 72 hours, and water levels and flow velocities were recorded at 10-minute intervals. The preset time period corresponding to the river flood type is 72 hours at this time. Urban flood experiments triggered by rainstorms were used to evaluate the effectiveness of the method in a highly urbanized environment with intricate buildings and drainage facilities and rapid hydrological responses. In this embodiment, 32 measured rainfall events and designed rainfall events in the corresponding urban study area were obtained. Exemplarily, 20 measured rainfall events and 12 designed rainfall events could be obtained, and large-scale urban waterlogging simulations were carried out using traditional hydrodynamic models. Each event lasted 6 hours and was saved at 1-minute resolution. The preset time period corresponding to the urban flood type is 6 hours at this time. For each event corresponding to different flood types, in this embodiment, the SWE solver was discretized at high resolution by the finite volume method (FVM) to simulate the spatio-temporal evolution of different floods, thereby generating a large flood dataset as a benchmark reference solution. Among them, each set of data includes the initial conditions, boundary conditions, and source term and / or sink term conditions corresponding to each moment within the preset time period in its corresponding study area. Then, each flood type in this dataset was divided in a 1:1 ratio to obtain a training set and a test set. It should be noted that in flood prediction, the initial conditions refer to the initial state at the start of the calculation, including the initial values of physical quantities such as water level, flow velocity, and discharge. Boundary conditions are used to define the external constraints of the study area, such as the "high walls" at the outermost periphery of the study area (such as closed boundaries like flood control dikes and topographic watersheds that limit water flow crossing), building locations and heights (affecting the water flow path), river locations and initial or real-time water levels (such as open boundary conditions like upstream incoming water levels and estuary tidal levels). Source term / sink term conditions refer to various factors that affect the increase or decrease of water volume in the flood prediction model. Among them, the source term refers to the input factors causing floods, such as rainfall (forming surface runoff), upstream inflow (river water coming in or tributary confluence), etc.; the sink term refers to the output factors causing water flow reduction, such as drainage pipe networks (artificially draining accumulated water), infiltration, evaporation, and other natural loss processes.
[0017] Step S110: Input the training data in the obtained training set into the spatio-temporal neural network in the generative physical distillation neural network to obtain the global prediction results at each moment.
[0018] The spatio-temporal neural network in this embodiment has a macroscopic time step, which is used to capture multi-scale and non-linear spatio-temporal dependencies for flood spatio-temporal modeling; Exemplarily, a U-shaped recurrent neural network (U-RNN) can be used as the spatio-temporal neural network in this embodiment, which includes a backbone network and multiple multi-task decoupling heads, where the backbone network is an encoder-decoder structure, and both its encoder and decoder are composed of multiple convolutional gated recurrent units with skip connections; The multi-task decoupling head is used to classify and regress the output results of the backbone network, specifically including a classification branch and a regression branch, which are used to output the global prediction results corresponding to each moment, where the global prediction results include the predicted water depth values and the predicted flow velocity values corresponding to each position in the study area, and "each position" here corresponds to a collocation point. It should be noted that the predicted flow velocity values here include the predicted flow velocity values in the x-direction and y-direction in the two-dimensional Cartesian coordinate system.
[0019] Step S120: For any moment: Input the global prediction results corresponding to this moment and the preset number of moments before this moment into the shallow water equation solver for multi-path parallel inference to obtain multiple global simulation results corresponding to this moment.
[0020] The shallow water equation solver (SWE solver or SWE system) in this embodiment is driven by the output results of the spatio-temporal neural network and has a microscopic time step, which is used to receive the global prediction results corresponding to each moment and the preset number of moments before this moment of the spatio-temporal neural network, and perform multi-path parallel inference on the multiple global prediction results it receives to obtain multiple global simulation results corresponding to each moment, and realize data optimization through data supervision (optional) and physical distillation; Among them, the global simulation results include the simulated water depth values and the simulated flow velocity values corresponding to each position in the study area, and the simulated flow velocity values here also refer to the simulated flow velocity values corresponding to the x-direction and y-direction. Taking the t-th moment as an example, the preset number of moments before the t-th moment is used as the time series corresponding to the t-th moment. Among them, the preset number can be set according to the actual situation. Denote the preset number here as k, that is, the k moments before the t-th moment are used as the time series corresponding to the t-th moment, then the time series corresponding to the t-th moment is {t - k,..., t - 2, t - 1}. Obtain the macroscopic state variables of each moment (i.e., from the (t - k)-th moment to the (t - 1)-th moment) according to the global prediction result corresponding to the t-th moment and the global prediction results corresponding to each moment in the obtained time series. Exemplarily, assume that the global prediction result Ŷ = {h, u, v} at a certain moment, where h represents the predicted water depth value, u represents the predicted flow velocity value in the x direction, and v represents the predicted flow velocity value in the y direction; the global prediction result Ŷ is transformed into the corresponding macroscopic state variable Û = {h, hu, hv} at this moment, where hu represents the momentum density in the x direction, and this value is the product of the predicted water depth value h and the predicted flow velocity value u in the x direction; hv represents the momentum density in the y direction, and this value is the product of the predicted water depth value h and the predicted flow velocity value v in the y direction; here, according to the writing convention, the column vector form of the macroscopic state variable is written as a row vector form, and it is still a column vector in essence; Then, further calculate the corresponding fluxes in the x direction and y direction at this moment according to the global prediction result at this moment and the gravitational acceleration, and then obtain the corresponding source term at this moment; It should be noted that obtaining the state variable according to the global prediction result at a certain moment, including the predicted water depth value, the predicted flow velocity values in the x direction and y direction at this moment, and obtaining the corresponding fluxes in the x direction and y direction at this moment and the corresponding source term at this moment in combination with the gravitational acceleration is a well-known technology, which will not be elaborated here; Then, perform path reasoning respectively according to the macroscopic state variables at each moment in this time series to obtain the corresponding microscopic state variables at each moment in this time series; Exemplarily, for the (t - k)-th moment, the SWE solver is driven by the output of the neural network to generate a solution that conforms to physical conservation at the corresponding moment. It starts from the (t - k)-th moment and ends at the t-th moment for path reasoning. The macroscopic step (macroscopic length) between the start moment and the end moment is the difference between the t-th moment and the (t - k)-th moment, that is, the macroscopic step from the start moment t - k to the end moment t is k. And a macroscopic time step contains multiple microscopic time steps. If a macroscopic time step contains N microscopic time steps, then at this time the SWE solver can infer a path with a length of kN microscopic step lengths and obtain a solution at the t-th moment. The solution obtained at this time is a global simulation result at the t-th moment; In this embodiment, based on the physics-based multi-path parallel generation method, the physical knowledge in the SWE solver is distilled into the spatio-temporal neural network. The SWE solver is solved by FVM (finite volume method) to ensure mass and momentum conservation. Integrate the entire research area Ω over the corresponding time interval, and combine the explicit Euler integration and the Gauss divergence theorem to obtain the corresponding microscopic state variable at each moment; then for a single microscopic time step Δτ, for example, integrate the entire spatial domain Ω over the time interval [t - k, t - k + Δτ] starting from the (t - k)-th moment, and combine the explicit Euler integration and the Gauss divergence theorem. The corresponding equation can be discretized as: wherein, Ũ (t-k)->(t-k+Δτ) represents the microscopic state variable at a single microscopic time step starting from the (t - k)-th moment; Û t-k represents the macroscopic state variable corresponding to the (t - k)-th moment; Δτ represents the microscopic time step; |Ω| represents the volume of the entire spatial domain (study area); Q t-k ≡(F t-k , G t-k ), represents the boundary flux obtained by combining the flux F t-k in the x-direction and the flux G t-k in the y-direction corresponding to the (t - k)-th moment; S t-k represents the source term corresponding to the (t - k)-th moment; dΓ is the differential length along the boundary ∂Ω; By further discretizing the boundary flux, under the condition of the microscopic time step Δτ satisfying the CFL condition, the update of the state variable in the control spatial domain can be obtained; For the inference path from the (t - k)-th moment to the t-th moment, the time interval corresponding to this inference path is [t - k, t], and this inference path contains kN microscopic time steps. Then, integrating over this time interval and combining the explicit Euler integration and the Gauss divergence theorem, by accumulating the changes of multiple microscopic time steps, the microscopic state variable from the (t - k)-th moment to the t-th moment is obtained. The microscopic state variable at this time is called the microscopic state variable corresponding to this inference path, and this microscopic state variable is also the microscopic state variable corresponding to the (t - k)-th moment in this embodiment. Then: wherein, Ũ (t-k)->t represents the microscopic state variable corresponding to the (t - k)-th moment, and kN represents the microscopic length of the inference path corresponding to the (t - k)-th moment; l represents the l th microscopic time step; Then, according to the microscopic state variable corresponding to each moment in this time series, the solution corresponding to each moment in this time series is further obtained, and thus the global simulation result corresponding to each moment in this time series is obtained; Exemplarily, in this embodiment, the solution Ỹ (t-k)->t obtained by inferring from the (t - k)-th moment to the t-th moment is used as a global simulation result at the t-th moment; It should be noted that in this embodiment, parallel inference can be performed on each moment in the time series corresponding to the t-th moment to obtain multiple global simulation results corresponding to the t-th moment. Since each moment in the time series corresponding to the t-th moment corresponds to an inference path, and each inference path generates a global simulation result, the number of global simulation results corresponding to the t-th moment is the same as the number of moments included in the time series (i.e., the preset number k), that is, the t-th moment corresponds to k global simulation results. In this embodiment, the global prediction results from the 0-th moment to the (T - 1)-th moment within a preset time period can also be input into the SWE solver in parallel, so as to generate the state sequences corresponding to the macroscopic time step intervals at each moment at one time. Among them, when t ≤ k, all the moments before the t-th moment constitute the time series corresponding to the t-th moment at this time. For example, for the 1-st moment, the time series corresponding to this moment only includes the 0-th moment, corresponding to generating 1 inference path. When t > k, the k moments before the t-th moment constitute the time series corresponding to the t-th moment at this time, corresponding to generating k inference paths. Therefore, after parallelly inputting the global prediction results from the 0-th moment to the (T - 1)-th moment into the SWE solver, each moment corresponds to generating min{t, k} inference paths and obtaining the global simulation results corresponding to each inference path, so as to improve the calculation efficiency.
[0021] Step S130: Obtain a comprehensive loss function according to the prediction results corresponding to multiple preset sampling points at each moment in the preset time period and the multiple simulation results corresponding to this moment.
[0022] When the existing flood prediction method trains a neural network to have the ability to predict water depth and flow velocity, it must give the observed water depth and flow velocity data during training. By obtaining the actual observed results corresponding to all sampling points in the entire study area, and then comparing the actual observed results of all sampling points with the prediction results output by the flood prediction model to construct a loss function. However, since GPDNN distills the knowledge in the physical equation into the spatio-temporal neural network and can obtain the global prediction results of the entire study area, that is, it can obtain the prediction results at different positions in the entire study area. Therefore, in this embodiment, a comprehensive loss function can be constructed under sparse sample conditions (that is, obtaining the actual observed results of the water depth and flow velocity of a small number of sampling points) or even zero sample conditions (that is, without the actual data of water depth and flow velocity, only basic data such as rainfall, inflow, and terrain are required). The comprehensive loss function in this embodiment includes data loss, multi-path physical loss, boundary condition loss, and initial condition loss. Among them, the data loss is used to evaluate the prediction error of the spatio-temporal neural network. That is, the data loss is constructed according to the prediction results corresponding to each preset sampling point at each moment and their corresponding actual observation results. That is, the prediction error of the spatio-temporal neural network is evaluated based on the differences between the predicted water depth values, the predicted flow velocity values in the x direction, and the predicted flow velocity values in the y direction corresponding to each preset sampling point at each moment, and the true water depth values, the true flow velocity values in the x direction, and the true flow velocity values in the y direction corresponding to the preset sampling point at each moment, so as to ensure a good fit of the spatio-temporal neural network to the known data. Then the data loss can be expressed as: Among them, L data represents the data loss; N d represents the number of preset sampling points; T represents the total duration of the preset time period; Ŷ t,i represents the prediction result corresponding to the i-th preset sampling point at the t-th moment, which is a vector composed of the predicted water depth value, the predicted flow velocity value in the x direction, and the predicted flow velocity value in the y direction corresponding to the preset sampling point at this moment; Y t,i represents the actual observation result corresponding to the i-th preset sampling point at the t-th moment, which is a vector composed of the true water depth value, the true flow velocity value in the x direction, and the true flow velocity value in the y direction corresponding to the preset sampling point at this moment; the symbol represents the square of the Euclidean norm; The multi-path physical loss is used to evaluate the physical consistency between the spatio-temporal neural network and the shallow water equation solver based on the parallel inference of multiple paths of the shallow water equation solver; Specifically, for any moment within the preset time period, the path weight coefficient corresponding to each global simulation result at this moment is obtained. Since the path length generated by the physical solver is inversely proportional to the inference error, in this embodiment, the path weight coefficient corresponding to each global simulation result is obtained according to the macroscopic length of the inference path corresponding to each global simulation result, and the longer the macroscopic length of the inference path, the larger the corresponding path weight coefficient, thus solving the long-range dependence problem, so that even in the case of insufficient monitoring samples, long-time series tasks can still be accurately modeled; then, according to the predicted water depth value and flow velocity value of each preset sampling point at this moment, the multiple water depth simulation values and flow velocity simulation values corresponding to this moment, and the path weight coefficient corresponding to each global simulation result, the physical loss corresponding to the preset sampling point at this moment is obtained; finally, the multi-path physical loss is obtained according to the physical losses corresponding to all preset sampling points within the preset time period at all moments within the preset time period; then the multi-path physical loss in this embodiment can be expressed as: Among them, L phy represents the physical loss,N d represents the number of preset sampling points; T represents the total duration of the preset time period; min(t, k) represents taking the minimum value of the numerical values t and k; r j represents the path weight coefficient corresponding to the (t - j)-th moment, and this value is equal to 1 - α j , where j corresponds to the macroscopic length of the (t - j)-th moment, and 0 < α < 1; Ỹ (t-j)->t,i represents a simulation result corresponding to the i-th preset sampling point at the t-th moment. This simulation result is the solution obtained from the inference path corresponding to the time period from the (t - j)-th moment to the t-th moment, and it is a vector composed of the water depth simulation value, the flow velocity simulation value in the x direction, and the flow velocity simulation value in the y direction obtained by inferring from the (t - j)-th moment to the t-th moment for this preset sampling point; In this embodiment, sampling points on the boundary are further extracted from multiple preset sampling points, and a boundary condition loss is constructed based on the prediction results corresponding to the sampling points on the boundary to evaluate the prediction accuracy of the spatio-temporal neural network at the boundary. Then: where, L boundary represents the boundary condition loss; N b represents the number of preset sampling points on the boundary; T represents the total duration of the preset time period; B represents a boundary condition operator used to describe specific physical boundary conditions, such as building or computational domain boundaries; Ŷ t,p represents the prediction result corresponding to the p-th preset sampling point on the boundary at the t-th moment, and it is a vector composed of the water depth prediction value, the flow velocity prediction value in the x direction, and the flow velocity prediction value in the y direction corresponding to this preset sampling point at this moment; The initial condition loss is used to constrain the global prediction result of the spatio-temporal neural network at the initial moment (i.e., the moment t = 0). Then: where, L initial represents the initial condition loss, N d represents the number of preset sampling points; T represents the total duration of the preset time period; Ŷ 0,i represents the prediction result corresponding to the i-th preset sampling point at the initial moment, and it is a vector composed of the water depth prediction value, the flow velocity prediction value in the x direction, and the flow velocity prediction value in the y direction corresponding to this preset sampling point at the initial moment; Y 0,i represents the actual observation result corresponding to the i-th preset sampling point at the initial moment, and it is a vector composed of the true water depth value, the true flow velocity value in the x direction, and the true flow velocity value in the y direction corresponding to this preset sampling point at the initial moment; A comprehensive loss function is constructed based on the obtained data loss, multipath physical loss, boundary condition loss, and initial condition loss. The comprehensive loss function in this embodiment can be expressed as: L=a×L data +b×L phy +c×L boundary +d×L initial Wherein, L represents the comprehensive loss function, a, b, c, and d are the weights corresponding to data loss, multipath physical loss, boundary condition loss, and initial condition loss, respectively, which are used to balance the impact of each loss item. Their values can be set according to actual needs; “×” represents the product.
[0023] Step S140: Optimize the network parameters of the spatiotemporal neural network according to the obtained comprehensive loss function to obtain a trained generative physical distillation neural network.
[0024] This embodiment optimizes the network parameters of the spatiotemporal neural network by minimizing the comprehensive loss function, thereby obtaining a trained generative physical distillation neural network; wherein, since the gradient used for back propagation is independent of the SWE solver, the calculation graph and gradient information of the SWE solver do not need to be retained in this embodiment to reduce the GPU video memory requirement.
[0025] The main tasks of flood modeling include retrospective deduction of historical events and prediction of future / unseen flood events, including forward extrapolation of in-domain scenarios and generalization of out-of-domain scenarios. The GPDNN in this embodiment mainly distills the known hydrodynamic laws of SWE into a trainable neural network to predict flood dynamic changes.
[0026] Among them, retrospective deduction of a flood event that has occurred using a small amount (or even no) of monitoring point / water depth data, that is, the extrapolation of the SWE system, is undoubtedly the cornerstone of flood modeling. It requires the model to find a function in the time-space domain Ω×[0, T] to satisfy the hydrodynamics described by the SWE system, as well as the related source / sink conditions, initial conditions and boundary conditions; In order to examine the capabilities of different flood prediction methods in various water depth monitoring data availability scenarios, this example further considers different proportions of points, including 0, 0.1%, 1% and 10%. The importance sampling based on flow velocity is used to obtain {0, 10 4 , 10 5 , 10 6} points, and importance sampling based on DEM (digital elevation model) was used to obtain {0, 10 4 , 10 5 , 10 6} and {0, 105 , 10 6 , 10 7} scoring points; Then, GPDNN is compared with existing flood spatio-temporal modeling methods (baseline methods), such as U-RNN (spatio-temporal neural network), FNO (Fourier neural operator), and PINN (physics-informed neural network), where U-RNN and FNO are data-driven discrete and continuous learning neural network paradigms respectively, while PINN is a continuous learning paradigm that embeds physical equations into neural networks; To test the accuracy and physical consistency of each flood spatio-temporal modeling method in flood system extrapolation, this embodiment further calculates the cumulative mean absolute error and goodness of fit (R 2 ) of the prediction results corresponding to different flood spatio-temporal modeling methods, where the goodness of fit is used to characterize the physical consistency between different prediction interval steps; Taking dam-break flood as an example, flood prediction (in-domain and out-of-domain extrapolation) is carried out through ① GPDNN, ② U-RNN, ③ FNO, and ④ PINN, and the cumulative mean absolute errors of the water depth and flow field corresponding to the obtained prediction results are respectively as Figure 4 , Figure 5 shown; the physical consistency of the water depth and flow field corresponding to this flood type between different prediction interval steps is respectively as Figure 6 , Figure 7 shown; the results show that in the extrapolation of the above three flood types, the water depth and flow velocity solutions obtained by GPDNN are in good agreement with the reference solutions; in contrast, PINN can only give an overly smooth overall trend with large differences in details; U-RNN almost predicts the water depth according to the terrain, but fails in the prediction of flow velocity; FNO completely fails in the prediction of water depth and flow velocity; and the cumulative mean absolute error of GPDNN is one order of magnitude smaller than that of the baseline methods (baselines), and it is the only method that realizes global physical consistency (R 2 close to 1) at any interval time step.
[0027] A good model can perform direct forward inference on the spatio-temporal dynamic changes of unseen flood events, that is, the generalization of the SWE system. Since PINN does not have the generalization ability, it is excluded; In this embodiment, different flood prediction methods are used to predict future or unseen flood events (such as flood events in the prediction set) under the condition of different proportions of collocation points. For example, using a large amount of monitoring data (10 6 -10 7The baseline method under the condition of [[ID=]], and the flood prediction performed by GPDNN under the zero-shot condition; taking river floods as an example, through ① GPDNN, ② U-RNN, and ③ FNO, flood inference (out-of-domain generalization) is performed for unseen events, and the cumulative mean absolute errors of the water depth and flow field corresponding to the obtained prediction results are respectively as Figure 8 , Figure 9 shown; for the physical consistency between the water depth and flow field corresponding to this flood type at different prediction interval steps, they are respectively as Figure 10 , Figure 11 shown; the results show that the cumulative mean absolute error of GPDNN is much smaller than the baseline method, highly conforms to physical laws, and its zero-shot generalization ability far exceeds data-driven methods that rely on a large number of measurements, verifying that GPDNN can solve the significant spatio-temporal variations of various flood types accurately and satisfy physical consistency under zero-shot conditions; It should be noted that GPDNN is not only effective in complex flood systems, but this model is also applicable to other types of spatio-temporal partial differential equation systems, such as the basic atmospheric equation system, the pollutant advection-diffusion-reaction equation system, and the seismic wave equation system, etc.; This embodiment proposes a generative physical distilled neural network GPDNN, which models complex flood systems through deep learning methods and macroscopic time steps, combines a physical solver (SWE solver) with microscopic time steps to generate physically consistent results; and solves the long-range dependence problem based on physical multi-path parallel inference; and because GPDNN can distill the prior knowledge in physical equations into spatio-temporal neural networks, it ensures that the spatio-temporal neural networks strictly abide by the given physical laws; GPDNN, as a discrete learning model, is significantly superior to continuous learning models represented by PINNs and FNO in the performance of extrapolating historical events and generalizing future events for various flood types. Compared with the existing data-driven FNO and physical-embedded neural network method PINNs that use dozens to hundreds of samples for supervised training, the prediction error of the generative physical distilled neural network GPDNN in this embodiment is 1-2 orders of magnitude less under zero-shot conditions, and the prediction results have global physical consistency. Therefore, GPDNN in this embodiment gets rid of the dependence on sample data and realizes real-time, accurate, and physically consistent water depth prediction and flow field reconstruction under sparse samples or even zero samples, breaking through the shackles of scarce flood observation data on machine learning methods. In addition, since GPDNN in this embodiment is 3 orders of magnitude faster than numerical methods, GPDNN can perform flood prediction more efficiently.
[0028] Please refer to Figure 2 , in some embodiments, a flood prediction method based on a generative physical distilled neural network is provided, which includes the following steps: Step S200: Obtain network input data, where the network input data includes boundary conditions, initial conditions, and source term and / or sink term conditions at the current moment; Step S210: Input the obtained network input data into a pre-trained generative physical distillation neural network to obtain the output result of the generative physical distillation neural network.
[0029] Among them, the pre-trained generative physical distillation neural network is obtained by the training method of the above-mentioned generative physical distillation neural network.
[0030] Step S220: Obtain the flood prediction result according to the output result of the generative physical distillation neural network.
[0031] This embodiment is based on the generative physical distillation neural network to uniformly predict different flood types, thereby realizing real-time, accurate, and physically regular prediction of the flood spatio-temporal dynamics; at this time, the output result of the GPDNN is the flood prediction result.
[0032] Those skilled in the art can understand that all or part of the functions of the above methods can be implemented in a hardware manner or in a computer program manner. When all or part of the functions in the above embodiments are implemented in a computer program manner, the program can be stored in a computer-readable storage medium. The storage medium can include: read-only memory, random access memory, magnetic disk, optical disk, hard disk, etc. The above functions can be realized by a computer executing the program. For example, store the program in the memory of the device, and when the processor executes the program in the memory, the above all or part of the functions can be realized. In addition, when all or part of the functions in the above embodiments are implemented in a computer program manner, the program can also be stored in a storage medium such as a server, another computer, magnetic disk, optical disk, flash drive, or mobile hard disk, downloaded or copied and saved to the memory of the local device, or the system of the local device can be updated. When the processor executes the program in the memory, the above all or part of the functions in the above embodiments can be realized.
[0033] The above uses specific examples to elaborate on the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art of the present invention, based on the idea of the present invention, several simple deductions, deformations, or substitutions can be made.
Claims
1. A training method for a generative physical distillation neural network, wherein the generative physical distillation neural network includes a spatio-temporal neural network and a shallow water equation solver, characterized in that, Further comprising: Obtaining a training set for training the generative physical distillation neural network, wherein the training set involves different flood types, including initial conditions, boundary conditions, and source term and / or sink term conditions corresponding to each moment within a preset time period for different flood types; Inputting the training data in the training set into the spatio-temporal neural network in the generative physical distillation neural network to obtain a global prediction result for each moment; For any given moment: Inputting the global prediction results corresponding to this moment and a preset number of moments before this moment into a shallow water equation solver for multi-path parallel inference to obtain multiple global simulation results corresponding to this moment, where the number of the global simulation results is the preset number; Obtaining a comprehensive loss function according to the prediction results corresponding to each moment of multiple preset sampling points within the preset time period and the multiple simulation results corresponding to this moment; Optimizing the network parameters of the spatio-temporal neural network according to the comprehensive loss function to obtain a trained generative physical distillation neural network.
2. The training method for a generative physical distillation neural network according to claim 1, characterized in that, The spatio-temporal neural network has a macroscopic time step for outputting a global prediction result corresponding to each moment, and the global prediction result includes the predicted water depth value and the predicted flow velocity value corresponding to each position in the study area; the shallow water equation solver is driven by the output result of the spatio-temporal neural network and has a microscopic time step for receiving the global prediction results corresponding to each moment and a preset number of moments before this moment in the spatio-temporal neural network, and performing multi-path parallel inference on the multiple global prediction results to obtain multiple global simulation results corresponding to each moment, and the global simulation result includes the simulated water depth value and the simulated flow velocity value corresponding to each position in the study area.
3. The training method for a generative physical distillation neural network according to claim 2, characterized in that, The "For any given moment: Inputting the global prediction results corresponding to this moment and a preset number of moments before this moment into a shallow water equation solver for multi-path parallel inference to obtain multiple global simulation results corresponding to this moment" includes: For the t-th moment, taking a preset number of moments before the t-th moment as the time series corresponding to the t-th moment; obtaining the macroscopic state variables of each moment according to the global prediction result corresponding to the t-th moment and the global prediction results corresponding to each moment in the time series; performing path inference respectively according to the macroscopic state variables of each moment in the time series to obtain the microscopic state variables corresponding to each moment in the time series; obtaining the global simulation results corresponding to each moment in the time series according to the microscopic state variables corresponding to each moment in the time series; Taking the global simulation results corresponding to each moment in the time series as the multiple global simulation results corresponding to the t-th moment.
4. The training method for a generative physical distillation neural network according to claim 1, characterized in that, The comprehensive loss function includes data loss, multi-path physical loss, boundary condition loss, and initial condition loss. Among them, the data loss is used to evaluate the prediction error of the spatio-temporal neural network; the multi-path physical loss is used to evaluate the physical consistency between the spatio-temporal neural network and the shallow water equation solver based on the parallel inference of multiple paths of the shallow water equation solver; the boundary condition loss is used to evaluate the prediction accuracy of the spatio-temporal neural network at the boundary; the initial condition loss is used to constrain the global prediction result of the spatio-temporal neural network at the initial moment.
5. The training method for a generative physical distillation neural network according to claim 4, characterized in that, The multi-path physical loss is used to evaluate the physical consistency between the spatio-temporal neural network and the shallow water equation solver based on the parallel inference of multiple paths of the shallow water equation solver, including: At any moment within a preset time period, obtain the path weight coefficient corresponding to each global simulation result at this moment; obtain the physical loss corresponding to this preset sampling point at this moment according to the water depth prediction value and flow velocity prediction value of each preset sampling point at this moment, the multiple water depth simulation values and flow velocity simulation values corresponding to this moment, and the path weight coefficient corresponding to each global simulation result; obtain the multi-path physical loss according to the physical losses corresponding to all preset sampling points within the preset time period at all moments within the preset time period.
6. The training method for a generative physical distillation neural network according to claim 5, characterized in that, The obtaining of the path weight coefficient corresponding to each global simulation result at this moment includes: among the multiple global simulation results corresponding to this moment, each global simulation result corresponds to an inference path; obtain the macroscopic length of the inference path corresponding to each global simulation result; obtain the path weight coefficient corresponding to this global simulation result according to the macroscopic length of the inference path corresponding to each global simulation result.
7. The training method for a generative physical distillation neural network according to claim 6, characterized in that, The obtaining of the macroscopic length of the inference path corresponding to each global simulation result includes: obtain the time series corresponding to this moment; for any global simulation result corresponding to this moment, obtain the macroscopic length of the inference path corresponding to the global simulation result according to the difference between this moment and the corresponding moment of this global simulation result in the time series.
8. A flood prediction method based on a generative physical distillation neural network, characterized in that, Including: Obtain network input data, where the network input data includes boundary conditions, initial conditions, and source term and / or sink term conditions at the current moment; Input the network input data into a pre-trained generative physical distillation neural network to obtain the output result of the generative physical distillation neural network; among them, the pre-trained generative physical distillation neural network is obtained by the training method of the generative physical distillation neural network described in any one of claims 1-7; Obtain the flood prediction result according to the output result of the generative physical distillation neural network.
9. The flood prediction method based on a generative physical distillation neural network according to claim 8, characterized in that, The generative physical distillation neural network is used to predict different flood types; the different flood types at least include dam-break flood, river flood, and urban flood.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the medium, and the computer program can be executed by a processor to implement the method described in any one of claims 1-9.
Citation Information
Patent Citations
Traffic flow prediction method and device based on bidirectional distillation network
CN115631631A
River hydrodynamic agent model establishment method based on Fourier neural operator
CN117669424A
Rapid Deep Learning-Based Flood Losses / Risk Prediction Tool, Methods of Making and Uses Thereof
US20250060512A1
Cited By
Neural network model construction method and device for gas turbine performance prediction
CN120930695A
Meteorological radar image sequence prediction method based on self-adaptive physical equation embedding
CN121115172A
A method and system for equation decomposition and neural network coupled solution for mesoscale weather
CN122509031A