River water temperature detection method and system based on deep learning
By adopting deep learning methods in river water temperature detection, combining AdaBoost, LSTM and GRU models, and using EEMD signal decomposition algorithm, the problem of large demand and complexity of river water temperature prediction model data in the existing technology is solved, and higher predictions are achieved Accuracy and reliability.
Patent Information
- Application Number
- CN202411134517.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-31
AI Technical Summary
The existing river water temperature prediction model has the problem of high data demand and high complexity, which limits its application in practice, especially physical-based methods, while data-driven methods require less data, but in river water temperature detection There is still a lack of effective methods to improve detection reliability.
Using deep learning-based river water temperature detection method, a hybrid model is constructed through the EEMD signal decomposition algorithm, including AdaBoost, LSTM and GRU models, combined with data-driven technology to improve the prediction accuracy and reliability of river water temperature fluctuations.
Through signal decomposition, the internal mode is effectively separated and noise is reduced, which improves the accuracy and reliability of river water temperature prediction and improves the prediction ability of river water temperature fluctuations.
Smart Images

Figure CN119226877A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water quality detection, and in particular relates to a river water temperature detection method and system based on deep learning. Background Art
[0002] With the massive release of pollutants in rivers, water quality has become a global concern. Therefore, accurate prediction of river water quality is of great significance for monitoring and controlling river pollution and water resources management. There are various water quality indicators that can be used to monitor the water quality of rivers, including the Zhejiang River, including water temperature, dissolved oxygen, turbidity, salinity / conductivity. Among the various variables of river water quality, river water temperature (WT) is one of the most important parameters that affect many biological, physical and chemical processes in rivers. Many other dominant processes in rivers are mainly related to river WT fluctuations, such as dissolved oxygen content, surface water evaporation rate, ice formation, metabolic activities of aquatic species, etc. Changes in river WT can also be used as indicators of climate change. Since WT is an important factor in river water quality that affects many other processes in rivers, it seems necessary and inevitable to develop estimation / prediction tools for river WT. Two different types of WT prediction models have been proposed, including physics-based and data-driven techniques). Physics-based methods are able to estimate WT based on heat flux relationships; however, the need for large amounts of data and their complexity and time consumption are the main limitations, which restrict their application in practice. In contrast, data-driven methods are based on statistics and data mining paradigms, while machine learning and deep learning models, as typical examples of data-driven technologies, require less data than physics-based methods. Therefore, it is urgent to provide a river water temperature detection method based on deep learning to improve the reliability of water quality detection. Summary of the invention
[0003] In view of this, the present invention provides a river water temperature detection method and system based on deep learning. The signal decomposition performed by EEMD effectively separates the intrinsic pattern and reduces the noise, thereby improving the prediction accuracy of river water temperature fluctuations. The following technical scheme is specifically adopted to achieve this.
[0004] In a first aspect, the present invention provides a river water temperature detection method based on deep learning, comprising the following steps:
[0005] Acquire water quality data of the area to be detected, and divide the river data into a training data set and a test data set, wherein the water quality data includes river water temperature, conductivity, pH value, turbidity, dissolved oxygen content and river flow;
[0006] A hybrid model is constructed by using a signal decomposition algorithm, wherein the hybrid model includes an AdaBoost model, an LSTM model and a GRU model, AdaBoost represents adaptive boosting, LSTM represents long short-term memory, GRU represents a gated recurrent unit, and the signal decomposition algorithm includes an integrated empirical mode decomposition (EEMD) algorithm;
[0007] The water quality data is input into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection.
[0008] As a preferred embodiment of the above technical solution, the calculation process of the Adaboost model includes:
[0009] Distributing weights uniformly across all samples in the training dataset to initiate the learning process;
[0010] Training a weak regressor based on the training data set;
[0011] Using the current sample weight to train the weak regressor on the training data set and quantizing it using mean square error (MSE), and adjusting the mean square error (MSE) according to the current sample weight;
[0012] Allocate the weight of the regressor corresponding to the training data set according to the mean square error MSE after training;
[0013] After the weight calculation is completed, the algorithm updates the weight of the sample.
[0014] As a preferred embodiment of the above technical solution, after the weight calculation is completed, the algorithm updates the weight of the sample, including:
[0015] A preset number of iterations are used or until a predefined termination condition is met. In each iteration, the weight of the sample is adjusted. The final prediction of the Adaboost model is obtained by adding the outputs of all weak regressors, and each regressor is weighted according to its importance.
[0016] As a preferred embodiment of the above technical solution, the LSTM model includes an input gate, an output gate and a forget gate. The input gate passes information to the storage unit according to the output and current input control information, the forget gate determines the update of the storage unit, and the output gate adjusts the information to be carried to the next step.
[0017] As a preferred embodiment of the above technical solution, the GRU model includes an update gate and a reset gate. The update gate acts as an input gate to forget the gate in the LSTM and decides whether the state information of the LSTM should be updated; the reset gate detects the amount of previous information to be retained or forgotten.
[0018] As a preferred embodiment of the above technical solution, the EEMD algorithm decomposes the original data into various oscillation modes according to the local characteristic time scale of the original data. The EEMD algorithm adds white noise to the original sequence and separates the original sequence into a trend term and multiple finite intrinsic mode functions IMF.
[0019] As a preferred embodiment of the above technical solution, the execution process of the EEMD algorithm includes:
[0020] Set EEMD parameters, where the EEMD parameters include noise standard deviation, number of realizations, and maximum allowed number of screening iterations;
[0021] A normally distributed white noise sequence with finite amplitude is added to the original signal to form a new sequence;
[0022] Use the empirical mode decomposition algorithm to decompose the new series into finite eigenmode functions IMF and trend terms;
[0023] Repeatedly forming new sequences and decomposing new sequences using different white noise sequences until a predetermined number of realizations is reached;
[0024] The system average of the finite eigenmode functions (IMFs) in all realization orders is calculated to obtain the IMFs to eliminate mode mixing and obtain the final result.
[0025] As the preferred embodiment of the above technical solution, the root mean square error RMSE, mean absolute error MAE and determination coefficient R are used. 2 , the corresponding expressions are:
[0026]
[0027] Among them, WT o,i , WT f,i represent the observed and predicted values of the ith river water temperature, respectively. The mean values of observed and predicted river water temperatures are shown respectively, and N represents the total number of observations.
[0028] In a second aspect, the present invention further provides a river water temperature detection system based on deep learning, comprising:
[0029] A data acquisition module, used to acquire water quality data of the area to be detected, and divide the river data into a training data set and a test data set, wherein the water quality data includes river water temperature, conductivity, pH value, turbidity, dissolved oxygen content and river flow;
[0030] A model building module, used to build a hybrid model using a signal decomposition algorithm, wherein the hybrid model includes an AdaBoost model, an LSTM model and a GRU model, AdaBoost represents adaptive boosting, LSTM represents long short-term memory, GRU represents a gated recurrent unit, and the signal decomposition algorithm includes an integrated empirical mode decomposition (EEMD) algorithm;
[0031] The water temperature detection module is used to input the water quality data into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection.
[0032] The present invention provides a river water temperature detection method and system based on deep learning. The method obtains water quality data of the area to be detected, divides the river data into a training data set and a test data set, constructs a hybrid model using a signal decomposition algorithm, inputs the water quality data into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection. The signal decomposition performed by EEMD can effectively separate the intrinsic pattern and reduce the noise, thereby improving the prediction accuracy of river water temperature fluctuations and the reliability of river WT prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 A flow chart of a river water temperature detection method based on deep learning provided by the present invention;
[0035] FIG. 2 is a schematic diagram of a research station provided by the present invention, wherein FIG. 2 includes FIG. 2( a ) and FIG. 2( b );
[0036] FIG3 is a schematic diagram of observation day data used during 2014-2021 provided by the present invention, wherein FIG3 includes FIG3(a) and FIG3(b);
[0037] FIG4 is a scatter plot of observed and predicted river WTs of the best hybrid model and its related simple form during the test period provided by the present invention, wherein FIG4 includes FIG4(a) and FIG4(b);
[0038] Figure 5 Time series plots between observed and predicted river WTs for the optimal hybrid model and its related simple form during the experimental period provided by the present invention;
[0039] Figure 6A Taylor diagram of the optimal mixed model during the test provided by the present invention and a schematic diagram of its related simple form;
[0040] Figure 7 This is a structural block diagram of the river water temperature detection system based on deep learning provided by the present invention. DETAILED DESCRIPTION
[0041] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0042] See also Figure 1 The present invention provides a river water temperature detection method based on deep learning, comprising the following steps:
[0043] S1: Acquire water quality data of the area to be detected, and divide the river data into a training data set and a test data set, wherein the water quality data includes river water temperature, conductivity, pH value, turbidity, dissolved oxygen content and river flow;
[0044] S2: constructing a hybrid model using a signal decomposition algorithm, wherein the hybrid model includes an AdaBoost model, an LSTM model, and a GRU model, AdaBoost represents adaptive boosting, LSTM represents long short-term memory, GRU represents a gated recurrent unit, and the signal decomposition algorithm includes an integrated empirical mode decomposition (EEMD) algorithm;
[0045] S3: Input the water quality data into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection.
[0046] In this example, deep learning techniques are increasingly used to predict river WT, confirming their usefulness as reliable prediction tools. For example, support vector regression (SVR) was used to model river WT data as a promising prediction model; the accuracy of extreme learning machine (ELM) and multilayer perceptron neural network (MLPNN) was evaluated. It was found that ELM outperformed MLPNN in river WT prediction, and a new hybrid model named BO-NARX-BR was implemented, which integrated Bayesian optimization, nonlinear autoregressive network with exogenous input, and Bayesian regularization, confirming the reliable potential of the proposed method in river WT prediction. The multilayer deep neural network used to predict river WT also confirmed its reliable performance. Four merged variants of long short-term memory (LSTM) and convolutional neural network (CNN) were proposed by combining them with two meta-heuristic optimizers. The hybrid model outperformed simple LSTM and CNN in river WT prediction. A new hybrid model was proposed by fusing LSTM, transform encoder and wavelet threshold denoising. The proposed hybrid model predicted river WT better than LSTM.
[0047] A hybrid model was proposed by combining back propagation (BP) and particle swarm optimization (PSO), and the implemented model showed better performance compared to simple BP and other used models. The efficiency of two signal decomposition techniques, including empirical wavelet transform (EWT) and maximum overlap discrete wavelet transform (MODWT), when coupled with four machine learning algorithms was compared. Both EWT and MODWT were able to improve the performance of independent models. Four types of machine learning models were established, and generalized additive model (GAM) and multivariate adaptive regression spline (MARS) outperformed extreme gradient boosting (XGB) and random forest regression (RFR) for river WT prediction. While LSTM was used for surface WT prediction, and it was shown that it can be used as a useful WT prediction tool. Adaptive neuro-fuzzy inference system (ANFIS) and radial basis function (RBF) were found to outperform other used models for river WT prediction. XGB, SVR, and multivariate linear regression (MLR) were applied for river WT prediction, and both XGB and SVR performed better than simple MLR. A deep learning-based model called attention gated recurrent unit (A-GRU) was used for lake WT prediction. The A-GRU model performed best.
[0048] It should be noted that understanding the river WT regime is of great significance in hydrological science as it affects many parameters of river water quality. Daily river WT fluctuations at two hydrological stations were predicted for one, three, and five days into the future by implementing some simple and hybrid models. A tree-based model named AdaBoost and two deep learning-based methods, namely, long short-term memory (LSTM) and gated recurrent unit (GRU), were developed. Then, a signal decomposition method (ensemble empirical mode decomposition, EEMD) was used to build three types of coupled models. The prediction accuracy of the single and proposed hybrid models was studied using some error criteria and visualization graphics. The prediction of river WT was mainly achieved through the development of simple machine / deep learning models. In this regard, the establishment of hybrid models was less considered compared to simple models. On the other hand, the use of signal decomposition methods was also less in the development of hybrid models for river WT prediction. However, this work applied EEMD to generate EEMDAdaBoost, EEMD-LSTM, and EEMD-GRU ensemble models, which have not been used for river WT prediction so far.
[0049] Specifically, two hydrological stations located in the United States were selected as case studies. The study sites are the USGS 14211010 Klamath River near Oregon, Oregon (latitude 45°22'46", longitude 122°34'34") and the USGS 14211720 Willamette River in Portland, Oregon (latitude 45°31'03", longitude 122°40'09"), briefly referenced to USGS 14211010 and USGS 14211720. The Clackamas River is an 83-mile-long tributary of the Willamette River in northwestern Oregon, United States. The Willamette River is also a major tributary of the Columbia River. It is approximately 187 miles long and flows entirely through the northwestern region of Oregon. Figure 2 shows the geographical locations of the study stations. The data used include daily mean river water temperature (WT) as the target variable, and conductivity (SC), pH, turbidity (Tu), dissolved oxygen (DO), and river flow (Q) as possible input predictors. The study period is from January 1, 2014 to December 31, 2021, and is divided into two parts, including training (the first 80% of the data) and testing (the last 20% of the data). Table 1 lists some statistical parameters of the data used in the study site. Figure 3 also depicts the time series plot of the observed data in the selected time period. In Table 1, Min: minimum value, Max: maximum value, Avg: mean value, SD: standard deviation, CV: coefficient of variation.
[0050] Table 1 Summary of statistical characteristics of data used in the present invention
[0051]
[0052] It should be understood that by acquiring the water quality data of the area to be detected, and dividing the river data into a training data set and a test data set, a hybrid model is constructed using a signal decomposition algorithm, and the water quality data is input into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection. The signal decomposition performed by EEMD can effectively separate the intrinsic patterns and reduce the noise, thereby improving the prediction accuracy of river water temperature fluctuations and the reliability of river WT prediction.
[0053] Optionally, the calculation process of the Adaboost model includes:
[0054] Distributing weights uniformly across all samples in the training dataset to initiate the learning process;
[0055] Training a weak regressor based on the training data set;
[0056] Using the current sample weight to train the weak regressor on the training data set and quantizing it using mean square error (MSE), and adjusting the mean square error (MSE) according to the current sample weight;
[0057] Allocate the weight of the regressor corresponding to the training data set according to the mean square error MSE after training;
[0058] After the weight calculation is completed, the algorithm updates the weight of the sample.
[0059] In this embodiment, after the weight calculation is completed, the algorithm updates the weight of the sample, including: using a preset number of iterations or knowing that the predefined termination condition is met, and in each iteration process, the weight of the sample is adjusted. The final prediction of the Adaboost model is obtained by adding the outputs of all weak regressors, and each regressor is weighted according to its importance. The main concept of Adaboost is to create a strong learner (classifier or regressor) by pooling weak learners. In Adaboost training, when the error is small, the distribution weight of the sample is low, and when the error is large, the sample distribution weight is high.
[0060] It should be noted that in the first stage: Adaboost starts the learning process by evenly distributing weights on all samples in the training data set, indicating the importance of each sample throughout the training stage; the second stage: train a weak regression on the training data, such as a model that performs slightly better than the simple average; the third stage: train the weak regressor on the data set using the current sample weights to reduce the regression error, quantified by the mean square error (MSE), and adjusted according to the sample weights; the fourth stage: the algorithm assigns the weights of the regressors according to the trained errors, and the weak regressors with lower errors get higher weights; the fifth stage: after the weight calculation is completed, the algorithm updates the weights of the samples, and samples with higher errors are assigned higher weights to give them higher importance in subsequent iterations. After updating the sample weights, normalization is performed to ensure that their cumulative sum is equal to 1. The algorithm combines the outputs of all weak regressors by weighted summation, taking into account the weights of the weak regressors in the final prediction; the sixth stage: from stage two to step five, repeat a specific number of iterations, or until a predefined termination condition is met. During each iteration, the weights of the samples are adjusted; the final prediction is made by adding the outputs of all weak regressors, each weighted according to its importance.
[0061] Deep learning is a subset of machine learning methods that demonstrates substantial capabilities in solving different tasks of classification and regression. Recurrent Neural Networks (RNNs) are a type of deep learning model that are particularly effective for time series prediction problems. However, RNNs are suitable for short-term dependency tasks. However, they are not suitable for long-term dependencies due to the problem of vanishing gradients. Two variants of RNNs, LSTM and GRU, are proposed to overcome this problem and learn long dependencies in time series prediction problems. The LSTM model uses a combination of short-term and long-term memory to solve the vanishing gradient problem in RNNs, which allows LSTM to handle short-term and long-term dependency problems using memory cells that provide internal storage of relevant previous storage. The main LSTM cell consists of three main gates: input, output, and forget. The input gate controls what information will be passed to the memory cell based on the previous output and the current input, the forget gate determines how the memory cell will be updated, and the output gate regulates the information to be carried to the next step.
[0062] Optionally, the LSTM model includes an input gate, an output gate and a forget gate, the input gate controls information to be passed to the storage unit according to the output and current input, the forget gate determines the update of the storage unit, and the output gate adjusts the information to be carried to the next step.
[0063] In this embodiment, the GRU model includes an update gate and a reset gate. The update gate acts as an input gate to forget the gate in the LSTM and decides whether the state information of the LSTM should be updated; the reset gate detects the amount of previous information to be retained or forgotten. The EEMD algorithm decomposes the original data into various oscillation modes according to the local characteristic time scale. The EEMD algorithm adds white noise to the original sequence and separates the original sequence into a trend term and multiple finite intrinsic mode functions IMF. GRU overcomes the weakness of RNN in solving the problem of vanishing gradients with long-term dependencies. Unlike the LSTM composed of three gates, the GRU includes two gate layers: an update gate and a reset gate. The update gate acts as an input gate, forgets the gate in the LSTM, and decides whether the cell state information should be updated. At the same time, the reset gate detects the amount of previous information to be retained or forgotten. GRU is simpler than LSTM because it has fewer internal parameters and is easier to train due to some structural modifications.
[0064] Optionally, the execution process of the EEMD algorithm includes:
[0065] Set EEMD parameters, where the EEMD parameters include noise standard deviation, number of realizations, and maximum allowed number of screening iterations;
[0066] A normally distributed white noise sequence with finite amplitude is added to the original signal to form a new sequence;
[0067] Use the empirical mode decomposition algorithm to decompose the new series into finite eigenmode functions IMF and trend terms;
[0068] Repeatedly forming new sequences and decomposing new sequences using different white noise sequences until a predetermined number of realizations is reached;
[0069] The system average of the finite eigenmode functions (IMFs) in all realization orders is calculated to obtain the IMFs to eliminate mode mixing and obtain the final result.
[0070] In this embodiment, EEMD stands for Integrated Empirical Mode Decomposition, which is an improved version of Empirical Mode Decomposition (EMD) to overcome the mode mixing problem in EMD. EEMD is a mathematical technique that decomposes the original data into various oscillation modes based on their local characteristic time scales. The method involves adding white noise to the original sequence to reduce the frequency mixing phenomenon of EMD, and then separating the original sequence into a trend and "n" finite intrinsic mode functions (IMFs). The steps of the EEMD algorithm can be summarized as follows: First, the EEMD parameters are set, including the noise standard deviation, the number of realizations, and the maximum number of screening iterations allowed; in the second step, the decomposition process begins by adding a normally distributed white noise sequence with a finite amplitude to the original signal to form a new sequence; in the third step, this new sequence is decomposed into IMFs and trend terms using the EMD method. Steps two and three are repeated with different white noise sequences until the predetermined number of realizations is reached; finally, the IMFs are obtained by calculating the ensemble mean of the corresponding IMFs in all realizations, thereby eliminating mode mixing and obtaining the final result.
[0071] Optionally, the root mean square error RMSE, mean absolute error MAE and coefficient of determination R are used 2 , the corresponding expressions are:
[0072]
[0073]
[0074] Among them, WT o,i , WT f,i represent the observed and predicted values of the ith river water temperature, respectively. The mean values of observed and predicted river water temperatures are shown respectively, and N represents the total number of observations.
[0075] In this embodiment, a robust hybrid method is introduced to predict the river WT of the studied site by combining EEMD with three advanced AI models (AdaBoost, LSTM and GRU). The original WT time series data is decomposed into several IMFs and a residual using EEMD. EEMD helps to isolate the nonlinear and non-stationary components of the WT data, thereby achieving more accurate modeling and prediction. Other inputs such as SC, pH, Tu, Q, DO, etc. are also considered. These variables are crucial to provide a complete environmental context and accurate WT prediction. These IMF series, residuals and other input variables are input into three AI models: AdaBoost, LSTM and GRU, which are referred to as hybrid models in the present invention, namely EEMD-AdaBoost, EEMD-LSTM and EEMD-GRU, respectively. Each AI model independently predicts the components of the WT time series. The predictions and residuals of the IMFs are then aggregated to obtain the final predicted WT. Using some error metrics, the performance of the final predicted WT is finally evaluated based on the observed WT. The configuration of the implemented model is shown in Table 2.
[0076]
[0077]
[0078] In Table 2, Parameter represents parameter; Value / Description represents value / description; Number of Estimators Random State represents the number of estimators random state; seed for reproducibility represents seed reproducibility; Number of Units Optimizer represents the number of units in the LSTM layer; Mean Squared Error represents mean squared error; Loss represents loss; Epochs represents epochs; Batch Size represents batch size; Validation Split represents validation split; Early Stopping Patience represents early stopping patience; for early stopping represents early stopping; stop training if no improvement represents stopping training if no improvement; Number of Units represents the number of units; units in the GRU layer represents the units in the GRU layer; Input Shape represents input shape; lag, number of features represents lag, number of features; Optimizer represents optimizer; Common Settings represents common settings; Time Step represents time step; Forecast Horizon represents forecast horizon;
[0079] Data Split means data splitting; Data Normalization means data normalization; Lag means lag; varied means varied; 80% training, 20% testing means 80% training and 20% testing; DataNormalization means data normalization.
[0080] See also Figure 7 The present invention also provides a river water temperature detection system based on deep learning, comprising:
[0081] A data acquisition module, used to acquire water quality data of the area to be detected, and divide the river data into a training data set and a test data set, wherein the water quality data includes river water temperature, conductivity, pH value, turbidity, dissolved oxygen content and river flow;
[0082] A model building module, used to build a hybrid model using a signal decomposition algorithm, wherein the hybrid model includes an AdaBoost model, an LSTM model and a GRU model, AdaBoost represents adaptive boosting, LSTM represents long short-term memory, GRU represents a gated recurrent unit, and the signal decomposition algorithm includes an integrated empirical mode decomposition (EEMD) algorithm;
[0083] The water temperature detection module is used to input the water quality data into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection.
[0084] In this example, the river WT time series of two selected stations in the present invention are predicted for multiple-step-ahead days (i.e., one, three, and five days ahead), and some simple and hybrid machine / deep learning-based models are constructed, and their performance is statistically and schematically evaluated using three error metrics and schematic diagrams. First, three independent methods consisting of AdaBoost, LSTM, and GRU are developed. Tables 3a, 3b, and 3c show the RMSE, MAE, and R obtained at the USGS14211010 station, respectively. 2 The values of statistical metrics for predicting river WT in the time ranges t+1, t+3, and t+5. Similarly, Tables 4a, 4b, and 4c list the error metric values obtained for the USGS14211720 station.
[0085] Table 3a Error metrics obtained by the simple model and hybrid model in the WT prediction t+1 days ago at USGS14211010 station
[0086]
[0087] Table 3b Error metrics obtained by simple model and hybrid model in WT prediction t+3 days ago at USGS14211010 station
[0088]
[0089]
[0090] Table 3c Error metrics obtained by simple and hybrid models in WT predictions t+5 days ago at station 14211010 of the USGS
[0091]
[0092] Table 4a Error metrics obtained by simple and hybrid models in WT predictions t+1 days ago at station 14211720 of the USGS
[0093]
[0094]
[0095] Table 4b Error metrics obtained by simple model and hybrid model in WT prediction t+3 days ago at station 14211720 of the USGS
[0096]
[0097] Table 4c Error metrics obtained by simple and hybrid models in WT predictions t+5 days ago at station 14211720 of the USGS
[0098]
[0099] It should be noted that the prediction of river WT in each time range is performed in three different modes, including one delay, two delays, and three delays of the input predictors such as SC, PH, Tu, DO, Q, and WT. For example, AdaBoost1, LSTM1, GRU1, and other models numbered 1 in Tables 3a-3c and 4a-4c are input with the delay of the above input data, while three delays of the above data have been used as input for the model numbered 3 (i.e., AdaBoost3, LSTM3, GRU3, etc.). Considering the RMSE, MAE, and R listed in Tables 3a-3c and 4a-4c, the 2 The values of statistical criteria such as , can be seen that the entire simple AdaBoost, LSTM, and GRU models represent the potential for river WT prediction using the above input predictors at both sites and all time frames. However, the performance analysis of the implemented simple models clearly shows that the AdaBoost model gives higher RMSE and MAE, as well as lower R 2 values, indicating that its performance is relatively weak compared to LSTM and GRU. Moreover, LSTM and GRU generally showed the same results at the two considered locations, confirming the reliable ability of deep learning-based models in river WT prediction.
[0100] As mentioned above, the main objective of the present invention is to improve river WT prediction by developing a hybrid model. To achieve this goal, a signal decomposition scheme, namely EEMD, is used to construct EEMD-AdaBoost, EEMD-LSTM and EEMD-GRU hybrid techniques. Tables 3a-3c for USGS 14211010 and Tables 4a-4c for USGS 14211720 station list the RMSE, MAE and R of the proposed hybrid model. 2 The comparison of the statistical indicators of the simple model and the mixed model clearly shows that the error statistics of the mixed model are improved compared with the simple model (i.e., lower RMSE and MAE, R 2This demonstrates the reliable ability of the signal decomposition method (i.e., EEMD) used in the present invention to improve river WT prediction. Signal decomposition by EEMD effectively separates intrinsic modes and reduces noise, improving the prediction accuracy of river water temperature fluctuations, which is why the coupled model developed using EEMD performs better than the simple method.
[0101] Similar to the simple methods, the hybrid model of AdaBoost (i.e., EEMD-AdaBoost) showed lower accuracy than EEMD-LSTM and EEMD-GRU at both stations and all time ranges. This problem was more pronounced in the models developed using two and three delays of the input data (i.e., EEMD-AdaBoost2, EEMD-LSTM 2, and EEMD-GU2 and EEMD-AdaBoost3, EEMD-lSTM 3, and EEMD / GU3). The EEMD-LST31 and EEMD-GRU1 models (i.e., powered by one delay) were found to perform slightly better than the EEMD-AdaBoost1 model. The accuracy of the simple model developed for the USGS station 14211010 did not improve by increasing the number of inputs; however, the simple model for the USGS station 14211720 slightly showed an improvement in the error metrics in the models fed with more inputs, especially the LSTM and GRU models. Furthermore, utilizing further inputs, specifically the EEMD-LSTM and EEMD-GRU methods, generally improves the performance of the entire hybrid model developed at both study sites. Furthermore, the accuracy of all developed simple and coupled methods decreases with increasing time horizon, such that the t+1 and t+5 time horizons represent the best and worst performance of the model, respectively.
[0102] To further discuss the performance evaluation of hybrid and simple models, the advanced hybrid methods and their simple forms during the test phase in each time range were benchmarked for graphical analysis of the best performing coupled models compared to the simple models. In this context, scatter plots, time series plots, and Taylor diagrams were plotted. The error criteria of the best models during the test phase are highlighted in bold in Tables 3a-3c and 4a-4c. The scatter plots of observed versus predicted river WT data are shown in Figure 4. The proposed combined methods showed lower scattering around the perfect dashed line compared to the simple models, indicating their reliable potential in predicting WT at the study site. The R2 value of the best hybrid model was also higher than that of the simple model. In addition, Figure 5 A time series plot of observed WT data versus predicted WT data is shown, and it is easy to see that the advanced hybrid model is much better at tracking the observed trends in river WT data over multiple time frames than the individual methods. Finally, Taylor diagrams are plotted to further visually evaluate the model performance, as shown in Figure 6 As shown, the Taylor diagram integrates the results of three statistical metrics, including the central RMSE difference, correlation coefficient, and standard deviation of the river WT data predicted using the hybrid and simple methods against the actual observations. Compared with the independent models (i.e., colored triangles), the hybrid model developed at the research station (i.e., yellow stars) is closer to the observed river WT (i.e., black triangles) in the selected time range, especially at t+3 and t+5, which indicates that the hybrid model has a better potential in accurately predicting the river WT data. This can also be seen considering the higher correlation values of the hybrid model in the Taylor diagram and the closer estimates of the standard deviation of the WT data to the corresponding values of the observed data.
[0103] As mentioned above, there are some studies on the role of signal decomposition techniques in improving the performance of independent machine / deep learning models, such as by combining wavelet analysis with MLPNN and ANFIS, two hybrid models were implemented and the potential of wavelets to enhance river WT prediction through coupled W-MLPNN and W-ANFIS methods was revealed. A signal decomposition scheme called variational mode decomposition (VMD) was used to build six hybrid versions of machine learning models. The VMD-based merged model outperformed the simple model in predicting river WT time series; two signal decomposition methods including EWT and MODWT were used to improve the river WT prediction of four machine learning models and confirmed their reliable ability to improve simple models.
[0104] The accuracy of the advanced hybrid models proposed in this paper (i.e., the models with bold error metrics in Tables 3a-3c and 4a-4c) is comparable to that of the models developed in previous studies, where the results of the advanced hybrid models in the t+1 time range are considered because they show the lowest error values (e.g., RMSE = 0.1929 °C, MAE = 0.1489, R2 = 0.9988 for EEMD-GU3 at USGS14211010 station and RM SE = 0.1918 °C, MAE = 0.1558, R2 = 0.9990 for EEMD-GU3 at USGS14111720 station). In this analysis, the RMSE values reported in various studies during the testing period were focused on because this metric is a commonly used error criterion for evaluating model performance. Daily river WT time series were predicted at five river stations by MLPNN and three versions of ANFIS, combining air temperature, river discharge, and Gregorian components. The RMSE of the advanced model varied between 0.457°C (MLPNN) and 1.685°C (ANFIS fuzzy c-mean). Whereas, the wavelet-based MLPNN daily river WT prediction model was implemented at eight river stations using air temperature and it was noted that the RMSE values of the advanced model ranged from 0.992°C to 1.178°C. Some machine learning models were developed using air temperature, river flow and Julain date, and the lowest RMSE values of 0.938°C and 1.189°C were obtained for the BP-PSO hybrid model at the selected river stations. Air temperature and river flow were used as input predictors for three machine / deep learning models while predicting daily river flow at nine river stations. The study found that the LSTM had the lowest RMSE at all selected locations ranging from 0.50°C to 2.04°C. While daily river WT was predicted by some independent models for the four considered locations, the models using air temperature and periodic terms provided the lowest RMSE values, which were 1.451°C (SVR), 1.105°C (Gaussian process regression, i.e., GPR), 1.057°C (GPR), and 0.914°C (GPR), respectively. It is obvious that the advanced models developed in the present invention (i.e., EEMD-GRU3) indicated much lower RMSE values than those reported in previous studies, indicating their reliable performance in river WT prediction. The reason for this conclusion can be attributed to the reliable capability of the proposed hybrid model and the use of other river water quality variables (i.e., SC, PH, Tu, and DO) that affect river WT as inputs to the implemented models.
[0105] In the present invention, the river WT, especially the Zhejiang River time series, of two selected sites were predicted for three different time periods, including one day, three days and five days in advance (i.e., t+1, t+3 and t+5). To achieve this goal, three simple prediction models, such as AdaBoost, LSTM and GRU, were initially developed. Then, three merging methods were proposed by coupling the signal decomposition method EEMD with the above simple models (i.e., EEMD-AdaBoost, EEMD-LSTM and EEMD-GRU). The performance evaluation of the simple models clearly shows that the deep learning-based LSTM and GRU can provide better Zhejiang River WT predictions compared with the tree-based AdaBoost. Similarly, the accuracy of the EEMD-LSTM and EEMD-GRU hybrid models is better than that of EEMD-AdaBoost. In addition, as the time span increases, the performance of the entire simple model and the hybrid model tends to deteriorate. In this regard, the models implemented at the t+1 and t+5 levels show the best and worst river WT predictions, respectively. The performance of the hybrid model can be used to predict other water quality variables of the Zhejiang River, including dissolved oxygen, conductivity and turbidity. The present invention uses the delays of available Zhejiang River data (such as SC, PH, Tu, DO, Q and WT) as input prediction factors.
[0106] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.
[0107] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0108] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A river water temperature detection method based on deep learning, characterized in that: The following steps are involved: Acquire water quality data of the area to be detected, and divide the river data into a training data set and a test data set, wherein the water quality data includes river water temperature, conductivity, pH value, turbidity, dissolved oxygen content and river flow; A hybrid model is constructed by using a signal decomposition algorithm, wherein the hybrid model includes an AdaBoost model, an LSTM model and a GRU model, AdaBoost represents adaptive boosting, LSTM represents long short-term memory, GRU represents a gated recurrent unit, and the signal decomposition algorithm includes an integrated empirical mode decomposition (EEMD) algorithm; The water quality data is input into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection.
2. The river water temperature detection method based on deep learning according to claim 1 is characterized in that: The calculation process of the Adaboost model includes: Distributing weights uniformly across all samples in the training dataset to initiate the learning process; Training a weak regressor based on the training data set; Using the current sample weight to train the weak regressor on the training data set and quantizing it using mean square error (MSE), and adjusting the mean square error (MSE) according to the current sample weight; Allocate the weight of the regressor corresponding to the training data set according to the mean square error MSE after training; After the weight calculation is completed, the algorithm updates the weight of the sample.
3. The river water temperature detection method based on deep learning according to claim 2 is characterized in that: After the weight calculation is completed, the algorithm updates the weight of the sample, including: A preset number of iterations are used or until a predefined termination condition is met. In each iteration, the weight of the sample is adjusted. The final prediction of the Adaboost model is obtained by adding the outputs of all weak regressors, and each regressor is weighted according to its importance.
4. The river water temperature detection method based on deep learning according to claim 1 is characterized in that: The LSTM model includes an input gate, an output gate and a forget gate. The input gate controls information to be passed to the storage unit according to the output and current input, the forget gate determines the update of the storage unit, and the output gate adjusts the information to be carried to the next step.
5. The river water temperature detection method based on deep learning according to claim 1 is characterized in that: The GRU model includes an update gate and a reset gate. The update gate acts as an input gate to forget the gate in the LSTM and decides whether the state information of the LSTM should be updated; the reset gate detects the amount of previous information to be retained or forgotten.
6. The river water temperature detection method based on deep learning according to claim 1 is characterized in that: The EEMD algorithm decomposes the original data into various oscillation modes according to the local characteristic time scale of the original data. The EEMD algorithm adds white noise to the original sequence and separates the original sequence into a trend term and multiple finite eigenmode functions (IMFs).
7. The river water temperature detection method based on deep learning according to claim 6 is characterized in that: The execution process of the EEMD algorithm includes: Set EEMD parameters, where the EEMD parameters include noise standard deviation, number of realizations, and maximum allowed number of screening iterations; A normally distributed white noise sequence with finite amplitude is added to the original signal to form a new sequence; Use the empirical mode decomposition algorithm to decompose the new series into finite eigenmode functions IMF and trend terms; Repeatedly forming new sequences and decomposing new sequences using different white noise sequences until a predetermined number of realizations is reached; The system average of the finite eigenmode functions (IMFs) in all realization orders is calculated to obtain the IMFs to eliminate mode mixing and obtain the final result.
8. The river water temperature detection method based on deep learning according to claim 1 is characterized in that: The root mean square error RMSE, mean absolute error MAE and determination coefficient R 2 , the corresponding expressions are: Among them, WT o,i , WT f,i represent the observed and predicted values of the ith river water temperature, respectively. The mean values of observed and predicted river water temperatures are shown respectively, and N represents the total number of observations.
9. A river water temperature detection system based on deep learning according to the river water temperature detection method based on deep learning according to any one of claims 1 to 8, characterized in that: include: A data acquisition module, used to acquire water quality data of the area to be detected, and divide the river data into a training data set and a test data set, wherein the water quality data includes river water temperature, conductivity, pH value, turbidity, dissolved oxygen content and river flow; A model building module, used to build a hybrid model using a signal decomposition algorithm, wherein the hybrid model includes an AdaBoost model, an LSTM model and a GRU model, AdaBoost represents adaptive boosting, LSTM represents long short-term memory, GRU represents a gated recurrent unit, and the signal decomposition algorithm includes an integrated empirical mode decomposition (EEMD) algorithm; The water temperature detection module is used to input the water quality data into the hybrid model for deep learning to obtain the predicted river water temperature to complete the river water temperature detection.