Runoff prediction method and device and computer readable storage medium
By combining the Xin'anjiang model, the Mastingen model and the LSTM codec, the shortcomings in accuracy and stability of the existing runoff prediction methods are solved, and runoff prediction with higher accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202411968397.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-06
AI Technical Summary
Existing runoff prediction methods have shortcomings in accuracy and stability, especially in the face of changes in watershed conditions, extreme weather or seasonal differences.
The Xin'anjiang model is used to predict the upstream section confluence, and combined it with the Masting root model and LSTM codec. By constructing the Masting root model and inputting the upstream section real-time traffic and confluence prediction, the downstream section predicted traffic is obtained and corrected through the LSTM model.
It significantly improves the accuracy and applicability of runoff prediction, can provide more reliable runoff prediction results under a variety of environmental and basin conditions, dynamically adapts to basin changes, and reduces the error rate of traditional single model prediction.
Smart Images

Figure CN119940610A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of runoff prediction, and in particular to a runoff prediction method, device and computer-readable storage medium. Background Art
[0002] Existing runoff forecasts usually use a single model for prediction, which has obvious deficiencies in the accuracy and stability of runoff prediction. Specifically, when the Xin'anjiang model is used alone, the model cannot effectively respond to changes in basin conditions, and is not stable enough in the face of extreme weather or seasonal differences; and when deep learning models such as LSTM are used alone, the hydrological and physical mechanisms of the runoff process may be ignored, making it difficult for the model prediction effect to remain stable in different basin scenarios. Due to the above shortcomings, the existing solutions still have room for improvement in comprehensive runoff prediction capabilities and cannot meet the needs of modern hydrological management for high precision and low error rates. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a runoff prediction method, device and computer-readable storage medium to improve the accuracy and applicability of runoff prediction.
[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is:
[0005] A runoff prediction method comprises the following steps:
[0006] The Xin'anjiang model is used to predict the confluence of the upstream section of the predicted basin, and the predicted confluence of the upstream section is obtained;
[0007] A Muskingum model is constructed, and the real-time flow of the upstream section and the predicted flow of the upstream section are input into the Muskingum model to obtain the predicted flow of the downstream section;
[0008] The real-time flow of the upstream section and the predicted flow of the downstream section are input into the constructed LSTM codec to obtain the corrected flow of the downstream section.
[0009] Furthermore, the Xin'anjiang model is used to predict the confluence of the upstream section of the predicted basin, and the predicted confluence of the upstream section is obtained, which includes:
[0010] Determine the actual evapotranspiration of the watershed to be predicted according to the upper evapotranspiration, the lower evapotranspiration and the deep evapotranspiration of the watershed to be predicted;
[0011] Determine the runoff of the watershed to be predicted according to the actual evapotranspiration;
[0012] The predicted flow confluence at the upstream section is determined based on the flow generation.
[0013] Further, the prediction of the confluence of the upstream section of the basin to be predicted using the Xin'anjiang model to obtain the predicted confluence volume of the upstream section includes:
[0014] Divide the water sources, and determine the runoff corresponding to the divided water sources;
[0015] Perform confluence calculation on the runoff corresponding to the divided water sources to obtain the predicted confluence volume of the upstream section.
[0016] Further, the determination of the actual evapotranspiration of the basin to be predicted based on the upper-layer evapotranspiration, lower-layer evapotranspiration, and deep-layer evapotranspiration of the basin to be predicted includes:
[0017] Determine the upper-layer evapotranspiration:
[0018] EU = EP = K × EM
[0019] In the formula, EP is the potential evapotranspiration, K is the evapotranspiration conversion coefficient, and EM is the actual water surface evaporation;
[0020] When WU + P - E < 0, the lower-layer tensiometer water starts to evaporate, and the calculation formula for the lower-layer evaporation amount EL is:
[0021]
[0022] In the formula, P is the precipitation, E is the actual evapotranspiration, WL is the lower-layer tensiometer water content, WU is the upper-layer tensiometer water content, and WLM is the lower-layer tensiometer water capacity;
[0023] When EL / (EP - EU) > C, the lower layer evaporates completely and the deep-layer tensiometer water starts to evaporate. At this time, the calculation formula for the deep-layer evaporation amount ED is:
[0024] ED = C × (EP - EU) - EL
[0025] In the formula, C is the deep-layer evaporation coefficient.
[0026] Further, the determination of the runoff generation of the basin to be predicted based on the actual evapotranspiration includes:
[0027] The calculation formula for the runoff generation R of the basin to be predicted:
[0028]
[0029] If P - E + A < WMM, it is partial runoff generation:
[0030]
[0031] If P - E + A ≥ WMM, it is full-basin runoff generation:
[0032] R = P - E - (WM - W0)
[0033] Wherein, f is the actual runoff, F is the total runoff, W' is the soil water content at the current moment, WMM is the maximum soil water capacity, B is the exponent of the storage capacity curve, A is the antecedent precipitation index, P is the precipitation, W0 is the initial soil water content, E is the actual evapotranspiration, and WM is the capillary water capacity of the soil.
[0034] Further, the division of the water source and the determination of the runoff corresponding to the divided water source include:
[0035] Dividing the water source into surface runoff, subsurface flow and groundwater runoff;
[0036] Determining the type of the area distribution curve of the basin free water storage capacity as:
[0037]
[0038] Wherein, f is the actual runoff, F is the total runoff, S' is the current free water storage, MS is the maximum free water storage capacity, and EX is the curvature of the storage capacity curve;
[0039] If Q + AU < MS, the calculation formula for the surface runoff RS is:
[0040]
[0041] If Q + AU ≥ MS, the calculation formula for the surface runoff RS is:
[0042] RS = (Q + S - SM) × FR
[0043] The calculation formula for the subsurface flow RI is:
[0044] RI = KI × S × FR
[0045] The calculation formula for the groundwater runoff RG is:
[0046] RG = KG × S × FR
[0047] Wherein, Q is the free water storage capacity, AU is the change in free water storage capacity, MS is the saturated storage capacity, SM is the parameter of the free water storage capacity distribution curve, FR is the runoff area ratio, KI is the runoff coefficient of subsurface flow, and KG is the runoff coefficient of groundwater runoff.
[0048] Further, the calculation of the concentration of the runoff corresponding to the divided water source to obtain the predicted concentration at the upstream section includes:
[0049] Determining the overland flow concentration of surface runoff:
[0050] QS(t)=CS×QS(t-1)+(1-CS)×RS(t)×U
[0051] Determine the mid-stream flow:
[0052] QI(t)=CI×QI(t-1)+(1-CI)×RI(t)×U
[0053] Determine subsurface runoff confluence:
[0054] QG(t)=QG(t-1)+(1-CG)×RG(t)×U
[0055] The total inflow of the river network per unit area is:
[0056] QT(t)=QS(t)+QI(t)+QG(t)
[0057] Determine the unit area river network confluence:
[0058] Q(t)=CR×Q(t-1)+(1-CR)×QT(tL)
[0059] Determine the following stream confluence per unit area:
[0060] Q(t)=C0×I(t)+C1×I(t-1)+C2×Q(t-1)
[0061] Wherein, CS is the linear reservoir coefficient of surface runoff, CI is the linear reservoir coefficient of subsoil flow, CG is the linear reservoir coefficient of groundwater runoff, CR is the coefficient of river network hysteresis algorithm, U is the unit area, QT is the total inflow of the river network per unit area, QS(t) is the flow of surface runoff at time t, QS(t-1) is the flow of surface runoff at time t-1, QI(t) is the flow of subsoil flow at time t, QI(t-1) is the flow of subsoil flow at time t-1, QG(t) is the flow of groundwater runoff at time t, QG(t-1) is the flow of groundwater runoff at time t-1, I(t) is the inflow of the river below the unit area, RS(t) is the surface runoff at time t, RI(t) is the subsoil flow at time t, RG(t) is the groundwater runoff at time t, C0, C1, C2 are all linear weight coefficients of river flow, and L is the hysteresis time.
[0062] Furthermore, the inputting the real-time flow of the upstream section and the predicted flow of the upstream section into the Muskingum model to obtain the predicted flow of the downstream section includes:
[0063] O t+Δt =C1I t+Δt +C2I t +C3O t
[0064]
[0065] In the formula, O t+Δt Predict the flow rate of the next section at the next moment, O t is the outflow of the lower section at the current moment, I t+Δt is the predicted flow of the upper section at the next moment, I t is the inflow of the upper section at the current moment, K and x are constants, K is the slope of the storage-flow relationship curve, and x is the flow density coefficient.
[0066] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0067] A runoff prediction device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned runoff prediction method are implemented.
[0068] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0069] A computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the above-mentioned runoff prediction method.
[0070] The beneficial effects of the present invention are: by combining the traditional hydrological models Xin'anjiang model and Muskingum model with the LSTM encoder-decoder deep learning model, the accuracy and applicability of runoff prediction are improved; in the runoff prediction process, the traditional hydrological model is limited by the simulation of fixed parameters and physical mechanisms, and it is difficult to adapt to the dynamic changes of the basin. At the same time, although the existing deep learning model has advantages in time series prediction, it is difficult to effectively integrate the physical laws in the hydrological process. This application combines the physical mechanisms of the Xin'anjiang model and Muskingum model with the time series prediction ability of LSTM to achieve high-precision prediction of runoff information, and can provide more reliable runoff prediction results under various environmental and basin conditions, thereby improving the accuracy and applicability of runoff prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A flow chart of the steps of a runoff prediction method according to an embodiment of the present invention;
[0072] Figure 2 This is a schematic diagram of the structure of the deep learning model LSTM in an embodiment of the present invention;
[0073] Figure 3 A schematic diagram of the principle of runoff prediction according to an embodiment of the present invention;
[0074] Figure 4 A schematic diagram of the principle of cross-validation of an embodiment of the present invention;
[0075] Figure 5 It is a schematic diagram of the structure of a runoff prediction device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0076] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0077] The above-mentioned runoff prediction method, device and computer-readable storage medium of the present application can be applied to various scenarios where river flow prediction is required, such as reservoir inflow, etc., and are described below through specific implementation methods:
[0078] In an optional embodiment, if Figure 1 As shown, a runoff prediction method comprises the steps of:
[0079] S1. Use the Xin'anjiang model to predict the confluence of the upstream section of the predicted basin to obtain the predicted confluence of the upstream section;
[0080] S2, constructing a Muskingum model, inputting the real-time flow of the upstream section and the predicted flow of the upstream section into the Muskingum model to obtain the predicted flow of the downstream section;
[0081] S3. Input the real-time flow of the upstream section and the predicted flow of the downstream section into the constructed LSTM codec to obtain the corrected flow of the downstream section.
[0082] When making runoff predictions, the data is the hourly flow and rainfall data collected directly from various data stations. The collected modeling data covers the period from 2000-01-01 00:00 to 2023-12-31 00:00. First, the data is preprocessed, including:
[0083] Null value handling:
[0084] If the rainfall data is null, simply fill it with 0.
[0085] For flow data, linear interpolation is used to fill missing values. Assuming there is a missing value data point (y), its interpolation value is:
[0086]
[0087] in:
[0088] t and t1 are time points, expressed as timestamps.
[0089] y0 and y1 are known data values corresponding to time points t0 and t1.
[0090] t is the time of the interpolation point, which lies between t0 and t1.
[0091] y is the estimated value corresponding to the interpolation point t.
[0092] Outlier handling:
[0093] For data points with negative flow data, linear interpolation is used for correction.
[0094] Flood selection:
[0095] Based on the flow data, flood events that reach peak values within a period of time are screened out. This method ensures that the model training includes strong flood processes, thereby enhancing the model's ability to respond to flood events.
[0096] Select the complete flood event including both flood rise and fall.
[0097] Set a minimum duration threshold for a flood event (such as 12 hours, 24 hours, etc.) to eliminate small flood events with too short a duration.
[0098] By analyzing the rainfall conditions before and after flood events, flood events with outstanding rainfall can be screened.
[0099] Data normalization:
[0100] The data dimensions include: flow data of nine upstream stations and rainfall data of upstream rainfall stations. In order to eliminate the dimensional differences between different features and thus improve the efficiency and stability of model training, the rainfall data and flow data are normalized to zero mean, and the data are scaled to a distribution form with a mean of 0 and a standard deviation of 1. The formula is as follows:
[0101]
[0102] Where: x is the original data value, μ is the mean of the data, σ is the standard deviation of the data, and x′ is the standardized data value.
[0103] The above preprocessed data are used as the input of the Xinanjiang model. The data covers the hourly data of all medium and large floods from 00:00 on April 25, 2005 to 23:00 on August 31, 2023. The data dimensions include hourly rainfall and evaporation.
[0104] In order to determine the predicted amount of upstream section runoff, in an optional implementation, the Xin'anjiang model is used to predict the runoff of the upstream section of the predicted basin, and the predicted amount of upstream section runoff is obtained, which includes:
[0105] Determine the actual evapotranspiration of the watershed to be predicted according to the upper evapotranspiration, the lower evapotranspiration and the deep evapotranspiration of the watershed to be predicted;
[0106] Determine the runoff of the watershed to be predicted according to the actual evapotranspiration;
[0107] The predicted amount of runoff at the upstream section is determined based on the runoff generation.
[0108] Wherein, determining the actual evapotranspiration of the watershed to be predicted according to the upper evapotranspiration, the lower evapotranspiration and the deep evapotranspiration of the watershed to be predicted comprises:
[0109] Determine the evapotranspiration from the upper layer:
[0110] EU=EP=K×EM
[0111] In the formula, EP is the potential evapotranspiration, K is the evapotranspiration conversion coefficient, and EM is the actual water surface evaporation;
[0112] When WU+PE<0, the tension water in the lower layer begins to evaporate, and the calculation formula for the evaporation amount EL in the lower layer is:
[0113]
[0114] Where P is precipitation, E is actual evapotranspiration, WL is the tension water content of the lower layer, WU is the tension water content of the upper layer, and WLM is the tension water capacity of the lower layer;
[0115] When EL / (EP-EU)>C, the lower layer evaporates completely and the deep tension water begins to evaporate. At this time, the calculation formula for deep evaporation ED is:
[0116] ED=C×(EP-EU)-EL
[0117] Where C is the deep evaporation coefficient.
[0118] In the calculation of evapotranspiration, it is first necessary to obtain the actual water surface evaporation value of the basin. Based on this observed value, the actual evapotranspiration E is calculated. E consists of three parts: the upper-layer evapotranspiration EU, the lower-layer evapotranspiration EL, and the deep-layer evapotranspiration ED. The evapotranspiration of the three layers is closely related to the tension water storage capacity of each layer and the tension water content of each layer at the current moment. The tension water storage capacities of the three layers are: the upper-layer tension water capacity WUM, the lower-layer tension water capacity WLM, and the deep-layer tension water capacity WDM. The three together constitute the soil tension water capacity WM (WM = WUM + WLM + WDM). The input of the evapotranspiration calculation module is the measured water surface evaporation E, and the calculation parameters include the evapotranspiration conversion coefficient K and the deep evaporation coefficient C. The outputs of the module include the actual evapotranspiration of the three layers (EU, EL, ED) and the tension water contents of the three layers of soil (the upper-layer tension water content WU, the lower-layer tension water content WL, and the deep-layer tension water content WD). The calculation principle of the evapotranspiration of the three layers is as follows: the upper-layer tension water evaporates according to the evapotranspiration capacity. When all the upper-layer tension water has evaporated, the remaining evaporation amount evaporates from the lower-layer tension water. When the lower-layer tension water is not enough for evaporation, the deep-layer tension water starts to evaporate.
[0119] Determining the runoff of the basin to be predicted according to the actual evapotranspiration includes:
[0120] The calculation formula for the runoff R of the basin to be predicted:
[0121]
[0122] If P - E + A < WMM, it is local runoff:
[0123]
[0124] If P - E + A ≥ WMM, it is full-basin runoff:
[0125] R = P - E - (WM - W0)
[0126] Where f is the actual runoff, F is the total runoff, W′ is the soil water content at the current moment, WMM is the maximum soil water capacity, B is the exponent of the storage capacity curve, A is the antecedent precipitation index, P is the precipitation, W0 is the initial soil water content, E is the actual evapotranspiration, and WM is the soil tension water capacity.
[0127] In another alternative embodiment, predicting the confluence of the upstream section of the basin to be predicted using the Xin'anjiang model and obtaining the predicted confluence amount of the upstream section includes:
[0128] Dividing the water sources and determining the runoff corresponding to the divided water sources;
[0129] Performing confluence calculation on the runoff corresponding to the divided water sources to obtain the predicted confluence amount of the upstream section.
[0130] Among them, the division of the water source and the determination of the runoff corresponding to the divided water source include:
[0131] Dividing the water source into surface runoff, subsurface flow and groundwater runoff;
[0132] Determining the line type of the basin free water storage capacity area distribution curve as:
[0133]
[0134] Among them, f is the actual runoff, F is the total runoff, S′ is the current free water storage, MS is the maximum free water storage capacity, and EX is the curvature of the storage capacity curve;
[0135] If Q + AU < MS, the calculation formula for surface runoff RS is:
[0136]
[0137] If Q + AU ≥ MS, the calculation formula for surface runoff RS is:
[0138] RS = (Q + S - SM) × FR
[0139] The calculation formula for subsurface flow RI is:
[0140] RI = KI × S × FR
[0141] The calculation formula for groundwater runoff RG is:
[0142] RG = KG × S × FR
[0143] Among them, Q is the free water storage capacity, AU is the change in free water storage capacity, MS is the saturated storage capacity, SM is the free water storage capacity distribution curve parameter, FR is the runoff generation area ratio, KI is the subsurface flow runoff generation coefficient, and KG is the groundwater runoff generation coefficient.
[0144] In another alternative implementation manner, the calculation of the confluence of the runoff corresponding to the divided water source to obtain the upstream section confluence prediction amount includes:
[0145] Determining the hillslope confluence of surface runoff:
[0146] QS(t) = CS × QS(t - 1) + (1 - CS) × RS(t) × U
[0147] Determining the subsurface flow confluence:
[0148] QI(t) = CI × QI(t - 1) + (1 - CI) × RI(t) × U
[0149] Determine subsurface runoff confluence:
[0150] QG(t)=QG(t-1)+(1-CG)×RG(t)×U
[0151] The total inflow of the river network per unit area is:
[0152] QT(t)=QS(t)+QI(t)+QG(t)
[0153] Determine the unit area river network confluence:
[0154] Q(t)=CR×Q(t-1)+(1-CR)×QT(tL)
[0155] Determine the following stream confluence per unit area:
[0156] Q(t)=C0×I(t)+C1×I(t-1)+C2×Q(t-1)
[0157] Wherein, CS is the linear reservoir coefficient of surface runoff, CI is the linear reservoir coefficient of subsoil flow, CG is the linear reservoir coefficient of groundwater runoff, CR is the coefficient of river network hysteresis algorithm, U is the unit area, QT is the total inflow of the river network per unit area, QS(t) is the flow of surface runoff at time t, QS(t-1) is the flow of surface runoff at time t-1, QI(t) is the flow of subsoil flow at time t, QI(t-1) is the flow of subsoil flow at time t-1, QG(t) is the flow of groundwater runoff at time t, QG(t-1) is the flow of groundwater runoff at time t-1, I(t) is the inflow of the river below the unit area, RS(t) is the surface runoff at time t, RI(t) is the subsoil flow at time t, RG(t) is the groundwater runoff at time t, C0, C1, C2 are all linear weight coefficients of river flow, and L is the hysteresis time.
[0158] In another optional embodiment, the real-time flow of the upstream section and the predicted flow of the upstream section are input into the Muskingum model to obtain the predicted flow of the downstream section, that is, the upstream flow and the flow generated by the Xin'anjiang model are used as the input of the Muskingum model to perform flow calculation. Specifically, when it is implemented:
[0159] The Muskingum method solves the water balance equation and tank storage equation approximated by the Saint-Venant equations. Under the premise of ignoring the inertia term, the simplified water balance equation and tank storage equation can be expressed as:
[0160]
[0161] W=K[xI+(1-x)O]=KQ
[0162] Among them, Q' is the indicated storage flow, Q'=xI+(1-x)O; I, O, W represent the inflow of the upper section, the outflow of the lower section and the storage capacity of the channel respectively; K is the slope of the storage-flow relationship curve; x is the flow density coefficient;
[0163] The water balance equation and tank storage equation are combined to obtain:
[0164]
[0165] Because K and x can be regarded as constants, I and O are expressed by central finite difference:
[0166]
[0167] The equation can be simplified to:
[0168]
[0169] make:
[0170]
[0171] but:
[0172] O t+Δt =C1I t+Δt +C2I t +C3O t
[0173] In the formula, O t+Δt Predict the flow rate of the next section at the next moment, O t is the outflow of the lower section at the current moment, I t+Δt is the predicted flow of the upper section at the next moment, which is the predicted flow calculated by the Xin'anjiang model. t is the inflow of the upper section at the current moment, K and x are constants, K is the slope of the storage-flow relationship curve, and x is the flow density coefficient.
[0174] For a river section, once the parameters K, x value and calculation period Δt are determined, C1, C2 and C3 can be calculated, and then according to the flow process I t+Δt and the initial flow process of the lower section O t , calculate the flow rate O of the section at the next moment t+Δt .
[0175] After the predicted flow of the downstream section is determined by the Muskingum model, the real-time flow of the upstream section and the predicted flow of the downstream section are input into the constructed LSTM codec to obtain the corrected flow of the downstream section;
[0176] In the specific implementation, the normalized flow data of each upstream station, the rainfall at the upstream rainfall station, and the inflow data obtained by Muskingum calculation are input into the LSTM encoder to extract the time series features. Then the output of the LSTM encoder is input into the LSTM decoder to decode and obtain the inflow forecast correction value.
[0177] The update formula of LSTM unit:
[0178] Forget gate calculation:
[0179] f t =σ(W f ·[h t-1 , x t ]+b f )
[0180] Input gate calculation:
[0181] i t =σ(W i ·[h t-1 , x t ]+b i )
[0182] Candidate memory cell state calculation:
[0183]
[0184] Memory unit status update:
[0185]
[0186] Output gate calculation and final output:
[0187] o t =σ(W o ·[h t-1 , x t ]+b o )
[0188] h t =o t tanh(C t )
[0189] Among them, xt is the input feature sequence of the long short-term memory network LSTM, ht -1 is the hidden state of the previous moment, Cy is the cell state, ht is the output state of the long short-term memory network LSTM, Wf, Wi, WC, Wo are weight matrices, bf, bi, bc, bo are bias terms, σ(·) is the Sigmoid activation function, tanh(·) is the hyperbolic tangent activation function, and its structural diagram is as follows Figure 2 shown.
[0190] The schematic diagram of the entire runoff prediction is as follows: Figure 3 As shown:
[0191] First, the Xin'anjiang model is used to predict the confluence of the upstream section, and then it is input into the Muskingum algorithm model together with the measured inflow flow of the upstream section and the measured outflow process of the downstream section to predict the flow of the downstream section, and the outflow process of the downstream section is simulated. Then, the LSTM model is trained through the real-time flow of the upstream section, the measured outflow process of the downstream section and the outflow process of the downstream section predicted by the Muskingum model to obtain the trained LSTM model. Then, the trained LSTM model can predict the inflow flow of the downstream section based on the measured inflow flow of the upstream section, and obtain the corrected outflow process of the downstream section.
[0192] In another optional embodiment, when performing parameter law on the Xinanjiang model and the Muskingum model, a joint optimization strategy of the SCE-UA algorithm and the genetic algorithm (GA) is adopted;
[0193] By applying genetic algorithms to the complex set generation and evolution process of SCE-UA, the algorithm's search capability and adaptability to nonlinear and multidimensional parameter spaces are enhanced, effectively avoiding the risk of local optimality. Specifically, the following steps are included:
[0194] 1. Parameter Joint Optimization Framework
[0195] Through the joint optimization of the SCE-UA algorithm and the genetic algorithm, multiple parameters of the Xin'anjiang model are calibrated to achieve better results in the global optimality of the hydrological model. The following is the adjustment method for these adjustable parameters:
[0196] (1) Maximum number of calls to the hydrological model (Rep):
[0197] Adjustment method: Usually, Rep determines the model calling frequency in the optimization process of SCE-UA and genetic algorithm. In the early stage, in order to increase the global search capability, the value of Rep can be appropriately increased to ensure the extensiveness of the search process; in the later stage, as the parameters gradually approach the optimal solution, the number of Rep can be appropriately reduced to reduce the computational burden and improve the convergence speed.
[0198] (2) Population size (ngs):
[0199] Adjustment method: Population size (ngs) is the core parameter of the genetic algorithm, which determines the number of individuals in each generation. A larger population size helps to explore a wider parameter space and is suitable for high-dimensional parameter optimization. However, a larger population size may lead to slower convergence, so it can be adjusted according to the optimization progress and time constraints. In the early stage, a larger population size can be set, and then the population size can be gradually reduced in the later stage to accelerate convergence.
[0200] (3) Number of evolution cycles (kstop):
[0201] Adjustment method: kstop determines the maximum iteration round of the genetic algorithm. Generally, the initial kstop value is large to ensure sufficient search rounds; when the optimization process is close to the optimal solution, the kstop value can be appropriately reduced to avoid over-calculation and overfitting. The specific value can be determined by methods such as cross-validation to ensure that the optimal solution is reached within a suitable computing time.
[0202] (4) Cycle stopping criteria (peps):
[0203] Adjustment method: peps is a criterion for determining when to stop the algorithm. Usually, the stopping criterion based on the error change is adopted, such as stopping the optimization when the error change of several consecutive generations is less than the set threshold. The setting of this parameter should take into account the speed and accuracy requirements of model convergence, especially when facing complex hydrological models. Stopping too early may cause the model to not reach the optimal solution.
[0204] Adjustment basis: In the early stage, a loose stopping criterion can be set to ensure a wide search. As the optimization progresses, the error convergence can be monitored and the stopping criterion can be gradually adjusted to a strict one to avoid premature termination of the algorithm.
[0205] The overall adjustment plan is as follows:
[0206] Initial stage:
[0207] Select a larger population size (ngs), such as 1000 individuals, and a higher number of evolutionary cycles (kstop), such as 1000 generations.
[0208] Set a higher mutation rate to ensure the breadth of global search and avoid falling into local optimality.
[0209] Mid-term adjustment:
[0210] According to the change of error, the population size and Rep are adjusted in time to reduce unnecessary calculations.
[0211] Start to reduce the mutation rate and increase the convergence accuracy.
[0212] Post-optimization:
[0213] Further reducing the population size reduces the number of iterations and accelerates convergence.
[0214] Fine-tune the last few parameters to ensure the accuracy of the local optimum.
[0215] 2. Fusion operation of genetic algorithm and SCE-UA
[0216] Genetic algorithms are introduced into the complex set evolution process of SCE-UA to improve the diversity and global optimality of parameter calibration. The specific fusion steps include:
[0217] Selection operation: Using the selection mechanism of genetic algorithms (such as roulette selection or tournament selection), individuals with high fitness are given priority to enter the complex set of the next generation to ensure the heritability of excellent individuals.
[0218] Crossover operation: Apply single-point or multi-point crossover operation in complex sets, randomly select individuals and combine their parameter genes to generate new individuals, thereby enhancing the algorithm's ability to explore multi-peak parameter space.
[0219] Mutation operation: randomly change the parameter values in individual gene fragments with a certain probability (such as switching from 0 to 1), increase population diversity, and help escape from local optimality.
[0220] 3. Adaptive control during optimization
[0221] In the joint optimization of SCE-UA and genetic algorithm, the optimization parameters (such as crossover rate and mutation rate) are adaptively adjusted according to the convergence situation. For example, a higher mutation rate is used in the initial stage to enhance the global search ability; when converging in the later stage, the mutation rate is reduced to improve the local accuracy.
[0222] 4. Advantages of joint optimization of genetic algorithm and SCE-UA
[0223] The joint optimization method of this embodiment effectively improves the parameter calibration accuracy of the Xinanjiang model and the Muskingum model by integrating SCE-UA with the genetic algorithm, and has the following advantages:
[0224] Global optimality: The selection, crossover, and mutation operations of the genetic algorithm significantly improve the search capability of SCE-UA in complex parameter spaces, helping the algorithm to better escape from local optimality and find the global optimal solution.
[0225] Convergence speed: The introduction of genetic algorithm can accelerate the convergence process of SCE-UA under the same computing conditions, especially for multi-dimensional and large-scale parameter calibration.
[0226] Adaptability: The algorithm is more adaptable to the nonlinear characteristics of different hydrological scenarios and can maintain high prediction accuracy in extreme conditions (such as flood events).
[0227] In another optional implementation, the deep learning model LSTM-encoder-decoder model is optimized, including:
[0228] Adaptive adjustment of the number of layers and units: The model automatically selects the number of LSTM layers and hidden units, and dynamically adjusts them based on data features (such as time series length and data complexity) to avoid overfitting or underfitting. This automated adjustment not only effectively reduces computational costs, but also improves the model's prediction accuracy in different hydrological scenarios.
[0229] Adaptive learning rate strategy: Adaptive learning rate strategy is used to automatically adjust the learning rate according to the error convergence during training, which is particularly suitable for the nonlinear characteristics of hydrological models. Specific applications include cyclical learning rates and cosine annealing methods, which converge quickly in the early stage of training and make fine adjustments in the later stage to increase the possibility of global optimization.
[0230] Dynamic adjustment of batch size and adaptation to the training stage: The batch size is adjusted in real time during the training process, especially in the stage of large data fluctuations, a smaller batch is used to increase the stability of the model; after the training converges, the batch is increased to speed up the calculation. This dynamic batch strategy can effectively adapt to the dynamic nature of hydrological data that changes over time.
[0231] Adaptive fusion of optimizer selection: An innovative multi-optimizer adaptive fusion strategy is proposed, combining the advantages of different optimizers to dynamically select the optimizer suitable for the current state of the model. For example, the Adam optimizer is used for fast convergence in the early stage of training; in the middle and late stages, it is switched to RAdam or AdaBelief to improve stability. This strategy can effectively improve the convergence speed and accuracy of the model on complex hydrological data.
[0232] Early stopping and monitoring: Combine K-fold cross validation and early stopping to comprehensively evaluate the generalization performance of the model, thereby improving the robustness of early stopping decisions. This multiple monitoring mechanism can effectively avoid early stopping errors caused by fluctuations in a single validation set, thereby improving the stability of the model on different test sets.
[0233] Multi-layer regularization strategy combination: Based on the traditional dropout and L2 regularization, a multi-layer regularization strategy combining layer normalization and batch normalization is designed. This method can not only reduce the overfitting of the model, but also further improve the generalization ability of the model in different hydrological scenarios.
[0234] Among them, cross-validation is a commonly used model evaluation and optimization method. This method can make full use of all data. By exchanging training sets and test sets, it can obtain more reliable model accuracy with less training data. There is no need to set up a special test set. Its experimental results can objectively represent the distribution of all data, select models with strong generalization performance, and avoid misreporting and false alarms of simulation results. The algorithm principle is as follows Figure 4 The cross validation steps are as follows:
[0235] 1. Divide the dataset into k subsets.
[0236] 2. Select one of the subsets as the validation set and the remaining subsets as the training set.
[0237] 3. Train the model and calculate the error on the validation set.
[0238] 4. Repeat the above steps k times, and finally take the average error as the performance indicator of the model.
[0239] The fitness function during training is RMSE. The root mean square error (RMSE) is the square root of the average of the squares of the errors between the predicted value and the actual value. It measures the accuracy of the model's prediction. The smaller the value, the better the model's prediction performance. The specific formula is as follows:
[0240]
[0241] Where: N is the number of samples, y i is the ith actual value, is the i-th predicted value.
[0242] The Nash-Sutcliffe Efficiency (NSE) is used as a measurement indicator during the evaluation. NSE is used to evaluate the fit between the model prediction value and the actual observation value, and its value ranges from negative infinity to 1. An NSE value of 1 means that the model is completely consistent with the actual observation, 0 means that the model's prediction effect is equivalent to the prediction using the average value of the observed data, and less than 0 indicates that the model's prediction effect is even worse than simply using the average value of the observed data. The calculation formula is as follows:
[0243]
[0244] Where: N is the number of samples, y i is the ith actual value, is the ith predicted value, is the actual average.
[0245] In another optional embodiment, Figure 4 As shown, a runoff prediction device 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, the steps of a runoff prediction method described in any one of the above-mentioned embodiments are implemented.
[0246] In another optional embodiment, a computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps of a runoff prediction method described in any of the above embodiments are implemented.
[0247] In summary, the present invention provides a runoff prediction method, device and computer-readable storage medium, which combine the Xinanjiang model, Muskingum model and LSTM encoder-decoder, and integrate the time series prediction advantages of deep learning on the basis of retaining the physical interpretation ability of traditional hydrological models. This method can dynamically adapt to changes in the watershed, significantly improve the accuracy and robustness of runoff prediction, and can perform multivariate training through historical meteorological and hydrological data to achieve high adaptability to different watersheds, seasons and climatic conditions, and show better prediction results when dealing with extreme hydrological events. This combined model not only effectively reduces the error rate of traditional single model predictions, but also has higher reliability and applicability in practical applications, and can provide more valuable data support for water resources management and disaster prevention and mitigation.
[0248] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A runoff prediction method, characterized in that: Including the steps: Using the Xin'anjiang model to predict the confluence of the upstream section of the basin to be predicted, and obtaining the predicted confluence volume of the upstream section; Constructing the Muskingum model, inputting the real-time flow of the upstream section and the predicted confluence volume of the upstream section into the Muskingum model, and obtaining the predicted flow of the downstream section; Inputting the real-time flow of the upstream section and the predicted flow of the downstream section into the constructed LSTM encoder-decoder to obtain the corrected flow of the downstream section.
2. A runoff prediction method according to claim 1, characterized in that: The step of using the Xin'anjiang model to predict the confluence of the upstream section of the basin to be predicted and obtaining the predicted confluence volume of the upstream section includes: Determining the actual evapotranspiration of the basin to be predicted according to the upper-layer evapotranspiration, lower-layer evapotranspiration, and deep-layer evapotranspiration of the basin to be predicted; Determining the runoff generation of the basin to be predicted according to the actual evapotranspiration; Determining the predicted confluence volume of the upstream section according to the runoff generation.
3. A runoff prediction method according to claim 1, characterized in that: The step of using the Xin'anjiang model to predict the confluence of the upstream section of the basin to be predicted and obtaining the predicted confluence volume of the upstream section includes: Dividing the water sources and determining the runoff corresponding to the divided water sources; Performing confluence calculation on the runoff corresponding to the divided water sources to obtain the predicted confluence volume of the upstream section.
4. A runoff prediction method according to claim 2, characterized in that: The step of determining the actual evapotranspiration of the basin to be predicted according to the upper-layer evapotranspiration, lower-layer evapotranspiration, and deep-layer evapotranspiration of the basin to be predicted includes: Determining the upper-layer evapotranspiration: EU = EP = K × EM In the formula, EP is the potential evapotranspiration, K is the evapotranspiration conversion coefficient, and EM is the actual water surface evaporation; When WU + P - E < 0, the lower-layer tensiometer water starts to evaporate, and the calculation formula for the lower-layer evaporation amount EL is: In the formula, P is the precipitation, E is the actual evapotranspiration, WL is the lower-layer tensiometer water content, WU is the upper-layer tensiometer water content, and WLM is the lower-layer tensiometer water capacity; When EL / (EP - EU) > C, the lower layer evaporates completely and the deep-layer tensiometer water starts to evaporate. At this time, the calculation formula for the deep-layer evaporation amount ED is: ED = C × (EP - EU) - EL In the formula, C is the deep-layer evaporation coefficient.
5. A runoff prediction method according to claim 2, characterized in that: The step of determining the runoff generation of the basin to be predicted according to the actual evapotranspiration includes: The calculation formula for the runoff generation R of the basin to be predicted: If P - E + A < WMM, it is partial runoff generation: If P - E + A ≥ WMM, it is full-basin runoff generation: R = P - E - (WM - W0) Where, f is the actual runoff, F is the total runoff, W′ is the soil water content at the current moment, WMM is the maximum soil water capacity, B is the exponent of the storage capacity curve, A is the antecedent precipitation index, P is the precipitation, W0 is the initial soil water content, E is the actual evapotranspiration, and WM is the soil tensiometer water capacity.
6. A runoff prediction method according to claim 3, characterized in that: The step of dividing the water sources and determining the runoff corresponding to the divided water sources includes: Dividing the water sources into surface runoff, subsurface flow, and groundwater runoff; Determining the line type of the basin free water storage capacity area distribution curve as: Where, f is the actual runoff, F is the total runoff, S′ is the current free water storage, MS is the maximum free water storage capacity, and EX is the curvature of the storage capacity curve; If Q + AU < MS, the calculation formula for the surface runoff RS is: If Q + AU ≥ MS, the calculation formula for the surface runoff RS is: RS=(Q+S-SM)×FR The calculation formula of soil flow RI is: RI=KI×S×FR The calculation formula of ground runoff RG is: RG=KG×S×FR Among them, Q is the free water storage capacity, AU is the change of free water storage capacity, MS is the saturated storage capacity, SM is the free water storage capacity distribution curve parameter, FR is the runoff area ratio, KI is the subsoil flow coefficient, and KG is the groundflow runoff coefficient.
7. A runoff prediction method according to claim 6, characterized in that: The runoff corresponding to the divided water source is calculated to obtain the predicted upstream section runoff, which includes: Determine the slope confluence of surface runoff: QS(t)=CS×QS(t-1)+(1-CS)×RS(t)×U Determine the mid-stream flow: QI(t)=CI×QI(t-1)+(1-CI)×RI(t)×U Determine subsurface runoff confluence: QG(t)=QG(t-1)+(1-CG)×RG(t)×U The total inflow of the river network per unit area is: QT(t)=QS(t)+QI(t)+QG(t) Determine the unit area river network confluence: Q(t)=CR×Q(t-1)+(1-CR)×QT(tL) Determine the following stream confluence per unit area: Q(t)=C0×I(t)+C1×I(t-1)+C2×Q(t-1) Wherein, CS is the linear reservoir coefficient of surface runoff, CI is the linear reservoir coefficient of subsoil flow, CG is the linear reservoir coefficient of groundwater runoff, CR is the coefficient of river network hysteresis algorithm, U is the unit area, QT is the total inflow of the river network per unit area, QS(t) is the flow of surface runoff at time t, QS(t-1) is the flow of surface runoff at time t-1, QI(t) is the flow of subsoil flow at time t, QI(t-1) is the flow of subsoil flow at time t-1, QG(t) is the flow of groundwater runoff at time t, QG(t-1) is the flow of groundwater runoff at time t-1, I(t) is the inflow of the river below the unit area, RS(t) is the surface runoff at time t, RI(t) is the subsoil flow at time t, RG(t) is the groundwater runoff at time t, C0, C1, C2 are all linear weight coefficients of river flow, and L is the hysteresis time.
8. A runoff prediction method according to any one of claims 1 to 6, characterized in that: The step of inputting the real-time flow of the upstream section and the predicted flow of the upstream section into the Muskingum model to obtain the predicted flow of the downstream section includes: O t+Δt =C1I t+Δt +C2I t +C3O t In the formula, O t+Δt Predict the flow rate of the next section at the next moment, O t is the outflow of the lower section at the current moment, I t+Δt is the predicted flow of the upper section at the next moment, I t is the inflow of the upper section at the current moment, K and x are constants, K is the slope of the storage-flow relationship curve, and x is the flow density coefficient.
9. A runoff prediction device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a runoff prediction method as described in any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of a runoff prediction method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method for reversely deducing local inflow based on muskingum method
CN106909797A
Hydrological forecasting method based on physical process and interpretable deep learning dual drive
CN119204355A
Cited By
Runoff prediction method and device based on Xinanjiang-self-attention and medium
CN120952264A
River runoff prediction method and system based on mechanism-data coupling model
CN122197530A