A method, terminal and storage medium for predicting flow of a river basin based on multiple models
By combining multiple models, integrating hydrological data, and generating time-varying probability distribution parameters for flow, the interpretability and accuracy issues of traditional flood forecasting methods are solved, achieving high-precision and uncertainty-quantified flow prediction and supporting risk decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID FUJIAN ELECTRIC POWER CO LTD
- Filing Date
- 2026-02-13
- Publication Date
- 2026-05-29
AI Technical Summary
Traditional flood forecasting methods cannot simultaneously achieve interpretability, high accuracy, and uncertainty quantification. Pure physical models lack adaptability and interpretability, pure data-driven models lack physical constraints and extrapolation capabilities, and simple serial physics-AI models cannot output probability intervals, making it difficult to support risk decision-making.
By employing a multi-model approach, combining the Xin'anjiang model, Muskingen model, long short-term memory neural network, and hybrid density network, and integrating hydrological data to generate time-varying probability distribution parameters of flow, interpretable and high-precision flow prediction can be achieved.
It has improved the accuracy and reliability of flood forecasting, provided direct risk assessment and flood control scheduling basis, and realized the quantification of uncertainty in flow forecasting.
Smart Images

Figure CN122113620A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of watershed flow prediction technology, and in particular to a watershed flow prediction method, terminal and storage medium based on multiple models. Background Technology
[0002] Traditional flood forecasting methods mainly rely on two types of approaches: one is the purely physical model (such as the Xin'anjiang model), which cannot handle nonlinear residuals, lacks uncertainty output, has a fixed model structure, numerous parameters, a complex parameter tuning process, and relies on experience for parameter calibration, making it difficult to adapt to complex changes; the other is the purely data-driven model (such as LSTM), which relies on historical data analysis to find patterns, but the output lacks interpretability, is prone to "overfitting" or "illusions," lacks physical constraints, and has poor extrapolation ability for training data. To combine the advantages of both, existing technologies also include simple cascaded physical-AI models (such as XAJ+LSTM point prediction), but these only perform point predictions, cannot output probability intervals, do not introduce probabilistic modeling mechanisms, and are difficult to support risk decision-making. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a multi-model-based watershed flow prediction method, terminal and storage medium that can achieve interpretable, high-precision watershed flow prediction with uncertainty quantification, thereby improving the accuracy and reliability of flood forecasting.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A multi-model-based watershed flow prediction method includes the following steps: Hydrological data from various monitoring points in the upper reaches of the basin are acquired, and the hydrological data from each monitoring point are integrated to obtain the basin hydrological data. The basin hydrological data is then preprocessed. The pre-processed watershed hydrological data is input into the Xin'anjiang model to obtain the runoff sequence, and the runoff sequence is input into the Muskingen model to output the prior flow sequence. The actual time-sharing flow of the watershed is collected, and the actual time-sharing flow is preprocessed to obtain the measured flow sequence; The residual value between the prior flow sequence and the measured flow sequence is used as the learning target of the long short-term memory neural network, and the residual flow sequence is output. Based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters for predicting the flow of the basin in the future period. Based on the time-varying probability distribution parameters, a flow prediction interval that satisfies a preset confidence level is generated.
[0005] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A multi-model-based watershed flow prediction terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the various steps of the multi-model-based watershed flow prediction method described above.
[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A computer storage medium storing a computer program that is executed by a processor to implement the steps of the above-described multi-model-based watershed flow prediction method.
[0007] The beneficial effects of this invention are as follows: by integrating and preprocessing multi-source hydrological data, the quality and consistency of the model input data are ensured; by using the Xin'anjiang model and the Muskingen model to output prior flow sequences, the interpretability of the prediction results and the consistency of hydrological patterns are ensured; by obtaining the measured flow sequence and learning the residual between the prior flow sequence and the measured flow sequence through a long short-term memory neural network, the nonlinear and temporal errors caused by extreme climate or human activities are effectively captured, improving the forecast accuracy; by introducing a hybrid density network, time-varying probability distribution parameters of the basin flow in the future are generated based on the prior flow sequence and the residual flow sequence, thereby generating a flow prediction interval that meets the preset confidence level, realizing the quantification of the uncertainty of basin flow prediction, and providing a direct and reliable basis for risk assessment and refined decision-making in flood control scheduling. Attached Figure Description
[0008] Figure 1 This is a flowchart of a multi-model-based watershed flow prediction method according to an embodiment of the present invention; Figure 2 This is another flowchart of a multi-model-based watershed flow prediction method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a multi-model-based watershed flow prediction terminal according to an embodiment of the present invention; Label Explanation: 1. A multi-model-based watershed flow prediction terminal; 2. Memory; 3. Processor. Detailed Implementation
[0009] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0010] The following is an explanation of the technical terms used in this invention: (1) Xin'anjiang Model: Based on the core concept of full storage and runoff generation, the model receives watershed hydrological data such as rainfall and evapotranspiration. Through multi-level calculations of evapotranspiration, runoff generation, and water source, it simulates hydrological processes and outputs a deterministic runoff generation sequence. This sequence represents the flow forecast derived from physical laws, providing a benchmark for subsequent data-driven error correction and uncertainty quantification.
[0011] (2) Hybrid Density Network: This is a neural network architecture designed specifically for probability prediction. The output of MDN is a parameter that describes the complete conditional probability distribution of the target variable.
[0012] (3) Distribution characteristics: The overall statistical attributes and patterns revealed after statistical analysis of hydrological data (such as rainfall and flow).
[0013] (4) Time-varying probability distribution parameters: These are a set of parameters that change over time and are predicted by the Mixed Density Network (MDN), including weights, expected values and variances.
[0014] In flood forecasting practice, traditional methods mainly rely on purely physical models (such as the Xin'anjiang model) and purely data-driven models (LSTM). Purely physical models have fixed structures, their parameter calibration process depends on experience, and their ability to simulate complex nonlinear hydrological processes is limited. While purely data-driven models are adept at extracting complex patterns from historical data, their physical interpretability is weak. Currently, although some research attempts to connect physical models with AI models, these are mostly limited to single-point predictions and cannot generate probability intervals for risk assessment, thus failing to support risk decision-making. Therefore, there is an urgent need for a multi-model-based watershed flow forecasting method, terminal, and storage medium that can solve the above-mentioned technical problems.
[0015] Please refer to Figure 1 This invention provides a multi-model-based watershed flow prediction method, comprising the following steps: Hydrological data from various monitoring points in the upper reaches of the basin are acquired, and the hydrological data from each monitoring point are integrated to obtain the basin hydrological data. The basin hydrological data is then preprocessed. The pre-processed watershed hydrological data is input into the Xin'anjiang model to obtain the runoff sequence, and the runoff sequence is input into the Muskingen model to output the prior flow sequence. The actual time-sharing flow of the watershed is collected, and the actual time-sharing flow is preprocessed to obtain the measured flow sequence; The residual value between the prior flow sequence and the measured flow sequence is used as the learning target of the long short-term memory neural network, and the residual flow sequence is output. Based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters for predicting the flow of the basin in the future period. Based on the time-varying probability distribution parameters, a flow prediction interval that satisfies a preset confidence level is generated.
[0016] As can be seen from the above description, the beneficial effects of this invention are as follows: by integrating and preprocessing hydrological data from multiple monitoring points, watershed hydrological data is obtained, ensuring the reliability of the model input data; by using the Xin'anjiang model and the Muskingen model to output prior flow sequences, the prediction results are ensured to have clear physical laws supporting them, enhancing the physical interpretability of the prediction results; by obtaining measured flow sequences and training a long short-term memory neural network with the residuals of the measured flow sequences and prior flow sequences, nonlinear dynamic errors are effectively captured, improving the accuracy of the prediction time series; based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters, and flow prediction intervals are constructed accordingly, realizing a quantitative characterization of watershed flow uncertainty, thereby providing a reliable basis for flood warning and risk decision-making.
[0017] Furthermore, the watershed hydrological data is preprocessed, including: Statistical analysis was performed on the watershed hydrological data to identify the distribution characteristics of the watershed hydrological data; Based on the distribution characteristics, abnormal data in the watershed hydrological data are identified and removed. Based on the aforementioned distribution characteristics, interpolation is used to supplement the missing data in the watershed hydrological data; The format of the watershed hydrological data after anomaly removal and supplementation is converted.
[0018] As described above, by statistically analyzing the watershed hydrological data and identifying its distribution characteristics, we can clarify the basis of data patterns, thereby identifying and eliminating abnormal data in the watershed hydrological data. At the same time, we can use interpolation to supplement missing data, maintain the statistical characteristics and sequence continuity of the data, and perform format conversion on the processed data to ensure that the data meets the requirements of subsequent model input, thus ensuring the reliability and consistency of the model input data.
[0019] Furthermore, the pre-processed watershed hydrological data is input into the Xin'anjiang model to obtain the runoff generation sequence, including: The watershed hydrological data includes rainfall, evapotranspiration, cross-sectional flow, and watershed water storage capacity; According to the preset time period, the runoff generation status of the watershed is determined time by time period based on the water volume relationship between rainfall, evapotranspiration, cross-sectional flow and watershed storage capacity; Based on the aforementioned production flow status, a corresponding production flow calculation method is adopted to calculate the production flow rate for the corresponding time period; By summarizing the flow rates of all time periods in chronological order, a flow rate sequence is obtained.
[0020] As described above, by integrating watershed hydrological data such as rainfall, evapotranspiration, flow, and water storage capacity, the watershed water cycle process is comprehensively reflected, providing a complete data foundation for simulation. Based on the dynamic identification of runoff generation status according to water balance, the model can adapt to different hydrological mechanisms, enhance its responsiveness to actual situations, and thus adopt corresponding calculation methods for different runoff generation statuses, improving the accuracy of runoff generation simulation. Furthermore, by integrating runoff from different time periods to form a runoff generation sequence, a stable and interpretable physical benchmark is provided for subsequent probabilistic forecasting.
[0021] Furthermore, the runoff generation status of the watershed is determined time-by-time based on the water volume relationship between rainfall, evapotranspiration, cross-sectional flow, and watershed storage capacity, including: Calculate the difference between rainfall and evapotranspiration in the current time period, and add the difference to the cross-sectional flow rate to obtain the total input water volume in the current time period; If the total input water volume is less than the water storage capacity of the basin, then the runoff generation state of the basin is determined to be local runoff generation; If the total input water volume is greater than or equal to the water storage capacity of the basin, then the runoff generation status of the basin is determined to be full basin runoff generation.
[0022] As described above, by calculating the combined water volume of rainfall, evapotranspiration, and cross-sectional flow, an accurate estimate of the water input to the basin can be achieved. Based on the comparison of this water volume with the basin's water storage capacity, the local or basin-wide runoff status can be objectively determined, providing a clear distinction of physical conditions for subsequent differentiated runoff calculations and ensuring the rationality and accuracy of the model's calculation path selection under different hydrological scenarios.
[0023] Furthermore, based on the aforementioned runoff status, a corresponding runoff calculation method is adopted to calculate the runoff volume for the corresponding time period, including: When the runoff generation state of the watershed is localized, the runoff volume is calculated as follows: ; When the runoff generation status of the basin is basin-wide runoff generation, the runoff volume is calculated as follows: R = PE - (WM - W0); In the formula, R represents the runoff; P represents the rainfall; E represents the evapotranspiration; A represents the cross-sectional flow; WMM represents the watershed storage capacity; B represents the uneven distribution of water storage capacity in the watershed; WM represents the average tension water capacity of the watershed; and W0 represents the tension water storage of the watershed at the current moment.
[0024] As described above, for local runoff generation, a formula considering the uneven distribution of watershed storage capacity across the watershed is used for calculation, making the runoff estimation more consistent with the spatial heterogeneity of the actual ground surface. For runoff generation across the entire watershed, a simplified formula based on water balance is used, improving computational efficiency while ensuring physical rationality. This approach enhances the model's adaptability to different wetting conditions and watershed spaces, thereby significantly improving the overall accuracy and reliability of runoff simulation.
[0025] Further, based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters for predicting future flow in the watershed, including: The prior flow sequence and the residual flow sequence are used as inputs to the hybrid density network, and the output of the hybrid density network is the output vector Y. f : ; In the formula, m is the preset number of Gaussian kernel functions. , , These are the initial output information for the weight, expectation, and variance of the i-th Gaussian component, respectively. The initial output information of the weights is normalized using the Softmax function to obtain the weights w of each Gaussian component. i : ; ; The initial output information of the variance is processed using an exponential function to obtain the variance σ of each Gaussian component. i : ; The initial output information of the expected value is directly used as the expected value μ of each Gaussian component. i ; Based on the weight w i The variance σ i and the expected value μ i Calculate the time-varying probability distribution parameter θ of the flow in the watershed for the predicted future period.
[0026] As described above, by using the prior flow generated by the physical model and the residual sequence captured by the data-driven model as network inputs, the information foundations of both physical mechanisms and data patterns are effectively integrated. A hybrid density network generates the weights, expected values, and variances of multiple Gaussian components, providing flexible expressive power for constructing complex time-varying probability distributions. The Softmax function is used to normalize the weights, ensuring that the sum of the weights of each component is 1, conforming to the basic constraints of probability distributions. An exponential transformation is applied to the variance to guarantee the non-negativity of the output variance, avoiding the generation of invalid probability distributions. Based on these processed parameters, the time-varying probability distribution parameters are calculated, laying a solid mathematical foundation for generating reliable probability prediction intervals.
[0027] Further, generating a flow prediction interval that satisfies a preset confidence level based on the time-varying probability distribution parameters includes: Construct a conditional probability density function based on the time-varying probability distribution parameters. : ; In the formula, X is the input to the hybrid density network, Y is the target variable, and θ is the time-varying probability distribution parameter. Let i be the i-th Gaussian kernel function, and its expression is: ; The expected value of the conditional probability density function is calculated, and the expected value is used as a deterministic forecast value. Based on the deterministic forecast value, a flow prediction interval that meets the preset confidence level is generated.
[0028] As described above, a conditional probability density function is constructed based on time-varying probability distribution parameters, and a Gaussian mixture model is used to flexibly characterize the multimodal uncertainty of future flow, thus achieving a complete mathematical description of forecast uncertainty. By calculating the expected value of this probability density function, a deterministic forecast value with statistical optimality is provided simultaneously, taking into account the actual needs of point forecasting. Furthermore, a flow forecast interval that meets the preset confidence level is generated based on this probability distribution, transforming the probability forecast results into quantitative boundary information that can be directly used for risk assessment and flood control scheduling.
[0029] Furthermore, the training process of the hybrid density network includes: A loss function is constructed using the maximum likelihood estimation method. Minimizing this loss function is the training objective. The parameters of the hybrid density network are iteratively optimized using an adaptive estimation algorithm until the network converges, resulting in a trained hybrid density network. The loss function is: .
[0030] As described above, using the negative log-likelihood function as the loss function directly links the network training objective to the probability likelihood of the observed data, thereby driving the network to learn the probability density function that best matches the true distribution. Iterative optimization of network parameters through an adaptive estimation algorithm efficiently and stably adjusts the model's internal weights, accelerating the convergence process. Continuous training with the goal of minimizing the loss function until network convergence ensures that the hybrid density network possesses reliable and stable probability prediction capabilities, providing model assurance for generating high-quality probability prediction results.
[0031] Please refer to Figure 3 Another embodiment of the present invention provides a multi-model-based watershed flow prediction terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the multi-model-based watershed flow prediction method described above.
[0032] The above-described multi-model-based watershed flow prediction method, terminal, and storage medium of this invention are applicable to watershed flow prediction scenarios. They can achieve interpretable, high-precision, and uncertainty-quantified watershed flow prediction, thereby improving the accuracy and reliability of flood forecasting. The following is a detailed description of the implementation methods: Please refer to Figure 1 and Figure 2 Embodiment 1 of the present invention is as follows: A multi-model-based watershed flow prediction method includes the following steps: S1. Obtain hydrological data from various monitoring points in the upper reaches of the basin, integrate the hydrological data from each monitoring point to obtain the basin hydrological data, and preprocess the basin hydrological data, specifically including: Statistical analysis was performed on the watershed hydrological data to identify the distribution characteristics of the watershed hydrological data; Based on the distribution characteristics, abnormal data in the watershed hydrological data are identified and removed. Based on the aforementioned distribution characteristics, interpolation is used to supplement the missing data in the watershed hydrological data; The format of the watershed hydrological data after anomaly removal and supplementation is converted.
[0033] In this embodiment, hydrological data from various monitoring points in the upstream of the watershed are acquired and integrated. This hydrological data includes, but is not limited to, rainfall, evaporation, historical reservoir water levels, watershed characteristic parameters, soil moisture, and reservoir inflow and outflow. Data integration technology is employed to unify the heterogeneous hydrological data into a central database to meet the Xin'anjiang model's requirements for input data format and consistency.
[0034] Statistical analysis was performed on the integrated watershed hydrological data to calculate its statistical characteristics (such as skewness and kurtosis) and identify the changes and distribution characteristics of the data at different time points, such as whether the monitored values continuously increased over time or remained constant for a period of time. Based on the identified distribution characteristics, data cleaning was performed: outlier data points that significantly deviated from the overall distribution pattern were identified and removed; interpolation methods were used to supplement missing data in the sequence; and the processed data underwent format standardization, such as converting text-formatted numerical values to numerical values and uniformly adjusting the numerical precision to three significant figures as required by water conservancy industry standards. This ensured that all data were formatted consistently, accessible, and directly applicable to subsequent model calculations.
[0035] S2. Input the pre-processed watershed hydrological data into the Xin'anjiang model to obtain the runoff sequence, specifically including: The watershed hydrological data includes rainfall, evapotranspiration, cross-sectional flow, and watershed water storage capacity; According to the preset time period, the runoff generation status of the watershed is determined time by time period based on the water volume relationship between rainfall, evapotranspiration, cross-sectional flow and watershed storage capacity; Based on the aforementioned production flow status, a corresponding production flow calculation method is adopted to calculate the production flow rate for the corresponding time period; By summarizing the flow rates of all time periods in chronological order, a flow rate sequence is obtained.
[0036] In this embodiment, the Xin'anjiang Three-Source Model is used for runoff calculation. Its core concept is "runoff generation when the water storage reaches full capacity". This means that before the soil water storage in the vadose zone of the watershed reaches its field capacity (full capacity), precipitation is mainly absorbed by the soil and does not generate runoff. After full capacity, subsequent precipitation (excluding concurrent evaporation) will all generate runoff, which is a storage control mechanism.
[0037] S2.1. Determine the runoff generation status of the watershed on a time-by-time basis based on the water volume relationship between rainfall, evapotranspiration, cross-sectional flow rate, and watershed storage capacity, including: Calculate the difference between rainfall P and evapotranspiration E in the current time period, and add the difference to the cross-sectional flow rate A to obtain the total input water volume (P-E+A) in the current time period. If the total input water volume is less than the water storage capacity WMM of the basin (i.e., P-E+A<WMM), then the runoff state of the basin is determined to be local runoff. If the total input water volume is greater than or equal to the water storage capacity of the basin (i.e., P-E+A≥WMM), then the runoff generation status of the basin is determined to be full basin runoff generation.
[0038] This method enables an objective determination of runoff status, providing a clear distinction of physical conditions for subsequent differentiated runoff calculations, and ensuring the rationality and accuracy of the model's calculations under different hydrological scenarios.
[0039] S2.2. Based on the described runoff status, adopt the corresponding runoff calculation method to calculate the runoff volume for the corresponding time period, including: The formula for calculating total runoff is: ; ; In the formula, f represents the runoff area, F represents the total runoff area of the entire watershed, and f / F represents the local wetland level or area correction factor. The value represents the corrected water storage capacity; B represents the uneven distribution of water storage capacity in the basin. When B=0, the distribution is uniform. The larger B is, the more uneven the distribution. This value is determined by topography and geological conditions; WMMM represents the maximum water storage capacity of the basin.
[0040] When the runoff generation state of the watershed is localized, the integral result of the runoff volume is: ; In the formula, WM represents the average tensile water capacity of the watershed, which reflects the degree of drought in the watershed and is divided into upper tensile water capacity UM, lower tensile water capacity LM and deep tensile water capacity DM.
[0041] When the runoff generation status of the basin is basin-wide runoff generation, the runoff volume is calculated as follows: R = PE - (WM - W0); In the formula, W0 represents the tension water storage volume of the basin at the current moment.
[0042] This approach enhances the model's adaptability to different humid conditions and watershed spaces, thereby significantly improving the overall accuracy and reliability of runoff generation simulation.
[0043] The runoff sequence output from the Xin'anjiang model is input into the Muskingen model. The a priori flow sequence is obtained by solving the water balance equation and the storage tank equation obtained by approximation of the Saint-Venant equations.
[0044] S3. Collect the actual time-sharing flow of the watershed, preprocess the actual time-sharing flow, and obtain the measured flow sequence.
[0045] In this embodiment, the actual time-sharing flow rate is obtained through real-time monitoring using water level gauges and flow meters deployed in the upstream river channel. The data is then integrated into the database according to the model requirements. For any missing values during the data collection process, interpolation calculations are performed using the two nearest values, and the data format is converted to obtain the measured flow rate sequence.
[0046] S4. Using the residual value between the prior flow sequence and the measured flow sequence as the learning target of the long short-term memory neural network, output the residual flow sequence.
[0047] In this embodiment, the difference ΔQ between the prior flow sequence Q_phy and the measured flow sequence Q_obs is used as the learning target. A Long Short-Term Memory Neural Network (LSTM-EDE) with an encoder-decoder architecture is used to model the complex temporal pattern of this difference, outputting a residual flow sequence. Specifically, the network is configured as a two-layer LSTM structure with 128 to 256 hidden units per layer, and a Dropout rate of 0.1 to 0.3 is set to prevent overfitting.
[0048] S5. Based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters for predicting the flow of the basin in the future period. Based on the time-varying probability distribution parameters, a flow prediction interval that satisfies a preset confidence level is generated, specifically including S5.1-S5.2.
[0049] S5.1. Based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters for predicting the flow of the watershed in future periods, including: The prior flow sequence and the residual flow sequence are used as inputs to the hybrid density network, and the output of the hybrid density network is the output vector Y. f : ; In the formula, m is the preset number of Gaussian kernel functions. , , These are the initial output information for the weight, expectation, and variance of the i-th Gaussian component, respectively. The initial output information of the weights is normalized using the Softmax function to obtain the weights w of each Gaussian component. i : ; ; The initial output information of the variance is processed using an exponential function to obtain the variance σ of each Gaussian component. i : ; The initial output information of the expected value is directly used as the expected value μ of each Gaussian component. i ; Based on the weight w i The variance σ i and the expected value μ i Calculate the time-varying probability distribution parameter θ of the flow in the watershed for the predicted future period.
[0050] In this embodiment, by using the prior flow generated by the physical model and the residual sequence captured by the data-driven model as network inputs, the information foundations of both physical mechanisms and data patterns are effectively integrated. The weights, expected values, and variances of multiple Gaussian components are generated through a hybrid density network, providing flexible expressive capabilities for constructing complex time-varying probability distributions. The weights are normalized using the Softmax function to ensure that the sum of the weights of each component is 1, which conforms to the basic constraints of probability distribution. An exponential transformation is performed on the variance to ensure the non-negativity of the output variance and avoid the generation of invalid probability distributions. Based on these processed parameters, the time-varying probability distribution parameters are calculated, laying a solid mathematical foundation for generating reliable probability prediction intervals.
[0051] Furthermore, in this embodiment, to prevent problems such as density leakage, a standardization method is used to eliminate the influence of various characteristic quantities. Specifically, the prior flow sequence and the residual flow sequence are standardized respectively: ; In the formula, and These are the unstandardized and standardized variables, respectively. and These are the expected value and variance of the variable, respectively.
[0052] S5.2. Generate a flow prediction interval that satisfies a preset confidence level based on the time-varying probability distribution parameters, including: Construct a conditional probability density function based on the time-varying probability distribution parameters. : ; In the formula, X is the input to the hybrid density network, Y is the target variable, and θ is the time-varying probability distribution parameter. Let i be the i-th Gaussian kernel function, and its expression is: ; The expected value of the conditional probability density function is calculated, and the expected value is used as a deterministic forecast value. Based on the deterministic forecast value, a flow prediction interval that meets the preset confidence level is generated.
[0053] In this embodiment, a conditional probability density function for future flow is constructed based on time-varying probability distribution parameters generated by a hybrid density network. Since the network parameters dynamically change with each input, this density function is a time-varying conditional distribution, which can flexibly characterize the possible multimodal uncertainties of future flow, achieving a complete mathematical description of forecast uncertainty. The expected value of this conditional probability density function is calculated as a deterministic forecast value. This expected value is statistically optimal, taking into account the practical application needs of point prediction. Simultaneously, a prediction interval with a pre-set confidence value (e.g., 95%) is generated based on the conditional probability distribution, transforming the prediction results into quantitative boundary information that can be directly used for risk assessment and flood control scheduling, thus quantifying prediction uncertainty.
[0054] Furthermore, in this embodiment, the training process of the hybrid density network (MDN) employs the maximum likelihood estimation principle for supervised learning. Its loss function adjusts the hyperparameters by quantifying the probability density of the target variable in the network's output conditional distribution function. The loss function is: The Adam algorithm, an adaptive moment estimation algorithm, is used to maximize the probability density of the target variable in the log-likelihood function. In the backpropagation algorithm, this algorithm always optimizes the neural network hyperparameters in the direction that reduces the loss function the fastest. Through multiple iterations of optimization, the loss function converges and the model performance stabilizes, finally obtaining a fully trained hybrid density network that can reliably output the time-varying probability distribution parameters of future traffic based on the input.
[0055] Therefore, in this embodiment, a physics-AI hybrid architecture is constructed to effectively integrate the advantages of traditional hydrological models and data-driven models. Specifically, the Xin'anjiang physical model is used as the basic framework to ensure the interpretability and physical rationality of the prediction results. By introducing an LSTM-EDE network to dynamically learn and correct the simulation residuals of the physical model, the accuracy of time-series forecasts is significantly improved. Furthermore, a hybrid density network (MDN) is used to model the time-varying probability density of the fused information, realizing the transformation from deterministic point prediction to complete probability distribution output. In model training, a physical consistency loss term is introduced to ensure the consistency between AI output and physical laws. Although TCN-EDE can replace LSTM, VAE / NormalizingFlow can replace MDN, or a Transformer structure can be introduced to achieve probabilistic modeling, the architecture selected in this embodiment is more advantageous considering factors such as computational efficiency, adaptability to small watershed data, and avoidance of overfitting. This method not only provides high-precision deterministic forecast values but also generates prediction intervals at preset confidence levels, providing direct and reliable quantitative basis for reservoir scheduling and flood risk decision-making.
[0056] According to another aspect of the invention, Figure 3This is a schematic diagram illustrating a multi-model-based watershed flow prediction terminal according to an embodiment of the present invention. It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the multi-model-based watershed flow prediction method described above.
[0057] According to another aspect of the present invention, a computer storage medium is provided. The computer storage medium stores a computer program that is executed by a processor to implement the various steps of a multi-model-based watershed flow prediction method as described above.
[0058] In summary, this invention provides a multi-model-based watershed flow prediction method, terminal, and storage medium. By integrating and preprocessing multi-source hydrological data, it ensures the quality and consistency of the model input data. Utilizing the Xin'anjiang model and the Muskingen model to output prior flow sequences ensures the interpretability of the prediction results and consistency with hydrological patterns. By acquiring measured flow sequences and learning the residuals between the prior and measured flow sequences using a long short-term memory neural network, it effectively captures nonlinear and temporal errors caused by extreme weather or human activities, improving forecast accuracy. Furthermore, by introducing a hybrid density network, it generates time-varying probability distribution parameters for predicting future watershed flow based on the prior and residual flow sequences, thereby generating flow prediction intervals that meet pre-set confidence levels. This quantifies the uncertainty of watershed flow prediction and provides a direct and reliable basis for risk assessment and refined decision-making in flood control scheduling.
[0059] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A multi-model-based watershed discharge prediction method, characterized in that, Including the following steps: Hydrological data from various monitoring points in the upper reaches of the basin are acquired, and the hydrological data from each monitoring point are integrated to obtain the basin hydrological data. The basin hydrological data is then preprocessed. The pre-processed watershed hydrological data is input into the Xin'anjiang model to obtain the runoff sequence, and the runoff sequence is input into the Muskingen model to output the prior flow sequence. The actual time-sharing flow of the watershed is collected, and the actual time-sharing flow is preprocessed to obtain the measured flow sequence; The residual value between the prior flow sequence and the measured flow sequence is used as the learning target of the long short-term memory neural network, and the residual flow sequence is output. Based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters for predicting the flow of the basin in the future period. Based on the time-varying probability distribution parameters, a flow prediction interval that satisfies a preset confidence level is generated.
2. The method for predicting watershed flow based on multiple models according to claim 1, characterized in that, Preprocessing of the watershed hydrological data includes: Statistical analysis was performed on the watershed hydrological data to identify the distribution characteristics of the watershed hydrological data; Based on the distribution characteristics, abnormal data in the watershed hydrological data are identified and removed. Based on the aforementioned distribution characteristics, interpolation is used to supplement the missing data in the watershed hydrological data; The format of the watershed hydrological data after anomaly removal and supplementation is converted.
3. The method for predicting watershed flow based on multiple models according to claim 1, characterized in that, The pre-processed watershed hydrological data was input into the Xin'anjiang model to obtain the runoff generation sequence, including: The watershed hydrological data includes rainfall, evapotranspiration, cross-sectional flow, and watershed water storage capacity; According to the preset time period, the runoff generation status of the watershed is determined time by time period based on the water volume relationship between rainfall, evapotranspiration, cross-sectional flow and watershed storage capacity; Based on the aforementioned production flow status, a corresponding production flow calculation method is adopted to calculate the production flow rate for the corresponding time period; By summarizing the flow rates of all time periods in chronological order, a flow rate sequence is obtained.
4. The watershed discharge prediction method based on multiple models according to claim 3, characterized in that, The runoff generation status of the watershed is determined on a time-by-time basis based on the water volume relationship between rainfall, evapotranspiration, cross-sectional flow, and watershed storage capacity, including: Calculate the difference between rainfall and evapotranspiration in the current time period, and add the difference to the cross-sectional flow rate to obtain the total input water volume in the current time period; If the total input water volume is less than the water storage capacity of the basin, then the runoff generation state of the basin is determined to be local runoff generation; If the total input water volume is greater than or equal to the water storage capacity of the basin, then the runoff generation status of the basin is determined to be full basin runoff generation.
5. The watershed discharge prediction method based on multiple models according to claim 4, characterized in that, Based on the aforementioned runoff status, a corresponding runoff calculation method is adopted to calculate the runoff volume for the corresponding time period, including: When the runoff generation state of the watershed is localized, the runoff volume is calculated as follows: ; When the runoff generation status of the basin is basin-wide runoff generation, the runoff volume is calculated as follows: R = PE - (WM - W0); In the formula, R represents the runoff; P represents the rainfall; E represents the evapotranspiration; A represents the cross-sectional flow; WMM represents the watershed storage capacity; B represents the uneven distribution of water storage capacity in the watershed; WM represents the average tension water capacity of the watershed; and W0 represents the tension water storage of the watershed at the current moment.
6. The watershed discharge prediction method based on multiple models according to claim 1, characterized in that, Based on the prior flow sequence and the residual flow sequence, a hybrid density network is used to generate time-varying probability distribution parameters for predicting future flow in the watershed, including: The prior flow sequence and the residual flow sequence are used as inputs to the hybrid density network, and the output of the hybrid density network is the output vector Y. f : ; In the formula, m is the preset number of Gaussian kernel functions. , , These are the initial output information for the weight, expectation, and variance of the i-th Gaussian component, respectively. The initial output information of the weights is normalized using the Softmax function to obtain the weights w of each Gaussian component. i : ; ; The initial output information of the variance is processed using an exponential function to obtain the variance σ of each Gaussian component. i : ; The initial output information of the expected value is directly used as the expected value μ of each Gaussian component. i ; Based on the weight w i The variance σ i and the expected value μ i Calculate the time-varying probability distribution parameter θ of the flow in the watershed for the predicted future period.
7. The watershed discharge prediction method based on multiple models according to claim 6, characterized in that, Based on the time-varying probability distribution parameters, a flow prediction interval satisfying a preset confidence level is generated, including: Construct a conditional probability density function based on the time-varying probability distribution parameters. : ; In the formula, X is the input to the hybrid density network, Y is the target variable, and θ is the time-varying probability distribution parameter. Let i be the i-th Gaussian kernel function, and its expression is: ; The expected value of the conditional probability density function is calculated, and the expected value is used as a deterministic forecast value. Based on the deterministic forecast value, a flow prediction interval that meets the preset confidence level is generated.
8. The watershed discharge prediction method based on multiple models according to claim 7, characterized in that, The training process of the hybrid density network includes: A loss function is constructed using the maximum likelihood estimation method. Minimizing this loss function is the training objective. The parameters of the hybrid density network are iteratively optimized using an adaptive estimation algorithm until the network converges, resulting in a trained hybrid density network. The loss function is: .
9. A multi-model-based watershed flow prediction terminal, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements each step of the multi-model-based watershed flow prediction method according to any one of claims 1 to 8.
10. A computer storage medium storing a computer program, characterized in that, The computer program is executed by a processor to implement the various steps of the multi-model-based watershed flow prediction method according to any one of claims 1 to 8.