Method for calculating water flow exchange capacity of river-through lake

Through the CNN-LSTM-AT model combined with river and lake basin data, the problem of ignoring the basin rainfall and uncontrolled inflow in the water flow exchange volume prediction of Tongjiang Lake is solved, and a more accurate prediction of water flow exchange volume is achieved.

CN120277635APending Publication Date: 2025-07-08SOUTH CENTRAL UNIVERSITY FOR NATIONALITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510350601.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When calculating the water flow exchange volume of Tongjiang Lake, the prior art failed to effectively consider the impact of basin rainfall and uncontrolled interval inflow processes, resulting in inaccurate prediction results.

Method used

Using the method based on the CNN-LSTM-AT model, the Tongjiang Lake outflow process model is constructed, combined with the incoming water flow, water level and rainfall data of the main and tributary streams of the river and lake basins, the spatial features are extracted using a convolutional neural network (CNN), and the long and short-term memory network (LSTM) captures the time features, and the attention mechanism is weighted to sum it to output the prediction results of the water flow exchange volume.

Benefits of technology

It improves the accuracy and fit of the prediction of water flow exchange volume, can better handle the interdependence of multivariable time series, make up for the shortcomings of traditional hydrological models, and provides higher prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277635A_ABST
    Figure CN120277635A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of hydrology, and relates to a river-through lake water flow exchange capacity calculation method, which comprises the following steps: 1) acquiring a data set for modeling in a target time period; 2) constructing a river-through lake outflow process model based on the data set for modeling in the target time period obtained in the step 1); 3) acquiring actual measurement data of other time periods except the target time period, wherein the actual measurement data comprises the incoming water flow of the main and branch flows of the river and lake basin, the water level of the main and branch flows of the river and lake basin and / or the rainfall data of the monitoring station; and 4) inputting the measured data obtained in the step 3) into the outflow process model of the river-through lake constructed in the step 2), and outputting a predicted value of the water flow exchange capacity of the river-through lake to complete prediction or calculation of the water flow exchange capacity of the river-through lake. The invention provides the calculation method for the water flow exchange capacity of the river-through lake, which is small in limitation and accurate in prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of hydrology, and relates to a method for calculating the water flow exchange volume of a river-connected lake, in particular to a method for calculating the water flow exchange volume of a river-connected lake based on a CNN-LSTM-AT model. Background Technique

[0002] The regulation of the water flow exchange volume of large river-connected lakes plays a key role in regional economic and social development, flood control and disaster reduction, and ensuring the safety of people's lives and property. Especially for typical river-connected lakes such as Dongting Lake and Poyang Lake, after the Three Gorges Reservoir stores water, the river channel downstream of the dam is continuously scoured and incised, the hydraulic connection relationship between the river and lake systems deteriorates continuously, the dry season duration of the lake is greatly extended, and the ecological environment is threatened. With decades of exploration of the comprehensive management of rivers and lakes in China, a large amount of valuable experience in the regulation of river basin water systems has been accumulated. For example, some scholars have explored the "clear water storage and muddy water discharge" reservoir operation mode condensed after the regulation of the Sanmenxia Reservoir on the Yellow River, which provides important guidance for the subsequent ecological management of river and lake systems. However, with the accumulation of the operation time of the reservoir, the contradictions between the scour of the river channel downstream of the dam and the increasing siltation of the lake and reservoir have gradually emerged, and it is particularly important to carry out comprehensive optimization regulation work for the river and lake system.

[0003] The existing research on the optimization regulation of rivers and lakes mainly focuses on the main stream reservoirs. Single-objective or multi-objective main stream reservoir regulation models, main stream reservoir-river coupling regulation models, and main stream cascade reservoir-river coupling models are constructed according to different regulation objectives such as reservoir sedimentation, flood control, ecology, and power generation, and mathematical programming methods, intelligent computing and other methods are used to solve the models, and a large number of effective results have been obtained. However, relatively few studies have been carried out on the fine process of lake water flow exchange under the action of reservoir regulation while considering the hydraulic connection between rivers and lakes and the influence of rainfall. In fact, there are many influencing factors in the lake water flow exchange process, which not only involve inflowing tributaries, reservoir regulation, the hydraulic connectivity of main and tributary rivers, but also are affected by factors such as basin rainfall and unregulated interval inflow (such as groundwater exchange, farmland irrigation inflow). It is difficult for the conventional hydrological models and hydrodynamic models used in the study of river and lake systems in the past to quantitatively consider all these factors at the same time, resulting in large errors in the calculation results of the flow process under the coupling action of multiple factors. Therefore, it is of great practical significance to study the lake water flow exchange process affected by multiple factors such as the confluence of main and tributary rivers. For the prediction method of multivariate time series, the value of each variable depends not only on the historical value but also on other variables, and it is usually assumed in advance that there is a mutual dependence relationship between the variables. However, the previous models more or less ignored the potential mutual dependence relationship between the variables, which had a certain impact on the accuracy of the model prediction results. The CNN-LSTM-AT model can pay attention to the mutual dependence relationship between the inflowing tributaries in the sequence and can effectively improve the accuracy of the prediction results.

[0004] In summary, the existing calculation methods for the outflow process in the study of lakes connected to rivers (water volume exchange calculation methods and systems) mainly consider the role of tributaries flowing into the lake, ignoring the positive impact of basin rainfall and the inflow process in unregulated areas on the lake outflow, resulting in a low efficiency of the lake outflow. Summary of the Invention

[0005] To solve the above technical problems existing in the background art, the present invention provides a calculation method for the water flow exchange volume of lakes connected to rivers with small limitations and accurate prediction results.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A calculation method for the water flow exchange volume of lakes connected to rivers, characterized in that: the calculation method for the water flow exchange volume of lakes connected to rivers includes the following steps:

[0008] 1) Obtain the data set for modeling within the target time period;

[0009] 2) Based on the data set for modeling within the target time period obtained in step 1), construct an outflow process model for the lake connected to the river;

[0010] 3) Obtain the measured data for other time periods except the target time period; the measured data includes the incoming water flow of the main and tributary rivers in the river-lake basin, the water levels of the main and tributary rivers in the river-lake basin, and / or the rainfall data of the monitoring stations;

[0011] 4) Input the measured data obtained in step 3) into the outflow process model for the lake connected to the river constructed in step 2), and output the predicted value of the water volume exchange volume of the lake connected to the river, completing the prediction or calculation of the water flow exchange volume of the lake connected to the river.

[0012] Preferably, the specific implementation manner of step 1) is:

[0013] 1.1) Obtain the basic data; the basic data includes the river flow time series data, the series characteristic data of the monitoring stations of the sub-confluence and diversion channels in the basin, the water level data in the basin, and the series data of the rainfall observation stations in the basin;

[0014] 1.2) Preprocess the basic data obtained in step 1.1) to obtain a data set;

[0015] 1.3) Divide the data set obtained in step 1.2) into a training set and a test set according to a ratio of 8:2; the training set and the test set constitute the data set for modeling.

[0016] Preferably, the specific implementation manner of step 1.2) is:

[0017] 1.2.1) Perform cleaning processing on the basic data obtained in step 1.1), and the cleaning processing method is to remove outliers and / or remove missing values;

[0018] 1.2.2) Perform min-max normalization on the basic data after cleaning processing;

[0019] 1.2.3) Perform format conversion on the data obtained in step 1.2.2).

[0020] Preferably, the method of min-max normalization in step 1.2.2) is as follows:

[0021]

[0022] Where:

[0023] x represents the multi-influence variable feature after cleaning processing;

[0024] x max represents the maximum value calculated in the multi-influence variable feature;

[0025] x min represents the minimum value calculated in the multi-influence variable feature;

[0026] x ′ represents the normalized value.

[0027] The specific implementation method of step 1.2.3) is: convert the normalized multi-influence variable feature into a data set with input features and output labels, use the first data of the multi-influence variable feature as the first data, determine the sequence length of the multi-influence variable feature, use every N data as a group of sample data, where the first N-1 data are used as historical data X, and the last data is used as prediction data Y, and the sliding window step size is 1, that is, n-(N-1) groups of sample data can be extracted from every n data, and the format conversion of the data after normalization is completed; the expressions of the historical data set X and the prediction data set Y are:

[0028] X = {X1, X2, X3, X4…X i …X n}

[0029] Y = {Y1, Y2, Y3, Y4…, Y i , …, Y n}

[0030] X i = {P i , P i+1 , P i+2 , P i+3 , P i+4 , P i+5 , P i+6 , …, P i+N-2}

[0031] Y i = {P i+N-1}

[0032] Wherein:

[0033] X i is the i-th group of samples in the historical dataset;

[0034] Y i is the i-th group of samples in the prediction dataset.

[0035] Preferably, the specific implementation manner of step 2) is:

[0036] 2.1) Construct a CNN-LSTM-AT time series prediction model; the CNN-LSTM-AT time series prediction model includes a CNN convolutional layer, a CNN pooling layer, a bidirectional connection layer of CNN and LSTM, an LSTM layer, and an Attention layer connected in sequence;

[0037] 2.2) Input the training set in the modeling dataset obtained in step 1.3) into the CNN-LSTM-AT time series prediction model constructed in step 2.1) for training, and at the same time use a loss function to measure the model fitting effect during the training process;

[0038] 2.3) Use the test set in the modeling dataset obtained in step 1.3) to test the trained CNN-LSTM-AT time series prediction model to obtain a test result;

[0039] 2.4) Evaluate the test result obtained in step 2.3), adjust the hyperparameters of the CNN-LSTM-AT time series prediction model according to the evaluation result, and select the model corresponding to the best evaluation result as the out-flow process model of the connected lakes; preferably, the evaluation method is RMSE, R2, pearson coefficient, spearman coefficient, kendall coefficient, and / or NSE.

[0040] Preferably, the loss function used in step 2.2) is the MSE loss function, and the expression of the MSE loss function is:

[0041]

[0042] Wherein:

[0043] n is the total number of samples;

[0044] y i is the true value of the i-th sample in the dataset;

[0045] y i′ is the i-th predicted value in the dataset.

[0046] Preferably, the specific implementation of step 2.2) is:

[0047] 2.2.1) Use the CNN convolutional layer and the CNN pooling layer of the CNN-LSTM-AT time series prediction model to extract the spatial features of the training set and obtain the output data of the CNN;

[0048] 2.2.2) Use the LSTM layer of the CNN-LSTM-AT time series prediction model to extract the time features of the output data of the CNN obtained in step 2.2.1);

[0049] 2.2.3) Use the Attention layer of the CNN-LSTM-AT time series prediction model to perform importance weighting on the time features obtained in step 2.2.2), output the prediction results of river flow and water level, and complete the training of the CNN-LSTM-AT time series prediction model.

[0050] Preferably, the processing method of the CNN convolutional layer in step 2.2.1) is:

[0051] o i = f(W × X + b i ) ;

[0052] Where:

[0053] W is the convolutional kernel;

[0054] X is the input training set data;

[0055] f is the non-linear activation function;

[0056] b i is the bias term;

[0057] o i is the feature output through the CNN convolutional layer;

[0058] The operation method of the CNN pooling layer in step 2.2.1) is:

[0059] o = max{o i , o i+1} ;

[0060] Where:

[0061] o i is the feature output through the CNN convolutional layer;

[0062] o i+1 is the feature adjacent to the eigenvalue oi in the same channel and with adjacent spatial positions.

[0063] Preferably, the specific implementation of step 2.2.2) is as follows:

[0064] I t = σ(W I [h t-1 , x t + b I )

[0065] F t = σ(W F [h t-1 , x t + b F )

[0066] o t = σ(W O [h t-1 , x t + b O )

[0067] c t = F t c t-1 + I t tanhσ(W c [h t-1 , x t + b c )

[0068] h t = o t tanhc t

[0069] Where:

[0070] I t represents the output matrix of the input gate at time t;

[0071] F t represents the output matrix of the forget gate at time t;

[0072] o t represents the output matrix of the output gate at time t;

[0073] c t represents the cell state;

[0074] W I represents the weight matrix coefficient corresponding to the input gate;

[0075] W F represents the weight matrix coefficient corresponding to the forget gate;

[0076] W O represents the weight matrix coefficient corresponding to the output gate;

[0077] W c represents the weight matrix coefficient corresponding to the current cell state;

[0078] x t represents the input data at time t;

[0079] h t-1 represents the output data at time t - 1;

[0080] b I represents the bias parameter of the input gate;

[0081] b F represents the bias parameter of the forget gate;

[0082] b O represents the bias parameter of the output gate;

[0083] b c represents the bias parameter of the cell state;

[0084] h t represents the output information of the long short - term memory network module, and the activation function adopted in the h t is the tanh function, and the expression of the tanh function is:

[0085]

[0086] Preferably, the specific implementation manner of the step 2.2.3) is:

[0087] 2.2.3.1) Calculate the attention weight α of the time features obtained in the step 2.2.2) by using the Attention layer of the CNN - LSTM - AT time series prediction model. The expression of the attention weight α is:

[0088]

[0089] Where:

[0090] e ij is the attention score of the i - th time step to the j - th time step;

[0091] T is the total number of time steps;

[0092] 2.2.3.2) Perform weighted summation on the attention weight α obtained in the step 2.2.3.1) to obtain the weighted feature context. The expression of the weighted feature context is:

[0093]

[0094] Where:

[0095] h i is the output of the LSTM at the i-th time step;

[0096] α i is the corresponding attention weight;

[0097] 2.2.3.3) Based on the weighted feature context output obtained in step 2.2.3.2), the prediction results of river flow and water level are output, and the training of the optimized CNN-LSTM-AT time series prediction model is completed.

[0098] The advantages of the present invention are:

[0099] The present invention provides a method for calculating the water flow exchange volume of a river-connected lake, including: 1) obtaining a data set for modeling within a target time period; 2) constructing an outflow process model of the river-connected lake based on the data set for modeling within the target time period obtained in step 1); 3) obtaining measured data for other time periods except the target time period; the measured data includes the incoming water flow of the main and tributary rivers in the river-lake basin, the water levels of the main and tributary rivers in the river-lake basin, and / or rainfall data of monitoring stations; 4) inputting the measured data obtained in step 3) into the outflow process model of the river-connected lake constructed in step 2), and outputting a predicted value of the water volume exchange of the river-connected lake, thereby completing the prediction or calculation of the water flow exchange volume of the river-connected lake. In view of the fact that there are still relatively large limitations in the traditional hydrological model in runoff simulation and forecasting, the data collection in the modeling process is insufficient, and some factors such as groundwater exchange, farmland irrigation, and evaporation data are difficult to cover completely. The CNN-LSTM-AT model belongs to an intelligent model, which has stronger learning ability and can cover the data factors that are difficult to collect and capture by the traditional hydrological model by autonomously learning the data that is easy to collect and has a greater impact on the results, making up for the deficiencies of the traditional hydrological model and having the advantages of easy modeling. At the same time, the present invention takes into account that the influencing factors of runoff flow include rainfall factors, and rainfall factors have the characteristics of high nonlinearity and spatio-temporal variation. CNN and LSTM can capture the spatio-temporal variation process of rainfall in the basin, and the model has nonlinear learning ability, so it has stronger adaptability in runoff flow prediction. In addition, the difference between the prediction result and the actual value of the method and system for calculating the water flow exchange volume of the river-connected lake by combining CNN-LSTM-AT of each incoming tributary and rainfall data is very small, with a high degree of fitting, and the prediction result meets the expectation, indicating that the model can realize the prediction of the water flow exchange volume of the river-connected lake. In short, the main purpose of the present invention is to establish a deep learning neural network model that can learn the lake water flow exchange process affected by runoff inflow data, runoff water level data, and rainfall data by using CNN, LSTM, and Attention mechanisms. By using the CNN-LSTM-AT model to predict the water flow exchange volume of the river-connected lake, in the CNN-LSTM-AT model, CNN is used to identify and extract spatial precipitation data, and LSTM is used to learn the time series relationship between precipitation and flow and water level, and output the predicted result of the lake water volume exchange. The present invention can be used to learn the nonlinear spatio-temporal variation process between hydrological data, and provides a method for calculating the water flow exchange volume of a lake by CNN-LSTM-AT. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] Figure 1 is a schematic flow chart of the method for calculating the water flow exchange volume of the river-connected lake provided by the present invention;

[0101] Figure 2It is a schematic structural diagram of the CNN-LSTM model integrating the Attention mechanism adopted by the present invention;

[0102] Figure 3 It is a schematic structural diagram of the LSTM cell adopted by the present invention;

[0103] Figure 4 It is a flow prediction diagram based on the method for calculating the water flow exchange volume of a connected lake provided by the present invention;

[0104] Figure 5 It is a water level prediction diagram based on the method for calculating the water flow exchange volume of a connected lake provided by the present invention. Detailed implementation mode

[0105] The present invention provides a method for calculating the water flow exchange volume of a connected lake, including the following steps:

[0106] 1) Construct a data set for modeling;

[0107] 2) Based on the data set for modeling obtained in step 1), construct an out-flow process model of the connected lake; wherein, the out-flow process model of the connected lake is a neural network algorithm constructed by combining CNN, LSTM and the Attention mechanism. Among them, CNN extracts spatial features in the runoff data sequence through the convolutional layer, and then reduces the size of the feature map through the max pooling layer and further extracts important features, which can not only reduce the number of parameters and improve the model efficiency, but also retain the main feature information of the runoff data sequence. Input the feature information extracted by CNN into the LSTM network to capture the long-term dependence relationship in the runoff time series data. Apply the Attention mechanism to the output of LSTM to calculate the attention weights at each time step, perform weighted summation on the output of LSTM, obtain the final context feature representation, and convert the context features into the final output result through the fully connected layer.

[0108] 3) Obtain measured data; the measured data includes the inflow discharge of the main and tributary rivers in the river-lake basin, the water levels of the main and tributary rivers in the river-lake basin and / or the rainfall data of the monitoring stations during the target calculation period;

[0109] 4) Input the measured data obtained in step 3) into the out-flow process model of the connected lake constructed in step 2), output the predicted value of the water volume exchange volume of the connected lake, and complete the prediction or calculation of the water flow exchange volume of the connected lake.

[0110] Embodiment 1

[0111] In this embodiment, the Dongting Lake Basin is selected as the research object as a research example. The basic characteristics of the basin are shown in Table 1.

[0112] Dongting Lake Basin: It is connected to the four rivers of Xiang, Zi, Yuan, and Li in the south, receives the water from the three outlets of Songzi, Taiping, and Ouchi in the Jingjiang section of the Yangtze River in the north, and has the Xinqiang River and Miluo River flowing into it in the east. Finally, it flows into the Yangtze River through Chenglingji.

[0113] Table 1

[0114] Name Dongting Lake Basin Geographical Location Between 28°30′ and 32°20′ north latitude, and between 110°40′ and 113°10′ east longitude <![CDATA[Area (10 4 km 2 )]]> 26.33 <![CDATA[Water storage capacity (10 8 m 3 )]]> 167 Annual Average Precipitation (mm) 1100~1400

[0115] The experimental data used in this embodiment are collected from the runoff flow data, runoff water level data, and regional rainfall data of the lakes connected to the river during the period from January 1, 2003 to December 31, 2010.

[0116] See Figure 1 , the present invention provides a method for calculating the water flow exchange volume of lakes connected to the river, including the following steps:

[0117] S1. Obtain the river flow time series data, series characteristic data of the monitoring stations of the sub-confluence and divergence channels in the basin, water level data in the basin, and series data of the rainfall observation stations in the basin. Preprocess the obtained data and construct a data set. Divide 80% of the data into a training set and 20% into a test set;

[0118] Each piece of data in the data obtained in S1 contains 34 features, namely: the water level and flow of Yichang Station, the water level and flow of Zhicheng Station, the water level and flow of Shashi Station, the water level and flow of Xinchang Station, the water level and flow of Jianli Station, the water level and flow of Chenglingji Station, the water level and flow of Luoshan Station, the water level and flow of Mitosi Station, the water level and flow of Xinjiangkou Station, the water level and flow of Shidaoguan Station, the water level and flow of Guanjiapu Station, the water level and flow of Kangjiagang Station, the flow of Lishui River, the flow of Zishui River, the flow of Yuanshui River, the flow of Xiangshui River, the precipitation of Guanyuan, the precipitation of Lujiao, the precipitation of Mitosi, the precipitation of Nanjui, the precipitation of Xiaohezui, and the precipitation of the Autonomous Bureau; Merge the obtained river time series data, series characteristic data of the monitoring stations of the sub-confluence and divergence channels in the basin, water level data in the basin, and series data of the rainfall observation stations in the basin to obtain multi-influence variable features. Each sample can be represented as a vector P i .

[0119] The data preprocessing and data set construction in S1 include:

[0120] S1.1) Clean and standardize the original time series data. The cleaning process includes removing outliers, missing values, etc. There are differences in the order of magnitude between the characteristic attributes of the input data, which easily leads to an increase in the network prediction error. Perform min-max standardization on the multi-influence variable features. The min-max standardization formula is expressed as:

[0121]

[0122] Among them, x represents the multi-influence variable feature, xmax Represents the maximum value calculated from the multi-influence variable features, x min Represents the minimum value calculated from the multi-influence variable features, x ′ Represents the numerical result after standardization.

[0123] S1.2) Convert the multi-influence variable features into a dataset with input features (lag features) and output labels (prediction features). Take the first data of the multi-influence variable features as the first data, determine the sequence length, and take every 11 data as a group of sample data, where the first 10 data are used as historical data and the last data is used as prediction data. The sliding window step size is 1, that is, n - 10 groups of sample data can be extracted from every n data, and then the three-dimensional input format (samples, timesteps, features) required for the LSTM network can be constructed. The historical dataset X and the prediction dataset Y can be expressed as:

[0124] X = {X1, X2, X3, X4…X i …X n}

[0125] Y = {Y1, Y2, Y3, Y4…, Y i , …, Y n}

[0126] X i = {P i , P i+1 , P i+2 , P i+3 , P i+4 , P i+5 , P i+6 , …, P i+9}

[0127] Y i = {P i+10}

[0128] where X i is the i-th group of samples in the historical dataset, and Y i is the i-th group of samples in the prediction dataset.

[0129] S2 Construct a CNN-LSTM-AT time series prediction model and train the CNN-LSTM-AT time series prediction model using the training set.

[0130] As Figure 2 shown, in this embodiment, a CNN-LSTM model integrating the Attention mechanism is proposed for the prediction of the runoff parameters of lakes connected to the river. The specific steps for constructing the CNN-LSTM-AT model in S2 include:

[0131] S2.1) Construct a CNN-LSTM-AT time series prediction model; this model includes a CNN convolutional layer, a CNN pooling layer, a bidirectional connection layer between CNN and LSTM, an LSTM layer, and an Attention layer connected in sequence;

[0132] S2.2) Input the training set in the obtained modeling dataset into the constructed CNN-LSTM-AT time series prediction model for training, and at the same time use a loss function to measure the model fitting effect during the training process;

[0133] S2.3) Test the trained CNN-LSTM-AT time series prediction model with the test set in the obtained modeling dataset to obtain test results;

[0134] S2.4) Evaluate the obtained test results, adjust the hyperparameters of the CNN-LSTM-AT time series prediction model according to the evaluation results, and select the model corresponding to the best evaluation result as the outflow process model of the connected lakes; the evaluation methods are RMSE, R2, pearson coefficient, spearman coefficient, kendall coefficient, and / or NSE.

[0135] Furthermore, CNN extracts the spatial features of the original input data through the convolutional layer and the pooling layer.

[0136] CNN convolutional layer:

[0137] The convolution operation is a key step in CNN for feature extraction. It slides the convolution kernel over the input data matrix, calculates the dot product of the convolution kernel and the local area of the input data from left to right and top to bottom according to a certain stride. For example, if the size of the input data matrix is H×R, where H is the height and R is the width, and the size of the convolution kernel Q is k×k, then the output of the convolution operation is a feature map O with a size of (H - k + 2p)×(R - k + 2p), where p (padding) is the size of the padding. For each element o in the output feature map ij , the convolution operation can be expressed as

[0138]

[0139] where x i |m,j|n is the element at the position (i + m, j + n) in the input data, w mn is the element at the position (m, n) in the convolution kernel Q, and b is the bias term. After the convolution operation, a non-linear activation function ReLU is followed to introduce non-linearity: o ij = ReLU(o ij ).

[0140] CNN pooling layer:

[0141] Since the dimension of the input matrix is large and the dimension of the feature matrix after convolution is still large, in order to reduce the optimization difficulty and the number of parameters, the feature matrix after convolution is downsampled, which is the pooling layer. A pooling window is set with a size of u×u, and the feature matrix (H 1 ×R 1 ) after convolution is subjected to a pooling operation, and its output is a feature matrix V with a size of where p1 is the padding size and s is the sliding step. The maximum pooling operation is used in the present invention. For each element p of the output feature matrix ij , the maximum pooling operation can be expressed as

[0142]

[0143] where f i*s|m,j*s|n is the element at the position (i*s+m, j*s+n) in the feature matrix after convolution.

[0144] Connection layer between CNN and LSTM:

[0145] The CNN obtains a feature map through the convolutional layer and the pooling layer. It contains multiple channels and needs to be converted into a format suitable for LSTM processing, that is, the feature map is converted into a one-dimensional sequence through the flatten layer, and then linearly transformed through the fully connected layer to output a matrix that can be combined with the LSTM.

[0146] Furthermore, Figure 3 As shown in the LSTM structure diagram, the LSTM extracts the temporal characteristics of the input time series data.

[0147] LSTM cell layer:

[0148] I t =σ(W I [h t-1 , x t +b I )

[0149] F t =σ(W F [h t-1 , x t +b F )

[0150] o t =σ(W O [h t-1 , x t +b O )

[0151] c t =Ft c t-1 + I t tanhσ(W c [h t-1 ,x t + b c )

[0152] h t = o t tanh c t

[0153] Among them, I t represents the output matrix of the input gate at time t, F t represents the output matrix of the forget gate at time t, o t represents the output matrix of the output gate at time t, c t represents the cell state, W I represents the weight matrix coefficient corresponding to the input gate, W F represents the weight matrix coefficient corresponding to the forget gate, W O represents the weight matrix coefficient corresponding to the output gate, W c represents the weight matrix coefficient corresponding to the current cell state, x t represents the input data at time t, h t-1 represents the output data at time t - 1, and is also the time series dependence feature at time t - 1, b I represents the bias parameter of the input gate, b F represents the bias parameter of the forget gate, b O represents the bias parameter of the output gate, b c represents the bias parameter of the cell state, h t represents the output information of the long short-term memory network module. The activation function used in this method is the tanh function, and the expression of the tanh function is:

[0154]

[0155] Attention layer:

[0156] The attention layer allows the CNN-LSTM model to dynamically focus on information at different positions in the time series when processing time series data. This mechanism determines the importance of each element by calculating the correlation between each element in the input sequence and the current target, and then weighted summation is performed to obtain the final output.

[0157] The attention mechanism calculates the weighted average of the input sequence and gives higher weights to important parts. The attention weight α can be expressed as:

[0158]

[0159] Among them, eij is the attention score of the i-th time step with respect to the j-th time step, T is the total number of time steps, and weighted summation uses the attention weights to perform weighted summation on the outputs of the LSTM to obtain the weighted feature context representation:

[0160]

[0161] where h i is the output of the LSTM at the i-th time step, and α i is the corresponding attention weight.

[0162] Furthermore, the equation of the MSE loss function can be expressed as:

[0163]

[0164] where n is the total number of samples, y i is the true value of the i-th sample in the dataset, and y i ′ is the i-th predicted value in the dataset;

[0165] S3 uses the test set to evaluate the accuracy of the model's prediction effect, adjusts the hyperparameters to obtain a model with good prediction effect, and saves the model

[0166] S4 inputs the inflow discharges of the main and tributary rivers and lakes in the river-lake basin, the water levels of the main and tributary rivers and lakes in the river-lake basin, and the rainfall at the monitoring stations during the target calculation period after preprocessing into the trained time series prediction model, outputs the predicted values of the water volume exchange of the river-connected lakes (Chenglingji discharge and water level), and can simultaneously perform visualization processing, aiming to use the model to achieve the function of predicting the water volume exchange of the river-connected lakes.

[0167] Experimental Results and Analysis

[0168] CNN: The convolution operation is a key step in CNN for feature extraction. It slides the convolution kernel over the input data matrix and performs dot product calculations between the convolution kernel and the local area of the input data from left to right and top to bottom at a certain stride. In this embodiment, the size of the convolution kernel is set to 5 and the stride is 1. The pooling layer reduces the dimensionality of the input high-dimensional feature data to improve the calculation speed of the convolutional neural network and prevent overfitting, and adopts the max pooling strategy. A Dropout layer is added after the pooling layer and the LSTM layer to effectively prevent overfitting. The bidirectional connection layer serves as the regression output layer, outputs spatio-temporal feature data, reduces the influence of feature positions on the classification results, and improves the robustness of the entire network.

[0169] LSTM: It is an improved RNN recurrent network model that can capture the temporal characteristics of the input time series data. In this embodiment, one LSTM layer is adopted, with 200 neurons. The number of training epochs Epoch is 200, and the training batch size BatchSize is 36. The time step Time steps is 10.

[0170] CNN-LSTM-ATTENTION: Input the data into the CNN to extract spatial features, input the output result into the LSTM to extract temporal features, and then combine the attention mechanism to assign the importance degree of each element. The model includes two convolutional layers, one pooling layer, and one LSTM layer.

[0171] Table 2 shows the performance comparison between the model of the embodiment and the comparison model (Chenglingji flow rate)

[0172]

[0173]

[0174] Table 3 shows the performance comparison between the model of the embodiment and the comparison model (Chenglingji water level)

[0175] Model <![CDATA[R 2 > NSE LSTM 0.901 0.897 CNN-LSTM 0.939 0.945 CNN-LSTM-ATTENTION 0.987 0.987

[0176] To evaluate the influence of the proposed CNN-LSTM-ATTENTION model on the prediction performance of the water exchange volume of the connected lakes, the LSTM model, the CNN-LSTM model, and the proposed prediction model are introduced for comparison. The simulation and prediction performances of the CNN-LSTM-ATTENTION are compared, and the prediction comparison results are shown in Table 2 and Table 3.

[0177] The proposed CNN-LSTM-ATTENTION model in this embodiment adds an attention mechanism, which can, on the basis of integrating spatial and temporal features, provide an ability to dynamically focus on the most important part of the input data, give greater weights to important features, improve the accuracy and prediction efficiency of the model prediction, and has better prediction ability. Therefore, the prediction effect can be significantly improved. The prediction effect diagrams of the Chenglingji flow rate and water level are as Figure 4 、 Figure 5 shown, where Figure 4 the abscissa is the time step, the ordinate is the flow rate, Q true is the true value of the flow rate, and Q prediction is the predicted value of the flow rate; Figure 5 the abscissa is the time step, the ordinate is the water level, Z true is the true value of the water level, and Z prediction is the predicted value of the water level.

Claims

1. A calculation method for the water flow exchange volume of a river-connected lake, characterized in that: The calculation method for the water flow exchange volume of the connected lakes includes the following steps: 1) Obtain the data set for modeling within the target period; 2) Based on the data set for modeling within the target period obtained in step 1), construct an outflow process model for the connected lakes; 3) Obtain the measured data for other periods except the target period; the measured data includes the incoming water flow of the main and tributary rivers in the river-lake basin, the water levels of the main and tributary rivers in the river-lake basin, and / or the rainfall data of the monitoring stations; 4) Input the measured data obtained in step 3) into the outflow process model of the connected lakes constructed in step 2), and output the predicted value of the water volume exchange volume of the connected lakes, completing the prediction or calculation of the water flow exchange volume of the connected lakes.

2. The method for calculating the water flow exchange volume of a lake connected to a river according to claim 1, characterized in that: The specific implementation method of step 1) is as follows: 1.1) Obtain the basic data; the basic data includes the river flow time series data, the series characteristic data of the monitoring stations of the distributary and confluence rivers in the basin, the water level data in the basin, and the series data of the rainfall observation stations in the basin; 1.2) Preprocess the basic data obtained in step 1.1) to obtain a data set; 1.3) Divide the data set obtained in step 1.2) into a training set and a test set according to a ratio of 8:2; the training set and the test set constitute the data set for modeling.

3. The method for calculating the water flow exchange volume of a river-connected lake according to claim 2, wherein: The specific implementation method of step 1.2) is as follows: 1.2.1) Clean the basic data obtained in step 1.1), and the cleaning method is to remove outliers and / or missing values; 1.2.2) Perform min-max normalization processing on the basic data after cleaning; 1.2.3) Perform format conversion on the data obtained in step 1.2.2).

4. The method for calculating the water flow exchange volume of a river-connected lake according to claim 3, wherein: The method of min-max normalization processing in step 1.2.2) is as follows: Where: x represents the multi-influence variable feature after cleaning; x max represents the maximum value calculated from multiple influencing variable features; x min represents the minimum value calculated among multiple influence variable features; x ′ represents the normalized value; The specific implementation method of step 1.2.3) is: convert the standardized multi-influence variable feature into a data set with input features and output labels, take the first data of the multi-influence variable feature as the first data, determine the sequence length of the multi-influence variable feature, take every N data as a group of sample data, where the first N-1 data are used as historical data X, and the last data is used as the predicted data Y, and the sliding window step size is 1, that is, every n data can extract n-(N-1) groups of sample data, completing the format conversion of the data after normalization processing; the expressions of the historical data set X and the predicted data set Y are: X = {X1, X2, X3, X4…X i …X n} Y = {Y1, Y2, Y3, Y4…, Y i , …, Y n} X i = {P i , P i+1 , P i+2 , P i+3 , P i+4 , P i+5 , P i+6 , …, P i+N-2} Y i = {P i+N-1} Where: X i is the i-th group of samples in the historical data set; Y i is the i-th group of samples in the prediction dataset.

5. The method for calculating the water flow exchange volume of a lake connected to a river according to claim 4, wherein: The specific implementation method of step 2) is as follows: 2.1) Construct a CNN-LSTM-AT time series prediction model; the CNN-LSTM-AT time series prediction model includes a CNN convolutional layer, a CNN pooling layer, a bidirectional connection layer between CNN and LSTM, an LSTM layer, and an Attention layer connected in sequence; 2.2) Use the training set in the data set for modeling obtained in step 1.3) to input into the CNN-LSTM-AT time series prediction model constructed in step 2.1) for training, and at the same time use a loss function to measure the model fitting effect during the training process; 2.3) Use the test set in the modeling dataset obtained in step 1.3) to test the trained CNN-LSTM-AT time series prediction model, and obtain the test results; 2.4) Evaluate the test results obtained in step 2.3), adjust the hyperparameters of the CNN-LSTM-AT time series prediction model according to the evaluation results, and select the model corresponding to the best evaluation result as the outflow process model of the connected lakes; preferably, the evaluation methods are RMSE, R2, pearson coefficient, spearman coefficient, kendall coefficient and / or NSE.

6. The method for calculating the water flow exchange volume of a river-connected lake according to claim 5, wherein: The loss function used in step 2.2) is the MSE loss function, and the expression of the MSE loss function is: Where: n is the total number of samples; y i is the true value of the i-th sample in the dataset; y i ′ is the i-th predicted value in the dataset.

7. The method for calculating the water flow exchange volume of a river-connected lake according to claim 6, wherein: The specific implementation method of step 2.2) is: 2.2.1) Use the CNN convolutional layer and CNN pooling layer of the CNN-LSTM-AT time series prediction model to extract the spatial features of the training set, and obtain the output data of the CNN; 2.2.2) Use the LSTM layer of the CNN-LSTM-AT time series prediction model to extract the time features of the output data of the CNN obtained in step 2.2.1); 2.2.3) Use the Attention layer of the CNN-LSTM-AT time series prediction model to perform importance weighting on the time features obtained in step 2.3.2), and output the prediction results of river flow and water level, and complete the training of the CNN-LSTM-AT time series prediction model.

8. The method for calculating the water flow exchange volume of a river-connected lake according to claim 7, characterized in that: The processing method of the CNN convolutional layer in step 2.2.1) is: o i = f(W × X + b i ); Where: W is the convolutional kernel; X is the input training set data; f is the non-linear activation function; b i is the bias term; o i are the features output by the CNN convolutional layer; The operation method of the CNN pooling layer in step 2.3.1) is: o = max{oi, oi +1}; Where: o i are the features output by the CNN convolutional layer; o i+1 is a feature that is in the same channel as the eigenvalue oi and is adjacent in spatial position.

9. The method for calculating the water flow exchange volume of a lake connected to a river according to claim 8, wherein: The specific implementation method of step 2.2.2) is: I t = σ(W I [h t-1 , x t + b I ) F t = σ(W F [h t-1 , x t + b F ) o t = σ(W O [h t-1 , x t + b O ) c t = F t c t-1 + I t tanhσ(W c [h t-1 , x t + b c ) h t = o t tanhc t Where: I t Output matrix of the input gate at time t; F t Denotes the output matrix of the forget gate at time t; o t Output matrix of the output gate at time t; c t Indicates the cell state; W I represents the weight matrix coefficient corresponding to the input gate; W F represents the weight matrix coefficient corresponding to the forget gate; W O Represents the weight matrix coefficient corresponding to the output gate; W c represents the weight matrix coefficient corresponding to the current cell state; x t represents the input data at time t; h t-1 represents the output data at time t-1; b I represents the bias parameter of the input gate; b F represents the bias parameter of the forget gate; b O Represents the bias parameter of the output gate; b c Bias parameter indicating the cell state; h t represents the output information of the long short-term memory network module, and the h t adopts the tanh function as the activation function, and the expression of the tanh function is:

10. The method for calculating the water flow exchange volume of a lake connected to a river according to claim 9, wherein: The specific implementation method of step 2.2.3) is: 2.2.3.1) Use the Attention layer of the CNN-LSTM-AT time series prediction model to calculate the attention weight α of the time features obtained in step 2.2.2), and the expression of the attention weight α is: Where: e ij is the attention score of the i-th time step with respect to the j-th time step; T is the total number of time steps; 2.2.3.2) Perform weighted summation on the attention weight α obtained in step 2.2.3.1) to obtain the weighted feature context; the expression of the weighted feature context is: Where: h i is the output of the LSTM at the i-th time step; α i is the corresponding attention weight; 2.2.3.3) Output the prediction results of river flow and water level according to the weighted feature context obtained in step 2.2.3.2), and complete the training of the optimized CNN-LSTM-AT time series prediction model.