Reservoir level prediction method, system, equipment and medium

Through the neural network combining the sparrow search algorithm and the LSTM model with the self-attention mechanism, the problem of the comprehensive influence of factors in the reservoir water level prediction is solved, high-precision water level prediction and timely early warning are achieved, and the efficiency of reservoir safety management is improved.

CN120409820APending Publication Date: 2025-08-01INSPUR SMART TECH INNOVATION (SHANDONG) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510558129.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art ignores the comprehensive influence of multiple factors in the prediction of reservoir water level, resulting in poor stability and reliability of the prediction results, and lack of potential correlation between automatic mining of real-time data and historical data, making it difficult to meet the requirements of real-time and accuracy.

Method used

The sparrow search algorithm is used to generate hyperparameter combinations, build an LSTM model, combine a neural network with self-attention mechanism, and use a multi-dimensional similarity calculation and weighted fusion algorithm to comprehensively consider the impact of meteorological factors on water level to achieve water level prediction.

Benefits of technology

It improves the accuracy and stability of water level prediction, and can issue water level warnings in a timely manner to ensure the safe operation of the reservoir.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409820A_ABST
    Figure CN120409820A_ABST
Patent Text Reader

Abstract

The invention provides a reservoir level prediction method, system and device and a medium, and belongs to the technical field of reservoir level detection. Randomly generating a group of hyper-parameter combinations by using a sparrow search algorithm, transmitting the hyper-parameter combinations to the target function, and constructing an LSTM model; based on the training data, generating a curvilinear function corresponding to the water level of the reservoir so as to generate curvilinear functions corresponding to the reservoir in various historical periods; calculating an average rainfall real-time characteristic value according to the hydrological data, and determining a real-time characteristic value corresponding to the rainfall; matching the real-time characteristic value with the curve function corresponding to each historical period of the reservoir water level, and predicting to obtain water level data; and according to the predicted water level data, a water level early warning threshold is set, and water level early warning information is issued in time. The reservoir level can be effectively predicted, and reliable guarantee is provided for safe operation of the reservoir in combination with real-time data and an early warning system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of reservoir water level detection, and particularly relates to a reservoir water level prediction method, system, device and medium. Background Art

[0002] Reservoirs are important water resource storage facilities. By accurately detecting the reservoir water level, the water storage volume of the reservoir can be grasped in real time.

[0003] The water level change has a direct impact on the safety of the dam. The structural safety of the dam is closely related to the reservoir water level. For example, when the reservoir water level is too high, the water pressure borne by the dam increases, which may pose a threat to the stability of the dam. Through water level detection, the change of the water pressure borne by the dam can be monitored in real time.

[0004] In the related art, data collection focuses on a few key indicators such as water level and rainfall, ignoring factors such as temperature, humidity, upstream water inflow and reservoir water discharge, and cannot comprehensively reflect the complex environment affecting water level changes. When matching real-time data with historical data to predict the water level, the related art compares rainfall values or uses fixed weights to consider various influencing factors. However, the change of the reservoir water level is affected by a variety of factors comprehensively, and the influence degree of each factor is different under different meteorological conditions. The matching method cannot accurately reflect this complex relationship. The prediction models of the related art are based on statistical models and neural network models, and cannot make full use of the advantages of different prediction means. The stability and reliability of the prediction results are poor. At the same time, in the process of data matching, there is a lack of analysis ability, and the potential correlation between real-time data and historical data cannot be automatically mined, and the matching efficiency and accuracy are low, which is difficult to meet the requirements of real-time and accuracy for reservoir water level prediction. Summary of the Invention

[0005] The present invention provides a reservoir water level prediction method. According to the prediction result, the water level warning threshold is set, and the water level warning information is released in time. The present invention can effectively predict the reservoir water level, combine real-time data and an early warning system, and improve the efficiency of water resource management.

[0006] The method includes: Step S101: Collect historical water regime information of the reservoir. The historical water regime information of the reservoir includes: water level data, meteorological data, upstream water inflow and reservoir water discharge; Step S102: Randomly generate a set of hyperparameter combinations by using the sparrow search algorithm, and transfer the hyperparameter combinations to the objective function. The objective function uses the hyperparameters to construct an LSTM model for predicting the water level value or the water level change trend; Step S103: Based on the training data, generate a curve function corresponding to the reservoir water level to describe the functional relationships between the reservoir water level and rainfall, temperature, and humidity respectively, so as to generate the curve functions corresponding to the reservoir in various historical periods; Step S104: Real-time obtain the hydrological data of the current rainfall, and calculate the real-time eigenvalue of the average rainfall according to the hydrological data to determine the real-time eigenvalue corresponding to the rainfall; Step S105: Match the real-time eigenvalue with the curve functions corresponding to the reservoir water level in each historical period to predict the water level data; Step S106: Set a water level warning threshold according to the predicted water level data and issue a water level warning message in a timely manner.

[0007] Preferably, in step S101, the historical water regime information of the reservoir includes the water level records, rainfall, temperature, humidity, upstream water inflow, and reservoir water discharge on a daily or hourly basis; Extract the features of the collected original data, preprocess the missing values of the original data, and standardize the historical water regime information of the reservoir by the MinMaxScaler method, and define the time step; Convert the historical water regime information of the reservoir into the number of samples, time step, and number of features required for model input; Create a time series data set, and divide the first 80% into the training set and the last 20% into the validation set in chronological order to construct a training data set.

[0008] Preferably, step S101 further includes: obtaining the historical acquisition data of multiple monitoring points and analyzing them one by one. It is recorded that the acquisition data of the analysis object monitoring point is the original data collected within p time, and the data volume is n; Obtain the set sampling period of the monitoring point; when there are multiple data within the sampling period time window, retain the first data point within the time window and discard the remaining data; When there is no data within the sampling period time window, use the naive prediction and interpolation methods to fill it; For the data whose value is greater than the value range of rainfall, temperature, and humidity data, take the upper limit of the corresponding index value range as the data after cleaning; For the data whose value is less than the value range of rainfall, temperature, and humidity data, take the lower limit of the corresponding index value range as the data after cleaning, and convert the data after cleaning into a time series form; at the same time, real-time obtain the hydrological data of the current rainfall, calculate the real-time eigenvalue of the average rainfall, and save the water level data and the real-time eigenvalue in the database.

[0009] Preferably, step S101 further includes: obtaining business information of rainfall, temperature, and humidity, including upper limit of value, lower limit of value, and data time interval; using the ADF test to determine whether the time series data of rainfall, temperature, and humidity after cleaning is stationary; Calculating the autocorrelation function values of rainfall, temperature, and humidity data, and determining the period of the data according to the peak points of the autocorrelation function values and the real-time characteristic values; Detecting the regular mutation subsequences of data mutation points, defining them as mutation periods, and calculating the decile interval and quartile interval of rainfall, temperature, and humidity data; saving the above features in the database.

[0010] Preferably, after randomly generating hyperparameter combinations using SSA and constructing and training an LSTM model through an objective function, suitable scenarios for each time series LSTM model are refined according to the algorithm characteristics; Obtaining the real-time characteristic values of rainfall, temperature, and humidity and water level data, establishing a mapping relationship between data characteristics and adaptation algorithms, and realizing automatic adaptation of an LSTM model suitable for rainfall, temperature, and humidity; Pre-formulating the mapping relationship between rainfall, temperature, and humidity data characteristics and LSTM model parameters, selecting LSTM model parameters, using the LSTM model with the selected parameters to predict the water level data within the next unit time, and saving the prediction results ypred for q unit times in the database; After generating a curve function corresponding to the reservoir water level based on the training data in the training dataset, obtaining the decile interval, quartile interval, and upper limit of value of rainfall, temperature, and humidity data characteristics; If the upper limit of real-time data is not clear, taking the maximum value of real-time data as the upper limit of value to calculate the threshold sensitivity criterion; using the threshold sensitivity as the criterion and combining with the characteristic variance of real-time data to determine the dynamic threshold upper and lower limits of real-time data within the next q unit times; Matching monitoring strategies according to water level data and real-time characteristic values. At the same time, according to the time interval between two data points of time series data, recommend appropriate alarm determination strategies for rainfall, temperature, and humidity; adopting a looser first-level dynamic threshold sensitivity and alarm determination strategy for data within the time window corresponding to the mutation period; Saving the generated dynamic threshold sequence within the next unit time in the database, and deploying the recommended alarm determination strategy to the monitoring and alarm module.

[0011] Preferably, step S105 is based on the multi-dimensional similarity calculation between the real-time characteristic values and the historical curve function, where the similarity calculation includes weighted matching of rainfall, dynamic weight adjustment of temperature and humidity, and the weights are dynamically adjusted according to the current meteorological conditions; When the real-time eigenvalue exceeds the range of historical data, an exception matching strategy is triggered. The matching result is generated by interpolation or extrapolation of adjacent historical data and marked as a high-risk match. Combining the prediction result of the LSTM model with the matching result of the historical curve function, the final matched water level data is comprehensively determined through a weighted fusion algorithm.

[0012] Preferably, after step S104, it further includes: after obtaining the real-time eigenvalue, obtaining the corresponding historical usage information in the database for the intercepted time period of the real-time eigenvalue, and extracting the corresponding historical water regime information of the reservoir from the historical usage information. Taking the historical water regime information of the reservoir as the Key value and the real-time eigenvalue as the Query value, and simultaneously inputting them into the neural network layer constructed based on the self-attention mechanism. According to the formula Calculate the corresponding weight characteristic coefficient. Among them, K represents the historical water regime information of the reservoir, Q represents the real-time eigenvalue, T is the matrix transpose operation symbol, and D is the vector dimension where K and Q are equal. Obtain the target analysis neural network, input the real-time eigenvalue into the input layer of the target analysis neural network for analysis. The output layer includes two output nodes corresponding to matching and non-matching respectively. Obtain the output node values corresponding to each output node, that is, the matching degree between the real-time eigenvalue and the corresponding output node, and select the matching type corresponding to the output node with the highest matching degree as the prediction information. According to the prediction information, if it is judged that the real-time eigenvalue matches the historical water regime information of the reservoir, then the water level prediction judgment is carried out based on the LSTM model and the curve function. If it is judged that they do not match, then re-check the data acquisition and feature extraction processes, or adjust the neural network parameters, and perform the matching verification and water level prediction process again.

[0013] This application also provides a reservoir water level prediction system, which includes: An information collection module for collecting the historical water regime information of the reservoir. A model construction module that randomly generates a set of hyperparameter combinations using the sparrow search algorithm and passes the hyperparameter combinations to the objective function. The objective function uses the hyperparameters to construct an LSTM model for predicting the water level value or the water level change trend. A curve function configuration module for training data to generate a curve function corresponding to the reservoir water level, which is used to describe the functional relationships between the reservoir water level and rainfall, temperature, and humidity respectively, so as to generate the curve functions corresponding to the reservoir in various historical periods. A feature calculation module for obtaining the hydrological data of the current rainfall in real time, and calculating the real-time eigenvalue of the average rainfall according to the hydrological data to determine the real-time eigenvalue corresponding to the rainfall. A water level matching module, configured to match the real-time eigenvalue with the curve function corresponding to each historical period of the reservoir water level, and predict water level data; A water level warning module, configured to set a water level warning threshold according to the predicted water level data, and timely issue a water level warning message.

[0014] According to another embodiment of the present application, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the reservoir water level prediction method are implemented.

[0015] According to still another embodiment of the present application, there is further provided a read storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the reservoir water level prediction method are implemented.

[0016] It can be seen from the above technical solutions that the present invention has the following advantages: The reservoir water level prediction method provided by the present invention collects historical water regime information of the reservoir covering multiple dimensions such as water level data, meteorological data, upstream inflow, and reservoir discharge. The sparrow search algorithm is used to automatically generate hyperparameter combinations, and the LSTM model is trained and evaluated through an objective function. The hyperparameters are continuously adjusted with the mean square error as an index to find the optimal solution. This algorithm simulates the behavior of sparrows foraging and avoiding natural enemies, and conducts efficient search in the hyperparameter space, which can find the most suitable LSTM model hyperparameter combination for reservoir data with different characteristics and improve the prediction accuracy of the model. The multi-dimensional similarity calculation method is adopted to perform weighted matching on rainfall, and the dynamic weights of temperature and humidity are adjusted according to the current meteorological conditions, fully considering the influence degree of each factor on the water level in different situations, and improving the accuracy and rationality of the matching.

[0017] The prediction results of the LSTM model and the matching results of the historical curve function are integrated through a weighted fusion algorithm, giving play to the advantages of the two prediction methods and making the final prediction results more stable and reliable. A neural network based on the self-attention mechanism is introduced, and the historical water regime information of the reservoir and the real-time eigenvalue are intelligently matched by calculating the weight feature coefficients, automatically mining the complex associations between data, and improving the matching efficiency and accuracy.

[0018] According to the predicted water level data, the water level warning threshold is set in combination with the actual situation, and can be dynamically adjusted according to the real-time data and prediction situation. When the predicted water level reaches or exceeds the warning threshold, a water level warning message is timely issued, effectively avoiding warning delay or false alarm, and providing a reliable guarantee for the safe operation of the reservoir. Description of the Drawings

[0019] To more clearly illustrate the technical solution of the present invention, the accompanying drawings required for the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0020] Figure 1 It is a flow chart of the reservoir water level prediction method; Figure 2 It is a schematic diagram of the reservoir water level prediction system; Figure 3 It is a schematic diagram of an electronic device. Detailed implementation manners

[0021] Water level data is typical time - series data, with time - series dependence and non - linear characteristics. The water level change of the reservoir is affected by many complex factors. The purpose of this application is to solve the problem that traditional methods are difficult to capture its complex patterns. The prediction of water level in this application belongs to multi - variable prediction. The performance of the LSTM model highly depends on the selection of hyperparameters, such as learning rate, number of LSTM units, time step, batch size, etc. Manual parameter tuning is time - consuming and it is difficult to find the optimal combination. The present invention uses the SSA algorithm to find the optimal hyperparameters of the LSTM model, and then predicts the reservoir water level through modeling. Combining real - time data and an early warning system can improve the efficiency of water resource management.

[0022] The reservoir water level prediction method provided by the present invention can solve the problem that the water level change of the reservoir is affected by many complex factors and it is difficult to capture relevant data.

[0023] The following will detail the reservoir water level prediction method involved in this application. For the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to thoroughly understand the embodiments of this application. However, those skilled in the art should clearly understand that this application can also be implemented in other embodiments without these specific details.

[0024] It should be understood that when used in the specification of this application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0025] Statements such as "an embodiment" or "some embodiments" described in this application mean that the specific features, structures, or characteristics described in the embodiment are included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in some other embodiments", "in still some other embodiments", etc. that appear at different places in this application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0026] 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. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0027] Please refer to Figure 1 The figure shows a flowchart of a reservoir water level prediction method in a specific embodiment. The method includes: Step S101: Collect historical water condition information of the reservoir. The historical water condition information of the reservoir includes: water level data, meteorological data, upstream water inflow, and reservoir water discharge.

[0028] In some embodiments, collect historical water condition information of the reservoir. The historical water condition information of the reservoir includes daily or hourly water level records, rainfall, temperature, humidity, upstream water inflow, and reservoir water discharge; perform feature extraction on the collected original data, preprocess the missing values of the original data, and perform standardization processing on the data through the MinMaxScaler method. Define the time step, convert the data into the shape required for model input, that is, the number of samples, time step, and number of features, create a time series data set, and divide the first 80% into the training set and the last 20% into the validation set in chronological order to construct a training data set.

[0029] This embodiment takes into account that the water level change is affected by a variety of factors comprehensively. By collecting multi-dimensional historical data, it can comprehensively reflect the historical laws and influencing factors of the reservoir water level change. Through data preprocessing, the data quality is improved to meet the requirements of model training. Standardization processing can accelerate the convergence speed of the model, and dividing the training set and the validation set is used to evaluate the performance of the model.

[0030] Step S102: Use the sparrow search algorithm to randomly generate a set of hyperparameter combinations, and pass the hyperparameter combinations to the objective function. The objective function uses the hyperparameters to construct an LSTM model for predicting the water level value or the water level change trend.

[0031] Specifically, the Sparrow Search Algorithm (SSA) first randomly generates a set of hyperparameter combinations, which includes the number of hidden units, the number of training epochs, and the learning rate. This set of hyperparameters is passed to the objective function, which constructs an LSTM model based on these hyperparameters and trains the model on the training set.

[0032] After the training is completed, the constructed LSTM model is evaluated using the validation set, and the mean squared error (MSE) is calculated to measure the difference between the predicted values and the actual values of the model. Based on the calculated MSE, the algorithm updates and adjusts the hyperparameter combination, tries to find a better hyperparameter combination, and continuously repeats the above process until the preset maximum number of iterations is reached or the algorithm converges. Finally, the LSTM model is constructed using the optimal hyperparameter combination found.

[0033] It can be seen that the Sparrow Search Algorithm simulates the foraging behavior of sparrows and the behavior of avoiding natural enemies, and searches in the hyperparameter space. By continuously adjusting the hyperparameter combination, the constructed LSTM model can learn the data features on the training set, and the prediction ability of the model for unknown data is evaluated through MSE on the validation set, and the hyperparameter combination that optimizes the model performance is gradually found.

[0034] Step S103: Based on the training data, generate a curve function corresponding to the reservoir water level to describe the functional relationships between the reservoir water level and rainfall, temperature, and humidity respectively, so as to generate the curve functions corresponding to the reservoir in various historical periods.

[0035] In this embodiment, based on the training data in the training dataset, through data analysis and modeling methods, a curve function that can describe the functional relationships between the reservoir water level and rainfall, temperature, and humidity is generated. The curve function reflects the laws of the reservoir water level changing with different rainfall, temperature, and humidity conditions in various historical periods.

[0036] Specifically, through the analysis and modeling of a large amount of historical data, the internal relationships between the water level and various influencing factors are mined, and mathematical functions are constructed to characterize this relationship. These functions can be regarded as an abstract expression of the laws of historical data. In subsequent predictions, based on the current influencing factor data, the corresponding water level change trend can be calculated through function calculation.

[0037] Step S104: Real-time obtain the hydrological data of the current rainfall, and calculate the real-time eigenvalue of the average rainfall according to the hydrological data to determine the real-time eigenvalue corresponding to the rainfall.

[0038] In this embodiment, the hydrological data of the current rainfall is obtained in real time, including information such as rainfall and rainfall time. These data are processed, and the average rainfall is calculated as the real-time eigenvalue to characterize the intensity characteristics of the current rainfall.

[0039] This embodiment considers that rainfall is one of the key factors affecting the reservoir water level. By calculating the average rainfall to extract real-time characteristic values, the complex information of the current rainfall can be simplified into a quantifiable index, which is convenient for comparative analysis with historical data and models.

[0040] In some specific embodiments, after obtaining the real-time characteristic values, historical usage information corresponding to the intercepted time period of the real-time characteristic values is obtained from the database, and the corresponding historical water regime information of the reservoir is extracted from the historical usage information.

[0041] After the calculation and acquisition of the real-time characteristic values are completed, a query is performed in the database according to the intercepted time period corresponding to the real-time characteristic values, such as a specific time interval of an hour, a day, etc. A large amount of historical usage information is stored in the database, covering various relevant data of the reservoir at different times. By screening out the historical usage information that matches the intercepted time period of the real-time characteristic values, the historical rainfall and water regime information specifically for the reservoir is further extracted, including but not limited to historical rainfall, temperature, humidity, water level data, etc. These information are important bases for subsequent analysis and judgment.

[0042] In this embodiment, the historical water regime information of the reservoir is used as the Key value, and the real-time characteristic value is used as the Query value, and both are input into the neural network layer constructed based on the self-attention mechanism. According to the formula The corresponding weighted characteristic coefficient is calculated. Where, K represents the historical water regime information of the reservoir, Q represents the real-time characteristic value, T is the matrix transpose operation symbol, and D is the vector dimension where K and Q are equal. In this embodiment, by using the historical water regime information and real-time characteristic value of the reservoir as Key and Query respectively, and calculating the weighted characteristic coefficient using the formula, the model can measure the similarity and correlation between the real-time characteristic value and the historical information. The larger the weighted characteristic coefficient, the closer the association between the real-time characteristic value and the corresponding historical information part, and this part of historical information will be given a higher weight in the analysis.

[0043] In this embodiment, the pre-constructed target analysis neural network is obtained, and the calculated weight feature coefficients are configured into the neural network. Then, the real-time feature values are input into the network from the input layer. The neural network processes and analyzes the input real-time feature values layer by layer internally. After feature extraction and transformation in the hidden layer, it finally reaches the output layer. The output layer has two output nodes, representing the two situations of matching and non-matching respectively. Each output node generates an output value, which reflects the degree of matching between the real-time feature value and the matching type represented by the output node. By comparing the magnitudes of the output values of the two output nodes, the matching type corresponding to the output node with the highest degree of matching is selected as the prediction information. The higher the value of the output node, the higher the similarity between the real-time feature value and the matching type. It can quickly and accurately determine the matching situation between the real-time feature value and the historical water regime information of the reservoir. At the same time, through the matching degree value of the output node, the degree of matching can be quantified, facilitating further analysis and evaluation.

[0044] In this embodiment, after the prediction information is obtained, it is judged. If the prediction information shows that the real-time feature value matches the historical water regime information of the reservoir, then the previously constructed LSTM model and the generated curve function corresponding to the reservoir water level can be utilized. The real-time feature values and data such as water level data and meteorological data are input into the LSTM model. The model makes a prediction and judgment on the current reservoir water level according to the laws and characteristics of the historical data learned, combined with the relationship between the water level and various influencing factors reflected by the curve function, and obtains the predicted water level value or the water level change trend.

[0045] If it is judged as non-matching, the data acquisition and feature extraction processes are rechecked, or the neural network parameters are adjusted, and the matching verification and water level prediction processes are carried out again.

[0046] The non-matching situation is caused by data problems or inappropriate model parameters. By rechecking the data acquisition and feature extraction processes, it can be ensured that the input data is accurate and reliable. Adjusting the neural network parameters can optimize the performance of the model, enabling it to better capture the relationships between data. Carrying out the matching verification and water level prediction processes again is to find a more accurate matching relationship and improve the accuracy of water level prediction.

[0047] Step S105: Match the real-time feature value with the curve functions corresponding to each historical period of the reservoir water level, and predict the water level data.

[0048] In this embodiment, the calculated real-time feature values are compared and matched with the curve functions corresponding to each historical period of the reservoir water level generated in step S103. By analyzing the corresponding situations of the real-time feature values in each curve function, the water level data is predicted.

[0049] The curve function generated based on historical data in this embodiment includes the water level change rules under different rainfall and other conditions. Matching the real-time characteristic values with these curve functions is essentially to find the similarity between the current rainfall conditions and historical conditions, and use the rules of historical data to predict the current water level situation.

[0050] Step S106: Set a water level warning threshold according to the predicted water level data, and timely issue a water level warning message.

[0051] For this embodiment, according to the water level data predicted in step S105, combined with the actual situation and safety requirements of the reservoir, set a reasonable water level warning threshold. When the predicted water level reaches or exceeds the warning threshold, timely issue a water level warning message to remind relevant personnel to take countermeasures.

[0052] The setting of the water level warning threshold is based on the consideration of the safe operation of the reservoir. By comparing with the predicted water level, it is judged whether there is a possibility of safety risks caused by too high water level. Once the warning is triggered, the information is transmitted in a timely manner so that relevant personnel can make decisions and responses quickly.

[0053] In an embodiment of the present invention, based on step S101, a possible embodiment will be given below to non-restrictively elaborate on its specific implementation scheme.

[0054] In this embodiment, a sensor network deployed at different positions of the reservoir is used. Each measurement point collects water level, rainfall, temperature, and humidity data at a fixed frequency. The rainfall data at different positions under the same time stamp is weighted and averaged to eliminate spatial sampling differences.

[0055] Set a sampling period and check the original data within each period: If there are multiple data points within the period, only retain the first data point, and mark the subsequent data as invalid.

[0056] Set a physically reasonable range for rainfall, temperature, and humidity data. For example, the single sampling value of rainfall is 0 - 500 mm / h, the temperature is -20°C - 60°C, and the humidity is 0 - 100%. When exceeding the upper limit value, take the 95% quantile of the corresponding index in the same historical period (same season, same weather type) as the correction value; when lower than the lower limit, take the 5% quantile. For example, if the rainfall sensor records 600 mm / h on a certain day, but the 95% quantile in the same historical period is 300 mm / h, then it is corrected to 300 mm / h.

[0057] In this embodiment, the cleaned data is sorted by time stamp to generate an equally spaced time series (such as one node per minute). Add a data quality marking field to the interpolated or corrected data, where 0 represents the original data, 1 represents interpolation, and 2 represents correction.

[0058] In this embodiment, the water level data and real-time characteristic values are stored in a time series database in the format of "timestamp|water level value|rainfall intensity|temperature-humidity index", and an index is established to accelerate the query. The signal-to-noise ratio of the input data is improved through sampling and screening, anomaly correction, and feature reconstruction.

[0059] As a way of this embodiment, step S101 further includes: obtaining the business information of rainfall, temperature, and humidity, including the upper limit of the value, the lower limit of the value, and the data time interval; using the ADF test to judge whether the time series data of rainfall, temperature, and humidity after cleaning has stationarity. Calculate the autocorrelation function values of the rainfall, temperature, and humidity data, and determine the period of the data according to the peak points of the autocorrelation function values and the real-time characteristic values.

[0060] It should be noted that for the time series data of rainfall, temperature, and humidity after cleaning, the augmented Dickey-Fuller (ADF) test method is used. This test constructs a statistic and compares it with a preset critical value to judge whether there is a unit root in the data. If the original hypothesis of the existence of a unit root is rejected, it means that the data is stationary; otherwise, it is considered that the data is non-stationary. In actual operation, a significance level (such as 0.05) will be set. When the test statistic is less than the critical value and the p-value is less than the significance level, it is determined that the data is stationary. Optionally, the ADF test is based on statistical principles and judges whether the data meets the stationarity conditions by detecting the trends and seasonal variations of the data. Stationary data means that the mean and variance do not change with time and can be used more reliably for model training and prediction.

[0061] Detect the regular mutation subsequences of the data mutation points, define them as mutation periods, and calculate the decile interval and quartile interval of the rainfall, temperature, and humidity data; save the above features in the database.

[0062] Scan the rainfall, temperature, and humidity data based on the sliding window mutation detection algorithm to detect the mutation points in the data. A mutation point refers to the position where the data changes significantly in a short period of time. Further analyze these mutation points, identify the regular mutation subsequences, and define them as mutation periods. For example, in the continuous temperature data, if it is found that the temperature rises sharply within a certain period of time and shows a certain pattern, then this time period can be regarded as a mutation period.

[0063] In this embodiment, after using SSA to randomly generate hyperparameter combinations and constructing and training the LSTM model through the objective function, the suitable scenarios for each time series LSTM model are refined according to the algorithm characteristics.

[0064] Obtain the real-time characteristic values of rainfall, temperature, and humidity and the water level data, establish the mapping relationship between the data characteristics and the adaptation algorithm, and realize the automatic adaptation of the LSTM model suitable for rainfall, temperature, and humidity.

[0065] Pre - establish the mapping relationship between rainfall, temperature, humidity data characteristics and LSTM model parameters, select the LSTM model parameters, use the LSTM model with the selected parameters to predict the water level data in the future unit time, and save the prediction results ypred of q unit times to the database.

[0066] After generating the curve function corresponding to the reservoir water level based on the training data in the training dataset, obtain the decile range, inter - quartile range and upper limit of the rainfall, temperature, humidity data characteristics.

[0067] In this embodiment, the decile range and inter - quartile range of rainfall, temperature, and humidity data are calculated respectively. The decile range refers to the difference between the 90th percentile and the 10th percentile after sorting the data from small to large; the inter - quartile range is the difference between the 75th percentile and the 25th percentile. These range indicators are used to measure the dispersion of the data and are more robust to outliers.

[0068] If the upper limit of the real - time data is not clear, take the maximum value of the real - time data as the upper limit to calculate the threshold sensitivity criterion; using the threshold sensitivity as the criterion, combined with the characteristic variance of the real - time data, determine the dynamic threshold upper and lower limits of the real - time data in the future q unit times.

[0069] According to the water level data and real - time characteristic values, match the monitoring strategy. At the same time, according to the time interval between two data points of the time - series data, recommend appropriate alarm determination strategies for rainfall, temperature, and humidity; for the data within the time window corresponding to the mutation period, adopt a more relaxed first - level dynamic threshold sensitivity and alarm determination strategy.

[0070] Save the generated dynamic threshold sequence in the future unit time to the database, and deploy the recommended alarm determination strategy to the monitoring and alarm module.

[0071] It can be seen that this embodiment continuously obtains the real - time data of rainfall, temperature, and humidity, compares the real - time data with the dynamic threshold upper and lower limits at the corresponding time points. If it exceeds the upper and lower limit range, mark this real - time data point as an abnormal point; after determining whether each data point is an abnormal point, determine whether to trigger an alarm at the current moment according to the recommended alarm determination strategy. If the triggering condition is met, trigger the alarm. Combining the real - time triggered alarm information, dynamically adjust and optimize the original water level warning threshold, considering factors such as data characteristics, mutation periods, and dynamic threshold sensitivity, so as to more accurately and timely issue water level warning information.

[0072] On the basis of the above embodiment, in order to further improve the reliability of the reservoir water level prediction method provided by the above embodiment, the following is an operative manner of step S105. In one embodiment, step S105 is based on a multi-dimensional similarity calculation between the real-time feature value and the historical curve function. The similarity calculation includes weighted matching of rainfall, dynamic weight adjustment of temperature and humidity, and the weight is dynamically adjusted according to the current meteorological conditions. When the real-time feature value exceeds the range of historical data, the abnormal matching strategy is triggered, and the matching result is generated by interpolation or extrapolation of adjacent historical data and marked as a high-risk match; The prediction results of the LSTM model are combined with the matching results of the historical curve function, and the final matching water level data is comprehensively determined through a weighted fusion algorithm.

[0073] This embodiment establishes relationships between real-time rainfall, temperature, and humidity and parameters of each historical period, such as rainfall-water level, temperature-water level, and humidity-water level relationships. The weight of each parameter is adjusted according to the current meteorological conditions. For example, if the current rainfall intensity is extremely high, the weight of rainfall is significantly increased (such as a weight of 0.6), while the weights of temperature and humidity are reduced (0.2 each). If the temperature changes drastically (such as extremely high or low temperatures), the weight of temperature is increased to 0.4, and the weights of other parameters are adjusted accordingly. For each historical curve function, the difference between the real-time eigenvalue and the historical curve in each dimension is calculated, and the comprehensive similarity is obtained by weighted summation.

[0074] For example, if the real-time rainfall exceeds the historical data range, that is, the current rainfall exceeds the historical maximum, the abnormal matching mechanism is triggered. The matching result is generated by linear or nonlinear interpolation of adjacent historical data, or extrapolated by the prediction value of the LSTM model, and the matching result is marked as high risk.

[0075] The historical water level values of the historical curve function are weighted and fused with the water level values predicted by the LSTM model. For example, if the water level predicted by the LSTM differs significantly from the historical matching value, the Bayesian optimization algorithm dynamically adjusts the weights (for example, LSTM weight 0.7, historical matching weight 0.3) to balance the reliability of the model prediction and historical data.

[0076] The following example uses a reservoir with a total storage capacity of 120 million m³. The reservoir has a drainage area of 850 km² and there is a city with a population of 500,000 downstream.

[0077] Deploy 32 pressure water level gauges (accuracy ±1cm) and connect to the Meteorological Bureau's API to obtain rainfall data on a 0.5°×0.5° grid. Establish data cleaning rules to eliminate abnormal water level records caused by sudden changes in air pressure (>2hPa / h).

[0078] When the sparrow population iterates to the 12th generation, the optimal parameter combination is found (140 hidden units, 135 training epochs, learning rate 3.2e-4). At this time, the MSE of the validation set drops to 0.12 m², which is 37% higher than the default parameters (100 hidden units, 100 epochs, learning rate 0.01).

[0079] The historical data is divided into three scenarios: spring flood (March - May), plum rain (June - July), and typhoon flood (August - September). Under the plum rain scenario, the water level = 0.003R² + 0.12T - 0.05H + 2.3 is established (R: mm / 3h, T: °C, H: %), and R² reaches 0.91.

[0080] At 08:00 on July 15th, the system detected that the rainfall intensity in the past 2 hours reached 35 mm / h (exceeding the threshold of 20 mm / h). Through DTW matching, the similarity between the current features and the event on July 12th, 2019 was found to be 0.93. The corresponding function was called to predict that the water level in the next 6 hours would reach 98.7 m (0.5 m away from the flood limit of 99.2 m). The system automatically triggered a yellow warning and recommended opening 1 sluice gate for discharging water.

[0081] The actual cumulative rainfall in 72 hours was 210 mm, the measured highest water level was 98.9 m, and the prediction error was 0.2 m (1.3%). This was a 75% improvement compared to the traditional ARIMA model (error 0.8 m), and the warning release time was advanced by 4 hours.

[0082] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0083] The following are embodiments of the reservoir water level prediction system provided by the embodiments of the present disclosure. This system belongs to the same inventive concept as the reservoir water level prediction methods in the above embodiments. For the details not described in detail in the embodiments of the reservoir water level prediction system, reference can be made to the embodiments of the above reservoir water level prediction methods.

[0084] As Figure 2 shown, the system includes: an information collection module for collecting historical water condition information of the reservoir.

[0085] A model construction module randomly generates a set of hyperparameter combinations using the sparrow search algorithm and passes the hyperparameter combinations to the objective function. The objective function uses the hyperparameters to construct an LSTM model for predicting the water level value or the water level change trend.

[0086] A curve function configuration module is used to train the data and generate a curve function corresponding to the reservoir water level, which is used to describe the functional relationships between the reservoir water level and rainfall, temperature, and humidity respectively, so as to generate curve functions corresponding to the reservoir in various historical periods.

[0087] A feature calculation module, configured to obtain in real time the hydrological data of the current rainfall, and calculate the real-time feature value of the average rainfall according to the hydrological data, and determine the real-time feature value corresponding to the rainfall.

[0088] A water level matching module, configured to match the real-time feature value with the curve function corresponding to each historical period of the reservoir water level, and predict the water level data.

[0089] A water level warning module, configured to set a water level warning threshold according to the predicted water level data, and timely issue a water level warning message.

[0090] As Figure 3 shown, the present application also provides an electronic device, including a display module 103, a memory 102, a processor 101, and a computer program stored on the memory and executable on the processor 101. When the processor 101 executes the program, the steps of the reservoir water level prediction method are implemented.

[0091] In the embodiments of the present invention, the electronic device includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.

[0092] In the embodiments of the present application, the processor 101 can be implemented by using at least one of an application specific integrated circuit, a programmable logic device, a field programmable gate array, a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to execute the functions described herein. In some cases, such an implementation can be implemented in a controller. For a software implementation, an implementation of a process or function can be implemented with a separate software module that allows execution of at least one function or operation. The software code can be implemented by a software application (or program) written in any suitable programming language. The software code can be stored in the memory and executed by the controller.

[0093] The display module 103 is configured to display information input by the user or information provided to the user. The display module 103 may include a display panel, and the display panel can be configured in the form of a liquid crystal display, an organic light emitting diode, etc.

[0094] The memory 102 can be used to store software programs and various data. The memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0095] This application also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the reservoir water level prediction method are implemented.

[0096] The storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0097] In the storage medium, the readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, and the readable medium may send, propagate, or transmit a program used by or in combination with an instruction execution system, apparatus, or device.

[0098] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A reservoir water level prediction method, characterized in that, The method includes: Step S101: Collect historical water regime information of the reservoir, where the historical water regime information of the reservoir includes: water level data, meteorological data, upstream inflow, and reservoir discharge; Step S102: Randomly generate a set of hyperparameter combinations using the sparrow search algorithm and pass the hyperparameter combinations to the objective function, where the objective function uses the hyperparameters to construct an LSTM model for predicting the water level value or the water level change trend; Step S103: Based on the training data, generate a curve function corresponding to the reservoir water level to describe the functional relationships between the reservoir water level and rainfall, temperature, and humidity respectively, so as to generate the curve functions corresponding to the reservoir in various historical periods; Step S104: Real-time obtain the hydrological data of the current rainfall, and calculate the real-time eigenvalue of the average rainfall according to the hydrological data to determine the real-time eigenvalue corresponding to the rainfall; Step S105: Match the real-time eigenvalue with the curve functions corresponding to each historical period of the reservoir water level to predict the water level data; Step S106: Set a water level warning threshold according to the predicted water level data and timely issue a water level warning message.

2. The reservoir water level prediction method according to claim 1, characterized in that In step S101, the historical water regime information of the reservoir includes daily or hourly water level records, rainfall, temperature, humidity, upstream inflow, and reservoir discharge; Extract features from the collected original data, preprocess the missing values of the original data, and perform standardization processing on the historical water regime information of the reservoir through the MinMaxScaler method, and define the time step; Convert the historical water regime information of the reservoir into the number of samples, time step, and number of features required for model input; Create a time series dataset, and divide the first 80% into the training set and the last 20% into the validation set in chronological order to construct a training dataset.

3. The reservoir water level prediction method according to claim 1, characterized in that Step S101 further includes: Obtain the historical collection data of multiple monitoring points and analyze them one by one. Record that the collection data of the analysis object monitoring point is the original data collected within p time, and the data volume is n; Obtain the set sampling period of the monitoring point; when there are multiple data within the sampling period time window, retain the first data point within the time window and discard the remaining data; When there is no data within the sampling period time window, use the naive prediction and interpolation methods to fill it; For the data whose value is greater than the value range of rainfall, temperature, and humidity data, take the upper limit of the corresponding index value range as the cleaned data; For the data whose value is less than the value range of rainfall, temperature, and humidity data, take the lower limit of the corresponding index value range as the cleaned data, and convert the cleaned data into a time series form; at the same time, real-time obtain the hydrological data of the current rainfall, calculate the real-time eigenvalue of the average rainfall, and save the water level data and the real-time eigenvalue in the database.

4. The reservoir water level prediction method according to claim 1, wherein Step S101 further includes: Obtain the business information of rainfall, temperature, and humidity, including the upper limit of the value, the lower limit of the value, and the data time interval; use the ADF test to judge whether the time series data of the cleaned rainfall, temperature, and humidity has stationarity; Calculate the autocorrelation function values of rainfall, temperature, and humidity data, and determine the period of the data according to the peak points of the autocorrelation function values and the real-time eigenvalues; Detect the regular mutant subsequences of the detection data, define them as the mutation periods, and calculate the decile range and quartile range of rainfall, temperature, and humidity data; save the above features in the database.

5. The reservoir water level prediction method according to claim 4, characterized in that After randomly generating hyperparameter combinations using SSA and constructing and training an LSTM model through an objective function, extract the suitable scenarios for each time series LSTM model according to the algorithm characteristics; Obtain the real-time feature values of rainfall, temperature, and humidity and water level data, establish the mapping relationship between data features and adaptation algorithms, and realize the automatic adaptation of the LSTM model suitable for rainfall, temperature, and humidity; Pre-determine the mapping relationship between rainfall, temperature, and humidity data features and LSTM model parameters, select LSTM model parameters, use the LSTM model with the selected parameters to predict the water level data in the future unit time, and save the prediction results ypred for q unit times in the database; After generating the curve function corresponding to the reservoir water level based on the training data in the training dataset, obtain the decile range, quartile range, and upper limit of the values of rainfall, temperature, and humidity data features; If the upper limit of the real-time data is not clear, take the maximum value of the real-time data as the upper limit of the value to calculate the threshold sensitivity criterion; Taking the threshold sensitivity as the criterion, combined with the characteristic variance of the real-time data, determine the dynamic threshold upper and lower limits of the real-time data in the future q unit times; According to the water level data and real-time feature values, match the monitoring strategy. At the same time, according to the time interval between two data points of the time series data, recommend appropriate alarm determination strategies for rainfall, temperature, and humidity; adopt a looser first-level dynamic threshold sensitivity and alarm determination strategy for the data within the time window corresponding to the mutation period; Save the generated dynamic threshold sequence in the future unit time in the database, and deploy the recommended alarm determination strategy to the monitoring and alarm module.

6. The reservoir water level prediction method according to claim 1, characterized in that, Step S105 further includes: calculating the multi-dimensional similarity based on the real-time feature values and the historical curve function; Among them, the similarity calculation includes the weighted matching of rainfall, the dynamic weight adjustment of temperature and humidity, and the weights are dynamically adjusted according to the current meteorological conditions; When the real-time feature value exceeds the historical data range, trigger the abnormal matching strategy, generate the matching result through interpolation or extrapolation of adjacent historical data, and mark it as a high-risk match; Combining the prediction result of the LSTM model and the matching result of the historical curve function, comprehensively determine the finally matched water level data through the weighted fusion algorithm.

7. The reservoir water level prediction method according to claim 1, characterized in that After step S104, it further includes: after obtaining the real-time feature value, obtain the historical usage information corresponding to the intercepted time period of the real-time feature value from the database, and extract the corresponding historical water regime information of the reservoir from the historical usage information; Taking the historical water regime information of the reservoir as the Key value and the real-time characteristic value as the Query value, and inputting them into the neural network layer constructed based on the self-attention mechanism at the same time, according to the formula calculate the corresponding weighted characteristic coefficient; Among them, K represents the historical water regime information of the reservoir, Q represents the real-time feature value, T is the matrix transpose operation symbol, and D is the vector dimension where K and Q are equal; Obtain the target analysis neural network, input the real-time feature values into the input layer of the target analysis neural network for analysis. The output layer includes two output nodes corresponding to matching and non-matching respectively. Obtain the output node values corresponding to each output node, that is, the matching degree between the real-time feature value and the corresponding output node, and select the matching type corresponding to the output node with the highest matching degree as the prediction information; According to the prediction information, if it is judged that the real-time feature value matches the historical water condition information of the reservoir, then perform water level prediction judgment based on the LSTM model and the curve function; If it is judged that they do not match, re-check the data acquisition and feature extraction processes, or adjust the neural network parameters, and perform the matching verification and water level prediction process again.

8. A reservoir water level prediction system, characterized in that, The system is used to implement the reservoir water level prediction method described in any one of claims 1 to 7; The system includes: An information collection module for collecting historical water condition information of the reservoir; A model construction module that randomly generates a set of hyperparameter combinations using the sparrow search algorithm and passes the hyperparameter combinations to the objective function. The objective function uses the hyperparameters to construct an LSTM model for predicting the water level value or the water level change trend; A curve function configuration module for training data to generate a curve function corresponding to the reservoir water level, which is used to describe the functional relationships between the reservoir water level and rainfall, temperature, and humidity respectively, so as to generate curve functions corresponding to the reservoir in various historical periods; A feature calculation module for obtaining the hydrological data of the current rainfall in real time and calculating the real-time feature value of the average rainfall according to the hydrological data to determine the real-time feature value corresponding to the rainfall; A water level matching module for matching the real-time feature value with the curve functions corresponding to each historical period of the reservoir water level to predict the water level data; A water level warning module for setting a water level warning threshold according to the predicted water level data and timely issuing water level warning information.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the reservoir water level prediction method described in any one of claims 1 to 7.

10. A read storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the steps of the reservoir water level prediction method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Underground water level prediction method, system and equipment and storage medium

    CN121350440A

  • Reservoir flood forecasting system based on data-driven model

    CN121436426A