A flood forecasting method based on a new universal input-output structure and long short-term memory network
By using only rainfall as input features in the flood forecast model and utilizing the recursive connection and control gate mechanism of the LSTM network, the flow forecast lag problem in the existing model is solved, the accuracy and interpretability of flood forecasts are improved, and it is suitable for different spaces Watershed flood modeling at scale.
Patent Information
- Application Number
- CN202111594179.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-12-24
AI Technical Summary
When existing machine learning flood forecasting models use rainfall and flow as input features, it is difficult to accurately identify the effects of rainfall and flow, resulting in flow forecasts having a peak time lag or outputting two flood peaks. The longer the forecast period, the flood peak lags. The more obvious it is, the more it affects the interpretability of the model.
A new universal input-output structure based on long short-term memory network is designed. It only uses rainfall as the input feature variable, and uses the long sequence rainfall information of each rain gauge station in the basin as model input. It uses the recursive connection and control gate mechanism of LSTM to learn The soil water storage state and the spatiotemporal distribution of rainfall in the watershed are output, and a flow sequence consistent with the watershed confluence time is output.
It improves the accuracy of flood forecasting and the interpretability of the model, and enables more accurate simulation and forecasting of flood processes, especially in mountainous basins. It shows higher simulation and forecasting accuracy, and enhances the understanding of the mechanism of runoff formation in the basin.
Smart Images

Figure CN114386677B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of river basin flood forecasting and relates to a flood forecasting method based on a novel universal input-output structure and a long short-term memory network. Background Art
[0002] Long short-term memory network (LSTM) is one of the most commonly used models in the cross-application research of machine learning technology and basin flood forecasting. The LSTM flood forecasting model uses samples as input and output data. Samples are a combination of input feature variables and corresponding output target values, and the generation of samples depends only on the input and output structure of the model. Determining the model input and output structure is a key step in building a machine learning flood forecasting model, and is more directly related to the reliability and rationality of the LSTM flood forecasting model. In previous flood forecasting research and applications based on machine learning technology, previous rainfall and flow are the two most commonly used input feature variables in machine learning flood forecasting models, and the model output is the flow value within the forecast period of the basin outlet. However, the actual application results show that when the measured rainfall and flow in the previous period are used as model input feature factors, due to the significant correlation between the flows at different time steps, the output flow is easily driven by the previous flow in the input feature variables. The model is difficult to identify the role of previous rainfall and flow, resulting in a peak time lag or the output of two flood peak values in the simulated or forecasted flow process, and the longer the forecast period, the more obvious the flood peak lag. Therefore, the flood forecasting model established with rainfall and previous flow as input and forecast flow target value as output may not be consistent with the mechanism of runoff formation in the basin. It is necessary to redesign the input and output structure of the LSTM flood forecasting model to enhance the interpretability of the machine learning flood forecasting model.
[0003] To this end, the present invention is based on improving the hydrological interpretability of the machine learning flood forecasting model, and proposes a flood forecasting method based on a new general input-output structure and a long short-term memory network. Combining the theory and method of basin hydrological simulation and the basin rainstorm flood response mechanism, rainfall is selected as the only input characteristic variable of the LSTM flood forecasting model, and the long sequence rainfall information of each rain gauge in the basin is used as the model input variable (the number of characteristic factors is the number of rain gauge stations in the basin). Relying on the recursive connection of LSTM and the special control gate and cell unit state, the potential long-term learning and memory ability of LSTM is fully utilized. By repeatedly learning the long sequence input data, the spatiotemporal distribution of basin rainfall, the response time of basin rainstorm floods, and the hydrological element information such as the previous soil water storage state are integrated into the input and output structure design of the model. On this basis, a flood forecasting model based on a long short-term memory network is constructed to enrich the flood forecasting model in the data-rich area and improve the accuracy of basin flood forecasting. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a flood forecasting method based on a novel universal input-output structure and a long short-term memory network.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A flood forecasting method based on a novel universal input-output structure and a long short-term memory network comprises the following steps:
[0007] The first step is to collect and organize historical flood data in the basin.
[0008] Collect and organize flood data in the research basin, and divide all flood events into training set, validation set, and test set events. Among them, the training set flood events are used to optimize the internal weight matrix and bias vector parameters of the LSTM flood forecasting model; the validation set flood events are used to assist in determining the external settings of the model such as hyperparameters and loss functions; and the test set flood events are used to test the extrapolation (prediction) ability of the trained model.
[0009] The second step is to calculate the average confluence time of the basin.
[0010] The average confluence time of a certain research basin is certain, and its duration is equal to the forecast period of flood in the basin, which comprehensively reflects the regulation and storage effect of the basin on the convergence process of rainfall water flow. According to the historical flood process data collected and sorted by the basin, the time difference between the main rainfall and the corresponding peak flow in the flood is calculated, that is, the peak lag time. The average peak lag time of all floods is calculated, which is the average confluence time of the basin.
[0011] The third step is to give the number of hidden layers and the number of hidden layer neuron nodes of the long short-term memory (LSTM) network flood forecasting model.
[0012] The fourth step is to design the input and output structure of the new general LSTM flood forecasting model.
[0013] The state of LSTM cell unit is similar to the state of soil water storage in the basin. The interaction between the three control gates (forget gate, input gate and output gate) and the state of cell unit can be regarded as the consumption, increase and release of the soil water storage state in the basin. According to the traditional basin hydrological simulation theory and method, rainfall is selected as the only input factor of the LSTM flood forecasting model. The input of the LSTM flood forecasting model is the long sequence rainfall information of each rain gauge in the basin, and the input length is n+l periods. Among them, n represents the input length of the previous rainfall, and the previous rainfall can be regarded as reflecting the influence of the previous soil water storage state, short-term rainfall and other information on the output flow value of the model. Multiple n can be selected and the better model can be determined according to the subsequent model performance; the output of the LSTM flood forecasting model is a flow value sequence equal to the confluence time of the study basin (the result of the second step calculation), that is, the output length is l periods, l is equal to the confluence time of the basin and l≤n.
[0014] The fifth step is to generate training, validation and test sample sets.
[0015] According to the input and output structure (n, l values) of the new general LSTM flood forecasting model designed in the fourth step, the sample length is determined. The input rainfall sequence length of each sample is equal to n+l periods, and the output target flow sequence length is equal to l periods. According to the training set, validation set and test set divided in the first step, each flood generates corresponding training, validation and test sample sets in a sliding interception manner by period, and each flood generates multiple samples, each sample is composed of the input rainfall sequence P = [P t-n+1 ,P t-n+2 ,…,P t ,…,P t+l ] and output target flow sequence Q = [Q t+1 ,Q t+2 ,…,Q t ,…,Q t+l ] form an input and output data pair. Among them, n is the number of periods of the input previous rainfall sequence of the LSTM flood forecasting model, l is the number of periods of the model output flow, and the input rainfall P of the tth period is t Contains the measured rainfall values at each rain gauge in the basin.
[0016] Step 6: Model building and training.
[0017] The LSTM flood forecasting model uses the back propagation through time (BPTT) algorithm for supervised learning training. The model construction and training are based on the open source Keras and TensorFlow. The Keras framework running on the TensorFlow platform integrates a relatively mature machine learning algorithm package, and the corresponding algorithm can be directly called to complete the construction and training of the LSTM flood forecasting model.
[0018] 6.1) Construction of LSTM flood forecasting model: Based on the number of hidden layers and the number of hidden layer neuron nodes given in the third step and the model input and output structure designed in the fourth step, the Keras layer package (layers) is called to define the input layer, hidden layer and output layer of LSTM to build the LSTM flood forecasting model;
[0019] 6.2) LSTM flood forecasting model training: Input the training and validation sample sets generated in the fifth step, set the hyperparameters, activation functions, loss functions, optimization algorithms, etc. involved in the model training process, run the LSTM flood forecasting model built based on the Keras framework on the TensorFlow platform, and obtain the trained LSTM flood forecasting model.
[0020] The seventh step is to determine the optimal model and extract and analyze the flood simulation results in the basin.
[0021] Compare and analyze the performance of the LSTM flood forecasting model under different input lengths, determine the final optimal LSTM flood forecasting model, further extract and study the results of basin flood simulation and forecast flow process, and analyze the forecasting performance of the LSTM flood forecasting model.
[0022] The present invention introduces a long short-term memory network as a modeling tool for river basin flood forecasting, and innovatively designs an input-output structure with long-sequence rainfall as input and multi-step flow as output. It uses cell unit state learning to remember the previous river basin soil water storage state information implied by long-sequence rainfall, and provides theoretical and methodological support for control gates to regulate the dynamic changes of the river basin soil water storage state, thereby consolidating the interpretability foundation of the machine learning flood forecasting model. On this basis, a flood forecasting model based on LSTM is constructed to improve the accuracy of river basin flood forecasting.
[0023] The above-mentioned flood forecasting method based on a new universal input-output structure and a long short-term memory network is applied to river basin flood forecasting.
[0024] The beneficial effects of the present invention are:
[0025] Traditional machine learning flood forecasting models mostly use rainfall and flow as input variables, and the model cannot truly bring into play the role of rainfall in the input variable on the forecast flow, resulting in poor hydrological interpretation of the machine learning flood forecasting model. The present invention deeply analyzes the basic principles and calculation mechanisms of the special control gates and cell unit states inside the long short-term memory network, and designs a new universal LSTM flood forecasting model input and output structure with long sequence rainfall input and multi-step flow output, which can be applied to basin flood forecasting modeling at different spatial scales, giving full play to the LSTM long-term learning and memory capabilities and the information forgetting, storage and release mechanism of internal cell units, realizing the instantiation of the LSTM flood forecasting model in mountain basins, effectively improving the simulation and forecasting accuracy of basin floods, and providing new technical support for basin flood disaster forecasting and early warning work. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is the Anhe watershed diagram used in the example application of the present invention;
[0027] Figure 2 It is a schematic diagram of the hydrological meaning of the internal structure of the LSTM of the present invention;
[0028] Figure 3 It is a schematic diagram of the input and output structure of the LSTM flood forecasting model designed by the present invention;
[0029] Figure 4 a is a schematic diagram of samples generated at the tth moment of a flood event according to the present invention;
[0030] Figure 4 b is a schematic diagram of samples generated at the t+1 moment of the flood event of the present invention;
[0031] Figure 5 It is a schematic diagram of the hierarchical structure and matrix feature dimensions of the LSTM flood forecasting model of the present invention;
[0032] Figure 6 It is a schematic diagram of the training process of the LSTM flood forecasting model of the present invention;
[0033] Figure 7 (a) is a graph showing the mean NSE of different input rainfall length training sets for the LSTM flood forecasting model of the present invention;
[0034] Figure 7 (b) is a MAE mean graph of different input rainfall length training sets of the LSTM flood forecasting model of the present invention;
[0035] Figure 7 (c) is a graph showing the RMSE mean of different input rainfall length training sets for the LSTM flood forecasting model of the present invention;
[0036] Figure 7 (d) is a graph showing the mean NSE values of the LSTM flood forecasting model for different input rainfall length test sets;
[0037] Figure 7 (e) is a MAE mean graph of the test set with different input rainfall lengths for the LSTM flood forecasting model of the present invention;
[0038] Figure 7 (f) is a graph showing the RMSE mean of the test set with different input rainfall lengths for the LSTM flood forecasting model of the present invention;
[0039] Figure 8 It is a schematic diagram of the input and output structure of a better LSTM flood forecasting model in the example application of the present invention;
[0040] Fig. 9 (a) is a comparison diagram of the simulated flow process of the training set 19840501 of the LSTM flood forecasting model of the present invention;
[0041] Fig. 9 (b) is a comparison diagram of the simulated flow process of the training set 199000730 of the LSTM flood forecasting model of the present invention;
[0042] Fig. 9 (c) is a comparison diagram of the simulated flow process of the training set 19940613 of the LSTM flood forecasting model of the present invention;
[0043] Fig. 9 (d) is a comparison diagram of the simulated flow process of the training set 19970620 of the LSTM flood forecasting model of the present invention;
[0044] Fig. 9 (e) is a comparison diagram of the simulated flow process of the training set 20020805 of the LSTM flood forecasting model of the present invention;
[0045] Fig. 9 (f) is a comparison diagram of the simulated flow process of the test set 20060505 of the LSTM flood forecasting model of the present invention;
[0046] Fig. 9 (g) is a comparison diagram of the simulated flow process of the test set 20060725 of the LSTM flood forecasting model of the present invention;
[0047] Fig. 9 (h) is a comparison diagram of the simulated flow process of the test set 20080524 of the LSTM flood forecasting model of the present invention;
[0048] Fig. 9 (i) is a comparison diagram of the simulated flow process of the test set 20080608 of the LSTM flood forecasting model of the present invention;
[0049] Fig. 9 (j) is a comparison chart of the simulated flow process of the test set 20120621 of the LSTM flood forecasting model of the present invention. DETAILED DESCRIPTION
[0050] The present invention is further described below in conjunction with specific embodiments.
[0051] The present invention proposes a flood forecasting method based on a new universal input-output structure and a long short-term memory network. The results of the training set and test set floods in the basin example application respectively represent the simulation and forecasting performance of the LSTM flood forecasting model. The present invention is further described below through implementation cases and in combination with the accompanying drawings.
[0052] The Anhe River Basin is located in Shangyou County, Ganzhou City, Jiangxi Province, at 114°-114°40′ east longitude and 25°42′-26°01′ north latitude, with a basin area of 251km 2 The hydrological observation data conditions in the Anhe Basin are good, which can provide good data support for the construction of machine learning flood forecasting models. In addition, the vegetation in the basin is well developed and belongs to the subtropical hilly and mountainous humid monsoon climate zone with abundant rainfall, an average annual rainfall of 1497mm, and an average temperature of 18.8℃. The topography and hydrological station distribution of the Anhe Basin can be seen in Figure 1 There are 8 rainfall stations in the Anhe Basin, and their spatial distribution is relatively uniform. This hilly basin is selected as a research example for flood forecasting, and basin flood forecasting based on long short-term memory network is realized. The main steps are as follows:
[0053] The first step is to collect and organize historical flood data in the basin.
[0054] The measured hydrological data (8 rain gauges and 1 hydrological station) of the Anhe River Basin from 1984 to 2012 were collected. By comparing and checking the measured rainfall and flow data series over the years, a few floods with unbalanced water volume were eliminated to ensure the reliability of the hydrological data. At the same time, there are problems such as errors in the logical relationship between the start and end time and repeated observation records in the collected rainfall and flow data, which require manual error identification and correction. In addition, the rainfall data is time-based data with inconsistent start and end time intervals, while the flow data is instantaneous data. It is necessary to perform pre-processing such as rationality inspection and time-based interpolation on the rainfall and flow data, and organize the rainfall and flow data into hourly cumulative rainfall and average flow time series. On this basis, according to the chronological order of the floods, the first 50% of all floods were selected as the training set and the middle 20% were selected as the validation set. The ratio of the training, validation and test set floods was 5:2:3.
[0055] The second step is to calculate the average confluence time of the Anhe River Basin.
[0056] According to the flood rainfall flow process data collected in the Anhe River Basin, the lag time of the flood peak flow in most floods in the Anhe River Basin is 4 to 6 hours, and the average lag time is 5.21 hours. Based on this, the average confluence time in the Anhe River Basin is determined to be 6 hours, that is, the flood forecast period is 6 hours.
[0057] In the third step, the hidden layer of the given LSTM flood forecasting model is a single layer, and the number of hidden layer neuron nodes is 5.
[0058] The fourth step is to design the input and output structure of the new general LSTM flood forecasting model.
[0059] The LSTM cell state is similar to the soil water storage state in the watershed. The interaction between the three control gates (forget gate, input gate and output gate) and the cell state can be regarded as the consumption, increase and release of the soil water storage state in the watershed. Figure 2 It is the input and output calculation process of the LSTM model in the tth (current) period and the hydrological meaning of the model input variables. The input and output structure of the LSTM flood forecasting model is designed as follows: Figure 3 The model output is the flow value Q = [Q t+1 ,Q t+2 ,…,Q t+6 ], the input is the long sequence of measured rainfall (preliminary rainfall + short-term rainfall) at each rain gauge in the basin. The previous rainfall sequence reflects the impact of changes in basin conditions such as the previous soil water storage capacity on the output flow. The specific number of periods of previous rainfall should be determined by trial and error based on the characteristics of the basin. The LSTM flood forecasting model can be constructed by setting a series of previous rainfall input schemes (24h, 48h, 120h, 240h, 480h, 720h, 960h and 1440h), and the simulation and prediction performance of the model can be compared to determine the optimal order of the previous rainfall input.
[0060] The fifth step is to generate training, validation and test sample sets.
[0061] According to the training, validation and test set sessions of the research basin divided in the first step, and according to the model input and output structures corresponding to different previous rainfall input schemes in the fourth step, samples are generated for each flood by sliding interception in each period. Taking the model input rainfall of 16h and output target flow of 6h as an example, Figure 4 This is an example diagram of machine learning model samples generated from adjacent periods of flood processes from time t to time t+1. The number of samples in the training set, validation set, and test set of the Anhe Basin is shown in Table 1.
[0062] Table 1. Number of samples in the training set, validation set, and test set of the Anhe Basin
[0063]
[0064] Step 6: Construction and training of LSTM flood forecasting model.
[0065] The LSTM model uses the back propagation through time (BPTT) algorithm for supervised learning training. Model construction and training are based on open source Keras and TensorFlow. According to the model structure settings determined in the third and fourth steps, taking the previous rainfall input of 480h as an example, Figure 5 This is a visualization diagram of the hierarchical structure and characteristic dimensions of the input and output variables of the LSTM flood forecasting model built based on TensorFlow and Keras. The model input is the long sequence (486 hours) of measured rainfall at 8 rainfall stations in the Anhe River Basin; the model output is the flow value corresponding to the last 6 periods of the long sequence; the role of the TimeDistributed layer is to make the hidden state h at each moment t They are all connected to the output layer (Dense) with 1 neuron node, and the flow value is output at each moment; the Lambda layer is a custom layer, which implements slicing processing of the output flow value sequence data, thereby extracting the output flow values of the last 6 time periods of each sample as the final output sequence of the model.
[0066] Figure 6 The figure is a schematic diagram of the training process of the LSTM flood forecasting model under the TensorFlow deep learning framework. Among them, the hyperparameters epoch = 300, batchsize = 64, the loss function is set to mean square error (MSE), the output layer activation function uses the linear ReLU function, the optimization algorithm uses the Adam algorithm, and the learning rate is 0.0006. The MSE formula is shown in formula (1).
[0067]
[0068] Where: y k,obs ,y k,out are the measured flow value and the predicted flow value of a flood at the kth time period, respectively, in m 3 / s; l is the output length of the simulated flow. The ReLU activation function has the advantages of fast convergence and simple calculation, and can ensure that the output flow values of the LSTM flood forecasting model are all non-negative values. The calculation expression is shown in formula (2).
[0069] ReLU(x)=max(x,0)(2)
[0070] The seventh step is to determine the optimal model and extract and analyze the flood simulation results in the basin.
[0071] The corresponding LSTM flood forecasting model under different previous rainfall input schemes was constructed, and the calculation results of Nash efficiency coefficient (NSE), mean absolute error (MAE) and root mean square error (RMSE) of LSTM model in flood simulation and flow prediction process in Anhe Basin under different previous rainfall input schemes (24h, 48h, 120h, 240h, 480h, 720h, 960h and 1440h) were compared and analyzed. Figure 7 As shown. The calculation expressions of NSE, MAE and RMSE are as follows:
[0072]
[0073]
[0074]
[0075] Where: y k,obs ,y k,out are the measured flow value and the predicted flow value of a flood at the kth time period, respectively, in m 3 / s; l is the output length of the simulated flow.
[0076] according to Figure 7 When the previous rainfall input is ≥480h, the NSE, MAE, and RMSE averages of the flood simulation and flow prediction process of the training set and the validation set are significantly better than those of the scheme with the previous rainfall input ≤240h, and further extending the previous rainfall length (720h, 960h, and 1440h) failed to improve the model results. Therefore, the input and output structure of the final optimal LSTM flood forecasting model for the Anhe Basin is determined as follows: Figure 8 shown.
[0077] The final LSTM flood forecasting model was applied to flood forecasting in the Anhe River Basin, and the flood calculation results of the training set and the test set were extracted and analyzed. In addition to NSE, MAE and RMSE, the peak qualified rate (QRP) and peak time qualified rate (QRT) indicators were used to evaluate the quality of the model's flood peak flow forecast results. The calculation of QRP and QRT is shown in formula (6) and formula (7):
[0078]
[0079]
[0080] Where: N P Indicates the number of qualified flood peak flows, N Trepresents the number of qualified flood peak times, and N represents the total number of floods. Taking the simulation and prediction results of the floods corresponding to the sixth period of the model output as an example, Table 2 gives the simulation results of the floods of the LSTM flood forecasting model, and takes the traditional Xin'anjiang conceptual hydrological model as a comparison benchmark. As can be seen from Table 2, the peak simulation and prediction results of the LSTM model are significantly better than those of the XAJ model. Compared with the XAJ model, the peak qualified rate QRP of the floods in the training set of the LSTM model increased from 77% to 82%, and the peak qualified rate QRP of the floods in the test set increased from 72% to 80%; the mean NSE of the floods in the training set increased from 0.825 to 0.871, and the mean NSE of the floods in the test set increased from 0.815 to 0.821; the evaluation indicators MAE and RMSE values of the floods in the training set and test set of the LSTM model are also lower. The above results analysis shows that the constructed LSTM flood forecasting model successfully established the complex nonlinear relationship between rainfall and outlet flow in the basin, and the model has a high flood forecasting accuracy in the Anhe Basin.
[0081] Table 2 Statistical results of flood simulations using the LSTM flood forecasting model in the Anhe River Basin
[0082]
[0083] Taking the flood simulation and predicted flow process corresponding to the sixth period of the model output as an example, 5 floods in the training set and test set were selected to draw a comparison chart of the flood simulation, prediction and measured flow process of the two flood forecasting models LSTM and XAJ, as shown in the figure. Fig. 9 As shown. Fig. 9 It can be seen that compared with the results of the XAJ model, the simulated and predicted flow process of the LSTM flood forecasting model is more consistent with the measured flow, and the rising and falling water stages of the flood are basically consistent with the results of the XAJ model. This further illustrates that the constructed LSTM flood forecasting model has fully learned the conversion mechanism between rainfall and runoff in the basin, and has established a good nonlinear mapping relationship between rainfall and outlet flow.
[0084] The above results show that the flood forecasting method based on the new universal input-output structure and long short-term memory network proposed in the present invention can successfully guide the LSTM flood forecasting model to mine and learn the complex nonlinear mapping relationship between basin rainfall and outlet flow. The model has excellent fitting ability for rainfall-flow relationship and forecasting ability for flood peak value. It has high simulation and forecasting accuracy for flood peak value and peak time in mountainous basins. In addition, the designed new universal input-output structure is highly practical in flood forecasting modeling of basins at different spatial scales. The machine learning flood forecasting model established based on this input-output structure can give full play to the contribution of rainfall in the basin and water storage status in the basin to the rise and fall of floods, and its hydrological interpretability foundation is strong.
[0085] The above-described embodiments merely express the implementation methods of the present invention, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A flood forecasting method based on a new universal input-output structure and long short-term memory network, It is characterized in that The flood forecasting method has significant hydrological significance, and the model input and output structure can be applied to basin flood forecasting at different spatial scales, including the following steps: The first step is to collect and organize historical flood data in the basin; Collect and organize flood data in the research basin, and divide all flood events into training set, validation set, and test set events; the training set flood events are used to optimize the internal weight matrix and bias vector parameters of the LSTM flood forecasting model; the validation set flood events are used to assist in determining the external settings of the model such as hyperparameters and loss functions; and the test set flood events are used to test the extrapolation ability of the trained model; The second step is to calculate the average confluence time of the basin; The average confluence time of a certain research basin is certain, and its duration is equal to the forecast period of flood in the basin, which comprehensively reflects the regulation and storage effect of the basin on the process of rainfall and water flow convergence; according to the historical flood process data collected and sorted by the basin, the time difference between the main rainfall and the corresponding flood peak flow in the flood is calculated, that is, the flood peak lag time; the average flood peak lag time of all floods is calculated, which is the average confluence time of the basin; The third step is to give the number of hidden layers and the number of hidden layer neuron nodes of the long short-term memory (LSTM) network flood forecasting model; The fourth step is to design the input and output structure of the new general LSTM flood forecasting model; The LSTM cell state is similar to the soil water storage state of the basin. The interaction between the three control gates and the cell state can be regarded as the consumption, increase and release of the soil water storage state of the basin. The three control gates include the forget gate, the input gate and the output gate. According to the traditional basin hydrological simulation theory and method, rainfall is selected as the only input factor of the LSTM flood forecasting model. The input of the LSTM flood forecasting model is the long sequence rainfall information of each rain gauge in the basin, and the input length is n+l time periods. Among them, n represents the input length of the previous rainfall, and the previous rainfall can be regarded as reflecting the previous soil water storage state of the basin and the influence of short-term rainfall information on the output flow value of the model. Multiple n are selected and the better model is determined according to the subsequent model performance. The output of the LSTM flood forecasting model is a flow value sequence equal to the confluence time of the study basin, that is, the output length is l time periods, l is equal to the basin confluence time and l≤n. Step 5: Generate training, validation and test sample sets; According to the input and output structure (values of n and l) of the new general LSTM flood forecasting model designed in the fourth step, the sample length is determined. The input rainfall sequence length of each sample is equal to n+l periods, and the output target flow sequence length is equal to l periods. According to the training set, validation set and test set divided in the first step, each flood generates corresponding training, validation and test sample sets in a sliding interception manner by period, and each flood generates multiple samples, each sample is composed of the input rainfall sequence P=[P t-n+1 ,P t-n+2 ,…,P t ,…,P t+l ] and output target flow sequence Q = [Q t+1 ,Q t+2 ,…,Q t ,…,Q t+l ] form an input and output data pair; where n is the number of periods of the input previous rainfall sequence of the LSTM flood forecasting model, l is the number of periods of the model output flow, and the input rainfall P of the tth period is t Contains the measured rainfall values at each rain gauge in the basin; Step 6: Model construction and training; The LSTM flood forecasting model uses the back propagation over time algorithm BPTT for supervised learning training. The model construction and training are based on the open source Keras and TensorFlow. The Keras framework running on the TensorFlow platform integrates a relatively mature machine learning algorithm package and directly calls the corresponding algorithm to complete the construction and training of the LSTM flood forecasting model. 6.1) Construction of LSTM flood forecasting model: Based on the number of hidden layers and the number of hidden layer neuron nodes given in the third step and the model input and output structure designed in the fourth step, the Keras layer package is called to define the input layer, hidden layer and output layer of LSTM to build the LSTM flood forecasting model; 6.2) LSTM flood forecasting model training: input the training and validation sample sets generated in step 5, set the hyperparameters, activation function, loss function, and optimization algorithm involved in the model training process, run the LSTM flood forecasting model built based on the Keras framework on the TensorFlow platform, and obtain the trained LSTM flood forecasting model; Step 7: Determine the optimal model and extract and analyze the flood simulation results of the basin; Compare and analyze the performance of the LSTM flood forecasting model under different input lengths, determine the final optimal LSTM flood forecasting model, further extract and study the results of basin flood simulation and forecast flow process, and analyze the forecasting performance of the LSTM flood forecasting model.
Citation Information
Patent Citations
LSTM-based medium and small river short-term flood forecasting method
CN109615011A
Flood forecasting method based on CS-LSTM
CN112396152A
System and method for forecasting floods
US20190227194A1
