Wavelet-lstm reservoir water level prediction method and device based on bayesian optimization

By using a wavelet-LSTM water level prediction method based on Bayesian optimization, combined with areal rainfall and upstream water level data, multi-order decomposition and independent hyperparameter optimization are performed to solve the problem of low accuracy and stability in reservoir water level prediction, and to achieve accurate prediction of extreme water conditions.

CN122635599APending Publication Date: 2026-08-25WUHAN HONGXIN TECH SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610639296.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-11
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing reservoir water level prediction methods suffer from several problems, including the lack of spatial topological correlation in the construction of water level features, the coarse calibration of hyperparameters that ignores frequency division characteristics, and the focus of optimization on average error while ignoring key extreme value deviations. These issues lead to low prediction accuracy and stability.

Method used

A wavelet-LSTM reservoir water level prediction method based on Bayesian optimization is adopted. By acquiring areal rainfall data and upstream reservoir water level data, and combining water system topology information, a dataset of model independent variables is constructed. Wavelet basis functions are used for multi-order decomposition to form multiple water level subsequences. An LSTM prediction model is independently constructed for each subsequence. Bayesian optimization is used to find the optimal hyperparameter combination, and the models are trained separately. Finally, the predicted values ​​are superimposed to obtain the water level prediction result.

Benefits of technology

It improves the accuracy and stability of reservoir water level prediction, especially significantly reducing forecast errors under extreme water conditions, and enhancing the physical correlation of characteristic data and the overall forecast stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122635599A_ABST
    Figure CN122635599A_ABST
Patent Text Reader

Abstract

The application discloses a wavelet-LSTM reservoir water level prediction method and device based on Bayesian optimization, which comprises the following steps: obtaining the areal rainfall data of the sub-basin where the target reservoir is located and the water level data of the upstream reservoir directly associated with the target reservoir, combining the data to construct a model independent variable data set; obtaining the historical water level data of the target reservoir, performing multi-order decomposition to obtain a plurality of water level subsequences, coupling each water level subsequence with the model independent variable data set to form a plurality of model data sets; constructing a corresponding LSTM prediction model for each obtained model data set, and independently performing Bayesian optimization to obtain an optimal hyperparameter combination; using each model data set and the corresponding optimal hyperparameter combination, training the LSTM prediction model to obtain a plurality of sub-frequency prediction sub-models; inputting the model independent variable data corresponding to the to-be-predicted period into each sub-frequency prediction sub-model to obtain the predicted values of the water level subsequences, and superimposing the predicted values to obtain a water level prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of reservoir water level prediction technology, and more specifically, to a wavelet-LSTM-based method and apparatus for predicting reservoir water levels based on Bayesian optimization. Background Technology

[0002] Reservoir water level prediction is a core technical support for flood control and reservoir optimization. Currently, the mainstream methods are divided into hydrodynamic models based on physical processes and data-driven models based on big data. Hydrodynamic models have clear mechanisms but are computationally complex and time-consuming, making them difficult to meet real-time optimization needs; data-driven models, on the other hand, are fast and efficient, and have become a common choice in engineering practice.

[0003] However, several specific problems still exist in the practical application of traditional data-driven models: First, the construction of water level features is relatively simple, often directly using single-point monitoring data or simple time-lag processing, failing to effectively combine the topological information of the watershed system. This results in insufficient exploration of the correlation between input variables and water level changes; that is, water level feature processing does not fully consider the spatial topological correlation of the watershed confluence, relying heavily on single-point monitoring data, leading to insufficient correlation between features and influencing factors. Second, the hyperparameter calibration of neural network models often adopts empirical trial and error or uniform optimization of the decomposed components, lacking fine-grained adjustments for the characteristics of reservoir water level subsequence data of different frequencies, easily leading to difficulty in converging low-frequency trends and overfitting of high-frequency fluctuations. Third, the optimization objective is biased towards average accuracy, ignoring the prediction bias of key extreme value scenarios such as flood peaks and low water levels. These problems collectively affect the overall forecast stability of the model, especially when dealing with reservoir water level sequences with high nonlinearity and uncertainty, the accuracy of extreme value prediction is difficult to meet the actual engineering needs.

[0004] In summary, existing technologies suffer from problems such as low accuracy and stability in reservoir water level prediction due to the lack of spatial topological correlation in the construction of water level features, the coarse calibration of hyperparameters that ignores frequency division characteristics, and the focus on average error in optimization that ignores key extreme value deviations. Summary of the Invention

[0005] To address at least one deficiency or improvement requirement of the existing technology, this invention provides a wavelet-LSTM-based method and apparatus for predicting reservoir water levels based on Bayesian optimization, which solves the problem of low accuracy and stability in reservoir water level prediction in the existing technology, thereby significantly reducing prediction errors under extreme water conditions while ensuring overall forecast stability.

[0006] To achieve the above objectives, according to a first aspect of the present invention, a wavelet-LSTM-based method for predicting reservoir water levels based on Bayesian optimization is provided. This method includes: acquiring areal rainfall data of the sub-basin where the target reservoir is located, and water level data of upstream reservoirs directly associated with the target reservoir, determined based on water system topology information; combining the areal rainfall data and the upstream reservoir water level data to construct a model independent variable dataset; acquiring historical water level data of the target reservoir, performing multi-order decomposition using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components; and combining each water level sub-sequence with the... The model independent variable datasets are coupled to form multiple independent model datasets. For each model dataset, a corresponding LSTM prediction model is constructed, and Bayesian optimization is performed independently to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Using each model dataset and its corresponding optimal hyperparameter combination, the LSTM prediction model is trained to obtain multiple frequency-division prediction sub-models. The model independent variable data corresponding to the time period to be predicted is input into each frequency-division prediction sub-model to obtain the predicted value of each water level subsequence. The predicted values ​​of each water level subsequence are superimposed to obtain the water level prediction result of the target reservoir.

[0007] In an exemplary embodiment, obtaining the areal rainfall data of the sub-basin where the target reservoir is located includes: dividing the sub-basin into multiple Thiessen polygon regions, each region corresponding to a rain gauge station; determining the weight of each rain gauge station based on the proportion of the area of ​​each region to the total area of ​​the sub-basin; and performing a weighted summation of the rainfall at each rain gauge station based on the weights to obtain the areal rainfall data.

[0008] In an exemplary embodiment, the step of using wavelet basis functions to perform multi-order decomposition to obtain multiple water level sub-sequences containing different frequency components includes: using dbN series wavelet basis functions, where N is a positive integer greater than 1; the order of the multi-order decomposition is 3, resulting in 1 low-frequency approximate sub-sequence and 3 high-frequency detail sub-sequences.

[0009] In an exemplary embodiment, the method further includes: employing a Bayesian optimization algorithm with a preset composite evaluation index as the optimization objective; the calculation formula for the composite evaluation index is: F = -(NSE - α×MAE - β×RMSE); where NSE is the Nash efficiency coefficient, MAE is the mean absolute error, RMSE is the root mean square error, and α and β are preset weight coefficients; with maximizing the composite evaluation index as the optimization objective, the optimal hyperparameter combination for the LSTM prediction model is found.

[0010] In an exemplary embodiment, the step of constructing a corresponding LSTM prediction model for each obtained model dataset and independently performing Bayesian optimization to obtain the optimal hyperparameter combination that adapts to the frequency characteristics of the subsequence includes: setting independent hyperparameter search spaces for each LSTM prediction model, wherein the hyperparameters include at least the number of neurons in the hidden layer of the network and the learning rate; constructing a probabilistic surrogate model and an expected improved acquisition function based on a tree-structured Parzen estimator, and iteratively optimizing within the respective defined hyperparameter search spaces to determine the independent optimal hyperparameter combination for each model.

[0011] In an exemplary embodiment, the LSTM prediction model is an encoder-decoder structure, comprising an input layer, an encoder LSTM layer, a repeating vector layer, a decoder LSTM layer, and a fully connected output layer connected in sequence. The input layer receives the model's independent variable dataset and historical water level component sequence data. The encoder LSTM layer, with its hidden layer unit number determined by the optimal hyperparameter combination, processes the input sequence and outputs a final state vector. The repeating vector layer copies the final state vector output by the encoder LSTM layer to the same number of copies as the prediction output step size along the time step dimension. The decoder LSTM layer, with its unit number determined by the optimal hyperparameter combination, processes the output sequence of the repeating vector layer and outputs the hidden state sequence corresponding to the time step. The fully connected output layer performs a linear transformation on the hidden state sequence output by the decoder LSTM layer to generate the predicted water level component sequence value for the corresponding time step.

[0012] In an exemplary embodiment, after coupling each of the water level subsequences with the model independent variable dataset to form multiple independent model datasets, the method further includes: dividing each set of model datasets into a training set and a test set according to a preset ratio; and standardizing the training set and the test set using the Z-score standardization method.

[0013] According to a second aspect of the present invention, a wavelet-LSTM reservoir water level prediction device based on Bayesian optimization is also provided, comprising: an acquisition unit, configured to acquire areal rainfall data of the sub-basin where the target reservoir is located, and water level data of upstream reservoirs directly associated with the target reservoir determined based on water system topology information, and to combine the areal rainfall data and the upstream reservoir water level data to construct a model independent variable dataset; and a decomposition unit, configured to acquire historical water level data of the target reservoir, perform multi-order decomposition using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components, and to combine each water level sub-sequence with the model independent variables respectively. The datasets are coupled to form multiple independent model datasets. An optimization unit is used to construct a corresponding LSTM prediction model for each model dataset and independently perform Bayesian optimization to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Using each model dataset and its corresponding optimal hyperparameter combination, the LSTM prediction model is trained to obtain multiple frequency-division prediction sub-models. A prediction unit is used to input the model independent variable data corresponding to the time period to be predicted into each frequency-division prediction sub-model to obtain the predicted value of each water level subsequence. The predicted values ​​of each water level subsequence are superimposed to obtain the water level prediction result of the target reservoir.

[0014] According to a third aspect of the invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the above-described wavelet-LSTM reservoir water level prediction method based on Bayesian optimization at runtime.

[0015] According to a fourth aspect of the present invention, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described Bayesian-optimized wavelet-LSTM reservoir water level prediction method through the computer program.

[0016] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: (1) This invention provides a wavelet-LSTM reservoir water level prediction method based on Bayesian optimization. Through a frequency-separated independent calibration mechanism, the Bayesian optimization algorithm independently searches for suitable hyperparameters such as the number of hidden layer nodes, time step, and learning rate for each water level subsequence based on its data distribution characteristics. This differentiated configuration enables the model to better fit the physical evolution of different frequency components, alleviating the problem of neglecting one aspect for another under a single parameter setting. While maintaining overall prediction stability, it optimizes the ability to synchronously fit the trend and fluctuation terms in the water level process line.

[0017] (2) This invention designs a composite evaluation index with the Nash efficiency coefficient as the core as the guiding function for Bayesian optimization. Utilizing the high sensitivity of the Nash efficiency coefficient (NSE) to peak flow and extreme water level changes, the optimization process is guided to actively focus on the fitting residuals of the flood peak fluctuations and low water levels during iterations. This measure enables the model to reduce prediction bias under extreme water conditions while ensuring overall statistical accuracy.

[0018] (3) This invention combines the topology of the water system and calculates the areal rainfall of the sub-basin using Thiessen polygons or inverse distance weighting, and extracts the directly related upstream reservoir water level vector. This construction method explicitly integrates the spatial distribution characteristics of watershed runoff generation and the hydraulic connection between upstream and downstream into the model input matrix, enhancing the physical correlation between independent variables and target water levels. The coupling of areal rainfall from the water system topology with upstream water levels enhances the physical interpretability of the feature data. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating an optional Bayesian optimization-based wavelet-LSTM reservoir water level prediction method provided in this application embodiment; Figure 2 A schematic diagram illustrating the calibration of an optional Bayesian-optimized wavelet-LSTM reservoir water level prediction model, provided for an embodiment of this application. Figure 3 A schematic diagram of an optional Bayesian-optimized wavelet-LSTM reservoir water level prediction model provided for an embodiment of this application; Figure 4 A schematic diagram of an optional Bayesian-optimized wavelet-LSTM reservoir water level prediction device provided for an embodiment of this application; Figure 5 This is a schematic diagram of an optional electronic device provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0022] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0023] According to one aspect of the embodiments of this application, a wavelet-LSTM-based method for predicting reservoir water levels based on Bayesian optimization is provided. The following is in conjunction with... Figure 1 This application describes a Bayesian-optimized wavelet-LSTM reservoir water level prediction method provided in its embodiments.

[0024] Figure 1 This is a flowchart illustrating an optional Bayesian optimization-based wavelet-LSTM reservoir water level prediction method provided in an embodiment of this application. Figure 1 As shown, the process of this method may include the following steps: S102, obtain the areal rainfall data of the sub-basin where the target reservoir is located, and the water level data of the upstream reservoir directly related to the target reservoir determined based on the water system topology information, and combine the areal rainfall data and the upstream reservoir water level data to construct a model independent variable dataset; S104, acquire the historical water level data of the target reservoir, perform multi-order decomposition using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components, and couple each water level sub-sequence with the model independent variable dataset to form multiple independent model datasets; S106. Construct a corresponding LSTM prediction model for each set of model datasets and perform Bayesian optimization independently to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Use each set of model datasets and its corresponding optimal hyperparameter combination to train the LSTM prediction model to obtain multiple frequency division prediction sub-models. S108, input the model independent variable data corresponding to the time period to be predicted into each frequency-division prediction sub-model to obtain the predicted value of each water level sub-sequence, and superimpose the predicted values ​​of each water level sub-sequence to obtain the water level prediction result of the target reservoir.

[0025] The optional Bayesian optimization-based wavelet-LSTM reservoir water level prediction method provided in this application is suitable for time series prediction scenarios with strong nonlinearity and non-stationarity, and high requirements for extreme value prediction accuracy. For example, it can be applied to the refined water level forecasting service of reservoirs (especially those affected by upstream water systems), serving the needs of water conservancy projects and safety management such as flood control and drought relief, and water resource allocation.

[0026] For example, to overcome the limitations of traditional single-point data-driven approaches, features reflecting the physical processes of runoff generation and confluence in a watershed can be incorporated into the model input. First, a physically coupled input matrix based on the river system topology is constructed. Then, areal rainfall is calculated by dividing the watershed into sub-watersheds and multi-source factors such as water levels at upstream stations are integrated to form an independent variable system reflecting the runoff generation and confluence processes in the watershed, thereby enhancing the correlation between input variables and water level changes.

[0027] Specifically, the target reservoir and its sub-basin are determined. Based on the distribution of rain gauges within the sub-basin, the areal mean rainfall data for the sub-basin is calculated using spatial interpolation methods (e.g., Thiessen polygon method or inverse distance weighting method), forming an areal rainfall time series. Simultaneously, based on the watershed topology, one or more upstream reservoirs with direct hydraulic connections to the target reservoir are identified, and their concurrent water level observation data are obtained, forming an upstream water level time series data set. Finally, the areal rainfall time series and the upstream water level time series data set are aligned and combined along the time dimension to jointly constitute a model independent variable dataset reflecting the spatial distribution of rainfall in the watershed and the hydraulic connections between upstream and downstream areas.

[0028] Meanwhile, to decompose the non-stationary and nonlinear original water level sequence into subsequences of different frequencies and reduce modeling complexity, wavelet decomposition can be used to break down the water level sequence into reservoir water level subsequence data of different frequencies. A frequency-sequence independent calibration mechanism is introduced, and a Bayesian optimization algorithm is used to adaptively search for optimal hyperparameters for each frequency component. This addresses the contradiction between the difficulty in converging low-frequency trends and the tendency for overfitting high-frequency fluctuations, achieving refined modeling for different frequency characteristics. Finally, a composite extreme value evaluation index dominated by the Nash efficiency coefficient is designed as the optimization objective function. Its high sensitivity to extreme values ​​guides the model to actively focus on the fitting accuracy of key scenarios such as flood peaks and low water levels, thereby significantly reducing forecast errors under extreme water conditions while ensuring overall forecast stability.

[0029] Correspondingly, the specific approach involves acquiring historical water level observation data of the target reservoir for the same period to construct an original water level time series. Wavelet transform is then used to perform multi-scale decomposition on this original water level series, thereby decomposing the complex non-stationary water level series into a set of water level component subsequences with distinct frequencies, each representing the characteristics of changes at different time scales. For example, this includes a low-frequency approximate subsequence representing a long-term trend and several high-frequency detail subsequences representing fluctuations at different scales. After decomposition, the same set of model independent variable datasets is paired with each water level component subsequence, thus forming multiple independent model datasets. Each dataset has the same input (independent variables), but the prediction target (dependent variable) is a water level component with different frequency characteristics.

[0030] For each set of model datasets, a corresponding Long Short-Term Memory (LSTM) network prediction model is constructed. These LSTM models can adopt the same network architecture framework, such as a sequence-to-sequence structure including an encoder and decoder. A Bayesian optimization task is independently configured and performed for each LSTM model to achieve frequency-specific adaptive hyperparameter calibration. Through iterative optimization using the Bayesian optimization algorithm, an optimal set of hyperparameters is independently found for each frequency component's corresponding LSTM model. Subsequently, using each set of model datasets and their corresponding optimal hyperparameter combinations, each LSTM model is trained separately, ultimately resulting in a set of frequency-specific prediction sub-models specializing in different frequency components.

[0031] When water level prediction is required, the model's independent variable data (i.e., areal rainfall and upstream reservoir water level data for the time period to be predicted) are first obtained. This processed set of independent variable data is then input into each of the trained frequency-specific prediction sub-models. Each sub-model outputs the future values ​​of the water level component sub-sequences it is responsible for predicting at a specific frequency. Finally, the predicted values ​​of all water level component sub-sequences are linearly superimposed to reconstruct the complete water level prediction sequence of the target reservoir at the original scale. If necessary, the prediction results can be post-processed, such as de-standardized, to output the final water level prediction value with actual physical units.

[0032] Through steps S102 to S108 above, areal rainfall data of the sub-basin where the target reservoir is located and water level data of upstream reservoirs directly related to the target reservoir are obtained and combined to construct a model independent variable dataset; historical water level data of the target reservoir are obtained and multi-level decomposition is performed to obtain multiple water level subsequences. Each water level subsequence is coupled with the model independent variable dataset to form multiple sets of model datasets; a corresponding LSTM prediction model is constructed for each set of model datasets, and Bayesian optimization is performed independently to obtain the optimal hyperparameter combination. Using each set of model datasets and its corresponding optimal hyperparameter combination, the LSTM prediction model is trained to obtain multiple frequency-division prediction sub-models; the model independent variable data corresponding to the time period to be predicted is input into each frequency-division prediction sub-model to obtain the predicted value of each water level subsequence. The predicted values ​​are superimposed to obtain the water level prediction result, which solves the problem of low accuracy and stability of reservoir water level prediction in existing technologies, thereby significantly reducing the prediction error under extreme water conditions while ensuring the overall forecast stability.

[0033] In one exemplary embodiment, obtaining the areal rainfall data of the sub-basin where the target reservoir is located includes: The sub-basin is divided into multiple Thiessen polygon regions, each region corresponding to a rain gauge station; The weight of each rain gauge station is determined based on the proportion of the area of ​​each region to the total area of ​​the sub-basin. The areal rainfall data is obtained by weighted summation of the rainfall at each rain gauge station based on the weights.

[0034] In this embodiment, the geographical boundary of the sub-basin where the target reservoir is located is first defined, and all available rain gauge observation points within and around the sub-basin are collected. Based on these discrete station locations, the Thiessen polygon method in computational geometry is applied to spatially divide the entire sub-basin area. Optionally, the division rule is: for any point within the sub-basin, its Thiessen polygon region is determined by the nearest rain gauge. This method discretizes the continuous, irregular geographical space of the sub-basin into several non-overlapping, seamlessly connected Thiessen polygon regions, where each polygon region has one and only one corresponding rain gauge. This rain gauge is considered the representative station for rainfall within that polygon region.

[0035] After the Thiessen polygons are divided, the area of ​​each polygon region is calculated, along with the ratio of that area to the total area of ​​the entire sub-basin. This ratio is defined as the area weight of the rain gauge station corresponding to that polygon. For any specific time point requiring calculation, the rainfall observations from all rain gauge stations within the sub-basin at that time are obtained. Then, using the area weight of each station as a coefficient, a weighted average of the concurrent rainfall observations from all rain gauge stations is calculated. The resulting value is the areal rainfall data for that sub-basin at that time.

[0036] This embodiment fully considers the uneven spatial distribution of rain gauges within the watershed, enabling the final calculated areal rainfall data to more realistically and reasonably reflect the overall distribution and average effect of rainfall in the watershed space. This provides higher quality and more representative key input features for the physics-based reservoir water level prediction model.

[0037] In an exemplary embodiment, the step of using wavelet basis functions to perform multi-order decomposition to obtain multiple water level sub-sequences containing different frequency components includes: The dbN series wavelet basis functions are used, where N is a positive integer greater than 1; the order of the multi-order decomposition is 3, resulting in one low-frequency approximate subsequence and three high-frequency detail subsequences.

[0038] Optionally, the dbN series wavelet basis functions are selected as the decomposition tool, where N is a positive integer greater than 1, representing the vanishing moment order of the wavelet. In this embodiment, the dbN wavelet (Daubechies wavelet) is preferably the db5 wavelet (i.e., N=5), because it has a good balance between time domain resolution and frequency domain resolution, and can effectively capture the trend and abrupt change features in the water level sequence.

[0039] Here, the order of the multi-scale decomposition is set to 3. The choice of this order is usually based on prior knowledge of the main change cycles of the original water level sequence or determined through preliminary experiments. The 3rd order decomposition can separate the information in the water level sequence into 3 different detail scales (high frequency) and 1 approximate scale (low frequency), which satisfies the main frequency components that characterize the reservoir water level from short-term fluctuations to long-term trends.

[0040] A third-order discrete wavelet decomposition is performed on the original historical water level time-series data of the target reservoir. The decomposition process is an iterative filtering and downsampling process: In the first-level decomposition, the original signal is passed through low-pass and high-pass filters to generate first-level approximation coefficients (low frequency) A1 and first-level detail coefficients (high frequency) D1, respectively. Then, the first-level approximation coefficients A1 are used as input for the second-level decomposition to obtain second-level approximation coefficients A2 and second-level detail coefficients D2. Finally, the second-level approximation coefficients A2 are used as input for the third-level decomposition to finally obtain third-level approximation coefficients A3 and third-level detail coefficients D3. Using the coefficients obtained from the above decomposition, a subsequence of the same length as the original sequence in the time domain can be generated through inverse wavelet transform. Finally, four water level component subsequences are obtained: Low-frequency approximation subsequence (A3): Reconstructed from the third-level approximation coefficients A3. This subsequence represents the slowest-changing and longest-period trend component in the original water level sequence, such as the slow changes in reservoir capacity caused by seasonal precipitation or long-term scheduling.

[0041] High-frequency detail subsequences (D1, D2, D3): These are reconstructed from the detail coefficients D1, D2, and D3 of the first, second, and third layers, respectively. These three subsequences represent the high-frequency fluctuations, details, and noise components at different time scales in the original sequence.

[0042] These four sets of four water level component subsequences are combined with the constructed independent variable coupling input matrix to form four independent model datasets. Each dataset corresponds to a set of subsequence data after the decomposition of the target reservoir water level.

[0043] In an exemplary embodiment, after coupling each of the water level subsequences with the model independent variable dataset to form multiple independent model datasets, the method further includes: The datasets of each model group are divided into training set and test set according to a preset ratio; The training and test sets are standardized using the Z-score standardization method.

[0044] For example, the four datasets are divided into training and test sets in a 7:3 ratio and then standardized using the Z-score standardization method.

[0045] In one exemplary embodiment, the method further includes: The Bayesian optimization algorithm is adopted, with a preset composite evaluation index as the optimization objective; The formula for calculating the composite evaluation index is: F = -(NSE - α × MAE - β × RMSE); Where NSE (Nash-Sutcliffe efficiency coefficient), MAE (Mean Absolute Error), RMSE (Root Mean Square Error), and α and β are preset weighting coefficients; The optimal combination of hyperparameters for the LSTM prediction model is found with the goal of maximizing the composite evaluation index.

[0046] In an exemplary embodiment, the step of constructing a corresponding LSTM prediction model for each obtained model dataset and independently performing Bayesian optimization to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence includes: Each LSTM prediction model is given an independent hyperparameter search space, wherein the hyperparameters include at least one of the following: number of neurons in the hidden layer of the network, learning rate, batch size, and number of training iterations. Based on the tree-structured Parzen estimator, a probabilistic surrogate model and an expected improved acquisition function are constructed. Iterative optimization is performed within the hyperparameter search space defined by each model to determine its independent optimal hyperparameter combination.

[0047] In this embodiment, as Figure 2 As shown, a hyperparameter optimization mechanism based on frequency division and independent calibration of water level subsequences is adopted: wavelet decomposition is performed on the target reservoir water level data to obtain four sets of reservoir water level subsequences. Each water level subsequence is coupled with the model independent variables to form multiple sets of independent model datasets. The Bayesian optimization algorithm is used to independently find the optimal hyperparameter combination for each set of water level subsequence datasets, thereby achieving refined hyperparameter optimization for different water level subsequences, rather than performing overall unified parameter tuning on the decomposed subsequences.

[0048] Specifically, when searching for the optimal hyperparameter combination, the model input and output are configured first. For example, the model output step size τ is set to 1h, and the input step size (i.e., lag time δ) is set to 24h to adapt to the scenario of real-time rolling prediction of reservoir water levels. The model input data items are feature sets combined with water system topology information, including: areal rainfall data (Rain = {t-δ, ..., t+τ}), upstream reservoir station water level data (WaterLevelH = {t-δ, ... ,t}), and target reservoir water level subsequence data after wavelet decomposition (A3 / D1 / D2 / D3 = {t-δ, ... ,t}), where the target reservoir water level subsequence data is a simulated column.

[0049] WaterLevelH = A3 + D1 + D2 + D3 Furthermore, four wavelet decomposition LSTM model frameworks were constructed. For four different water level subsequence datasets, a unified LSTM water level prediction model was built: the model contains two hidden layers and one fully connected layer (Dense), the root mean square error is selected as the loss function, and an optimizer (Adaptive Moment Estimation, Adam) is used.

[0050] In one exemplary embodiment, the LSTM prediction model is an encoder-decoder structure, comprising an input layer, an encoder LSTM layer, a repeating vector layer, a decoder LSTM layer, and a fully connected output layer connected in sequence. The input layer is used to receive the model independent variable dataset and historical water level component sequence data; The number of hidden layer units in the encoder LSTM layer is determined by the optimal hyperparameter combination, and is used to process the input sequence and output the final state vector. The repeating vector layer is used to copy the final state vector output by the encoder LSTM layer to the same number of copies as the prediction output step size in the time step dimension. The number of units in the decoder LSTM layer is determined by the optimal hyperparameter combination. It is used to process the output sequence of the repeating vector layer and output the hidden state sequence at the corresponding time step. The fully connected output layer is used to perform a linear transformation on the hidden state sequence output by the decoder LSTM layer to generate the water level fractional sequence prediction value for the corresponding time step.

[0051] Furthermore, a Bayesian optimization system is configured, and an extreme-value-sensitive composite optimization objective is designed. For example, for four sets of water level subsequence datasets, Bayesian optimization parameters are configured independently to achieve frequency-independent hyperparameter optimization. The general configuration parameter structures are shown below: 1. Number of iterations: Set the maximum number of iterations for the Bayesian optimization algorithm to 100. 2. Extreme Value Sensitive Composite Evaluation Index: The Bayesian optimization objective function is selected as a composite evaluation index dominated by the Nash efficiency coefficient (NSE). The formula is: -(NSE - α×MAE - β×RMSE) (α and β are weighting coefficients, which can be adjusted according to engineering needs). By utilizing the high sensitivity of NSE to extreme values, the model is guided to focus on optimizing the prediction bias of scenarios such as flood peaks and low water levels, which is different from the traditional single statistical index. 3. Hyperparameter optimization space: The hyperparameter optimization space is set by the number of hidden layer units (hidden_size1, hidden_size2), learning rate, number of samples per run (batch_size), and number of iterations, to adapt to the characteristic requirements of different water level subsequences; 4. Bayesian optimization core components: The TreeParzenEstimator (TPE) parameter estimation optimization algorithm based on Gaussian mixture model is selected as the probabilistic surrogate model, and the ExpectedImprovement (EI) algorithm is selected as the acquisition function.

[0052] Using the above configuration, the optimal hyperparameter combinations are found for the four sets of reservoir water level subsequence data, A3, D1, D2, and D3.

[0053] Furthermore, the frequency-division predictions and results are fused to obtain the final water level prediction data. Using the four independent optimal hyperparameter combinations, model training and prediction are performed on the model datasets corresponding to the four water level sub-sequences, yielding independent prediction results for each of the four water level sub-sequences. The prediction results of the four water level sub-sequences are then accumulated and merged to restore the predicted values ​​of the original water level sequences. Finally, the merged prediction results are de-standardized to obtain the reservoir water level characteristic prediction data for the target station.

[0054] In another alternative example, this application provides a wavelet-LSTM-based method for predicting reservoir water levels using Bayesian optimization. The following section combines... Figure 2 and Figure 3 This application describes a Bayesian optimization-based wavelet-LSTM reservoir water level prediction method provided in its embodiments. The method's process may include the following steps: Using Liuxi River Reservoir in Guangzhou as the prediction station, the simulation data period is from 2015 / 01 / 01 to 2021 / 01 / 01, with a data interval of 1 hour. Based on the water system topology information, the stations directly associated with the upstream of Liuxi River Reservoir are Tongluowan Reservoir in Conghua, Yugongdong Reservoir and Lianxi Reservoir, and an upstream water level topology correlation vector is constructed.

[0055] Step 1: Construct the input matrix of independent variables for the model by combining the topological information of the water system.

[0056] Thiessen polygons were used to divide the watershed into sub-basins, and the weight information of associated rain gauge stations in the sub-basin containing the Liuxi River Reservoir was obtained. Based on this, the areal rainfall (Rain = {t – δ,..., t + τ}) in the sub-basin containing the Liuxi River Reservoir was calculated. Simultaneously, historical water level data (WaterLevel = {ti - δ,... ,ti} i =1,2,3) of the Conghua Tongluowan Reservoir, Yugongdong Reservoir, and Lianxi Reservoir, which are directly associated with the upstream of the Liuxi River Reservoir in the sub-basin, were obtained. The areal rainfall data and the upstream water level topological association vector were coupled to construct the model's independent variable dataset.

[0057] Step 2: Decompose the reservoir water level data using wavelet decomposition to construct the model dataset.

[0058] Historical water level data of Liuxi River Reservoir (WaterLevellxh = {t – δ, ..., t}) were obtained. A third-order decomposition was performed using db5 wavelet to obtain four sets of reservoir water level subsequence data: WaterLevellxh-a3, WaterLevellxh-d1, WaterLevellxh-d2, and WaterLevellxh-d3. These four sets of water level subsequence data were then combined with the independent variables Rain and WaterLevel constructed in step 1 to construct four sets of model input datasets (as shown in Table 1). Hyperparameter optimization and calibration were then performed sequentially through steps 3 to 4 below.

[0059] Table 1. Four sets of input datasets for the model and a calibration diagram.

[0060] Step 3: Dataset partitioning and standardization.

[0061] The model dataset was divided into four sets: 2015 / 01 / 01-2018 / 11 / 10 as the training set and 2018 / 11 / 10-2021 / 01 / 01 as the test set. The z-score algorithm was used to standardize the four sets of datasets.

[0062] Step 4: Construction of LSTM reservoir water level prediction model and Bayesian hyperparameter optimization.

[0063] Configure the model input and output, setting the output step size τ to 1h and the input step size (i.e., lag time δ) to 24h. The LSTM model input and output parameter settings are shown in Table 2. Table 2 Model Input / Output Parameter Settings

[0064] Four wavelet decomposition LSTM model frameworks were constructed to build a unified LSTM model framework for four different water level subsequence datasets: it includes two hidden layers and one fully connected layer (Dense), with root mean square error as the loss function and Adam as the optimizer.

[0065] For example, the code example for the LSTM model framework is as follows: #LSTM Model Framework # Encoding; Input layer shape: Input data shape; TIME_STEPS: Time step; INPUT_DIM: Number of sequence columns. X = Input(shape=(TIME_STEPS, INPUT_DIM)) # Construct the first hidden layer of the LSTM model h_encoder = LSTM(parameterDict['hidden_size1'], return_sequences=False)(X) # Decoding: Repeated output step size (out_size): Output every step size h_repeat = RepeatVector(self.hps.out_size) h_encoder_repeat = h_repeat(h_encoder) # Construct the second hidden layer of the LSTM model hdecoder=LSTM(parameterDict['hidden_size2'],return_sequences=True)(h_encoder_repeat) # Fully Connected Layer Y = Dense(1)(hdecoder) # Set inputs and outputs, and call the Model functional model model = Model(inputs=X, outputs=Y) Furthermore, a Bayesian optimization system was configured, and an extreme-value-sensitive composite optimization objective was designed. For four datasets with different water level subsequences, the Bayesian optimization parameter ranges were configured respectively: the maximum number of iterations was set to 100, the optimization objective was -(NSE - 1×MAE - 1×RMSE), and the optimization parameters were the number of hidden layer units (hidden_size1, hidden_size2), the number of samples per run (batch_size), the number of iterations (n_iterations), and the learning rate (learning_rate). The probabilistic surrogate model was the TPE optimization algorithm based on a Gaussian mixture model, and the acquisition function was the expected improvement (EI). The specific optimization parameters and their value ranges are shown in Table 3.

[0066] Table 3 Bayesian Optimization Agent Model and Parameter Space

[0067] Step 5: Fuse the frequency-based predictions and results to obtain the final water level prediction data.

[0068] The hyperparameters of the LSTM models corresponding to the four sets of model datasets are updated. Based on the independent variable data columns (Rain, WaterLevel) from steps 1 and 2, and the target station water level sub-sequence data (WaterLevellxh-a3, WaterLevellxh-d1, WaterLevellxh-d2, and WaterLevellxh-d3) after wavelet decomposition, water level sub-sequence model predictions are performed. Finally, the four prediction results are merged and de-standardized to obtain the water level prediction data corresponding to the target station.

[0069] This embodiment utilizes the high sensitivity of the Nash efficiency coefficient to extreme values ​​to guide the model to focus on optimizing the prediction bias in key reservoir scheduling scenarios such as flood peaks and low water levels, thereby improving the accuracy of extreme value prediction and effectively enhancing the engineering practicality of the water level prediction model in extreme water conditions.

[0070] According to another aspect of the embodiments of this application, a reservoir water level prediction device is also provided for implementing the above-described wavelet-LSTM reservoir water level prediction method based on Bayesian optimization. Figure 4 This is a schematic diagram of an optional Bayesian-optimized wavelet-LSTM reservoir water level prediction device according to an embodiment of this application, as shown below. Figure 4As shown, the device may include: The acquisition unit 402 is used to acquire the areal rainfall data of the sub-basin where the target reservoir is located, and the water level data of the upstream reservoir directly associated with the target reservoir determined based on the water system topology information. The areal rainfall data and the upstream reservoir water level data are combined to construct a model independent variable dataset. Decomposition unit 404 is used to acquire historical water level data of the target reservoir, perform multi-order decomposition using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components, and couple each water level sub-sequence with the model independent variable dataset to form multiple independent model datasets. The optimization unit 406 is used to construct a corresponding LSTM prediction model for each set of model datasets obtained, and independently perform Bayesian optimization to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Using each set of model datasets and its corresponding optimal hyperparameter combination, the LSTM prediction model is trained to obtain multiple frequency division prediction sub-models. The prediction unit 408 is used to input the model independent variable data corresponding to the time period to be predicted into each frequency-division prediction sub-model to obtain the predicted value of each water level subsequence, and to superimpose the predicted values ​​of each water level subsequence to obtain the water level prediction result of the target reservoir.

[0071] It should be noted that the acquisition unit 402 in this embodiment can be used to execute the above step S102, the decomposition unit 404 in this embodiment can be used to execute the above step S104, the optimization unit 406 in this embodiment can be used to execute the above step S106, and the prediction unit 408 in this embodiment can be used to execute the above step S108.

[0072] Through the above units, areal rainfall data of the sub-basin where the target reservoir is located and water level data of upstream reservoirs directly related to the target reservoir are obtained and combined to construct a model independent variable dataset. Historical water level data of the target reservoir are obtained and decomposed into multiple water level subsequences through multi-order decomposition. Each water level subsequence is coupled with the model independent variable dataset to form multiple sets of model datasets. For each set of model datasets, a corresponding LSTM prediction model is constructed and Bayesian optimization is performed independently to obtain the optimal hyperparameter combination. Using each set of model datasets and its corresponding optimal hyperparameter combination, the LSTM prediction model is trained to obtain multiple frequency-division prediction sub-models. The model independent variable data corresponding to the time period to be predicted is input into each frequency-division prediction sub-model to obtain the predicted value of each water level subsequence. The predicted values ​​are superimposed to obtain the water level prediction result, which solves the problem of low accuracy and stability of reservoir water level prediction in existing technologies, thereby significantly reducing the prediction error under extreme water conditions while ensuring the overall forecast stability.

[0073] According to another aspect of the embodiments of this application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the Bayesian-optimized wavelet-LSTM reservoir water level prediction methods described above in the embodiments of this application.

[0074] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: S1, obtain the areal rainfall data of the sub-basin where the target reservoir is located, and the water level data of the upstream reservoir directly related to the target reservoir determined based on the water system topology information, and combine the areal rainfall data and the upstream reservoir water level data to construct the model independent variable dataset; S2, acquire the historical water level data of the target reservoir, perform multi-order decomposition using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components, and couple each water level sub-sequence with the model independent variable dataset to form multiple independent model datasets; S3. For each set of model datasets obtained, construct a corresponding LSTM prediction model and independently perform Bayesian optimization to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Using each set of model datasets and its corresponding optimal hyperparameter combination, train the LSTM prediction model to obtain multiple frequency division prediction sub-models. S4. Input the model independent variable data corresponding to the time period to be predicted into each frequency sub-model to obtain the predicted value of each water level subsequence. Then, superimpose the predicted values ​​of each water level subsequence to obtain the water level prediction result of the target reservoir.

[0075] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated in this embodiment.

[0076] The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0077] According to another aspect of the embodiments of this application, an electronic device is also provided for implementing the above-described wavelet-LSTM reservoir water level prediction method based on Bayesian optimization. The electronic device may be a server, a terminal, or a combination thereof.

[0078] Figure 5 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application, such as... Figure 5As shown, it includes a processor 502, a communication interface 504, a memory 506, and a communication bus 508. The processor 502, communication interface 504, and memory 506 communicate with each other via the communication bus 508. Memory 506 is used to store computer programs; When processor 502 executes a computer program stored in memory 506, it performs the following steps: S1, obtain the areal rainfall data of the sub-basin where the target reservoir is located, and the water level data of the upstream reservoir directly related to the target reservoir determined based on the water system topology information, and combine the areal rainfall data and the upstream reservoir water level data to construct the model independent variable dataset; S2, acquire the historical water level data of the target reservoir, perform multi-order decomposition using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components, and couple each water level sub-sequence with the model independent variable dataset to form multiple independent model datasets; S3. For each set of model datasets obtained, construct a corresponding LSTM prediction model and independently perform Bayesian optimization to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Using each set of model datasets and its corresponding optimal hyperparameter combination, train the LSTM prediction model to obtain multiple frequency division prediction sub-models. S4. Input the model independent variable data corresponding to the time period to be predicted into each frequency sub-model to obtain the predicted value of each water level subsequence. Then, superimpose the predicted values ​​of each water level subsequence to obtain the water level prediction result of the target reservoir.

[0079] Optionally, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic device and other devices.

[0080] Memory may include RAM or non-volatile memory. Volatile memory, for example, at least one disk storage device. Alternatively, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0081] As an example, the memory 506 described above may include, but is not limited to, the acquisition unit 402, decomposition unit 404, optimization unit 406, and prediction unit 408 of the Bayesian-optimized wavelet-LSTM reservoir water level prediction device. Furthermore, it may include, but is not limited to, other module units of the Bayesian-optimized wavelet-LSTM reservoir water level prediction device, which will not be elaborated upon in this example.

[0082] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0083] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0084] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0085] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0087] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0088] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0090] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0091] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

[0092] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A wavelet-LSTM-based method for predicting reservoir water levels using Bayesian optimization, characterized in that, include: Acquire areal rainfall data of the sub-basin where the target reservoir is located, and water level data of upstream reservoirs directly associated with the target reservoir based on water system topology information. Combine the areal rainfall data and the upstream reservoir water level data to construct a model independent variable dataset. Historical water level data of the target reservoir is obtained, and multi-order decomposition is performed using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components. Each water level sub-sequence is coupled with the model independent variable dataset to form multiple independent model datasets. For each set of model datasets, a corresponding LSTM prediction model is constructed, and Bayesian optimization is performed independently to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Using each set of model datasets and its corresponding optimal hyperparameter combination, the LSTM prediction model is trained to obtain multiple frequency division prediction sub-models. The independent variable data of the model corresponding to the time period to be predicted are input into each frequency-division prediction sub-model to obtain the predicted value of each water level subsequence. The predicted values ​​of each water level subsequence are superimposed to obtain the water level prediction result of the target reservoir.

2. The wavelet-LSTM reservoir water level prediction method based on Bayesian optimization as described in claim 1, characterized in that, The acquisition of areal rainfall data for the sub-basin where the target reservoir is located includes: The sub-basin is divided into multiple Thiessen polygon regions, each region corresponding to a rain gauge station; The weight of each rain gauge station is determined based on the proportion of the area of ​​each region to the total area of ​​the sub-basin. The areal rainfall data is obtained by weighting and summing the rainfall at each rain gauge station based on the weights.

3. The wavelet-LSTM reservoir water level prediction method based on Bayesian optimization as described in claim 1, characterized in that, The method of using wavelet basis functions for multi-order decomposition to obtain multiple water level sub-sequences containing different frequency components includes: The dbN series wavelet basis functions are used, where N is a positive integer greater than 1; the order of the multi-order decomposition is 3, resulting in one low-frequency approximate subsequence and three high-frequency detail subsequences.

4. The wavelet-LSTM reservoir water level prediction method based on Bayesian optimization as described in claim 1, characterized in that, The method further includes: The Bayesian optimization algorithm is adopted, with a preset composite evaluation index as the optimization objective; The formula for calculating the composite evaluation index is: F = -(NSE - α × MAE - β × RMSE); Where NSE is the Nash efficiency coefficient, MAE is the mean absolute error, RMSE is the root mean square error, and α and β are preset weighting coefficients. The optimal combination of hyperparameters for the LSTM prediction model is found with the goal of maximizing the composite evaluation index.

5. The wavelet-LSTM reservoir water level prediction method based on Bayesian optimization as described in claim 4, characterized in that, The process of constructing a corresponding LSTM prediction model for each obtained model dataset and independently performing Bayesian optimization to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence includes: Each LSTM prediction model is given an independent hyperparameter search space, wherein the hyperparameters include at least one of the following: number of neurons in the hidden layer of the network, learning rate, batch size, and number of training iterations. Based on the tree-structured Parzen estimator, a probabilistic surrogate model and an expected improved acquisition function are constructed. Iterative optimization is performed within the hyperparameter search space defined by each model to determine its independent optimal hyperparameter combination.

6. The wavelet-LSTM reservoir water level prediction method based on Bayesian optimization as described in claim 1, characterized in that, The LSTM prediction model is an encoder-decoder structure, which includes an input layer, an encoder LSTM layer, a repeating vector layer, a decoder LSTM layer, and a fully connected output layer connected in sequence. The input layer is used to receive the model independent variable dataset and historical water level component sequence data; The number of hidden layer units in the encoder LSTM layer is determined by the optimal hyperparameter combination, and is used to process the input sequence and output the final state vector. The repeating vector layer is used to copy the final state vector output by the encoder LSTM layer to the same number of copies as the prediction output step size in the time step dimension. The number of units in the decoder LSTM layer is determined by the optimal hyperparameter combination. It is used to process the output sequence of the repeating vector layer and output the hidden state sequence at the corresponding time step. The fully connected output layer is used to perform a linear transformation on the hidden state sequence output by the decoder LSTM layer to generate the water level fractional sequence prediction value for the corresponding time step.

7. The wavelet-LSTM reservoir water level prediction method based on Bayesian optimization as described in claim 1, characterized in that, After coupling each of the water level subsequences with the model independent variable dataset to form multiple independent model datasets, the method further includes: The datasets of each model group are divided into training set and test set according to a preset ratio; The training and test sets are standardized using the Z-score standardization method.

8. A wavelet-LSTM reservoir water level prediction device based on Bayesian optimization, characterized in that, include: The acquisition unit is used to acquire areal rainfall data of the sub-basin where the target reservoir is located, and water level data of upstream reservoirs directly associated with the target reservoir determined based on water system topology information. The areal rainfall data and the upstream reservoir water level data are combined to construct a model independent variable dataset. The decomposition unit is used to acquire historical water level data of the target reservoir, perform multi-order decomposition using wavelet basis functions to obtain multiple water level sub-sequences containing different frequency components, and couple each water level sub-sequence with the model independent variable dataset to form multiple independent model datasets. The optimization unit is used to construct a corresponding LSTM prediction model for each set of model datasets and independently perform Bayesian optimization to obtain the optimal hyperparameter combination that fits the frequency characteristics of the subsequence. Using each set of model datasets and its corresponding optimal hyperparameter combination, the LSTM prediction model is trained to obtain multiple frequency division prediction sub-models. The prediction unit is used to input the model independent variable data corresponding to the time period to be predicted into each frequency-division prediction sub-model to obtain the predicted value of each water level sub-sequence, and to superimpose the predicted values ​​of each water level sub-sequence to obtain the water level prediction result of the target reservoir.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 through the computer program.