River water level prediction method and system based on machine learning

Through the river water level prediction method based on machine learning, the gold sine algorithm and convolutional neural network model are used to solve the problems of high cost of river water level monitoring and difficult maintenance in the existing technology, and efficient and accurate water level prediction and early warning are achieved.

CN120146276APending Publication Date: 2025-06-13PEARL RIVER HYDROLOGY & WATER RESOURCES SURVEY CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510211575.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The prior art requires a lot of manpower and material resources when obtaining river water level information. It is costly, difficult to maintain and has a great impact on the environment, making it difficult to achieve efficient and accurate water level monitoring.

Method used

The river water level prediction method based on machine learning is adopted, and the target site is selected, the hydrological station data and rainfall station data are obtained, and the golden sine algorithm is used to optimize the parameters, and a convolutional neural network model is constructed for water level prediction.

Benefits of technology

Accurate prediction and early warning of river water levels is achieved, prediction efficiency and accuracy are improved, manpower and material costs are reduced, and the impact on the environment is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146276A_ABST
    Figure CN120146276A_ABST
Patent Text Reader

Abstract

The invention discloses a river water level prediction method and system based on machine learning, and relates to the technical field of river water level prediction. The method comprises the following specific steps: selecting a target site, and determining upstream and downstream sites of the target site on the same river; hydrometric station data and rainfall station data of the target station and upstream and downstream stations are acquired; performing parameter optimization by using a golden sine algorithm according to the hydrometric station data and the rainfall station data to obtain an optimal input feature combination; constructing a convolutional neural network model, and training the convolutional neural network model through historical data to obtain a water level prediction model; and inputting the optimal input feature combination into a water level prediction model to predict the future river water level. The method combines the advantages of the machine learning algorithm to construct the water level prediction model, and improves the prediction efficiency of the river water level on the basis of guaranteeing the prediction precision of the river water level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of river water level prediction, and particularly to a river water level prediction method and system based on machine learning. Background Technique

[0002] In order to effectively avoid the losses caused by flood disasters and timely understand the river conditions, water regime monitoring has become a key issue that must be emphasized. In the flood prevention warning system, the river water level information can be used as the basic basis for the construction design of relevant water conservancy projects, an important indicator for flood prevention, and the basic parameter for flood forecasting. In order to monitor the river water level in real time and accurately, most of the hydrological monitoring stations in China mainly obtain the river water level by manual measurement, including installing water level gauges for visual reading or using sensors to automatically collect water level information. However, these measurement methods require a large amount of manpower and material resources, and at the same time, there are also disadvantages such as high cost, difficult maintenance, and great impact on the environment. Therefore, for those skilled in the art, how to obtain river water level information efficiently and accurately is an urgent problem to be solved. Summary of the Invention

[0003] The purpose of the present invention is to provide a river water level prediction method and system based on machine learning to solve the problems raised in the background technique, combine machine learning with water level prediction, and realize accurate prediction and warning of river water level.

[0004] To achieve the above purpose, the present invention provides the following solution: A river water level prediction method based on machine learning, the specific steps include the following:

[0005] Select a target site and determine the upstream and downstream sites of the target site located on the same river;

[0006] Obtain the hydrological station data and rainfall station data of the target site and its upstream and downstream sites;

[0007] Use the golden sine algorithm to optimize parameters according to the hydrological station data and the rainfall station data to obtain the optimal input feature combination;

[0008] Construct a convolutional neural network model, and train the convolutional neural network model through historical data to obtain a water level prediction model;

[0009] Input the optimal input feature combination into the water level prediction model to predict the future river water level.

[0010] Preferably, the hydrological station data includes real-time water level, flow rate, runoff, and historical runoff; the rainfall station data includes real-time rainfall observation data and daily rainfall observation data.

[0011] Preferably, it further includes performing preprocessing operations on the hydrological station data and the rainfall station data, and the preprocessing operations include removing outliers and normalizing the data.

[0012] Preferably, the steps of training the convolutional neural network model are as follows:

[0013] Obtain the initial model parameters to be trained for the convolutional neural network model;

[0014] Divide the historical data into a training set and a test set;

[0015] Train the initial model parameters through the training set to obtain water level prediction labels;

[0016] Obtain the error between the water level prediction label and the measured label, and perform backpropagation of the error in the convolutional neural network model;

[0017] Obtain the scaling values of each network layer included in the convolutional neural network model, and the scaling values are used to indicate the ratio of shrinking or amplifying the error backpropagated to the corresponding network layer;

[0018] Respectively based on the scaling values, perform scaling processing on the error backpropagated to the corresponding network layer;

[0019] Based on the error after scaling processing, update the model parameters of the convolutional neural network model to obtain the water level prediction model.

[0020] Preferably, it further includes verifying the accuracy of the prediction result of the water level prediction model through the test set and cross-validation.

[0021] Preferably, after obtaining the prediction result of the river channel water level, it further includes performing water level early warning according to the prediction result, and the specific steps are as follows:

[0022] If the early warning standard is reached, send an early warning signal to the data processing terminal;

[0023] The data processing terminal determines the early warning level based on the water level early warning index, and formulates corresponding early warning measures and emergency plans according to the early warning level.

[0024] Preferably, the data processing terminal includes a mobile terminal or a PC terminal.

[0025] On the other hand, a river channel water level prediction system based on machine learning is provided, including a site selection module, a data acquisition module, a feature selection module, a model construction module, and a water level prediction module that are connected in sequence; wherein,

[0026] The site selection module is used to select a target site and determine the upstream and downstream sites of the target sites located on the same river;

[0027] The data acquisition module is used to acquire hydrological station data and rainfall station data of the target site and its upstream and downstream sites;

[0028] The feature selection module is used to perform parameter optimization according to the hydrological station data and the rainfall station data by using the golden sine algorithm to obtain an optimal input feature combination;

[0029] The model construction module is used to construct a convolutional neural network model, and train the convolutional neural network model through historical data to obtain a water level prediction model;

[0030] The water level prediction module is used to input the optimal input feature combination into the water level prediction model to predict the future river channel water level.

[0031] According to the specific embodiments provided by the present invention, the following technical effects are disclosed by the present invention:

[0032] (1) A water level prediction model is constructed by combining the advantages of machine learning algorithms, which improves the prediction efficiency of the river channel water level on the basis of ensuring the prediction accuracy of the river channel water level;

[0033] (2) Determine the warning level according to the river channel water level prediction information, and formulate corresponding warning measures according to the warning level, which provides a more reliable theoretical support for scientific dispatching decisions;

[0034] (3) Optimize according to the hydrological station data and the rainfall station data by using the golden sine algorithm, obtain an optimal input feature combination and input it into the water level prediction model to predict the future river channel water level, so that a more accurate water level prediction model can be obtained, and further improve the accuracy of downstream water level prediction. Description of the Drawings

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 It is the method flow chart of the present invention;

[0037] Figure 2 It is the system structure diagram of the present invention. Detailed Embodiments

[0038] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0039] The object of the present invention is to provide a river water level prediction method based on machine learning, as Figure 1 shown, and the specific steps are as follows:

[0040] S1. Select a target site and determine the upstream and downstream sites of the target site located on the same river;

[0041] S2. Obtain the hydrological station data and rainfall station data of the target site and its upstream and downstream sites;

[0042] S3. Use the golden sine algorithm to optimize parameters according to the hydrological station data and rainfall station data to obtain the optimal input feature combination;

[0043] S4. Construct a convolutional neural network model, and train the convolutional neural network model through historical data to obtain a water level prediction model;

[0044] S5. Input the optimal input feature combination into the water level prediction model to predict the future river water level.

[0045] Further, in S2, the hydrological station data includes real-time water level, flow rate, runoff, and historical runoff; the rainfall station data includes real-time rainfall observation data and daily rainfall observation data.

[0046] Further, it also includes preprocessing operations on the obtained hydrological station data and rainfall station data, and the preprocessing operations include removing outliers and normalizing the data.

[0047] It should be noted that the golden sine algorithm (Gold-SA) is a new metaheuristic optimization algorithm proposed by Tanyildizi et al. in 2017. Its inspiration comes from the fact that the sine function scans within the unit circle similar to the space search for the solution of the problem to be optimized, and the search space is reduced by the golden ratio to approach the optimal solution of the algorithm. Compared with traditional metaheuristic optimization algorithms, the Gold-SA algorithm has the characteristics of simple principle, few set parameters, and strong optimization ability. In the present invention, the specific steps for optimizing parameters using the golden sine algorithm are as follows:

[0048] S31. Initialize the population and determine the population size and search space. The population size is determined according to the complexity of the problem and computing resources, and the search space is the value range of the input features. Randomly generate the initial population, and each individual represents an input feature combination.

[0049] S32. Calculate the fitness. For each individual, substitute the corresponding input feature combination into the model for prediction, and calculate the fitness function value according to the prediction result and the actual target variable. The fitness function can be the root mean square error, mean absolute error, etc.

[0050] S33. Iterate the golden sine algorithm to update the individual positions: Update the positions of each individual according to the formula of the golden sine algorithm. The update formula of the golden sine algorithm is:

[0051]

[0052] where represents the position of the i-th individual at the t-th iteration, r 1 and r 2 are random numbers, A is a control parameter, and its value gradually decreases as the number of iterations increases. Calculate the fitness value of the new individual.

[0053] S33. Select the optimal individual. In each iteration, select the individual with the best fitness value as the current optimal individual.

[0054] S33. Judge the termination condition. The maximum number of iterations or a certain fitness threshold can be set as the termination condition. If the termination condition is met, stop the iteration and output the optimal input feature combination; otherwise, continue the iteration.

[0055] Further, in S4, the steps of training the convolutional neural network model are:

[0056] S41. Obtain the initial model parameters of the convolutional neural network model to be trained; the initial model parameters include the initial convolution kernels of each convolutional layer, the initial bias matrices of each convolutional layer, the initial weight matrix of the fully connected layer, and the initial bias vector of the fully connected layer;

[0057] S42. Divide the historical data into a training set and a test set;

[0058] S43. Train the initial model parameters with the training set to obtain the water level prediction labels;

[0059] S44. Obtain the error between the water level prediction labels and the measured labels, and perform backpropagation of the error in the convolutional neural network model;

[0060] S45. Obtain the scaling values of each network layer included in the convolutional neural network model. The scaling values are used to indicate the ratio of shrinking or amplifying the error backpropagated to the corresponding network layer;

[0061] S46. Based on the scaling values respectively, perform scaling processing on the error backpropagated to the corresponding network layer;

[0062] S47. Update the model parameters of the convolutional neural network model based on the error after scaling processing to obtain a water level prediction model.

[0063] Furthermore, it also includes verifying the accuracy of the prediction results of the water level prediction model through a test set and cross-validation.

[0064] Furthermore, after obtaining the prediction results of the river channel water level, it also includes water level early warning according to the prediction results. The specific steps are as follows:

[0065] If the early warning standard is reached, an early warning signal is sent to the data processing terminal; the data processing terminal includes a mobile terminal or a PC;

[0066] The data processing terminal determines the early warning level based on the water level early warning index and formulates corresponding early warning measures and emergency plans according to the early warning level.

[0067] On the other hand, a river channel water level prediction system based on machine learning is provided, as Figure 2 shown, including a site selection module, a data acquisition module, a feature selection module, a model construction module, and a water level prediction module connected in sequence; among them,

[0068] The site selection module is used to select target sites and determine the upstream and downstream sites of the target sites located on the same river;

[0069] The data acquisition module is used to acquire hydrological station data and rainfall station data of the target site and its upstream and downstream sites;

[0070] The feature selection module is used to optimize parameters using the golden sine algorithm based on the hydrological station data and rainfall station data to obtain an optimal input feature combination;

[0071] The model construction module is used to construct a convolutional neural network model and obtain a water level prediction model by training the convolutional neural network model with historical data;

[0072] The water level prediction module is used to input the optimal input feature combination into the water level prediction model to predict the future river channel water level;

[0073] In this article, specific examples are used to elaborate on the principles and implementation methods of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A river water level prediction method based on machine learning, characterized in that: The specific steps include the following: Select the target site and determine the upstream and downstream sites of the target site on the same river; Obtain hydrological station data and rainfall station data of the target site and upstream and downstream sites; Optimizing parameters using the golden sine algorithm based on the hydrological station data and the rainfall station data to obtain an optimal input feature combination; Construct a convolutional neural network model and train it with historical data to obtain a water level prediction model; The optimal input feature combination is input into the water level prediction model to predict the future river water level.

2. A river water level prediction method based on machine learning according to claim 1, characterized in that: The hydrological station data include real-time water level, flow, runoff and historical runoff; the rain gauge station data include real-time rainfall observation data and daily rainfall observation data.

3. The method for predicting river water level based on machine learning according to claim 1, characterized in that: It also includes preprocessing operations on the hydrological station data and the rainfall station data, and the preprocessing operations include removing abnormal values ​​and normalizing the data.

4. The method for predicting river water level based on machine learning according to claim 1, characterized in that: The steps of training the convolutional neural network model are: Obtaining initial model parameters of the convolutional neural network model to be trained; Dividing the historical data into a training set and a test set; The initial model parameters are trained using the training set to obtain a water level prediction label; Obtaining an error between the water level prediction label and the measured label, and back-propagating the error in the convolutional neural network model; Obtaining a scaling value of each network layer included in the convolutional neural network model, wherein the scaling value is used to indicate a ratio of reducing or amplifying an error back-propagated to a corresponding network layer; Based on the scaling values, respectively, scaling is performed on the errors back-propagated to the corresponding network layers; Based on the error after scaling processing, the model parameters of the convolutional neural network model are updated to obtain the water level prediction model.

5. A river water level prediction method based on machine learning according to claim 4, characterized in that: It also includes verifying the accuracy of the prediction results of the water level prediction model through the test set and cross-validation.

6. The method for predicting river water level based on machine learning according to claim 1, characterized in that: After obtaining the prediction result of the river water level, it also includes issuing a water level warning according to the prediction result. The specific steps are as follows: If the warning standard is reached, a warning signal is sent to the data processing terminal; The data processing terminal determines the warning level based on the comprehensive water level warning indicators, and formulates corresponding warning measures and emergency plans according to the warning level.

7. A river water level prediction method based on machine learning according to claim 6, characterized in that: The data processing terminal includes a mobile terminal or a PC terminal.

8. A river water level prediction system based on machine learning, characterized in that: It includes a site selection module, a data acquisition module, a feature selection module, a model building module, and a water level prediction module which are connected in sequence; among them, The site selection module is used to select a target site and determine the upstream and downstream sites of the target site located on the same river; The data acquisition module is used to acquire the hydrological station data and rainfall station data of the target site and the upstream and downstream sites; The feature selection module is used to perform parameter optimization using the golden sine algorithm according to the hydrological station data and the rainfall station data to obtain the optimal input feature combination; The model building module is used to build a convolutional neural network model, and train the convolutional neural network model through historical data to obtain a water level prediction model; The water level prediction module is used to input the optimal input feature combination into the water level prediction model to predict the future river water level.