Reservoir group river reach water temperature prediction method based on neural network
By screening meteorological data features and Fourier transform decomposition using the mutual information method, and combining TFT and MLP neural networks to process the stationary and non-stationary components of water temperature series, the problem of insufficient accuracy in water temperature prediction in river sections of cascade reservoirs was solved, and high-precision prediction was achieved in complex environments.
Patent Information
- Application Number
- CN202510604040.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-09-26
AI Technical Summary
Existing technologies make it difficult to accurately predict water temperature changes in river sections of cascade reservoirs under complex environmental conditions. In particular, existing neural network models lack prediction accuracy when dealing with nonlinear relationships between high-dimensional variables.
The mutual information method is used to screen the statistical characteristics of meteorological data as exogenous variables, and the discrete Fourier transform is used to separate the stationary and non-stationary components. The TFT neural network and MLP neural network are used to process the stationary and non-stationary components respectively. The TPE algorithm is combined to optimize the hyperparameters and improve the prediction accuracy of the model.
It significantly improved the accuracy and generalization performance of water temperature prediction in river sections of reservoir groups, was able to accurately identify non-stationary features in meteorological variables and water temperature sequences, and constructed a natural process prediction model for river water temperature during the period when cascade reservoirs were put into operation for power generation.
Smart Images

Figure CN120705536A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for predicting river water temperature, and in particular to a method for predicting water temperature of a river section of a reservoir group based on a neural network. Background Art
[0002] The development of cascade reservoirs inevitably alters the natural environment of rivers, leading to a loss of longitudinal connectivity and changes in water temperature processes. This, in turn, has profound impacts on water quality, the growth rate and distribution of aquatic organisms, and human water use. Therefore, understanding river water temperature processes and the factors driving them under the construction of cascade reservoirs is crucial.
[0003] Existing methods for modeling river water temperature fall into three main categories: 1. Process-based physical models (deterministic models); 2. Statistical models; and 3. Machine learning. The thermodynamic processes of natural rivers are influenced by numerous factors, including meteorology, topography, riverbed conditions, and tributaries. Therefore, physics-based models are often complex and require a large amount of data to drive them (such as water depth, outflow, inflow, basin characteristics, meteorological variables, and river hydraulic characteristics), which are often difficult to obtain. Statistical models use various regression methods to predict water temperature, but they struggle to handle nonlinear relationships between high-dimensional variables. While existing neural network models have addressed these issues to a certain extent, they are insufficient for handling complex environmental conditions, such as water temperature in river sections near reservoirs, and their prediction accuracy is limited. Summary of the Invention
[0004] Purpose of the invention: In response to the above problems, the present invention proposes a water temperature prediction method for river sections in a reservoir group based on a neural network, which can solve the problem of accurately predicting river water temperature changes after the construction of cascade reservoirs.
[0005] Technical solution: The technical solution adopted by the present invention is a method for predicting water temperature in a river section of a reservoir group based on a neural network, comprising:
[0006] Obtain meteorological data after the reservoir construction, and select the statistical features with the strongest correlation with water temperature from the statistical features of each type of meteorological data as exogenous variables;
[0007] For all exogenous variables, the stationary and non-stationary components of each exogenous variable are separated based on discrete Fourier transform;
[0008] The stationary components of each exogenous variable constitute the input of the TFT neural network, and the TFT neural network is used to predict the stationary components of the water temperature series; the non-stationary components of each exogenous variable constitute the input of the MLP neural network, and the MLP neural network is used to predict the non-stationary components of the water temperature series. The predicted stationary components and non-stationary components are added together to obtain the water temperature prediction result.
[0009] The meteorological data includes hourly data of air temperature, solar radiation and evaporation, and the statistical characteristics of the meteorological data include daily maximum value, minimum value, mean value and median value of the meteorological data; the water temperature data uses daily water temperature data.
[0010] The mutual information method is used to select the statistical features with the strongest correlation with water temperature as exogenous variables. The mutual information method includes: calculating the statistical features of historical meteorological data Mutual information with the historical water temperature series Y The statistical feature with the highest mutual information value is taken as the statistical feature with the strongest correlation with water temperature.
[0011] The statistical characteristics of the calculated historical meteorological data Mutual information with the historical water temperature series Y The calculation formula is:
[0012]
[0013] in, represents the mutual information between the statistical characteristics of historical meteorological data and the historical water temperature sequence, Y is the historical water temperature sequence, Represents the statistical characteristics of historical meteorological data; x and y are random variables The value of Y, and is the range of values of the random variable; Statistical characteristics of historical meteorological data and the joint probability distribution of the historical water temperature series Y; and P Y (y) are the statistical characteristics of historical meteorological data and the marginal probability distribution of the historical water temperature series Y.
[0014] The method of separating the stationary and non-stationary components of all exogenous variables based on discrete Fourier transform includes the following steps:
[0015] (1) Perform discrete Fourier transform on all exogenous variables;
[0016] (2) Sort the amplitudes of the discrete Fourier transform results of each exogenous variable, and extract the first N main frequency components of the discrete Fourier transform of each exogenous variable;
[0017] (3) Based on the main frequency components of each exogenous variable obtained in step (2), the frequency domain results of the non-stationary components of each exogenous variable are obtained using the frequency component filtering method;
[0018] (4) The frequency domain results of the non-stationary components of each exogenous variable are restored to the time domain through inverse Fourier transform (IDFT) to obtain the non-stationary components of each exogenous variable;
[0019] (5) Deduct the corresponding non-stationary components from the original signals of each exogenous variable to obtain the stationary components of each exogenous variable.
[0020] Training of TFT neural network and MLP neural network, including:
[0021] Obtain meteorological data and river water temperature data before reservoir construction. From the statistical features of each type of meteorological data, use the mutual information method to select the statistical features with the strongest correlation with water temperature as exogenous variables.
[0022] For all exogenous variables and river water temperature series, the stationary and non-stationary components of each exogenous variable and river water temperature series are separated based on discrete Fourier transform;
[0023] The non-stationary and stationary series data of each exogenous variable and river water temperature series were normalized respectively, and divided into training set, validation set and test set for model training;
[0024] Within the training set, the stationary components of the river water temperature series and the stationary components of each exogenous variable are input into the TFT neural network for training, and the non-stationary components of the river water temperature series and the non-stationary components of each exogenous variable are input into the MLP neural network for training. The loss function calculation formula of the TFT neural network and the MLP neural network is:
[0025]
[0026] Among them, RMSE represents the loss function, y i is the true value of river water temperature, is the predicted value of river water temperature, and n is the total number of samples.
[0027] The TPE algorithm is used to optimize the hyperparameters of the TFT neural network and the MLP neural network based on the validation set.
[0028] The performance of the trained model is evaluated using RMSE, MAE, NSE, and KGE indicators.
[0029] The present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned neural network-based method for predicting water temperature in a river section of a reservoir group is implemented.
[0030] The present invention provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the neural network-based method for predicting water temperature in a reservoir group and a river section.
[0031] Beneficial effects: Compared with the existing technology, the present invention has the following advantages: the present invention optimizes the selection of exogenous variables through the mutual information method, thereby improving the quality of model training data; uses the Fourier transform-based stationary and non-stationary feature decomposition method to improve the model's ability to identify, train, and predict non-stationary features; uses the TFT (Temporal Fusion Transformer) neural network and the multi-layer perceptron MLP neural network to train and predict stationary sequences and non-stationary sequences, respectively, giving full play to the advantages of different neural networks and significantly improving the prediction accuracy and generalization performance; uses the TPE (Tree-structured Parzen Estimator) sampler to optimize multiple hyperparameters, reducing the model optimization cost and improving the model efficiency. This method can accurately identify the non-stationary features in meteorological variables and water temperature sequences, accurately predict the river water temperature process, and then construct the natural process of river water temperature during the commissioning and power generation period of cascade reservoirs. The present invention innovatively predicts river water temperature based on stationary and non-stationary feature decomposition, effectively improving the prediction accuracy of water temperature in complex environmental conditions such as river sections of reservoir groups. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flow chart of the neural network-based method for predicting water temperature in a reservoir group river section according to the present invention;
[0033] Figure 2 is the mutual information between the meteorological data and the water temperature series described in the present invention;
[0034] Figure 3 It is the comparison curve between the predicted results and the observed results of the test set. DETAILED DESCRIPTION
[0035] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0036] The neural network-based method for predicting water temperature in a river section of a reservoir group according to the present invention comprises:
[0037] Obtain meteorological data after the reservoir construction, and select the statistical features with the strongest correlation with water temperature from the statistical features of each type of meteorological data as exogenous variables;
[0038] For all exogenous variables, the stationary and non-stationary components of each exogenous variable are separated based on discrete Fourier transform;
[0039] The stationary components of each exogenous variable constitute the input of the TFT neural network, and the TFT neural network is used to predict the stationary components of the water temperature series; the non-stationary components of each exogenous variable constitute the input of the MLP neural network, and the MLP neural network is used to predict the non-stationary components of the water temperature series. The predicted stationary components and non-stationary components are added together to obtain the water temperature prediction result.
[0040] This embodiment uses the daily water temperature data and meteorological data of Xiangjiaba Hydrological Station from 2007 to 2019 for model training. The specific implementation is as follows: Figure 1 As shown, the following steps are included:
[0041] According to the time when the cascade reservoirs in the lower reaches of the Jinsha River were put into operation for power generation, 2007-2011 was divided into the period before the impact of the cascade reservoirs being put into operation for power generation, and 2012-2019 was divided into the period affected by the cascade reservoirs being put into operation for power generation. Daily data from 2007 to 2019 were collected, as well as hourly temperature, solar radiation, and evaporation data from 2007 to 2019. The daily maximum, minimum, mean, and median values were calculated from the hourly data and recorded as Where v = 1, 2, 3 represents the temperature, solar radiation and evaporation data.
[0042] The water temperature data and meteorological data from 2007 to 2011 were selected to calculate the eigenvalues, and the mutual information was calculated. The eigenvalue with the highest mutual information value in each category was selected as the exogenous variable.
[0043] Assume that the water temperature sequence is Y={y1,y2,…,y D}, where y i represents the water temperature on day i. (v) Each statistical feature of (where f∈{max,min,mean,median}), calculate Mutual information with Y
[0044] The calculation method of the mutual information between the meteorological data eigenvalue and the water temperature series is as follows:
[0045] Assume that the water temperature sequence is Y={y1,y2,…,y D}, where y i represents the water temperature on day i. (v) Each statistical feature of (where f∈{max,min,mean,median}), The mutual information with Y is expressed as:
[0046]
[0047] in: Meteorological characteristics and the joint probability distribution of water temperature Y; and P Y (y) are and the marginal probability distribution of Y.
[0048] Based on the characteristics of each type of meteorological variable The feature with the highest mutual information value is selected as the exogenous variable, and the calculation formula is:
[0049]
[0050] For this case, if Figure 2 ,According to the results of mutual information calculation, the daily ,series of the daily minimum temperature, the daily median solar ,radiation, and the daily minimum evaporation are selected as ,exogenous variables.
[0051] Decomposition of stationary and non-stationary features of each variable, including:
[0052] First, all exogenous variables (daily minimum temperature, daily median solar radiation, and daily minimum evaporation) are calculated. Perform discrete Fourier transform respectively and convert it into frequency domain data
[0053]
[0054] where x n for and the original time domain data corresponding to Y, is the frequency domain data after Fourier transform, T is the data length, and j is the imaginary unit.
[0055] Similarly, the water temperature sequence Y is subjected to discrete Fourier transform and converted into frequency domain data W k .
[0056] Secondly, the amplitude of the Fourier transform results is sorted, and for each exogenous variable, the first N1, N2, and N3 main frequency components K are selected. exog,v , for the water temperature series, extract the first M frequency components K temp .
[0057] Again, for each variable with M main frequency components, extract the non-stationary components from the original data. Use the frequency component filtering method to extract the non-stationary components and
[0058] Finally, the filtered frequency components are restored to the time domain through inverse Fourier transform (IDFT) to obtain the non-stationary component X non,t and Y non,t .
[0059] Subtract the non-stationary component from the original signal to obtain the stationary component X sta and Y sta .
[0060] The specific process of adaptive non-stationary eigendecomposition of each variable is as follows:
[0061] First, for all exogenous variables (temperature, solar radiation, evaporation) Perform discrete Fourier transform respectively and convert it into frequency domain data:
[0062]
[0063] where x n for and the original time domain data corresponding to Y, is the frequency domain data after Fourier transform, T is the data length, and j is the imaginary unit.
[0064] Similarly, perform Fourier transform on the water temperature series Y:
[0065]
[0066] where y n is the daily data of the water temperature series, D is the number of water temperature data points, W k is the frequency domain representation of the water temperature series.
[0067] Then sort the amplitudes of the Fourier transform results. For each exogenous variable
[0068] Select the first M1, M2, and M3 main frequency components K respectively exog,v :
[0069]
[0070] Where v = 1, 2, 3 correspond to temperature, solar radiation, and evaporation variables respectively. The Amp function calculates each frequency component. The amplitude.
[0071] For the water temperature series, extract the first M temp Frequency components K temp :
[0072] K temp =TopM temp (Amp(W t ))
[0073] Select the corresponding number of frequency components again and use the frequency component filtering method to extract the non-stationary components:
[0074]
[0075] Among them, Filter is from or K temp K exog,v or K tempFrequency calculation
[0076] Finally, the filtered frequency components are restored to the time domain through the inverse Fourier transform (IDFT) to obtain the non-stationary components:
[0077]
[0078] Obtained X non,t and Y non,t It is the non-stationary part of the signal, which contains the main trend and seasonal changes
[0079] Subtract the non-stationary component from the original signal to obtain the stationary component X sta and Y sta :
[0080] X sta =X exog -X non
[0081] Y sta =YY non
[0082] TFT (Temporal Fusion Transformer) neural network is used to train stationary sequences and MLP (Multi-layer Perceptron) neural network is used to train non-stationary sequences, including:
[0083] The non-stationary and stationary series data are normalized and divided into training, validation, and test sets in a ratio of 7:2:1. These are used for model training, hyperparameter optimization, and performance evaluation, respectively. In this example, the training set is from January 1, 2007, to July 1, 2010; the validation set is from July 2, 2010, to July 1, 2011; and the test set is from July 2, 2011, to December 31, 2011.
[0084] The normalization adopts one of the following four methods: standardization, robust normalization, minimum-maximum normalization, and invariance normalization.
[0085] In the training set (January 1, 2007 to July 1, 2010), the stationary component Y sta and its exogenous variable X sta Input TFT neural network for training, for the non-stationary component X non and Y non Input the MLP neural network for training.
[0086] The loss function of the TFT neural network and the MLP neural network is set to RMSE.
[0087] After training, the stationary components and non-stationary components of the exogenous variables in the validation set (July 2, 2010 to July 1, 2011) were input into the TFT neural network and MLP neural network for prediction, respectively. The prediction results were obtained by denormalization and compared with the measured values in the validation set. The RMSE was used to evaluate the quality of the model parameters.
[0088] Furthermore, hyperparameter optimization is performed based on the validation set to ultimately determine the optimal parameter combination to improve prediction accuracy, including:
[0089] First, define the search space for each hyperparameter. The parameters and value ranges or options can be set as follows:
[0090] Table 1 Parameter value range
[0091]
[0092]
[0093] The TPE algorithm performs hyperparameter optimization based on the validation set during initialization, randomly samples a set of initial hyperparameter combinations, and trains the model for evaluation, using RMSE as the performance evaluation indicator.
[0094] Based on the evaluation results, a probabilistic model is built to estimate the performance of different hyperparameter combinations. The hyperparameter intervals with a higher probability of producing excellent hyperparameter combinations are selected for further sampling. The distribution of hyperparameters is iteratively adjusted until the set stopping condition is reached. The optimal hyperparameter combination is then returned, which is considered to have the best performance on the validation set.
[0095] Furthermore, the iteration reaches the set stopping conditions, including: reaching the maximum number of iterations; and the improvement of the hyperparameter combination has not improved for several consecutive rounds. For this case, the hyperparameter combination selected is as follows:
[0096] Table 2 Parameter value table
[0097] Parameter name Value range / options Normalization method Robust Normalization Fusion decoder attention layer random dropout 0.12 TFT learning rate 0.0226 Number of TFT hidden layers 16 TFT batch size 32 M1 27 M2 3 M3 7 Mtemp 15 Number of hidden layers in MLP 4 Number of hidden units in the MLP 255
[0098] After finding the optimal parameters, we use the exogenous variables in the test set (July 2, 2011 to December 31, 2011) as input to make predictions. We test the model prediction ability under the optimal hyperparameters using four indicators: MAE, RMSE, NSE, and KEG. For this case, the prediction results of the test set are as follows: Figure 3 , the evaluation results on the test set are as follows:
[0099] Table 3 Evaluation results using the test set
[0100] Evaluation indicators Calculation results MAE 0.82 RMSE 1.09 NSE 0.88 KGE 0.93
[0101] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned neural network-based method for predicting water temperature in river sections of a reservoir group when executing the computer program.
[0102] In one embodiment, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the neural network-based method for predicting water temperature in a river section of a reservoir group.
[0103] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0104] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1A step that specifies a function in one or more boxes.
Claims
1. A method for predicting water temperature in a river section of a reservoir group based on a neural network, characterized in that: include: Obtain meteorological data after the reservoir construction, and select the statistical features with the strongest correlation with water temperature from the statistical features of each type of meteorological data as exogenous variables; For all exogenous variables, the stationary and non-stationary components of each exogenous variable are separated based on discrete Fourier transform; The stationary components of each exogenous variable constitute the input of the TFT neural network, and the TFT neural network is used to predict the stationary components of the water temperature series; the non-stationary components of each exogenous variable constitute the input of the MLP neural network, and the MLP neural network is used to predict the non-stationary components of the water temperature series. The predicted stationary components and non-stationary components are added together to obtain the water temperature prediction result.
2. The neural network-based method for predicting water temperature in a reservoir group river section according to claim 1, characterized in that: The meteorological data includes hourly data of air temperature, solar radiation and evaporation, and the statistical characteristics of the meteorological data include daily maximum value, minimum value, mean value and median value of the meteorological data; the water temperature data uses daily water temperature data.
3. The neural network-based method for predicting water temperature in a reservoir group river section according to claim 1, characterized in that: The mutual information method is used to select the statistical features with the strongest correlation with water temperature as exogenous variables. The mutual information method includes: calculating the statistical features of historical meteorological data Mutual information with the historical water temperature series Y The statistical feature with the highest mutual information value is taken as the statistical feature with the strongest correlation with water temperature.
4. The neural network-based method for predicting water temperature in a reservoir group river section according to claim 3, characterized in that: The statistical characteristics of the calculated historical meteorological data Mutual information with the historical water temperature series Y The calculation formula is: in, represents the mutual information between the statistical characteristics of historical meteorological data and the historical water temperature sequence, Y is the historical water temperature sequence, Represents the statistical characteristics of historical meteorological data; x and y are random variables The value of Y, and is the range of values of the random variable; Statistical characteristics of historical meteorological data and the joint probability distribution of the historical water temperature series Y; and P Y (y) are the statistical characteristics of historical meteorological data and the marginal probability distribution of the historical water temperature series Y.
5. The method for predicting water temperature of a river section in a reservoir group based on a neural network according to claim 1, characterized in that: The method of separating the stationary and non-stationary components of all exogenous variables based on discrete Fourier transform includes the following steps: (1) Perform discrete Fourier transform on all exogenous variables; (2) Sort the amplitudes of the discrete Fourier transform results of each exogenous variable, and extract the first N main frequency components of the discrete Fourier transform of each exogenous variable; (3) Based on the main frequency components of each exogenous variable obtained in step (2), the frequency domain results of the non-stationary components of each exogenous variable are obtained using the frequency component filtering method; (4) The frequency domain results of the non-stationary components of each exogenous variable are restored to the time domain through inverse Fourier transform (IDFT) to obtain the non-stationary components of each exogenous variable; (5) Deduct the corresponding non-stationary components from the original signals of each exogenous variable to obtain the stationary components of each exogenous variable.
6. The neural network-based method for predicting water temperature in a reservoir group river section according to claim 1, characterized in that: Training of TFT neural network and MLP neural network, including: Obtain meteorological data and river water temperature data before reservoir construction. From the statistical features of each type of meteorological data, use the mutual information method to select the statistical features with the strongest correlation with water temperature as exogenous variables. For all exogenous variables and river water temperature series, the stationary and non-stationary components of each exogenous variable and river water temperature series are separated based on discrete Fourier transform; The non-stationary and stationary series data of each exogenous variable and river water temperature series were normalized respectively, and divided into training set, validation set and test set for model training; Within the training set, the stationary components of the river water temperature series and the stationary components of each exogenous variable are input into the TFT neural network for training, and the non-stationary components of the river water temperature series and the non-stationary components of each exogenous variable are input into the MLP neural network for training. The loss function calculation formula of the TFT neural network and the MLP neural network is: Among them, RMSE represents the loss function, y i is the true value of river water temperature, is the predicted value of river water temperature, and n is the total number of samples.
7. The neural network-based method for predicting water temperature in a reservoir-based river section according to claim 6, characterized in that: The TPE algorithm is used to optimize the hyperparameters of the TFT neural network and the MLP neural network based on the validation set.
8. The neural network-based method for predicting water temperature in a reservoir-based river section according to claim 6, characterized in that: The performance of the trained model is evaluated using RMSE, MAE, NSE, and KGE indicators.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the neural network-based method for predicting water temperature in a river section of a reservoir group according to any one of claims 1 to 8 is implemented.
10. A computer program product comprising a computer program and / or instructions, characterized in that When the computer program and / or instructions are executed by a processor, the neural network-based method for predicting water temperature in a river section of a reservoir group according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Vertical water temperature simulation method based on multilayer LSTM neural network
CN114036838A
Method for predicting water quality non-stationary time sequence based on improved TFT model
CN116956120A
Reservoir vertical water temperature forecasting method based on spatial-temporal feature extraction and machine learning
CN118261077A
Systems and methods for selecting global climate simulation models for training neural network climate forecasting models
US20200356839A1