Method for predicting runoff in strong human activity basin based on machine learning and physical fusion
By constructing a causal variable library and a causal perception deep learning model, the applicability of existing technologies to runoff forecasting in areas lacking scheduling data has been solved, achieving high-precision and robust watershed runoff forecasting suitable for flood control scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HOHAI UNIV
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
Smart Images

Figure CN122241139A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for predicting watershed runoff in areas with strong human activity, based on the fusion of machine learning and physics, and belongs to the field of watershed runoff prediction technology. Background Technology
[0002] Runoff forecasting is a core technical support for flood control, disaster reduction, and water resource allocation. In recent years, to meet the comprehensive needs of flood control, power generation, and navigation, many river basins have constructed large-scale water conservancy projects such as reservoirs and dams. The complex scheduling systems formed by these projects have significantly altered the natural runoff processes of the basins, leading to highly nonlinear and uncertain runoff generation and concentration patterns, posing a significant challenge to runoff forecasting under the influence of strong human activities.
[0003] For runoff forecasting in watersheds heavily impacted by human activities, existing technologies have mainly yielded three types of forecasting methods: The first type is traditional physical-hydrological models (such as the distributed Xin'anjiang model), which typically simulate the impact of engineering scheduling on runoff by adding reservoir operation modules to the model nodes; the second type is pure data-driven models (such as Long Short-Term Memory networks LSTM), which mainly utilize deep learning technology to fit the statistical mapping relationship between input and output through historical hydrological and meteorological data for forecasting or error correction; the third type is based on hybrid models and preliminary causal analysis methods, which attempt to explore the correlation between hydrological variables by introducing causal structure learning algorithms (such as PC algorithms), or to preliminarily combine physical mechanisms with data models to carry out forecasting.
[0004] However, the aforementioned existing technologies all have significant shortcomings in practical applications. First, the physical models heavily rely on detailed scheduling data such as real-time reservoir water levels and outflow rates. However, most small and medium-sized reservoirs lack systematic monitoring data, limiting the applicability of these methods in data-scarce areas and making them prone to systematic biases. Second, purely data-driven models lack physical interpretability. Their essence lies in fitting statistical correlations of data, which can easily capture spurious correlations in the data when facing extreme rainfall or sudden human intervention, leading to forecast distortion and weak generalization ability. Finally, existing general causal discovery algorithms are prone to misjudgments when dealing with high-dimensional, noisy hydrological spatiotemporal sequences containing potential unobserved factors, failing to accurately reconstruct physical links. Furthermore, the input feature selection of existing hybrid models relies heavily on experience, lacking effective constraints from physical mechanisms. In summary, existing technologies struggle to robustly extract the true causal mechanisms driving forecast errors from noisy observational data. Achieving deep coupling between hard constraints of physical laws and soft learning of data features is a pressing technical challenge in this field. Summary of the Invention
[0005] The purpose of this invention is to overcome the technical defects of the existing technology and solve the problem that the existing technology is unable to robustly extract the real causal mechanism driving the forecast error from noisy observation data. How to achieve deep coupling between hard constraints of physical laws and soft learning of data features is a technical problem that urgently needs to be solved in this field. This invention proposes a watershed runoff forecasting method based on the fusion of machine learning and physics for watersheds with strong human activity.
[0006] The present invention specifically adopts the following technical solution: a method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics, comprising the following steps: Step S1: Constructing a spatiotemporal causal variable library and initializing the hydrological model: Obtain long-term historical hydrological and meteorological data of the watershed, calibrate the parameters of the constructed distributed hydrological model to obtain a benchmark model; extract latent and explicit proxy variables, and combine them with the dynamic internal physical state variables generated by the benchmark model to construct a high-dimensional spatiotemporal causal variable library; Step S2: Offline causal structure and effect learning based on weighted ensemble causal graph: The high-dimensional spatiotemporal causal variable library is used as input, and various causal discovery algorithms are used for learning, causal effects are evaluated and normalized, core sensitive physical states and boundary variables are screened, a weighted ensemble causal graph is generated and a causal effect correlation matrix is constructed. Step S3: Construct a deep learning model for dynamic reconstruction of causal perception parameters: Construct a deep learning model for predicting simulation errors of hydrological models. Based on the causal effect values in the causal effect correlation matrix, inject physical prior weights during the initialization phase of the weight matrix in the model input layer; and train the model using a loss function with causal regularization terms. Step S4: Real-time runoff forecasting and dynamic flow correction: Meteorological forecast data is acquired in real time and a baseline model is run to extract real-time features. The real-time features are input into the trained causal perception deep learning model to predict the forecast error for multiple future forecast periods. The forecast error is matched and corrected with the initial baseline forecast flow output by the distributed hydrological model to output the final forecast flow.
[0007] As a preferred embodiment, the extraction of latent and explicit proxy variables in step S1 specifically includes: Extracting Implicit Proxy Variables: Based on Historical Measured Traffic Sequences Compared with historical calculated flow sequences Calculate the residual sequence for each time period. It is used to characterize human activity disturbances that are not quantified by physical models; Extracting explicit proxy variables: Extracting the rate of change of water level at key control sections within the watershed. It is used to characterize the nonlinear changes in the storage and discharge capacity of a river channel.
[0008] As a preferred embodiment, the construction of a high-dimensional spatiotemporal causal variable library in step S1 specifically includes: extracting key dynamic state variable sequences strongly correlated with runoff generation and confluence mechanisms, including average soil moisture content, groundwater storage, and slope and river network runoff velocities; the state variables dynamically change with time step t; combining the meteorological driving data of multi-step average precipitation P and evaporation E in the basin with the extracted latent and explicit proxy variables, as well as the extracted dynamic internal physical state variables, and performing time series alignment and standardization processing to construct a high-dimensional spatiotemporal causal variable library. .
[0009] As a preferred embodiment, the evaluation of causal effects and normalization process in step S2 specifically includes: For the learned causal graph path, the do operator combined with the backdoor adjustment criterion is applied to calculate the average causal effect of the path; the formula for calculating the continuous variable backdoor adjustment is as follows: ; Where x is the target causal variable to be evaluated, y is the prediction error as the target outcome variable, and z is the set of confounding variables; the obtained average causal effect is subjected to maximal-minimal normalization.
[0010] In a preferred embodiment, step S2 further includes: using the normalized causal effect as the path weight, weighting and integrating the causal graphs learned by various causal discovery algorithms according to the path granularity; and setting a causal effect threshold. For weights totaling less than Redundant false paths are pruned to identify core sensitive physical states and boundary variables that have a significant causal driving effect on forecast errors. A weighted integrated causal graph is generated and constructed as a causal effect correlation matrix C.
[0011] In a preferred embodiment, in step S3, physical prior weights are injected during the initialization phase of the model input layer weight matrix, specifically using the following formula: ; in, The element in the i-th row and j-th column of the initialized input layer weight matrix. The weights are randomly initialized. The normalized causal effect value is the i-th physical feature extracted from the causal effect correlation matrix.
[0012] In a preferred embodiment, the loss function with causal regularization in step S3 is: ; in, Let be the dynamic error predicted by the model at time t. To simulate actual errors, This is the input network weight vector corresponding to the i-th feature. The regularization coefficient is . It is the square of the L2 norm.
[0013] In a preferred embodiment, step S4 includes: inputting the spatiotemporal feature sequence into the trained causal perception deep learning model, using the prediction error at the current moment as the initial value, and sequentially acquiring future predictions. Forecast error set for each lead time period .
[0014] In a preferred embodiment, step S4 includes: outputting the future... Initial baseline forecast flow sequence for one forecast period .
[0015] In a preferred embodiment, step S4 involves matching and correcting the forecast error with the initial baseline forecast flow output by the distributed hydrological model. The time-by-time matching calculation formula is as follows: ; in, This is the corrected final forecast flow. As the initial baseline forecast flow, This represents the prediction error for the corresponding lead time n predicted by the deep learning model. The final output is a corrected, high-precision forecast flow rate. .
[0016] The beneficial effects achieved by this invention are as follows: 1. Reduced data dependence and improved applicability: Human activity disturbances are treated as unobserved confounding factors, and the state space is reconstructed by extracting model residuals and water level change rates. This mechanism reconstructs the missing scheduling process. This invention does not require long series of continuous historical data as support and is suitable for hourly runoff forecasting in watersheds with scarce data and strong human activity. 2. Removal of spurious correlations and enhanced generalization and interpretability: Causal structure learning and continuous causal effect evaluation are introduced to remove spurious correlations in the data, and causal laws are injected into the neural network as prior weights and regularization constraints. This method overcomes the "black box" defect of pure data-driven models and significantly improves the robustness of the model under extreme rainstorms and unknown scheduling conditions. 3. Physical data coupling and improved real-time forecast accuracy: Offline causal laws are transformed into an online dynamic correction engine. By predicting forecast errors through rolling iterations and performing real-time matching and correction of the baseline flow, nonlinear runoff generation and confluence deviations are effectively corrected, meeting the high precision and timeliness requirements of flood control scheduling. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics, as proposed in this invention. Detailed Implementation
[0018] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0019] Example 1: As Figure 1 As shown, this embodiment takes a typical watershed with strong human activity affected by the joint scheduling of complex reservoir groups as an example to explain in detail the specific implementation process of the runoff forecasting method for watersheds with strong human activity based on the fusion of machine learning and physics proposed in this invention. The method specifically includes the following four steps.
[0020] Step S1: Construct a spatiotemporal causal variable library and initialize the hydrological model. This step aims to provide a physically meaningful reference field and proxy variables for subsequent causal discovery and deep learning.
[0021] S11 Distributed Hydrological Model Construction and Baseline Physical Field Generation: First, 30m resolution DEM data of the forecast basin is acquired. The original DEM data is processed to generate river links and the forecast basin is divided into initial sub-basins using watersheds. The size of the sub-basins is adjusted based on the distribution and density of rain gauges within the basin to obtain the final target sub-basin and construct the river system topology.
[0022] This embodiment uses the Xin'anjiang model as a distributed hydrological model. Using long-term historical hydrological and meteorological data of the basin (including precipitation, evaporation, and measured flow), the parameters of the Xin'anjiang model are calibrated. The relative error of runoff depth, the relative error of flood peak, and the Nash efficiency coefficient are used as objective functions to obtain a calibrated baseline model. Running the baseline model synchronously outputs the dynamic internal physical state variables of each sub-basin of the entire basin, such as the average soil moisture content of the basin. Groundwater storage wait.
[0023] S12 Extraction of Implicit and Explicit Proxy Variables: Obtaining Historical Measured Flow Sequences Historical calculated flow sequences compared with the baseline model output Calculate the hourly residual sequence As a latent proxy variable, the rate of change of water level in front of the main reservoir dams within the watershed is extracted. As an explicit proxy variable.
[0024] Construction of the S13 Multidimensional Spatiotemporal Causal Variable Library: Incorporating previous multi-step long-range basin average precipitation and implicit proxy variables. Explicit proxy variables And the dynamic internal physical state variables extracted above (such as W, Time series alignment and Z-score normalization are performed, and the data are then concatenated to form a high-dimensional spatiotemporal causal variable library. .
[0025] Step S2: Offline causal structure and effect learning based on weighted ensemble causal graph. This step aims to extract real physical links from noisy data that are not affected by spurious correlations.
[0026] Preliminary learning of offline causal structure driven by S21 multi-algorithm: integrating the spatiotemporal causal variable library The input is fed into three base learners—FCI, FGES, and PC—and run independently to generate an initial directed acyclic causal graph or a partially directed acyclic graph.
[0027] S22 Continuous Causal Effect Evaluation and Normalization Based on the do Operator: For the learned path, the do operator combined with the backdoor adjustment criterion is applied to measure the causal effect. The formula for the continuous variable backdoor adjustment is: ; Where x is the target causal variable to be evaluated (e.g., soil moisture content in a sub-basin), and y is the forecast error. z represents the identified set of confounding variables. After calculating the average causal effect of each path, min-max normalization is performed.
[0028] S23 Core Sensitive Physical State Screening and Cause-Effect Graph Weighted Integration: Setting Causal Effect Thresholds (set up =0.10), for weights with a total value less than 0.10. Redundant spurious paths are pruned. Core sensitive physical states and boundary variables are selected, a weighted ensemble causal graph is generated, and directed edges and their normalized weights are used to construct a causal effect correlation matrix. .
[0029] Step S3: Construct a deep learning model for dynamic reconstruction of causal perception parameters. This step transforms causal prior knowledge into hard constraints and soft regularization of the neural network.
[0030] S31 Network Structure Construction: Construct an LSTM model for predicting simulation errors in hydrological models. The structure includes an input layer, a first LSTM layer, a first Dropout layer, a second LSTM layer, a second Dropout layer, and a linear output layer.
[0031] S32 Physical Prior Weight Initialization Embedding Based on Causal Effect Vector: From the Causal Effect Correlation Matrix Extract the causal effect values of the input features pointing to the prediction error to form a vector. The input layer weight matrix is initialized using the following formula: ; in, These are the elements of the initialized weight matrix. The weights are randomly initialized using the Xavier method. is the normalized causal effect value of the i-th physical feature.
[0032] S33 Design of Causal Regularized Loss Function and Model Training: Using a loss function with causal ridge regression regularization term: ; Using historical sample sets, the Adam optimizer is used to iteratively train the LSTM model based on the above loss function to obtain a causal perception deep learning model.
[0033] Step S4: Real-time runoff forecasting and dynamic flow correction. This step performs real-time online coupling of physical baseline and data-driven processes.
[0034] S41 Real-time Feature Dynamic Construction and Error Rolling Prediction: At the current time t, future features are acquired in real time. Meteorological forecast data for a lead time period (e.g., 72 hours) is used, and a baseline hydrological model is run simultaneously to obtain the physical field and proxy variable characteristics within the preceding time window at the current moment. This data is then input into a trained causal perception deep learning model, using the current forecast error as the initial value, and sequentially acquiring future forecasts. Forecast error set for each lead time period .
[0035] S42 Forecast Flow Real-Time Matching Correction and High-Precision Output: The Future of Baseline Hydrological Model Output Initial baseline forecast flow sequence for one forecast period The forecast error is matched time-by-time according to the following formula: ; The final output is the corrected high-precision forecast flow. It is provided for flood control scheduling decisions.
[0036] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0037] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for predicting runoff in a strong human activity watershed based on machine learning and physical fusion, characterized in that, Includes the following steps: Step S1: Constructing a spatiotemporal causal variable library and initializing the hydrological model: Obtain long-term historical hydrological and meteorological data of the watershed, calibrate the parameters of the constructed distributed hydrological model to obtain a benchmark model; extract latent and explicit proxy variables, and combine them with the dynamic internal physical state variables generated by the benchmark model to construct a high-dimensional spatiotemporal causal variable library; Step S2: Offline causal structure and effect learning based on weighted ensemble causal graph: The high-dimensional spatiotemporal causal variable library is used as input, and various causal discovery algorithms are used for learning, causal effects are evaluated and normalized, core sensitive physical states and boundary variables are screened, a weighted ensemble causal graph is generated and a causal effect correlation matrix is constructed. Step S3: Construct a deep learning model for dynamic reconstruction of causal perception parameters: Construct a deep learning model for predicting simulation errors of hydrological models, and inject physical prior weights in the initialization stage of the weight matrix of the model input layer based on the causal effect values in the causal effect correlation matrix. Model training is performed using a loss function with causal regularization. Step S4: Real-time runoff forecasting and dynamic flow correction: Meteorological forecast data is acquired in real time and a baseline model is run to extract real-time features. The real-time features are input into the trained causal perception deep learning model to predict the forecast error for multiple future forecast periods. The forecast error is matched and corrected with the initial baseline forecast flow output by the distributed hydrological model to output the final forecast flow.
2. The method according to claim 1, wherein, The extraction of latent and explicit proxy variables in step S1 specifically includes: Extracting latent proxy variables: based on historical measured flow series and historical computed flow series , computing a residual series by hour , to characterize human activity disturbances not quantified by the physical model; Extracting explicit proxy variables: Extracting the rate of change of water level at key control sections within the watershed. It is used to characterize the nonlinear changes in the storage and discharge capacity of a river channel.
3. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 1, characterized in that, The construction of a high-dimensional spatiotemporal causal variable library in step S1 specifically includes: extracting key dynamic state variable sequences strongly correlated with runoff generation and confluence mechanisms, including average soil moisture content, groundwater storage, and slope and river network runoff velocities; the state variables dynamically change with time step t; combining the meteorological driving data of average precipitation P and evapotranspiration E at multiple time steps with the extracted latent and explicit proxy variables, as well as the extracted dynamic internal physical state variables, and performing time series alignment and standardization processing to construct a high-dimensional spatiotemporal causal variable library. .
4. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 1, characterized in that, The evaluation of causal effects and normalization process in step S2 specifically involves: For the learned causal graph paths, the do operator combined with the backdoor adjustment criterion is applied to calculate the average causal effect of the paths; The formula for calculating the continuous variable backdoor adjustment is as follows: ; Where x is the target causal variable to be evaluated, y is the prediction error as the target outcome variable, and z is the set of confounding variables; the obtained average causal effect is subjected to maximal-minimal normalization.
5. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 4, characterized in that, Step S2 further includes: using the normalized causal effect as the path weight, weighting and integrating the causal graphs learned by various causal discovery algorithms according to the path granularity; and setting a causal effect threshold. For weights totaling less than Redundant false paths are pruned to identify core sensitive physical states and boundary variables that have a significant causal driving effect on forecast errors. A weighted integrated causal graph is generated and constructed as a causal effect correlation moment C.
6. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 1, characterized in that, In step S3, physical prior weights are injected during the initialization phase of the model input layer weight matrix. The specific formula is as follows: ; in, The element in the i-th row and j-th column of the initialized input layer weight matrix. The weights are randomly initialized. The normalized causal effect value is the i-th physical feature extracted from the causal effect correlation matrix.
7. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 1, characterized in that, The loss function with causal regularization in step S3 is: ; in, Let be the dynamic error predicted by the model at time t. To simulate actual errors, This is the input network weight vector corresponding to the i-th feature. The regularization coefficient is . It is the square of the L2 norm.
8. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 1, characterized in that, Step S4 includes: inputting the spatiotemporal feature sequence into the trained causal perception deep learning model, using the prediction error at the current moment as the initial value, and sequentially acquiring future predictions. Forecast error set for each lead time period .
9. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 8, characterized in that, Step S4 includes: outputting the future value from the initially calibrated distributed hydrological model. Initial baseline forecast flow sequence for one forecast period .
10. The method for predicting runoff in watersheds with strong human activity based on the fusion of machine learning and physics as described in claim 9, characterized in that, In step S4, the forecast error is matched and corrected with the initial baseline forecast flow output by the distributed hydrological model. The time-by-time matching calculation formula is as follows: ; in, This is the corrected final forecast flow. As the initial baseline forecast flow, This represents the prediction error for the corresponding lead time n predicted by the deep learning model. The final output is a corrected, high-precision forecast flow rate. .