A machine learning based flood prediction method and system

By constructing a multi-source data probabilistic representation layer, a Bayesian deep feature extraction layer, a causal structure learning layer, and a probabilistic inference prediction layer, the shortcomings of uncertainty quantification and causal relationship analysis in existing flood prediction methods are addressed, achieving flood prediction with high accuracy, reliability, and interpretability, and supporting flood control decision-making.

CN121390432BActive Publication Date: 2026-08-25SHENZHEN WATER TECH SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511511089.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-08-25
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

Existing flood forecasting methods are unable to effectively quantify forecast uncertainty, lack in-depth analysis of causal relationships between hydrological variables, and cannot support the evaluation of the effectiveness of flood control measures and the optimization of decision-making.

Method used

A multi-source data probabilistic representation layer is constructed, which uses a variational autoencoder to convert multi-source hydrological data into a probability distribution representation; a Bayesian deep feature extraction layer is constructed, which extracts hydrological features through a random weighted neural network; a causal structure learning layer is constructed, which learns the causal relationships between variables through a causal discovery algorithm; a probabilistic inference prediction layer is constructed, which generates the predicted distribution of hydrological variables through a Markov chain Monte Carlo method; and an interpretable counterfactual analysis layer is constructed, which integrates symbolic reasoning and causal inference to support hypothesis analysis and decision assessment in flood scenarios.

Benefits of technology

It improves the accuracy and reliability of flood forecasting, quantifies uncertainty, enhances the interpretability of forecast results, improves the adaptability and robustness of the model, and supports intelligent flood control decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121390432B_ABST
    Figure CN121390432B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of hydrology prediction, and discloses a flood prediction method and system based on machine learning, wherein the flood prediction method based on machine learning comprises the following steps: constructing a multi-source data probability representation layer, converting multi-source hydrology data into a probability distribution representation by using a variational autoencoder; constructing a Bayesian deep feature extraction layer, extracting hydrology features from the data in the probability distribution representation by using a random weight neural network; constructing a causal structure learning layer, learning the causal relationship between variables from the hydrology features by using a causal discovery algorithm; constructing a probability inference prediction layer, generating a prediction distribution of hydrology variables by using a Markov chain Monte Carlo method; and constructing an interpretable counterfactual analysis layer, supporting hypothesis analysis and decision evaluation of a flood scene; the application realizes the transformation from deterministic prediction to probability prediction, enhances the interpretability through causal learning and symbolic probability mixed reasoning, and provides reliable technical support for flood control decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrological prediction technology, and more specifically, to a flood prediction method and system based on machine learning. Background Technology

[0002] With the intensification of global climate change and the increasing frequency of extreme weather events, flood disasters pose an increasingly serious threat to human society. Traditional flood forecasting methods mainly rely on deterministic hydrological models, which are usually built based on physical equations and empirical formulas. Although they can provide a single forecast result, they are difficult to effectively quantify the uncertainties in the forecasting process, and their forecast accuracy and adaptability are often unsatisfactory when faced with complex and variable hydrological conditions.

[0003] In recent years, with the rapid development of machine learning technology, data-driven flood forecasting methods have gradually emerged. These methods can automatically learn hydrological patterns from historical data and have strong nonlinear modeling capabilities. However, existing machine learning methods face difficulties in integrating multi-source heterogeneous hydrological data, and the prediction results lack physical meaning and interpretability, making it difficult to provide a reliable basis for flood control decisions. Furthermore, due to the inherent complexity and randomness of hydrological systems, accurately quantifying and decomposing the uncertainties in forecasts has become a major challenge for current research.

[0004] In practical applications of flood forecasting, simply providing accurate predictions is far from sufficient. Flood control decision-makers need not only to know the potential flood conditions, but also to understand the causes of floods, the effectiveness of different flood control measures, and the reliability of the forecast results. However, existing forecasting methods generally lack in-depth analysis of the causal relationships between hydrological variables and cannot support the evaluation of the effectiveness of flood control measures and the optimization of decision-making.

[0005] Therefore, there is a need to develop a comprehensive flood forecasting method that can provide probabilistic predictions, uncertainty quantification, and causal explanation. Summary of the Invention

[0006] This invention provides a flood prediction method and system based on machine learning, which solves the technical problems in related technologies such as difficulty in effectively quantifying prediction uncertainty, lack of in-depth analysis of causal relationships between hydrological variables, and inability to support the evaluation of the effectiveness of flood control measures and the optimization of decision-making.

[0007] This invention provides a flood prediction method based on machine learning, comprising the following steps: A multi-source data probabilistic representation layer is constructed, and a variational autoencoder is used to convert multi-source hydrological data into a probability distribution representation. Based on probability distribution representation, a Bayesian deep feature extraction layer is constructed, and a random weighted neural network is used to extract hydrological features. By utilizing the extracted hydrological features, a causal structure learning layer is constructed, and causal relationships between variables are learned through a causal discovery algorithm. Based on the learned causal relationships and hydrological characteristics, a probabilistic inference prediction layer is constructed, and the predicted distribution of hydrological variables is generated through the Markov chain Monte Carlo method. Based on the predicted distribution and causal relationships, an interpretable counterfactual analysis layer is constructed, integrating symbolic reasoning and causal inference to support hypothesis analysis and decision evaluation in flood scenarios.

[0008] In a preferred embodiment, constructing the multi-source data probabilistic representation layer includes: Collect multi-source hydrological data, including rainfall data, water level data, flow data, topographic data, and historical flood records; Construct a variational autoencoder network architecture, including an encoder network and a decoder network; A data quality awareness mechanism is introduced to adjust the weight of reconstruction error based on the quality and reliability of different data sources; Latent variables are sampled from the normal distribution in the latent space using reparameterization techniques, thus achieving probabilistic representation.

[0009] In a preferred embodiment, constructing the Bayesian deep feature extraction layer includes: Design a hierarchical Bayesian neural network architecture, which includes a temporal feature extraction module, a spatial feature extraction module, and a feature fusion module; A Bayesian recurrent neural network module was constructed to capture the dynamic characteristics of hydrological time series data; Construct a Bayesian graph convolutional network module to model spatial features and their correlations; The uncertainty of parameters is quantified by drawing weight samples from the weight prior distribution through Monte Carlo sampling.

[0010] In a preferred embodiment, constructing the causal structure learning layer includes: Define the set of causal variables for the hydrological system, including rainfall intensity, soil moisture, upstream water level, current water level, and downstream water level; Causal structure learning is achieved based on an improved PC algorithm, and the causal skeleton is gradually constructed and the direction of the edges is determined through conditional independence testing. A hierarchical causal structure is constructed, and hydrological variables are organized into multi-layered causal graphs according to different spatiotemporal scales and abstraction levels; Calculate causal strength and uncertainty, and quantify causal relationships through average causal effects.

[0011] In a preferred embodiment, the construction of the probabilistic inference prediction layer includes: Design a multi-scale prediction representation method to design corresponding prediction distribution representations for different prediction time points; An uncertainty decomposition module is constructed to decompose the total prediction uncertainty into data uncertainty, parameter uncertainty, and model structure uncertainty; A dynamic prediction update mechanism is implemented, which efficiently updates the prediction distribution using Bayesian update rules when new observation data arrives. A prediction reliability assessment mechanism is constructed, and the evidence score of the prediction distribution is calculated based on the Bayesian evidence framework.

[0012] In a preferred embodiment, a machine learning-based flood prediction system is used to perform a machine learning-based flood prediction system, comprising: The multi-source data probabilistic representation module is used to convert multi-source hydrological data into a probability distribution representation using a variational autoencoder; The Bayesian deep feature extraction module is used to extract hydrological features from data represented by a probability distribution using a random weighted neural network. The causal structure learning module is used to learn the causal relationships between variables from hydrological features using causal discovery algorithms; The probabilistic inference and prediction module is used to generate the predicted distribution of hydrological variables using the Markov chain Monte Carlo method. An interpretable counterfactual analysis module is used to integrate symbolic reasoning and causal inference, supporting hypothesis analysis and decision evaluation in flood scenarios.

[0013] In a preferred embodiment, the multi-source data probability representation module includes: The data collection unit is used to collect multi-source hydrological data, including rainfall data, water level data, flow data, topographic data, and historical flood records; A variational autoencoder unit, comprising an encoder network and a decoder network, is used to learn a probability distribution representation of the data; The data quality awareness unit is used to adjust the weight of reconstruction error based on the quality and reliability of different data sources. The probability representation generation unit is used to generate probability representations with uncertainty quantization through reparameterization techniques.

[0014] In a preferred embodiment, the Bayesian deep feature extraction module includes: Bayesian recurrent neural network units are used to capture the dynamic characteristics of hydrological time series data; Bayesian graph convolutional network units are used to model spatial features and their correlations; Probabilistic attention feature fusion unit, used to adaptively integrate temporal and spatial features; The parameter uncertainty quantization unit is used to quantify the uncertainty of network parameters through Monte Carlo sampling.

[0015] In a preferred embodiment, the causal structure learning module includes: Causal variable definition unit, used to define the set of causal variables of a hydrological system; The causal discovery algorithm unit is based on an improved PC algorithm to learn causal structures. Hierarchical causal structure building unit, used to organize hydrological variables into multi-layered causal graphs according to different spatiotemporal scales; The causal strength assessment unit is used to calculate the strength and uncertainty of causal relationships.

[0016] In a preferred embodiment, the interpretable counterfactual analysis module includes: The probabilistic causal intervention unit implements intervention operations on the causal model based on Pearl's do-operator; The counterfactual reasoning unit performs counterfactual reasoning based on the Balke-Pearl three-step method. Symbolic probabilistic hybrid reasoning unit is used to encode hydrological knowledge into symbolic rules and combine them with learned probabilistic causal models; The decision support unit generates decision recommendations and calculates expected utility based on the results of counterfactual analysis.

[0017] The beneficial effects of this invention are as follows: It improves the accuracy and reliability of flood forecasting by using a variational autoencoder to achieve probabilistic representation of multi-source data and combining it with Bayesian deep learning to extract hydrological features, enabling the model to make full use of information from various types of hydrological data and significantly improve forecast accuracy.

[0018] It achieves complete uncertainty quantification, uses a Bayesian framework to probabilistically model the prediction results, and identifies and quantifies uncertainties from different sources through an uncertainty decomposition module, providing a more comprehensive risk assessment basis for flood control decisions.

[0019] It enhances the interpretability of prediction results by revealing causal relationships between hydrological variables through causal structure learning and combining symbolic reasoning and counterfactual analysis to give the prediction results clear physical meaning and causal explanation.

[0020] The model's adaptability and robustness have been improved. Based on probabilistic representation and Bayesian learning, the model can effectively handle problems such as missing data and noise, and adapt to changes in hydrological conditions through a dynamic prediction and update mechanism.

[0021] Supports intelligent flood control decision-making. Through an interpretable counterfactual analysis layer, the effects of different flood control measures can be simulated and analyzed, providing scientific decision support for flood control departments.

[0022] With good versatility and scalability, the probabilistic prediction framework of this invention can be flexibly applied to flood prediction in different watersheds and can be easily integrated with new data sources and algorithm modules. Attached Figure Description

[0023] Figure 1 This is a flowchart of a machine learning-based flood prediction method according to the present invention; Figure 2 This is a line graph comparing the flood prediction effects of this invention in a certain watershed; Figure 3 This is a pie chart showing the decomposition of total uncertainty in flood forecasting according to the present invention. Figure 4 This is a bar chart comparing the performance of the traditional model and the model of this invention. Figure 5 This is a network diagram illustrating the causal relationships of flood formation according to the present invention; Figure 6 This is a Sankey diagram of the data stream of the flood prediction system of this invention; Figure 7 This is a violin plot showing the prediction error distribution of different prediction methods in this invention. Detailed Implementation

[0024] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0025] At least one embodiment of the present invention discloses a flood prediction method based on machine learning, such as... Figure 1 As shown, it includes the following steps: Step 1: Construct a multi-source data probabilistic representation layer and use a variational autoencoder to convert multi-source hydrological data into a probability distribution representation; Specifically, the following steps are included: Step 1.1: Collect multi-source hydrological data; This includes rainfall data, water level data, flow data, topographic data, and historical flood records. The data is preprocessed, including missing value handling, outlier detection and correction, time series synchronization, and data standardization.

[0026] Step 1.2: Construct the variational autoencoder network architecture; Includes encoder network and decoder network: The encoder network consists of multiple convolutional and fully connected layers, which are used to map the input data to the distribution parameters of the latent space; The decoder network consists of symmetrically structured fully connected layers and deconvolutional layers, used to reconstruct the latent variables into the original data distribution.

[0027] According to embodiments of this application, the variational autoencoder model is a generative model capable of learning the probability distribution of data and generating new samples. In this system, the variational autoencoder has the following specific structure: The encoder employs a multilayer perceptron structure. For time-series hydrological data, it first extracts temporal features through a one-dimensional convolutional layer with a kernel size of 3×1, a stride of 1, and SAME padding, for a total of 32 kernels. Then, it passes through two fully connected layers with 128 and 64 neurons respectively, using ReLU activation. Finally, it outputs two vectors. and , where and represent the mean and logarithmic standard deviation of the potential spatial distribution, respectively.

[0028] The decoder adopts a structure symmetrical to the encoder. First, it passes through two fully connected layers, containing 64 and 128 neurons respectively, with ReLU activation function. Then, it passes through a one-dimensional deconvolution layer to restore the time dimension, and finally outputs the distribution parameters of the reconstructed data.

[0029] For spatial data (such as terrain data), variational autoencoders can adopt a two-dimensional convolutional structure. The encoder contains three convolutional blocks, each of which consists of a two-dimensional convolutional layer (with a kernel size of 3×3 and a stride of 2), a batch normalization layer, and a ReLU activation function. The decoder contains three deconvolutional blocks. Each deconvolutional block consists of a two-dimensional deconvolutional layer (with a kernel size of 4×4 and a stride of 2), a batch normalization layer, and a ReLU activation function. The last layer uses the Sigmoid activation function to ensure that the output value is within a reasonable range.

[0030] Step 1.3, for each data type of input The encoder output average value and variance , representing the normal distribution parameter in the latent space; Latent variables are sampled from this distribution using reparameterization techniques. ,Right now: ; in, For the generated latent variable samples, This is the mean vector output by the encoder. The standard deviation vector of the encoder output. To obtain from the standard normal distribution The noise vector is randomly sampled from a normal distribution. This formula achieves a differentiable process for sampling from a normal distribution through a reparameterization technique.

[0031] The decoder will latent variables Map back to the original data space to generate a reconstructed data distribution. Specifically, the decoder network uses a multi-layer neural network to process latent variables. Convert to distribution parameters in the original data space.

[0032] For continuous hydrological data, the decoder outputs the mean. and variance , representing the normal distribution of the reconstructed data ; For discrete data, the decoder outputs a class probability vector, which represents the multinomial distribution of the reconstructed data.

[0033] This probability distribution representation allows the system to quantify the uncertainties in the reconstruction process.

[0034] Step 1.4: Use the variational lower bound, which includes the reconstruction error and the KL divergence regularization term, as the optimization objective. ; in, Let the lower bound objective function be the variational function. These are decoder parameters that control the mapping of the original data to be reconstructed from the latent variables; These are encoder parameters that control the mapping from raw data to latent variables; Input data; As latent variables; The posterior distribution generated for the encoder; The reconstruction distribution generated for the decoder; Represents the posterior distribution Expectations; KL divergence is used to measure the difference between two probability distributions; The prior distribution of the latent variable is usually chosen as the standard normal distribution.

[0035] First item The reconstruction error measures the model's ability to reconstruct the input data. (Second term) This is the KL divergence regularization term, used to constrain the posterior distribution generated by the encoder to be close to the prior distribution, thus preventing overfitting.

[0036] According to an embodiment of this application, the optimization objective function of the variational autoencoder is calculated as follows: First, calculate the KL divergence between the latent variable distribution generated by the encoder and the predefined prior distribution. The smaller the value, the closer the distribution generated by the encoder is to the standard prior distribution. Then, the log-likelihood of reconstructing the original data using the latent variables is calculated; the larger the value, the higher the quality of the reconstruction. Finally, the KL divergence is subtracted from the reconstructed log-likelihood to obtain the final optimization objective.

[0037] In practical calculations, for each training sample, multiple latent variable samples are sampled from the encoder output distribution, and their reconstructed log-likelihoods are calculated separately. The average value is taken as the first term. The KL divergence term can be directly calculated based on the properties of the normal distribution without sampling. The system maximizes this objective function using gradient descent, while simultaneously optimizing the parameters of the encoder and decoder.

[0038] In some implementations, different reconstruction error terms can be designed for the loss function of the variational autoencoder based on the characteristics of different types of hydrological data. For example, for continuous hydrological data (such as water level and flow rate), mean square error can be used as the reconstruction error; for discrete data (such as rainfall event classification), cross-entropy can be used as the reconstruction error; and for spatiotemporal data (such as radar rainfall images), pixel-level error and structural similarity index can be combined as the reconstruction error.

[0039] Step 1.5: Introduce a data quality awareness mechanism; The weights of reconstruction errors are adjusted based on the quality and reliability of different data sources, so that high-quality data has a greater impact on the model.

[0040] For water level stations The weight calculation method is as follows: First, calculate the data quality index of the station, and then normalize and weight the factors such as the continuity of the station's observation data, historical error rate and outlier ratio to obtain the data quality score; then map the quality score to a weight value between 0 and 1 through the sigmoid function; finally, use the weight to adjust the reconstruction error term of the station's data in the variational autoencoder optimization objective.

[0041] Step 1.6: After training, the variational autoencoder can convert deterministic hydrological data into a probability distribution representation, where the mean reflects the central trend of the data and the variance captures the uncertainty of the data, providing data input with uncertainty quantification for subsequent steps.

[0042] The variational autoencoder provided in this application can not only process conventional hydrological observation data, but also multimodal data sources such as satellite remote sensing data and radar data.

[0043] In addition, this variational autoencoder also has anomaly detection capabilities. By monitoring outliers in the reconstruction error, it can automatically identify and mark observation data that may have quality problems, thus providing support for data quality control.

[0044] like Figure 2 The figure shows a comparison of the prediction performance of a traditional deterministic prediction model and the probabilistic prediction model of this invention during a flood event in a certain river basin. The figure includes the measured water level, the traditional deterministic prediction, the median of the probabilistic prediction, and the upper and lower bounds (95% confidence interval) of the probabilistic prediction. It can be seen that the median of the probabilistic prediction is closer to the measured water level than the traditional deterministic prediction. Furthermore, the probabilistic prediction provides a complete quantification of uncertainty through its upper and lower bounds, enabling decision-makers to comprehensively assess the reliability of the prediction results.

[0045] Step 2: Based on the probability distribution representation, construct a Bayesian deep feature extraction layer and use a random weighted neural network to extract hydrological features; Specifically, the following steps are included: Step 2.1, design a hierarchical Bayesian neural network architecture; It includes a temporal feature extraction module, a spatial feature extraction module, and a feature fusion module, which respectively handle feature extraction tasks in the time dimension, spatial dimension, and multi-source data fusion.

[0046] Step 2.2: Apply a prior distribution to the weight parameters of the neural network; Each weight Treat it as a random variable, following a prior distribution ; Based on knowledge in the field of hydrology, different prior distributions are set for different types of connections: Use the Gaussian prior for connections representing short-term effects; Laplace's prior is used to promote sparsity for connections representing long-term memory; Markov random field priors are used to represent spatial correlations to preserve spatial structure information.

[0047] According to embodiments of this application, a random weighted neural network is a special type of neural network in which the weight parameters are not fixed values ​​but probability distributions.

[0048] In this system, the random weighted neural network is implemented in the following specific way: For each network layer, the weight matrix and bias vector All are represented as probability distributions. Taking a fully connected layer as an example, the forward propagation of a traditional deterministic network is: ; in, This is the weight matrix, used to perform linear transformations on the input features; The input vector contains the activation values ​​of neurons in the input layer; This is the bias vector used to adjust the activation threshold of neurons; This is the output vector, representing the output result of this layer.

[0049] In random weighted networks, and These are all random variables, each following its own prior distribution. This means that the network parameters are no longer fixed values, but rather probability distributions with uncertainty, which can better express the uncertainty of the model.

[0050] Specifically, for connections representing short-term effects (such as weights that handle the relationship between current and recent data points), the mean is used. Accuracy is Gaussian prior distribution ; For connections representing long-term memory (such as weights that handle the relationship between the current moment and distant historical data), the mean is used. Scale parameters are Laplace prior distribution This distribution has a high peak and a thick tail, which can promote the sparsity of the weights; For connections representing spatial correlation (such as weights that handle relationships between adjacent monitoring stations), a Markov random field prior is used, where the prior probability of each weight depends on the values ​​of its neighboring weights, in the form: ; in, Indicates weight The probability distribution; This represents the connection weight from node i to node j; Indicates proportional to; Represents the natural exponential function; The hyperparameter used to control spatial smoothness indicates that the larger the value, the stronger the spatial constraint. Indicates weight The neighborhood set, containing and All adjacent weight pairs ; This represents the weight value in the neighborhood; Indicates weight Its neighborhood weight The difference of squares; This represents the summation of all neighborhood weight pairs.

[0051] Step 2.3: Implement the forward propagation process of the random weighted neural network; Given the input from the probability distribution representation in step 1 Monte Carlo sampling is used to extract from the weighted prior distribution. Group weighted samples For each group of weighted samples Calculate the corresponding network output: ; in, The input data follows a mean of . variance is The normal distribution; The sampling number represents the number of samples drawn from the weight distribution. For the first Each weighted sample is randomly sampled from the prior distribution of weights; To use the first The network output calculated from each weighted sample; This represents the forward computation process of a neural network.

[0052] The final network output is represented as The statistics output for each sample include: Mean: ; in, The mean of the output represents... The average of the output samples; These are the normalization coefficients; Sum all output samples.

[0053] variance: ; in, The variance of the output represents the magnitude of the uncertainty in the output. The squared difference between each output sample and the mean; Sum of all differences of squares; The sampling number represents the number of samples drawn from the weighted distribution.

[0054] This Monte Carlo sampling method can effectively quantify parameter uncertainty and capture the probability distribution characteristics of network weights through multiple samplings, providing a reliable uncertainty estimate for subsequent probability inference.

[0055] According to an embodiment of this application, the forward propagation process of a random weighted neural network is calculated as follows: First, multiple sets of weight samples are randomly drawn from a predefined weight prior distribution. The number of samples is usually set between 10 and 30 to balance computational efficiency and estimation accuracy. Then, for each set of weighted samples, the standard neural network forward computation process is performed, that is, the input data is passed through each layer of the network in sequence, and the corresponding weight matrix and activation function are applied to each layer to obtain an output result; then the average value of all output samples is calculated as the mean of the network output, which represents the expected value of the prediction. Finally, calculate the sum of squared deviations of all output samples relative to the mean, divide by the number of samples, and obtain the variance of the output, which represents the uncertainty of the prediction.

[0056] This sampling-based approach enables the network to directly output the predicted distribution rather than single-point predictions, providing a foundation for subsequent probabilistic inference.

[0057] like Figure 3 As shown, this diagram illustrates the three main sources of uncertainty in flood prediction models and their respective proportions. Data uncertainty (such as observation errors and missing data) accounts for 48%, parameter uncertainty (uncertainty in model parameter estimation) accounts for 32%, and model structure uncertainty accounts for 20%. This uncertainty decomposition helps to improve the prediction system in a targeted manner; for example, in areas where data uncertainty is dominant, prediction accuracy can be improved by optimizing the layout of monitoring stations.

[0058] Step 2.4: Construct a Bayesian recurrent neural network module to capture the dynamic characteristics of hydrological time series data; Based on the traditional Long Short-Term Memory (LSTM) network, the weight matrix and bias vector are replaced with probability distributions to form a Bayesian LSTM structure. The gating mechanism of its core computational unit remains unchanged, but the parameters of each gating unit are represented as distributions rather than deterministic values, and forward computation is achieved through sampling.

[0059] According to embodiments of this application, the Bayesian recurrent neural network module is a Bayesian extension of the traditional recurrent neural network, which is particularly suitable for processing uncertainties in hydrological time series data.

[0060] This module is based on a long short-term memory network structure, but all weight parameters are... (Forgotten Gate) (Input Gate) (Unit state) and (Output gates) are all represented as probability distributions.

[0061] In its implementation, the network consists of two stacked Bayesian LSTM layers, each containing... There are several hidden units. In order to capture multi-scale temporal characteristics, the system also sets up skip connections for different time windows, namely 1 hour, 6 hours and 24 hours. These skip connections directly connect the features of specific past time points with the features of the current time point, which helps the model to focus on short-term, medium-term and long-term time series patterns at the same time.

[0062] Step 2.5: Construct a Bayesian graph convolutional network module to model spatial features and their correlations; First, construct a hydrological spatial relationship diagram: ; in, Hydrological spatial relationship diagram; nodes Indicates monitoring stations, edge This indicates the hydrological relationships between stations.

[0063] Then, a graph convolutional layer is defined to extend the standard convolution operation to the graph structure, while replacing the deterministic weights with a probability distribution representation to implement the Bayesian graph convolution operation.

[0064] According to embodiments of this application, the Bayesian graph convolutional network module employs a special graph convolutional structure, which is capable of processing irregularly distributed hydrological monitoring station data.

[0065] This module first constructs a site relationship diagram based on hydrological principles: For stations in a river network, the connection relationships are determined based on the river network topology. For rainfall stations, connectivity is determined based on geographical distance and watershed zoning.

[0066] The core operation of a graph convolutional layer is defined as follows: ; in, Indicates the first The node feature matrix of the layer; Indicates the first The node feature matrix of the layer; This represents an adjacency matrix with added self-connections, describing the connection relationships between nodes; This represents a degree matrix, with the diagonal elements representing the degree of each node (the number of edges connected to it). This represents the negative 1 / 2 power of the degree matrix; Indicates the first The layer weight matrix is ​​used for feature transformation and is represented as a probability distribution in this system; This represents the activation function, used to introduce nonlinear transformations; The system partially normalizes the graph structure to ensure that the feature updates of nodes with different degrees remain balanced. The system constructs three Bayesian graph convolutional layers, each outputting 64-dimensional features. The ReLU activation function is used, and the last layer is followed by a global average pooling layer to aggregate node features.

[0067] Step 2.6: Design an attention mechanism feature fusion module to adaptively integrate temporal and spatial features; Attention weights are also represented as probability distributions, reflecting the uncertainty of the importance of different features in a specific context.

[0068] This module outputs the final hydrological characteristic representation. , where the mean The expected value and variance of a feature. This indicates the characteristic uncertainty caused by parameter uncertainty.

[0069] According to embodiments of this application, the feature fusion module employs a probabilistic attention mechanism, which can adaptively integrate feature representations from Bayesian recurrent neural networks and Bayesian graph convolutional networks, and quantify the uncertainty in the fusion process.

[0070] The specific implementation of this module is as follows: First, the temporal features are represented. and spatial feature representation The query vector is obtained by mapping to the same feature space through a linear transformation. , key vector , Sum value vector , ; Then, the attention weight distribution is calculated, and the attention weights are... Indicates the first The feature is related to the first The attention level of each feature is calculated using the following formula: ; in, Indicates the first The feature is related to the first Attention weights for each feature; Indicates the first A query vector for each feature; Indicates the first The key vector of each feature; express Transpose of; The dimension of the feature vector; Represents the square root of the feature dimension, used for normalization scaling; This represents the softmax function, used to convert attention scores into a probability distribution.

[0071] Next, attention weights are applied to the value vector to obtain the context vector: ; in, Indicates the first The context vector of each feature; Indicates the first The feature is related to the first Attention weights for each feature; Indicates the first A vector of values ​​for each feature; Indicates all features Perform summation.

[0072] In this system, attention weights are also modeled as probability distributions rather than deterministic values. By introducing random noise and performing multiple Monte Carlo samplings during the attention calculation process, a distributional representation of the attention weights is obtained.

[0073] This probabilistic attention mechanism can capture changes in feature importance across different contexts and quantify the uncertainty of these changes. For example, spatial features (such as topography and soil conditions) may be more important in the early stages of rainfall, while temporal features (such as water level trends) may become more critical during flood evolution. The probabilistic attention mechanism can automatically adjust the weight distribution of these features and provide an estimate of the uncertainty of the weight allocation.

[0074] In addition, the feature fusion module also includes an adaptive feature selection submodule, which automatically selects the most relevant subset of features from a large number of features using Bayesian sparse coding technology.

[0075] In the specific implementation, a binary latent variable is introduced for each feature dimension. This indicates whether to select the feature, and provides... Specify the Bernoulli prior distribution. Learn using variational inference methods. The posterior distribution is used to achieve automatic feature selection while quantifying the uncertainty of the selection process.

[0076] Finally, the feature fusion module outputs the hydrological feature representation. The expected value of features It also includes uncertainty estimation of features. This provides a rich information foundation for subsequent causal structure learning and probabilistic inference.

[0077] like Figure 4 As shown, the performance of the traditional flood prediction model and the model of this invention is compared across five key performance indicators. The model of this invention significantly outperforms the traditional model in all indicators, particularly demonstrating a decisive advantage in interpretability (85.6 points vs. 28.3 points) and uncertainty quantification (92.4 points vs. 15.2 points). It also shows significant improvements in accuracy, real-time performance, and simplicity. This reflects the comprehensive performance enhancement brought about by the integration of deep learning, probabilistic programming, causal inference, and symbolic reasoning techniques in the model of this invention.

[0078] Step 3: Using the extracted hydrological features, construct a causal structure learning layer and learn the causal relationships between variables through a causal discovery algorithm; Specifically, the following steps are included: Step 3.1, Define the set of causal variables for the hydrological system. ; Key hydrological variables include rainfall intensity, soil moisture, upstream water level, current water level, and downstream water level, as well as environmental factors such as topographic slope and vegetation cover.

[0079] Each variable is represented as a probability distribution from step 2.

[0080] Step 3.2: Implement causal structure learning based on the PC algorithm (Peter-Clark algorithm); The algorithm progressively constructs a causal skeleton and determines the direction of the edges through a conditional independence test; The standard PC algorithm is improved to take into account the characteristics of hydrological data: First, we introduce a conditional independence test based on Fisher-Z transform, which is applicable to non-Gaussian distributed data; Secondly, temporal constraints are introduced to ensure that causal relationships follow a chronological order; Finally, prior knowledge from hydrology is introduced as a structural constraint, such as the fact that rainfall will always affect water levels, not the other way around.

[0081] According to embodiments of this application, in some implementations, in addition to the PC algorithm, the system may also employ the FCI (Fast Causal Inference) algorithm to handle cases with latent variables, or the LiNGAM (Linear Non-Gaussian Acyclic Model) algorithm to handle non-Gaussian linear systems.

[0082] In addition, for processing large-scale sets of hydrological variables, the MMHC algorithm (Max-MinHill-Climbing) can be used to improve computational efficiency.

[0083] The system can adaptively select the most suitable causal discovery algorithm based on the specific application scenario and data characteristics.

[0084] Step 3.3, Construct a probabilistic cause-effect graph: ; in, For a set of variables; Let it be the set of directed edges representing causal relationships; It is a set of conditional probability distributions; This is a probabilistic cause-effect graph.

[0085] For each edge Calculate its causal strength and uncertainty, where causal strength is expressed as the average causal effect: ; in, Indicates from variable to variable The average causal effect; This represents the expected value operator; This represents the target variable (the variable being affected). Represents the source variable (the variable that exerts the influence); This represents Pearl's interference quantifier, used to simulate human intervention on variables; and These represent the changes made to the source variables. Two different levels of value were applied; The uncertainty of the conditional sign edge in conditional probability is represented by the confidence interval width of the causal strength.

[0086] This average causal effect quantification method can accurately measure the strength and direction of causal relationships. By comparing the expected changes in the target variable before and after intervention, it quantitatively assesses the magnitude of causal impact. Simultaneously, it provides a measure of the uncertainty of causal relationships through confidence interval estimation, offering a basis for assessing the reliability of causal inferences.

[0087] According to an embodiment of this application, the average causal effect is calculated as follows: First, determine two different values ​​for the source variable. Usually, two representative values ​​of the variable's distribution are selected, such as the mean plus or minus one standard deviation. Then, for each value, the value of the source variable is set through causal intervention, while all edges pointing to that variable are cut off, and the edges pointing to other variables are retained. Next, probabilistic inference is performed on the modified causal graph to calculate the conditional expectation of the target variable; Finally, the difference between the expected values ​​of the target variable under the two intervention scenarios is calculated to obtain the average causal effect.

[0088] The absolute magnitude of this value represents the strength of the causal relationship, and the sign indicates the direction of the causal relationship (positive or negative influence). The system also estimates the confidence interval of the average causal effect using the bootstrap method, where the width of the confidence interval represents the degree of uncertainty in the strength of the causal relationship.

[0089] Step 3.4: Achieve sparsity and simplification of the causal structure; Weak causal edges are removed by threshold filtering, and redundant paths are merged by applying the minimum description length principle, resulting in a concise and information-rich causal graph.

[0090] Step 3.5: Construct a hierarchical causal structure; Hydrological variables are organized into multi-layered causal diagrams according to different spatiotemporal scales and levels of abstraction, including micro-level (such as causal relationships between individual monitoring stations), meso-level (such as causal relationships between tributaries and main streams), and macro-level (such as the causal mechanism of the entire watershed).

[0091] The causal structure learning method provided in this application not only considers the statistical dependencies between variables but also incorporates knowledge from the field of hydrology, improving the accuracy of causal discovery by introducing prior constraints. For example, the system automatically considers the upstream and downstream relationships of the river network to ensure that the direction of water flow is consistent with the direction of causal relationships; at the same time, it considers the time delay characteristics of rainfall-runoff processes, introducing time delay parameters in the causal discovery process.

[0092] like Figure 5 As shown, the causal graph structure of the flood formation mechanism learned by the system through the causal structure learning layer is illustrated. Nodes in the graph represent key variables of the hydrological system, such as rainfall intensity, soil moisture, upstream water level, and current water level; edges represent causal relationships between variables, labeled as strong causality, moderately strong causality, and weak causality. This visualized causal structure enables professionals to understand the causal mechanisms behind the prediction results, significantly improving the model's interpretability.

[0093] Step 3.6, Design the visualization module; The learned causal graph structure is transformed into an intuitive visual representation, where node size reflects variable importance, edge thickness reflects causal strength, and edge color intensity reflects the degree of uncertainty, providing an intuitive reference for subsequent explanation and decision-making.

[0094] Step 4: Based on the learned causal relationships and hydrological characteristics, construct a probabilistic inference prediction layer and generate the predicted distribution of hydrological variables using the Markov chain Monte Carlo method. Specifically, the following steps are included: Step 4.1: Construct a flood prediction model represented by a probabilistic program; Flood prediction is modeled in the following form: ; in, Represents a given time Input data Under the conditions, predict Target variable after time The conditional probability distribution; Representing a given feature and causal structure Under the given conditions, the predicted probability of the target variable; Indicates the given input data and model parameters Under the condition, feature representation The generation probability; Representing a given feature Under these conditions, causal structure The generation probability; Indicates a given historical training data Under these conditions, model parameters The posterior distribution of; This indicates that for all intermediate variables ( , , Integration operations; This represents the joint integral over the feature representation, causal structure, and model parameters.

[0095] According to an embodiment of this application, the calculation method for the flood prediction model represented by the probabilistic procedure is as follows: The posterior distribution of model parameters is learned from historical data, which is expressed as the probability distribution of the parameters given the historical data. A feature extraction network is applied to the input data at the current moment to obtain the probability distribution of the feature representation; then, the causal graph structure is learned or updated based on the feature representation. The feature representation and causal graph structure are input into the prediction model to generate the conditional probability distribution of the target variable at future time steps. By performing an integral operation, the uncertainty of all intermediate variables (feature representations, causal graph structure, and model parameters) is marginalized to obtain the final predicted distribution.

[0096] In actual calculations, this complex integral is approximated using a nested Monte Carlo sampling method: first, multiple sets of parameter values ​​are sampled from the posterior distribution of the parameters; then, for each set of parameters, samples are sampled from the conditional distribution of the feature representation and the causal graph structure; finally, the weighted average of all samples is calculated to obtain the predicted distribution of the target variable.

[0097] Step 4.2: Design a multi-scale prediction representation method to design corresponding prediction distribution representations for different prediction time points τ; For short-term forecasts (1 to 6 hours), a high-precision parametric distribution is used. For medium-term forecasts (6 to 24 hours), a Gaussian mixture distribution is used. For long-term forecasts (over 24 hours), non-parametric kernel density estimation is used to capture multimodal characteristics.

[0098] In some implementations, the system can use quantile regression to directly predict the quantile function of hydrological variables without assuming a specific distribution.

[0099] In practice, multiple quantile predictors can be trained to predict the 10%, 50%, and 90% quantile values ​​of the water level, thereby constructing a complete prediction distribution. This method is particularly suitable for situations where the prediction distribution has a complex shape or is difficult to represent using a parameterized distribution.

[0100] Step 4.3: Implement a posterior sampling algorithm based on the Hamiltonian Monte Carlo (HMC) method for efficient sampling from complex posterior distributions; This method combines the advantages of Markov chain Monte Carlo simulation and molecular dynamics simulation, and achieves efficient posterior space exploration by defining momentum variables and potential energy functions.

[0101] The algorithm steps include: initializing the state and momentum, calculating the Hamiltonian, performing transition steps, accepting or rejecting the new state, and updating the sampling distribution.

[0102] The Hamiltonian Monte Carlo method provided in this application has been specially optimized for hydrological prediction scenarios, including adaptive step size adjustment and multi-chain parallel sampling strategy.

[0103] In addition, the system also implements the No-U-Turn Sampler (NUTS) as an improved version of the Hamilton Monte Carlo method, which can automatically adjust sampling parameters to further improve sampling efficiency and mixing speed.

[0104] Step 4.4: Construct an uncertainty decomposition module to decompose the total prediction uncertainty into three main sources: Data uncertainty: refers to the uncertainty caused by noise and missing data in the input data itself, and is expressed through the output variance of the variational autoencoder. Quantification; Parameter uncertainty: represents the uncertainty in model parameter estimation, which is quantified by the discrete measure of the posterior distribution of Bayesian neural network parameters; Model structure uncertainty: This refers to the uncertainty in the choice of model structure, which is quantified by the set of possible variants of the causal graph structure.

[0105] Step 4.5: Construct a prediction reliability assessment mechanism and calculate the evidence score of the prediction distribution based on the Bayesian evidence framework; Calculate the log-marginal likelihood of the predicted distribution; Calculate the effective information gain of the prediction based on information theory methods; These two indicators are combined to form a comprehensive reliability score.

[0106] This score is used to assess the credibility of the current prediction results and to provide a risk reference for decision-making.

[0107] This predictive reliability assessment mechanism comprises the following key components: Evidence Score Calculation Unit: This unit is responsible for calculating the Bayesian evidence score of the prediction distribution, and assessing the consistency between the prediction results and historical data through log marginal likelihood. The higher the evidence score, the better the reliability of the prediction results.

[0108] Information Gain Evaluation Unit: This unit calculates the effective information gain of the prediction relative to prior knowledge based on information theory methods, and is used to evaluate the value of new information provided by the prediction results.

[0109] Reliability Score Fusion Unit: This unit fuses evidence scores and information gains according to preset weights to generate a comprehensive reliability score, providing decision-makers with a comprehensive reliability assessment.

[0110] The prediction reliability assessment method provided in this application considers not only the magnitude of the uncertainty in the prediction distribution but also the information gain of the prediction relative to prior knowledge. This enables the system to distinguish between predictions with "high certainty but low information content" (such as predictions that simply repeat historical patterns) and predictions with "high certainty and high information content" (such as predictions that accurately capture new patterns), providing decision-makers with a more comprehensive reliability assessment.

[0111] According to an embodiment of this application, the calculation process of the predictive reliability assessment method is as follows: The log-marginal likelihood of the predicted distribution is calculated, representing the log probability of observing the current predicted result considering all possible model parameters. Specifically, multiple sets of parameter samples are drawn from the posterior distribution of the model parameters, the predicted probability is calculated for each set, and then the logarithm of the average of these probabilities is taken. A higher value indicates better consistency between the predicted result and historical data, and thus higher reliability.

[0112] The information gain of the predicted distribution relative to the prior distribution is calculated; this value represents the amount of new information provided by the prediction. Specifically, the prior distribution (e.g., a distribution based on historical statistics) and the posterior distribution (i.e., the current predicted distribution) of the predictor variable are first determined. Then, the KL divergence between the two distributions is calculated, which is the expected value of the difference between the log probability of the posterior distribution and the log probability of the prior distribution. A higher value indicates that the prediction provides more information, distinguishing it from predictions that simply repeat historical patterns.

[0113] Finally, the log-marginal likelihood and information gain are weighted and summed according to preset weighting coefficients (default 0.7 and 0.3) to obtain the comprehensive reliability score. This score considers both the reliability and information value of the prediction, providing decision-makers with a comprehensive reliability assessment.

[0114] Step 4.6: Implement the dynamic prediction and update mechanism; When new observation data arrives, the system does not need to be completely retrained; instead, it efficiently updates the prediction distribution through Bayesian update rules.

[0115] The specific method involves using the predicted posterior distribution from the previous time step as the prior for the current time step, and then calculating the updated posterior distribution by combining it with new observation data. This mechanism significantly improves the system's real-time performance and computational efficiency.

[0116] like Figure 6 The diagram illustrates the flow of data and information in the flood prediction system of this invention. From left to right, the layers are: multi-source hydrological data (including rainfall, water level, and flow rate data), data preprocessing, multi-source data probabilistic representation layer, Bayesian deep feature extraction layer, causal structure learning layer, probabilistic inference and prediction layer, and interpretable counterfactual analysis layer, ultimately outputting flood prediction results and decision recommendations. The width of the connecting lines in the diagram represents the data flow rate, visually demonstrating the data transfer relationships and processing capabilities between the various modules of the system.

[0117] Step 5: Based on the predicted distribution and causal relationships, construct an interpretable counterfactual analysis layer, integrating symbolic reasoning and causal inference to support hypothesis analysis and decision evaluation in flood scenarios; Specifically, the following steps are included: Step 5.1: Construct a probabilistic causal intervention framework, implementing intervention operations on the causal model based on Pearl's do-operators, formally represented as: ; in, Represents the variable Intervene (set as value) After that, the target variable The conditional probability distribution; Indicates the observed variable Values At that time, the target variable The conditional probability distribution; Indicates intervention variables (such as upstream reservoir discharge volume); Represents the target variable (such as downstream water level); This represents Pearl's interference quantifier, used to simulate human intervention on variables; This indicates that the two probability distributions are not equal, meaning that the conditional probabilities obtained from intervention and observation are different.

[0118] By cutting off the causal graph The incoming edge, retain arrive The directed path is used to calculate the conditional probability distribution after intervention, rather than simply the observed conditional probability. This distinction reflects the essential difference between intervention and observation in causal inference.

[0119] Step 5.2: Design a multi-level counterfactual query interface to support three types of counterfactual analysis; Attribute-level counterfactual: Answers queries based on attribute changes, such as "If rainfall increases by 20%, how much will the water level rise?" Structural counterfactual: Answers queries based on topological changes, such as "If a section of a river is dredged, what impact will it have on the timing of downstream flood peaks?" Policy-level counterfactual: Answering queries based on decision-making schemes, such as "If a pre-discharge strategy is adopted, can the flood peak be prevented from exceeding the warning line?"

[0120] In some implementations, the system can also support compound counterfactual queries, allowing multiple conditions to be changed simultaneously and their combined effects to be analyzed. For example, the system can consider both "increased rainfall" and "upstream reservoir pre-release" to analyze their interaction on downstream water levels.

[0121] In addition, the system also supports time-series counterfactual queries to analyze the effects of complex intervention sequences such as "if measure A is taken at time t1, and then measure B is taken at time t2".

[0122] Step 5.3: Implement the counterfactual reasoning engine, performing counterfactual reasoning based on the Balke-Pearl three-step method; Extrapolation: Inferring the posterior distribution of latent variables based on current observation data and causal models; Intervention (Action): Modifying the values ​​or structure of specific variables in a causal model to form a counterfactual world model; Prediction: Perform inference on a counterfactual world model to generate a predicted distribution of the target variable.

[0123] The counterfactual reasoning engine provided in this application not only supports reasoning in a single counterfactual world, but also supports parallel reasoning and comparison in multiple counterfactual worlds.

[0124] By maintaining the states of multiple counterfactual world models, the system can efficiently compare the effects of different intervention strategies, providing support for decision optimization.

[0125] In addition, the system also realizes the uncertainty quantification of counterfactual reasoning and estimates the confidence interval of counterfactual predictions using the Monte Carlo method.

[0126] Step 5.4: Construct a symbolic probabilistic hybrid reasoning system; Hydrological knowledge is encoded into symbolic rules and combined with learned probabilistic causal models to form an interpretable hybrid reasoning framework.

[0127] Examples of rules include: Hydrological conservation rule: Inflow equals outflow plus change in water storage; Critical threshold rule: Overflow conditions are triggered when the water level exceeds the height of the dike; Time-delay propagation rule: changes in upstream water level over time This will affect the downstream water level.

[0128] In some implementations, symbolic rules can be represented using fuzzy logic to better handle the imprecision and uncertainty in hydrological systems. For example, fuzzy sets such as "high water level" and "rapid rise" can be defined, and reasoning can be performed based on fuzzy inference rules. This approach can more naturally express the imprecision in expert knowledge and improve the robustness and interpretability of the reasoning system.

[0129] Step 5.5: Design a decision support interface to generate decision recommendations based on the counterfactual analysis results; For each candidate decision scheme Calculate its expected utility: ; in, Indicate decision-making options The expected utility value; Indicates specific decision-making plans (such as reservoir discharge volume, flood diversion timing, etc.); Variables representing decision outcomes (such as downstream water levels, flood losses, etc.); The utility function represents the decision outcome. Mapping to utility values ​​to assess the value or loss of the outcome; Indicating the implementation of decisions After that, the result variable The conditional probability distribution; Represents all possible outcomes Perform integration and calculate the expected value.

[0130] The system evaluates each decision option based on this expected utility formula, while calculating its risk distribution (such as utility variance), providing a comprehensive risk-return trade-off analysis.

[0131] According to embodiments of this application, the decision support interface includes the following key components: Utility Function Design Unit: This unit is responsible for defining utility functions, which map hydrological states (such as water levels) to utility values, reflecting the value or loss of different states.

[0132] In flood control and disaster reduction scenarios, the utility function is usually defined as the negative of the cost function. The cost function is defined piecewise according to the relationship between the water level and the warning and guaranteed water levels: When the water level is below the warning level, the cost is a fixed flood control preparation cost; When the water level is between the warning level and the guaranteed level, the cost increases linearly with the water level. When the water level exceeds the guaranteed level, the cost increases exponentially, reflecting the huge losses that may be caused by floods.

[0133] Expected Utility Calculation Unit: This unit calculates the conditional probability distribution of the hydrological state after implementing each candidate decision scheme d_dec through causal intervention operations. Then, multiple samples are drawn from this conditional distribution, and the utility value of each sample is calculated. Finally, the average of all sample utility values ​​is taken as the expected utility of the decision scheme. Decision schemes with higher expected utility are considered superior.

[0134] Risk Assessment Unit: This unit analyzes the risk characteristics of decision-making options, including indicators such as variance, skewness, and worst-case utility of the utility distribution, providing decision-makers with comprehensive information on risk-return trade-offs.

[0135] This allows decision-makers to choose the most suitable option based on their own risk preferences. For example, risk-averse decision-makers may prefer a conservative option with lower expected utility but also lower risk, while risk-neutral decision-makers may choose the option with the highest expected utility.

[0136] Decision Recommendation Unit: This unit automatically generates a ranking of decision recommendations based on expected utility and risk assessment results, and provides detailed explanations of the decision-making basis.

[0137] For each recommended solution, the system will provide information such as implementation conditions, expected results, risk level, and credibility range.

[0138] Step 5.6: Implement the natural language interpretation generator to convert complex causal and counterfactual analysis results into intuitive natural language interpretations; The explanation contains three levels: Causal path interpretation: Identifying key causal paths from intervention variables to target variables; Uncertainty Explanation: Explains the sources and extent of uncertainty in the forecast results; Comparative explanation: Comparing the differences between different intervention programs and the reasons for them.

[0139] like Figure 7 As shown, the prediction error distributions of the traditional deterministic prediction model and the probabilistic prediction model of this invention were compared in multiple prediction tests. It can be seen that the average prediction error of the probabilistic prediction model (1.87m) is significantly smaller than that of the traditional deterministic prediction model (2.64m), and the error distribution is more concentrated, indicating higher prediction accuracy. Furthermore, the error distribution of the probabilistic prediction model is closer to a normal distribution, indicating that its prediction results are more stable and reliable.

[0140] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A flood prediction method based on machine learning, characterized in that, Includes the following steps: A multi-source data probabilistic representation layer is constructed, and a variational autoencoder is used to convert multi-source hydrological data into a probability distribution representation. Based on probability distribution representation, a Bayesian deep feature extraction layer is constructed, and a random weighted neural network is used to extract hydrological features. By utilizing the extracted hydrological features, a causal structure learning layer is constructed, and causal relationships between variables are learned through a causal discovery algorithm. Based on the learned causal relationships and hydrological characteristics, a probabilistic inference prediction layer is constructed, and the predicted distribution of hydrological variables is generated through the Markov chain Monte Carlo method. Based on the predicted distribution and causal relationships, an interpretable counterfactual analysis layer is constructed, integrating symbolic reasoning and causal inference to support hypothesis analysis and decision evaluation in flood scenarios; The construction of the causal structure learning layer includes: defining a set of causal variables for the hydrological system, including rainfall intensity, soil moisture, upstream water level, current water level, and downstream water level; implementing causal structure learning based on an improved PC algorithm, gradually constructing a causal skeleton and determining the direction of the edges through conditional independence testing; constructing a hierarchical causal structure, organizing hydrological variables into a multi-layer causal graph according to different spatiotemporal scales and abstraction levels; calculating causal strength and uncertainty, and quantifying causal relationships through average causal effects. In the causal structure learning based on the improved PC algorithm, the standard PC algorithm is improved to suit the characteristics of hydrological data: First, a conditional independence test based on Fisher-Z transform is introduced, which is suitable for non-Gaussian distributed data; second, a temporal constraint is introduced to ensure that the causal relationship follows the chronological order; finally, hydrological prior knowledge is introduced as a structural constraint. The calculation of causal strength and uncertainty includes: constructing a probabilistic causal graph. ;in, For a set of variables; Let P be the set of directed edges representing causal relationships; let P be the set of conditional probability distributions. This is a probabilistic cause-effect graph; for each edge Calculate its causal strength and uncertainty, where causal strength is expressed as the average causal effect: ; in, Indicates from variable to variable The average causal effect; E represents the expected value operator; This represents the target variable, i.e., the variable that is being affected. represents the source variable, i.e. the variable that exerts influence; do represents Pearl's intervention quantifier, used to simulate human intervention in the variable; and These represent the changes made to the source variables. Two different levels of value were applied; The uncertainty of the conditional sign edge in conditional probability is represented by the confidence interval width of the causal strength; The construction of the probabilistic inference prediction layer includes: designing a multi-scale prediction representation method to design corresponding prediction distribution representations for different prediction time points; constructing an uncertainty decomposition module to decompose the total prediction uncertainty into data uncertainty, parameter uncertainty, and model structure uncertainty; implementing a dynamic prediction update mechanism to efficiently update the prediction distribution through Bayesian update rules when new observation data arrives; and constructing a prediction reliability assessment mechanism to calculate the evidence score of the prediction distribution based on the Bayesian evidence framework. In the proposed multi-scale prediction representation method, a high-precision parametric distribution is used for short-term predictions of 1 to 6 hours; a Gaussian mixture distribution is used for medium-term predictions of 6 to 24 hours; and a non-parametric kernel density estimation is used for long-term predictions of more than 24 hours to capture multimodal characteristics. The construction of the probabilistic inference prediction layer also includes: implementing a posterior sampling algorithm based on the Hamiltonian Monte Carlo method for efficient sampling from complex posterior distributions. This method achieves efficient posterior space exploration by defining momentum variables and potential energy functions. The algorithm steps include: initializing the state and momentum, calculating the Hamiltonian, performing transition steps, accepting or rejecting new states, and updating the sampling distribution.

2. The flood prediction method based on machine learning according to claim 1, characterized in that, The construction of the multi-source data probabilistic representation layer includes: Collect multi-source hydrological data, including rainfall data, water level data, flow data, topographic data, and historical flood records; Construct a variational autoencoder network architecture, including an encoder network and a decoder network; A data quality awareness mechanism is introduced to adjust the weight of reconstruction error based on the quality and reliability of different data sources; Latent variables are sampled from the normal distribution in the latent space using reparameterization techniques, thus achieving probabilistic representation.

3. The flood prediction method based on machine learning according to claim 1, characterized in that, The construction of the Bayesian deep feature extraction layer includes: Design a hierarchical Bayesian neural network architecture, which includes a temporal feature extraction module, a spatial feature extraction module, and a feature fusion module; A Bayesian recurrent neural network module was constructed to capture the dynamic characteristics of hydrological time series data; Construct a Bayesian graph convolutional network module to model spatial features and their correlations; The uncertainty of parameters is quantified by drawing weight samples from the weight prior distribution through Monte Carlo sampling.

4. A machine learning-based flood prediction system, used to execute the machine learning-based flood prediction method according to any one of claims 1-3, characterized in that, include: The multi-source data probabilistic representation module is used to convert multi-source hydrological data into a probability distribution representation using a variational autoencoder; The Bayesian deep feature extraction module is used to extract hydrological features from data represented by a probability distribution using a random weighted neural network. The causal structure learning module is used to learn the causal relationships between variables from hydrological features using causal discovery algorithms; The causal structure learning module includes: Causal variable definition unit, used to define the set of causal variables of a hydrological system; The causal discovery algorithm unit is based on an improved PC algorithm to learn causal structures. Hierarchical causal structure building unit, used to organize hydrological variables into multi-layered causal graphs according to different spatiotemporal scales; Causality strength assessment unit, used to calculate the strength and uncertainty of causal relationships; The probabilistic inference and prediction module is used to generate the predicted distribution of hydrological variables using the Markov chain Monte Carlo method. An interpretable counterfactual analysis module is used to integrate symbolic reasoning and causal inference, supporting hypothesis analysis and decision evaluation in flood scenarios.

5. A flood prediction system based on machine learning according to claim 4, characterized in that, The multi-source data probability representation module includes: The data collection unit is used to collect multi-source hydrological data, including rainfall data, water level data, flow data, topographic data, and historical flood records; A variational autoencoder unit, comprising an encoder network and a decoder network, is used to learn a probability distribution representation of the data; The data quality awareness unit is used to adjust the weight of reconstruction error based on the quality and reliability of different data sources. The probability representation generation unit is used to generate probability representations with uncertainty quantization through reparameterization techniques.

6. A flood prediction system based on machine learning according to claim 4, characterized in that, The Bayesian deep feature extraction module includes: Bayesian recurrent neural network units are used to capture the dynamic characteristics of hydrological time series data; Bayesian graph convolutional network units are used to model spatial features and their correlations; Probabilistic attention feature fusion unit, used to adaptively integrate temporal and spatial features; The parameter uncertainty quantization unit is used to quantify the uncertainty of network parameters through Monte Carlo sampling.

7. A flood prediction system based on machine learning according to claim 4, characterized in that, The interpretable counterfactual analysis module includes: The probabilistic causal intervention unit implements intervention operations on the causal model based on Pearl's do-operator; The counterfactual reasoning unit performs counterfactual reasoning based on the Balke-Pearl three-step method. The symbolic probabilistic hybrid reasoning unit is used to encode hydrological knowledge into symbolic rules and combine them with learned probabilistic causal models. The decision support unit generates decision recommendations and calculates expected utility based on the results of counterfactual analysis.

Citation Information

Patent Citations

  • Reservoir group flood control dispatching risk analysis method considering dual uncertainty of model structure and hydrological forecast

    CN114997636A

  • Interpretable neural network

    US20220138532A1