A method for runoff prediction using the XAJ-LSTM model based on Monte Carlo random sampling

By combining Monte Carlo random sampling and a Bayesian inference framework with an LSTM model, the problems of time-consuming parameter calibration of physical hydrological models in areas with scarce data and overfitting of data-driven models were solved, achieving high-precision and reliable runoff prediction and cross-basin application.

CN123068818APending Publication Date: 2026-11-10NANJING HYDRAULIC RES INST +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611065542.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing physical hydrological models have low accuracy and are time-consuming in parameter calibration in areas with limited data. Data-driven models are prone to overfitting and lack physical interpretability. Coupled models suffer from data leakage and have poor cross-basin applicability, failing to effectively address the reliability and efficiency issues of runoff prediction.

Method used

The Monte Carlo random sampling method is used to generate effective parameter combinations for the XAJ model. The LSTM model is combined for data normalization and feature extraction. A Bayesian inference framework is introduced to quantify uncertainty, and a transfer learning framework is constructed to achieve high-precision runoff prediction in areas with scarce data.

Benefits of technology

It improves the NSE coefficient of the model during the calibration and validation periods, reduces the computational resources and time costs of parameter calibration, enhances the stability and reliability of the model, provides high-precision runoff prediction and reliability assessment, and expands the application scenarios of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123068818A_ABST
    Figure CN123068818A_ABST
Patent Text Reader

Abstract

This invention discloses a runoff prediction method based on Monte Carlo random sampling using an XAJ-LSTM model. This method randomly selects n sets of XAJ model parameters using Monte Carlo random sampling. Based on the XAJ module, using the randomly selected n sets of XAJ parameters, n sets of simulated Xin'anjiang runoff Qxaj with XAJ physical characteristics are obtained. Runoff simulation is performed from a data-driven perspective using an LSTM module, employing precipitation data, evapotranspiration data, and Qxaj to train the model. After training, a simulated runoff Qsim that conforms to reality is obtained. This invention integrates physical laws into machine learning with a novel approach, generating highly accurate runoff simulation values ​​from precipitation, evapotranspiration, and runoff data. It avoids the resource consumption during XAJ module parameter calibration, effectively improving the efficiency and accuracy of runoff simulation and enhancing the understanding and knowledge of the fundamental laws of hydrophysical processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrological modeling technology, specifically to a runoff prediction method based on Monte Carlo random sampling using the XAJ-LSTM model. Background Technology

[0002] In recent years, hydrological models have become a core technology for runoff prediction. Based on their modeling principles, they can be divided into two main categories: process-driven physical hydrological models and data-driven machine learning models. Physical hydrological models, represented by the XAJ (Xin'anjiang) model, are based on the objective physical laws of the water cycle. They simulate the runoff formation process through modules such as evapotranspiration, runoff generation, and runoff confluence. The physical mechanisms of these models are clear and their stability is strong. They have shown good results in runoff simulation in humid and semi-humid watersheds. However, these models contain multiple empirical parameters that need to be calibrated. The parameter calibration process consumes a lot of computational resources and time. Moreover, in areas with scarce data, the accuracy of parameter calibration is low due to the lack of sufficient measured data, resulting in a significant decrease in prediction performance.

[0003] Data-driven models, represented by Long Short-Term Memory (LSTM) networks, are black-box models that do not require in-depth understanding of hydrological and physical processes. By mining the mapping relationship between meteorological inputs and runoff outputs in massive historical observation data, they can better characterize the nonlinear and non-steady-state characteristics of runoff. However, they are highly dependent on long-sequence, high-quality measured data, are prone to overfitting in data-sparse areas, lack physical interpretability, and have poor robustness in predicting extreme hydrological events.

[0004] To balance the interpretability of physical models with the nonlinear fitting capabilities of machine learning models, coupling physical models with data-driven models to construct hybrid models has become a research hotspot in the field of hydrological forecasting. Currently, the mainstream coupling approaches are divided into loose coupling and tight coupling. The core idea of ​​loose coupling is to first obtain a high-precision simulated runoff by calibrating parameters through the physical model, and then input the runoff result into the LSTM model for error correction. This method is simple to operate and can improve prediction accuracy to a certain extent. However, since the optimal simulated runoff from the physical model is directly input into the LSTM, it is prone to data leakage problems. The LSTM model does not truly learn the hydrological physical laws, but only performs simple error correction, resulting in poor model generalization ability. The core idea of ​​tight coupling is to directly incorporate physical modules such as runoff generation and confluence in the XAJ model into the neural network, and have them participate in runoff simulation as independent neural network layers. This allows the model to learn the rainfall-runoff relationship from the physical mechanism level, improving the interpretability of the model. However, this method requires the transformation of complex hydrological physical formulas into differential forms that can be computed by the neural network. It also requires custom neural network layers. The operation of integrating physical equations and network structure is extremely difficult and demands high professional skills from technical personnel, making it difficult to promote and apply in hydrological engineering practice.

[0005] Existing related patents, such as Chinese patent application number 202510277977.6, propose a method for remote sensing inversion flow correction in areas with insufficient data based on machine learning. This method only inputs the runoff simulated by the XAJ model into the LSTM model for optimization, without considering the impact of data leakage during the machine learning process, and without assessing the uncertainty of the model prediction results, so the reliability of the prediction results cannot be verified. At the same time, this method does not optimize the model parameters for the hydrological characteristics of different watersheds, and the model has poor cross-watershed universality.

[0006] In summary, there is an urgent need for a hydrological coupling model that can eliminate data leakage problems during the coupling of physical models and machine learning models, balance physical interpretability and engineering operability, adapt to different watershed characteristics, realize runoff prediction in areas with scarce data, and quantify the uncertainty of the results, so as to improve the accuracy, efficiency and reliability of runoff simulation. Summary of the Invention

[0007] Purpose of the invention: The purpose of this invention is to provide a runoff prediction method based on Monte Carlo random sampling using the XAJ-LSTM model, which can overcome the shortcomings of existing physical models and machine learning models in the coupling process, such as data leakage, high operational difficulty, time-consuming parameter calibration, poor versatility, and lack of uncertainty assessment.

[0008] Technical solution: The present invention provides a method for predicting runoff using an XAJ-LSTM model based on Monte Carlo random sampling, comprising:

[0009] S1. Data Collection: Collect observation sequences of hydrological and meteorological stations within the basin and geographic information data of the study area. The observation sequences of hydrological and meteorological stations within the basin include observation sequences of precipitation, evapotranspiration, and runoff observed by stations within the basin. Convert the precipitation and evapotranspiration observed by stations within the basin into areal average precipitation and areal average evapotranspiration.

[0010] S2. Monte Carlo random sampling: The Monte Carlo random sampling method is used to extract effective parameter combinations of the XAJ model from the pre-set range of values ​​of each parameter involved in the XAJ model, determine the number of samplings, and ensure that the runoff sequence can cover most of the runoff generation and confluence modes in the watershed.

[0011] S3. XAJ Model Construction: The effective parameter combination of the XAJ model obtained in step S2, and the areal average precipitation and areal average evapotranspiration obtained in step S1 are input into the pre-constructed XAJ model. The XAJ model includes an evapotranspiration calculation module, a runoff generation calculation module, and a runoff collection calculation module. The evapotranspiration calculation module is used to calculate the evapotranspiration and soil moisture content of different soil layers. The runoff generation calculation module calculates the total runoff based on the saturation runoff generation mechanism according to the evapotranspiration and soil moisture content of different soil layers, and divides the total runoff into three sources: surface runoff, soil runoff, and groundwater runoff. The runoff collection calculation module receives the runoff from the three sources divided by the runoff generation calculation module and obtains the simulated runoff sequence through runoff collection calculation.

[0012] S4. Data normalization: Normalize the areal average precipitation and areal average evapotranspiration obtained in step S1 and the simulated runoff sequence obtained in step S3 respectively; combine the areal average precipitation, areal average evapotranspiration and simulated runoff sequence to obtain the input feature set of the LSTM model.

[0013] S5. LSTM Model Simulation of Runoff: Construct an LSTM model and reconstruct time-series data from the input feature set of the LSTM model obtained in step S4 using the sliding window technique; input the reconstructed data into the LSTM model, optimize the model hyperparameter settings and training strategy, achieve deep capture of the nonlinear relationship between rainfall and runoff, and finally obtain the runoff prediction value through inverse normalization.

[0014] S6. Bayesian-based model uncertainty quantification: The uncertainty of the runoff prediction value obtained in step S5 is quantified by introducing a Bayesian inference framework, a runoff prediction interval with confidence level is constructed, and multiple uncertainty evaluation indicators are used to evaluate the quality of the runoff prediction interval.

[0015] S7. Application of Transfer Learning in Data-Scarce Areas: The study area in steps S1 to S6 is used as a data-rich source watershed, and the LSTM model trained in step S5 and verified by uncertainty quantification in step S6 is used as a pre-trained source model. The source model has learned and internalized the physical mechanism and nonlinear mapping relationship of rainfall-runoff generation through the data of the source watershed. A transfer learning framework is constructed to transfer the network structure and pre-trained weight parameters of the source model to the data-scarce target watershed. In the target watershed, hydrological and meteorological data are collected and processed in steps S2 to S4 to obtain the input feature set of the target watershed. The input feature set of the target watershed is input into the transferred model to output the runoff prediction value of the target watershed, thereby achieving high-precision runoff prediction in data-scarce areas.

[0016] Furthermore, the conversion of precipitation and evapotranspiration observed at stations within the basin into areal average precipitation and areal average evapotranspiration includes:

[0017] Based on the geospatial map of the study area and the latitude and longitude coordinates of n meteorological stations within the study area, the study area is divided into n Thiessen polygons;

[0018] Calculate the area of ​​each Thiessen polygon. Let Si be the area of ​​the Thiessen polygon containing the i-th station, and S be the area of ​​the watershed. Then, calculate the weight of the i-th station. .

[0019] Average precipitation in the study area Average evaporation of dough The calculation formula is: , .

[0020] Furthermore, the evaporation calculation module employs a three-layer evaporation calculation mode, wherein the upper layer evaporation is... The evaporation rate of the middle layer is The evaporation rate of the lower layer is The moisture content of the upper soil layer is The water content of the middle soil layer is ;

[0021] when hour, , , ;

[0022] when hour, ,like ,but , ;like ,but , ;

[0023] in, This refers to precipitation. Evaporation capacity of the basin; This represents the deep evaporation coefficient.

[0024] Furthermore, the runoff calculation module comprises three parts: preprocessing, runoff calculation, and three-source water division, as detailed below:

[0025] Preprocessing: ; ;

[0026] in, For impermeable areas to generate flow; The impermeable area coefficient; Effective precipitation after deducting evapotranspiration; Net effective precipitation; This is an intermediate variable in the water storage capacity curve; This represents the maximum water storage capacity at a single point in the basin. This represents the current average soil water storage capacity of the basin. The average water storage capacity of the basin; The index of the water storage capacity distribution curve;

[0027] Production flow calculation: If ,

[0028] ;

[0029] like ,

[0030] ;

[0031] Three water sources division: total production flow Classified proportionally as surface runoff underground runoff , soil in the stream :

[0032] .

[0033] Furthermore, the runoff calculation module uses the recession coefficient to calculate the runoff process of the three water sources, and combines it with the lag time to obtain the simulated runoff. The runoff calculation module includes three parts: runoff initialization, time-period runoff update, and lag runoff correction, as detailed below:

[0034] Sink flow initialization:

[0035] ;

[0036] in, This is the area conversion factor; This represents the initial surface runoff depth. The measured flow rate at the initial moment; , , These represent the initial runoff volumes of surface water, soil water, and groundwater, respectively.

[0037] Time-based traffic updates:

[0038] ;

[0039] in, , , They are respectively Surface, soil, and groundwater runoff over a given period; , They are respectively Surface, soil, and groundwater runoff during a given period; , , They are respectively The depth of surface, soil, and groundwater flow during different time periods; , , These are the drainage coefficients for surface water, soil water, and groundwater, respectively.

[0040] Lag Convergence Correction: If Then simulated runoff sequence ;

[0041] like Then simulated runoff sequence ;

[0042] in, The time lag is the time delay. The coefficient of water discharge from the river network; for Simulated total runoff over a given time period;

[0043] Run the XAJ model to generate multiple sets of simulated runoff sequences with XAJ physical characteristics. Determine the number of stable sampling times to ensure that the runoff sequence can cover most of the runoff generation and confluence modes in the watershed.

[0044] Furthermore, the LSTM model comprises two LSTM layers, one Dropout layer, and one fully connected layer. The LSTM layers set the number of hidden layer units, and the hidden layers include input gates, output gates, and forget gates. The Dropout layer is located after the LSTM layers. The fully connected layer maps the multidimensional abstract temporal features output by the LSTM layers to 1-dimensional predicted values ​​through linear transformation.

[0045] Furthermore, the process of obtaining the runoff prediction value through inverse normalization includes:

[0046] The input feature set from the validation period is input into the trained LSTM model to obtain the normalized value of the runoff prediction, which is then converted back to the runoff prediction value using the inverse normalization formula. The inverse normalization formula is:

[0047] ;

[0048] In the formula, and These represent the maximum and minimum values ​​of the measured runoff in the rate-period series.

[0049] Furthermore, the introduction of a Bayesian inference framework to quantify the uncertainty of the runoff prediction values ​​obtained in step S5 includes:

[0050] Assuming the actual runoff is based on the runoff forecast obtained in step S5 The mean is expressed as the standard deviation. Given that the distribution range follows a normal distribution, and considering the non-negativity of the error standard deviation, a semi-normal distribution is chosen as the distribution. The prior distribution is determined; sampling is performed using the NUTS algorithm of Markov Chain Monte Carlo (MCMC), with two independent Markov chains running in parallel. After each Markov chain converges, several valid samples are extracted to construct the standard deviation. The posterior probability density histogram.

[0051] Furthermore, the construction of the runoff prediction interval at the confidence level includes:

[0052] Based on the obtained posterior error standard deviation For each runoff prediction point during the validation period, a prediction interval with a confidence level is constructed, and the prediction interval range is:

[0053] .

[0054] Furthermore, the method of evaluating the quality of runoff prediction intervals using multiple uncertainty evaluation indicators includes:

[0055] Three core indicators—interval coverage rate (CR), average bandwidth (B), and consecutive ranking probability score (CRPS)—are selected to evaluate the reliability, compactness, and overall accuracy of the prediction interval. The calculation formulas for each indicator are as follows:

[0056] ;

[0057] ;

[0058] ;

[0059] In the formula, This refers to the sequence number of the predicted time period; This represents the total number of forecast periods; For the first Measured runoff for each time period; For the first Simulated runoff for each time period; It is a Boolean indicator function; For the first The probability score of consecutive rankings over a period of time; The cumulative distribution function of the standard normal distribution; It is the probability density function of the standard normal distribution.

[0060] Beneficial effects: Compared with the prior art, the significant technical effects of the present invention are as follows:

[0061] (1) By combining the physical constraints of the XAJ model and the nonlinear fitting ability of the LSTM model, the NSE coefficient of the model during the calibration and validation periods is significantly higher than that of the single XAJ model and the single LSTM model. At the same time, the introduction of optimization methods such as Dropout layer, early stopping strategy and learning rate scheduling effectively alleviates the overfitting problem of the model and improves the stability of long-term runoff prediction.

[0062] (2) A deterministic evaluation system was constructed to comprehensively evaluate the model's prediction accuracy. At the same time, a Bayesian inference framework was introduced to construct a prediction interval with a 95% confidence level, thereby achieving a reliability assessment of the prediction results. This upgrades the prediction from "single-point prediction" to "probabilistic forecasting," providing a more scientific reference for flood control scheduling and water resource management.

[0063] (3) A transfer learning framework was constructed to transfer the universal runoff generation and confluence patterns of data-rich watersheds to data-scarce watersheds. Only a small amount of measured data from the target watershed is needed to obtain relatively accurate simulated runoff, breaking through the dependence of traditional models on long-sequence measured data and expanding the application scenarios of the model.

[0064] (4) By replacing a large amount of parameter calibration work of the XAJ model with Monte Carlo random sampling, the computational resources and time costs of parameter calibration are greatly saved; at the same time, the transfer learning framework does not require retraining the model, which reduces the difficulty and cost of model training in areas with scarce data. Attached Figure Description

[0065] Figure 1 This is a schematic diagram of the process of the present invention;

[0066] Figure 2 Optimal Monte Carlo sampling number chart;

[0067] Figure 3 The runoff simulation curves of the MCXAJ-LSTM model in the Heishiguan watershed;

[0068] Figure 4 The runoff simulation curves of the XAJ model in the Heishiguan watershed;

[0069] Figure 5 The runoff simulation curves of the LSTM model in the Heishiguan watershed;

[0070] Figure 6 A comparison chart of uncertainty evaluation indicators for various models in the Heishiguan watershed;

[0071] Figure 7 This is a schematic diagram illustrating the performance of the Heishiguan watershed in transfer learning. Detailed Implementation

[0072] The technical solution of the present invention will now be described in detail with reference to specific embodiments and accompanying drawings.

[0073] In this embodiment, the calculations are based on the precipitation, measured evapotranspiration, and runoff data of the Heishiguan watershed in the Sanhua section of the Yellow River Basin from 1980 to 2019. In practice, the parameters of the LSTM module were optimized and adjusted during the calibration period from 1980 to 1999, and the model's effectiveness was verified during the validation period from 2000 to 2019.

[0074] like Figure 1 As shown, the present invention provides a method for predicting runoff using an XAJ-LSTM model based on Monte Carlo random sampling, comprising the following steps:

[0075] S1. Data Collection: Collect observation sequences of hydrological and meteorological stations within the basin and geographic information data of the study area. The observation sequences of hydrological and meteorological stations within the basin include the observation sequences of precipitation, evapotranspiration and runoff observed by the stations within the basin. Convert the precipitation and evapotranspiration observed by the stations within the basin into areal average precipitation and areal average evapotranspiration.

[0076] In step S1, the precipitation and evapotranspiration observed at stations within the watershed are converted into areal average precipitation and areal average evapotranspiration, as detailed below:

[0077] (1) Based on the geospatial map of the study area and the latitude and longitude coordinates of n meteorological stations in the study area, the study area is divided into n Thiessen polygons.

[0078] (2) Calculate the area of ​​each Thiessen polygon. Let Si be the area of ​​the Thiessen polygon containing the i-th station, and S be the area of ​​the watershed. Then the weight of the i-th station is... .

[0079] (3) Average precipitation in the study area Average evaporation of dough The calculation formula is: , .

[0080] Table 1 shows the partial data of areal average precipitation, areal average evapotranspiration, and runoff at the basin outlet in the Heishiguan watershed after the transformation and input into the model.

[0081] Table 1

[0082]

[0083] S2. Monte Carlo random sampling: The Monte Carlo random sampling method is used to extract effective parameter combinations of the XAJ model from the pre-set value range of each parameter involved in the XAJ model, determine the number of samplings, and ensure that the runoff sequence can cover most of the runoff generation and confluence modes in the watershed.

[0084] The specific implementation process of step S2 is as follows:

[0085] S2.1 Assume that the 16 XAJ parameters in Table 2 all follow a uniform distribution within their value range, and generate the initial parameter set through independent pseudo-random sampling.

[0086] S2.2. The sampling number gradient was set to 50, 100, 150, 200, 250, 300, 350, 400, 450, and 500 times at 50-times intervals. Using Nash efficiency coefficient (NSE) and root mean square error (RMSE) as evaluation indicators, five independent repeated simulation experiments were conducted in the study watershed. The evolution trend of model performance with the number of samplings during the calibration and validation periods was analyzed. The calibration and validation periods were divided into the first and second halves of the sequence. Experimental results show that the model performs better during the calibration and validation periods when the number of samplings is 150.

[0087] S2.3 Input the 150 randomly selected effective parameter combinations into the XAJ physics module, and run the module to obtain 150 simulated runoff sequences with XAJ physics characteristics.

[0088] Sampling results as follows Figure 2 As shown, when the number of samplings is less than 150, there is still room for improvement in the model's accuracy; however, when the number of samplings is more than 150, the model risks overfitting and wastes computational resources. A sampling count of 150 demonstrates better robustness and stability while maintaining accuracy. Therefore, in future research, 150 samplings will be consistently used as the random sampling count for the MCXAJ-LSTM model.

[0089] Table 2. Parameters and their ranges in the XAJ model.

[0090]

[0091] S3. XAJ Model Construction: The effective parameter combinations of the 150 sets of XAJ models obtained in step S2, as well as the areal average precipitation and areal average evapotranspiration obtained in step S1, are input into the pre-constructed XAJ model. The XAJ model includes an evapotranspiration calculation module, a runoff generation calculation module, and a runoff collection calculation module. The evapotranspiration calculation module calculates the evapotranspiration and soil moisture content of different soil layers. The runoff generation calculation module calculates the total runoff based on the "saturated runoff generation" mechanism according to the evapotranspiration and soil moisture content of different soil layers, and divides the total runoff into three sources: surface runoff, subsurface runoff, and groundwater runoff. The runoff collection calculation module receives the runoff from the three sources divided by the runoff generation calculation module and obtains the simulated runoff sequence through runoff collection calculation. The meanings and value ranges of the main parameters involved are shown in Table 2. The calculation process of each module is as follows:

[0092] S3.1 Evapotranspiration Calculation Module: Employs a three-layer evapotranspiration model to calculate evapotranspiration, where the upper layer evapotranspiration is... The evaporation rate of the middle layer is The evaporation rate of the lower layer is The moisture content of the upper soil layer is The water content of the middle soil layer is ;

[0093] when hour, , , ;

[0094] when hour, ,like ,but , ;like ,but , .

[0095] in, This refers to precipitation. Evaporation capacity of the basin; This represents the deep evaporation coefficient.

[0096] S3.2, Runoff Calculation Module: Based on the "full runoff" principle, this module calculates the total runoff and divides it into three sources: surface runoff, subsurface runoff, and groundwater runoff. It mainly includes three parts: pretreatment, runoff calculation, and the division of the three water sources, as detailed below:

[0097] S3.2.1 Preprocessing: ; ; ;

[0098] in, For impermeable areas to generate flow; The impermeable area coefficient; Effective precipitation after deducting evapotranspiration; Net effective precipitation; This is an intermediate variable in the water storage capacity curve; This represents the maximum water storage capacity at a single point in the basin. This represents the current average soil water storage capacity of the basin. The average water storage capacity of the basin; The index of the water storage capacity distribution curve;

[0099] S3.2.2, Production flow calculation: If ,

[0100] ;

[0101] like ,

[0102] ;

[0103] S3.2.3, Division of Three Water Sources: The total production flow... Classified proportionally as surface runoff underground runoff , soil in the stream :

[0104] .

[0105] S3.3, Runoff Calculation Module: This module uses the recession coefficient to calculate the runoff process from three water sources and combines it with the lag time to obtain the simulated runoff volume. The runoff calculation module consists of three parts: runoff volume initialization, time-period runoff volume update, and lag runoff correction, as detailed below:

[0106] S3.3.1, Initialization of sink flow:

[0107]

[0108] in, This is the area conversion factor; This represents the initial surface runoff depth. The measured flow rate at the initial moment; , , These represent the initial runoff volumes of surface water, soil water, and groundwater, respectively.

[0109] S3.3.2, Time-based sink flow update:

[0110] ;

[0111] in, , , They are respectively Surface, soil, and groundwater runoff over a given period; , They are respectively Surface, soil, and groundwater runoff during a given period; , , They are respectively The depth of surface, soil, and groundwater flow during different time periods; , , These are the drainage coefficients for surface water, soil water, and groundwater, respectively.

[0112] S3.3.3, Lag Convergence Correction: If Then simulated runoff sequence ;

[0113] like Then simulated runoff sequence ;

[0114] in, This is the current calculation period; The time lag is the time delay. The coefficient of water discharge from the river network; for Simulated total runoff over a given time period;

[0115] Run the XAJ model to generate multiple sets of simulated runoff sequences with XAJ physical characteristics. Determine the number of stable sampling times to ensure that the runoff sequence can cover most of the runoff generation and confluence modes in the watershed.

[0116] It should be noted that "number of stable samplings" is a parameter. The number of stable samplings means how many sets of simulated runoff sequences with physical characteristics are generated.

[0117] S4. Data normalization: Normalize the areal average precipitation and areal average evapotranspiration obtained in step S1 and the simulated runoff sequence obtained in step S3 respectively; combine the areal average precipitation, areal average evapotranspiration and simulated runoff sequence to obtain the input feature set of the LSTM model.

[0118] The specific implementation process of step S4 is as follows:

[0119] The data input to the LSTM model includes areal average precipitation, areal average precipitation data, and 150 simulated runoff sequences. The data is normalized using the Min-Max normalization method, specifically as follows:

[0120] S4.1, Min-Max Normalization Formula

[0121]

[0122] In the formula, The normalized data value, with a range of (0,1); This is the original data; and These are the minimum and maximum values ​​of the variable in the rate-period sequence, respectively.

[0123] S4.2 Data Combination: The normalized watershed average rainfall sequence, watershed average evapotranspiration sequence, and 150 sets of simulated runoff sequences are combined to obtain the input feature set of the LSTM model, with a feature dimension of 152.

[0124] S5. LSTM Model Simulation of Runoff: Construct an LSTM model and reconstruct time-series data from the input feature set of the LSTM model obtained in step S4 using the sliding window technique; input the reconstructed data into the LSTM model, optimize the model hyperparameter settings and training strategy, achieve deep capture of the nonlinear relationship between rainfall and runoff, and finally obtain the runoff prediction value through inverse normalization.

[0125] The specific implementation process of step S5 is as follows:

[0126] The S5.1 LSTM model consists of two LSTM layers, one Dropout layer, and one fully connected layer. The LSTM layers have 256 hidden units and include input, output, and forget gates. The Dropout layer follows the LSTM layers and has a Dropout value of 0.2, randomly disabling 20% ​​of neurons during training to reduce the risk of overfitting. The fully connected layer abstracts the 256-dimensional temporal features from the LSTM layer output and maps them to 1-dimensional predicted values ​​through linear transformation. Finally, inverse normalization is used to obtain the runoff prediction value. .

[0127] S5.2 Application of sliding window technology: The sliding window technology is used to slice and reconstruct the normalized one-dimensional time series data. The window size (Delay) is set to 30 days, that is, the runoff on the 31st day is predicted by using the input features of the first 30 days. The reconstructed sample is a standard three-dimensional tensor, which is used as the direct input of the LSTM model.

[0128] S5.3 Model Training Strategy: The coupling framework described above, which uses Monte Carlo random sampling to generate XAJ physical simulation runoff covering different runoff generation and confluence modes as input to the LSTM model, constitutes the MCXAJ-LSTM model. The optimizer for the MCXAJ-LSTM model is Adam, with an initial learning rate of 0.005. Using the StepLR learning rate scheduler, the learning rate is halved every 100 training epochs. This allows the model to quickly capture the core patterns between data using a larger learning rate in the early stages of training, and then adjust parameters using a smaller learning rate in the later stages to avoid overfitting. A calibration period and a validation period are defined for the study watershed. Before model training, the constructed samples are divided into calibration period training samples and validation period test samples according to time series. The LSTM module is trained using the runoff series observed at the watershed outlet hydrological station as the standard value and maximizing the NSE coefficient as the objective function.

[0129] S5.4. Obtain runoff prediction values ​​through inverse normalization, including:

[0130] The input feature set from the validation period is input into the trained LSTM model to obtain the normalized value of the runoff prediction. Then, the runoff prediction value with actual physical meaning is restored by the inverse normalization formula. The inverse normalization formula is:

[0131] ;

[0132] In the formula, and These represent the maximum and minimum values ​​of the measured runoff in the rate-period series.

[0133] Using the runoff sequence observed at the hydrological and meteorological station at the basin outlet (Table 1) as the standard value, the period from 1980 to 1999 was selected as the model calibration period. The NSE coefficient was used as the objective function, with the goal of maximizing the NSE coefficient. The basin's average precipitation and average evapotranspiration (Table 1), along with XAJ simulated runoff obtained from 150 sets of random parameters, were input for training the calibration period. The period from 2000 to 2019 was selected as the model validation period to verify the model's accuracy. The calculation results for some of the calibration and validation periods are shown in Table 3.

[0134] Table 3

[0135]

[0136] The NSE coefficient is used as an evaluation metric to assess the model's performance during the calibration and validation periods. The specific formula for calculating the NSE coefficient is as follows:

[0137]

[0138] In the formula, This represents the simulated runoff during time period i. Indicates the runoff observed during time period i. This represents the mean of the observed runoff, and n is the sequence length.

[0139] The NSE coefficient results for the periodic and validation periods are shown in Table 4 below. Figure 3-5 The runoff curves for the three models are shown:

[0140] Table 4

[0141]

[0142] Table 4 shows the accuracy comparison between the present invention and the original XAJ and LSTM models during the calibration and validation periods. As can be seen from the table, the NSE coefficient of the present invention is higher than 0.60 during both the calibration and validation periods. Compared with the XAJ and LSTM models, the NSE during the calibration period is improved by 24.64% and 36.51%, respectively, and the NSE during the validation period is improved by 15.15% and 33.33%, respectively. This indicates that the model of the present invention can be better used for watershed runoff simulation and forecasting compared with traditional physical models and traditional deep learning models.

[0143] S6. Bayesian Model Uncertainty Quantification: To assess the reliability of runoff prediction results, a Bayesian inference framework is introduced to quantify the uncertainty of the runoff prediction values ​​obtained in step S5, constructing a runoff prediction interval with a 95% confidence level. Three uncertainty evaluation indicators are used to evaluate the quality of the runoff prediction interval, providing a probabilistic reference for flood control scheduling and water resource management.

[0144] The specific implementation process of step S6 is as follows:

[0145] S6.1 Introducing a Bayesian inference framework to quantify the uncertainty of runoff predictions, as detailed below:

[0146] Assuming the actual runoff is based on the runoff forecast obtained in step S5 The mean is expressed as a certain standard deviation. Given that the distribution range follows a normal distribution, and considering the non-negativity of the error standard deviation, a semi-normal distribution is chosen as the distribution. The prior distribution is determined; sampling is performed using the NUTS algorithm of Markov Chain Monte Carlo (MCMC), with two independent Markov chains running in parallel. After each Markov chain converges, 2000 valid samples are extracted to construct the standard deviation. The posterior probability density histogram.

[0147] S6.2 Construct a runoff prediction interval with a 95% confidence level, as follows:

[0148] Based on the obtained posterior error standard deviation For each runoff prediction point during the validation period, a prediction interval with a 95% confidence level is constructed, and the prediction interval range is:

[0149] .

[0150] S6.3. Multiple uncertainty evaluation indicators are used to assess the quality of runoff prediction intervals, as follows:

[0151] Three core indicators—interval coverage rate (CR), average bandwidth (B), and consecutive ranking probability score (CRPS)—are selected to evaluate the reliability, compactness, and overall accuracy of the prediction interval. The calculation formulas for each indicator are as follows:

[0152] ;

[0153] ;

[0154] ;

[0155] In the formula, This refers to the sequence number of the predicted time period; This represents the total number of forecast periods; For the first Measured runoff for each time period; For the first Simulated runoff for each time period; If it is a Boolean indicator function, if When it falls within the corresponding 95% prediction interval, its value is 1; if it falls within the interval, its value is 0. For the first The probability score of consecutive rankings over a period of time; The cumulative distribution function of the standard normal distribution; is the probability density function of the standard normal distribution;

[0156] Using a Bayesian inference framework, the uncertainty of the prediction results during the validation period of each model was quantified, and prediction intervals with a 95% confidence level were constructed. The quality of the prediction intervals was evaluated using three indicators: CR, B, and CRPS. The results are shown in Table 5. Figure 6 As shown, Figure 6 Figure (a) in the figure is a schematic diagram of the average bandwidth of each model. Figure 6 Figure (b) shows the interval coverage of each model. Figure 6 Figure (c) in the diagram illustrates the continuous ranking probability scores for each model:

[0157] Table 5

[0158]

[0159] As shown in Table 5, the MC-XAJ-LSTM model of this invention achieves the minimum average bandwidth B and CRPS while maintaining high reliability of CR≥90%. Compared with the single XAJ model, B is reduced by 40.47% and CRPS by 29.29%; compared with the single LSTM model, B is reduced by 37.91% and CRPS by 32.23%. This indicates that the model of this invention can effectively reduce prediction uncertainty and provide a more compact and reliable probability prediction interval.

[0160] S7. Application of Transfer Learning in Data-Scarce Areas: The study area covered in steps S1 to S6 is used as a data-rich source watershed, and the LSTM model trained in step S5 and verified by uncertainty quantification in step S6 is used as a pre-trained source model. The source model has learned and internalized the physical mechanism and nonlinear mapping relationship of rainfall-runoff generation through the data of the source watershed. A transfer learning framework is constructed to transfer the network structure and pre-trained weight parameters of the source model to the data-scarce target watershed. In the target watershed, hydrological and meteorological data are collected and processed in steps S2 to S4 to obtain the input feature set of the target watershed. The input feature set of the target watershed is input into the transferred model to output the runoff prediction value of the target watershed, thereby achieving high-precision runoff prediction in data-scarce areas.

[0161] The specific implementation process of step S7 is as follows:

[0162] S7.1 Source Basin Model Training: Using a data-rich basin as the source basin, the MC-XAJ-LSTM model is trained using the hydrological and meteorological data of the source basin through steps S1-S5 of this invention. This constructs an MC-XAJ-LSTM model that can capture complex hydrological patterns and learns the universal nonlinear laws of runoff generation and confluence within the region, thus obtaining the source model.

[0163] S7.2 Target watershed model validation: The model is validated using data from the target watershed, and the NSE coefficient is used to test the model's accuracy.

[0164] Four river basins along the Yellow River—Heishiguan, Baimasi, Wulongkou, and Wuzhi—were selected for a transfer learning experiment. Heishiguan was used as the target basin with insufficient data, while the other three basins served as source basins. The source model was trained using data from Heishiguan for validation. The validation results are as follows: Figure 7 As shown, Figure 7 Figure (a) shows the simulated runoff effect in the Heishiguan watershed. Figure 7 Figure (b) shows the runoff scatter plot of the Heishiguan watershed. The NSE is 0.7. Although the effect is not as good as the locally deployed MC-XAJ-LSTM model, the NSE is still greater than 0.6, indicating that the model can effectively solve the runoff prediction problem in areas with insufficient data.

[0165] This invention uses Monte Carlo random sampling to randomly extract XAJ model parameters to obtain simulated runoff. The simulated runoff has a weak relationship with the actual runoff value but has the physical laws of the XAJ model. The LSTM model can use such simulated runoff for runoff prediction to eliminate the influence of data leakage, and at the same time, it can learn the physical laws in the data, thereby improving the accuracy of runoff simulation.

[0166] Specifically, the XAJ model has 16 commonly used parameters. By consulting the value ranges of commonly used parameters in the watershed, the sample range for random sampling is defined. For parameters with special requirements, the priority of parameter settings is set to ensure that the selected set of parameters conforms to the hydrological process. 150 sets of parameters are extracted and used to run the XAJ model, resulting in 150 sets of simulated runoff. Under this random parameter sampling, the simulated runoff obtained by the XAJ model differs significantly from that obtained using calibrated parameters, but 150 sets of randomly sampled parameters can cover most runoff generation and confluence modes. The LSTM model uses these 150 sets of simulated runoff to perform 500 simulations. The NSE coefficient is used to evaluate the effectiveness of the simulated runoff. The simulation with the best NSE coefficient is selected, and the model settings and simulated runoff values ​​are saved.

[0167] This invention couples the XAJ model with the LSTM model to construct the MC-XAJ-LSTM model. Based on the Monte Carlo random sampling method, it generates multiple possible runoff sequences to simulate the uncertainty of runoff. At the same time, it utilizes the powerful nonlinear fitting capability of the LSTM model to learn the optimal nonlinear relationship from a large amount of data. Compared with a single LSTM model or XAJ model, it has a higher NSE coefficient and can better improve the accuracy of runoff simulation.

[0168] This invention is applicable to long-term runoff forecasting in the Yellow River Basin. It can also solve the problem of runoff forecasting in areas with insufficient data, and can perform quantitative assessment of the uncertainty of the forecast results, providing high-precision and high-reliability runoff data support for water resource management, reservoir scheduling, and flood control and disaster reduction.

[0169] This embodiment takes the Heishiguan watershed in the Sanhuajian area of ​​the Yellow River Basin as the research object to verify the effectiveness of the MC-XAJ-LSTM model runoff prediction method of this invention: the deterministic prediction accuracy of the model during the calibration and validation periods is significantly higher than that of the single XAJ model and the single LSTM model; in terms of uncertainty quantification, it can provide a more compact and reliable prediction interval while maintaining high interval coverage; in terms of transfer learning, it can transfer the runoff generation and confluence patterns of data-rich watersheds to data-deficient watersheds, realizing high-precision runoff prediction in data-scarce areas. The technical solution of this invention has the advantages of high accuracy, high reliability, high versatility, and ease of operation, and fully meets the actual needs of runoff forecasting in hydrological engineering.

[0170] This invention uses Monte Carlo random sampling to randomly select n sets of XAJ model parameters. Based on the XAJ module, using the randomly selected n sets of XAJ parameters, n sets of simulated Xin'anjiang runoff Qxaj with XAJ physical characteristics are obtained. Runoff simulation is performed from a data-driven perspective using an LSTM module, using precipitation data, evapotranspiration data, and Qxaj to train the model. After training, a simulated runoff Qsim that conforms to reality is obtained. This invention integrates physical laws into machine learning with a novel approach, generating highly accurate runoff simulation values ​​from precipitation, evapotranspiration, and runoff data. It avoids the resource consumption during parameter calibration of the XAJ module, effectively improving the efficiency and accuracy of runoff simulation and enhancing the understanding and knowledge of the fundamental laws of hydrophysical processes.

[0171] This invention is based on the XAJ-LSTM coupled model and generates runoff sequences with XAJ physical characteristics through Monte Carlo random sampling, eliminating data leakage at its source. Simultaneously, it refines the computational process of each module of the model, clarifies parameter values ​​and constraints, and optimizes the training strategy of the machine learning model, balancing physical interpretability and engineering feasibility. Furthermore, this invention constructs a multi-dimensional model evaluation system, a Bayesian uncertainty quantification framework, and a transfer learning method for data-scarce areas, achieving high-precision runoff prediction, reliability assessment, and cross-basin extension, thus addressing several pain points of existing technologies.

Claims

1. A method for predicting runoff using an XAJ-LSTM model based on Monte Carlo random sampling, characterized in that, include: S1. Data Collection: Collect observation sequences of hydrological and meteorological stations within the basin and geographic information data of the study area. The observation sequences of hydrological and meteorological stations within the basin include the observation sequences of precipitation, evapotranspiration, and runoff observed by the stations within the basin. Convert the precipitation and evapotranspiration observed by the stations within the basin into areal average precipitation and areal average evapotranspiration. S2. Monte Carlo random sampling: The Monte Carlo random sampling method is used to extract effective parameter combinations of the XAJ model from the pre-set range of values ​​of each parameter involved in the XAJ model, determine the number of samplings, and ensure that the runoff sequence can cover most of the runoff generation and confluence modes in the watershed. S3. XAJ Model Construction: The effective parameter combination of the XAJ model obtained in step S2, and the areal average precipitation and areal average evapotranspiration obtained in step S1 are input into the pre-constructed XAJ model. The XAJ model includes an evapotranspiration calculation module, a runoff generation calculation module, and a runoff collection calculation module. The evapotranspiration calculation module is used to calculate the evapotranspiration and soil moisture content of different soil layers. The runoff generation calculation module calculates the total runoff based on the saturation runoff generation mechanism according to the evapotranspiration and soil moisture content of different soil layers, and divides the total runoff into three sources: surface runoff, soil runoff, and groundwater runoff. The runoff collection calculation module receives the runoff from the three sources divided by the runoff generation calculation module and obtains the simulated runoff sequence through runoff collection calculation. S4. Data normalization: Normalize the areal average precipitation and areal average evapotranspiration obtained in step S1 and the simulated runoff sequence obtained in step S3 respectively; combine the areal average precipitation, areal average evapotranspiration and simulated runoff sequence to obtain the input feature set of the LSTM model. S5. LSTM Model Simulation of Runoff: Construct an LSTM model and reconstruct time-series data from the input feature set of the LSTM model obtained in step S4 using the sliding window technique; input the reconstructed data into the LSTM model, optimize the model hyperparameter settings and training strategy, achieve deep capture of the nonlinear relationship between rainfall and runoff, and finally obtain the runoff prediction value through inverse normalization. S6. Bayesian-based model uncertainty quantification: The uncertainty of the runoff prediction value obtained in step S5 is quantified by introducing a Bayesian inference framework, a runoff prediction interval with confidence level is constructed, and multiple uncertainty evaluation indicators are used to evaluate the quality of the runoff prediction interval. S7. Application of Transfer Learning in Data-Scarce Areas: The study area in steps S1 to S6 is used as a data-rich source watershed, and the LSTM model trained in step S5 and verified by uncertainty quantification in step S6 is used as a pre-trained source model. The source model has learned and internalized the physical mechanism and nonlinear mapping relationship of rainfall-runoff generation through the data of the source watershed. A transfer learning framework is constructed to transfer the network structure and pre-trained weight parameters of the source model to the data-scarce target watershed. In the target watershed, hydrological and meteorological data are collected and processed in steps S2 to S4 to obtain the input feature set of the target watershed. The input feature set of the target watershed is input into the transferred model to output the runoff prediction value of the target watershed, thereby achieving high-precision runoff prediction in data-scarce areas.

2. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The process of converting precipitation and evapotranspiration observed at stations within the watershed into areal average precipitation and areal average evapotranspiration includes: Based on the geospatial map of the study area and the latitude and longitude coordinates of n meteorological stations within the study area, the study area is divided into n Thiessen polygons; Calculate the area of ​​each Thiessen polygon. Let Si be the area of ​​the Thiessen polygon containing the i-th station, and S be the area of ​​the watershed. Then, calculate the weight of the i-th station. ; Average precipitation in the study area Average evaporation of dough The calculation formula is: , .

3. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The evapotranspiration calculation module uses a three-layer evapotranspiration model to calculate evapotranspiration, wherein the evapotranspiration of the upper layer is... The evaporation rate of the middle layer is The evaporation rate of the lower layer is The moisture content of the upper soil layer is The water content of the middle soil layer is ; when hour, , , ; when hour, ,like ,but , ;like ,but , ; in, This refers to precipitation. Evaporation capacity of the basin; This represents the deep evaporation coefficient.

4. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The runoff calculation module comprises three parts: preprocessing, runoff calculation, and three-source water division, as detailed below: Preprocessing: ; ; in, For impermeable areas to generate flow; The impermeable area coefficient; Effective precipitation after deducting evapotranspiration; Net effective precipitation; This is an intermediate variable in the water storage capacity curve; This represents the maximum water storage capacity at a single point in the basin. This represents the current average soil water storage capacity of the basin. The average water storage capacity of the basin; The index of the water storage capacity distribution curve; Production flow calculation: If , ; like , ; Three water sources division: total production flow Classified proportionally as surface runoff underground runoff , soil in the stream : 。 5. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The runoff calculation module uses the recession coefficient to calculate the runoff process of the three water sources and combines it with the lag time to obtain the simulated runoff. The runoff calculation module includes three parts: runoff initialization, time-period runoff update, and lag runoff correction, as detailed below: Sink flow initialization: ; in, This is the area conversion factor; This represents the initial surface runoff depth. The measured flow rate at the initial moment; , , These represent the initial runoff volumes of surface water, soil water, and groundwater, respectively. Time-based traffic updates: ; in, , , They are respectively Surface, soil, and groundwater runoff over a given period; , They are respectively Surface, soil, and groundwater runoff during a given period; , , They are respectively The depth of surface, soil, and groundwater flow during different time periods; , , These are the drainage coefficients for surface water, soil water, and groundwater, respectively. Lag Convergence Correction: If Then simulated runoff sequence ; like Then simulated runoff sequence ; in, The time lag is the time delay. The coefficient of water discharge from the river network; for Simulated total runoff over a given period; Run the XAJ model to generate multiple sets of simulated runoff sequences with XAJ physical characteristics. Determine the number of stable sampling times to ensure that the runoff sequence can cover most of the runoff generation and confluence patterns in the watershed.

6. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that: The LSTM model consists of two LSTM layers, one Dropout layer, and one fully connected layer. The LSTM layers set the number of hidden layer units and include input gates, output gates, and forget gates. The Dropout layer is located after the LSTM layers. The fully connected layer maps the multidimensional abstract temporal features output by the LSTM layers to 1-dimensional predicted values ​​through linear transformation.

7. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The process of obtaining runoff prediction values ​​through inverse normalization includes: The input feature set from the validation period is input into the trained LSTM model to obtain the normalized value of the runoff prediction, which is then converted back to the runoff prediction value using the inverse normalization formula. The inverse normalization formula is: ; In the formula, and These represent the maximum and minimum values ​​of the measured runoff in the rate-period series.

8. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The introduction of a Bayesian inference framework to quantify the uncertainty of the runoff prediction values ​​obtained in step S5 includes: Assuming the actual runoff is based on the runoff forecast obtained in step S5 The mean is expressed as the standard deviation. Given that the distribution range follows a normal distribution, and considering the non-negativity of the error standard deviation, a semi-normal distribution is chosen as the distribution. The prior distribution is determined; sampling is performed using the NUTS algorithm of Markov Chain Monte Carlo (MCMC), with two independent Markov chains running in parallel. After each Markov chain converges, several valid samples are extracted to construct the standard deviation. The posterior probability density histogram.

9. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The process of constructing the runoff prediction interval at the confidence level includes: Based on the obtained posterior error standard deviation For each runoff prediction point during the validation period, a prediction interval with a confidence level is constructed, and the prediction interval range is: 。 10. The XAJ-LSTM model runoff prediction method based on Monte Carlo random sampling according to claim 1, characterized in that, The method of evaluating the quality of runoff prediction intervals using multiple uncertainty evaluation indicators includes: Three core indicators—interval coverage rate (CR), average bandwidth (B), and consecutive ranking probability score (CRPS)—are selected to evaluate the reliability, compactness, and overall accuracy of the prediction interval. The calculation formulas for each indicator are as follows: ; ; ; In the formula, This refers to the sequence number of the predicted time period; This represents the total number of forecast periods; For the first Measured runoff for each time period; For the first Simulated runoff for each time period; It is a Boolean indicator function; For the first The probability score of consecutive rankings over a period of time; The cumulative distribution function of the standard normal distribution; It is the probability density function of the standard normal distribution.

Citation Information

Patent Citations

  • Machine learning-based remote sensing inversion flow correction method for areas lacking data

    CN120373065A