Flood prediction method and device based on PINNs, equipment and medium

Through the flood prediction method based on PINNs, combined with physical constraints and data-driven loss function, the flood prediction inaccurate problem caused by ignoring physical laws in the prior art is solved, and higher flood prediction accuracy is achieved.

CN120181152AActive Publication Date: 2025-06-20BEIJING NORMAL UNIV AT ZHUHAI

Patent Information

Application Number
CN202510646514.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-06-20
Estimated Expiration
2045-05-20

AI Technical Summary

Technical Problem

Existing flood prediction methods rely on data-driven models and ignore the law of physical conservation, which leads to the deviation of flood prediction results from actual physical laws under sparse data or extreme events, making it difficult to ensure accuracy.

Method used

The flood prediction method based on PINNs is adopted to obtain geospatial remote sensing data, precipitation intensity distribution data, etc., and the physical constraint loss function and data-driven loss function are constructed. Combined with the Shengweinan equation, the PINNs model is optimized to improve the accuracy of flood prediction.

Benefits of technology

By introducing physical loss function and data-driven loss function, the model can fit the actual monitoring data and follow the physical laws of floods, significantly improving the accuracy of flood prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120181152A_ABST
    Figure CN120181152A_ABST
Patent Text Reader

Abstract

The invention discloses a PINNs-based flood prediction method, device and equipment and a medium, and the method comprises the steps: preprocessing collected geographic space remote sensing data, rainfall intensity distribution data, meteorological data, hydrological data and environmental data of a target drainage basin, and obtaining a first target data set; constructing a first target loss function based on the initial PINNs model and the first target data set, wherein the first target loss function is formed based on a physical constraint loss function and a data driving loss function; training the initial PINNs model based on the first target loss function and the first target data set to obtain a target model; and performing flood prediction on the target drainage basin based on the target model. According to the method, the physical loss function and the data-driven loss function optimization model are introduced in the process of training the flood prediction model, so that the target model finally used for flood prediction can fit actual monitoring data and follow the flood physical law at the same time, and therefore, the accuracy of a flood prediction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of flood risk prediction technology, and in particular, to a flood prediction method, device, equipment and medium based on PINNs. Background Art

[0002] Currently, the methods for flood prediction usually rely on data-driven models for prediction. Specifically, by collecting historical rainfall data and river flow data at the target detection location, and combining with the historical flood occurrence time points, the rainfall trigger value and water level trigger value for the next flood occurrence are predicted. Whether there is a risk of flood is predicted by real-time monitoring of the precipitation and river water level corresponding to the target detection location. This prediction method requires collecting a large amount of high-quality databases and data statistical analysis, and ignores the physical conservation law. In the case of sparse data or extreme events (such as flood mutations), the flood prediction results are prone to deviate from the actual physical laws, and it is difficult to ensure the accuracy of the flood prediction results. Summary of the Invention

[0003] The embodiments of this application provide a flood prediction method, device, equipment and medium based on PINNs, which can effectively improve the accuracy of flood prediction results.

[0004] In a first aspect, the embodiments of this application provide a flood prediction method based on PINNs, including: Obtain the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data and environmental data corresponding to the target basin within a preset time period, and preprocess the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data and the environmental data to obtain a preprocessed first target data set; Obtain an initial PINNs model, and construct a first target loss function based on the initial PINNs model and the first target data set, where the first target loss function is formed based on a physical constraint loss function and a data-driven loss function, the physical constraint loss function is constructed based on the Saint-Venant equation, and the data-driven loss function is constructed based on the predicted flow rate output by the initial PINNs model and the corresponding actual flow rate; Train the initial PINNs model based on the first target loss function and the first target data set to obtain a trained target model; Perform flood prediction on the target basin based on the target model.

[0005] In some embodiments, preprocessing the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data and the environmental data to obtain a preprocessed first target data set includes: Perform data cleaning on the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data, and the environmental data to obtain a first intermediate data set; Decompose the first intermediate data set into multiple sub-signals based on a preset wavelet basis function and decomposition level. Different sub-signals correspond to different frequencies. Remove the signals with high-frequency components in the sub-signals to obtain a second intermediate data set; Use a preset GAN network to perform missing data filling on the second intermediate data set to obtain the third intermediate data set; Through the time series algorithm, unify the data with different time resolutions in the third intermediate data set to the same time grid to obtain the first target data set.

[0006] In some embodiments, constructing a first target loss function based on the initial PINNs model and the first target data set includes: Calculate the derivatives of the predicted flow output by the initial PINNs model based on the first target data set with respect to each input variable in the first target data set; Substitute each of the derivatives into the Saint-Venant equation to obtain the physical constraint loss function; Calculate the first mean square error between the predicted flow and the actual flow corresponding to the target basin, and construct the data-driven loss function based on the first mean square error; Determine a trade-off coefficient, and construct the first target loss function based on the physical constraint loss function, the data-driven loss function, and the trade-off coefficient, where the trade-off coefficient is a parameter for weighing the relative importance between the physical constraint loss function and the data-driven loss function.

[0007] In some embodiments, the expression of the first target loss function is as follows: ; ; ; ; ( ) 2 ; where, is the first target loss function, is the trade-off coefficient, is the physical constraint loss function, is the first weight parameter, is the second weight parameter, The predicted flow of the target basin output by the initial PINNs model, is the cross-sectional area of the target basin, is the water level of the target basin, is the acceleration due to gravity, is the momentum equation loss function, N1 and N2 are the number of samples, is the time derivative of the predicted flow, is the spatial gradient of the momentum flux term, is the spatial gradient of the water level, is the friction slope of the target basin, is the bottom slope of the riverbed of the target basin, is the continuity equation loss function, is the rate of change of the cross-sectional area with time, is the spatial gradient of the predicted flow, is the data-driven loss function, is the actual flow.

[0008] In some embodiments, training the initial PINNs model based on the first target loss function and the first target dataset to obtain a trained target model, including: Dividing the first target dataset into a training set and a validation set according to a preset ratio, and using the LHS sampling strategy to generate training collocation points corresponding to the training set and validation collocation points corresponding to the validation set; Determine physical prior parameters, and construct a second target loss function based on the physical prior parameters and the first target loss function, where the physical prior parameters include the Manning coefficient and the riverbed slope corresponding to the target basin; Based on the training set and the training collocation points, use the ADAM optimization algorithm combined with the second target loss function to iteratively update the initial PINNs model to obtain an updated first intermediate model; Based on the training set and the training collocation points, use the L-BFGS algorithm combined with the second target loss function to iteratively update the first intermediate model to obtain an updated second intermediate model; Input the validation set and the validation collocation points into the second intermediate model to obtain prediction results and physical posterior parameters, calculate the second mean square error based on the prediction results and the corresponding true results, and when the second mean square error and the physical posterior parameters meet the preset conditions, determine the second intermediate model as the target model.

[0009] In some embodiments, the method further includes: When the second mean square error and the physical posterior parameters do not meet the preset conditions, iteratively update the initial PINNs model based on the training set and the training collocation points again using the ADAM optimization algorithm in combination with the second objective loss function to obtain a new first intermediate model; Based on the training set and the training collocation points, iteratively update the new first intermediate model using the L - BFGS algorithm in combination with the second objective loss function to obtain a new second intermediate model; Input the validation set and the validation collocation points into the new second intermediate model to obtain a new prediction result and new physical posterior parameters, calculate a new second mean square error based on the new prediction result and the corresponding true result, and until the new second mean square error and the new physical posterior parameters meet the preset conditions, determine the second intermediate model as the target model.

[0010] In some embodiments, applied to a flood prediction system, the flood prediction system is deployed with the target model and a GIS system, and flood prediction for the target basin is performed based on the target model, including: Real - time obtain the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data, and the environmental data corresponding to the target basin, and pre - process the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data, and the environmental data to obtain a pre - processed second target data set; Input the second target data set into the target model to obtain a flood prediction result, where the flood prediction result includes the water level, water flow rate, and spatio - temporal distribution information of flood propagation in the target basin; Based on the GIS system, generate a flood risk warning map based on the water level, the water flow rate, and the spatio - temporal distribution information of flood propagation, and send the flood risk warning map to the emergency management system.

[0011] In a second aspect, an embodiment of the present application provides a control device, including at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the PINNs - based flood prediction method as described in the first aspect.

[0012] In a third aspect, an embodiment of the present application further provides an electronic device, including the control device of the second aspect.

[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions for executing the PINNs-based flood prediction method as described in the first aspect.

[0014] An embodiment of the present application provides a PINNs-based flood prediction method, apparatus, device, and medium. The method includes: obtaining geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data, and environmental data corresponding to a target basin within a preset time period, and preprocessing the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data, and the environmental data to obtain a first target data set after preprocessing; obtaining an initial PINNs model, and constructing a first target loss function based on the initial PINNs model and the first target data set, where the first target loss function is formed based on a physical constraint loss function and a data-driven loss function, the physical constraint loss function is constructed based on the Saint-Venant equation, and the data-driven loss function is constructed based on the predicted flow and the corresponding actual flow output by the initial PINNs model; training the initial PINNs model based on the first target loss function and the first target data set to obtain a trained target model; and performing flood prediction on the target basin based on the target model. According to the solution provided by the embodiment of the present application, a physical loss function and a data-driven loss function are introduced during the process of training a flood prediction model to optimize the model, so that the final target model for flood prediction can fit actual monitoring data while following flood physical laws. Thus, the accuracy of flood prediction results can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flowchart of the steps of a PINNs-based flood prediction method provided by an embodiment of the present application; Figure 2 is a structural diagram of a control device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0016] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0017] It can be understood that although the functional modules are divided in the device schematic diagram and the logical sequence is shown in the flowchart, in some cases, the steps shown or described can be executed in a different module division from that in the device or a different order from that in the flowchart. Terms such as "first" and "second" in the specification, claims or the above-mentioned drawings are used to distinguish similar objects and do not necessarily describe a specific order or sequence.

[0018] Currently, the method for flood prediction usually relies on data-driven models for prediction. Specifically, by collecting historical rainfall data and river flow data at the target detection location, and combining the historical flood occurrence time points, the rainfall trigger value and water level trigger value for the next flood occurrence are predicted. Whether there is a risk of flood is predicted by real-time monitoring of the precipitation and river water level corresponding to the target detection location. This prediction method requires collecting a large amount of high-quality databases and data statistical analysis, and ignores the physical conservation law. In the case of sparse data or extreme events (such as flood mutations), the flood prediction results are prone to deviate from the actual physical laws, and it is difficult to ensure the accuracy of the flood prediction results.

[0019] To solve the above problems, the embodiments of the present application provide a flood prediction method, device, equipment and medium based on PINNs. The method includes: obtaining geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data and environmental data corresponding to a target basin within a preset time period, and preprocessing the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data and the environmental data to obtain a first target data set after preprocessing; obtaining an initial PINNs model, and constructing a first target loss function based on the initial PINNs model and the first target data set, where the first target loss function is formed based on a physical constraint loss function and a data-driven loss function, the physical constraint loss function is constructed based on the Saint-Venant equation, and the data-driven loss function is constructed based on the predicted flow rate output by the initial PINNs model and the corresponding actual flow rate; training the initial PINNs model based on the first target loss function and the first target data set to obtain a trained target model; and performing flood prediction on the target basin based on the target model. According to the solution provided by the embodiments of the present application, a physical loss function and a data-driven loss function are introduced to optimize the model during the training of the flood prediction model, so that the final target model for flood prediction can fit the actual monitoring data while following the flood physical laws. In this way, the accuracy of the flood prediction results can be effectively improved.

[0020] The following further elaborates on the embodiments of the present application with reference to the accompanying drawings.

[0021] Refer to Figure 1 , Figure 1It is a flowchart of the steps of a flood prediction method based on PINNs provided by an embodiment of the present application. An embodiment of the present application provides a flood prediction method based on PINNs, and the method includes but is not limited to the following steps: Step S10, obtain the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, meteorological data, hydrological data, and environmental data corresponding to the target basin within a preset time period, and preprocess the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data, and environmental data to obtain a preprocessed first target data set.

[0022] Specifically, in the embodiment of the present application, the specific preset time period is not limited, and it can be the data per hour during the flood season of each year within 5 years. Those skilled in the art can determine it according to the actual situation.

[0023] Specifically, the geospatial remote sensing data in this embodiment is obtained by satellite and includes remote sensing data such as the spatial location corresponding to the target basin, the large-area water body coverage range, and the vegetation condition; the precipitation intensity distribution data is obtained by radar; the meteorological data and hydrological data are collected by ground observation stations. The meteorological data includes the rainfall, temperature, humidity, etc. of the target basin, and the hydrological data includes the water level, flow rate, etc. of the target basin; the environmental data is collected by Internet of Things sensors, and the environmental information includes the surface and soil data and basin ecological data corresponding to the target basin (such as soil humidity, terrain data, slope, sediment content, etc.). It can be understood that in the process of flood prediction for the target basin, it is necessary to collect multi-dimensional data related to the environment, hydrology, and meteorology, and conduct comprehensive analysis and prediction by combining multi-dimensional data. Therefore, by obtaining the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, meteorological data, hydrological data, and environmental data corresponding to the target basin within a preset time period, it can provide an effective data basis for training the target model for accurate flood prediction in the subsequent stage.

[0024] Specifically, in some embodiments, the preprocessing of the geospatial remote sensing data, precipitation intensity distribution data, hydrological data, and environmental data in step S10 to obtain a preprocessed first target data set includes but is not limited to the following steps: Step S11, perform data cleaning on the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data, and environmental data to obtain a first intermediate data set; Step S12, decompose the first intermediate data set into multiple sub-signals based on a preset wavelet basis function and decomposition level. Different sub-signals correspond to different frequencies. Remove the signals with high-frequency components in the sub-signals to obtain a second intermediate data set; Step S13, perform missing data filling processing on the second intermediate data set by using a preset GAN network to obtain a third intermediate data set; Step S14: Through the time series alignment algorithm, unify the data with different time resolutions in the third intermediate data set to the same time grid to obtain the first target data set.

[0025] It can be understood that the data collected from various devices such as satellites, radars, ground observation stations, and Internet of Things sensors contain noise, error values, and missing values, which will affect the accuracy of subsequent flood prediction results. Therefore, it is necessary to preprocess the collected multi-dimensional data. The data preprocessing steps in this embodiment include: cleaning the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data, and environmental data to remove obviously unreasonable data to obtain the first intermediate data set; then, using wavelet transform to remove the high-frequency noise of the data in the first intermediate data set. Specifically, based on the preset wavelet basis function and decomposition level, decompose the first intermediate data set into multiple sub-signals. Here, different sub-signals correspond to different frequencies. Remove the signals with high-frequency components in the sub-signals to obtain the second intermediate data set; then use the GAN network to fill in the missing data in the second intermediate data set to obtain the third intermediate data set. Since the GAN network consists of a generator and a discriminator, the generator is used to learn the data distribution to generate missing data, and the discriminator is used to judge the authenticity of the generated missing data. The generator and the discriminator are trained adversarially to improve the quality of the generated data, thereby ensuring the authenticity of the third intermediate data set; since there are various dimensions of data in the third intermediate data set, the acquisition times of data with different dimensions are often inconsistent. For example, the rainfall corresponds to the rainfall per hour, while the water level is the water level data every 10 minutes. In this embodiment, the time series alignment algorithm is used to unify these data with different step lengths to the same time reference for subsequent fusion or modeling.

[0026] It should be noted that the variational autoencoder VAE based on deep learning can also be used to replace the GAN network for missing value filling, and the empirical mode decomposition EMD algorithm can be used for denoising. Those skilled in the art can choose according to the actual situation.

[0027] Step S20: Obtain the initial PINNs model, and construct the first target loss function based on the initial PINNs model and the first target data set. Among them, the first target loss function is formed based on the physical constraint loss function and the data-driven loss function. The physical constraint loss function is constructed based on the Saint-Venant equation, and the data-driven loss function is constructed based on the predicted flow output by the initial PINNs model and the corresponding actual flow.

[0028] Specifically, the initial PINNs model in this embodiment is a fully connected feedforward neural network, including an input layer, hidden layers, and an output layer. Among them, the input layer is used to receive various variable parameters. For example, it includes the spatial location, time, temporal derivative, and spatial derivative of the water level in the target basin to capture the dynamic changes of floods in the time dimension. The spatial location is used to accurately determine specific locations within the basin, represented by geographical coordinates (such as longitude and latitude). The water level is a value obtained by real-time measurement at actual monitoring stations. The temporal derivative and spatial derivative of the water level are calculated from the water level through numerical calculation methods (such as the finite difference method). Taking a one-dimensional river channel as an example, assume that there are several monitoring points evenly distributed on the river channel. At time the water levels at each monitoring point are measured. Using the water level data at adjacent time steps or adjacent spatial positions, through the central difference formula ( represents the monitoring point position, △ t is the time interval) to calculate the temporal derivative of the water level, and use (△ x is the spatial interval) to calculate the spatial derivative of the water level. Using these variables as the input to the input layer provides basic information related to floods for the initial PINNs model. The hidden layers have L layers. The hyperbolic tangent activation function tanh is used as the activation function for the hidden layers. The number of neurons in each hidden layer is ( ). In this embodiment, there are 4 hidden layers, with 20 neurons in each layer. The neurons are connected and calculated through the weight matrix and the bias vector . For the -th neuron in the -th hidden layer, its input is the product of the output of the previous layer and the weight matrix plus the bias , that is . After being processed by the tanh activation function, the output is obtained. Through the layer-by-layer calculation and feature extraction of multiple hidden layers, deep features related to floods are gradually extracted. The output layer outputs the predicted value of the water flow rate in the river channel. Specifically, after the multiple hidden layers extract and transform the features of the input variables, the output layer maps the information processed by the hidden layers into the final predicted value of the water flow rate . The calculation process of the output layer is also based on the weight matrix and the bias vector , that is , where is the output of the last hidden layer.

[0029] Specifically, in some embodiments, constructing the first objective loss function based on the initial PINNs model and the first target dataset in step S20 includes, but is not limited to, the following steps: Step S21, calculating the derivatives of the predicted flow output by the initial PINNs model based on the first target dataset with respect to each input variable in the first target dataset; Step S22, substituting each derivative into the Saint-Venant equation to obtain the physical constraint loss function; Step S23, calculating the first mean square error between the predicted flow and the actual flow corresponding to the target basin, and constructing a data-driven loss function based on the first mean square error; Step S24, determining a trade-off coefficient, and constructing the first objective loss function based on the physical constraint loss function, the data-driven loss function, and the trade-off coefficient, where the trade-off coefficient is a parameter for weighing the relative importance between the physical constraint loss function and the data-driven loss function.

[0030] It can be understood that in the process of training the initial PINNs model in this embodiment, the automatic differentiation function provided by deep learning frameworks such as TensorFlow or PyTorch is used to calculate the derivatives of the predicted flow output by the training initial PINNs model based on the first target dataset with respect to the associated input variables (such as the water level spatial derivative representing the spatial gradient of the water level, etc.), substituting these derivatives into the Saint-Venant equation to construct the physical constraint loss function, and furthermore, by calculating the first mean square error between the predicted flow and the actual flow corresponding to the target basin, constructing a data-driven loss function based on the first mean square error, and constructing the first objective loss function based on the physical constraint loss function, the data-driven loss function, and the trade-off coefficient, and training the initial PINNs model with the first objective loss function, so that in the training process, multi-source data and physical laws are deeply integrated, enabling the model to comprehensively capture flood characteristics and accurately learn flood physical laws. Compared with traditional models that simply rely on data-driven methods, this embodiment can significantly improve the accuracy and reliability of flood prediction.

[0031] It should be noted that the expression of the first objective loss function in this embodiment is as follows: ; ; ; ; ( ) 2 ; Wherein, is the first objective loss function, is the trade-off coefficient, is the physical constraint loss function, is the first weight parameter, used to weigh the importance of the physical constraint loss function , measuring the difference between the model output and the physical laws. By adjusting , the degree to which the model follows the physical laws during training can be controlled; is the second weight parameter, used to weigh the importance of the momentum equation loss function , measuring the difference between the model output and the momentum equation. By adjusting , the degree to which the model follows the momentum equation during training can be controlled; , is the predicted flow rate of the target basin output by the initial PINNs model, is the cross-sectional area of the target basin, is the water level of the target basin, is the acceleration due to gravity, is the momentum equation loss function, N1 and N2 are the number of samples, is the time derivative of the predicted flow rate, is the spatial gradient of the momentum flux term, is the spatial gradient of the water level, is the friction slope of the target basin, is the bottom slope of the riverbed of the target basin, is the continuity equation loss function, is the rate of change of the cross-sectional area with time, is the spatial gradient of the predicted flow rate, is the data-driven loss function, is the actual flow rate.

[0032] It should be noted that in this embodiment, the friction slope is calculated according to the following formula: ; where n is the Manning coefficient, R is the hydraulic radius.

[0033] Step S30, training the initial PINNs model based on the first target loss function and the first target data set to obtain a trained target model.

[0034] Specifically, in some embodiments, step S30 includes but is not limited to the following steps: Step S31, dividing the first target data set into a training set and a validation set according to a preset ratio, and using the LHS sampling strategy to generate training collocation points corresponding to the training set and validation collocation points corresponding to the validation set; Step S32: Determine the physical prior parameters, and construct a second objective loss function based on the physical prior parameters and the first objective loss function. The physical prior parameters include the Manning coefficient and the riverbed slope corresponding to the target basin. Step S33: Based on the training set and the training collocation points, use the ADAM optimization algorithm combined with the second objective loss function to iteratively update the initial PINNs model to obtain an updated first intermediate model. Step S34: Based on the training set and the training collocation points, use the L-BFGS algorithm combined with the second objective loss function to iteratively update the first intermediate model to obtain an updated second intermediate model. Step S35: Input the validation set and the validation collocation points into the second intermediate model to obtain the prediction results and the physical posterior parameters. Calculate the second mean square error based on the prediction results and the corresponding true results. When the second mean square error and the physical posterior parameters meet the preset conditions, determine the second intermediate model as the target model.

[0035] Specifically, the preset ratio of the training set and the validation set divided from the first target dataset in this embodiment is 7:3, which can be determined by those skilled in the art according to the actual situation and will not be limited here.

[0036] It can be understood that the process of implementing model training in this embodiment includes (1) data preparation; (2) model initialization; (3) loss function training and update; (4) model verification, these 4 steps. Among them, the process of (1) data preparation is as follows: Divide the preprocessed first target dataset into a training set and a validation set according to a ratio of 7:3. The training set includes the data of each hour from April to September during the flood season from 2015 to 2020 in the target basin, a total of 1200 time points of data, including the synchronous data of the upstream area, the middle area, and the downstream area of the target basin; the validation set includes the synchronous data of the upstream area, the middle area, and the downstream area of the target basin corresponding to the flood event, a total of 500 time points; Use the LHS algorithm to generate the corresponding training collocation points and validation collocation points for the training set and the validation set. Among them, the training collocation points include 50,000 LHS points, and the training collocation points cover the full spatio-temporal domain (that is, covering from April to September during the flood season from 2015 to 2020), and the validation collocation points include 30,000 LHS points, and the validation collocation points focus on the flood peak period (12 to 48 hours); the process of (2) model initialization is as follows: Determine the physical prior parameters, and the physical prior parameters include the Manning coefficient and the riverbed slope The Manning coefficient The corresponding prior distribution is ; This formula indicates that the Manning coefficient n follows a lognormal distribution. In the formula is the mean parameter of the lognormal distribution, representing the mean of the logarithm of n; is the standard deviation parameter of the lognormal distribution, representing the standard deviation of the logarithm of n; the riverbed slope The corresponding prior distribution is , representing the riverbed slope obeys a truncated normal distribution, obtained by partially truncating the standard normal distribution. In the formula, μ2 = 0.0003 is the mean parameter of the truncated normal distribution, representing the mean of = 0.0001 is the standard deviation parameter of the truncated normal distribution, representing the standard deviation of; and initialize the model architecture of the initial PINNs model; (3) The process of training and updating the loss function is as follows: construct the second objective loss function based on the physical prior parameters and the first objective loss function. First, based on the training collocation points and validation collocation points, use the ADAM optimization algorithm combined with the second objective loss function to iteratively update the initial PINNs model to obtain the updated first intermediate model; then, based on the training collocation points and validation collocation points, use the L-BFGS algorithm combined with the second objective loss function to iteratively update the first intermediate model to obtain the updated second intermediate model. That is to say, the training and updating have 2 stages. Stage 1 is implemented by the ADAM optimization algorithm, and stage 2 is implemented by the L-BFGS algorithm; among them, the second objective loss function has the following expression: ; Among them, during the training process, the composition of the second objective loss function will vary according to different training stages. In this embodiment, in the value of N2 is 1200, that is , the value of N1 in is 50000, that is is the regularization term corresponding to the physical prior parameters, used to indicate the result of regularizing the Manning coefficient and the riverbed slope . Specifically, in the first stage of training and updating, use the ADAM optimization algorithm combined with the second objective loss function to iteratively update the first intermediate model for 500 rounds to obtain the second intermediate model, with a learning rate of 0.001, and dynamically adjust and to update the composition of the second objective loss function . According to , adjust, and each round of iterative update operation updates the physical prior parameters based on the following formula:

[0037]

[0038] Among them, is the updated mean value of the Manning coefficient n in the (t + 1)-th iteration, is the set of historical values of the Manning coefficient n recorded during the training process, is the updated standard deviation of the Manning coefficient n in the (t + 1)-th iteration.

[0039] Specifically, in the training update stage 2, the second intermediate model is iteratively updated 1000 times using the L-BFGS algorithm combined with the second objective loss function to achieve full-batch optimization. After the iteration is completed, the second intermediate model is obtained. During the update process, in the second objective loss function takes the value of 1, 0.5. (4) Model verification. After obtaining the second intermediate model, in this embodiment, the verification set and verification collocation points are used to verify the second intermediate model. Considering from two aspects: physical consistency and the second mean square error between the prediction result and the true value, to ensure the accuracy of the flood prediction result of the target model. When the second mean square error is less than the preset threshold, and the Manning coefficient in the physical posterior parameters belongs to the target range (0.033 - 0.038), and the riverbed slope is consistent with the remote sensing terrain slope corresponding to the target basin, it is determined that the second mean square error and the physical posterior parameters meet the preset conditions, and the second intermediate model is determined as the target model.

[0040] It can be understood that in the process of training the model in this embodiment, the ADAM optimization algorithm is used for initial parameter update, and then switched to the L-BFGS algorithm for fine-tuning training to improve the convergence speed and accuracy of the model. During the training process, the Latin hypercube sampling strategy is used to generate collocation points to enhance the model's learning ability for flood characteristics at different positions and times within the basin. The Bayesian inference mechanism is introduced to improve the training process of the PINNs model, and by setting the physical prior distribution of the parameters, the prior knowledge of the physical parameters is incorporated into the model training to avoid the parameter estimation falling into the non-physical meaning region, improve the accuracy and reliability of the parameter estimation, and further ensure the accuracy of the flood prediction result of the target model.

[0041] In addition, in some embodiments, the PINNs-based flood prediction method of this embodiment further includes but is not limited to the following steps: Step S36, when the second mean square error and the physical posterior parameters do not meet the preset conditions, re-iteratively update the initial PINNs model using the ADAM optimization algorithm combined with the second objective loss function based on the training collocation points and verification collocation points to obtain a new first intermediate model; Step S37: Based on the training collocation points and the validation collocation points, use the L-BFGS algorithm combined with the second objective loss function to iteratively update the new first intermediate model to obtain a new second intermediate model; Step S38: Input the validation set and the validation collocation points into the new second intermediate model to obtain new prediction results and new physical posterior parameters. Calculate the new second mean square error based on the new prediction results and the corresponding true results until the new second mean square error and the new physical posterior parameters meet the preset conditions, and then determine the second intermediate model as the target model.

[0042] It can be understood that referring to the description of the above embodiments, when the second mean square error and the physical posterior parameters do not meet the preset conditions, re-iteratively update the initial PINNs model based on the training collocation points and the validation collocation points using the ADAM optimization algorithm combined with the second objective loss function to obtain a new first intermediate model; based on the training collocation points and the validation collocation points, use the L-BFGS algorithm combined with the second objective loss function to iteratively update the new first intermediate model to obtain a new second intermediate model; input the validation set and the validation collocation points into the new second intermediate model to obtain new prediction results and new physical posterior parameters, calculate the new second mean square error based on the new prediction results and the corresponding true results until the new second mean square error and the new physical posterior parameters meet the preset conditions, and then determine the second intermediate model as the target model. That is to say, in this embodiment, the LHS algorithm, the Bayesian mechanism, and physical constraints are used to co-train the target model for flood prediction. The LHS algorithm calculates collocation points to fill data gaps, the physical loss function constrains the entire domain, the Bayesian prior prevents parameter deviation, and the adjustment of dynamic physical prior parameters is combined (allowing large-scale exploration in the initial stage of training and gradually tightening to a physically reasonable range). This process ensures high-reliability flood prediction for the target basin with small samples through the deep integration of data-driven, physical constraints, and probability calibration.

[0043] Step S40: Perform flood prediction on the target basin based on the target model.

[0044] Specifically, in some embodiments, the flood prediction method based on PINNs of this embodiment is applied to a flood prediction system. The flood prediction system is deployed with a target model and a GIS system. Step S40 includes but is not limited to the following steps: Step S41: Real-time obtain the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data, and environmental data corresponding to the target basin, and preprocess the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data, and environmental data to obtain a preprocessed second target data set; Step S42: Input the second target dataset into the target model to obtain flood prediction results, where the flood prediction results include the water level, water flow rate, and spatio-temporal distribution information of flood propagation in the target basin; Step S43: Based on the GIS system, generate a flood risk warning map based on the water level, water flow rate, and spatio-temporal distribution information of flood propagation, and send the flood risk warning map to the emergency management system.

[0045] It can be understood that the target model is the trained PINNs model. In this embodiment, the target model is deployed in the flood prediction system and receives real-time input of multi-source data in the target basin (including the second target dataset preprocessed from the geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data, and environmental data corresponding to the target basin), and outputs flood prediction results, including the water level, water flow rate, and spatio-temporal distribution information of flood propagation in the target basin. Combining with the GIS system of the flood prediction system, a visual flood risk warning map is generated based on the water level, water flow rate, and spatio-temporal distribution information of flood propagation, providing a scientific basis for flood control and disaster reduction decision-making. At the same time, the prediction results are combined with the emergency management system, that is, the flood risk warning map is sent to the emergency management system to provide intelligent support for emergency rescue work.

[0046] As Figure 2 shown, Figure 2 is the structural diagram of a control device provided by an embodiment of the present application. The present invention also provides a control device 200, including: A processor 210, which can be implemented in ways such as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present application; A memory 220, which can be implemented in forms such as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 220 can store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 220 and are called by the processor 210 to execute the PINNs-based flood prediction method of the embodiments of the present application; An input / output interface 230, which is used to implement information input and output; A communication interface 240 for implementing communication interaction between this device and other devices, which can achieve communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); A bus 250 for transmitting information between various components of the device (such as a processor 210, a memory 220, an input / output interface 230, and a communication interface 240); Among them, the processor 210, the memory 220, the input / output interface 230, and the communication interface 240 are communicatively connected to each other inside the device through the bus 250.

[0047] In addition, an embodiment of the present application further provides an electronic device including the control device 200 of the above embodiment.

[0048] In addition, an embodiment of the present application further provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned flood prediction method based on PINNs is implemented.

[0049] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, and may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0050] Those of ordinary skill in the art will appreciate that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery media.

[0051] The above is a specific description of the preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present invention.

Claims

1. A flood prediction method based on PINNs, characterized in that: include: Acquire geospatial remote sensing data, precipitation intensity distribution data, meteorological data, hydrological data and environmental data corresponding to a target watershed within a preset time period, and preprocess the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data and the environmental data to obtain a preprocessed first target data set; Acquire an initial PINNs model, and construct a first target loss function based on the initial PINNs model and the first target data set, wherein the first target loss function is formed based on a physical constraint loss function and a data-driven loss function, the physical constraint loss function is constructed based on the Saint-Venant equation, and the data-driven loss function is constructed based on the predicted flow output by the initial PINNs model and the corresponding actual flow; Training the initial PINNs model based on the first target loss function and the first target data set to obtain a trained target model; Flood prediction is performed on the target basin based on the target model.

2. The flood prediction method based on PINNs according to claim 1, characterized in that: Preprocessing the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data, and the environmental data to obtain a preprocessed first target data set includes: Performing data cleaning on the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data, and the environmental data to obtain a first intermediate data set; Decomposing the first intermediate data set into a plurality of sub-signals based on a preset wavelet basis function and a decomposition layer number, wherein different sub-signals correspond to different frequencies, and removing signals of high-frequency components in the sub-signals to obtain a second intermediate data set; Using a preset GAN network to perform missing data filling processing on the second intermediate data set to obtain the third intermediate data set; The data with different time resolutions in the third intermediate data set are unified into the same time grid through a time series alignment algorithm to obtain the first target data set.

3. The flood prediction method based on PINNs according to claim 1, characterized in that: Constructing a first target loss function based on the initial PINNs model and the first target data set includes: Calculating each derivative of the predicted flow output by the initial PINNs model based on the first target data set with respect to each input variable in the first target data set; Substituting each of the derivatives into the Saint-Venant equation to obtain the physical constraint loss function; Calculating a first mean square error between the predicted flow and an actual flow corresponding to the target watershed, and constructing the data-driven loss function based on the first mean square error; Determine a trade-off coefficient, and construct the first objective loss function based on the physical constraint loss function, the data-driven loss function and the trade-off coefficient, wherein the trade-off coefficient is a parameter for weighing the relative importance between the physical constraint loss function and the data-driven loss function.

4. The flood prediction method based on PINNs according to claim 3 is characterized in that: The expression of the first objective loss function is as follows: ; ; ; ; ( ) 2 ; in, is the first objective loss function, is the trade-off coefficient, is the physical constraint loss function, is the first weight parameter, is the second weight parameter, is the predicted flow of the target basin output by the initial PINNs model, is the cross-sectional area of ​​the target watershed, is the water level of the target basin, is the acceleration due to gravity, is the momentum equation loss function, N1 and N2 are the number of samples, is the time derivative of the predicted flow, is the spatial gradient of the momentum flux term, is the spatial gradient of the water level, is the friction slope of the target basin, is the riverbed slope of the target basin, is the loss function of the continuous equation, is the rate of change of the cross-sectional area with time, is the spatial gradient of the predicted flow, is the data-driven loss function, is the actual flow rate.

5. The flood prediction method based on PINNs according to claim 1, characterized in that: The initial PINNs model is trained based on the first target loss function and the first target data set to obtain a trained target model, including: Dividing the first target data set into a training set and a validation set according to a preset ratio, and generating training points corresponding to the training set and validation points corresponding to the validation set using an LHS sampling strategy; Determine physical a priori parameters, and construct a second objective loss function based on the physical a priori parameters and the first objective loss function, wherein the physical a priori parameters include the Manning coefficient and the riverbed slope corresponding to the target watershed; Based on the training set and the training points, the initial PINNs model is iteratively updated using the ADAM optimization algorithm in combination with the second objective loss function to obtain an updated first intermediate model; Based on the training set and the training points, the first intermediate model is iteratively updated by using the L-BFGS algorithm in combination with the second objective loss function to obtain an updated second intermediate model; The verification set and the verification points are input into the second intermediate model to obtain prediction results and physical posterior parameters, and a second mean square error is calculated based on the prediction results and the corresponding true results. When the second mean square error and the physical posterior parameters meet preset conditions, the second intermediate model is determined as the target model.

6. The flood prediction method based on PINNs according to claim 5, characterized in that: The method further comprises: When the second mean square error and the physical posterior parameter do not meet the preset condition, re-based on the training set and the training points, the initial PINNs model is iteratively updated using the ADAM optimization algorithm combined with the second objective loss function to obtain a new first intermediate model; Based on the training set and the training points, the new first intermediate model is iteratively updated by using the L-BFGS algorithm in combination with the second objective loss function to obtain a new second intermediate model; The verification set and the verification points are input into a new second intermediate model to obtain new prediction results and new physical posterior parameters, and a new second mean square error is calculated based on the new prediction results and the corresponding true results. The second intermediate model is determined as the target model until the new second mean square error and the new physical posterior parameters meet the preset conditions.

7. The flood prediction method based on PINNs according to claim 1, characterized in that: Applied to a flood prediction system, the flood prediction system is deployed with the target model and a GIS system, and performs flood prediction on the target basin based on the target model, including: Acquire the geospatial remote sensing data, the precipitation intensity distribution data, the meteorological data, the hydrological data and the environmental data corresponding to the target watershed in real time, and pre-process the geospatial remote sensing data, the precipitation intensity distribution data, the hydrological data and the environmental data to obtain a pre-processed second target data set; Inputting the second target data set into the target model to obtain a flood prediction result, wherein the flood prediction result includes the water level, water flow and spatiotemporal distribution information of flood propagation in the target basin; Based on the GIS system, a flood risk warning map is generated based on the water level, the water flow and the spatiotemporal distribution information of the flood propagation, and the flood risk warning map is sent to the emergency management system.

8. A control device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the PINNs-based flood prediction method as described in any one of claims 1 to 7.

9. An electronic device, characterized in that: Comprising the control device as claimed in claim 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the flood prediction method based on PINNs as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Flood forecasting method based on SCM-PINNs

    CN116975513A

  • Dam break prediction and model training method and device, electronic equipment and storage medium

    CN117875504A

  • Flood routing prediction method, system and device and storage medium

    CN119416669A

Cited By

  • Slope displacement prediction method, device and equipment and storage medium

    CN120974891A

  • River water quality prediction method based on generative data enhancement

    CN121145103A