Dual-drive reservoir long-term delivery probability prediction method
Through the dual-drive reservoir long-term outflow probability prediction method, combined with causal consistency probability inflow prediction and mechanism constraint outflow prediction, the problem of probability inconsistency and physical mechanism violation in the long-term outflow prediction of reservoir long-term outflow prediction is solved, and high-precision and reliable reservoir scheduling decisions are achieved.
Patent Information
- Application Number
- CN202510909221.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-02
AI Technical Summary
The existing reservoir long-term probability prediction method has problems such as inconsistent probability prediction results and the scheduling scheme violates physical mechanisms, making it difficult to achieve accurate modeling in the meteorological-hydrology-engineering multi-process coupling.
The long-term probability prediction method of dual-drive reservoirs is adopted to construct a causal consistency probability inflow prediction model and a mechanism-constrained outflow prediction model, combined with historical hydrological meteorological observation data and atmospheric circulation index, a multi-dimensional probability inflow information set is generated, and the model training is optimized through mechanism-constrained composite loss function to ensure the physical reliability and consistency of the prediction results.
Generate a reservoir outbound prediction plan with both probability self-consistentness and physical reliability, which improves the prediction accuracy and credibility of scheduling decisions, and ensures that the model output complies with water balance and engineering scheduling procedures.
Smart Images

Figure CN120410281A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a prediction method, in particular to a method for predicting the long-term probability of reservoir discharge. Background Art
[0002] The operation decision-making of a reservoir is essentially a sequential decision-making process based on the prediction of future inflow. Among them, the long-term (e.g., several months to one year in the future) probability prediction of reservoir discharge is the core link in determining the trade-off between the benefits and risks of the reservoir for water conservation and flood control. Against the background of intensified global climate change and profound human activities, the nonlinearity and uncertainty of the basin hydrometeorological process have been significantly enhanced, resulting in increasingly severe randomness and volatility of the reservoir inflow sequence. Therefore, how to abandon the traditional empirical operation mode, develop advanced prediction methods that can accurately depict the uncertainty of future inflow and make reliable operation decisions, and promote the transformation of reservoir management to a refined, intelligent, and risk-informed mode, is a major issue that urgently needs to be broken through in the current field of water resources engineering.
[0003] At present, a series of progress has been made in the research on long-term runoff prediction and operation decision-making of reservoirs, forming three major technical paths mainly including rainfall-runoff physical models, traditional time series statistical models, and data-driven machine learning models. Distributed hydrological models based on physical processes, such as SWAT, VIC, etc., can simulate the complete evolution chain from rainfall to runoff by finely depicting the characteristics of the basin underlying surface and the physical processes of the water cycle, and have good mechanism interpretability. Traditional time series statistical models, such as the autoregressive moving average model (ARIMA) and its variants, construct prediction models by analyzing statistical characteristics such as the autocorrelation and trend of historical runoff sequences. In recent years, with the development of artificial intelligence technology, machine learning models represented by artificial neural networks (ANN), support vector machines (SVM), and long short-term memory networks (LSTM) have also been widely used in the field of hydrological prediction due to their powerful nonlinear mapping capabilities. These models can learn complex response relationships from high-dimensional historical hydrometeorological data. In addition, to cope with the uncertainty of prediction, researchers have also begun to pay attention to probability prediction. Commonly used methods include Bayesian model averaging, ensemble forecasting systems, and quantile regression and other techniques, aiming to provide a probability distribution or confidence interval containing multiple possibilities for future runoff, rather than a single deterministic prediction value. At the same time, using large-scale climate factors (such as El Niño-Southern Oscillation ENSO, North Atlantic Oscillation NAO, etc.) as prediction factors and exploring their teleconnection effects on regional runoff have also become an important direction to improve prediction accuracy.
[0004] For the above-mentioned runoff prediction problem of meteorological-hydrological-engineering multi-process coupling, it is difficult for a single-driven model to achieve accurate modeling of the entire chain due to its inherent limitations. Although data-driven models can effectively mine the non-linear statistical laws between meteorological-hydrological factors and runoff, the black-box characteristics of such models make it difficult to describe the mechanism of the engineering regulation process. Although single-mechanism-driven models can explicitly describe the engineering regulation process through water balance equations and scheduling rules, etc., due to the incomplete understanding and representation of such models for the dynamically changing hydrological process, they cannot cover the complex response relationship between meteorological-hydrological processes and are difficult to capture the cross-scale non-linear correlation between atmospheric circulation factors and runoff. Summary of the Invention
[0005] Object of the Invention. To solve the problems that the probability prediction results of existing methods have quantile crossing and the final scheduling scheme violates the physical mechanism, Technical Solution. A dual-driven long-term reservoir outflow probability prediction method includes: Based on the basic data formed by historical hydrometeorological observation data, atmospheric circulation index data, and historical reservoir operation data, construct an initial factor set for inflow prediction with different time lag effects; Use a causal consistency probability inflow prediction model to process the initial factor set for inflow prediction and generate a multi-dimensional probability inflow information set; Fuse the multi-dimensional probability inflow information set and the scheduling factors extracted from the basic data to construct a multi-scenario outflow prediction factor set; Through a mechanism-constrained outflow prediction model to process the multi-scenario outflow prediction factor set and generate the final long-term reservoir outflow probability prediction scheme.
[0006] Preferably, the step of using a causal consistency probability inflow prediction model to process the initial factor set for inflow prediction and generate a multi-dimensional probability inflow information set includes: Use a causal consistency probability inflow prediction model for prediction to obtain a physically causally consistent probability inflow prediction sequence without quantile crossing; During the prediction process, extract the hydrological process context encoding vector from the internal hidden layer state of the model; Extract the prediction distribution form parameter vector representing the runoff probability distribution form from the output of a specific module of the model; Integrate the probability inflow prediction sequence, the hydrological process context encoding vector, and the prediction distribution form parameter vector into a multi-dimensional probability inflow information set.
[0007] Preferably, the network architecture of the causal consistency probability inflow prediction model includes: An upstream feature extraction backbone network, which receives the initial factor set for inflow prediction as input, performs spatio-temporal feature extraction, outputs high-dimensional time series feature encoding, and the hydrological process context encoding vector is extracted from the high-dimensional time series feature encoding; A parallel morphological controller module screens physical driving factors from the initial inflow prediction factor set as inputs, and outputs a predicted distribution morphological parameter vector after learning; A double-anchor symmetric chain output layer receives high-dimensional time-series feature encodings, and uses the predicted distribution morphological parameter vector as a conditional input to generate a physically causally consistent probability inflow prediction sequence.
[0008] Preferably, the steps for the double-anchor symmetric chain output layer to generate a physically causally consistent probability inflow prediction sequence include: Based on the high-dimensional time-series feature encoding and the predicted distribution morphological parameter vector, two anchors of the probability distribution are predicted in parallel: the lowest quantile anchor and the highest quantile anchor; A set of normalized monotonic internal position parameter sequences is predicted; By performing a convex combination operation on the lowest quantile anchor, the highest quantile anchor, and the monotonic internal position parameter sequences, all intermediate quantiles are reconstructed and generated to form the final physically causally consistent probability inflow prediction sequence.
[0009] Preferably, the steps for the morphological controller module to output a predicted distribution morphological parameter vector include: From the initial inflow prediction factor set, factors that have a physical driving effect on the runoff distribution morphology are screened out to form a physical driving factor subset; The physical driving factor subset is fed into a lightweight feed-forward neural network for learning; The predicted distribution morphological parameter vector is output through the lightweight feed-forward neural network, which contains the scale and skewness information of the predicted distribution and is used to quantitatively describe the key morphology of the runoff probability distribution at the prediction moment.
[0010] Preferably, the causal consistency probability inflow prediction model is trained using a gradient heterogeneous modulation paradigm based on internal attention deconstruction. The training steps include: An auxiliary supervision branch is introduced after the upstream feature extraction backbone network to generate auxiliary prediction outputs; Perform model forward propagation, and calculate the final Pinball loss of the main task based on the physically causally consistent probability inflow prediction sequence; Calculate the auxiliary loss of the auxiliary task based on the auxiliary prediction output.
[0011] Preferably, the training steps further include generating a heterogeneous gradient modulation matrix. The steps include: During the model forward propagation process, the internal attention weight tensor is parsed and extracted from its internal attention mechanism; According to the final Pinball loss of the main task, calculate the scalar-form basic modulation intensity through a dynamic gating function; Broadcast and element-wise multiply the base modulation intensity with the internal attention weight tensor to generate a heterogeneous gradient modulation matrix.
[0012] Preferably, the training step further includes performing modulated backpropagation, which includes: During the gradient backpropagation process, element-wise multiply the gradient flow backpropagated from the auxiliary loss to the upstream feature extraction backbone network with the heterogeneous gradient modulation matrix; Apply the modulated gradient flow obtained after multiplication to update the weights of the upstream feature extraction backbone network, thereby achieving non-uniform intelligent training of the front-end feature extraction module.
[0013] Preferably, the step of applying the mechanism-constrained outflow prediction model to process the multi-scenario outflow prediction factor set and generate the final long-term reservoir outflow probability prediction scheme includes: Construct a mechanism-constrained outflow prediction model based on the gradient boosting decision tree; Use the mechanism-constrained composite loss function as the optimization objective to train the model, where this composite loss function forcibly couples the physical mechanisms of water balance and outflow boundary; Use the trained model to generate corresponding outflow prediction values for each scenario in the multi-scenario outflow prediction factor set, form a multi-scenario outflow prediction sequence, and integrate it into the long-term reservoir outflow probability prediction scheme.
[0014] Preferably, the mechanism-constrained composite loss function combines at least the following three parts by weighted summation: The root mean square error term as the basic prediction accuracy term, which is used to measure the deviation between the predicted outflow value and the true value; The water balance penalty term constructed based on the water balance equation, which is used to penalize the prediction results that violate the law of water conservation; The outflow boundary penalty term constructed according to the reservoir operation rules, which is used to penalize the prediction results that exceed the upper limit of the discharge capacity or are lower than the lower limit of the ecological flow.
[0015] Preferably, the water balance penalty term is obtained by calculating the square of the difference between the net flow formed by the scenario inflow and the predicted outflow in a unit time step and the change in storage volume during this period; The outflow boundary penalty term is obtained by a unidirectional penalty function, which only generates a penalty according to the amount of its excess or deficiency when the value of the predicted outflow crosses the preset upper limit of the outflow or is lower than the lower limit of the outflow.
[0016] Preferably, the step of using the mechanism-constrained composite loss function as the optimization objective to train the model specifically includes: For the mechanism-constrained composite loss function, the calculation formulas of its partial derivative (gradient) with respect to the model prediction value and the second-order partial derivative (Hessian) are derived; Write the calculation formulas of gradient and Hessian into executable custom objective functions that meet the requirements of the gradient boosting decision tree framework API; During training, an executable custom objective function is provided to the model training interface, so that in each iterative construction of the model, its node splitting decision and the determination of leaf node values are directly guided by the physical mechanism penalty term in the composite loss function.
[0017] The beneficial effect is that it can solve the technical problems existing in the existing technology and generate a reservoir discharge prediction scheme with both probabilistic self-consistency and physical reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of the present invention.
[0019] Figure 2 This is a flow chart of the present invention for generating a multi-dimensional probability inflow information set.
[0020] Figure 3 This is a flow chart of the double-anchor symmetric chain output layer generating a physically causally consistent probabilistic inflow prediction sequence.
[0021] Figure 4 It is a flow chart of the output of the predicted distribution morphological parameter vector by the morphological controller module of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the specific embodiments herein are only used to explain the present invention and are not intended to limit the present invention in any form.
[0023] First, the following embodiment is provided. According to one aspect of the present application, a method for predicting the long-term discharge probability of a dual-driven reservoir is provided, comprising the following steps: According to one aspect of the present application, step S1 further comprises: Step S11. Generation of the initial factor set for reservoir inflow prediction: There are numerous factors affecting runoff, and the influences of different factors have differences in multi-order time lags. Meteorological factors (such as atmospheric circulation, temperature, air pressure, etc.) usually have long-time lag effects, while hydrological factors (such as previous runoff, rainfall, evapotranspiration, soil moisture, etc.) show short-time lag responses. According to the meteorological conditions and runoff generation and concentration characteristics of the study area, determine the main weather elements that control rainfall-runoff in the study area, and select hydrological and meteorological elements that have direct or indirect impacts on the current period as forecasting factors, including previous rainfall, evapotranspiration, temperature, soil moisture, atmospheric circulation index, and reservoir inflow, and consider the time lag effects in the previous period to jointly form the initial factor set for runoff prediction X = {x t , x t-1 , x t-2 , …, x t-τ}; Step S12. Preliminary screening of the driving factor set based on the DS evidence theory: The reliability of predictor screening depends on the collaborative evaluation of multi-source statistical indicators. Traditional methods based on a single indicator usually have difficulty in comprehensively capturing the complex linear, non-linear, and conditional dependence relationships between runoff and meteorological factors. The Pearson correlation coefficient and the Spearman rank correlation coefficient can respectively capture linear and monotonic non-linear relationships, while partial mutual information can be used to identify local conditional dependence. Therefore, the DS evidence theory can be used to fuse the correlation calculation results of three complementary indicators, namely the Pearson correlation coefficient, the Spearman rank correlation coefficient, and partial mutual information, to obtain the final association degree ranking, and select several factors with higher rankings as the preliminary driving factor set X’ = {x’ t , x’ t-1 , x’ t-2 , …, x’ t-τ}, and the factors selected in this step ensure the physical rationality and statistical correlation between them and the target prediction factors; Step S13: Screening of the key driving factor set based on SHAP interpretability technology: The rough screening method based on DS evidence theory screens out the preliminary driving factor set through multi-evidence fusion. However, its essence is still driven by static statistical indicators, without considering the non-linear interaction effects and dynamic contribution differences among factors after model training. To overcome this limitation, SHAP interpretability technology is adopted to quantify the marginal contribution of each factor to the model prediction, so as to achieve fine screening and optimization based on mechanism interpretability. Compared with traditional feature selection methods, SHAP can not only identify the global feature importance, but also reveal the influence direction and degree of factors on the prediction results in different scenarios, which helps to improve the stability and generalization ability of the model. The gradient interpreter is selected as the interpretation method. Based on the gradient calculation of the loss function of the neural network, the specific contribution degree of each factor in the preliminary driving factor set to the reservoir inflow prediction result output by the QRCNN-BiLSTM model is measured, sorted according to the contribution degree, and several factors ranked at the top are selected as the final key driving factor set X”={x” t , x” t-1 , x” t-2 ,…, x” t-τ}.
[0024] In this embodiment, a factor screening strategy combining rough screening and fine screening is adopted. First, rough screening is carried out through multi-evidence fusion based on DS evidence theory to screen out the preliminary driving factor set, so as to ensure the physical rationality and statistical relevance among factors. Then, SHAP interpretability technology is used for fine screening to further optimize the factor selection, quantify the marginal contribution of each factor to the model prediction result, and reveal its influence direction and degree in the specific model. This factor screening method of rough screening + fine screening can comprehensively capture the complex non-linear relationships and dynamic contribution differences among factors, and effectively improve the stability, generalization ability and accuracy of the prediction model.
[0025] According to one aspect of the present application, step S2 is further as follows: Step S21: Couple a multi-scale convolutional neural network and a bidirectional long short-term memory network to construct a multi-model nested structure, and introduce quantile regression on this structure to construct a QR-MC-CNN-BiLSTM model as the inflow prediction equation; Step S22: Divide the data set into two parts, a training set and a test set. The samples in the training set are used for hyperparameter optimization and model training. The tornado optimization algorithm is used to adaptively optimize the model hyperparameters and perform K-fold cross-validation to obtain the optimal hyperparameter combination. The above combination is used to train the QR-MC-CNN-BiLSTM model on the training set to obtain model parameters such as weights and biases; Step S23: Use the test set samples for prediction to generate reservoir inflow prediction results at different quantiles. Take the reservoir inflow prediction process at the low quantile as the lower bound of the interval and the reservoir inflow prediction process at the high quantile as the upper bound of the interval to generate an inflow probability prediction scheme including a probability interval. Obtain the inflow single-value prediction result by calculating the expected value of the inflow prediction results at different quantiles: E( I t )=∑ a j=1 I ρ(j) t •P(j); In the formula: I t is the vector of inflow prediction results corresponding to different quantiles at time t; a is the number of discrete quantile points; j is the quantile serial number, and the corresponding quantiles are arranged from low to high; ρ(j) is the cumulative probability corresponding to the jth quantile α j , ρ(j)=α j ; I ρ(j) t is the inflow prediction result at the jth quantile; P(j) is the relative probability within the adjacent quantile interval, that is, the probability density; E[•] represents the expected value operation, which is realized by weighted summation of the quantile probability density.
[0026] According to one aspect of the present application, step S3 is further as follows: Step S31: Use the inflow prediction results generated at different quantiles of the reservoir inflow prediction model as multi-scenario inputs, and set a discrete quantile point set α={α1,α2,…,α k}, and each quantile scenario corresponds to a complete inflow prediction sequence {I α t} T t=1 , where T represents the length of the time series; In this embodiment, to overcome the problem that traditional outflow prediction depends on a single inflow scenario and lacks the description of uncertainty, multi-quantile inflow prediction is introduced to construct multi-scenario inputs, which improves the adaptability and robustness of the prediction model to different hydrological situations Step S32: To enable the LightGBM model to identify the quantile corresponding to the current prediction scenario, construct a corresponding One-hot encoding vector e α ∈R k, where the i-th bit is 1 and the rest are 0. Embed the encoding vector into the input features at each time step t to form an input variable containing the semantic quantile index, so as to guide the flow prediction model to distinguish the scheduling response differences under different quantiles and improve the model's classification learning ability for regulation response rules. At each time step t, replicate the same encoding for all α scenarios to ensure consistency with the sequence length; In this embodiment, to overcome the problem that LightGBM cannot identify different quantile scenarios, the quantile One-hot encoding embedding method is adopted to guide the model to explicitly identify the current confidence scenario, enhance its classification recognition and differential modeling capabilities, and improve the prediction accuracy in boundary situations.
[0027] Step S33. During the prediction process of the QR-MC-CNN-BiLSTM model at each quantile, for each time step t, extract the hidden layer output vector h α t ∈R 2d , as the semantic encoding representation of historical meteorological and hydrological dynamics. This vector is obtained in a sliding window input manner and only depends on the time step t and its historical window sequence to avoid future information leakage. The hidden state, as a compressed expression of the temporal context, is embedded as an important input feature of the outflow prediction model to improve the prediction performance and context adaptation ability in multi-quantile scenarios; In this embodiment, to solve the problem of missing context information in the inflow prediction results, extract the BiLSTM hidden layer output as the historical window semantic vector and use it as the background input of the scheduling behavior, enabling the scheduling prediction to have the capabilities of long-term lag characteristics, factor interaction relationships, and seasonal pattern perception, effectively improving the expression ability and context adaptability of the outflow prediction in multi-scenarios.
[0028] Step S34. Integrate the predicted inflow, One-hot encoding vector, and BiLSTM hidden layer output obtained in Steps S31 to S33 under different quantile scenarios to construct an inflow factor scenario set; Step S35. According to the actual operation scheduling rules of the reservoir and the engineering control mechanism, extract the factors that have an important impact on the reservoir outflow from the historical scheduling data to construct a stable key reservoir regulation factor set. This factor set remains consistent under all quantile scenarios and includes the initial reservoir storage volume V t-1 , the final reservoir storage volume V t and the reservoir autocorrelated lag outflow {O t-1 , O t-2 , …, O t-τ}; In this embodiment, the system introduces the reservoir regulation characteristics as the structural input, effectively enhancing the model's ability to identify the engineering regulation response and improving the scheduling consistency and physical interpretability.
[0029] Step S36: Combine the several groups of inflow scenarios formed in Steps S31 to S34 with the key reservoir regulation factors extracted in Step S35 respectively to construct a multi-scenario factor set for reservoir outflow prediction. The scenario set contains outflow prediction input scenarios equal in number to the number of inflow prediction scenarios. Each group of scenarios is jointly composed of the inflow-related factors at a specific quantile and a set of fixed key reservoir regulation factors: z α t ={I α t ,O t-1 ,O t-2 ,…,O t-τ, V t-1 ,V t ,e α ,h α t}; The structure of the finally formed multi-scenario factor set for outflow prediction is z ∈ R T˙k˙n , where k is the number of quantile scenarios and n is the feature dimension of each sample after splicing.
[0030] According to one aspect of the present application, Step S4 is further as follows: Step S41: Build an outflow prediction model based on the LightGBM model, considering the physical mechanism of reservoir operation as its penalty term, including water balance constraints, reservoir outflow boundary constraints, and non-negativity constraints, to guide the model to conform to the prior knowledge of reservoir operation and build a LightGBM model based on mechanism-driven simulation of engineering regulation; Step S42: Use the multi-scenario factor set for reservoir outflow prediction constructed in Step S3 as the independent variable factor of the LightGBM model, and the measured reservoir outflow as the dependent variable factor. Divide the above data samples into a training set and a test set. Input the independent variable factor and the dependent variable factor during the training period into the LightGBM model based on mechanism-driven simulation of engineering regulation for training to obtain the mapping relationship between the independent variable factor and the dependent variable factor. Input the outflow prediction factor sets under different scenarios during the test period into the trained model respectively to calculate multiple groups of outflow prediction scenarios; Step S43: The multiple groups of outflow prediction scenarios obtained in Step S42 constitute the conditional distribution samples of the outflow. Based on the kernel density estimation method, perform probability modeling on the outflow results, fit its probability density function, obtain the reservoir outflow probability prediction scheme, and use the expected value under multiple groups of outflow prediction scenarios as the point prediction value to obtain the single-value prediction result of the reservoir outflow: E( O t ) = ∑ a j=1 O ρ(j) t • P(j); In the formula: O t is the vector of outflow prediction results corresponding to different quantiles in the t period; O ρ(j) t is the outflow prediction result at the j-th quantile.
[0031] In this embodiment, the water balance and boundary constraints are embedded in the LightGBM loss function to achieve explicit modeling of the engineering regulation mechanism, effectively improving the physical consistency and boundary rationality of the outflow prediction, and enhancing the usability and credibility of the model in actual scheduling scenarios. At the same time, the probability prediction scheme of the outflow is further improved by the kernel density estimation method, providing multi-level prediction results for decision-making.
[0032] When in use, it is found that there are still the following problems: First, the hydrological system is a typical non-steady state system, and its driving mechanism will change structurally with the sudden change of climate modes (such as the occurrence of El Niño / La Nina events, the transition from warm and dry to cold and wet). Factors that are highly correlated with runoff in the normal mode (such as previous rainfall) may have a sharp decline in their correlation in the extreme drought mode, while the importance of another factor (such as deep soil moisture, upper air circulation index) may jump to the first. Existing factor screening methods cannot capture the dynamic non-stationarity of this correlation structure. What they give is only the average optimal solution in all modes, which will inevitably lead to sub-optimization or even error of the model input information at the moment of mode mutation and during the maintenance of the new mode.
[0033] Second, quantile regression independently models different quantiles through the Pinball loss function, resulting in the model being unable to ensure the physical and causal consistency of the prediction results. For example, for the inflow prediction at the same moment, there may be a quantile crossing / folding phenomenon where the 10% quantile prediction value > the 90% quantile prediction value. More deeply, different quantiles are physically related. Extreme rainfall events that cause high quantiles (large floods) will inevitably also raise the low quantiles (flow lower limits) at that moment. They share the same physical drive, only with different response amplitudes. Existing models break the physical causal relationship and treat each quantile as an independent prediction task, resulting in a probability distribution that may be fragmented and contrary to common sense. Therefore, the following embodiments are further provided.
[0034] Such as Figures 1 to 4As shown below, another set of embodiments of the present application is described as follows: Embodiment 1. This embodiment provides a complete process of a method for predicting the long-term probability of reservoir outflow coupling multiple processes of meteorology, hydrology, and engineering. The following steps: Step S100: Based on the basic data formed by historical hydrometeorological observation data, atmospheric circulation index data, and historical reservoir operation data, construct an initial factor set for inflow prediction with different time-delay effects.
[0035] In this embodiment, this step is the data preparation stage. First, perform data preprocessing on various collected original time series data, including cleaning outliers, interpolating missing values (e.g., using linear interpolation or spline interpolation), and normalizing (e.g., using Z-score standardization or Min-Max normalization) to eliminate the influence of data with different dimensions and obtain the cleaned data. Subsequently, based on hydrological physical mechanisms and statistical correlation analysis (such as Pearson correlation coefficient, mutual information method), construct lag terms of each variable in the cleaned data at different time scales, and perform preliminary screening in combination with domain knowledge to finally form a high-dimensional initial factor set for inflow prediction that contains rich prediction information. This factor set is the data basis for all subsequent model training and prediction.
[0036] Step S200: Apply the causal consistency probability inflow prediction model to process the initial factor set for inflow prediction and generate a multi-dimensional probability inflow information set.
[0037] In this embodiment, this step is used to generate a rich and internally consistent probabilistic inflow prediction. Different from traditional methods, the multi-dimensional probability inflow information set generated in this step not only contains the probability prediction itself but also contains in-depth characterization information about the prediction process and result form, providing a more multi-dimensional judgment basis for downstream outflow decision-making than a single predicted value. The generation of this multi-dimensional information set lays a solid data foundation for realizing subsequent refined and highly reliable outflow decision-making.
[0038] Step S300: Integrate the multi-dimensional probability inflow information set and the scheduling factors extracted from the basic data to construct a multi-scenario outflow prediction factor set.
[0039] In this embodiment, this step integrates the complex probability information about future inflows generated in the upstream (step S200) with the scheduling factors (such as initial water storage, historical same-period outflow, downstream water demand, etc.) that characterize the current project status and historical operation experience. Specifically, for each inflow scenario represented by each quantile in the multi-dimensional probability inflow information set, it is horizontally concatenated with the scheduling factors, thereby constructing a dedicated, high-dimensional feature vector for each scenario. The feature vectors of all scenarios together form a multi-scenario outflow prediction factor set, which is used to describe the scheduling decision-making background faced by the reservoir under different future inflow possibilities.
[0040] Step S400: Apply the mechanism-constrained outflow prediction model to process the multi-scenario outflow prediction factor set and generate the final long-term reservoir outflow probability prediction plan.
[0041] In this embodiment, this step is used to generate the final outflow plan that not only conforms to the data law but also strictly adheres to the physical laws. It receives the multi-scenario outflow prediction factor set constructed in the previous step as input and processes it through a model whose internal learning mechanism is deeply transformed by physical rules. This model can generate an outflow decision recommendation that satisfies the water balance and boundary constraints for each input scheduling scenario. Finally, the outflow decision recommendations under all scenarios are integrated (for example, by kernel density estimation to fit its probability distribution and calculate the expected value) to form a complete long-term reservoir outflow probability prediction plan that includes a multi-scenario prediction set, a probability density function, and a single-value expected prediction.
[0042] This embodiment solves the two major pain points in the prior art, namely inconsistent probability prediction and decision results that do not conform to physical mechanisms, through two core driving links.
[0043] Embodiment 2: This embodiment details the construction, training (AD-HGM paradigm), and application process of the causal consistency probability inflow prediction model (PDP model).
[0044] The network architecture of the causal consistency probability inflow prediction model includes: The upstream feature extraction backbone network is used to receive the initial factor set of inflow prediction as input, perform spatio-temporal feature extraction, and output a high-dimensional time-series feature encoding. Among them, the high-dimensional time-series feature encoding is a compressed and information-dense vector sequence extracted by the module from the original factor set, which can characterize the complex non-linear relationship of the hydrological process in the time and space dimensions.
[0045] In this embodiment, the backbone network adopts a heterogeneous nested structure of a multi-scale convolutional neural network (MC-CNN) and a bidirectional long short-term memory network (BiLSTM). The MC-CNN part sets three parallel 1D convolutional branches, and the kernel sizes of the convolutional layers can be set to 3, 6, and 12 respectively to capture local hydrological patterns at different time scales such as monthly, quarterly, and semi-annual. After the outputs of each branch pass through max pooling, they are concatenated in the feature dimension. The concatenated features are fed into a two-layer BiLSTM network, and the number of hidden units in each BiLSTM layer can be set to 128. The BiLSTM network is used to analyze the long-range temporal dependencies in the hydrological sequence. Finally, the hidden state sequence of the last layer of the BiLSTM is the high-dimensional temporal feature encoding.
[0046] Adopting the combination of MC-CNN and BiLSTM can make full use of the advantages of CNN in capturing local and multi-scale patterns and the ability of LSTM in dealing with long sequence dependency problems, so as to achieve a more comprehensive and in-depth feature representation of the hydrological process.
[0047] In some embodiments, the backbone network can also adopt other structures with temporal feature extraction capabilities. For example, a Transformer encoder based on the self-attention mechanism can be used, or a gated recurrent unit (GRU) can be used to replace the BiLSTM.
[0048] The parallel morphological controller module is used to screen physical driving factors from the initial inflow prediction factor set as inputs, and outputs the predicted distribution morphological parameter vector Θ after learning. The predicted distribution morphological parameter vector Θ is a low-dimensional vector, and each of its elements directly corresponds to a key morphological parameter of the runoff probability distribution at the prediction time, such as position, scale (representing fatness or thinness), skewness (representing symmetry), etc.
[0049] In some processes, first, strong physical signal factors that have a decisive impact on the runoff distribution morphology, such as the ENSO index, regional cumulative rainfall, extreme temperature index, etc., are screened from the initial inflow prediction factor set according to domain prior knowledge to form a subset of physical driving factors. Then, this subset is input into an independent two-layer fully connected neural network (i.e., a feedforward network). The dimension of the hidden layer of this network can be set to 16, and the number of neurons in the output layer is the same as the number of required morphological parameters (for example, if a split normal distribution is used to describe, three parameters of position, scale, and skewness are required). To ensure the physical meaning of the parameters, specific activation functions can be used in the output layer. For example, the Soft plus function is used to ensure that the scale parameter is positive, and the Tanh function is used to ensure that the skewness parameter is within [-1, 1].
[0050] By establishing a direct mapping path from large-scale physical causes to specific predicted distribution patterns, the prediction of the model is no longer a pure black-box fitting, but is guided and constrained by physical laws, and the generated probability distribution is more in line with the actual physical characteristics of the hydrological process.
[0051] The dual-anchor symmetric chain (DASC) output layer is used to receive high-dimensional time-series feature encodings and takes the predicted distribution pattern parameter vector Θ as the conditional input, and finally generates a physically causally consistent probability inflow prediction sequence.
[0052] This output layer eradicates quantile crossing through the following steps: a. Concatenate the high-dimensional time-series feature encoding with the predicted distribution pattern parameter vector Θ to form an enhanced conditional feature vector.
[0053] b. Based on this enhanced feature vector, through two independent linear output neurons, predict two anchors of the probability distribution: the lowest quantile anchor q min and the highest quantile anchor q max .
[0054] c. At the same time, through another set of independent output neurons (the number of which is equal to the number of required intermediate quantiles), predict a set of initial internal position offsets. These offsets pass through an activation function to ensure non-negativity, and then through a cumulative summation operation, finally generate a monotonically increasing internal position parameter sequence {β i} that strictly satisfies 0 ≤ β1 ≤ β2 ≤ … ≤ 1.
[0055] d. Finally, through the convex combination formula q i = (1 - β i )q min + β i q max , use the anchors and position parameters obtained in steps b and c to calculate the values of all intermediate quantiles, and form a non-crossing physically causally consistent probability inflow prediction sequence.
[0056] Through the DASC layer, instead of directly predicting each quantile, it predicts the upper and lower bounds of the entire distribution and the internal relative positions. Due to the mathematical properties of convex combination, as long as the sequence {β i} is monotonic, the output sequence {q i} is also necessarily monotonic. This structure eliminates the possibility of quantile crossing and ensures the theoretical consistency and usability of the probability prediction results.
[0057] Through the collaborative work of the above three modules, the PDP model can receive the initial factor set of inflow prediction and finally generate a multi-dimensional probability inflow information set containing three parts of information: A physically causally consistent probability inflow prediction sequence from the DASC output layer.
[0058] The hydrological process context encoding vector is extracted from the hidden state of the backbone network BiLSTM module, that is, the high-dimensional time series feature encoding.
[0059] The predicted distribution shape parameter vector Θ from the shape controller module.
[0060] To address the possible gradient learning efficiency mismatch problem in the heterogeneous network (CNN and LSTM) of the PDP model, the AD-HGM paradigm is adopted for training.
[0061] Construct a dual task and calculate the loss, including the following steps: In the upstream feature extraction backbone network of the PDP model, specifically, after the MC-CNN module and before the BiLSTM module, an auxiliary supervision branch is introduced. This branch is usually a fully connected layer with the same output dimension as the prediction target, used to generate auxiliary prediction outputs. In each forward propagation, a batch of inflow prediction initial factor sets are input into the model, and the following are calculated respectively: The final Pinball loss L final : Calculated based on the final output of the main task (i.e., the physically causally consistent probability inflow prediction sequence output by the DASC layer) and the true value. The Pinball loss is the standard loss function of quantile regression.
[0062] The auxiliary loss L aux : Calculated based on the auxiliary prediction output of the auxiliary supervision branch and the true value, usually using the mean square error (MSE) loss.
[0063] Generate a heterogeneous gradient modulation matrix, including the following steps: a. During the forward propagation process, from within the BiLSTM module of the backbone network, parse and extract the internal attention weight tensor At for different features at each time step.
[0064] b. According to the current value of the final Pinball loss L final of the main task, through a dynamic gating function, such as Gt = Softplus(w • (L final - L threshold ) + b), calculate the basic modulation intensity Gt in scalar form. Where w, b, L threshold are hyperparameters. The role of this gating function is to generate a larger modulation intensity when the main task loss is large to strengthen the training of the front-end network. Larger, smaller, etc. all mean greater than or less than a preset threshold.
[0065] c. Broadcast the scalar base modulation intensity Gt and the internal attention weight tensor At and multiply them element-wise to obtain the final heterogeneous gradient modulation matrix Mt = GtAt, the Hadamard product of the two matrices.
[0066] Each element of the Mt matrix integrates the dual information of the global learning state (represented by Gt) and the local feature preference (represented by At). Therefore, it is no longer a unified and equal gradient scaling factor, but a highly differentiated and refined gradient router.
[0067] Perform the modulated backpropagation, including: During the gradient backpropagation, intervene in the gradient flow through the gradient hook function of the deep learning framework (such as register_backward_hook in PyTorch).
[0068] Specifically, for the gradient flow backpropagated from the auxiliary loss L aux to the MC-CNN module, it must be multiplied element-wise by the heterogeneous gradient modulation matrix Mt before applying this gradient to update the weights of the MC-CNN. The gradient flow of the final Pinball loss L final of the main task propagates normally without being affected.
[0069] The above operations enable the intelligent allocation of the gradients of the auxiliary supervision. For those important features concerned by the main task (i.e., the parts with larger weights in At), the auxiliary gradients will be strengthened; otherwise, they will be weakened. At the same time, when the main task has been well learned (i.e., Gt is smaller), the overall influence of the auxiliary gradients will also be weakened, avoiding unnecessary interference to the converged main task. Experimental data show that when training with the AD-HGM paradigm, compared with the traditional auxiliary learning method, the model convergence speed is increased by about 15%, and the final prediction accuracy (measured by CRPS) is increased by about 5 - 10%.
[0070] Through the above training process, the PDP model that can efficiently generate multi-dimensional inflow information is finally obtained.
[0071] Example 3: Describe in detail the construction and application process of the mechanism-constrained outflow prediction model. Specifically, it includes the following steps: Design the mechanism-constrained composite loss function. Specifically, to embed physical rules in the model, construct a mechanism-constrained composite loss function L = w1•L RMSE + w2•L balance + w3•L boundary . The weights w1, w2, w3 are hyperparameters and can be determined by methods such as cross-validation. For example, they can be set as w1 = 1.0, w2 = 0.8, w3 = 1.2.
[0072] Basic prediction accuracy term L RMSE , using the standard root mean square error to ensure the basic fitting ability of the model.
[0073] Water balance penalty term L balance , used to measure the degree to which the model prediction results violate the physical laws of water balance.
[0074] Based on the water balance equation (inflow - outflow) × Δt = change in storage, construct a penalty term in the form of mean square error: L balance = ((I sce - O pred ) • Δt - (V end - V start )) 2 . Among them, I sce is the scenario inflow, O pred is the outflow predicted by the model, Δt is the time step, and V start and V end are the storage volumes at the beginning and end of the period respectively. These variables can all be obtained from the multi-scenario outflow prediction factor set.
[0075] Outflow boundary penalty term L boundary , used to measure the degree to which the model prediction results violate the physical or ecological boundaries defined in the reservoir operation rules.
[0076] Use the rectified linear unit (ReLU) function to construct a unidirectional penalty. Specifically, L boundary = ReLU(O pred- O max ) + ReLU(O min- O pred ). Among them, O max and O min are the upper limit (such as the maximum discharge capacity) and lower limit (such as the minimum ecological flow) of the outflow defined by the operation rules respectively. The ReLU function ensures that this term only produces a penalty greater than zero when the predicted value O pred crosses the boundary.
[0077] Train the mechanism-constrained LightGBM model, select LightGBM as the basic model framework, Each iteration of GBDT (i.e., constructing a new tree) requires the first and second derivatives (i.e., gradients and Hessians) of the loss function with respect to the previous round of predicted values. Therefore, the existing GBDT models cannot directly use the above composite loss function. For this reason, the following solutions are provided: a. For the mechanism-constrained composite loss function L, find the analytical expressions of its first partial derivative (gradient) and second partial derivative (Hessian) with respect to the model predicted value O pred .
[0078] b. Write a Python function that meets the requirements of the LightGBM API. This function takes the predicted values and the true values (along with other physical parameters) as inputs, and according to the formula derived in step a, returns a tuple (grad, hess) containing the gradient and Hessian values corresponding to each sample.
[0079] c. Call the training interface of LightGBM, and pass in the executable custom objective function implemented in step b at the fobj parameter. Use the multi-scenario outflow prediction factor set as the input, and take the above composite loss as the optimization objective to train the model.
[0080] Under this setting, when LightGBM constructs each decision tree, the decision of splitting nodes and the determination of leaf node values will be directly guided by the physical mechanism penalty term (reflected by the gradient and Hessian). This enables the model to learn to abide by physical rules while learning the data patterns, rather than making passive corrections after prediction. After training, a trained mechanism-constrained outflow model is obtained.
[0081] Input the multi-scenario outflow prediction factor set during the test period into the trained mechanism-constrained outflow model. For each input quantile scenario, generate corresponding outflow prediction values that meet the physical constraints, forming a multi-scenario outflow prediction sequence. For this sequence, methods such as kernel density estimation (KDE) can be used to fit its probability density curve (PDF), and calculate its expected value as the single-value prediction result, finally obtaining a complete long-term reservoir outflow probability prediction scheme. Tests show that for the outflow scheme generated by this method, the proportion of violating the water balance constraint is reduced by more than 99% compared to the unconstrained model, and all predicted values fall within the scheduling boundaries, demonstrating extremely high reliability and practicality.
[0082] Example 4: Describe the detailed working process of the output layer of the double-anchor symmetric chain (DASC). This module solves the common quantile crossing problem in the prior art when generating probability prediction results.
[0083] The working process of this output layer includes the following steps: Step S310: Receive and integrate conditional information. In this step, receive two key information flows from the upstream module: the high-dimensional time-series feature encoding from the upstream feature extraction backbone network, and the predicted distribution form parameter vector Θ from the morphology controller.
[0084] Specifically, splice these two vectors in the feature dimension to form a richer enhanced conditional feature vector containing time-series dynamic information and physical distribution priors. This vector will be used as the unified input for all subsequent predictions, ensuring that the prediction results are jointly guided by both historical data patterns and physical causes.
[0085] Step S320: Parallelly predict the distribution anchor points and the internal position parameters. Based on the enhanced conditional feature vector, in this step, three parallel and independent Prediction Heads are used to generate three different intermediate results.
[0086] The Prediction Head generally refers to several layers at the end of a neural network for generating specific outputs. In this embodiment, each head can be one or more fully connected layers.
[0087] Head One: Used to predict the lowest quantile anchor point q min . It is a linear layer with 1 output unit. Preferably, a Soft plus activation function can be connected after it to ensure that the predicted traffic anchor point is non - negative, which conforms to the physical reality.
[0088] Head Two: Used to predict the highest quantile anchor point q max . Its structure is the same as that of Head One, and a Soft plus activation function can also be connected. q min and q max together define the support interval of the predicted probability distribution.
[0089] Head Three: Used to predict a set of unconstrained raw values of the internal position parameters. The number of its output units is equal to the number of intermediate quantiles to be predicted (for example, if predicting 9 quantiles, 9 raw values are output).
[0090] Step S330: Implement the monotonicity constraint of the internal position parameters. This is a key technical improvement to ensure that the quantiles do not cross. A series of mathematical transformations are performed on the sequence of raw values of the internal position parameters output by Head Three in Step S320 to generate a strictly monotonic sequence of monotonic internal position parameters {β i}.
[0091] First, pass the raw value sequence through the Soft plus activation function to ensure that all elements are non - negative.
[0092] Secondly, perform a cumulative summation operation on the sequence after Soft plus processing. After this step, each element in the sequence is equal to the sum of itself and all previous elements, thus ensuring the strict monotonic increasing property of the sequence.
[0093] Finally, divide the sequence after cumulative summation by the value of its last element (i.e., the sum of the sequence) to normalize it to the interval [0, 1], obtaining the final sequence of monotonic internal position parameters {β i}. This sequence satisfies 0 ≤ β1 ≤ β2 ≤ … ≤ β N ≤ 1.
[0094] Step S340: Reconstruct the final quantile sequence through convex combination. In this step, the predicted values of all quantiles are calculated using the anchor points and monotonic position parameters generated previously.
[0095] Specifically, applying the convex combination formula \(q\) i =(1 - β i ) • \(q\) min + β i • \(q\) max , for each \(β\) i in the monotonic internal position parameter sequence \(\{β\) i \}, the corresponding quantile predicted value \(q\) i is calculated. Since \(q\) min ≤ \(q\) max and the sequence \(\{β\) i \} is monotonic, the calculated sequence \(\{q\) i \} must also be monotonic.
[0096] As an example, for a certain moment, the model predicts \(q\) min = 100 m 3 / s, \(q\) max = 500 m 3 / s. For the three quantiles of 25%, 50%, and 75%, the monotonic internal position parameter sequence generated by step S330 is \(\{β1 = 0.2, β2 = 0.5, β3 = 0.75\}\). Then, the corresponding quantile predicted values are: \(q\) 25% =(1 - 0.2) • 100 + 0.2 • 500 = 80 + 100 = 180 m 3 / s.
[0097] \(q\) 50% =(1 - 0.5) • 100 + 0.5 • 500 = 50 + 250 = 300 m 3 / s.
[0098] \(q\) 75% =(1 - 0.75) • 100 + 0.75 • 500 = 25 + 375 = 400 m 3 / s.
[0099] It can be seen that the output sequence (180, 300, 400) is strictly monotonic without any crossover.
[0100] Through the above steps, the DASC output layer transforms the quantile prediction problem into a structured and constrained parameter prediction problem. The feature is to ensure the physical consistency of the output through mathematical construction rather than relying on the model training itself, thus completely avoiding the quantile crossover phenomenon.
[0101] Example 5: This example elaborates in detail the complete workflow of the Attention Decomposition-based Heterogeneous Gradient Modulation (AD-HGM) paradigm for training the PDP model in a single training iteration. The main feature is the creation and application of a gradient modulation matrix, which enables differential and intelligent training of different modules in the heterogeneous network.
[0102] In a complete training iteration workflow, the steps are as follows: Step S410: Forward propagation and multi-task loss calculation. Input a batch of initial inflow prediction factor sets and their corresponding true inflow labels into the constructed PDP model.
[0103] After the data flows through the MC-CNN module, a part of the features enters the auxiliary supervision branch, and after processing, an auxiliary prediction output is obtained. Compare this output with the true label to calculate the auxiliary loss L aux (e.g., using MSE loss).
[0104] The main data stream continues to flow through the BiLSTM module and the DASC output layer to obtain the final physically causally consistent probability inflow prediction sequence.
[0105] During the processing of the BiLSTM module, parse and temporarily store the internal attention weight tensor At inside it.
[0106] Compare the prediction sequence output by DASC with the true label to calculate the final Pinball loss L of the main task final .
[0107] Step S420: Dynamically generate the heterogeneous gradient modulation matrix. After calculating the loss in forward propagation and before starting backpropagation, dynamically generate the key matrix for modulating the gradient.
[0108] Input the scalar loss value L calculated in step S410 final , into the dynamic gating function, e.g., Gt = 1 / (1 + exp(-k • (L final - L0))), where k and L0 are hyperparameters. This function calculates the scalar base modulation intensity Gt. The larger L final is, the closer Gt is to 1, and vice versa, the closer it is to 0.
[0109] Broadcast the scalar Gt to the same dimension as the internal attention weight tensor At temporarily stored in step S410, and then perform element-wise multiplication to obtain the final heterogeneous gradient modulation matrix Mt = Gt * At (Hadamard product).
[0110] Step S430: Modulated backpropagation and weight update. This is the core step where the AD-HGM paradigm takes effect.
[0111] Start the automatic differentiation engine and begin the gradient backpropagation.
[0112] From the final Pinball loss L final The backpropagated gradient flow propagates normally, updating the weights of all relevant modules such as the BiLSTM and DASC layers.
[0113] From the auxiliary loss L aux The backpropagated gradient flow is intercepted by a preset gradient hook before reaching the MC-CNN module.
[0114] Element-wise multiply the intercepted gradient flow with the heterogeneous gradient modulation matrix Mt generated in step S420.
[0115] Use the modulated gradient flow obtained after multiplication to update the weights of the MC-CNN module.
[0116] Through one complete iteration as described above, the training intensity of the auxiliary task on the front-end feature extractor (MC-CNN) is refined and dynamically regulated by the learning state (Gt) and feature preference (At) of the main task. This improvement avoids problems such as gradient conflicts or learning efficiency mismatches that may occur in simple multi-task learning, ensuring that the entire heterogeneous network can be trained end-to-end in a harmonious and efficient manner.
[0117] Example 6: Explain in detail how to implement and apply a custom loss function containing physical mechanisms in LightGBM.
[0118] Step S510: Express the physical rules to be implemented with clear mathematical formulas and integrate them into a unified loss function. For example, adopt the mechanism constraint composite loss function defined in Example 3: L(y, y*) = w1 • (y - y*) 2 + w2 • ((I sce - y*) • Δt - ΔV)2 + w3 • (ReLU(y* - O max ) + ReLU(O min - y*)).
[0119] Among them, y* is the model prediction value O pred , y is the actual outflow (only for the first term), and other physical parameters such as I sce , ΔV, O max , O min etc. are all input as known conditions.
[0120] Step S520: Calculate the first-order partial derivative (gradient grad) and second-order partial derivative of the composite loss function L(y, y*) with respect to the model prediction value y*.
[0121] grad = dL / dy = 2w1(y* - y) - 2w2((I sce - y*)•Δt - ΔV)•Δt + w3(I(y* > O max ) - I(y* < O min )); hess = d 2 L / dy* 2 = 2w1 + 2w2Δt2; Note that d is the partial derivative operator.
[0122] Note: I(•) is the indicator function. For the treatment of the derivative of ReLU at non-differentiable points, methods such as subgradient can be used. This is a simplified example here.
[0123] Step S530: In Python, write a function whose signature needs to conform to the requirements of LightGBM, usually def custom_objective(y_true, y_pred).
[0124] Inside this function, y true not only contains the true labels, but also needs to be designed as a data structure (such as a dictionary or an object) that can pass additional physical parameters (such as I sce , ΔV, etc.). The function body calculates the grad and hess values corresponding to each sample according to the formula in step S520, using y pred and various parameters parsed from y true .
[0125] The function finally returns a tuple (grad, hess) containing the gradient values and Hessian values of all samples.
[0126] When calling the lightgbm.train() function, pass this written custom objective function as the fobj parameter.
[0127] There is no constraint check or post-processing outside the model. Instead, by providing the underlying gradient and Hessian information, the penalties of physical rules are directly injected into the genes of the GBDT model constructed layer by layer and node by node, so that the finally trained model naturally has the instinct to comply with physical mechanisms.
[0128] In a specific embodiment of the present invention, the atmospheric circulation index refers to a quantitative index used to macroscopically describe the state of atmospheric motion on a global or regional scale. These indices usually reflect climate anomalies that are generated by the interaction between the ocean and the atmosphere and have a relatively long duration (from several months to several years). The technical principle lies in that these large-scale climate anomalies can have significant and predictable effects on key meteorological and hydrological elements such as long-term rainfall and temperature in a specific region through the mechanism of atmospheric teleconnection. Therefore, introducing these indices as predictors into the model helps the model capture the low-frequency and long-period hydrological variation patterns, thereby improving the accuracy and reliability of long-term predictions.
[0129] Specifically, when constructing the initial factor set for inflow prediction, a series of atmospheric circulation index data can be obtained from publicly available meteorological data service agencies. The instantiation examples mentioned in the solution include ENSO (El Niño - Southern Oscillation) and NAO (North Atlantic Oscillation). In practical applications, the Nino3.4 sea surface temperature anomaly index can be used to quantify the state of ENSO, or the time series of the NAO index can be adopted. Before these index data are used as model inputs, like other meteorological and hydrological data, they will undergo preprocessing such as data cleaning, interpolation, and normalization.
[0130] In a specific embodiment of the present invention, the scheduling factor refers to a key variable extracted from the historical operation data of the reservoir, which can directly reflect the current engineering state of the reservoir and historical scheduling operation experience. In reservoir scheduling decisions, although the future inflow situation is important, the current reservoir state (such as water storage) and existing operation rules or experience are also the core basis for determining the next operation. The purpose of introducing the scheduling factor is to provide the immediate engineering background information required for decision-making for the downstream mechanism-constrained outflow prediction model, so that the predicted outflow not only responds to the future incoming water but also conforms to the current engineering reality.
[0131] Specifically, in the process of constructing the multi-scenario outflow prediction factor set, the scheduling factor will be fused with the multi-dimensional probabilistic inflow information set output by the upstream model. The instantiation examples given in the solution include the initial storage, the end-of-period storage target, and the outflow volume in the same historical period, etc. For example, when predicting the next month, the actual storage at the beginning of the current month, the storage corresponding to the end-of-month target storage level set according to the scheduling plan, and the average outflow volume in this month over the past ten years will be used as scheduling factors and spliced with the prediction information for each inflow scenario.
[0132] In a specific embodiment of the present invention, Physically-driven Distribution Morphology Parameterized Reconstruction (PDP) is the name of the overall design concept and architecture of a deep neural network model designed to achieve causally consistent probability inflow prediction. The core technical principle lies in abandoning the idea of the traditional model that mixes all factors for black-box fitting, but instead innovatively designing parallel modules (i.e., morphology controllers), using specific factors strongly related to the physical causes of runoff to directly learn and control (i.e., parameterize) the probability distribution morphology of the final prediction result, thereby achieving a structured and physically interpretable reconstruction of the prediction distribution.
[0133] Specifically, the network architecture constructed based on the PDP idea consists of three core modules working together: First is the upstream feature extraction backbone network for deep spatio-temporal feature extraction, such as the combination of MC-CNN and BiLSTM. Second is the parallel morphology controller module, which receives physical driving factors such as atmospheric circulation indices and outputs a prediction distribution morphology parameter vector Θ that can describe information such as the scale and skewness of the prediction distribution. Finally, there is the Dual Anchor Symmetric Chain (DASC) output layer, which receives the feature encoding of the backbone network and, under the guidance of the morphology parameter vector Θ, generates the final probability inflow prediction sequence in a non-crossing manner.
[0134] In a specific embodiment of the present invention, the Dual Anchor Symmetric Chain (DASC) refers to an output layer structure applied in the PDP network architecture. By changing the prediction target and using mathematical constructs, it solves the quantile crossing problem caused by independently predicting each quantile in the prior art. It ensures that the probability prediction sequence output by the model strictly satisfies monotonicity and has inherent theoretical self-consistency, making it possible to construct and apply subsequent probability density functions.
[0135] Specifically, the working process of the DASC output layer does not directly predict the quantile q i . It first predicts two structural anchors of the entire probability distribution in parallel: the lowest quantile anchor q min and the highest quantile anchor q max。 At the same time, it also predicts a series of normalized and monotonic internal position parameters {β i}. Finally, all intermediate quantiles q i are calculated and reconstructed through the convex combination formula q i =(1 - β i ) • q min + β i • q max Since q min , q max and the monotonic sequence {β iThe mathematical properties of {} ensure that the finally calculated quantile sequence {qi} is necessarily monotonic, thus eradicating the possibility of quantile crossing at the structural level.
[0136] In a specific embodiment of the present invention, the gradient heterogeneous modulation of internal attention deconstruction (AD-HGM) refers to an advanced training paradigm for training heterogeneous deep neural networks such as PDP. This paradigm aims to solve the problem that in a complex model containing different types of sub-networks (such as CNN and RNN), due to differences in network structure and depth, the gradient signal backpropagated from the final task may not be able to train all modules, especially the front-end feature extraction modules, sufficiently and effectively. AD-HGM solves this problem of gradient learning efficiency mismatch by introducing an auxiliary task intelligently regulated by the main task.
[0137] Specifically, the AD-HGM paradigm dynamically generates a heterogeneous gradient modulation matrix Mt. This matrix is obtained by multiplying two parts: one part is the global scalar base modulation intensity Gt calculated according to the final loss L of the main task, which reflects the overall learning state of the model. The other part is the internal attention weight tensor At parsed from within the model (such as the BiLSTM module), which reflects the local preference of the model for different features when processing sequences. During backpropagation, the gradient flow backpropagated from the auxiliary task loss L will be element-wise multiplied by this modulation matrix Mt before updating the front-end network (such as MC-CNN). This operation makes the allocation of auxiliary gradients highly intelligent, achieving efficient and conflict-free training of the front-end feature extraction module. final Calculated global scalar base modulation intensity Gt, which reflects the overall learning state of the model. The other part is the internal attention weight tensor At parsed from within the model (such as the BiLSTM module), which reflects the local preference of the model for different features when processing sequences. During backpropagation, the gradient flow backpropagated from the auxiliary task loss L aux Before updating the front-end network (such as MC-CNN), the gradient flow backpropagated from the auxiliary task loss L will be element-wise multiplied by this modulation matrix Mt. This operation makes the allocation of auxiliary gradients highly intelligent, achieving efficient and conflict-free training of the front-end feature extraction module.
[0138] In a specific embodiment of the present invention, the mechanism-constrained composite loss function directly encodes the physical laws (such as water balance) and engineering boundaries (such as discharge limits) that must be obeyed in reservoir operation into differentiable mathematical penalty terms and combines them with the loss terms that traditionally measure prediction accuracy. By optimizing this composite loss function, the model is forced to learn and comply with these physical rules while learning the data patterns.
[0139] Specifically, this composite loss function is composed of a weighted sum of at least three subterms: The basic prediction accuracy term, such as the root mean square error, is used to ensure the basic fitting accuracy of the model prediction.
[0140] The water balance penalty term, a penalty term constructed based on the water balance equation (i.e., (inflow - outflow) × Δt = storage change), is used to penalize prediction results that violate this physical law.
[0141] The penalty term for the outflow boundary is a penalty term constructed based on physical boundaries such as the upper limit of the discharge capacity and the lower limit of the ecological flow defined in the reservoir operation rules. In this way, the physical mechanism is integrated into the learning process of the model through endogenous constraints rather than external post-processing methods.
[0142] In a specific embodiment of the present invention, the mechanism constraint model generates a corresponding outflow prediction value that satisfies physical constraints for multiple input scenarios (each scenario corresponds to an inflow quantile), thereby forming a multi-scenario outflow prediction sequence containing multiple possible outflow values. This sequence can be regarded as a set of discrete samples drawn from the conditional probability distribution of future outflow. To obtain a continuous probability distribution description, this solution uses the KDE method to process this sequence of samples and fits the probability density curve of the final outflow. Based on this curve, its expected value, variance, specific confidence interval, etc. can be further calculated to form a probability prediction scheme.
[0143] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A method for predicting the long-term probability of reservoir outflow, characterized in that Including: Based on historical hydrological and meteorological observation data, atmospheric circulation index data, and historical reservoir operation data, form basic data, and construct an initial factor set for inflow prediction with different time-delay effects; Use a causal consistency probability inflow prediction model to process the initial factor set for inflow prediction and generate a multi-dimensional probability inflow information set; Fuse the multi-dimensional probability inflow information set and the scheduling factors extracted from the basic data to construct a multi-scenario outflow prediction factor set; Through a mechanism-constrained outflow prediction model, process the multi-scenario outflow prediction factor set to generate the final long-term reservoir outflow probability prediction plan.
2. The method according to claim 1, wherein The steps of using a causal consistency probability inflow prediction model to process the initial factor set for inflow prediction and generate a multi-dimensional probability inflow information set include: Use the causal consistency probability inflow prediction model for prediction to obtain a physically causally consistent probability inflow prediction sequence without quantile crossing; During the prediction process, extract the hydrological process context encoding vector from the internal hidden layer state of the model; Output a prediction distribution form parameter vector representing the runoff probability distribution form from a specific module of the model; Integrate the probability inflow prediction sequence, the hydrological process context encoding vector, and the prediction distribution form parameter vector into a multi-dimensional probability inflow information set.
3. The method according to claim 2, characterized in that, The network architecture of the causal consistency probability inflow prediction model includes: An upstream feature extraction backbone network, which receives the initial factor set for inflow prediction as input, performs spatio-temporal feature extraction, and outputs a high-dimensional time-series feature encoding. The hydrological process context encoding vector is extracted from this high-dimensional time-series feature encoding; Parallel form controller modules, which screen physical driving factors from the initial factor set for inflow prediction as input, and output a prediction distribution form parameter vector after learning; A double-anchor symmetric chain output layer, which receives the high-dimensional time-series feature encoding and uses the prediction distribution form parameter vector as a conditional input to generate a physically causally consistent probability inflow prediction sequence.
4. The method according to claim 3, characterized in that, The steps for the double-anchor symmetric chain output layer to generate a physically causally consistent probability inflow prediction sequence include: Based on the high-dimensional time-series feature encoding and the prediction distribution form parameter vector, parallelly predict two anchors of the probability distribution: the lowest quantile anchor and the highest quantile anchor; Predict a set of normalized monotonic internal position parameter sequences; Through a convex combination operation on the lowest quantile anchor, the highest quantile anchor, and the monotonic internal position parameter sequence, reconstruct and generate all intermediate quantiles to form the final physically causally consistent probability inflow prediction sequence.
5. The method according to claim 3, characterized in that The steps for the form controller module to output a prediction distribution form parameter vector include: From the initial factor set for inflow prediction, screen out the factors that have a physical driving effect on the runoff distribution form to form a subset of physical driving factors; Feed the subset of physical driving factors into a lightweight feedforward neural network for learning; Output a prediction distribution form parameter vector through the lightweight feedforward neural network, which contains the scale and skewness information of the prediction distribution and is used to quantitatively describe the key form of the runoff probability distribution at the prediction moment.
6. The method according to claim 3, characterized in that, Train the causal consistency probability inflow prediction model using a gradient heterogeneous modulation paradigm based on internal attention deconstruction. The training steps include: An auxiliary supervision branch is introduced after the upstream feature extraction backbone network to generate an auxiliary prediction output; Execute the forward propagation of the model, and calculate the final Pinball loss of the main task based on the physically causally consistent probability inflow prediction sequence; Calculate the auxiliary loss of the auxiliary task based on the auxiliary prediction output.
7. The method according to claim 6, wherein The training step also includes generating a heterogeneous gradient modulation matrix, and this step includes: During the forward propagation of the model, parse and extract the internal attention weight tensor from its internal attention mechanism; According to the final Pinball loss of the main task, calculate the scalar form of the basic modulation intensity through a dynamic gating function; Broadcast and element-wise multiply the basic modulation intensity with the internal attention weight tensor to generate a heterogeneous gradient modulation matrix.
8. The method according to claim 7, characterized in that, The training step also includes performing modulated backpropagation, and this step includes: During the gradient backpropagation process, element-wise multiply the gradient flow that is backpropagated from the auxiliary loss to the upstream feature extraction backbone network with the heterogeneous gradient modulation matrix; Apply the modulated gradient flow obtained after multiplication to update the weights of the upstream feature extraction backbone network, so as to achieve non-uniform intelligent training of the front-end feature extraction module.
9. The method according to claim 1, characterized in that, The steps of applying the mechanism-constrained outflow prediction model to process the multi-scenario outflow prediction factor set and generate the final long-term reservoir outflow probability prediction scheme include: Construct a mechanism-constrained outflow prediction model based on the gradient boosting decision tree; Use the mechanism-constrained composite loss function as the optimization objective to train the model, where this composite loss function forcibly couples the physical mechanisms of water balance and outflow boundary; Use the trained model to generate corresponding outflow prediction values for each scenario in the multi-scenario outflow prediction factor set, form a multi-scenario outflow prediction sequence, and integrate it into the long-term reservoir outflow probability prediction scheme.
10. The method according to claim 9, characterized in that, The mechanism-constrained composite loss function combines at least the following three parts by weighted summation: The root mean square error term as the basic prediction accuracy term, which is used to measure the deviation between the predicted outflow value and the true value; The water balance penalty term constructed based on the water balance equation, which is used to penalize the prediction results that violate the law of water conservation; The outflow flow boundary penalty term constructed according to the reservoir operation rules, which is used to penalize the prediction results that exceed the upper limit of the discharge capacity or are lower than the lower limit of the ecological flow.
Citation Information
Patent Citations
Meteorological forecast-based small and medium-sized reservoir capacity prediction method and system
CN116911178A
Reservoir irrigation area water resource allocation method based on big data analysis
CN119250476A
Hydrological forecasting method based on deep integrated learning and physical mechanism
CN119338081A
Cited By
Warehouse-out flow prediction method based on Stacking framework
CN121146176A
Model training method, battery cell overcharge detection method and related equipment
CN121210956A
Underground water level change prediction method and system based on machine learning
CN121765398A
Machine Learning-Based Groundwater Level Change Prediction Method and System
CN121765398B
Multi-energy complementary power system scheduling rule extraction method
CN121835867A