Large-scale deep reservoir discharge water temperature short-term rapid prediction system and method
By building a large deep reservoir underwater discharge temperature short-term rapid prediction system with LSTM-Transformer hybrid architecture model, the problem of difficulty in achieving fast and accurate short-term forecasting of underwater discharge temperature in the existing technology is solved, and efficient and accurate water temperature prediction is achieved, supporting effective management and ecological scheduling of reservoirs.
Patent Information
- Application Number
- CN202411908372.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
AI Technical Summary
The existing large deep reservoir underwater discharge temperature prediction method is difficult to achieve fast and accurate short-term forecasting. It is affected by the uncertainty of water temperature changes, the demand for reservoir depletion and power supply, and other demands. The existing mathematical model is complex in operation, long calculation time, and cannot achieve real-time dynamic forecasting.
The LSTM-Transformer hybrid architecture model is adopted, combined with principal component analysis and Bayesian optimization methods, and a short-term rapid prediction system for drainage water temperature in large deep reservoirs is constructed. Through data acquisition, optimization and normalization processing, the system uses the timing data processing capabilities of the LSTM layer and the efficient information extraction capabilities of the Transformer layer to achieve fast prediction.
It realizes a fast and accurate short-term forecast of water discharge temperature under large deep reservoirs, reduces calculation time, improves prediction accuracy, and supports the water temperature management and ecological scheduling of the reservoir, with huge application prospects.
Smart Images

Figure CN119849681A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of water conservancy projects and relates to a system and method for quickly predicting the short-term temperature of discharged water from a large deep-water reservoir. Background Art
[0002] Water temperature is one of the important parameters of the water environment. It not only affects the physical and chemical processes of the water body, but also has an extremely important impact on the development and reproduction of aquatic organisms and river ecosystems. After the large deep reservoir is filled with water, the hydrodynamic and thermodynamic conditions of the water body are changed, which will cause the temporal and spatial changes of the water temperature in the reservoir area and the downstream river section. Among them, the outflow water temperature of the reservoir has changed greatly compared with that before the reservoir was built, and there is often a delay in the change cycle and the phenomenon of water temperature homogenization. Among them, the cold water released by the dam in summer will also disrupt the development and reproduction of downstream aquatic organisms and the normal production of agricultural crops.
[0003] In recent years, in order to mitigate the adverse effects of reservoir construction and operation on the water environment of the basin, water temperature and hydrological ecological regulation are often carried out for regulation; water temperature ecological regulation increases the water intake elevation to encourage the reservoir to take in warm water from the upper and middle layers, so as to mitigate the adverse effects of low-temperature water discharge on fish spawning and reproduction. Hydrological ecological regulation is to artificially create a certain rise and fall process after the water temperature meets the fish spawning threshold, control the water flow rate, and stimulate the spawning and reproduction of fish that lay drifting eggs.
[0004] However, in the actual scheduling process, due to the uncertainty of water temperature changes, reservoir drawdown requirements, power supply and other multiple demands, it is impossible to accurately formulate a short-term ecological scheduling plan. In addition, the existing mathematical model operation process is complex, the calculation takes a long time, and it is impossible to achieve real-time dynamic forecasting. The relevant data-driven model mainly predicts the downstream water temperature based on relevant input factors, and has not yet achieved the function of rapid short-term forecasting. Summary of the invention
[0005] The purpose of the present invention is to provide a short-term rapid prediction system for the discharge water temperature of a large deep water reservoir in order to solve the technical problem that the existing large deep water reservoir discharge water temperature prediction method is difficult to achieve rapid and accurate short-term forecasting.
[0006] Another object of the present invention is to provide a method for quickly predicting the temperature of discharged water from a large deep-water reservoir in the short term.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions to achieve it.
[0008] The present invention provides a short-term rapid prediction system for the discharge water temperature of a large deep-water reservoir, which comprises:
[0009] A data acquisition module is used to acquire an input data set; wherein the input data set includes the inlet water temperature of the reservoir, meteorological conditions and reservoir dispatch monitoring data of the reservoir discharge water temperature;
[0010] The data set optimization module is used to screen and reconstruct the input data set according to the screening factors determined by the principal component analysis method to obtain an optimized input data set;
[0011] A data normalization processing module is used to normalize the optimized input data set;
[0012] The water temperature short-term rapid prediction model is used to obtain the water temperature prediction result based on the normalized input data set; the water temperature short-term rapid prediction model uses the LSTM-Transformer network model.
[0013] In a feasible implementation manner, the meteorological conditions include air temperature, relative humidity, dew point, wind speed, wind direction, solar radiation, etc.; the monitoring data include reservoir water level, inflow and outflow, etc.
[0014] In a feasible implementation manner, the data set optimization module divides the screened input data according to a given time window to obtain a plurality of input sequences, and the plurality of input sequences constitute an optimized input data set.
[0015] In a feasible implementation, the LSTM-Transformer model includes an LSTM layer and a Transformer layer.
[0016] Among them, the LSTM layer includes a forget gate, an input gate, an output gate and a cell state; the LSTM layer has forward and backward bidirectional outputs.
[0017] Specifically, the forget gate f t , input gate i t , output gate o t and cell state C t The expression is as follows:
[0018] f t =σ(W f ×[h t-1 ,x t ]+b f )
[0019] i t =σ(W i ×[h t-1 ,x t ]+b i )
[0020]
[0021] o t =σ(W o ×[h t-1,x t ]+b o )
[0022] h t =o t *tanh(C t )
[0023] In the formula, σ represents the sigmoid activation function, tanh represents the hyperbolic tangent function, W represents the weight matrix of each gate, b represents the bias vector, and h t-1 represents the previous hidden state, x t Indicates the current input.
[0024] Based on the above gates, the output mode is further adjusted to bidirectional LSTM output to enhance the feature extraction capability and improve the accuracy of sequence prediction. The expression is as follows:
[0025]
[0026] In the formula, H is the forward LSTM output, backward LSTM output and the final output of the bidirectional LSTM; W, U, and b are the weights and biases of each layer respectively.
[0027] To further process the output of the LSTM layer and strengthen the understanding of the global dependency of the sequence, a Transformer layer is added on the basis of the LSRM layer. Its expression is as follows:
[0028] Z=MultiHeadAttention(H,H,H;W Q ,W K ,W V )
[0029] Z=Concat(head 1 ,head 2 ,…,head m ,…head M )W o
[0030] head m =Attention(Q m ,K m ,V m )
[0031]
[0032] Z′=LayerNormalization(Z)
[0033] Where Z is the final output value of the multi-head attention mechanism and calculation; Z′ is the result of the attention output after layer normalization; H is the hidden state or embedding vector input to the multi-head attention mechanism; W Q , W K , W V are weight matrices that convert input H into query, key, and value respectively; W o is the output weight matrix, which is used to integrate the features extracted by different heads; head m To perform the attention mechanism on each head to generate output; Q m , K m 、V m They are the calculation process of converting the input H into query vector, key vector and value vector respectively.
[0034] The present invention also provides a training method for the above-mentioned large-scale deep-water reservoir discharge water temperature short-term rapid prediction system, which comprises the following steps:
[0035] S1 obtains the input data set and the downstream water temperature data set;
[0036] S2 analyzes the input data set using a principal component analysis method based on the input data set to determine a screening factor;
[0037] S3 screens the input data set according to the screening factors determined by the principal component analysis method, and reconstructs the screened input data set and the downstream water temperature data set to obtain the input sequence data set and the downstream water temperature target data set;
[0038] S4 normalizes the optimized input sequence data set and the downstream water temperature target data set respectively, and combines them to obtain the input-output data set;
[0039] S5 trains a water temperature short-term rapid prediction model using the second input sequence data set and the second downstream water temperature target data set;
[0040] S6 uses the Bayesian optimization method to optimize the hyperparameters of the trained short-term rapid water temperature prediction model to obtain the final short-term rapid water temperature prediction model.
[0041] In a feasible implementation, in step S1, based on the historical data of reservoir monitoring, an input data set {x i} and the downstream water temperature dataset {y i}. The input dataset is the same as explained previously.
[0042] In a feasible implementation, in step S2, based on the input data set, a principal component analysis method is used to obtain a first principal component, and the monitoring data is screened according to the load value on the first principal component to determine a screening factor. In the present invention, the determined screening factors include inlet water temperature, air temperature, dew point, inlet flow, and outlet flow.
[0043] In a feasible implementation manner, in step S3, the specific implementation manner of reconstructing the filtered input data set and the downstream water temperature data set is:
[0044] According to the given time window, the input data in the input data set is divided to obtain several input sequences, which constitute the optimized input sequence data set; it is expressed as follows:
[0045] X i =[x i ,x i+1 ,…,x i+window-1 ];
[0046] In the formula, window represents the time window size;
[0047] According to the given time window and prediction interval, the downstream water temperature target sequence corresponding to the input sequence is obtained to form the downstream water temperature target data set; it is expressed as follows:
[0048] Y i =y i+window+prediction_gap-1 .
[0049] In a feasible implementation, in step S4, the input sequence data set and the downstream water temperature target data set are normalized in the following manner:
[0050]
[0051] Where, X ij , X ij ′ represents the jth feature variable value of the i-th sample of the input sequence data set before and after normalization, Y i , Y i ′ represents the i-th downstream water temperature of the first downstream water temperature data set before and after normalization; X j,min , X j,max They represent the minimum and maximum values of the jth feature variable in the normalized input sequence data set; Y min , Y max They respectively represent the minimum and maximum values of the downstream water temperature in the data set before normalization.
[0052] The normalized data are combined to obtain the input-output data set, which is expressed as follows:
[0053] D′=concatenate(X′,Y′).
[0054] According to the normalized input-output data set D′, the time series is set as:
[0055] sequence_length=window+prediction_gap;
[0056] Among them, window represents the time window size, and prediction_gap represents the prediction interval;
[0057] Then, according to the time series, the data sequence dataset is constructed based on the input-output dataset:
[0058] R=[D'[i:i+sequence_length]foriinrange(len(D')];
[0059] Where len(D') represents the total number of samples used to construct the dataset.
[0060] In a feasible implementation, in step S6, the Optuna optimization algorithm based on the Bayesian optimization method is used to perform hyperparameter optimization on the number of LSTM layers in the short-term rapid prediction model, the number of heads in the Transformer layer, the key dimension of the attention mechanism, and the discarding rate of the Dropout layer to obtain an optimized water temperature short-term rapid prediction model.
[0061] The present invention also provides a method for short-term rapid prediction of the discharge water temperature of a large deep-water reservoir, using the above-mentioned prediction system, and following the steps below:
[0062] Obtain input data set through data acquisition module;
[0063] The input data set is screened and reconstructed by the data set optimization module according to the screening factors determined by the principal component analysis method to obtain an optimized input data set;
[0064] The optimized input data set is normalized through the data normalization processing module;
[0065] The normalized input data set is input into the water temperature short-term rapid prediction model to obtain the water temperature prediction results.
[0066] Compared with the prior art, the system and method for short-term rapid prediction of discharge water temperature of a large deep-water reservoir provided by the present invention has the following beneficial effects:
[0067] (1) Based on the deep learning algorithm, the present invention constructs a hybrid architecture model integrating LSTM-Transformer, which utilizes the time series data processing capability of LSTM and the efficient information extraction capability of Transformer, enhances the model's ability to capture the time dependency in data and improves the model's parallel processing capability. It not only has short calculation time and high prediction accuracy, but also can grasp the downstream water temperature of the reservoir in advance, providing technical support for water temperature management and reservoir ecological scheduling of the reservoir, and has great application prospects.
[0068] (2) The present invention first constructs an input data set based on the main influencing factors of the reservoir discharge water temperature, and eliminates redundant factors by means of correlation analysis and principal component analysis, simplifies the data set and optimizes the input data set;
[0069] (3) The present invention adopts hyperparameter optimization technology to systematically explore the optimal combination of key influencing parameters in the downstream water temperature forecast model structure, further promoting the optimization of model performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0071] Figure 1 A flow chart of a training method for a short-term rapid prediction system for downstream water temperature of a large deep-water reservoir provided by an embodiment of the present invention;
[0072] Figure 2 A graph of the loss function of the training process provided by an embodiment of the present invention;
[0073] Figure 3 A training set result diagram provided by an embodiment of the present invention;
[0074] Figure 4 A test set result diagram provided for an embodiment of the present invention.
[0075] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0076] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0077] Example 1
[0078] This embodiment provides a short-term rapid prediction system for the downstream water temperature of a large deep-water reservoir, which includes: a data acquisition module, a data set optimization module, a data normalization processing module and a water temperature short-term rapid prediction model. The input sequence is obtained through the data acquisition module, the data set optimization module and the data normalization processing module, and the input sequence is input into the water temperature short-term rapid prediction model to obtain the downstream water temperature T w Therefore, the water temperature short-term rapid prediction model is used to predict the discharge water temperature T w As the output variable Y.
[0079] (1) Data acquisition module
[0080] The data acquisition module is used to obtain input data sets.
[0081] The factors affecting the discharge water temperature of the reservoir are mainly considered from the perspective of the inlet water temperature, meteorological conditions and reservoir operation. Therefore, the input data set X includes the inlet water temperature T of the reservoir discharge water temperature. in , meteorological conditions and reservoir dispatch monitoring data.
[0082] Meteorological conditions include temperature T a , relative humidity R h , dew point T d , wind speed W s 、Wind direction W d , solar radiation S r ; Reservoir operation monitoring data includes reservoir water level W l , Inbound flow Q in , outbound flow Q o .
[0083] (2) Dataset Optimization Module
[0084] The data set optimization module is used to screen and reconstruct the input data set according to the screening factors determined by the principal component analysis method to obtain the optimized input data set.
[0085] The specific implementation method of determining the screening factors according to the principal component analysis method is shown in the training process of the prediction system. The screening factors determined in this embodiment include inlet water temperature, air temperature, dew point, inlet flow, and outlet flow.
[0086] Based on the input data selected by the screening factors, the data set optimization module divides the data according to a given time window (15 days in this embodiment) to obtain a number of input sequences, and the number of input sequences constitutes the optimized input data set.
[0087] (3) Data normalization processing module
[0088] The data normalization processing module is used to normalize the optimized input data set.
[0089] (4) Water temperature short-term rapid prediction model
[0090] The water temperature short-term rapid prediction model is used to obtain water temperature prediction results based on the normalized input data set.
[0091] In this embodiment, the water temperature short-term rapid prediction model uses an LSTM-Transformer network model. The LSTM-Transformer model includes an LSTM layer and a Transformer layer.
[0092] Among them, the LSTM layer includes a forget gate, an input gate, an output gate and a cell state; the LSTM layer has forward and backward bidirectional outputs.
[0093] Specifically, the forget gate f t , input gate i t , output gate o t and cell state C t The expression is as follows:
[0094] f t =σ(W f ×[h t-1 ,x t ]+b f )
[0095] i t =σ(W i ×[h t-1 ,x t ]+b i )
[0096]
[0097] o t =σ(W o ×[h t-1 ,x t ]+b o )
[0098] h t =o t *tanh(C t )
[0099] In the formula, σ represents the sigmoid activation function, tanh represents the hyperbolic tangent function, W represents the weight matrix of each gate, b represents the bias vector, and h t-1 is the previous hidden state, x t is the current input.
[0100] Based on the above gates, the output mode is further adjusted to bidirectional LSTM output to enhance the feature extraction capability and improve the accuracy of sequence prediction. The expression is as follows:
[0101]
[0102] In the formula, H is the forward LSTM output, backward LSTM output and the final output of the bidirectional LSTM; W, U, and b are the weights and biases of each layer respectively.
[0103] To further process the output of the LSTM layer and strengthen the understanding of the global dependency of the sequence, a Transformer layer is added on the basis of the LSRM layer. Its expression is as follows:
[0104] Z=MultiHeadAttention(H,H,H;W Q ,W K ,W V )
[0105] Z=Concat(head 1 ,head 2 ,…,head m ,…head M )W o
[0106] head m =Attention(Q m ,K m ,V m )
[0107]
[0108] Z′=LayerNormalization(Z)
[0109] Where Z is the final output value of the multi-head attention mechanism and calculation; Z′ is the result of the attention output after layer normalization; H is the hidden state or embedding vector input to the multi-head attention mechanism; W Q , W K , W V are weight matrices that convert the input H into query, key, and value respectively; W ois the output weight matrix, which is used to integrate the features extracted by different heads; head m To perform the attention mechanism on each head to generate output; Q m , K m 、V m They are the calculation process of converting the input H into query vector, key vector and value vector respectively.
[0110] The above-mentioned large deep-water reservoir discharge water temperature short-term rapid prediction system is operated according to the following steps to obtain the discharge water temperature prediction result:
[0111] Obtain input data set through data acquisition module;
[0112] The input data set is screened and reconstructed by the data set optimization module according to the screening factors determined by the principal component analysis method to obtain an optimized input data set;
[0113] The optimized input data set is normalized through the data normalization processing module;
[0114] The normalized input data set is input into the water temperature short-term rapid prediction model to obtain the water temperature prediction results.
[0115] This embodiment also provides a training method for the above-mentioned large deep-water reservoir discharge water temperature short-term rapid prediction system, such as Figure 1 As shown, it includes the following steps:
[0116] S1 obtains the input data set and the downstream water temperature data set.
[0117] Based on the main influencing factors of the reservoir discharge water temperature, the input data set x is constructed. w Output variable y for the model. Input data set X 1 Including inflow water temperature T in , Temperature T a , relative humidity R h , dew point T d , wind speed W s 、Wind direction W d , solar radiation S r , reservoir water level W l , Inbound flow Q in And outbound flow Q o .
[0118] The input data set used in this embodiment is a daily data set containing various elements from January 1, 2015 to December 31, 2019, a total of 1826 days.
[0119] S2 uses principal component analysis method to analyze the input data set based on the input data set and determine the screening factors.
[0120] The principal component analysis method is used to analyze the input data set according to the following steps to determine the screening factors:
[0121] (1) Standardize the input data X to obtain the input data set The normalization formula is:
[0122]
[0123] In the formula, represents the mean of the original data, σ x Represents the standard deviation of the original data.
[0124] (2) Obtain the covariance matrix ∑ of the input data set,
[0125] Represents a standardized data matrix with a dimension of n×p, where n represents the number of samples and p represents the number of feature variables. express , ∑ represents the covariance matrix, and its dimension is p×p.
[0126] (3) Perform eigenvalue decomposition on the covariance matrix ∑ to obtain eigenvalues and eigenvectors, which are expressed as:
[0127] ∑ν l =λ l ν l ;
[0128] In the formula, λ l represents the eigenvalue of the lth principal component; ν l Represents the eigenvector of the lth principal component.
[0129] (4) Obtain the first three principal components in descending order of eigenvalues, and calculate the loading value of each input factor according to the following formula:
[0130]
[0131] In the formula, A l It represents the factor loading value corresponding to the lth principal component, reflecting the weight of each original variable in the corresponding principal component.
[0132] Screening is performed based on the load value of the input factor on the first principal component. The input factors with higher load values have a strong correlation with the target factor and are the key variables affecting the target factor. The screening results are shown in Table 1.
[0133] The final screening factors include inlet water temperature, air temperature, dew point, inlet flow, and outlet flow.
[0134] Table 1 Factor screening component matrix
[0135]
[0136] S3 screens the input data set according to the screening factors determined by the principal component analysis method, and reconstructs the screened input data set and the downstream water temperature data set to obtain the optimized input sequence data set and the downstream water temperature target data set.
[0137] According to the determined screening factors, the final data set S = {x, y} = {Day, T in , T a , T d , Q in , Q o , T w}, where Day is the current date.
[0138] In this embodiment, the given time window size window is 15 days, and the prediction interval prediction_gap is 7 days, that is, the input data of the previous 15 days are used to predict the downstream water temperature on the 22nd day.
[0139] According to the given time window, the input data in the input data set is divided to obtain several input sequences, which constitute the optimized input sequence data set X; it is expressed as follows:
[0140] X i =[x i ,x i+1 ,…,x i+window-1 ];
[0141] In the formula, window represents the time window size;
[0142] According to the given time window and prediction interval, the downstream water temperature target sequence corresponding to the input sequence is obtained to form the downstream water temperature target data set Y; it is expressed as follows:
[0143] Y i =y i+window+prediction_gap-1 .
[0144] S4 normalizes the optimized input sequence data set and the downstream water temperature target data set respectively, and combines them to obtain the input-output data set.
[0145] In this step, the input sequence dataset and the downstream water temperature target dataset are normalized in the following way:
[0146]
[0147] Where, X ij , X′ ijRespectively represent the j-th feature variable value of the i-th sample of the input sequence data set before and after normalization, Y i , Y i ′ represents the i-th downstream water temperature of the first downstream water temperature data set before and after normalization; X j,min , X j,max They represent the minimum and maximum values of the jth feature variable in the normalized input sequence data set; Y min , Y max They respectively represent the minimum and maximum values of the downstream water temperature in the data set before normalization.
[0148] The normalized data are combined to obtain the input-output data set, which is expressed as follows:
[0149] D′=concatenate(X′,Y′).
[0150] According to the normalized input-output data set D′, the time series is set as:
[0151] sequence_length=window+prediction_gap;
[0152] Among them, window represents the time window size, and prediction_gap represents the prediction interval;
[0153] Then, according to the time series, the data sequence dataset is constructed based on the input-output dataset:
[0154] R=[D'[i:i+sequence_length]foriin range(len(D')];
[0155] Where len(D') represents the total number of samples used to construct the dataset.
[0156] In this embodiment, the data sequence data set is divided into a training set and a test set, the training set data accounts for 80% of the data sequence data set, and the test set data accounts for 20% of the data sequence data set.
[0157] The training set and test set are represented as:
[0158] train_size=round(0.8×len(D′))
[0159]
[0160] Among them, train_size indicates the determination of the training set size; D train represents the training set; Represents the input data of the i-th training sample; represents the target output of the i-th training sample; D test represents the test set; Represents the input data of the i-th test sample; represents the target output of the i-th test sample.
[0161] S5 uses the input-output dataset to train the water temperature short-term rapid prediction model.
[0162] S6 uses the Bayesian optimization method to optimize the hyperparameters of the trained short-term rapid water temperature prediction model to obtain the final short-term rapid water temperature prediction model.
[0163] In this embodiment, the constructed training set is used to train the water temperature short-term rapid prediction model. Since the downstream water temperature is normalized during the training process, the prediction result of the water temperature short-term rapid prediction model needs to be inversely normalized to obtain the final downstream water temperature prediction result.
[0164] The model explicitly sets the random seed and TensorFlow thread behavior in the code to ensure the reproducibility of predictions. By limiting TensorFlow to use CPU and single-threaded operations, you can better control the model training and debugging process and avoid the uncertainty brought by multi-threading and GPU.
[0165] During the training process, the weighted mean square error is used as the loss function, and the model parameters are optimized by the gradient descent algorithm. This embodiment also uses the Optuna optimization algorithm based on the Bayesian optimization method (see Optuna: A Next-generation Hyperparameter Optimization Framework (Akiba et al., 2019)) to optimize the number of LSTM layers, the number of heads in the Transformer layer, the key dimension of the attention mechanism, and the dropout layer in the short-term fast prediction model after each training. The dropout rate is optimized.
[0166] Early stopping is also implemented to prevent overfitting and optimize training time. The early stopping method monitors the loss of the test set and stops training if there is no improvement for several consecutive cycles. The upper limit of training iterations is set to 300.
[0167] In this embodiment, the loss function curve during the model training process is as follows: Figure 2 As shown in the figure, with the increase of the number of iterations, the loss value of the model gradually shows a downward trend. When the number of iterations reaches 202, the training is stopped because the model has not improved in ten consecutive 10-iteration cycles. The training is stopped in advance to save resources and prevent overfitting.
[0168] After using Optuna for hyperparameter optimization, the optimal values of the number of LSTM units, the number of heads of the multi-head attention mechanism, the key dimension of the attention mechanism, and the dropout rate of the Dropout layer are 16, 8, 128, and 0.027, respectively.
[0169] The trained water temperature short-term rapid prediction model is tested and evaluated by the test set. The evaluation indicators used in this embodiment include mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and determination coefficient (R2), and their calculation formulas are:
[0170]
[0171] In the formula, y i Indicates the measured value, represents the predicted value, represents the average of the measured values, and n represents the number of samples.
[0172] Table 2 Error statistics of training set and test set (℃)
[0173]
[0174] The model training results are as follows Figure 3 The prediction errors are shown in Table 2, including the mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and determination coefficient (R 2 ) are 0.245℃, 0.098℃, 0.313℃, and 0.990 respectively. The model test results are as follows Figure 4 The prediction errors are shown in Table 2, including the mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and determination coefficient (R 2 ) are 0.318℃, 0.164℃, 0.405℃, and 0.987 respectively. It can be seen that the large deep reservoir discharge water temperature short-term rapid prediction system provided by the present invention can achieve effective prediction of the discharge water temperature of large reservoirs.
[0175] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0176] The algorithm and reality provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0177] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A short-term rapid prediction system for the discharge water temperature of a large deep reservoir, characterized in that: include: A data acquisition module is used to acquire an input data set; wherein the input data set includes the inlet water temperature of the reservoir, meteorological conditions and reservoir dispatch monitoring data of the reservoir discharge water temperature; The data set optimization module is used to screen and reconstruct the input data set according to the screening factors determined by the principal component analysis method to obtain an optimized input data set; A data normalization processing module is used to normalize the optimized input data set; The water temperature short-term rapid prediction model is used to obtain the water temperature prediction result based on the normalized input data set; the water temperature short-term rapid prediction model uses the LSTM-Transformer network model.
2. According to claim 1, the short-term rapid prediction system for the downstream water temperature of a large deep-water reservoir is characterized in that: The meteorological conditions include temperature, relative humidity, dew point, wind speed, wind direction, and solar radiation; the monitoring data include reservoir water level, inflow and outflow.
3. According to claim 1, the short-term rapid prediction system for the discharge water temperature of a large deep-water reservoir is characterized in that: The data set optimization module divides the screened input data according to a given time window to obtain a number of input sequences, and the number of input sequences constitutes an optimized input data set.
4. According to claim 1, the short-term rapid prediction system for the downstream water temperature of a large deep-water reservoir is characterized in that: The LSTM-Transformer model includes an LSTM layer and a Transformer layer; the output mode of the LSTM layer is a bidirectional LSTM output.
5. The training method of the short-term rapid prediction system of the discharged water temperature of a large deep-water reservoir according to any one of claims 1 to 4 is characterized in that: The following steps are involved: S1 obtains the input data set and the downstream water temperature data set; S2 analyzes the input data set using a principal component analysis method based on the input data set to determine a screening factor; S3 screens the input data set according to the screening factors determined by the principal component analysis method, and reconstructs the screened input data set and the downstream water temperature data set to obtain an optimized input sequence data set and a downstream water temperature target data set; S4 normalizes the optimized input sequence data set and the downstream water temperature target data set respectively, and combines them to obtain the input-output data set; S5 uses the input-output dataset to train the water temperature short-term rapid prediction model; S6 uses the Bayesian optimization method to optimize the hyperparameters of the trained short-term rapid water temperature prediction model to obtain the final short-term rapid water temperature prediction model.
6. The training method according to claim 5, characterized in that: In step S2, based on the input data set, a principal component analysis method is used to obtain a first principal component, and the monitoring data is screened according to the load value on the first principal component to determine a screening factor.
7. The training method according to claim 5, characterized in that: In step S3, the input data in the input data set is divided according to the given time window to obtain a number of input sequences, which constitute an optimized input sequence data set; According to the given time window and prediction interval, the downstream water temperature target sequence corresponding to the input sequence is obtained to form the downstream water temperature target data set.
8. The training method according to claim 5, characterized in that: In step S4, the time series is set as: sequence_length=window+prediction_gap; Among them, window represents the time window size, and prediction_gap represents the prediction interval; Then, according to the time series, the data sequence dataset is constructed based on the input-output dataset: R=[D'[i:i+sequence_length]foriinrange(len(D')]; Where len(D') represents the total number of samples used to construct the dataset.
9. The training method according to claim 5, characterized in that: In step S6, the Optuna optimization algorithm based on the Bayesian optimization method is used to perform hyperparameter optimization on the number of LSTM layers, the number of heads in the Transformer layer, the key dimension of the attention mechanism, and the discarding rate of the Dropout layer in the short-term rapid prediction model to obtain an optimized water temperature short-term rapid prediction model.
10. A method for rapid short-term prediction of discharge water temperature from a large deep reservoir, characterized in that: Using the system according to any one of claims 1 to 4, proceed according to the following steps: Obtain input data set through data acquisition module; The data set optimization module uses the screening factors determined by the principal component analysis method to screen and reconstruct the input data set to obtain an optimized input data set; The optimized input data set is normalized through the data normalization processing module; The normalized input data set is input into the water temperature short-term rapid prediction model to obtain the water temperature prediction results.
Citation Information
Patent Citations
Method for quickly predicting discharge water temperature of large reservoir stoplog gate layered water intake facility
CN112182709A
Support vector regression-based stratified reservoir water intake discharged water temperature prediction model and prediction method
CN113033618A
Water quality prediction method of deep learning model based on physical law and process driving
CN113379029A
Intelligent wind power prediction method based on Transform and LSTM hybrid model
CN114841419A
Electric power data flow prediction method and device based on neural network, equipment and medium
CN116011651A
Cited By
Deep and large reservoir ecological scheduling method, system and equipment of data-driven model based on coupling physical mechanism
CN120850697A
A deep reservoir ecological regulation method, system and device based on a data-driven model of a coupled physical mechanism
CN120850697B