A training method for generative physical distillation neural networks and flood prediction method

By combining the generative physical distillation neural network (GPDNN) with a spatiotemporal neural network and a shallow water equation solver, the flood prediction problem under sparse or zero sample conditions is solved, and real-time, accurate and physically consistent spatiotemporal dynamic prediction of floods is achieved, breaking through the limitations of existing methods.

CN120180946BActive Publication Date: 2025-09-16PEKING UNIV SHENZHEN GRADUATE SCHOOL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510660431.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-09-16
Estimated Expiration
2045-05-22

AI Technical Summary

Technical Problem

Existing flood prediction methods are difficult to achieve real-time, accurate and physically consistent spatiotemporal dynamic flood prediction under sparse or zero sample conditions, especially lacking accuracy and stability in long time series tasks.

Method used

The generative physical distillation neural network (GPDNN) is used, combined with a spatiotemporal neural network and a shallow water equation solver. Through macroscopic time step modeling and parallel reasoning, multi-path parallel generation of physically consistent results is used to achieve flood prediction.

Benefits of technology

Real-time, accurate and physically consistent flood forecasting is achieved under sparse or even zero sample conditions, breaking through the dependence on sample data, improving computing efficiency, and achieving accuracy and physical consistency for long time series tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180946B_ABST
    Figure CN120180946B_ABST
Patent Text Reader

Abstract

A training method for a generative physical distillation neural network and a flood prediction method are described. The generative physical distillation neural network comprises a spatiotemporal neural network and a shallow water equation solver. First, the training set of the generative physical distillation neural network is input into the spatiotemporal neural network to obtain a global prediction result at each moment. The shallow water equation solver then performs multi-path parallel reasoning at each moment to obtain multiple corresponding global simulation results. This constructs a comprehensive loss function, resulting in a trained generative physical distillation neural network. Based on this generative physical distillation neural network, flood prediction results are obtained. By combining a spatiotemporal neural network with a macroscopic time step and a physical solver with a microscopic time step, combined with multi-path parallel reasoning, this method achieves real-time, accurate, and physically consistent water depth prediction and flow field reconstruction under zero-shot conditions, resulting in real-time, accurate, and physically consistent predictions of flood spatiotemporal dynamics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of flood prediction, and in particular to a training method for a generative physical distillation neural network and a flood prediction method. Background Art

[0002] Floods are the most frequent natural disaster in recent years, and their causes are complex and diverse, including heavy rain, river overflows, and dam breaches. Existing methods typically use the two-dimensional shallow water equation (SWE) to describe the spatiotemporal dynamic evolution of complex flood systems. Classical numerical solvers, such as the finite volume method (FVM), can accurately solve the shallow water equation under high spatiotemporal resolution discretization, and the simulation results conform to the laws of physics. However, they are limited by the stability (CFL) condition, and the computational overhead of large-scale spatiotemporal simulations increases exponentially, resulting in high computational costs. Deep learning (DL) requires automatically learning complex nonlinear relationships between variables from a large amount of labeled data. Although it is not restricted by the CFL condition, the prediction results cannot guarantee physical consistency, and due to the sparse distribution of flow meters, it lacks sufficient measured hydrological data.

[0003] Emerging scientific modeling paradigms that combine physical knowledge with machine learning, such as embedding partial differential equations (PDEs) into machine learning, take physical information neural networks (PINNs) as an example. They use automatic differentiation (AD) technology to evaluate PDE residuals at microscopic time steps to learn a continuous solution space. Although PINNs can provide accurate and physically consistent predictions, they are limited to extrapolation within the computational domain of the specific trained instance. For any out-of-domain scenarios, such as new parameter combinations, boundary conditions, initial conditions or external forcings, retraining is required.

[0004] In addition, PINNs still have many inherent limitations in the field of flood modeling. These include: the point matching must meet the microscopic time step locked by the CFL condition (such as 1 second), which results in the need to process 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 between adjacent cells in a highly spatially heterogeneous computational domain, which affects the accuracy, stability and convergence of the neural network. The use of microscopic time steps also limits the inference speed.

[0005] Therefore, how to achieve real-time, accurate and physically accurate prediction of the spatiotemporal dynamics of floods under 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

[0006] The main technical problem solved by the present invention is how to achieve real-time, accurate and physically-compliant prediction of the spatiotemporal dynamics of floods under conditions of sparse samples or even zero samples.

[0007] According to a first aspect, an embodiment provides a training method for a generative physical distillation neural network, wherein the generative physical distillation neural network includes a spatiotemporal neural network and a shallow water equation solver, including:

[0008] 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 and / or sink conditions corresponding to the different flood types at each moment within a preset time period;

[0009] Inputting the training data in the training set into the spatiotemporal neural network in the generative physical distillation neural network to obtain a global prediction result at each moment;

[0010] For any moment: input the global prediction results corresponding to the moment and a preset number of moments before the moment into the shallow water equation solver for multi-path parallel reasoning to obtain multiple global simulation results corresponding to the moment, where the number of global simulation results is the preset number;

[0011] Obtaining a comprehensive loss function based on the prediction results corresponding to the multiple preset sampling points at each moment in the preset time period and the multiple simulation results corresponding to the moment;

[0012] The network parameters of the spatiotemporal neural network are optimized according to the comprehensive loss function to obtain a trained generative physical distillation neural network.

[0013] According to the second aspect, an embodiment provides a flood prediction method based on a generative physical distillation neural network, comprising:

[0014] Acquiring network input data, wherein the network input data includes boundary conditions, initial conditions, and source and / or sink conditions at a current moment;

[0015] Inputting 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;

[0016] A flood prediction result is obtained according to the output result of the generative physical distillation neural network.

[0017] According to the above-mentioned embodiment, a training method for a generative physical distillation neural network and a flood prediction method are provided, wherein the generative physical distillation neural network GPDNN models a complex flood system through a deep learning method and a macroscopic time step, and combines a physical solver with a microscopic time step to generate physically consistent results; in this process, multi-path parallel reasoning based on physics solves the long-range dependency problem; because GPDNN can distill the prior knowledge in the physical equations into the spatiotemporal neural network, it can ensure that the spatiotemporal neural network strictly abides by 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 the scarcity of flood observation data on machine learning methods, and thus realizing real-time, accurate and physically consistent prediction of the spatiotemporal dynamics of floods. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a method for training a generative physical distillation neural network;

[0019] Figure 2 This is a flow chart of a flood prediction method based on a generative physical distillation neural network;

[0020] Figure 3 Schematic diagram of the network architecture of the generative physical distillation neural network;

[0021] Figure 4 Schematic diagram of the cumulative mean absolute error of water depth for different flood prediction methods when extrapolating within the domain;

[0022] Figure 5 Schematic diagram of the cumulative mean absolute error of flow velocity for different flood prediction methods when extrapolating within the domain;

[0023] Figure 6 Schematic diagram of the water depth fitting goodness of different flood prediction methods when extrapolating within the domain;

[0024] Figure 7 Schematic diagram of the goodness of fit of flow velocity of different flood prediction methods when extrapolating within the domain;

[0025] Figure 8 Schematic diagram of the cumulative mean absolute error of water depth for different flood prediction methods when generalized outside the domain;

[0026] Figure 9 Schematic diagram of the cumulative mean absolute error of flow velocity of different flood prediction methods when generalized outside the domain;

[0027] Figure 10 Schematic diagram of the water depth fitting goodness of different flood prediction methods when generalized outside the domain;

[0028] Figure 11 Schematic diagram of the flow velocity fitting goodness of different flood prediction methods when generalized outside the domain. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below by means of specific embodiments in conjunction with the accompanying drawings. Similar elements in different embodiments are numbered with associated similar elements. In the following embodiments, many detailed descriptions are provided to enable the present application to be better understood. However, those skilled in the art will readily appreciate that some of the features may be omitted in different circumstances, or may 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. This is to avoid the core portion of the present application being overwhelmed by excessive descriptions, and for those skilled in the art, it is not necessary to describe these related operations in detail. They will fully understand the related operations based on the description in the specification and the general technical knowledge in the art.

[0030] In addition, the features, operations, or characteristics described in the specification may be combined in any appropriate manner to form various embodiments. Furthermore, the steps or actions in the method description may be reordered or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various sequences in the specification and drawings are provided solely for the purpose of clearly describing a particular embodiment and are not intended to be mandatory, unless otherwise specified.

[0031] Component numbers used herein, such as "first" and "second," are used solely to distinguish the components being described and do not convey any sequential or technical meaning. References to "connection" and "coupling" in this application, unless otherwise specified, include both direct and indirect connections (couplings).

[0032] 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 a solvable discrete system of equations. In essence, collocation points are specific location points (which can be uniformly, randomly, or adaptively distributed) selected from the problem definition domain (such as the study area) to cover the entire study area or key areas and are used to discretize continuous problems.

[0033] The SWE solver is widely used to describe fluid motion in shallow waters and thus forms the physical basis of most hydrodynamic flood models. When viscosity, turbulence, wind effects, and Coriolis forces are neglected, complex flood systems can be described by the following governing equations:

[0034]

[0035] Where ∂ represents the sign of the partial derivative; t corresponds to time; x and y represent the x- and y-directions in the two-dimensional Cartesian coordinate system; U represents the state variable defined on the study area Ω within the preset time period T; F is a column vector representing the flux in the x-direction; G is also a column vector representing the flux in the y-direction; S is the source term, which describes the influence of source / sink conditions, initial conditions, and boundary conditions on the mass and momentum of the system;

[0036] The embodiment of the present invention proposes a generative physical distillation neural network GPDNN, which is a universal flood prediction model that can predict different flood types. It provides a dual-time-scale physical embedding neural network training framework. Its network architecture is as follows: Figure 3 As shown in the figure, the two key components of the neural network are: a spatiotemporal neural network that parameterizes the physical process and a shallow water equation (SWE) solver, where the spatiotemporal neural network predicts the spatiotemporal dynamic changes of water depth and flow field of various flood types with macroscopic time steps; and the SWE solver driven by the spatiotemporal neural network simulates the physical conservation solutions of different macroscopic time intervals with microscopic time steps; the SWE solver realizes discretized multi-path parallel generation, which is used to pass the distilled physical knowledge to the spatiotemporal neural network, so that the output of the spatiotemporal neural network is physically consistent; by modeling complex flood systems through deep learning methods and macroscopic time steps and generating physically consistent results through physical solvers and microscopic time steps to minimize prediction errors, the conservation of mass and momentum is seamlessly integrated into the learning model, realizing real-time and physically consistent flood prediction without observation.

[0037] Please refer to Figure 1 In some embodiments, a method for training a generative physical distillation neural network is provided, which includes the following steps:

[0038] Step S100: Obtain a training set for training the generative physical distillation neural network.

[0039] The training set in this embodiment involves different flood types, including initial conditions and boundary conditions corresponding to different flood types, and source and / or sink conditions corresponding to each moment in a preset time period.

[0040] The flood types in this embodiment include at least three common flood types: dam-break floods, river floods, and urban floods. The dam-break flood experiment is used to test the method's ability to simulate rapid transient flows and complex hydraulic behavior. The study area scenario involved in this experiment includes a simple terrain, a 1-meter-wide dam mouth, and a single building behind the dam. This embodiment randomly generates 24 sets of initial upstream and downstream water depths and flow rates, uses the finite volume method (FVM), and performs a 60-minute simulation, which is saved at a 1-minute resolution. The preset time period corresponding to the dam-break flood type is 60 minutes.

[0041] The river flood experiment was used to examine the method's performance in simulating large-scale, long-duration (72-hour) inundation events influenced by natural river dynamics and changing topography. Since this example focused on simulating hydrodynamics, the effects of bridges and culverts were ignored. 32 sets of inflows at the upstream boundary and flow-level curves at the downstream boundary of the study area were randomly generated. Each event lasted 72 hours, and water levels and flow velocities were recorded at a 10-minute interval. The preset time period corresponding to the river flood type in this case was 72 hours.

[0042] The urban flooding experiment, triggered by heavy rain, is used to evaluate the effectiveness of the method in highly urbanized environments with complex buildings and drainage facilities and rapid hydrological responses. This example obtains 32 measured rainfall events and designed rainfall events in the corresponding urban study area. For example, 20 measured rainfall events and 12 designed rainfall events are obtained, and large-scale urban waterlogging simulations are performed using a traditional hydrodynamic model. Each event lasts for 6 hours and is saved at a resolution of 1 minute. The preset time period corresponding to the urban flood type is 6 hours.

[0043] For each event corresponding to different flood types, this embodiment further discretizes the SWE solver with high resolution using the finite volume method (FVM) to simulate the spatiotemporal evolution of different floods, thereby generating a large flood dataset as a benchmark reference solution;

[0044] Each set of data includes the initial conditions and boundary conditions of the corresponding study area, as well as the source and / or sink conditions at each moment in a preset time period. Each flood type in the dataset is then divided into a training set and a test set in a 1:1 ratio.

[0045] It should be noted that in flood prediction, initial conditions refer to the initial state when the calculation begins, including the initial values ​​of physical quantities such as water level, flow velocity, and flow; boundary conditions are used to define the external constraints of the study area, such as the "high walls" on the outermost edge of the study area (such as closed boundaries such as flood embankments and terrain watersheds, which will restrict water flow), building location and height (affecting the water flow path), river location and initial or real-time water level (such as upstream water level, tidal water level at the estuary, and other open boundary conditions); source / sink conditions refer to various factors that affect the increase or decrease of water volume in the flood prediction model, among which source terms refer to input factors that cause floods, such as rainfall (forming surface runoff), upstream inflow (river water or tributary inflow), etc.; sink terms refer to output factors that cause water flow reduction, such as drainage networks (artificial drainage of accumulated water), infiltration, evaporation and other natural loss processes.

[0046] Step S110: input the training data in the obtained training set into the spatiotemporal neural network in the generative physical distillation neural network to obtain the global prediction result at each moment.

[0047] The spatiotemporal neural network in this embodiment has a macroscopic time step, which is used to capture multi-scale, nonlinear spatiotemporal dependencies for flood spatiotemporal modeling; illustratively, a U-type recurrent neural network U-RNN can be used as the spatiotemporal neural network in this embodiment, which includes a backbone network and multiple multi-task decoupling heads, wherein the backbone network is an encoding-decoding structure, and its encoder and decoder are both composed of multiple jump-connected convolutional gated recurrent units; 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 result corresponding to each moment, wherein the global prediction result includes the corresponding water depth prediction value and flow velocity prediction value at each location in the study area, and "each location" here corresponds to a distribution point;

[0048] It should be noted that the flow velocity prediction value here includes the flow velocity prediction values ​​in the x direction and the y direction in the two-dimensional Cartesian coordinate system.

[0049] Step S120: For any moment: the global prediction results corresponding to the moment and a preset number of moments before the moment are input into the shallow water equation solver for multi-path parallel reasoning to obtain multiple global simulation results corresponding to the moment.

[0050] The shallow water equation solver (SWE solver or SWE system) in this embodiment is driven by the output of the spatiotemporal neural network and has a microscopic time step. It is used to receive the global prediction results corresponding to each moment and a preset number of moments before the moment from the spatiotemporal neural network, and perform multi-path parallel reasoning 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. The global simulation results include the corresponding water depth simulation value and flow velocity simulation value at each location in the study area, and the flow velocity simulation value here also refers to the corresponding flow velocity simulation value in the x-direction and y-direction.

[0051] Taking the t-th moment as an example, the preset number of moments before the t-th moment is taken as the time series corresponding to the t-th moment, wherein the preset number can be set according to the actual situation. The preset number here is recorded as k, that is, the k moments before the t-th moment are taken as the time series corresponding to the t-th moment, and the time series corresponding to the t-th moment is {tk, ..., t-2, t-1};

[0052] According to the global prediction result corresponding to the t-th moment and the global prediction result corresponding to each moment in the obtained time series, the macro state variables at each moment (i.e., the tk-th moment to the t-1-th moment) are obtained;

[0053] For example, assume that the global prediction result Ŷ={h, u, v} at a certain moment, where h represents the water depth prediction value, u represents the flow velocity prediction value in the x-direction, and v represents the flow velocity prediction value in the y-direction; the global prediction result Ŷ is converted into the macroscopic state variable Û={h, hu, hv} corresponding to the moment, where hu represents the momentum density in the x-direction, which is the product of the water depth prediction value h and the flow velocity prediction value u in the x-direction; hv represents the momentum density in the y-direction, which is the product of the water depth prediction value h and the flow velocity prediction 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, which is still a column vector in essence;

[0054] Then, the corresponding flux in the x-direction and y-direction at that moment is calculated based on the global prediction result at that moment and the gravitational acceleration, and the source term corresponding to that moment is obtained;

[0055] It should be noted that obtaining state variables based on the global prediction results at a certain moment, including the water depth prediction value and the flow velocity prediction values ​​in the x and y directions at that moment, and obtaining the corresponding fluxes in the x and y directions at that moment and the corresponding source term at that moment in combination with the gravitational acceleration are well-known technologies and will not be described in detail here.

[0056] Then, path inference is performed based on the macroscopic state variables at each moment in the time series to obtain the microscopic state variables corresponding to each moment in the time series.

[0057] Exemplarily, for the tkth 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 uses the tkth moment as the starting moment and the tth moment as the ending moment to perform path reasoning, where the macroscopic step length (macroscopic length) from the starting moment to the ending moment is the difference between the tth moment and the tkth moment, that is, the macroscopic step length from the starting moment tk to the ending 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 the SWE solver can infer a path with a length of kN microscopic steps and obtain a solution at the tth moment. The solution obtained at this time is a global simulation result at the tth moment;

[0058] This embodiment uses a multi-path parallel generation method based on physics to distill the physical knowledge in the SWE solver into a spatiotemporal neural network. The SWE solver is solved using the finite volume method (FVM) to ensure conservation of mass and momentum. The entire study area Ω is integrated over the corresponding time interval, and the explicit Euler integral and Gaussian divergence theorem are combined to obtain the microscopic state variables corresponding to each moment. For a single microscopic time step Δτ, for example, the entire spatial domain Ω is integrated over the time interval [tk, t-k + Δτ] starting from the tkth moment, and combined with the explicit Euler integral and Gaussian divergence theorem, the corresponding equation can be discretized as:

[0059]

[0060] Among them, (t-k)->(t-k+Δτ) represents the microscopic state variable at a single microscopic time step starting from the tkth moment; t-k represents the macroscopic state variable corresponding to the tkth 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 ), which means that the flux F in the x direction corresponding to the tkth moment t-k and the flux G in the y direction t-k The boundary flux obtained after merging; S t-k represents the source term corresponding to the tkth moment; dΓ is the differential length along the boundary ∂Ω;

[0061] By further discretizing the boundary fluxes, the update of the state variables in the control space domain can be obtained with a microscopic time step Δτ that satisfies the CFL condition;

[0062] For the reasoning path from the tkth moment to the tth moment, the time interval corresponding to the reasoning path is [tk, t], and the reasoning path contains kN microscopic time steps. Then, integration is performed over the time interval, and combined with explicit Euler integration and Gaussian divergence theorem, by accumulating changes in multiple microscopic time steps, the microscopic state variable from the tkth moment to the tth moment is obtained. The microscopic state variable at this time is called the microscopic state variable corresponding to the reasoning path. This microscopic state variable is also the microscopic state variable corresponding to the tkth moment in this embodiment. Then:

[0063]

[0064] Among them, (t-k)->t represents the microscopic state variable corresponding to the tkth moment, kN represents the microscopic length of the reasoning path corresponding to the tkth moment; l Indicates the l microscopic time steps;

[0065] Then, the corresponding solution of each moment in the time series is further obtained according to the microscopic state variables corresponding to each moment in the time series, thereby obtaining the global simulation result corresponding to each moment in the time series; for example, this embodiment will infer the solution obtained from the tkth moment to the tth moment. (t-k)->t As a global simulation result at the t-th moment;

[0066] It should be noted that, in this embodiment, multi-path parallel reasoning 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 a reasoning path, and each reasoning 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;

[0067] In this embodiment, the global prediction results from the 0th moment to the T-1th moment within the preset time period can also be input into the SWE solver in parallel, so as to generate a state sequence of macro time step intervals corresponding to each moment at one time, wherein, when t≤k, all moments before the tth moment constitute the time series corresponding to the tth moment at this time. For example, for the 1st moment, the time series corresponding to the moment only contains the 0th moment, and one reasoning path is generated accordingly; when t>k, the k moments before the tth moment constitute the time series corresponding to the tth moment at this time, and k reasoning paths are generated accordingly. Therefore, after the global prediction results from the 0th moment to the T-1th moment are input into the SWE solver in parallel, min{t, k} reasoning paths are generated corresponding to each moment, and the global simulation result corresponding to each reasoning path is obtained to improve the computational efficiency.

[0068] Step S130: Obtain a comprehensive loss function according to the prediction results corresponding to the multiple preset sampling points at each moment in the preset time period and the multiple simulation results corresponding to the moment.

[0069] Existing flood prediction methods require that observed water depth and flow velocity data be given during training when training a neural network to enable it to predict water depth and flow velocity. A loss function is constructed by obtaining the actual observations corresponding to all sampling points in the entire study area and then comparing the actual observations of all sampling points with the predicted results output by the flood prediction model. However, because GPDNN distills the knowledge in the physical equations into the spatiotemporal neural network, it can obtain global prediction results for the entire study area, that is, it can obtain prediction results at different locations in the entire study area. Therefore, in this embodiment, a comprehensive loss function can be constructed under sparse sample conditions (i.e., obtaining actual observations of water depth and flow velocity at a small number of sampling points) or even zero-sample conditions (i.e., no actual data on water depth and flow velocity is required, only basic data such as rainfall, inflow, and topography are required).

[0070] The comprehensive loss function in this embodiment includes data loss, multipath physical loss, boundary condition loss, and initial condition loss;

[0071] Among them, data loss is used to evaluate the prediction error of the spatiotemporal neural network, that is, the data loss is constructed according to the prediction result corresponding to each preset sampling point at each moment and its corresponding actual observation result, that is, the prediction error of the spatiotemporal neural network is evaluated according to the difference between 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 each preset sampling point at each moment and the actual water depth value, the actual flow velocity value in the x direction and the actual flow velocity value in the y direction corresponding to the preset sampling point at each moment, so as to ensure the good fit of the spatiotemporal neural network to the known data. The data loss can be expressed as:

[0072]

[0073] Among them, L data Indicates data loss; N d Indicates the number of preset sampling points; T indicates the total duration of the preset time period; Ŷ t,i Y represents the prediction result corresponding to the i-th preset sampling point at the t-th moment, which is a vector consisting 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 the preset sampling point at the moment; t,i represents the actual observation result corresponding to the i-th preset sampling point at the t-th moment, which is a vector consisting of the true value of the water depth, the true value of the flow velocity in the x direction, and the true value of the flow velocity in the y direction corresponding to the preset sampling point at the moment; the symbol represents the square of the Euclidean norm;

[0074] Multi-path physics loss is used for parallel reasoning based on multiple paths of the shallow water equation solver to evaluate the physical consistency between the spatiotemporal neural network and the shallow water equation solver;

[0075] Specifically, for any moment within a preset time period, the path weight coefficient corresponding to each global simulation result corresponding to the moment is obtained. Since the path length generated by the physical solver is inversely proportional to the inference error, this embodiment obtains the path weight coefficient corresponding to the global simulation result based on the macroscopic length of the inference path corresponding to each global simulation result. The longer the macroscopic length of the inference path, the larger the corresponding path weight coefficient. This solves the long-range dependency problem, so that even in the case of insufficient monitoring samples, long time series tasks can still be accurately modeled. Then, the physical loss corresponding to the preset sampling point at the moment is obtained based on the water depth prediction value and flow velocity prediction value of each preset sampling point at the moment, the multiple water depth simulation values ​​and flow velocity simulation values ​​corresponding to the moment, and the path weight coefficient corresponding to each global simulation result. Finally, the multipath physical loss is obtained based on the physical losses corresponding to all preset sampling points in the preset time period at all moments in the preset time period. The multipath physical loss in this embodiment can be expressed as:

[0076]

[0077] Among them, L phy Indicates physical loss, N d Indicates the number of preset sampling points; T indicates the total duration of the preset time period; min(t, k) indicates the minimum value between the values ​​t and k; r j Represents the path weight coefficient corresponding to the tjth moment, which is equal to 1-α j, where j corresponds to the macroscopic length at the tjth 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. The simulation result is the solution obtained by the reasoning path from the tj-th moment to the t-th moment. It is a vector composed of the simulated water depth value, the simulated flow velocity value in the x-direction, and the simulated flow velocity value in the y-direction obtained by reasoning from the preset sampling point from the tj-th moment to the t-th moment.

[0078] This embodiment further extracts sampling points on the boundary from multiple preset sampling points, and constructs a boundary condition loss based on the prediction results corresponding to the sampling points on the boundary to evaluate the prediction accuracy of the spatiotemporal neural network at the boundary. Then:

[0079]

[0080] Among them, L boundary represents the boundary condition loss; N b Indicates the number of preset sampling points on the boundary; T represents the total duration of the preset time period; B represents the boundary condition operator, which is used to describe specific physical boundary conditions, such as building or computational domain boundaries; Ŷ t,p represents the prediction result corresponding to the preset sampling point on the pth boundary at the tth time, which is a vector consisting 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 the preset sampling point at the time;

[0081] The initial condition loss is used to constrain the global prediction results of the spatiotemporal neural network at the initial moment (i.e., time t=0), then:

[0082]

[0083] Among them, L initial represents the initial condition loss, N d Indicates the number of preset sampling points; T indicates the total duration of the preset time period; Ŷ 0,i Y represents the prediction result corresponding to the i-th preset sampling point at the initial time, which is a vector consisting 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 the preset sampling point at the initial time; 0,i represents the actual observation result corresponding to the i-th preset sampling point at the initial time, which is a vector consisting of the true value of the water depth, the true value of the flow velocity in the x direction, and the true value of the flow velocity in the y direction corresponding to the preset sampling point at the initial time;

[0084] 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:

[0085] L=a×L data +b×L phy +c×L boundary +d×L initial

[0086] Where 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 term. Their values ​​can be set according to actual needs; "×" represents the product.

[0087] 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.

[0088] 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. Since the gradient used for backpropagation is independent of the SWE solver, this embodiment does not need to retain the computational graph and gradient information of the SWE solver, thereby reducing GPU memory requirements.

[0089] 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.

[0090] Among them, the retrospective deduction of a flood event that has occurred using a small amount (or even no) of monitoring point location / 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] that satisfies the hydrodynamics described by the SWE system, as well as the related source / sink conditions, initial conditions, and boundary conditions.

[0091] 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%. In the dam break flood experiment, the importance sampling based on flow velocity is used to obtain {0, 10 4 , 10 5 , 10 6} points, and the importance sampling based on DEM (digital elevation model) was used to obtain {0, 10 4 , 10 5 , 10 6} and {0, 10 5 , 106 , 10 7} points;

[0092] GPDNN is then compared with existing flood spatiotemporal modeling methods (baseline methods), such as U-RNN (spatial-temporal neural network), FNO (Fourier neural operator), and PINN (physical information neural network). 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.

[0093] In order to verify the accuracy and physical consistency of each flood spatiotemporal modeling method in the extrapolation of the flood system, this example further calculated the cumulative mean absolute error and goodness of fit (R 2 ), where the goodness of fit is used to characterize the physical consistency between different prediction intervals;

[0094] Taking dam burst flood as an example, flood prediction (domain extrapolation) is performed by ①GPDNN, ②U-RNN, ③FNO, and ④PINN. The cumulative mean absolute errors of water depth and flow field corresponding to the prediction results are as follows: Figure 4 、 Figure 5 As shown in the figure; the physical consistency of the water depth and flow field corresponding to this flood type between different prediction intervals is shown in the figure. Figure 6 、 Figure 7 The results show that in the extrapolation of the above three flood types, the water depth and flow velocity solutions obtained by GPDNN are very consistent with the reference solutions. In contrast, PINN can only give an overly smooth overall trend with large differences in details. U-RNN predicts water depth almost according to the terrain, but fails to predict flow velocity. FNO completely fails to predict water depth and flow velocity. The cumulative mean absolute error of GPDNN is one order of magnitude smaller than that of the baseline methods, and it is the only method that achieves global physical consistency (R 2 A method close to 1).

[0095] A good model can directly make forward inferences about the spatiotemporal dynamics of unseen flood events, i.e., generalize the SWE system. However, PINN is excluded because it does not have the generalization ability.

[0096] This embodiment uses different flood prediction methods under different ratios of distribution points to predict future or unseen flood events (such as flood events in the prediction set). For example, using a large amount of monitoring data (10 6 -10 7) conditions, and the flood prediction by GPDNN under zero-sample conditions; taking river floods as an example, flood reasoning (out-of-domain generalization) is performed on unseen events through ①GPDNN, ②U-RNN, and ③FNO. The cumulative mean absolute errors of water depth and flow field corresponding to the prediction results are as follows: Figure 8 、 Figure 9 As shown in the figure; the physical consistency of the water depth and flow field corresponding to this flood type between different prediction intervals is shown in the figure. Figure 10 、 Figure 11 The results show that the cumulative mean absolute error of GPDNN is much smaller than that of the baseline method, highly consistent with the laws of physics, and its zero-shot generalization ability far exceeds that of data-driven methods that rely on a large number of measurements. This verifies that GPDNN can accurately and physically consistently solve the spatiotemporal variations of various flood types under zero-shot conditions.

[0097] It should be noted that in addition to its effectiveness in complex flood systems, the GPDNN model is also applicable to other types of spatiotemporal partial differential equations, such as the basic atmospheric equations, the convection-diffusion-reaction equations of pollutants, and the earthquake wave equations.

[0098] This embodiment proposes a generative physical distillation neural network (GPDNN), which uses deep learning methods and macroscopic time steps to model complex flood systems, and combines a physical solver (SWE solver) with microscopic time steps to generate physically consistent results. It also solves the long-range dependency problem based on multi-path parallel reasoning based on physics. Moreover, because GPDNN can distill prior knowledge in physical equations into the spatiotemporal neural network, it ensures that the spatiotemporal neural network strictly adheres to the given physical laws. As a discrete learning model, GPDNN significantly outperforms P-based methods in extrapolating historical events of various flood types and generalizing future events. Compared to existing data-driven FNO and physical embedding neural network methods PINNs that use dozens to hundreds of samples for supervised training, the generative physical distillation neural network GPDNN in this embodiment has a prediction error of 1-2 orders of magnitude less under zero-sample conditions, and the prediction results are globally physically consistent. Therefore, the GPDNN in this embodiment is freed from dependence on sample data and achieves real-time, accurate, and physically consistent water depth prediction and flow field reconstruction under sparse or even zero samples, breaking through the shackles of scarce flood observation data on machine learning methods. In addition, because the GPDNN in this embodiment is 3 orders of magnitude faster than numerical methods, it can more efficiently perform flood forecasting.

[0099] Please refer to Figure 2 In some embodiments, a flood prediction method based on a generative physical distillation neural network is provided, which includes the following steps:

[0100] Step S200: obtaining network input data, wherein the network input data includes boundary conditions, initial conditions, and source and / or sink conditions at the current moment;

[0101] Step S210: inputting the obtained network input data into a pre-trained generative physical distillation neural network to obtain an output result of the generative physical distillation neural network.

[0102] The pre-trained generative physical distillation neural network is obtained by the above-mentioned training method of the generative physical distillation neural network.

[0103] Step S220: Obtain a flood prediction result according to the output result of the generative physical distillation neural network.

[0104] This embodiment uses a generative physical distillation neural network to perform unified predictions for different flood types, thereby achieving real-time, accurate, and physically accurate predictions of the spatiotemporal dynamics of floods. The output of the GPDNN is the flood prediction result.

[0105] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer program. When all or part of the functions in the above embodiments are implemented by computer program, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above functions can be implemented. In addition, when all or part of the functions in the above embodiments are implemented by computer program, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and saved in the memory of the local device by downloading or copying, or the system of the local device is updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be implemented.

[0106] The above examples are used to illustrate the present invention, which are only used to help understand the present invention and are not intended to limit the present invention. Those skilled in the art can make several simple deductions, modifications or substitutions based on the concept of the present invention.

Claims

1. A training method for a generative physical distillation neural network, comprising a spatiotemporal neural network and a shallow water equation solver, characterized in that: Also includes: 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 and / or sink conditions corresponding to the different flood types at each moment within a preset time period; the initial conditions include initial values ​​of water level, flow velocity, and flow; the boundary conditions include building location and height, river location and initial water level or real-time water level; and the source and / or sink conditions include rainfall and drainage network. Inputting the training data in the training set into the spatiotemporal neural network in the generative physical distillation neural network to obtain a global prediction result at each moment, wherein the global prediction result includes a water depth prediction value and a flow velocity prediction value corresponding to each location in the study area; For any moment: input the global prediction results corresponding to the moment and a preset number of moments before the moment into the shallow water equation solver for multi-path parallel reasoning to obtain multiple global simulation results corresponding to the moment, where the number of global simulation results is the preset number; Obtaining a comprehensive loss function based on the prediction results corresponding to the multiple preset sampling points at each moment in the preset time period and the multiple simulation results corresponding to the moment; The network parameters of the spatiotemporal neural network are optimized according to the comprehensive loss function to obtain a trained generative physical distillation neural network.

2. The training method of a generative physical distillation neural network according to claim 1, wherein: The spatiotemporal neural network has a macroscopic time step, which is used to output the global prediction result corresponding to each moment; the shallow water equation solver is driven by the output result of the spatiotemporal neural network, has a microscopic time step, and is used to receive the global prediction results corresponding to each moment and a preset number of moments before the moment of the spatiotemporal neural network, and performs multi-path parallel reasoning on multiple global prediction results to obtain multiple global simulation results corresponding to each moment, and the global simulation results include the corresponding water depth simulation value and flow velocity simulation value at each position in the study area.

3. The training method of a generative physical distillation neural network according to claim 2, wherein: For any moment: the global prediction results corresponding to the moment and a preset number of moments before the moment are input into the shallow water equation solver for multi-path parallel reasoning to obtain multiple global simulation results corresponding to the moment, including: For the t-th moment, a preset number of moments before the t-th moment is used as the time series corresponding to the t-th moment; based on the global prediction result corresponding to the t-th moment and the global prediction result corresponding to each moment in the time series, the macroscopic state variable of each moment is obtained; based on the macroscopic state variable of each moment in the time series, path inference is performed to obtain the microscopic state variable corresponding to each moment in the time series; based on the microscopic state variable corresponding to each moment in the time series, the global simulation result corresponding to each moment in the time series is obtained; The global simulation result corresponding to each moment in the time series is used as multiple global simulation results corresponding to the t-th moment.

4. The training method of a generative physical distillation neural network according to claim 1, wherein: The comprehensive loss function includes data loss, multi-path physical loss, boundary condition loss and initial condition loss, wherein the data loss is used to evaluate the prediction error of the spatiotemporal neural network; the multi-path physical loss is used to evaluate the physical consistency between the spatiotemporal neural network and the shallow water equation solver based on the parallel reasoning of multiple paths of the shallow water equation solver; the boundary condition loss is used to evaluate the prediction accuracy of the spatiotemporal neural network at the boundary; and the initial condition loss is used to constrain the global prediction results of the spatiotemporal neural network at the initial moment.

5. The training method of a generative physical distillation neural network according to claim 4, wherein: The multi-path physical loss is used to evaluate the physical consistency between the spatiotemporal neural network and the shallow water equation solver based on parallel reasoning 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 corresponding to the moment; obtain the physical loss corresponding to the preset sampling point at the moment based on the water depth prediction value and flow velocity prediction value of each preset sampling point at the moment, the multiple water depth simulation values ​​and flow velocity simulation values ​​corresponding to the moment, and the path weight coefficient corresponding to each global simulation result; obtain the multipath physical loss based on the physical losses corresponding to all preset sampling points in the preset time period at all moments in the preset time period.

6. The training method of a generative physical distillation neural network according to claim 5, wherein: The method of obtaining the path weight coefficient corresponding to each global simulation result corresponding to the moment includes: among the multiple global simulation results corresponding to the moment, each global simulation result corresponds to an inference path; obtaining the macroscopic length of the inference path corresponding to each global simulation result; and obtaining the path weight coefficient corresponding to the global simulation result based on the macroscopic length of the inference path corresponding to each global simulation result.

7. The training method of a generative physical distillation neural network according to claim 6, wherein: The method of obtaining the macro-length of the reasoning path corresponding to each global simulation result includes: obtaining the time series corresponding to the moment; for any global simulation result corresponding to the moment, obtaining the macro-length of the reasoning path corresponding to the global simulation result based on the difference between the moment and the corresponding moment of the global simulation result in the time series.

8. A flood prediction method based on a generative physical distillation neural network, characterized in that: include: Acquiring network input data, wherein the network input data includes boundary conditions, initial conditions, and source and / or sink conditions at a current moment; Inputting 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 according to any one of claims 1 to 7; A flood prediction result is obtained according to the output result of the generative physical distillation neural network.

9. The flood prediction method based on 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 include at least dam break floods, river floods and urban floods.

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 according to any one of claims 1 to 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