Hydrological prediction method based on deep learning network and application and system thereof
By combining the Xin'anjiang model, Muskingen model, and LSTM model, and using Transformer to extract time series features and optimizing the LSTM network, the problem of insufficient accuracy of existing hydrological models in complex nonlinear hydrological processes is solved, and higher accuracy hydrological prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2026-03-10
AI Technical Summary
Existing hydrological models lack accuracy and generalization ability when faced with complex nonlinear hydrological processes, making it difficult to achieve accurate hydrological predictions.
By combining the Xin'anjiang model, the Muskingen model, and the LSTM model, the flow and rainfall data from upstream monitoring stations are preprocessed and normalized. The Transformer is used to extract time series features, and the data is then input into the LSTM network for training. The LSTM network is then optimized to achieve hydrological prediction.
It improves the accuracy and reliability of hydrological forecasting by comprehensively utilizing the physical mechanisms of traditional hydrological models and the nonlinear modeling capabilities of deep learning models, thereby enhancing the accuracy of forecasts.
Smart Images

Figure CN121638947A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of hydrological prediction technology and deep learning network application technology, and particularly to hydrological prediction methods, applications and systems based on deep learning networks. Background Technology
[0002] Hydrological forecasting refers to the qualitative or quantitative prediction of the hydrological conditions of a specific water body, region, or hydrological station within a certain future timeframe, based on previous or current hydrological and meteorological data. It is of great significance for flood control, drought relief, and the rational utilization of water resources. Furthermore, hydrological forecasting is an important aspect of hydrology's service to the economy and society, particularly in forecasting disastrous hydrological phenomena and providing short-, medium-, and long-term forecasts for the comprehensive utilization of large-scale water conservancy projects. Examples include: flood levels and flows, low-water levels and flows, sediment content, various ice conditions, and water quality.
[0003] With the widespread application of big data models, current hydrological models are widely used to predict the hydrological conditions of rivers and watersheds. Among them, the Xin'anjiang model and the Muskingan model are two classic hydrological models, widely used in watershed runoff calculation and river flood evolution calculation, respectively. However, these traditional models lack accuracy and generalization ability when facing complex nonlinear hydrological processes. In recent years, deep learning models, especially Transformer and LSTM models, have shown excellent performance in processing time series data. However, there is currently little literature revealing the use of combining Transformer and LSTM models for hydrological prediction. If combining these models can improve the accuracy of hydrological prediction and enhance the model's generalization ability and prediction accuracy, it will have positive practical significance for the field of hydrological prediction. Summary of the Invention
[0004] In view of this, the purpose of this invention is to propose a hydrological prediction method based on deep learning networks that is reliable in implementation, flexible in application, and has high accuracy in hydrological prediction results, as well as its application and system.
[0005] To achieve the above-mentioned technical objectives, the technical solution adopted by this invention is as follows:
[0006] A hydrological prediction method based on deep learning networks, comprising:
[0007] Several upstream monitoring stations were selected in the watershed to obtain their corresponding flow and rainfall data;
[0008] The flow and rainfall data corresponding to several upstream monitoring stations are preprocessed to fill in missing values and remove outliers, and then the preprocessed data are normalized.
[0009] Normalized flow and rainfall data from several upstream monitoring stations were input into the Xin'anjiang model for calculation to obtain the first confluence data.
[0010] Select one or more upstream monitoring stations that are similar to each other and meet the requirements, and input their normalized flow and rainfall data into the Muskingan model to calculate the second confluence data.
[0011] Normalized flow and rainfall data from several upstream monitoring stations are input into the Transformer encoder to extract time series features and obtain historical data features.
[0012] Historical data features, first confluence data, and second confluence data are used as training data to input into the LSTM for training, so as to optimize the LSTM network and obtain an LSTM network for predicting flow sequences. Then, the hydrological data is predicted by the LSTM network.
[0013] As one possible implementation, this solution further obtains flow data and rainfall data collected from several upstream monitoring stations, all of which cover hourly data within a preset time period, and the data dimensions include the hourly rainfall and the evaporation within a preset area.
[0014] As a preferred implementation option, this scheme preprocesses the flow and rainfall data corresponding to several upstream monitoring stations, including data cleaning and outlier removal.
[0015] Data cleaning processes include:
[0016] For traffic data, linear interpolation is used to fill in missing values. Assuming there is a missing data point y, the interpolation formula is as follows:
[0017]
[0018] Where t0, t1, and t are all time points, which are represented as timestamps;
[0019] y0 and y1 are known data values corresponding to time points t0 and t1;
[0020] t is the time of the interpolation point, which lies between time points t0 and t1;
[0021] y is the estimated value corresponding to the interpolation point t;
[0022] For rainfall data, when it is a null value, it is defined as 0;
[0023] Data outlier handling includes: for outlier data where the traffic data is negative, interpolation processing is performed using equation (1) to replace it.
[0024] As a preferred implementation option, the formula for normalizing the preprocessed data in this scheme is defined as follows:
[0025]
[0026] 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, that is, the data value after normalization.
[0027] As a preferred implementation option, this scheme preferably inputs normalized flow and rainfall data from several upstream monitoring stations into the Xin'anjiang model for calculation to obtain the first confluence data, including:
[0028] (1) Evapotranspiration calculation
[0029] In the evapotranspiration calculation, the observed value of the actual water surface evaporation value of the corresponding watershed of the upstream monitoring station is obtained, and the actual evapotranspiration E is calculated based on the three-layer evaporation model based on this observed value.
[0030] E consists of three parts: upper evaporation EU, lower evaporation EL, and deep evaporation ED;
[0031] 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 capacity of the three layers is: upper layer tension water capacity WUM, lower layer tension water capacity WLM, and deep layer tension water capacity WDM. The three together constitute the soil tension water capacity WM, and its formula is defined as follows:
[0032] WM = WUM + WLM + WDM
[0033] Wherein, WM is the soil tension water capacity, WUM is the upper tension water capacity, WLM is the lower tension water capacity, and WDM is the deep tension water capacity.
[0034] The input for evapotranspiration calculation is the measured surface evaporation E. The calculation parameters include: evapotranspiration conversion factor K and deep evaporation factor C. The module output includes the actual evapotranspiration of three layers: EU, EL, and ED, as well as the tension water content of three layers of soil: upper tension water content WU, lower tension water content WL, and deep tension water content WD.
[0035] The principle of three-layer evaporation calculation is as follows: the upper layer of tension water evaporates according to its evaporation capacity. When all the upper layer of tension water has evaporated, the remaining evaporation occurs from the lower layer of tension water. When the lower layer of tension water is insufficient for evaporation, the deeper layer of tension water begins to evaporate. The evaporation amount in the upper layer is calculated based on the evaporation capacity of the upper layer of tension water, and the calculation formula is as follows:
[0036] EU = EP = K × EM
[0037] Where, EU is the actual evapotranspiration of the upper layer, EP is the potential evapotranspiration; K is the evapotranspiration conversion coefficient, and EM is the actual water surface evaporation;
[0038] When the water content of the upper layer of tension water WU is not enough for evaporation, that is, WU + P - E < 0, the water content of the lower layer of tension water WL starts to evaporate. The calculation formula for the evaporation amount of the lower layer EL is:
[0039]
[0040] Where, EL is the actual evapotranspiration of the lower layer, EP is the potential evapotranspiration, WL is the water content of the lower layer of tension water, and WLM is the water capacity of the lower layer of tension water;
[0041] When EL / (EP - EU) > C, the lower layer evaporates completely and the deep tension water starts to evaporate. At this time, the calculation formula for the deep evaporation amount is:
[0042] ED = C × (EP - EU) - EL
[0043] Where, ED is the actual deep evapotranspiration, C is the deep evaporation coefficient, EP is the potential evapotranspiration, EL is the actual evapotranspiration of the lower layer, and EU is the actual evapotranspiration of the upper layer;
[0044] (2) Runoff generation calculation
[0045] Assume that the watershed has a certain water storage capacity. When this water storage capacity is satisfied, all precipitation becomes runoff, and the runoff generation shows the characteristics of storage control; the storage control characteristics of runoff generation in humid regions solve the problems of dealing with rainfall intensity and infiltration dynamic processes in runoff generation calculation in these regions. Its formula definition is as follows:
[0046]
[0047] Total runoff calculation formula:
[0048]
[0049] If P - E + A < WMM, partial runoff generation:
[0050]
[0051] If P - E + A ≥ WMM, whole-watershed runoff generation:
[0052] R = P - E - (WM - W0)
[0053] Among them, 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, which is usually related to the water storage characteristics of the soil; A is the antecedent precipitation index, P is the precipitation, WMM is the maximum soil water content; W0 is the initial soil water content, R is the total runoff, and E is the actual evapotranspiration;
[0054] (3) Water source division
[0055] The total runoff R calculated by the full - storage runoff generation model includes various runoff components. Since the confluence laws and confluence velocities of various water sources are different, the corresponding calculation methods are also different; therefore, water source division must be carried out;
[0056] Since the runoff - generating area of saturated overland flow is constantly changing, the distribution of free - water storage capacity on the runoff - generating area is uneven; the water source division structure uses a basin free - water storage capacity area distribution curve similar to the basin storage capacity area distribution curve to consider the problem of uneven distribution of free - water storage capacity within the basin. The so - called basin free - water storage capacity area distribution curve refers to: the cumulative frequency curve of the partial runoff - generating area changing with the free - water storage capacity. The line type of the basin free - water storage capacity area distribution curve is:
[0057]
[0058] Among them, f is the actual runoff; FFF is the total runoff; S′ is the current free - water storage; MS is the maximum free - water storage capacity, that is, the maximum storage capacity of free - water in the basin; EX is the curvature of the storage capacity curve, which affects the relationship between free - water storage and runoff - generating area;
[0059] If Q + AU < MS, then:
[0060]
[0061] If Q + AU ≥ MS, then:
[0062] RS=(Q + S - SM)×FR
[0063] Sub - surface flow:
[0064] RI = KI×S×FR
[0065] Base flow:
[0066] RG = KG×S×FR
[0067] Where Q is the free water storage capacity, AU is the change in free water storage capacity, MS is the saturated water storage capacity, SM is the free water storage capacity distribution curve parameter, FR is the runoff area ratio, KI is the interflow runoff coefficient, and KG is the groundwater runoff coefficient.
[0068] (4) Convergence calculation
[0069] Surface runoff runoff on slopes can be calculated using either a unit hydrograph or a linear reservoir. The formula for calculating runoff using a linear reservoir is as follows:
[0070] QS(t)=CS×QS(t-1)+(1-CS)×RS(t)×U
[0071] The confluence of interflows in the soil can be simulated using linear reservoirs or lag algorithms.
[0072] When using a linear reservoir, the calculation formula is:
[0073] QI(t)=CI×QI(t-1)+(1-CI)×RI(t)×U
[0074] When a linear reservoir is used for underground runoff collection:
[0075] QG(t)=QG(t-1)+(1-CG)×RG(t)×U
[0076] Total inflow into the river network per unit area:
[0077] QT(t) = QS(t) + QI(t) + QG(t)
[0078] For river network confluence within a unit area, a lag algorithm is used:
[0079] Q(t)=CR×Q(t-1)+(1-CR)×QT(tL)
[0080] Rivers converging below a unit area:
[0081] Q(t)=C0×I(t)+C1×I(t-1)+C2×Q(t-1)
[0082] Where CS is the linear reservoir coefficient of surface runoff and CI is the linear reservoir coefficient of interflow.
[0083] CG represents the linear reservoir coefficient for groundwater runoff, CR represents the coefficient of the river network lag algorithm; U represents the unit area, QT represents the total inflow of the river network per unit area, QS(t) represents the runoff volume of surface runoff at time t, QS(t-1) represents the runoff volume of surface runoff at time t-1, QI(t) represents the runoff volume of interflow at time t, QI(t-1) represents the runoff volume of interflow at time t-1; QG(t) represents the runoff volume of groundwater runoff at time t, QG(t-1) represents the runoff volume of groundwater runoff at time t-1, I(t) represents the inflow of the river channel below the unit area, C0, C1, C2 are all linear weighting coefficients for river channel runoff, and L represents the lag time.
[0084] The data obtained from the convergence calculation are aggregated and set as the first convergence data.
[0085] As a preferred implementation option, this scheme selects one or more upstream monitoring stations that are similar to each other and meet the requirements, and inputs their normalized flow and rainfall data into the Muskingan model to calculate the second confluence data, including:
[0086] From a pool of upstream monitoring stations, select one or more upstream stations that are similar in location and meet the requirements. Input their normalized flow and rainfall data into the Muskingan model for calculation.
[0087] The Muskingan method solves the water balance equations and tank storage equations obtained by approximating the Saint-Venant equations. Ignoring the inertia term, the simplified water balance equations and tank storage equations can be expressed as:
[0088]
[0089] W = K[xI + (1-x)O] = KQ′
[0090] Where Q′ is the storage flow rate, Q′=xI+(1-x)O; I, O, and W represent the inflow rate at the upper section, the outflow rate at the lower section, and the channel storage capacity, respectively; K is the slope of the storage-flow relationship curve, h can be regarded as a constant; and x is the flow rate specific gravity coefficient.
[0091] By combining the water balance equation and the tank storage equation, we can obtain:
[0092]
[0093] Since K and x can be considered constants, and I and O are represented using the central finite difference method:
[0094]
[0095] The equation can be simplified to:
[0096]
[0097] make:
[0098]
[0099] but:
[0100] O t+Δt =C1I t+Δt +C2I t +C3O t
[0101] In the formula, O t+Δt The outflow rate at the next cross-section; O t I represents the outflow rate of the cross section at the current moment. t+Δt The inflow rate at the upper section at the next moment; I t This represents the inflow rate at the current cross-section. Therefore, for a river segment, once the values of parameters K and x, and the calculation time period Δt, are determined, C1, C2, and C3 can be calculated, and then the inflow process I at the upper cross-section can be used to determine the inflow rate. t+Δt and the initial flow process of the lower section O t Calculate the flow rate O at the cross section at the next time step. t+Δt The calculated data is collected and set as the second confluence data.
[0102] As a preferred implementation option, the attention mechanism formula of the Transformer encoder described in this scheme is defined as follows:
[0103]
[0104] Where Q, K, and V are the query, key, and value matrices, respectively, and d k The dimension of the key.
[0105] As a preferred implementation option, this scheme preferably uses historical data features, first cascade data, and second cascade data as training data to input into the LSTM for training. The steps are as follows:
[0106] Forget Gate Calculation:
[0107] f t =σ(W f ·[h t-1 x t ]+b f )
[0108] Input gate calculation:
[0109] i t =v(W i ·[h t-1 x t]+b i )
[0110] Candidate memory cell state calculation:
[0111]
[0112] Memory cell state update:
[0113]
[0114] Output gate calculation and final output:
[0115] o t =σ(W o ·[h t-1 x t ]+b o )
[0116] h t =o t ·tanh(C t )
[0117] Where, x t It is the input feature sequence of the Long Short-Term Memory (LSTM) network, h t-1 It is the hidden state from the previous moment; C t It refers to the cellular state, h t It is the output state of the Long Short-Term Memory (LSTM) network; W f W i W C W o It is a weight matrix; b f b i b c b o σ is the bias term; σ(·) is the Sigmoid activation function, and tanh(·) is the hyperbolic tangent activation function.
[0118] As a preferred implementation option, this scheme uses historical data features, first confluence data, and second confluence data as training data to input into the LSTM for training. The model performance is judged by cross-validation and / or index validation of the LSTM, and then it is fine-tuned to obtain an LSTM network for predicting flow sequences. Then, the hydrology is predicted by the LSTM network.
[0119] Based on the above, this solution also provides a hydrological prediction method, which includes the hydrological prediction method based on deep learning networks described above.
[0120] Based on the above, this solution also provides a hydrological prediction system based on deep learning networks, which applies the hydrological prediction method based on deep learning networks described above.
[0121] Compared with existing technologies, the present invention, employing the above technical solution, has the following advantages: This solution ingeniously combines the Xin'anjiang model, the Muskingan model, and the LSTM model. By importing data (flow data and rainfall data) collected from upstream stations into the Xin'anjiang model and the Muskingan model, estimated confluence data is calculated. Simultaneously, a transformer model is used to extract the time series of the collected data. Then, historical data features, first confluence data, and second confluence data are used as training data and input into the LSTM network for training, thereby optimizing the LSTM network and obtaining an LSTM network for predicting flow sequences. Hydrological prediction is then performed using the LSTM network. This solution comprehensively utilizes the physical mechanism advantages of traditional hydrological models and the nonlinear modeling capabilities of deep learning models, improving the accuracy and reliability of hydrological prediction. Attached Figure Description
[0122] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0123] Figure 1 This is a simplified flowchart illustrating the principle of the hydrological prediction method in this scheme.
[0124] Figure 2 This is a data flow diagram of the water temperature prediction method in this scheme;
[0125] Figure 3 This is a flowchart of the calculation process for the Xin'anjiang model in this scheme. Detailed Implementation
[0126] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0127] Combination Figure 1 , Figure 2 As shown in the figure, this embodiment of the hydrological prediction method based on deep learning networks includes:
[0128] S01. Select several upstream monitoring stations in the watershed and obtain their corresponding flow and rainfall data;
[0129] S02. Preprocess the flow and rainfall data corresponding to several upstream monitoring stations to fill in missing values and remove outliers, and then normalize the preprocessed data.
[0130] S03. Input the normalized flow data and rainfall data from several upstream monitoring stations into the Xin'anjiang model for calculation to obtain the first confluence data;
[0131] S04. Select one or more upstream monitoring stations that are similar to each other and meet the requirements, and input their normalized flow data and rainfall data into the Muskingan model to calculate and obtain the second confluence data.
[0132] S05. Input the normalized flow data and rainfall data from several upstream monitoring stations into the Transformer encoder to extract time series features and obtain historical data features.
[0133] S06. Input the historical data features, the first confluence data, and the second confluence data as training data into the LSTM for training, so as to optimize the LSTM network and obtain an LSTM network for predicting flow sequences. Then, use the LSTM network to predict hydrology.
[0134] In this implementation scheme S01, the flow data and rainfall data collected by several upstream monitoring stations cover hourly data within a preset time period, and the data dimensions include the hourly rainfall and the evaporation within a preset area; for example, hourly data from 00:00 on 2000-01-01 to 00:00 on 2023-12-31.
[0135] In this plan, several upstream monitoring stations are selected in the basin to provide flow data for nine upstream stations in the Minjiang River Basin of Fujian Province: including the rainfall and data of the corresponding upstream rainfall stations at Yongkou, Shaxikou, Qilijie, Jianyang, Shaxian, Yangkou, Shaowu, Yong'an, and Ansha.
[0136] As a preferred implementation option, this scheme preprocesses the flow and rainfall data corresponding to several upstream monitoring stations, including data cleaning and outlier removal.
[0137] Data cleaning processes include:
[0138] For traffic data, linear interpolation is used to fill in missing values. Assuming there is a missing data point y, the interpolation formula is as follows:
[0139]
[0140] Where t0, t1, and t are all time points, which are represented as timestamps;
[0141] y0 and y1 are known data values corresponding to time points t0 and t1;
[0142] t is the time of the interpolation point, which lies between time points t0 and t1;
[0143] y is the estimated value corresponding to the interpolation point t;
[0144] For rainfall data, when it is a null value, it is defined as 0;
[0145] Data outlier handling includes: for outlier data where the traffic data is negative, interpolation processing is performed using equation (1) to replace it.
[0146] Z-score normalization, also known as zero-mean normalization, is applied to all dimensions of the data, transforming it into a distribution with a mean of 0 and a standard deviation of 1. This method is commonly used for data preprocessing to facilitate more efficient model training. As a preferred implementation option, this scheme preferably uses the following formula to normalize the preprocessed data:
[0147]
[0148] 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, that is, the data value after normalization.
[0149] In data computation, as a preferred implementation option, it combines... Figure 3 As shown, this scheme inputs normalized flow and rainfall data from several upstream monitoring stations into the Xin'anjiang model for calculation to obtain the first confluence data, including:
[0150] (1) Evapotranspiration calculation
[0151] In the evapotranspiration calculation, the observed value of the actual water surface evaporation value of the corresponding watershed of the upstream monitoring station is obtained, and the actual evapotranspiration E is calculated based on the three-layer evaporation model based on this observed value.
[0152] E consists of three parts: upper evaporation EU, lower evaporation EL, and deep evaporation ED;
[0153] 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 capacity of the three layers is: upper layer tension water capacity WUM, lower layer tension water capacity WLM, and deep layer tension water capacity WDM. The three together constitute the soil tension water capacity WM, and its formula is defined as follows:
[0154] WM = WUM + WLM + WDM
[0155] Wherein, WM is the soil tension water capacity, WUM is the upper tension water capacity, WLM is the lower tension water capacity, and WDM is the deep tension water capacity.
[0156] The input for evapotranspiration calculation is the measured surface evaporation E. The calculation parameters include: evapotranspiration conversion factor K and deep evaporation factor C. The module output includes the actual evapotranspiration of three layers: EU, EL, and ED, as well as the tension water content of three layers of soil: upper tension water content WU, lower tension water content WL, and deep tension water content WD.
[0157] The principle of three-layer evaporation calculation is as follows: the upper layer of tension water evaporates according to its evaporation capacity. When all the upper layer of tension water has evaporated, the remaining evaporation occurs from the lower layer of tension water. When the lower layer of tension water is insufficient for evaporation, the deeper layer of tension water begins to evaporate. The evaporation amount in the upper layer is calculated based on the evaporation capacity of the upper layer of tension water, and the calculation formula is as follows:
[0158] EU = EP = K × EM
[0159] Where EU is the actual evapotranspiration in the upper layer, EP is the potential evapotranspiration, K is the evapotranspiration conversion factor, and EM is the actual water surface evaporation.
[0160] When the upper layer of tension water (WU) is insufficient for evaporation, i.e., WU + PE < 0, the lower layer of tension water (WL) begins to evaporate. The formula for calculating the lower layer evaporation rate (EL) is as follows:
[0161]
[0162] Wherein, EL is the actual evapotranspiration of the lower layer, EP is the potential evapotranspiration, WL is the tension water content of the lower layer, and WLM is the tension water capacity of the lower layer;
[0163] When EL / (EP-EU)>C, all the lower layer evaporates and the deep layer tension water begins to evaporate. At this time, the formula for calculating the deep layer evaporation is:
[0164] ED = C × (EP - EU) - EL
[0165] Where ED is the actual evaporation rate of the deep layer, C is the deep evaporation coefficient, EP is the potential evaporation rate, EL is the actual evaporation rate of the lower layer, and EU is the actual evaporation rate of the upper layer.
[0166] (2) Production flow calculation
[0167] Full - storage runoff generation means that: before precipitation meets the field capacity, no runoff occurs and all precipitation is absorbed by the soil; after precipitation meets the field capacity, all precipitation (deducting the同期 evaporation) generates runoff. Its concept is to assume that the basin has a certain water - storage capacity. When this water - storage capacity is met, all precipitation becomes runoff, and the runoff generation shows the characteristics of storage - volume control; the storage - volume control characteristics of runoff generation in humid areas solve the problem of dealing with rainfall intensity and infiltration dynamic processes in runoff - generation calculation in these areas. Its formula definition is as follows:
[0168]
[0169] Total runoff calculation formula:
[0170]
[0171] If P - E+A < WMM, partial runoff generation:
[0172]
[0173] If P - E+A≥WMM, full - basin runoff generation:
[0174] R = P - E-(WM - W0)
[0175] Where, f is the actual runoff volume; F is the total runoff volume; 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, which is usually related to the water - storage characteristics of the soil; A is the antecedent precipitation effect, P is the precipitation, WMM is the maximum soil water content; W0 is the initial soil water content, R is the total runoff volume, and E is the actual evapotranspiration;
[0176] (3) Water source division
[0177] The total runoff volume R calculated according to the full - storage runoff - generation model includes various runoff components. Since the confluence laws and confluence velocities of various water sources are different, the corresponding calculation methods are also different; therefore, water source division must be carried out;
[0178] Because the runoff - generation area of saturated overland flow is constantly changing, the distribution of free - water storage capacity on the runoff - generation area is uneven; the water - source division structure uses a basin free - water storage - capacity area - distribution curve similar to the basin storage - capacity area - distribution curve to consider the problem of uneven distribution of free - water storage capacity in the basin. The so - called basin free - water storage - capacity area - distribution curve refers to: the cumulative frequency curve of the partial runoff - generation area changing with the free - water storage capacity. The line type of the basin free - water storage - capacity area - distribution curve is:
[0179]
[0180] It should be noted that there is an unclear "同期 evaporation" in the original text. It might be a misspelling or an unclear expression. If it is "simultaneous evaporation", it can be translated as "同期蒸发量". If it is something else, it needs to be further clarified for a more accurate translation.f is the actual runoff; FFF is the total runoff; S′ is the current free water storage; MS is the maximum free water storage capacity, that is, the maximum storage capacity of free water in the basin; EX is the curvature of the storage capacity curve, which affects the relationship between free water storage and runoff generation area;
[0181] If Q + AU < MS, then:
[0182]
[0183] If Q + AU ≥ MS, then:
[0184] RS = (Q + S - SM) × FR
[0185] Subsurface flow:
[0186] RI = KI × S × FR
[0187] Baseflow:
[0188] RG = KG × S × FR
[0189] 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 parameter of the free water storage capacity distribution curve, FR is the runoff generation area ratio, KI is the subsurface flow runoff coefficient, and KG is the baseflow runoff coefficient;
[0190] (4) Confluence calculation
[0191] For the hillslope confluence of surface runoff, the unit hydrograph or a linear reservoir is adopted. The calculation formula for adopting a linear reservoir is:
[0192] QS(t) = CS × QS(t - 1) + (1 - CS) × RS(t) × U
[0193] The confluence of subsurface flow can be simulated by a linear reservoir or a lag algorithm.
[0194] When a linear reservoir is adopted, the calculation formula is:
[0195] QI(t) = CI × QI(t - 1) + (1 - CI) × RI(t) × U
[0196] When a linear reservoir is adopted for the confluence of baseflow:
[0197] QG(t) = QG(t - 1) + (1 - CG) × RG(t) × U
[0198] Total inflow into the river network of the unit area:
[0199] QT(t) = QS(t) + QI(t) + QG(t)
[0200] For river network confluence within a unit area, a lag algorithm is used:
[0201] Q(t)=CR×Q(t-1)+(1-CR)×QT(tL)
[0202] Rivers converging below a unit area:
[0203] Q(t)=C0×I(t)+C1×I(t-1)+C2×Q(t-1)
[0204] Where CS is the linear reservoir coefficient of surface runoff and CI is the linear reservoir coefficient of interflow.
[0205] CG represents the linear reservoir coefficient for groundwater runoff, CR represents the coefficient of the river network lag algorithm; U represents the unit area, QT represents the total inflow of the river network per unit area, QS(t) represents the runoff volume of surface runoff at time t, QS(t-1) represents the runoff volume of surface runoff at time t-1, QI(t) represents the runoff volume of interflow at time t, QI(t-1) represents the runoff volume of interflow at time t-1; QG(t) represents the runoff volume of groundwater runoff at time t, QG(t-1) represents the runoff volume of groundwater runoff at time t-1, I(t) represents the inflow of the river channel below the unit area, C0, C1, C2 are all linear weighting coefficients for river channel runoff, and L represents the lag time.
[0206] Finally, the data obtained from the convergence calculation are aggregated and set as the first convergence data.
[0207] In the calculation of the Muskingan model, as a preferred implementation option, this scheme selects one or more upstream monitoring stations that are similar to each other and meet the requirements (for example, Yongkou, Qilijie, and Shaxikou in the upper reaches of the Minjiang River basin), and inputs their normalized flow and rainfall data into the Muskingan model to obtain the second confluence data, including:
[0208] From a pool of upstream monitoring stations, select one or more upstream stations that are similar in location and meet the requirements. Input their normalized flow and rainfall data into the Muskingan model for calculation.
[0209] The Muskingan method solves the water balance equations and tank storage equations obtained by approximating the Saint-Venant equations. Ignoring the inertia term, the simplified water balance equations and tank storage equations can be expressed as:
[0210]
[0211] W = K[xI + (1-x)O] = KQ′
[0212] Where Q′ is the storage flow rate, Q′=xI+(1-x)O; I, O, and W represent the inflow rate at the upper section, the outflow rate at the lower section, and the channel storage capacity, respectively; K is the slope of the storage-flow relationship curve, h can be regarded as a constant; and x is the flow rate specific gravity coefficient.
[0213] By combining the water balance equation and the tank storage equation, we can obtain:
[0214]
[0215] Since K and x can be considered constants, and I and O are represented using the central finite difference method:
[0216]
[0217] The equation can be simplified to:
[0218]
[0219] make:
[0220]
[0221] but:
[0222] O t+Δt =C1I t+Δt +C2I t +C3O t
[0223] In the formula, O t+Δt The outflow rate at the next cross-section; O t I represents the outflow rate of the cross section at the current moment. t+Δt The inflow rate at the upper section at the next moment; I t This represents the inflow rate at the current cross-section. Therefore, for a river segment, once the values of parameters K and x, and the calculation time period Δt, are determined, C1, C2, and C3 can be calculated, and then the inflow process I at the upper cross-section can be used to determine the inflow rate. t+Δt and the initial flow process of the lower section O t Calculate the flow rate O at the cross section at the next time step. t+Δt The calculated data is collected and set as the second confluence data.
[0224] As a preferred implementation option, the attention mechanism formula of the Transformer encoder described in this scheme is defined as follows:
[0225]
[0226] Where Q, K, and V are the query, key, and value matrices, respectively, and d k The dimension of the key.
[0227] As a preferred implementation option, this scheme preferably uses historical data features, first cascade data, and second cascade data as training data to input into the LSTM for training. The steps are as follows:
[0228] Forget Gate Calculation:
[0229] f t =σ(W f ·[h t-1 x t ]+b f )
[0230] Input gate calculation:
[0231] i t =σ(W i ·[h t-1 x t ]+b i )
[0232] Candidate memory cell state calculation:
[0233]
[0234] Memory cell state update:
[0235]
[0236] Output gate calculation and final output:
[0237] o t =σ(W o ·[h t-1 x t ]+b o )
[0238] h t =o t ⊙tanh(C t )
[0239] Where, x t It is the input feature sequence of the Long Short-Term Memory (LSTM) network, h t-1 It is the hidden state from the previous moment; C t It refers to the cellular state, h t It is the output state of the Long Short-Term Memory (LSTM) network; W f W i W C W o It is a weight matrix; b f b i b c b oσ is the bias term; σ(·) is the Sigmoid activation function, and tanh(·) is the hyperbolic tangent activation function.
[0240] As a preferred implementation option, this scheme uses historical data features, first confluence data, and second confluence data as training data to input into the LSTM for training. The model performance is judged by cross-validation and / or index validation of the LSTM, and then it is fine-tuned to obtain an LSTM network for predicting flow sequences. Then, the hydrology is predicted by the LSTM network.
[0241] In this scheme, the Xin'anjiang model and the Muskingan model can be optimized to obtain better confluence data prediction. Specifically, the SCE_UA parameter calibration method can be used to jointly optimize the parameters of the Xin'anjiang and Muskingan models. Adjustable parameters include:
[0242]
[0243]
[0244] For optimizing the Transformer LSTM deep learning network model, the following methods can be used:
[0245] (1) Layer adjustment: Increase or decrease the number of Transformer layers or the number of units in the LSTM hidden layer.
[0246] (2) Learning rate: Adjust the learning rate and its scheduling strategy (e.g., learning rate decay, warm-up).
[0247] (3) Batch size: Modify the batch size to affect training stability and convergence speed.
[0248] (4) Optimizer selection: Try different optimizers, such as Adam, AdamW or RMSProp.
[0249] (4) Early stopping method: Use early stopping method to monitor validation set performance to prevent overfitting.
[0250] (5) Regularization: Apply dropout or L2 regularization to reduce overfitting.
[0251] (6) Adaptive learning rate: Apply adaptive learning rate strategies, such as learning rate schedulers, to adjust the learning rate.
[0252] In addition, the aforementioned method of judging model performance by performing cross-validation and / or metric validation on LSTM, followed by optimization, may include the following:
[0253] Cross-validation
[0254] The k-fold cross-validation method is used to evaluate the model performance. The cross-validation steps are as follows:
[0255] 1. Divide the dataset into k subsets.
[0256] 2. Select one subset as the validation set and the remaining subsets as the training set.
[0257] 3. Train the model and calculate the error on the validation set.
[0258] 4. Repeat the above steps k times, and finally take the average error as the performance index of the model.
[0259] Indicator Validation
[0260] The fitness function during training is RMSE, where Root Mean Square Error (RMSE) is the square root of the average of the squares of the errors between predicted and actual values. It measures the accuracy of the model's predictions; a smaller RMSE value indicates better predictive performance. The specific formula is as follows:
[0261]
[0262] Where: N is the number of samples. yi is the i-th actual value. y^i is the i-th predicted value.
[0263] The evaluation metric used is NSE, or Nash-Sutcliffe Efficiency (NSE), which measures the predictive ability of a model and assesses how well the model's predictions fit the actual observed values. NSE values range from negative infinity to 1, where 1 represents a perfect fit, 0 indicates the model's predictive ability is the same as the simple mean, and values less than 0 indicate the model's predictive ability is worse than the mean of the observed data. The specific formula is as follows:
[0264]
[0265] Where: N is the number of samples. yi is the i-th actual value. It is the i-th predicted value. It is the actual average value.
[0266] As an example, suppose that during the simulation, there are 5 sets of sample data as follows.
[0267] Actual value (y) i ): [3,5,2.5,6,4.5]
[0268] Predicted value [2.5, 5.5, 2, 5, 4]
[0269] When performing indicator verification, the following are included:
[0270] Step 1: Calculate RMSE
[0271] First, calculate the squared prediction error for each sample:
[0272] (3-2.5) 2 =0.25
[0273] (5-5.5) 2 =0.25
[0274] (2.5-2) 2 =0.25
[0275] (6-5) 2 =1
[0276] (4.5-4) 2 =0.25
[0277] Then, calculate the average of these squared errors:
[0278]
[0279] Finally, take the root mean square error:
[0280]
[0281] Step 2: Calculate NSE
[0282] First, calculate the average of the actual values.
[0283]
[0284] Then, calculate the squared prediction error for each sample and the square of the actual value versus the mean for each sample: (3-2.5)² = 0.25
[0285] (5-5.5)² = 0.25
[0286] (2.5-2)² = 0.25
[0287] (6-5)²=1
[0288] (4.5-4)² = 0.25
[0289] (3-4.2) 2 =11.44
[0290] (5-4.2)² = 0.64
[0291] (2.5-4.2)² = 2.89
[0292] (6-4.2)² = 3.24
[0293] (4.5-4.2)² = 0.09
[0294] Then calculate the sum of these squares:
[0295]
[0296] Finally, calculate NSE:
[0297]
[0298] Therefore, the RMSE of the given simulation dataset is 0.632 and the NSE is 0.759.
[0299] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A hydrological prediction method based on a deep learning network, characterized by, It comprises: Select several upstream monitoring sites in the river basin, and obtain the corresponding collected flow data and rainfall data; Preprocess the flow data and rainfall data corresponding to the several upstream monitoring sites to fill in the missing values and remove the abnormal values, and then normalize the preprocessed data; Input the normalized flow data and rainfall data of the several upstream monitoring sites into the Xin'anjiang model for calculation to obtain first confluence data; Select one or more upstream sites with similar sites and meeting the requirements from the several upstream monitoring sites, input the normalized flow data and rainfall data thereof into the Muskingum model for calculation to obtain second confluence data; Input the normalized flow data and rainfall data of the several upstream monitoring sites into the Transformer encoder to extract time series features and obtain historical data features; Input the historical data features, first confluence data and second confluence data into the LSTM as training data for training to optimize the LSTM network, obtain the LSTM network for predicting flow sequence, and then predict hydrology through the LSTM network. 2.The hydrological forecasting method based on deep learning network according to claim 1, wherein, The flow data and rainfall data corresponding to the several upstream monitoring sites cover hourly data in a preset time period, and the data dimensions include rainfall of each hour and evaporation of a preset regional range. 3.The hydrological forecasting method based on deep learning network according to claim 1 or 2, characterized in that, The preprocessing of the flow data and rainfall data corresponding to the several upstream monitoring sites includes data cleaning and data abnormal value removal; The data cleaning includes: For flow data, linear interpolation is used to fill in missing values, and the interpolation formula is as follows: Where t0, t1, t are time points, represented as timestamps; y0, y1 are known data values corresponding to time points t0, t1; t is the time of the interpolation point, which is between time points t0 and t1; y is the estimated value corresponding to the interpolation point t; For rainfall data, when it is null, it is defined as 0; The data abnormal value processing includes: for abnormal data with negative flow data, formula (1) is used for interpolation processing replacement. 4.The hydrological forecasting method based on deep learning network according to claim 3, wherein, The formula for normalizing the preprocessed data is defined as follows: 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, i.e. the data value after normalization. 5.The hydrological forecasting method based on deep learning network according to claim 4, wherein, Inputting the normalized flow data and rainfall data of the several upstream monitoring sites into the Xin'anjiang model for calculation to obtain first confluence data includes: (1) Evaporation calculation In evaporation calculation, the observed value of the actual water surface evaporation value of the upstream monitoring site corresponding to the river basin is obtained, and based on the three-layer evaporation mode, the actual evaporation E is calculated according to the observed value; Where E is composed of three parts: upper layer evaporation EU, lower layer evaporation EL and deep layer evaporation ED; The evapotranspiration of the three layers is closely related to the water storage capacity of each layer and the current water content of each layer. The water storage capacity of the three layers is: the upper layer water capacity WUM, the lower layer water capacity WLM, and the deep layer water capacity WDM. These three capacities together constitute the soil water capacity WM, which is defined as follows: WM = WUM + WLM + WDM Where WM is the soil water capacity, WUM is the upper layer water capacity, WLM is the lower layer water capacity, and WDN is the deep layer water capacity. The input for evapotranspiration calculation is the measured water evaporation E, and the calculation parameters include evapotranspiration conversion coefficient K and deep layer evaporation coefficient C. The output of the module includes the actual evapotranspiration of the three layers: EU, EL, and ED, as well as the soil water content of the three layers: upper layer water content WU, lower layer water content WL, and deep layer water content WD. The calculation principle of the three-layer evapotranspiration is as follows: the upper layer water evaporates according to the evapotranspiration capacity, when the upper layer water is completely evaporated, the remaining evaporation comes from the lower layer water, and when the lower layer water is not enough to evaporate, the deep layer water starts to evaporate. The upper layer evaporation is calculated by the upper layer water according to the evapotranspiration capacity, and the calculation formula is: EU = EP = K × EM Where EU is the actual evapotranspiration of the upper layer, EP is the potential evapotranspiration, K is the evapotranspiration conversion coefficient, and EM is the actual water evaporation. When the upper layer water content WU is not enough to evaporate, that is, WU + P - E < 0, the lower layer water WL starts to evaporate, and the lower layer evaporation EL is calculated as follows: EL = (WLM - WL) × (P - E - WU) Where EL is the actual evapotranspiration of the lower layer, EP is the potential evapotranspiration, WL is the lower layer water content, and WLM is the lower layer water capacity. When EL / (EP-EU) > C, the lower layer is completely evaporated and the deep layer water starts to evaporate, and the deep layer evaporation ED is calculated as follows: ED = C × (EP - EU) - EL Where ED is the actual evapotranspiration of the deep layer, C is the deep layer evaporation coefficient, EP is the potential evapotranspiration, EL is the actual evapotranspiration of the lower layer, and EU is the actual evapotranspiration of the upper layer. (2) Runoff calculation Assuming that the watershed has a certain water storage capacity, when this water storage capacity is met, all precipitation becomes runoff, and the runoff is characterized by storage control. The runoff calculation in wet areas solves the problem of processing rainfall intensity and infiltration dynamic process, and its formula is defined as follows: Total runoff calculation formula: If P - E + A < WMM, local runoff: If P - E + A ≥ WMM, total watershed runoff: R = P - E - (WM - W0) Where f is the actual runoff, F is the total runoff, W' is the current soil moisture content, WMM is the maximum soil water capacity, B is the index of the water storage capacity curve, which is usually related to the water storage characteristics of the soil, A is the previous influence, P is the precipitation, WMM is the maximum soil moisture content, W0 is the initial soil moisture content, R is the total runoff, and E is the actual evapotranspiration. (3) Water source division The total runoff R calculated by the full storage runoff model includes various runoff components. Because the confluence law and confluence velocity of various water sources are different, the calculation methods used are also different. Therefore, water source division must be performed. Because the saturated slope flow production area is constantly changing, the free water storage capacity distribution on the production area is uneven. The water source division structure uses a watershed free water storage capacity area distribution curve similar to the watershed storage capacity area distribution curve to consider the uneven distribution of free water storage capacity in the watershed. The watershed free water storage capacity area distribution curve refers to the cumulative frequency curve of the partial runoff area with free water storage capacity. The line type of the watershed free water storage capacity area distribution curve is: where f is the actual runoff; FFF is the total runoff; S' is the current free water storage; MS is the maximum free water storage capacity, i.e., the maximum storage capacity of free water in the watershed; EX is the curvature of the storage capacity curve, which affects the relationship between free water storage and production area; If Q + AU < MS, then: If Q + AU ≥ MS, then: RS = (Q + S - SM) × FR Soil water flow: RI = KI × S × FR Groundwater flow: RG = KG × S × FR where Q is the free water storage capacity, AU is the free water storage capacity change, 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 soil water runoff coefficient, and KG is the groundwater runoff coefficient. (4) Confluence calculation The slope confluence of surface runoff uses a unit line or a linear reservoir. The calculation formula when a linear reservoir is used is: QS(t) = CS × QS(t - 1) + (1 - CS) × RS(t) × U Soil water flow confluence can be simulated using a linear reservoir or a lagged routing algorithm. When a linear reservoir is used, the calculation formula is: QI(t) = CI × QI(t - 1) + (1 - CI) × RI(t) × U Groundwater flow confluence when a linear reservoir is used: QG(t) = QG(t - 1) + (1 - CG) × RG(t) × U Total inflow of the unit area river network: QT(t) = QS(t) + QI(t) + QG(t) Unit area river network confluence using a lagged routing algorithm: Q(t) = CR × Q(t - 1) + (1 - CR) × QT(t - L) River confluence below the unit area: Q(t) = C0 × I(t) + C1 × I(t - 1) + C2 × Q(t - 1) where CS is the linear reservoir coefficient of surface runoff, and CI is the linear reservoir coefficient of soil water flow. CG is the linear reservoir coefficient of underground runoff, CR is the coefficient of river network lagging calculation; U is unit area, QT is the total inflow of unit area river network, QS(t) is the catchment flow of surface runoff at time t, QS(t-1) is the catchment flow of surface runoff at time t-1, QI(t) is the catchment flow of soil water at time t, QI(t-1) is the catchment flow of soil water at time t-1; QG(t) is the catchment flow of underground runoff at time t, QG(t-1) is the catchment flow of underground runoff at time t-1, I(t) is the inflow of unit area river channel, C0, C1, C2 are linear weight coefficients of river channel confluence, L is the lag time; The data obtained by the confluence calculation is collected and set as first confluence data. 6.The hydrological forecasting method based on deep learning network according to claim 4, wherein, Select one or more upstream stations from several upstream monitoring stations that are similar and meet the requirements, input the normalized flow data and rainfall data of the selected stations into the Muskingum model for calculation to obtain second confluence data, including: Select one or more upstream stations from several upstream monitoring stations that are similar and meet the requirements, input the normalized flow data and rainfall data of the selected stations into the Muskingum model for calculation, The Muskingum method solves the water balance equation and the tank storage equation obtained by approximating the Saint-Venant equation group. Under the premise of ignoring the inertia term, the simplified water balance equation and tank storage equation can be expressed as: W = K[xI + (1-x)O] = KQ' Where Q' is the storage flow, Q' = xI + (1-x)O; I, O, W represent the inflow of the upper section of the river, the outflow of the lower section of the river, and the tank storage, respectively; K is the slope of the storage-flow relationship curve, h can be regarded as a constant; x is the flow proportionality coefficient; The simultaneous water balance equation and tank storage equation can be obtained: Because K and x can be regarded as constants, I and O are expressed in the form of central finite difference: The equation can be simplified as: Let: Then: O t+Δt =C1I t+Δt +C2I t +C3O t where O t+Δt is the outflow of the lower cross-section at the next time; O t is the outflow of the lower cross-section at the current time; I t+Δt is the inflow of the upper cross-section at the next time; I t is the inflow of the upper cross-section at the current time. Thus, for a river reach, once the parameters K, x and the calculation time interval Δt are determined, C1, C2 and C3 can be calculated, and then the inflow process I t+Δt and the outflow process O t of the lower cross-section at the current time can be calculated to obtain the outflow O t+Δt of the lower cross-section at the next time; the calculated data are collected to form the second confluence data. 7.The hydrological forecasting method based on deep learning network according to claim 4, wherein, The attention mechanism formula of the Transformer encoder is defined as follows: Wherein Q, K, V are query, key, value matrix respectively, d k is the dimension of the key. 8.The hydrological forecasting method based on deep learning network according to claim 4, wherein, The historical data features, first confluence data, and second confluence data are input into the LSTM as training data for training. The training steps are as follows: Forget gate calculation: f t = σ(W f · [h t-1 , x t ]+ b f ) Input gate calculation: i t = σ(W i · [h t-1 , x t ]+ b i ) Candidate memory cell state calculation: Memory cell state update: Output gate calculation and final output: o t = σ(W o · [h t-1 , x t ]+ b o ) h t = o t tanh(C t ) wherein x t is an input feature sequence of the long short-term memory network LSTM, h t-1 is a hidden state of a previous time; C t is a cell state, h t is an output state of the long short-term memory network LSTM; W f , W i , W C , W o are weight matrices; b f , b i , b c , b o are bias terms; and σ(·) is a Sigmoid activation function, and tanh(·) is a hyperbolic tangent activation function. 9.The hydrological forecasting method based on deep learning network according to claim 8, wherein, When the historical data features, first confluence data, and second confluence data are input into the LSTM as training data for training, the performance of the model is judged by cross-validation and / or index validation of the LSTM, and then the model is optimized to obtain the LSTM network for predicting the flow sequence. Then the hydrology is predicted through the LSTM network.
10. A hydrological prediction system based on a deep learning network, characterized by, Its application has the hydrological prediction method based on deep learning network of any one of claims 1 to 9.