Reservoir water level prediction method based on neural network
By constructing a neural network algorithm model and using historical data to predict the water level of the reservoir, the water level observation and prediction of reservoir water levels in existing technologies have the problem of large manpower consumption and slow response speed, and achieve more efficient and accurate reservoir water level predictions.
Patent Information
- Application Number
- CN202010633749.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-02
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-07-02
AI Technical Summary
The prior art has problems such as large labor consumption, slow response speed and short warning window period in the observation and prediction of reservoir water level, making it difficult to effectively monitor and predict reservoir water level.
The water level prediction method based on the neural network is adopted, and the neural network algorithm model is used to train the water level, rainfall and the amount of upstream reservoir flooding by collecting historical reservoir water levels, rainfall and the amount of upstream reservoir flood discharge.
The accuracy and response speed of the water level prediction of the reservoir has been improved, the input of manpower and material resources is reduced, the early warning window period has been extended, and the decision -making ability of hydrological management institutions has been enhanced.
Smart Images

Figure CN113887774B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a reservoir water level prediction method, in particular to a reservoir water level prediction method based on a neural network. Background Art
[0002] Generally speaking, the water level of a reservoir is affected by the discharge of upstream water systems and seasonal rainfall. my country has a vast territory, and about 3 / 4 of its land area is subject to flood disasters of different types and degrees. The eastern plain areas where flood control is focused, such as the middle and lower reaches of the Liaohe River, the northern plains of the Haihe River, the middle reaches of the Yangtze River (Jianghan Plain, Dongting Lake Area, Poyang Lake Area and the area along the river), and the Pearl River Delta, all have a common geographical feature, that is, they are located in low-lying areas around lakes and on both sides of rivers and in estuaries. In addition, the junction of some mountainous areas and coastal plains in the southeast coast is also an area with a high degree of flood risk. Most of them are in the floodplains that are most affected by floods. my country has nearly 1 million square kilometers of floodplains, and more than 60% of the country's industrial and agricultural output value, 40% of the population, 35% of cultivated land, more than 600 cities, major railways, highways, oil fields, and many industrial and mining enterprises are threatened by flood disasters. Reservoirs are one of the widely used engineering measures for flood control in my country. At appropriate locations in the upstream rivers of the flood control areas, comprehensive utilization reservoirs that can regulate and store flood water are built, and the reservoir storage capacity is used to intercept and store flood water, reduce the peak flow entering the downstream rivers, and achieve the purpose of reducing flood disasters. However, in provinces with abundant rainfall, it is also necessary to strictly observe rainfall and reservoir water levels during the flood season. It is generally believed that excessively high reservoir water levels may lead to the risk of floods caused by earthquakes, landslides, collapses, mudslides, and even dam breaches. At present, hydrological departments in various places usually conduct observations and records manually by printing "Reservoir Water Level and Rainfall Record Sheets", which is more labor-intensive and resource-intensive, and this method also has the defects of slow response speed and too short warning window period. Summary of the invention
[0003] In view of the above problems existing in the prior art, the object of the present invention is to provide a reservoir water level prediction method based on neural network.
[0004] In order to achieve the above object, one aspect of the present invention provides a water level prediction method based on a neural network, comprising:
[0005] Collecting historical data related to known reservoir water levels, and storing the historical data as a first data set after processing;
[0006] dividing the first data set into at least a second data set and a third data set;
[0007] Constructing a neural network algorithm model, training the neural network algorithm model using a second data set, and generating a water level prediction model;
[0008] Collecting data related to water levels of existing reservoirs, and inputting the data related to water levels of existing reservoirs into the prediction model to perform water level prediction;
[0009] Among them, the historical related data include historical rainfall information divided by the first time axis and the first location, upstream reservoir flood discharge information and historical reservoir water level information; the existing reservoir water level related data include actual rainfall observation data divided by the first time axis and the first location, and upstream reservoir flood discharge estimated data.
[0010] Preferably, the first time axis represents days or months, and the first location represents location information of the reservoir to be predicted.
[0011] Preferably, the second data set is used as a training set, and the second data set is used as a test set, wherein the ratio of the data volume of the training set to the test set is between 8:1 and 9:1.
[0012] Preferably, the neural network algorithm model includes an input layer, an LSTM (LSTM, Long Short-Term Memory) layer and an output layer, wherein the LSTM layer is constructed using the Keras framework and includes at least two layers, the number of nodes in each LSTM layer is between 250 and 350 and multi-fold cross validation is used, and the time step is between 2 and 5. Keras is a well-known open source neural network API based on Python, which can be run with well-known machine learning systems such as TensorFlow, CNTK or Theano as the backend.
[0013] Preferably, processing the historical related data includes shuffling and rearranging the data of the second data set based on a random function.
[0014] Preferably, the random function is a random forest algorithm.
[0015] Preferably, after generating the water level prediction model, the water level prediction model is evaluated by a stochastic gradient descent (SGD) method.
[0016] Preferably, evaluating the water level prediction model comprises:
[0017] Set the learning rate of the training process to 0.001, the batch size to 128, the number of iterations to 10, and the maximum number of iterations to 300;
[0018] Set the activation function to the linear rectified function (Rectified Linear Unit, ReLU);
[0019] The loss function is set to mean absolute error (MAE).
[0020] Preferably, the water level prediction model is:
[0021]
[0022] Among them, x i is the actual rainfall observation data of the reservoir in time period i; y i It is the estimated data of flood discharge of the upstream reservoir in time period i.
[0023] Preferably, evaluating the water level prediction model comprises:
[0024] Set the mean square error function (MSE) and the mean absolute error function (MAE), where the mean square error function and the mean absolute error function are:
[0025]
[0026] Among them, y 预测 is the predicted value; 实际 is the true value; N is the total number of predicted items; M is the number of reservoirs.
[0027] The neural network-based reservoir water level prediction method provided by the present invention has better prediction effect and generalization ability than the prediction based on artificial experience. The effectiveness of the LSTM-based neural network model in reservoir water level prediction is proved, and through the analysis of the actual observed values of the reservoir water level, it can be concluded that there is a correlation between the reservoir water level and the rainfall and the flood discharge of the upstream reservoir, which is of great significance for the hydrological management agency to predict the impact of weather on the reservoir water level through the rainfall forecast of the weather forecast and formulate a flood discharge plan in time. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The present invention is a flow chart of a method for predicting reservoir water level based on a neural network. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0030] Various aspects and features of the present invention are described herein with reference to the accompanying drawings.
[0031] These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment given as a non-limiting example, with reference to the accompanying drawings.
[0032] It should also be understood that, although the invention has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the invention that have the characteristics recited in the claims and are therefore within the scope of protection defined thereby.
[0033] The above and other aspects, features and advantages of the present invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0034] Specific embodiments of the present invention are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments of the invention are merely examples of the present invention, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to determine the true intent based on the user's historical operations and to avoid unnecessary or redundant details that obscure the present invention. Therefore, the specific structural and functional details invented herein are not intended to be limiting, but are merely used as the basis and representative basis for the claims to teach those skilled in the art to use the present invention in a variety of ways with substantially any suitable detailed structure.
[0035] The present invention is a reservoir water level prediction method based on a neural network. The neural network is used to learn the relationship between input data and output data. The neural network algorithm model is first trained through a large amount of historical data related to reservoir water level, rainfall, and upstream reservoir flood discharge, and then a water level prediction model is obtained to predict the reservoir water level. The following will be further explained with diagrams.
[0036] like Figure 1 As shown, a water level prediction method based on a neural network is provided in one embodiment of the present invention, comprising:
[0037] S1. Collecting historical data related to known reservoir water levels, and storing the historical data as a first data set after processing;
[0038] S2, dividing the first data set into at least a second data set and a third data set;
[0039] S3, constructing a neural network algorithm model, training the neural network algorithm model through the second data set, and generating a water level prediction model;
[0040] S4, collecting data related to the water level of existing reservoirs, and inputting the data related to the water level of existing reservoirs into the prediction model to perform water level prediction;
[0041] Wherein, the historical related data include historical rainfall information divided by the first time axis and the first location, upstream reservoir flood discharge information and historical reservoir water level information; the existing reservoir water level related data include actual rainfall observation data divided by the first time axis and the first location, and upstream reservoir flood discharge estimated data. Wherein, the first time axis division usually refers to historical data divided by days or months, preferably months. The historical reservoir water level data and upstream reservoir flood discharge information of the reservoir can be obtained from the historical records of the reservoir management department, while the historical rainfall information can be collected through the public interface API of the Internet weather data, such as China Weather Network. The part of Internet data collection realized by programming is already a prior art and will not be described in detail in this application. As for the actual rainfall observation data, it can be obtained through the rainfall observation stations deployed around the reservoir, and can also be collected and realized by the public interface API.
[0042] In the present invention, the first data set is the total set of historical related data collected, and specifically, the first data can be divided into a second data set and a third data set according to a ratio, wherein the second data set is used as a training set, and the second data set is used as a test set, and the ratio of the data volume of the training set to the test set is between 8:1 and 9:1. Preferably, the training set accounts for 80% and the test set accounts for 20%, the role of the training set is to train the constructed neural network algorithm model, and the role of the test set is to verify the generated water level prediction model.
[0043] For example, the applicant selected the historical reservoir water level data of the "Huairou Reservoir" from 2008 to 2018, the historical flood discharge data of the upstream "Huaijiu River" and "Huaisha River", and the historical rainfall information collected by the "China Weather Network" (http: / / www.weather.com.cn / ), and the water level prediction model obtained was:
[0044]
[0045] Among them, x i is the actual rainfall observation data of Huairou Reservoir in time period i; y i It is the estimated data of flood discharge of the upstream reservoir of Huairou Reservoir in time period i.
[0046] In some embodiments, the neural network algorithm model of the present invention includes an input layer, an LSTM (LSTM, Long Short-Term Memory) layer and an output layer, wherein the LSTM layer is constructed using the Keras framework and includes at least two layers, the number of nodes in each LSTM layer is between 250 and 350, and multi-fold cross validation is adopted, and the time step is between 2 and 5. Preferably, the number of nodes in each LSTM layer is 350 and six-fold cross validation is adopted, and the time step is 2, that is, historical relevant data every 2 days. When the historical relevant data is specifically selected, the total time span can select historical relevant data every 2 days in the past 10 years. Among them, Keras is a well-known open source neural network API based on Python, which can be run with well-known machine learning systems such as TensorFlow, CNTK or Theano as the backend.
[0047] Furthermore, in the method of the present invention, preferably, the processing of the historical related data may specifically include shuffling and rearranging the data of the second data set based on a random function. That is, the training set is shuffled and rearranged, which can minimize the correlation between data blocks and enhance the rationality and accuracy of the prediction. The random function is a random forest algorithm.
[0048] In addition, in this embodiment of the present invention, after the water level prediction model is generated, the water level prediction model may be further evaluated by a stochastic gradient descent (SGD) method. Specifically, the water level prediction model is evaluated, including:
[0049] The learning rate of the training process is set to 0.001, the batch size is 128, the number of iterations is 10, and the maximum number of iterations is 300; the activation function is set to the linear rectified function (Rectified Linear Unit, ReLU); the loss function is set to the mean absolute error function (Mean Absolute Error, MAE).
[0050] During the evaluation process, the mean square error function (MSE) and the mean absolute error function (MAE) can also be set to evaluate the prediction error together, where the mean square error function and the mean absolute error function are:
[0051]
[0052] Among them, y 预测 is the predicted value; 实际is the true value; N is the total number of predicted items; M is the number of reservoirs.
[0053] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. A water level prediction method based on a neural network, characterized in that: include: Collecting historical data related to known reservoir water levels, and storing the historical data as a first data set after processing; dividing the first data set into at least a second data set and a third data set; A neural network algorithm model is constructed, and the neural network algorithm model is trained by a second data set to generate a water level prediction model; after the water level prediction model is generated, the water level prediction model is evaluated by a random gradient descent method; the water level prediction model is evaluated, including: setting the learning rate of the training process to 0.001, the batch size to 128, the number of iterations to 10, and the maximum number of iterations to 300; setting the activation function to a linear rectification function; setting the loss function to a mean absolute error function; the water level prediction model is: Among them, x i is the actual rainfall observation data of the reservoir in time period i; y i is the estimated data of flood discharge from the upstream reservoir of the reservoir in time period i; The water level prediction model is evaluated, including: Set the mean square error function and the mean absolute error function, where the mean square error function and the mean absolute error function are: Among them, y 预测 is the predicted value; 实际 is the true value; N is the total number of predicted items; M is the number of reservoirs; Collecting data related to water levels of existing reservoirs, and inputting the data related to water levels of existing reservoirs into the prediction model to perform water level prediction; Among them, the historical related data include historical rainfall information divided by the first time axis and the first location, upstream reservoir flood discharge information and historical reservoir water level information; the existing reservoir water level related data include actual rainfall observation data divided by the first time axis and the first location, and upstream reservoir flood discharge estimated data.
2. The method according to claim 1, characterized in that The first time axis represents days or months, and the first location represents location information of the reservoir to be predicted.
3. The method according to claim 1, characterized in that The second data set is used as a training set, and the second data set is used as a test set, wherein the ratio of the data volume of the training set to the test set is between 8:1 and 9:
1.
4. The method according to claim 1, characterized in that The neural network algorithm model includes an input layer, an LSTM layer and an output layer, wherein the LSTM layer is constructed using the Keras framework and includes at least two layers, the number of nodes in each LSTM layer is between 250 and 350 and multi-fold cross validation is used, and the time step is between 2 and 5.
5. The method according to claim 1, characterized in that The historical related data is processed, including shuffling and rearranging the data of the second data set based on a random function.
6. The method according to claim 5, characterized in that The random function is a random forest algorithm.
Citation Information
Patent Citations
Small watershed flood forecasting method for establishing data drive by support vector machine
CN110298498A
Internet of Things-oriented accumulated water level prediction method based on long-short-term memory network
CN111222698A