An expert stacked integrated flood forecasting method and system based on bias correction and physical guidance

By constructing an integrated learning framework for hydrophysical models, an expert stacking method for terminal error correction and base learner integration, the simulation bias problem of traditional hydrological forecasting models under extreme conditions is solved, and high-precision and robust flood forecasting is achieved.

CN122333378APending Publication Date: 2026-07-03HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610725021.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Traditional hydrological forecasting models struggle to accurately depict the complex dynamic behavior of rainfall-runoff systems under extreme conditions. Existing hydrological stacking methods are ineffective in suppressing systematic biases in flood peak simulations, and single models and data sources lack the ability to adapt to independent modeling.

Method used

An expert stacked ensemble flood forecasting method based on bias correction and physical guidance is adopted. By constructing an ensemble learning framework for hydrophysical models, a terminal error correction model, and a base learner ensemble framework, and combining it with a GRU time-gated network for flow forecasting, the accuracy and robustness of flow forecasting are improved by utilizing multi-source state information and data-driven error correction.

Benefits of technology

It significantly improves the accuracy and robustness of flood forecasting, enhances the adaptability to non-stationary hydrological conditions, and achieves an organic integration of physical mechanisms and data-driven approaches, possessing good scalability and operational application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122333378A_ABST
    Figure CN122333378A_ABST
Patent Text Reader

Abstract

This invention discloses a flood forecasting method and system based on bias correction and physical guidance, using an expert stacking ensemble. It acquires a multi-mode state dataset based on a hydrophysical model and proposes a comprehensive evaluation index that considers both the accuracy of the Nash coefficient and the peak percentage threshold as an optimization objective, enhancing the ability to capture high-flow events. A terminal error correction mechanism based on source regression and weighted least squares is proposed, and the flow attenuation coefficient is used to suppress the excessive dominance of flood peak on weight estimation. Heterogeneous base learners are integrated, and a physical guidance expert stacking ensemble method is proposed to identify the dynamic weights of the models under different hydrological scenarios. The SHAP interpretability analysis method is introduced to quantify the predictive contributions of base learners and state variables. This highly diverse and heterogeneous model stacking framework not only enhances the complementarity between base learners but also achieves good synergy between accuracy, stability, and interpretability, providing a new paradigm for intelligent hydrological forecasting that combines high performance and transparent decision support.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of hydrology and hydrological forecasting technology, specifically relating to an expert stacked integrated flood forecasting method and system based on deviation correction and physical guidance. Background Technology

[0002] Against the backdrop of intensifying global climate change and frequent extreme precipitation events, watershed hydrological processes are exhibiting increasingly significant non-stationarity and uncertainty, placing higher demands on the accuracy, timeliness, and robustness of flood forecasts. Traditional conceptual hydrological forecasting models rely on simplified physical structures and empirical parameterization schemes, simulating runoff generation and concentration processes within a watershed by setting specific structures and parameters. These models struggle to accurately depict the complex dynamic behavior of rainfall-runoff systems under extreme conditions, often exhibiting systematic biases, particularly in simulating peak flow, peak time, and recession processes. They are ill-suited to adapting to non-stationary changes caused by climate change and human activities.

[0003] In recent years, machine learning methods such as Long Short-Term Memory (LSTM) networks and decision trees have demonstrated powerful nonlinear fitting capabilities, enabling them to automatically mine nonlinear mapping relationships from high-dimensional observational data and effectively capture the time-varying characteristics of rainfall-runoff systems. Their prediction accuracy on multiple standard datasets has gradually surpassed that of traditional mechanistic models. However, most existing research remains limited to independent modeling and calibration of single models and data sources, lacking explicit modeling of hydrophysical processes and exhibiting insufficient adaptability to complex hydrological processes.

[0004] Improving the forecast accuracy of data-driven models and effectively integrating them with physical knowledge has become a current research hotspot. Stacked ensemble, as an advanced machine learning strategy, has been gradually introduced into the field of hydrological forecasting, aiming to improve overall performance and stability by fusing the prediction results of multiple base learners through a meta-learner. However, existing hydrological stacking methods struggle to effectively suppress systematic biases in flood peak simulation. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an expert stacked integrated flood forecasting method and system based on deviation correction and physical guidance, which can effectively solve the above-mentioned problems.

[0006] The technical solution adopted in this invention is as follows:

[0007] This invention provides an expert stacked integrated flood forecasting method based on bias correction and physical guidance, comprising:

[0008] Step S1: Obtain hourly hydrological and meteorological data for the historical window of the study basin, including hydrological data, observed flow rate, and meteorological factor data;

[0009] Step S2: Construct an integrated learning framework for hydrophysical models, including several structurally heterogeneous hydrophysical models; each hydrophysical model senses a set of multi-mode state variables related to the predicted flow from the hydrological data and outputs a first simulated flow.

[0010] Step S3: Using the terminal error correction model, the first simulated flow rate output by each of the hydrophysical models is corrected for deviation to obtain the second simulated flow rate;

[0011] Step S4: Combine the multi-mode state variable sets sensed by all hydrophysical models and the second simulated flow, and add meteorological factor data to obtain the reconstructed state factor feature matrix;

[0012] Step S5: Construct a base learner ensemble framework, including several base learners; each base learner mines the mapping relationship between the reconstructed state factor feature matrix and the flood forecast flow, and outputs the third simulated flow.

[0013] Step S6: Construct a physics-guided expert hybrid stacked ensemble meta-learner, including expert models for various hydrological scenarios and a GRU temporal gating network; for each of the expert models under the hydrological scenario, the third simulated flow output by each of the base learners is weighted and fused to obtain a fourth simulated flow under the same hydrological scenario; the GRU temporal gating network learns the dynamic weights of each of the expert models from the reconstructed state factor feature matrix; using the dynamic weights, the fourth simulated flow is weighted and fused to obtain the final simulated flow output by the physics-guided expert hybrid stacked ensemble meta-learner;

[0014] Step S7: Flood forecasting is performed using the methods described in steps S2 to S6.

[0015] Furthermore, the hydrological data includes rainfall and potential evapotranspiration; the meteorological factor data includes maximum temperature, minimum temperature, and solar radiation data;

[0016] During the model training phase, the hydrophysical model and the base learner use the comprehensive evaluation index NPCEM, which takes into account both the Nash coefficient (NSE) and the peak percentage threshold accuracy (PPTS), as the target for optimizing the model. The calculation method is as follows:

[0017] ① Calculate the Nash efficiency coefficient (NSE) to evaluate the overall performance of the model:

[0018] (1)

[0019] in: The observation period is formed by dividing historical windows; For a moment The observed flow rate; The simulated flow rate output by the trained model; This represents the average observed flow rate within the observation period.

[0020] ② Calculate the percentage peak threshold precision (PPTS) for evaluating peak flow:

[0021] (2)

[0022] in: The threshold value for the flood peak quantile; The number of times to meet the flood peak threshold; and , respectively time Observed peak flow rate and simulated peak flow rate;

[0023] ③ Calculate the comprehensive evaluation index NPCEM, which takes into account both the Nash coefficient (NSE) and the peak percentage threshold accuracy (PPTS):

[0024] (3)

[0025] (4)

[0026] Where: λ is the amplification factor, with a value ranging from 1 to 50; It is a step function. The set NSE loss threshold; when calibrating the model parameters, if ≤ , It is a constant of 1, otherwise it is 0.

[0027] Furthermore, step S2 specifically involves:

[0028] The hydrophysical model ensemble learning framework has m hydrophysical models; for each hydrophysical model... , During the model training phase, hydrological data is used. As input, to observe flow rate As the target variable, for the hydrophysical model Model parameters Training is performed to obtain a trained hydrophysical model. Simultaneously, the time-by-time internal state variables perceived by each trained hydrophysical model are extracted to form a multi-model state variable set, and the first simulated flow rate is output. .

[0029] Furthermore, step S3 specifically includes:

[0030] Step S31, the terminal error correction model includes an ARX model and a weighted least squares (WLS) parallel fusion model;

[0031] Step S32, the ARX model is compared with the hydrophysical model. First analog flow rate output When performing deviation correction, the historical dependence of the simulated flow residual sequence is considered, and multiple meteorological factors are introduced as covariates to capture the key driving factors affecting the current forecast flow deviation, thus obtaining the corrected simulated flow. The weighted least squares (WLS) parallel fusion model uses optimal weights to weight and fuse the corrected simulated flows corresponding to each hydrophysical model to obtain the second simulated flow. ;

[0032] The optimal weights for each hydrophysical model are determined using the following strategy: within the same observation period... Within the framework, a weighted least squares objective function is established. In the weighted least squares objective function, a time weight is introduced at each time step, and a flow decay index is introduced into the time weight to control the degree of weight decay of high flow samples, thereby actively weakening the numerical influence of high flow time on weight estimation. The weighted least squares objective function is solved to obtain each optimal weight.

[0033] Furthermore, the ARX model is as follows:

[0034] (5)

[0035] (6)

[0036] in: Hydrophysical model At any moment The simulated flow residual; ; For a moment Observed flow rate at the time; Hydrophysical model At any moment Simulated traffic; is the autoregressive coefficient of the flow term; K is the autoregressive order of the flow term; For a moment Meteorological factors; L represents the autoregressive coefficient of the meteorological term; L represents the autoregressive order of the meteorological term. It is white noise; For ARX models to hydrophysical models At any moment The calculated simulated residual value.

[0037] Furthermore, the strategy for determining the optimal weights for each hydrophysical model is as follows:

[0038] Step S321, establish the expression for the expected squared error:

[0039] (7)

[0040] in: Represents expectations; Hydrophysical model to be optimized The weights satisfy m represents the number of hydrophysical models; The residual between the simulated flow rate corrected by the ARX model and the observed flow rate at the corresponding time point; = ;

[0041] Step S322: Considering the large error and significant uncertainty in the flow rate during the flood peak period, a weighted least squares objective function is established by introducing time weights at different times, based on minimizing the expected squared error.

[0042] (8)

[0043] in: This represents the weighted least squares objective function; Minimize For the goal; The observation period is formed by dividing historical windows; For a moment Time weighting ; For a moment The observed flow rate; This is the flow decay index, used to control the degree of weight decay for high-flow samples; To prevent division by zero of constants;

[0044] Step S323 is to solve the problem under constraints. By determining the optimal weights and introducing the Lagrange multiplier μ, the optimization problem is transformed into a quadratic programming problem with equality constraints. The Lagrange function is constructed as follows:

[0045] (9)

[0046] right and Taking the partial derivatives and setting them to zero yields a system of linear equations, from which the optimal weight vector can be analytically determined. ; These are the various hydrophysical models. The optimal weight.

[0047] Furthermore, step S5 specifically involves:

[0048] The base learner integration framework has Each base learner; for each base learner , During the model training phase, the state factor feature matrix is ​​reconstructed. As input, to observe flow rate For the target variable, a Bayesian optimization algorithm is introduced to optimize the base learner. The key hyperparameters are used for training to obtain the trained base learner. and output the third simulated flow rate. .

[0049] Furthermore, step S6 includes:

[0050] Step S61: Based on the percentiles of historical window observed flow, the following parameters are obtained. Each observation flow interval, and each type of observation flow interval Corresponding to a hydrological scenario , ;

[0051] Step S62, with all base learners in the same hydrological scenario The third analog flow rate output below As a meta-feature, the observed flow rate As the target variable, L2 regularization is introduced to prevent overfitting, for the same hydrological scenario. Expert Model Training is performed, and decisions are made to obtain each expert model. For each base learner The fixed weighting coefficients; the loss function during the model training phase is as follows:

[0052] (10)

[0053] (11)

[0054] in: Representative expert model The loss function used; Hydrological scenario The corresponding training sample subset; For expert models The output simulated flow rate; Hydrological scenario The training sample subset is input to the base learner Then, its output simulated flow rate; For expert models Base learner Fixed weighting coefficients; The number of base learners; The L2 regularization coefficient balances fitting accuracy and model complexity.

[0055] Step S63, to reconstruct the state factor feature matrix A GRU time-gated network is constructed for the input, which will reconstruct the state factor feature matrix. The hydrophysical state is mapped to an expert model for each hydrological scenario. Dynamic weights By normalizing using the Softmax function, the sum of dynamic weights is guaranteed to be 1, thereby achieving adaptive weight allocation driven by hydrophysical characteristics.

[0056] Specifically, during the training phase of the GRU time-gated network, an external loss function term for hydrological physical processes is added to its loss function to achieve the expected monotonic relationship between hydrological data and observed flow.

[0057] The hydrological data includes rainfall and potential evapotranspiration, and rainfall loss function term and potential evapotranspiration loss function term are established respectively;

[0058] ①Rainfall loss function term:

[0059] Reconstructed state factor feature matrix at each time step within the historical window To form a reconstructed state factor time series ;

[0060] Reconstructing the time series of state factors Randomly selected For each selected disturbance time, [the disturbance time is determined by the number of disturbance times]. Other reconstructed state factors remain unchanged, only the rainfall P is affected. t’ Apply a random, small increment within the interval [0, 0.1] using a random uniform function. , so that the rainfall is P t’ + This yields a new time series of reconstructed state factors affected by rainfall disturbance. ;

[0061] Reconstructing the time series of state factors The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ;

[0062] Reconstructing the time series of state factors affected by rainfall disturbance The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ;

[0063] For each disturbed moment Establish the monotonic relationship constraint formula between rainfall and flow: This means that when rainfall disturbance increases, the expected simulated flow rate will increase accordingly.

[0064] Therefore, if the monotonic relationship constraint of rainfall-flow is satisfied, no penalty is applied; if it is not satisfied, a penalty is applied, which is transformed into a penalty term in the loss function, thereby enhancing physical consistency. This leads to the establishment of the rainfall loss function term. :

[0065] (12)

[0066] Where: ReLU is the response function;

[0067] ② Potential evapotranspiration loss function term:

[0068] With rainfall loss function term The difference lies in the fact that when the potential evapotranspiration disturbance increases, the expected corresponding simulated flow rate decreases. Therefore, the monotonic relationship constraint between potential evapotranspiration and flow rate is: Its potential evapotranspiration loss function term for:

[0069] (13)

[0070] Where: N e It represents the number of times the evaporation was disturbed. It is a slight increase in evaporation; Disturbance time Potential evaporation; The simulated flow rate output after the evapotranspiration is disturbed and increased; The simulated flow rate is the output without evapotranspiration.

[0071] ③ Therefore, the loss function of the GRU time-gated network is established. :

[0072] (14)

[0073] in: The main loss function term represents the flow loss, and its expression is:

[0074] (15)

[0075] Represents the time series of reconstructed state factors Length; This means: to reconstruct the time series of state factors. The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ; These are the weights of each loss function term.

[0076] Furthermore, it also includes: Step S8, constructing an interpretability analysis framework based on SHAP; based on the optimal principle of the comprehensive evaluation index NPCEM on the test set, the SHAP interpretability framework is introduced to interpret the state space of each base learner and expert model under various hydrological scenarios, thereby quantifying the contribution and interaction of each input feature to the prediction results of the base learner and expert model, revealing the driving mechanism of key hydrological factors on flow prediction, and enhancing the transparency of model decision-making.

[0077] The specific explanation is as follows: sum the contributions of all input features of the model. Approximate the model output value f(x) and the baseline value The difference between them:

[0078] (16)

[0079] Where: for the base learner, the explained target feature x is For expert models The target feature x explained is the sum of all base learners in the same hydrological scenario. The third analog flow rate output below ;

[0080] Each This indicates that when the model input is x, feature r causes the model output to deviate from the baseline value. The contribution, where n is the total number of features and the baseline value. This represents the average output value of the model on the training set.

[0081] The present invention also provides an expert stacked integrated flood forecasting system based on deviation correction and physical guidance, for implementing the aforementioned expert stacked integrated flood forecasting method based on deviation correction and physical guidance.

[0082] The expert stacked integrated flood forecasting method and system based on deviation correction and physical guidance provided by this invention has the following advantages:

[0083] This invention proposes an expert stacked ensemble flood forecasting method and system based on bias correction and physical guidance, effectively overcoming the dual limitations of the generalization constraints of traditional hydrological models and the lack of physical representation in single data-driven models. Multiple classical hydrological physical models are used as state-aware modules within the stacked ensemble framework, enabling the meta-learner to perceive the dynamic response state of the watershed under different physical assumptions, significantly enhancing the model's ability to physically represent runoff generation and confluence processes. Simultaneously, a terminal error correction mechanism based on source regression and weighted least squares (ARX-WSL) is proposed to perform time-series modeling and weighted correction on the hydrological model residual sequence, particularly implementing a reverse flow weighting strategy for the peak flood stage, effectively suppressing systematic overestimation or underestimation in extreme events. Based on this, a highly diverse stacked architecture is constructed through heterogeneous base learners (including tree models, neural networks, etc.) and the physical-guided expert stacked ensemble method, which not only improves forecast accuracy and robustness but also enhances adaptability to non-stationary hydrological conditions. This method organically integrates physical mechanisms, multi-source state information, and data-driven error correction. The overall framework is logically clear, the modules are highly decoupled, and the computation is efficient. It has good scalability and operational application value, providing a reliable technical paradigm for high-precision intelligent flood forecasting. Attached Figure Description

[0084] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0085] Figure 1 A schematic diagram of an expert stacked integrated flood forecasting method based on deviation correction and physical guidance provided by the present invention;

[0086] Figure 2 The cumulative distribution function (CDF) plot of the NSE of the base learner simulation results provided by this invention;

[0087] Figure 3 The bar chart and trend line show the NSE / RMSE of the simulation results of the base learner provided in this invention. Detailed Implementation

[0088] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the invention.

[0089] This invention can solve the problem that single hydrological models or machine learning methods are not only slightly insufficient in terms of performance improvement, but also difficult to balance the simulation of high and low flow processes. While existing terminal-oriented forecast error correction methods have improved prediction accuracy, they generally lack effective utilization of internal state variables and have not established an error diagnosis and closed-loop correction mechanism based on interpretability analysis, resulting in insufficient physical consistency of the model and limited generalization ability.

[0090] This invention proposes an expert-stacked integrated flood forecasting method and system based on bias correction and physical guidance. By using the state information of multiple hydrophysical models as high-dimensional feature inputs to a stacked machine learning framework, and introducing a terminal error correction module in the base learning stage, this invention proposes an error correction method based on origin-derived regression and weighted least squares (ARX-WLS), which can significantly improve the model's ability to capture extreme flood events and its overall forecast robustness. This invention aims to establish a high-performance stacked integrated flood forecasting system that combines physical foundations, data-driven advantages, and dynamic correction capabilities.

[0091] Specifically, the accuracy and robustness of watershed flood forecasting have long been constrained by model structure uncertainties and differences in runoff generation and confluence mechanisms. Single hydrological models or machine learning methods not only fall short in performance improvement but also struggle to balance the simulation of both high and low flow events. To address this, this invention discloses an expert-stacked integrated flood forecasting method and system based on bias correction and physical guidance. This method is a high-performance stacked machine learning (TBC-SEML) framework that integrates multi-model state awareness, terminal error correction, and interpretability analysis. The framework acquires multi-model state datasets based on classic conceptual hydrophysical models (GR4J, HYMOD, SIMHYD) and proposes a comprehensive evaluation index (NPCEM) that considers both the Nash coefficient (NSE) and the percentage peak threshold accuracy (PPTS) as an optimization objective, enhancing the ability to capture high flow events. Furthermore, it innovatively proposes a terminal error correction mechanism based on source regression and weighted least squares (ARX-WSL), and uses the flow attenuation coefficient β to suppress the excessive dominance of flood peak on weight estimation. Building upon this foundation, eight types of base learners—including Random Forest (RF), ExtraTrees, XGBoost, LightGBM, CatBoost, Multilayer Perceptron (MLP), Histogram Gradient Regression (HGBR), and K-Nearest Neighbors (KNN)—are integrated. Bayesian methods are employed to optimize the hyperparameters of the base learners, and a physics-guided expert stacking ensemble method is proposed to identify the dynamic weights of expert models under different hydrological scenarios. Finally, the SHAP interpretability analysis method is introduced to quantify the predictive contributions of the base learners and state variables, thereby enhancing model transparency. This highly diverse and heterogeneous model stacking framework not only enhances the complementarity among base learners but also achieves a good synergy between accuracy, stability, and interpretability, providing a new paradigm for intelligent hydrological forecasting that combines high performance and transparent decision support. This invention is applicable to high-precision and robust real-time flood process prediction at the watershed scale.

[0092] This invention provides an expert stacked integrated flood forecasting method based on deviation correction and physical guidance. The main ideas include:

[0093] By coordinating multiple structurally heterogeneous hydrophysical models, their physically meaningful internal state variables are extracted as dynamic feature inputs to construct an ARX-WSL-based terminal error correction model. Furthermore, a physics-guided expert stacking and integration flood forecasting method is constructed to achieve an optimized process of "physical integration - terminal error correction - stacked model - interpretable analysis".

[0094] like Figure 1 As shown, the present invention provides an expert stacked integrated flood forecasting method based on deviation correction and physical guidance, comprising:

[0095] Step S1: Obtain hourly hydrological and meteorological data for the historical window of the study basin, including hydrological data and observed flow rate Q. obs,t In addition, meteorological factor data were collected, and the completeness, reliability, and consistency of the data were verified. The hydrological data included rainfall P. t and potential evaporation E p,t The meteorological data includes the highest temperature T. max,t Minimum temperature T min,t and solar radiation data S r,t The observed flow rate Q of this invention obs,t It has the same meaning as runoff flow and flood flow.

[0096] Step S2: Construct an integrated learning framework for hydrophysical models, including several structurally heterogeneous hydrophysical models; each hydrophysical model senses a set of multi-mode state variables related to the predicted flow from the hydrological data and outputs a first simulated flow.

[0097] The hydrophysical model ensemble learning framework has m hydrophysical models; for each hydrophysical model... , During the model training phase, hydrological data is used. As input, to observe flow rate As the target variable, for the hydrophysical model Model parameters Training is performed to obtain a trained hydrophysical model. Simultaneously, the time-by-time internal state variables perceived by each trained hydrophysical model are extracted to form a multi-model state variable set, and the first simulated flow rate is output. .

[0098] As an example, the hydrophysical model ensemble learning framework includes three hydrophysical models. This example uses the widely used conceptual rainfall-runoff models GR4J, HYMOD, and SIMHYD as the state-aware modules of the hydrophysical models. These three hydrophysical models are simple in structure, have few parameters, and are computationally efficient. They are commonly used in flood forecasting, water resource assessment, and comparative studies of hydrological models, and have achieved good performance. The model parameters for these three models are listed below. Meaning and range of values.

[0099] Table 1. Meaning and range of parameters in the hydrophysical model.

[0100] As an example, the internal state variables sensed by each hydrophysical model and the first simulated flow rate are collected. The reconstructed state factor feature set was initially obtained.

[0101] ①The calculation function of the GR4J model, the returned internal state variables, and the first simulated flow rate are as follows:

[0102]

[0103] Where: GR4J is the model calculation function. For the GR4J model parameters (see Table 1), S g,t R is the water storage capacity of the runoff reservoir. g,t The water storage capacity of the confluence reservoir, For effective precipitation, For the remaining evaporation capacity, To replenish the runoff reservoir's rainfall, Evapotranspiration from the reservoir P is the runoff from the runoff reservoir. r,t For total output flow, G e,t Q represents the amount of groundwater exchanged. r,t For the outflow of the confluence reservoir, Calculate the flow rate for the unit hydrograph. The simulated flow rate at the outlet section of the basin is the first simulated flow rate.

[0104] ②The computation function of the HYMOD model, the returned internal state variables, and the first simulated flow rate are as follows:

[0105]

[0106] Where: HYMOD is the model calculation function. The parameters for the HYMOD model are shown in Table 1. This refers to the soil moisture storage status. This refers to the water storage status of the slow-moving reservoir. The water storage status of Reservoir 1 is as follows: The water storage status of Reservoir 2 is as follows: The water storage status of Reservoir 3 is as follows: This refers to the portion exceeding the soil's maximum water storage capacity (the excess infiltration runoff portion). Effective rainfall resulting from changes in soil moisture content (filling the runoff portion). This is the actual evaporation rate. Slow reservoir outflow For the outflow of the fast reservoir (the last stage), The simulated flow rate at the outlet section of the basin is the first simulated flow rate.

[0107] ③The computation function of the SIMHYD model, the returned internal state variables, and the first simulated flow rate are as follows: ;

[0108] Where: SIMHYD is the model calculation function. For the SIMHYD model parameters (see Table 1), GW t Underground reservoir water storage status, SMS t Rmo represents the soil moisture storage state. t Rec represents soil infiltration rate. t SMF is the amount of groundwater replenishment. t INR is the amount of soil moisture replenished. t To deduct rainfall after vegetation interception, Evap s,t For actual evaporation, IR t For surface runoff, SR t As the river flows through the soil, As the base current, This is the first simulated flow rate.

[0109] It should be noted that, in the model training phase, the hydrophysical model and the base learner involved in the subsequent steps of this invention use the comprehensive evaluation index NPCEM, which takes into account both the Nash coefficient (NSE) and the peak percentage threshold accuracy (PPTS), as the target for optimizing the model. The optimization method can adopt the SCE-UA global optimization algorithm to obtain the globally optimal model parameters.

[0110] The innovative comprehensive evaluation index (NPCEM) proposed in this invention, which takes into account both the Nash coefficient (NSE) and the peak percentage threshold accuracy (PPTS), is constructed as follows:

[0111] ① Calculate the Nash-Sutcliffe Efficiency (NSE) coefficient to evaluate the overall performance of the model:

[0112] (1)

[0113] in: The observation period is formed by dividing historical windows; For a moment The observed flow rate; The simulated flow rate output by the trained model; This represents the average observed flow rate within the observation period.

[0114] ② Calculate the Peak Percent Threshold Score (PPTS) to evaluate peak flow:

[0115] (2)

[0116] in: This is the flood peak quantile threshold, for example, 95%; The number of times to meet the flood peak threshold; and , respectively time Observed peak flow rate and simulated peak flow rate;

[0117] ③ Calculate the comprehensive evaluation index NPCEM, which takes into account both the Nash coefficient (NSE) and the peak percentage threshold accuracy (PPTS):

[0118] (3)

[0119] (4)

[0120] Where: λ is the amplification factor, which is generally taken as 1~50; It is a step function. The set NSE loss threshold; when calibrating the model parameters, if ≤ , It is a constant of 1, otherwise it is 0.

[0121] The comprehensive evaluation index NPCEM proposed in this invention not only takes into account the overall goodness of fit between model forecasts and observed values, but also integrates the accuracy of flood peak simulation. By dynamically balancing NSE and PPTS, it effectively takes into account the simulation performance of the overall hydrological process and extreme events. It is very suitable as the objective function of a single-objective optimization algorithm, and it is easy to efficiently search for the optimal parameter combination that satisfies both overall accuracy and flood peak capture capability.

[0122] Step S3: Using the ARX-WLS terminal error correction model, the first simulated flow rate output by each of the hydrophysical models is corrected for deviation to obtain the second simulated flow rate;

[0123] Hydrological forecasting errors typically stem from the combined effects of model input uncertainties and structural defects. To effectively correct terminal errors in hydrophysical models, this invention proposes an error correction framework based on originating from regression and weighted least squares (ARX-WLS). The ARX model not only considers the historical dependence of the residual sequence but also introduces multiple meteorological factors as covariates to capture the key driving factors influencing current forecast biases.

[0124] Step S31, the terminal error correction model includes an ARX model and a weighted least squares (WLS) parallel fusion model;

[0125] Step S32, the ARX model is compared with the hydrophysical model. First analog flow rate output When performing deviation correction, the historical dependence of the simulated flow residual sequence is considered, and multiple meteorological factors are introduced as covariates to capture the key driving factors affecting the current forecast flow deviation, thus obtaining the corrected simulated flow. The weighted least squares (WLS) parallel fusion model uses optimal weights to weight and fuse the corrected simulated flows corresponding to each hydrophysical model to obtain the second simulated flow. ;

[0126] The ARX model is characterized as follows:

[0127] (5)

[0128] (6)

[0129] in: Hydrophysical model At any moment The simulated flow residual; ; For a moment Observed flow rate at the time; Hydrophysical model At any moment Simulated traffic; is the autoregressive coefficient of the flow term; K is the autoregressive order of the flow term; For the introduction of time In this embodiment, meteorological factors, ; L represents the autoregressive coefficient of the meteorological term; L represents the autoregressive order of the meteorological term. It is white noise; For ARX models to hydrophysical models At any moment The calculated simulation residual value. Formula (5) is the recursive form of the ARX model.

[0130] This method achieves systematic bias correction of hydrophysical models by integrating residual time-series dynamics with key meteorological driving factors in the watershed.

[0131] The optimal weights for each hydrophysical model are determined using the following strategy: within the same observation period... Within the framework, a weighted least squares objective function is established. In the weighted least squares objective function, a time weight is introduced at each time step, and a flow decay index is introduced into the time weight to control the degree of weight decay of high flow samples, thereby actively weakening the numerical influence of high flow time on weight estimation. The weighted least squares objective function is solved to obtain each optimal weight.

[0132] Therefore, based on the correction results obtained from the ARX model, this invention further proposes a parallel fusion strategy using weighted least squares (WLS). This strategy solves for the optimal weights under the objective of minimizing the overall weighted error variance, thereby obtaining the second simulated flow rate. Its expression is:

[0133]

[0134] Where: m represents the number of hydrophysical models, which is 3 in this embodiment. Let be the weight vector to be optimized, satisfying .

[0135] The strategy for finding the optimal weights for each hydrophysical model is as follows:

[0136] Step S321, establish the objective of the calibration model, namely, minimizing the expected squared error (ESE), expressed as:

[0137] (7)

[0138] in: Represents expectations; Hydrophysical model to be optimized The weights satisfy m represents the number of hydrophysical models; The residual between the simulated flow rate corrected by the ARX model and the observed flow rate at the corresponding time point; = ;

[0139] Step S322: Considering that the flow error during peak flood season is usually large and the uncertainty is significant, if all times are weighted equally, high flow samples may dominate the optimization process due to excessively large residual square terms, thereby reducing the model's performance during normal or dry periods. Therefore, this invention proposes a flow attenuation index, designing the time weight as a negative power function of the observed flow, actively weakening the numerical influence of high flow times on the weight estimation, thereby improving the robustness and generalization ability of the calibration model across the entire flow range. The weighted least squares objective function is as follows:

[0140] (8)

[0141] in: This represents the weighted least squares objective function; Minimize For the goal; The observation period is formed by dividing historical windows; For a moment Time weighting ; For a moment The observed flow rate; This is the flow decay index, used to control the degree of weight decay for high-flow samples; To prevent division by zero of constants;

[0142] Step S323 is to solve the problem under constraints. By determining the optimal weights and introducing the Lagrange multiplier μ, the optimization problem is transformed into a quadratic programming problem with equality constraints. The Lagrange function is constructed as follows:

[0143] (9)

[0144] right and Taking the partial derivatives and setting them to zero yields a system of linear equations, from which the optimal weight vector can be analytically determined. ; These are the various hydrophysical models. The optimal weights obtained by this invention are minimum variance unbiased estimates that can effectively utilize the error correlation between each corrected model to achieve the optimization of fusion accuracy.

[0145] Step S4: Combine the multi-mode state variable sets sensed by all hydrophysical models and the second simulated flow, and add meteorological factor data to obtain the reconstructed state factor feature matrix;

[0146] In this embodiment, the reconstructed state factor feature matrix is:

[0147] ;

[0148] Step S5: Construct a base learner ensemble framework, including several base learners; each base learner mines the mapping relationship between the reconstructed state factor feature matrix and the flood forecast flow, and outputs the third simulated flow.

[0149] The base learner integration framework has Each base learner; for each base learner , During the model training phase, the state factor feature matrix is ​​reconstructed. As input, to observe flow rate For the target variable, a Bayesian optimization algorithm is introduced to optimize the base learner. The key hyperparameters are used for training to obtain the trained base learner. and output the third simulated flow rate. .

[0150] As an example, base learners are constructed based on different types of models. Based on this, the optimal performance structure of the original base decision tree model (such as hyperparameter configurations like depth and splitting criteria) is retained, and the reconstructed feature matrix is... As input to the base learner. The base learners constructed in this invention fall into the following four categories:

[0151] ①Bagging tree models: Random Forest (RF), ExtraTrees, Histogram Gradient Regression (HGBR);

[0152] ② Boosting tree models: XGBoost, LightGBM, CatBoost;

[0153] ③ Distance model: K-nearest neighbor regression (KNN);

[0154] ④ Neural Network: Multilayer Perceptron (MLP);

[0155] The reconstructed state space data is used as input features, and the observed flow rate is used as the target variable. It is divided into a training set (70%) and a validation set (30%). Furthermore, a Bayesian optimization algorithm is introduced to efficiently search the key hyperparameter space of each base learner, with the objective function remaining NPCEM. After optimization, the optimal parameter configurations of each base learner and the corresponding trained model instances are stored as pkl format data for use in subsequent stages.

[0156] Step S6: Construct a physics-guided expert hybrid stacked ensemble meta-learner, including expert models for various hydrological scenarios and a GRU temporal gating network; for each of the expert models under the hydrological scenario, the third simulated flow output by each of the base learners is weighted and fused to obtain a fourth simulated flow under the same hydrological scenario; the GRU temporal gating network learns the dynamic weights of each of the expert models from the reconstructed state factor feature matrix; using the dynamic weights, the fourth simulated flow is weighted and fused to obtain the final simulated flow output by the physics-guided expert hybrid stacked ensemble meta-learner;

[0157] Step S61: Based on the percentiles of historical window observed flow, the following parameters are obtained. Each observation flow interval, and each type of observation flow interval Corresponding to a hydrological scenario , ;

[0158] Step S62, with all base learners in the same hydrological scenario The third analog flow rate output below As a meta-feature, the observed flow rate As the target variable, L2 regularization is introduced to prevent overfitting, for the same hydrological scenario. Expert Model Training is performed, and decisions are made to obtain each expert model. For each base learner The fixed weighting coefficients; the loss function during the model training phase is as follows:

[0159] (10)

[0160] (11)

[0161] in: Representative expert model The loss function used; Hydrological scenario The corresponding training sample subset; For expert models The output simulated flow rate; Hydrological scenario The training sample subset is input to the base learner Then, its output simulated flow rate; For expert models Base learner Fixed weighting coefficients; The number of base learners; The L2 regularization coefficient balances fitting accuracy and model complexity.

[0162] Step S63, to reconstruct the state factor feature matrix A GRU time-gated network is constructed for the input, which will reconstruct the state factor feature matrix. The hydrophysical state is mapped to an expert model for each hydrological scenario. Dynamic weights By normalizing using the Softmax function, the sum of dynamic weights is guaranteed to be 1, thereby achieving adaptive weight allocation driven by hydrophysical characteristics.

[0163] Specifically, during the training phase of the GRU time-gated network, an external loss function term for hydrological physical processes is added to its loss function to achieve the expected monotonic relationship between hydrological data and observed flow.

[0164] The hydrological data includes rainfall and potential evapotranspiration, and rainfall loss function term and potential evapotranspiration loss function term are established respectively;

[0165] ①Rainfall loss function term:

[0166] Reconstructed state factor feature matrix at each time step within the historical window To form a reconstructed state factor time series ;

[0167] Reconstructing the time series of state factors Randomly selected For each selected disturbance time, [the disturbance time is determined by the number of disturbance times]. Other reconstructed state factors remain unchanged, only the rainfall P is affected. t’ Apply a random, small increment within the interval [0, 0.1] using a random uniform function. , so that the rainfall is P t’ + This yields a new time series of reconstructed state factors affected by rainfall disturbance. ;

[0168] Reconstructing the time series of state factors The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ;

[0169] Reconstructing the time series of state factors affected by rainfall disturbance The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ;

[0170] For each disturbed moment Establish the monotonic relationship constraint formula between rainfall and flow: This means that when rainfall disturbance increases, the expected simulated flow rate will increase accordingly.

[0171] Therefore, if the monotonic relationship constraint of rainfall-flow is satisfied, no penalty is applied; if it is not satisfied, a penalty is applied, which is transformed into a penalty term in the loss function, thereby enhancing physical consistency. This leads to the establishment of the rainfall loss function term. :

[0172] (12)

[0173] Where: ReLU is the response function;

[0174] ② Potential evapotranspiration loss function term:

[0175] With rainfall loss function term The difference lies in the fact that when the potential evapotranspiration disturbance increases, the expected corresponding simulated flow rate decreases. Therefore, the monotonic relationship constraint between potential evapotranspiration and flow rate is: Its potential evapotranspiration loss function term for:

[0176] (13)

[0177] Where: N e It represents the number of times the evaporation was disturbed. It is a slight increase in evaporation; Disturbance time Potential evaporation; The simulated flow rate output after the evapotranspiration is disturbed and increased; The simulated flow rate is the output without evapotranspiration.

[0178] ③ Therefore, the loss function of the GRU time-gated network is established. :

[0179] (14)

[0180] in: The main loss function term represents the flow loss, and its expression is:

[0181] (15)

[0182] Represents the time series of reconstructed state factors Length; This means: to reconstruct the time series of state factors. The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ; These are the weights of each loss function term.

[0183] For this step, an example is described below:

[0184] To address the shortcomings of traditional linear meta-learners, such as globally fixed weights, insufficient accuracy in fitting extreme flow rates, and inadequate exploitation of hydrological time-series physical correlations, this invention proposes a physics-guided expert ridge regression stacking ensemble method. Using the predicted outputs of eight heterogeneous base learners (Bagging tree, Boosting tree, kernel method, distance model, and neural network) trained in the S5 stage as meta-features, a quantile-guided ridge regression expert system is constructed. Each expert model performs specialized training using only a subset of samples from its corresponding interval. The predicted outputs of the base learners serve as meta-features, and the observed flow rate is the target variable. L2 regularization is introduced to prevent overfitting, ensuring that each expert model focuses solely on fitting patterns within its corresponding flow rate magnitude, thus forming differentiated decision-making capabilities and achieving refined stacking of different hydrological processes. Finally, a gated recurrent unit based on the hydrological physical state space is introduced to achieve dynamic weight allocation at the sample level and embed hydrological physical constraints, improving the model's physical rationality and robustness.

[0185] First, based on the percentiles of the measured runoff data, i.e. the observed flow, the samples were divided into 5 flow intervals, corresponding to 5 hydrological scenarios: Q5 extreme low water, Q30 low water, Q50 normal water, Q70 high water, and Q98 extreme flood. For each quantile interval, i.e. the hydrological scenario, a Ridge regression meta-model was trained as an expert model. Only a subset of samples corresponding to the hydrological scenario was used for specialized training. The predicted output of the base learner was used as the meta-feature, the target variable was the measured flow, and L2 regularization was introduced to prevent overfitting.

[0186]

[0187] Where: q∈{5,30,50,70,98} represents the quantile interval, i.e. different hydrological scenarios; Let q be the Ridge regression value for the hydrological scenario. Let be the runoff simulation value of the k-th base learner under hydrological scenario q. For the Ridge regression under hydrological scenario q, the fixed weighting coefficients are applied to the k-th base learner.

[0188] The Ridge Regression loss functions for the expert models under different hydrological scenarios q are as follows:

[0189]

[0190] Wherein: S q λ1 is the training sample subset corresponding to hydrological scenario q, and λ1 is the L2 regularization coefficient, which balances fitting accuracy and model complexity.

[0191] Secondly, based on the reconstructed spatial temporal characteristics of hydrological state... A gated recurrent unit (GRU) is constructed as input to map hydrological physical states to expert model weights for different hydrological scenarios q. Weight allocation depends on the physical features driving runoff changes. The dynamic temporal weights of the expert models for different hydrological scenarios q are learned, and normalization using the Softmax function ensures that the weight sums to 1, achieving adaptive weight allocation driven by physical features. The weight calculation formula is as follows:

[0192]

[0193] in: Here, b represents the gated recurrent unit, and b represents the neural network weights and threshold. The dynamic weights of the Ridge regression for each expert model under different hydrological scenarios satisfy the constraints. This ensures the legality and physical rationality of the weight allocation.

[0194] GRU is a black-box model that ignores complex physical processes, making it difficult to align with the fundamental principles of flood forecasting. To overcome this limitation, this invention combines physical constraints with a deep learning model, enhancing physical consistency by modifying the model's loss function and transforming prior knowledge of flood forecasting into a penalty term in the loss function. Therefore, this invention incorporates unequal physical constraints to achieve the desired monotonic relationship between rainfall, evapotranspiration, and runoff. Under the assumption that all other input variables remain constant, new time series for rainfall and evapotranspiration are generated separately by applying random small increments within the interval [0, 0.1] using a random uniform function. These new time series are then combined with the unchanged time series to form new input data. The difference between the predicted value corresponding to the new data and the predicted value of the original input data under undisturbed conditions is calculated. This difference is then converted into a specific loss value using a rectified linear unit (ReLU) function and added to the loss function.

[0195] After end-to-end optimization of the Ridge expert coefficients and GRU dynamic weight parameters through the total loss function, the final prediction formula of the ensemble model is:

[0196]

[0197] in: To obtain the final simulated flow value of the integrated model, the prediction results of five expert models are dynamically weighted and fused. This retains the specialized fitting ability of each expert model in the corresponding flow range, and uses GRU to achieve time-series dynamic weighting, ultimately resulting in an integrated model that combines physical rationality and prediction accuracy.

[0198] Step S7: Flood forecasting is performed using the methods described in steps S2 to S6.

[0199] Step S8: Construct an interpretability analysis framework based on SHAP; Based on the optimal principle of the comprehensive evaluation index NPCEM on the test set, introduce the SHAP interpretability framework to interpret the state space of each base learner and expert model under various hydrological scenarios, thereby quantifying the contribution and interaction of each input feature to the prediction results of the base learner and expert model, revealing the driving mechanism of key hydrological factors on flow prediction, and enhancing the transparency of model decision-making.

[0200] The specific explanation is as follows: sum the contributions of all input features of the model. Approximate the model output value f(x) and the baseline value The difference between them:

[0201] (16)

[0202] Where: for the base learner, the explained target feature x is For expert models The target feature x explained is the sum of all base learners in the same hydrological scenario. The third analog flow rate output below ;

[0203] Each This indicates that when the model input is x, feature r causes the model output to deviate from the baseline value. The contribution, where n is the total number of features and the baseline value. This represents the average output value of the model on the training set.

[0204] Step S9: Evaluate the model's performance on the training and validation sets based on RMSE and KGE.

[0205] The RMSE calculation formula is as follows:

[0206] ;

[0207] KGE is calculated as follows:

[0208] ;

[0209] Wherein: G1 is the variance factor; G2 is the mean factor; G3 is the linear correlation factor.

[0210] The present invention also provides an expert stacked integrated flood forecasting system based on deviation correction and physical guidance, for implementing the aforementioned expert stacked integrated flood forecasting method based on deviation correction and physical guidance.

[0211] As another embodiment, an expert stacked integrated flood forecasting method and system based on deviation correction and physical guidance is provided to balance the simulation of high-flow and low-flow processes, and to solve the problems of insufficient forecast accuracy and poor robustness faced by single hydrological models or machine learning methods.

[0212] This study uses 199 catchments in the CAMELS-US watershed in the United States as research subjects to verify the accuracy and robustness of the proposed method. This dataset covers 199 watersheds within the US, providing long-term, high-precision diurnal hydro-meteorological observation data. The dataset includes measured flow sequences and meteorological forcing datasets (rainfall, maximum temperature, minimum temperature, and solar radiation), with a data start time from 1951 to 2020, exhibiting good spatial representativeness and temporal continuity. The training period was from January 1, 1980 to December 31, 2006, and the validation period was from January 1, 2007 to December 31, 2014. This example constructs the TBC-SEML framework for training and validation, using the mean NSE as the overall performance metric. The results are shown in Table 2, comprehensively reflecting the model's average performance and robustness in large-scale watershed groups. Meanwhile, Figure 2 The cumulative distribution function (CDF) plot of the NSE is shown in the simulation results of the base learner. Figure 3 A bar chart and trend line for NSE / RMSE of the simulation results of the base learner.

[0213] Table 2. Simulation results, bias correction results, and TBC-SEML validation results of the hydrophysical model.

[0214]

[0215] In summary, this invention proposes an expert-stacked integrated flood forecasting method and system based on bias correction and physical guidance. For the first time, this invention presents a high-performance stacked machine learning (TBC-SEML) framework that integrates multi-model state awareness, terminal error correction, and interpretability analysis. This framework obtains multi-model state datasets based on classical hydrological models and proposes NPCEM, a comprehensive evaluation index that balances NSE and PPTS, as the optimization objective to enhance the ability to capture high-flow events. Furthermore, it innovatively proposes a terminal error correction mechanism based on source regression and weighted least squares (ARX-WSL), and proposes a reverse flow weighting strategy using flow attenuation factors to suppress the excessive dominance of flood peaks on weight estimation. Based on this, it integrates eight types of base learners, including Random Forest (RF), ExtraTrees, XGBoost, LightGBM, CatBoost, Multilayer Perceptron (MLP), Histogram Gradient Regression (HGBR), and K-Nearest Neighbors (KNN). Bayesian methods are used to optimize the hyperparameters of the base learners, and a meta-learner is constructed based on linear fitting. Meanwhile, the SHAP interpretability analysis method is introduced to quantify the predictive contributions of base learners and state variables, thereby improving model transparency. This highly diverse and heterogeneous model stacking framework not only enhances the complementarity among base learners but also achieves good synergy between accuracy, stability, and interpretability, providing a new paradigm for intelligent hydrological forecasting that combines high performance and transparent decision support.

[0216] The present invention has a rigorous design concept and is easy to operate and implement, and is expected to play an important role in water resource management, flood control and disaster reduction and other fields.

[0217] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An expert stacked ensemble flood forecasting method based on bias correction and physics guidance, characterized in that, include: Step S1: Obtain hourly hydrological and meteorological data for the historical window of the study basin, including hydrological data, observed flow rate, and meteorological factor data; Step S2: Construct an integrated learning framework for hydrophysical models, including several structurally heterogeneous hydrophysical models; each hydrophysical model senses a set of multi-mode state variables related to the predicted flow from the hydrological data and outputs a first simulated flow. Step S3: Using the terminal error correction model, the first simulated flow rate output by each of the hydrophysical models is corrected for deviation to obtain the second simulated flow rate; Step S4: Combine the multi-mode state variable sets sensed by all hydrophysical models and the second simulated flow, and add meteorological factor data to obtain the reconstructed state factor feature matrix; Step S5: Construct a base learner ensemble framework, including several base learners; each base learner mines the mapping relationship between the reconstructed state factor feature matrix and the flood forecast flow, and outputs the third simulated flow. Step S6: Construct a physical-guided expert hybrid stacked integrated meta-learner, including expert models for various hydrological scenarios and a GRU temporal gating network; For each of the aforementioned hydrological scenarios, the expert model performs weighted fusion of the third simulated flow output by each of the aforementioned base learners to obtain the fourth simulated flow under the same hydrological scenario; the GRU temporal gating network learns the dynamic weights of each of the aforementioned expert models from the reconstructed state factor feature matrix; The dynamic weights are used to weight and fuse each of the fourth simulated traffic flows to obtain the final simulated traffic flow output by the physical guidance expert hybrid stacked integrated meta-learner; Step S7: Flood forecasting is performed using the methods described in steps S2 to S6.

2. The expert stacked ensemble flood forecasting method based on bias correction and physical guidance according to claim 1, wherein, The hydrological data includes rainfall and potential evapotranspiration; the meteorological factor data includes maximum temperature, minimum temperature, and solar radiation data. During the model training phase, the hydrophysical model and the base learner use the comprehensive evaluation index NPCEM, which takes into account both the Nash coefficient (NSE) and the peak percentage threshold accuracy (PPTS), as the target for optimizing the model. The calculation method is as follows: ① Calculate the Nash efficiency coefficient (NSE) to evaluate the overall performance of the model: (1) wherein: is an observation period formed by dividing the historical window; is a time is an observed flow rate at the time is a simulated flow rate output by the trained model; is an average of the observed flow rate within the observation period; ② Calculate the percentage peak threshold precision (PPTS) for evaluating peak flow: (2) wherein: is a flood peak quantile threshold value; is a number of times that the threshold value is met; and are times flood peak flow observations and flood peak flow simulations, respectively. ③ Calculate the comprehensive evaluation index NPCEM, which takes into account both the Nash coefficient (NSE) and the peak percentage threshold accuracy (PPTS): (3) (4) Wherein: λ is the amplification factor, the value is 1~50; is a step function, is a set NSE loss threshold; when the model parameter is calibrated, if ≤ , is a constant 1, otherwise 0.

3. The expert stacked ensemble flood forecasting method based on bias correction and physical guidance of claim 1, wherein, Step S2 is as follows: The hydrophysical model ensemble learning framework has m hydrophysical models; for each hydrophysical model... , During the model training phase, hydrological data is used. As input, to observe flow rate As the target variable, for the hydrophysical model Model parameters Training is performed to obtain a trained hydrophysical model. Simultaneously, the time-by-time internal state variables perceived by each trained hydrophysical model are extracted to form a multi-model state variable set, and the first simulated flow rate is output. .

4. The expert stacked integrated flood forecasting method based on deviation correction and physical guidance according to claim 1, characterized in that, Step S3 is as follows: Step S31, the terminal error correction model includes an ARX model and a weighted least squares (WLS) parallel fusion model; Step S32, the ARX model is compared with the hydrophysical model. First analog flow rate output When performing deviation correction, the historical dependence of the simulated flow residual sequence is considered, and multiple meteorological factors are introduced as covariates to capture the key driving factors affecting the current forecast flow deviation, thus obtaining the corrected simulated flow. The weighted least squares (WLS) parallel fusion model uses optimal weights to weight and fuse the corrected simulated flows corresponding to each hydrophysical model to obtain the second simulated flow. ; The optimal weights for each hydrophysical model are determined using the following strategy: within the same observation period... Within the framework, a weighted least squares objective function is established. In the weighted least squares objective function, a time weight is introduced at each time step, and a flow decay index is introduced into the time weight to control the degree of weight decay of high flow samples, thereby actively weakening the numerical influence of high flow time on weight estimation. The weighted least squares objective function is solved to obtain each optimal weight.

5. The expert stacked integrated flood forecasting method based on deviation correction and physical guidance according to claim 4, characterized in that, The ARX model is: (5) (6) in: Hydrophysical model At any moment The simulated flow residual; ; For a moment Observed flow rate at the time; Hydrophysical model At any moment Simulated traffic; is the autoregressive coefficient of the flow term; K is the autoregressive order of the flow term; For a moment Meteorological factors; L represents the autoregressive coefficient of the meteorological term; L represents the autoregressive order of the meteorological term. It is white noise; For ARX models to hydrophysical models At any moment The calculated simulated residual value.

6. The expert stacked integrated flood forecasting method based on deviation correction and physical guidance according to claim 4, characterized in that, The strategy for finding the optimal weights for each hydrophysical model is as follows: Step S321, establish the expression for the expected squared error: (7) in: Represents expectations; Hydrophysical model to be optimized The weights satisfy m represents the number of hydrophysical models; The residual between the simulated flow rate corrected by the ARX model and the observed flow rate at the corresponding time point; = ; Step S322: Considering the large error and significant uncertainty in the flow rate during the flood peak period, a weighted least squares objective function is established by introducing time weights at different times, based on minimizing the expected squared error. (8) in: This represents the weighted least squares objective function; Minimize For the goal; The observation period is formed by dividing historical windows; For a moment Time weighting ; For a moment The observed flow rate; This is the flow decay index, used to control the degree of weight decay for high-flow samples; To prevent division by zero of constants; Step S323 is to solve the problem under constraints. By determining the optimal weights and introducing the Lagrange multiplier μ, the optimization problem is transformed into a quadratic programming problem with equality constraints. The Lagrange function is constructed as follows: (9) right and Taking the partial derivatives and setting them to zero yields a system of linear equations, from which the optimal weight vector can be analytically determined. ; These are the various hydrophysical models. The optimal weight.

7. The expert stacked integrated flood forecasting method based on deviation correction and physical guidance according to claim 1, characterized in that, Step S5 is as follows: The base learner integration framework has Each base learner; for each base learner , During the model training phase, the state factor feature matrix is ​​reconstructed. As input, to observe flow rate For the target variable, a Bayesian optimization algorithm is introduced to optimize the base learner. The key hyperparameters are used for training to obtain the trained base learner. and output the third simulated flow rate. .

8. The expert stacked integrated flood forecasting method based on deviation correction and physical guidance according to claim 1, characterized in that, Step S6 includes: Step S61: Based on the percentiles of historical window observed flow, the following parameters are obtained. Each observation flow interval, and each type of observation flow interval Corresponding to a hydrological scenario , ; Step S62, with all base learners in the same hydrological scenario The third analog flow rate output below As a meta-feature, the observed flow rate As the target variable, L2 regularization is introduced to prevent overfitting, for the same hydrological scenario. Expert Model Training is performed, and decisions are made to obtain each expert model. For each base learner The fixed weighting coefficients; the loss function during the model training phase is as follows: (10) (11) in: Representative expert model The loss function used; Hydrological scenario The corresponding training sample subset; For expert models The output simulated flow rate; Hydrological scenario The training sample subset is input to the base learner Then, its output simulated flow rate; For expert models Base learner Fixed weighting coefficients; The number of base learners; The L2 regularization coefficient balances fitting accuracy and model complexity. Step S63, to reconstruct the state factor feature matrix A GRU time-gated network is constructed for the input, which will reconstruct the state factor feature matrix. The hydrophysical state is mapped to an expert model for each hydrological scenario. Dynamic weights By normalizing using the Softmax function, the sum of dynamic weights is guaranteed to be 1, thereby achieving adaptive weight allocation driven by hydrophysical characteristics. Specifically, during the training phase of the GRU time-gated network, an external loss function term for hydrological physical processes is added to its loss function to achieve the expected monotonic relationship between hydrological data and observed flow. The hydrological data includes rainfall and potential evapotranspiration, and rainfall loss function term and potential evapotranspiration loss function term are established respectively; ①Rainfall loss function term: Reconstructed state factor feature matrix at each time step within the historical window To form a reconstructed state factor time series ; Reconstructing the time series of state factors Randomly selected For each selected disturbance time, [the disturbance time is determined by the number of disturbance times]. Other reconstructed state factors remain unchanged, only the rainfall P is affected. t’ Apply a random, small increment within the interval [0, 0.1] using a random uniform function. , so that the rainfall is P t’ + This yields a new time series of reconstructed state factors affected by rainfall disturbance. ; Reconstructing the time series of state factors The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ; Reconstructing the time series of state factors affected by rainfall disturbance The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ; For each disturbed moment Establish a monotonic relationship constraint between rainfall and flow: This means that when rainfall disturbance increases, the expected simulated flow rate will increase accordingly. Therefore, if the monotonic relationship constraint of rainfall-flow is satisfied, no penalty is applied; if it is not satisfied, a penalty is applied, which is transformed into a penalty term in the loss function, thereby enhancing physical consistency. This leads to the establishment of the rainfall loss function term. : (12) Where: ReLU is the response function; ② Potential evapotranspiration loss function term: With rainfall loss function term The difference lies in the fact that when the potential evapotranspiration disturbance increases, the expected corresponding simulated flow rate decreases. Therefore, the monotonic relationship constraint between potential evapotranspiration and flow rate is: Its potential evapotranspiration loss function term for: (13) Where: N e It represents the number of times the evaporation was disturbed. It is a slight increase in evaporation; Disturbance time Potential evaporation; The simulated flow rate output after the evapotranspiration is disturbed and increased; The simulated flow rate is the output without evapotranspiration. ③ Therefore, the loss function of the GRU sequential gating network is established. : (14) in: The main loss function term represents the flow loss, and its expression is: (15) Represents the time series of reconstructed state factors Length; This means: to reconstruct the time series of state factors. The input is fed into the GRU timing gating network, which is based on the GRU timing gating network. The learned expert models The dynamic weights for each expert model The output simulated traffic is weighted and fused to obtain the simulated traffic at each time point. ; These are the weights of each loss function term.

9. The expert stacked integrated flood forecasting method based on deviation correction and physical guidance according to claim 1, characterized in that, Also includes: Step S8: Construct an interpretability analysis framework based on SHAP; Based on the NPCEM optimal principle of the comprehensive evaluation index on the test set, the SHAP interpretable framework is introduced to interpret the state space of each base learner and expert model under various hydrological scenarios. This quantifies the contribution and interaction of each input feature to the prediction results of the base learner and expert model, reveals the driving mechanism of key hydrological factors on flow prediction, and enhances the transparency of model decision-making. The specific explanation is as follows: sum the contributions of all input features of the model. Approximate the model output value f(x) and the baseline value The difference between them: (16) Where: for the base learner, the explained target feature x is For expert models The target feature x explained is the sum of all base learners in the same hydrological scenario. The third analog flow rate output below ; Each This indicates that when the model input is x, feature r causes the model output to deviate from the baseline value. The contribution, where n is the total number of features and the baseline value. This represents the average output value of the model on the training set.

10. An expert stacked integrated flood forecasting system based on deviation correction and physical guidance, characterized in that, This method is used to implement the expert stacked integrated flood forecasting method based on deviation correction and physical guidance as described in any one of claims 1-9.