Method and device for monitoring carbon emission of thermal power plant by excavating deep time dependence
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XINJIANG UNIVERSITY
- Filing Date
- 2024-04-12
- Publication Date
- 2026-08-07
AI Technical Summary
然而,目前时间序列预测的研究中在深入提取时间依赖关系以及对时序数据进行有效的特征融合还存在一定的局限性
[0016](1)本发明提出了一种新颖的时间注意力,通过对时间注意力因子的计算实现对每个时间步注意力的量化,提取对预测更具有重要性的时间步信息;
Smart Images

Figure CN118332431B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multivariate time series forecasting technology, and in particular to a method and apparatus for monitoring carbon emissions from thermal power plants by mining deep time-dependent data. Background Technology
[0002] As major sources of greenhouse gases such as carbon dioxide, the accurate monitoring and effective management of emissions from thermal power plants provide policymakers with crucial data for developing and implementing emission reduction strategies, which is essential for achieving environmental sustainability and addressing global climate change. Furthermore, monitoring carbon emissions can promote the development and application of clean energy technologies, thereby gradually reducing dependence on fossil fuels, optimizing the energy structure, and driving a green economic transformation.
[0003] Gas emission data from thermal power plants collected using multi-source sensors is a type of multivariate time series data. Multivariate time series data typically contain multiple latent features, among which time dependence is a prevalent and important data feature. Focusing on time dependence is a prerequisite for building a prediction model with high accuracy and strong generalization performance. However, current research on time series forecasting still faces certain limitations in deeply extracting time dependencies and effectively fusing features from time series data.
[0004] Time dependence, as an important and widespread data feature of time series data, is a key factor in solving this problem when establishing a prediction framework. Therefore, in the feature fusion process, the time dependence of the sequence should take precedence, while other features of the time series data should be considered as secondary factors to assist time dependence and improve prediction accuracy. Summary of the Invention
[0005] This invention provides a method and apparatus for mining deep time dependencies to monitor carbon emissions from thermal power plants. The invention aims to mine deep time dependencies in time series data and effectively integrate these dependencies with other time-series features to achieve accurate prediction of carbon dioxide emissions, thereby formulating reasonable carbon emission strategies and reducing carbon emissions. Details are described below:
[0006] Firstly, a method for monitoring carbon emissions from thermal power plants by exploring deep time-dependent data, the method comprising:
[0007] The original feature data is analyzed and preprocessed, and the processed data is then fed into the temporal attention layer.
[0008] By performing attention analysis on each time step, significant attention is paid to key time steps, and information on time steps that are important for prediction is extracted and used as input data for TCN.
[0009] Historical statistical information is used as a linear correlation variable, and the linear correlation variable is combined with the preliminary time dependency extracted by TCN as input data in the seq2seq model.
[0010] In the seq2seq model, bidirectional long short-term memory is used to extract deep temporal dependencies in time series data; an encoding attention mechanism is employed; and AE is used as a predictor calibrator.
[0011] All hyperparameters depend on the results obtained by the Bayesian hyperparameter optimization algorithm, and the model parameters are adjusted by minimizing the loss to achieve accurate prediction of the target features;
[0012] The predicted results are compared with carbon emission thresholds, and reasonable carbon emission strategies are formulated based on the comparison results to achieve energy conservation and emission reduction.
[0013] In a second aspect, an apparatus for monitoring carbon emissions from thermal power plants by exploring deep time-dependent data, the apparatus comprising: a processor and a memory, the memory storing program instructions, the processor calling the program instructions stored in the memory to cause the apparatus to perform the method described in any of the first aspects.
[0014] Third aspect, a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described in any one of the first aspects.
[0015] The beneficial effects of the technical solution provided by this invention are:
[0016] (1) This invention proposes a novel time attention method, which quantifies the attention of each time step by calculating the time attention factor, and extracts time step information that is more important for prediction.
[0017] (2) This invention uses four modular methods to design an integrated prediction network framework based on deep learning. By extracting the deep temporal dependencies of time series data and fusing multiple exogenous temporal features and historical statistical information, the accuracy and robustness of the model prediction are improved. An autoencoder is used as a post-prediction processing method to improve the accuracy and robustness of the network. The entire prediction framework shows the best prediction effect on two carbon emission gas datasets.
[0018] (3) Finally, the prediction results are compared with the effective threshold for carbon emissions, and a reasonable carbon emission strategy is formulated based on the comparison results to achieve energy conservation and emission reduction. Attached Figure Description
[0019] Figure 1A flowchart of a method for monitoring carbon emissions from thermal power plants by exploring deep time-dependent data.
[0020] Figure 2 This is a diagram of the network structure of the temporal attention layer.
[0021] Figure 3 This is the network structure diagram of TCN;
[0022] Figure 4 Here is a diagram of the LSTM network structure;
[0023] Figure 5 Here is a diagram of the BiLSTM network structure;
[0024] Figure 6 A complete flowchart for multivariate time series forecasting;
[0025] Figure 7 A visualization of the single-step prediction results on two datasets;
[0026] Figure 8 A visualization of the three-step prediction results on the CO2Emission dataset;
[0027] Figure 9 A visualization of the 5-step prediction results on the CO2Emission dataset;
[0028] Figure 10 A visualization of the 7-step prediction results on the CO2Emission dataset. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below.
[0030] Currently, most prediction frameworks focus more on specific data characteristics (such as graph node information and linear features) than on the time dependencies of the data during their development. Such models suffer from low prediction accuracy and poor generalization. However, time dependencies, as the most important and widespread data feature of time series data, should be given special consideration when designing prediction methods, which represents a breakthrough in solving this problem.
[0031] Example 1
[0032] This invention proposes a deep learning method to predict carbon emissions from thermal power plants by mining deep temporal dependencies, named Neural Network Combination for Deeply Capturing Long-Term Dependencies in Time Series (NNEDCLTD). The core components of NNEDCLTD are a temporal attention layer, a temporal convolutional network (TCN), and a sequence-to-sequence (seq2seq) model. These three components work together to capture the deep temporal dependencies in time series data, ensuring that these dependencies dominate the feature vectors. Furthermore, NNEDCLTD includes three auxiliary methods: constructing historical statistical information (introducing linearly correlated variables into the model), an encoding attention layer (improving the decoder's interpretability of encoded data through encoding attention), and an autoencoder (AE) (achieving prediction calibration and improving model robustness), to enhance the predictive performance of NNEDCLTD for carbon emissions. Then, the predicted results are compared with effective carbon emission thresholds, and a reasonable carbon emission strategy is formulated based on the comparison results to achieve energy conservation and emission reduction.
[0033] like Figure 1 As shown, this invention provides a method for monitoring carbon emissions from thermal power plants by exploring deep time-dependent sedimentary sedimentation. The technical steps for solving this problem are as follows:
[0034] 101: First, perform data analysis and data preprocessing on the original feature data, and then send the processed data into the temporal attention layer of NNEDCLTD;
[0035] 102: The idea of time step attention is introduced into the time attention layer. By analyzing the attention of each time step, "significant attention" is achieved on key time steps, and time step information that is more important for prediction is extracted. The time step information will be used as input data for the temporal convolutional network (TCN).
[0036] 103: At the same time, historical statistical information is constructed to introduce linearly correlated variables into NNEDCLTD. The linearly correlated variables are combined with the preliminary time dependence extracted by TCN and used as input data in the sequence-to-sequence (seq2seq) model.
[0037] 104: The seq2seq model uses bidirectional long short-term memory (BiLSTM) to extract deep temporal dependencies in time series data;
[0038] 105: Improving the decoder's ability to interpret encoded data in a seq2seq model through encoding attention;
[0039] 106: Using the automatic encoder (AE) as a predictive calibrator improves the accuracy and robustness of NNEDCLTD predictions;
[0040] 107: All hyperparameters of NNEDCLTD strictly depend on the results obtained by the Bayesian hyperparameter optimization algorithm, and the model parameters are adjusted by minimizing the loss to achieve accurate prediction of the target features;
[0041] 108: Finally, the predicted results are compared with the effective carbon emission threshold, and a reasonable carbon emission strategy is formulated based on the comparison results to achieve energy conservation and emission reduction.
[0042] Among them, the network structures of temporal attention layer, TCN, LSTM, and BiLSTM are as follows: Figure 2 , Figure 3 , Figure 4 and Figure 5 As shown.
[0043] In summary, the embodiments of the present invention mine deep temporal dependencies in time series data and effectively integrate these dependencies with other time series features to achieve accurate prediction of carbon emissions. This enables monitoring and early warning of carbon emissions from thermal power plants, allowing for the formulation of reasonable carbon emission strategies and the realization of energy conservation and emission reduction.
[0044] Example 2
[0045] The scheme in Example 1 will be further described below with specific calculation formulas and examples:
[0046] Furthermore, in step 101, before the multivariate time series data is input into the time attention layer of NNEDCLTD, the target series is subjected to the ADF test, Ljung-Box test, and Jarque-Bera test to examine the stability, autocorrelation, and whether it conforms to a normal distribution. For the seasonality of the time series, the autocorrelation function (ACF) is used for analysis.
[0047] For datasets with missing values, forward imputation is used to complete the data, and the data in all datasets are normalized using the maximum and minimum values. The calculation formula is shown below:
[0048]
[0049] For datasets requiring denoising, wavelet transform is used for data denoising. A sliding window prediction method is employed, and cross-validation is used to evaluate the prediction model. The dataset is split into training, validation, and test sets in an 8:1:1 ratio along the time dimension.
[0050] Furthermore, in step 102, the temporal attention layer can assign different weights to the data at each time step to extract time step information that is more important for prediction. First, the temporal attention factor is defined. for:
[0051]
[0052] Where t∈T, the input data F represents the number of input features. It can be obtained through the following formula:
[0053]
[0054] Where tanh(·) is the hyperbolic tangent activation function. These are learnable weights. These are learnable biases, which can all be obtained through fully connected layers. In addition, a batch normalization layer (BatchNorm) is added before the activation function tanh(·) to accelerate model convergence. After that, a temporal dropout layer is added to introduce regularization and prevent the model from overfitting.
[0055] Next, the time attention factor Normalization is performed in the time dimension using the softmax function to obtain the normalized time attention factor Att. t for:
[0056]
[0057]
[0058] The output of the temporal attention layer is then obtained through residual connections:
[0059]
[0060] in, This represents the Hadamard product. and The time attention factors corresponding to time steps i and j are respectively. It is the output of the temporal attention layer, carrying the degree of importance that NNEDCLTD attaches to each time step.
[0061] Furthermore, in step 103, the H-dimensional historical statistical information constructed from the target sequence includes:
[0062]
[0063] Within each time window, the mean, median, maximum, minimum, variance, and first-order lag correlation coefficient of historical data are constructed as historical statistical information features H. These historical statistical features will be used as inputs at specific locations in NNEDCLTD.
[0064] Furthermore, in step 104, the TCN will use the output X of the temporal attention layer... t As input, its corresponding convolution input is k is the number of hidden features of the convolutional layer, and the spatiotemporal feature variables of the time series are obtained by temporal convolution, thus initially extracting the temporal dependence of the time series.
[0065] Among them, the output spatiotemporal variables of TCN Compared with historical statistics Perform feature-level fusion to obtain vectors S = F + H, where S will be used as the input variable of the encoder in the seq2seq model.
[0066] In the seq2seq model, the encoder and decoder use different network structures: the encoder uses a BiLSTM, while the decoder uses a two-layer LSTM. Assume the encoder's output at the last time step is... Memory cells Where C ed It is the number of hidden features of the encoder and decoder, 2C ed This is because the encoder uses a bidirectional structure, and the number of output features is twice the number of hidden features. The decoder receives the memory cells and hidden outputs from the encoder's last time step as the initial values for the decoder's memory cells and hidden states, therefore:
[0067]
[0068]
[0069] Here, fc(·) represents a linear layer function. Since the decoder is a two-layer structure, the hidden feature dimension is only half that of the two-way structure. Therefore, a linear function is needed to align the memory cells and hidden state feature dimensions of the encoder and decoder.
[0070] The output y0 of the encoder's hidden layer is used as the initial hidden value of the decoder, and y0 can flow through the memory cells in the decoder to the LSTM network units at all time steps, realizing the decoding output at each time step. The first input of the decoder is a start signal (usually all zeros).
[0071] Furthermore, in step 105, introducing encoding attention into the seq2seq model is to enable the decoder to better mine the historical information of the encoder. Since the input of the decoder is the encoded output y0 of the encoder's last time step, although y0 carries the historical information of the entire time step, considering the gradient vanishing or gradient exploding that may occur in long sequence encoding, introducing the importance of the hidden outputs of all time steps of the encoder to the decoder output can, to some extent, offset such problems. First, assume that the hidden outputs of all time steps of the encoder are:
[0072]
[0073] The output of the LSTM unit at the current time step of the decoder is t∈P, where P is the desired prediction time range, and the attention factor for time step t of the decoder is:
[0074]
[0075] Then α t The calculation is as follows:
[0076] α t =h Dt ·(tanh(W α1 (h Et ) T ))
[0077] Where T is the transpose operation, W α1 These are learnable weights that can be obtained through linear layers. The seq2seq coupled attention process is similar to the temporal attention process, adding a batch normalization layer (BatchNorm) before the activation function tanh(·) to accelerate model convergence, followed by a temporal dropout layer to introduce regularization.
[0078] Next, the attention factor α t Normalization is performed using the softmax function over the time dimension:
[0079]
[0080] Obtain the normalized attention factor:
[0081]
[0082] Then through a linear layer Feature dimensions and network feature dimensions C ed If aligned, then:
[0083]
[0084] Then through attention factor ATTt With the encoder unit output h Et Obtain attention encoding vector for:
[0085]
[0086] Finally, the decoder outputs h from the unit at the current time step t. Dt With attention encoding vector c t Combined, and then passed through a linear layer to obtain the final output:
[0087]
[0088] Where Z is the expected number of predicted features. The output at the current time step... It is also used as the input data y of the LSTM unit in the next time step. t+1 This process is repeated until the output of the decoder at all time steps is obtained. Note that the training method commonly used in seq2seq models, such as teacher-forced or planned sampling, is not used here. Instead, the model is trained using autoregressive decoding.
[0089] Furthermore, in step 106, AE (Advanced Effect) is used as a data post-processing method. The aim is to eliminate system noise introduced by the prediction system and improve the accuracy and robustness of the prediction network through data reconstruction using AE. The training of the prediction network and the training of AE are two independent processes; the training data for AE comes from the output values of the prediction network. and the feature input of the prediction network The fusion result is obtained by first truncating the feature input S along the time dimension from back to front to a length P, thus obtaining... Next, the output values P and x sp Data is fused by concatenating along the feature dimensions to obtain the feature input of the AE network. L = S + Z. The encoder and decoder in AE use the same network structure—BiLSTM—and the same number of hidden features. The AE network can be represented by the following formula:
[0090] O AE =fc(f D (f E (x AE )))
[0091] Among them, f E (·), f D (·) represent the encoder and decoder respectively, and fc(·) represents the output linear layer. The purpose of using a linear layer for output is to fuse multiple hidden features in the prediction network into Z output features. This represents the final calibration output, which is also the final output of the entire prediction network. It represents the predicted values for Z features at P future time steps.
[0092] Furthermore, in step 107, the hyperparameters of all models are the optimal set of parameters obtained through the Bayesian optimization algorithm. Using the RMSE metric as a benchmark on the validation set, the set of hyperparameters corresponding to the minimum RMSE value during the search process is considered the optimal parameter set for the model. To ensure the fairness of the comparative experiments, the number of searches in the Bayesian optimization algorithm and the search space for common parameters such as the input time step N and the random number seed are kept consistent across all models. For example, the input time step N ∈ {5, 6, ..., 35}, and the random number seed ∈ {0, 1, ..., 500}, etc., are all set empirically. The purpose of optimizing the hyperparameters of all models here is to compare the optimal performance of each model on the same prediction task.
[0093] In training the prediction network, the mean squared error (MSE) and mean absolute error (MAE) are used as loss functions, and these loss functions are optimized as hyperparameters. The calculations for MSE and MAE are shown in the following equations:
[0094]
[0095]
[0096] Where n represents the number of samples, which is also the batch size. It is the actual value. These are the model's predicted values.
[0097] The loss function used for training the AE network is a linear fusion of MSE and MAE, and the second difference between the true and predicted values is used as a time-dependent term, which, along with the loss function, serves as the objective function to optimize the model. The aim is to capture abrupt changes in the time series through the second difference, allowing the AE to more accurately calibrate the predicted data. The loss function is shown below:
[0098]
[0099] Where C is the fusion scaling factor for the MSE and MAE loss functions. Let represent the second-order difference, and λ represent the smoothing factor. The adaptive moment estimator (Adam) optimizer is used to optimize the model. It is adaptive to different learning rates and can effectively balance convergence speed and stability.
[0100] Four commonly used metrics are employed to evaluate the predictive performance of NNEDCLTD: root mean square error (RMSE), mean absolute error (MAE), symmetric mean absolute percentage error (SMAPE), and coefficient of determination R0. 2 Among them, SMAPE and R 2 The calculation formula is as follows:
[0101]
[0102]
[0103] Among them, RMSE and MAE represent the error between the model's predicted values and the actual values. The closer RMSE and MAE are to 0, the smaller the model's prediction error. SMAPE measures the percentage error between the predicted and actual values. The smaller the value, the better the model's predictive performance. A SMAPE of 0% indicates a perfect model. 2 The metric measures how well a model's predictions fit the real data, and its value ranges from 0 to 1. R0 2 The closer the value is to 1, the stronger the model's ability to interpret the observed data and the higher its fit. In the following text, R² will be used instead of R. 2 index.
[0104] Further, in step 108, the predicted results are compared with the effective carbon emission threshold to obtain the monitoring and early warning variables. The effective carbon emission threshold is the maximum carbon content per unit volume in the flue gas emitted by thermal power plants, calculated by domain experts using the carbon emission indicators available to the plants. Assuming it is ε, the emission difference is defined as... The comparison formula is:
[0105]
[0106]
[0107] in, It is the predicted value per unit time in the future, α i <0 and β i >0 represents the threshold value for each warning level, st indicates the limiting condition, and ρ is the monitoring and warning variable, which has n different warning levels. The larger the value of ρ, the stronger the warning level. When the value is 0, it indicates that the carbon emissions per unit time in the future are within the normal range, and no warning is needed. When 0 < ρ ≤ n, it indicates that the carbon emissions per unit time in the future will exceed the standard value. At this time, the system needs to report this phenomenon to the manager, who will formulate reasonable emission reduction strategies to reduce carbon dioxide emissions based on the warning level.
[0108] In summary, the embodiments of the present invention compare the predicted results with the effective threshold for carbon emissions, monitor and warn of carbon dioxide emissions from thermal power plants based on the comparison results, and achieve energy conservation and emission reduction by formulating reasonable carbon emission strategies, thereby contributing to environmental sustainability and addressing global climate change.
[0109] Example 3
[0110] The theoretical discussion of the complete technical solution of the embodiments of the present invention has been described in detail above, and will not be repeated here. The following will describe in detail the implementation process of the prediction framework proposed in this invention.
[0111] like Figure 6 As shown, Figure 6 This is a complete flowchart of multivariate time series forecasting. First, data preprocessing is performed. For datasets with missing values, forward imputation is used, and max-min standardization is applied to all data. For datasets requiring denoising, wavelet transform is used. A sliding window forecasting method is employed, and cross-validation is used to evaluate the forecasting model. The dataset is then split along the time dimension into training, validation, and test sets in an 8:1:1 ratio.
[0112] Before inputting predictive data into the model, stationarity analysis of the data is necessary. If the input data does not meet the stationarity requirement, it indicates the presence of significant random noise or other uncertainties. Such input data can lead to difficulties in prediction and low prediction accuracy. Therefore, data that does not meet the stationarity requirement needs to undergo further preprocessing until it meets the requirement before being input into the predictive model. The stationarity test is performed using the ADF test method, analyzing the correlation characteristics of the data at a 5% significance level. A p-value less than 0.05 rejects the null hypothesis, while a p-value greater than or equal to 0.05 accepts it.
[0113] After data preprocessing and meeting the stationarity requirement, the raw data is fed into the prediction model. The design of the prediction model is the core of this invention, and its detailed results are as follows: Figure 1 This paper presents a deep learning method for predicting carbon emissions from thermal power plants by mining deep time dependencies. Before model training, the initial hyperparameters of the model need to be optimally estimated. In this embodiment, the optimal parameter set obtained by the Bayesian optimization algorithm is used. On the validation set, the RMSE index is used as a reference. The set of hyperparameters corresponding to the minimum RMSE value during the search process is the optimal parameter set of the model. The hyperparameters of all models are optimized to compare the optimal performance of each model on the same prediction task.
[0114] After model training, the residuals between the predicted network's output and the true values need to be tested for white noise. For an excellent sequence prediction model, the residuals between the predicted and true values should be a white noise sequence, meaning there is no correlation. If the residuals are not a white noise sequence and exhibit autocorrelation, it indicates that the prediction model failed to capture certain systematic and repetitive structures in the data during the prediction process, and did not fully explore the interrelationships between multivariate time series data. In this case, the predictive performance of the model needs improvement. Therefore, for residuals that still exhibit autocorrelation, we should return to the model design process and consider introducing more complex time series models, adding more feature engineering, or adjusting the model's hyperparameters to improve the model's predictive performance until the output residuals are white noise.
[0115] The Ljung-Box test is used to test the white noise of the predicted residuals. The basic idea is to construct a test statistic by summing the squares of the sample autocorrelation coefficients of the time series. This statistic is used to test whether the autocorrelation coefficients of all lag orders of the time series are jointly zero, i.e., whether the time series is white noise. The test formula is shown below:
[0116]
[0117] Where n is the sample size of the time series data, h is the maximum lag order to be considered, and ρ is the maximum lag order to be considered. k It is the estimated value of the k-th lag term of the autocorrelation function (ACF) of the time series data.
[0118] Finally, the post-processing of the prediction involves using an autoencoder (AE) as a prediction calibrator, as mentioned in this embodiment of the invention. The aim is to eliminate system noise introduced by the prediction system through data reconstruction using the AE, thereby improving the accuracy and robustness of the prediction network. The entire training process of the prediction network involves minimizing the loss function using an adaptive moment estimator (Adam), continuously adjusting the network parameters to fit the data trend, and achieving the prediction of future trends in time-series data.
[0119] Example 4
[0120] This invention employs two different datasets involving carbon content prediction to validate the performance of the proposed prediction network. These two different datasets are:
[0121] CO2 Emission: This dataset, collected by the UCI public dataset website, contains flue gas emission data from a gas turbine in a thermal power plant in northwestern Turkey. It includes four years of observation data, with the time unit being one hour, and a total of 36,733 data points. The dataset includes 11 feature attributes, such as CO2, NO, NO2 emissions, and gas turbine parameters. CO2 emissions are used as the target sequence, and the remaining feature vectors are used as exogenous variables input into the model. The batch size is set to 128.
[0122] GasSensor: This dataset is a measurement dataset of different gas concentration levels in a gas mixture provided by the Kaggle public dataset website. It is a time series obtained through 16 chemical sensors, including measurement feature vectors of 16 gases such as CO2, NO2, ethylene, and methane. The measurement frequency is 100Hz, and it contains a total of 4,178,504 data points. The first 200,000 data points were used for experiments, with CO2 content as the target sequence and the remaining feature vectors as exogenous variables input into the model. The batch size was set to 128.
[0123] Table 1 shows the single-step prediction results of all methods on the two datasets.
[0124] Table 1
[0125]
[0126] Figure 7 This is a visualization of the NNEDCLTD model's single-step prediction results on two datasets.
[0127] Table 1 lists nine state-of-the-art (SOTA) algorithms used as comparison algorithms in the experiments. These include traditional algorithms based on statistical theory (ARIMA), machine learning-based algorithms (SVR, XGBoost), deep learning-based baseline algorithms (LSTM, TCN), and advanced prediction models based on deep learning ensemble frameworks similar to the NNEDCLTD model (DMSnet, DA-BiSRU, SUR-TSMAE, TCN-BiLSTM). According to the experimental results in Table 1, the NNEDCLTD model proposed in this embodiment demonstrates the best prediction performance on both datasets. On the CO2Emission dataset, NNEDCLTD reduces the RMSE value by 10.70% compared to the best baseline model LSTM and by 2.90% compared to the best-in-class method SUR-TSMAE (calculated by using the RMSE value of the comparison model as the denominator and the RMSE difference between NNEDCLTD and the comparison model as the numerator). On the GasSensor dataset, the NNEDCLTD model reduces the RMSE value by 25.32% compared to the best baseline method ARIMA and by 23.30% compared to the best-in-class method DA-BiSRU. On the GasSensor dataset, the statistical theory-based ARIMA method outperforms deep learning-based prediction models such as SUR-TSMAE and TCN-BiLSTM, indicating that the data characteristics of the GasSensor dataset are predominantly linear, while ARIMA is more sensitive to these linear features. Furthermore, on both datasets, it can be observed that prediction models based on deep learning ensemble frameworks generally outperform traditional machine learning methods and deep learning-based baseline methods, further demonstrating the superiority of deep learning ensemble frameworks in modeling data characteristics.
[0128] Furthermore, Table 1 shows the prediction time for each method, all using the same hardware. Compared to the training and optimization times of each model, the prediction time is more noteworthy. From an industrial perspective, prediction is an integral part of industrial production, emphasizing real-time performance, while model training can be completed offline and does not affect industrial production. In terms of results, SVR and XGBoost excel in real-time prediction performance due to their smaller parameter count and parallel data processing. ARIMA performs the worst in real-time performance because it is a sequential model; its parameter estimation and sequence prediction strictly depend on the sequential nature of the time series, resulting in the longest prediction time. The NNEDCLTD model performs at a moderate level in real-time prediction performance.
[0129] Table 2 shows the white noise test results of the residuals between the predicted results and the actual data (Ljung-Box test at a significance level of 0.05).
[0130] Table 2
[0131]
[0132] According to the test results in Table 2, only NNEDCLTD's prediction residuals are white noise sequences across all datasets, showing no correlation. This indirectly proves the superiority of the NNEDCLTD model. Furthermore, the test results show that all models have the best fit on the CO2Emission dataset, with most models' prediction residuals being white noise sequences. However, the fit on the GasSensor dataset is poor, with most models' prediction residuals not meeting the white noise sequence requirement. Specifically, SVR and XGBoost's residuals on both datasets do not meet the white noise sequence condition.
[0133] Table 3 shows the 3-step prediction results of all methods on the two datasets.
[0134] Table 3
[0135]
[0136]
[0137] Table 4 shows the 5-step prediction results of all methods on the two datasets.
[0138] Table 4
[0139]
[0140] Table 5 shows the 7-step prediction results of all methods on the two datasets.
[0141] Table 5
[0142]
[0143] Based on the experimental results in Tables 3, 4, and 5, the NNEDCLTD model still achieved the best prediction performance on both datasets, indicating that the prediction model of this invention is also competitive in long-term carbon emission prediction. Figure 8 , Figure 9 , Figure 10 The visualization shows the NNEDCLTD model's prediction results 3, 5, and 7 steps ahead on the CO2Emission dataset. According to the results in the figure, the NNEDCLTD model can still achieve good prediction results in multi-step prediction tasks.
[0144] The visualization of the prediction results shows the effective threshold ε for carbon emissions, and the values are interpolated based on the predicted values and ε. To determine the warning level. The purpose of establishing warning levels is to mitigate the impact of forecast errors. Since forecasts are never 100% accurate, relying solely on a single threshold ε to determine warnings can lead to erroneous warnings and wasted resources. Adding warning levels makes the warning process more flexible, allowing managers to configure warning levels and allocate resources more flexibly to reduce carbon emissions.
[0145] Example 5
[0146] A device for monitoring carbon emissions from thermal power plants based on deep time-dependent analysis, comprising a processor and a memory, wherein the memory stores program instructions, and the processor invokes the program instructions stored in the memory to cause the device to execute the following method steps in Embodiment 1:
[0147] The original feature data is analyzed and preprocessed, and the processed data is then fed into the temporal attention layer.
[0148] By performing attention analysis on each time step, significant attention is paid to key time steps, and information on time steps that are important for prediction is extracted and used as input data for TCN.
[0149] Historical statistical information is used as a linear correlation variable, and the linear correlation variable is combined with the preliminary time dependency extracted by TCN as input data in the seq2seq model.
[0150] In the seq2seq model, bidirectional long short-term memory is used to extract deep temporal dependencies in time series data; an encoding attention mechanism is employed; and AE is used as a predictor calibrator.
[0151] All hyperparameters depend on the results obtained by the Bayesian hyperparameter optimization algorithm, and the model parameters are adjusted by minimizing the loss to achieve accurate prediction of the target features;
[0152] The predicted results are compared with the carbon emission thresholds, and reasonable carbon emission strategies are formulated based on the comparison results to achieve energy conservation and emission reduction.
[0153] The time attention layer assigns different weights to the data at each time step, defining a time attention factor. for:
[0154]
[0155] Where T represents the time step of the input data, t∈T, and F represents the number of input features.
[0156]
[0157] Where tanh(·) is the hyperbolic tangent activation function. These are learnable weights. It is a learnable bias, which incorporates the time attention factor. Normalization is performed in the time dimension using the softmax function to obtain the normalized time attention factor Att. t for:
[0158]
[0159]
[0160] The output of the temporal attention layer is then obtained through residual connections:
[0161]
[0162] in, This represents the Hadamard product. It is the output of the time attention layer. and These are the time attention factors corresponding to time steps i and j, respectively.
[0163] The historical statistical information includes: H-dimensional historical statistical information constructed from the target sequence.
[0164]
[0165] Within each time window, the mean, median, maximum, minimum, variance, and first-order lag correlation coefficient of historical data were constructed as historical statistical information features H.
[0166] Among them, the output spatiotemporal variables of TCN Compared with historical statistics Perform feature-level fusion to obtain vectors Where S = F + H, S will be used as the input variable of the encoder in the seq2seq model;
[0167] In a seq2seq model, the decoder receives the memory cells and hidden outputs from the encoder's last time step, which serve as the initial values for the decoder's memory cells and hidden states.
[0168]
[0169]
[0170] Where fc(·) represents the linear layer function, C ET c represents the memory cell output at the last time step of the encoder. D0 Indicate C ET The linear transformation output, hET C represents the hidden output of the encoder at the last time step. ed This represents the number of hidden features in the encoder and decoder;
[0171] The output y0 of the encoder's hidden layer is used as the initial hidden value of the decoder, and y0 flows through the memory cells in the decoder to the LSTM network units at all time steps to achieve the decoding output at each time step.
[0172] The encoding attention mechanism employed is as follows:
[0173] The hidden output of the encoder at all time steps is:
[0174]
[0175] The output of the LSTM unit at the current time step of the decoder is t∈P, where P is the desired prediction time range, and the attention factor for time step t of the decoder is:
[0176]
[0177] Then α t The calculation is as follows:
[0178] α t =h Dt ·(tanh(W α1 (h Et ) T ))
[0179] Where T is the transpose operation, W α1 These are learnable weights, obtained through linear layers. A batch normalization layer is added before the activation function tanh(·), followed by a temporal dropout layer to introduce regularization, and the attention factor α is adjusted. t Normalization is performed using the softmax function over the time dimension:
[0180]
[0181] Obtain the normalized attention factor:
[0182]
[0183] Then through a linear layer Feature dimensions and network feature dimensions C ed If aligned, then:
[0184]
[0185] Through Attention Factor ATT t With the encoder unit output hEt Obtain attention encoding vector for:
[0186]
[0187] Output h from the unit at the current time step t of the decoder. Dt With attention encoding vector c t Combined, the final output is obtained through a linear layer:
[0188]
[0189] Where Z is the expected number of predicted features, representing the output of the current time step. It is also used as the input data y of the LSTM unit in the next time step. t+1 Finally, the output of the decoder at all time steps is obtained.
[0190] Where AE is used as the prediction calibrator:
[0191] The feature input S is truncated along the time dimension from back to front to obtain a length P. Compare the output values P and x sp Data is fused by concatenating along the feature dimension to obtain the feature input of the AE network. L = S + Z, and the encoder and decoder in AE use the same network structure—BiLSTM and the same number of hidden features.
[0192] O AE =fc(f D (f E (x AE )))
[0193] Among them, f E (·), f D (·) represent the encoder and decoder respectively, and fc(·) represents the output linear layer. This indicates the final calibration output.
[0194] The loss function is:
[0195]
[0196] Where C is the fusion scaling factor for the MSE and MAE loss functions. Represents the second-order difference, y i Represents the true value. λ represents the predicted value, and λ represents the smoothing factor.
[0197] The carbon emission comparison formula is as follows:
[0198]
[0199]
[0200] Here, ε is the effective carbon emission threshold, which is the maximum carbon content per unit volume in the flue gas emitted by thermal power plants, calculated by experts in the field using the carbon emission indicators available to thermal power plants. The difference in emissions. It is the predicted value per unit time in the future, α i <0 and β i >0 represents the threshold value for each warning level, st indicates the limiting condition, and ρ is the monitoring and warning variable, which has n different warning levels. The larger the value of ρ, the stronger the warning level. When the value is 0, it indicates that the carbon emissions per unit time in the future are within the normal range, and no warning is needed. When 0 < ρ ≤ n, it indicates that the carbon emissions per unit time in the future will exceed the standard value. At this time, the system needs to report this phenomenon to the manager, who will formulate reasonable emission reduction strategies to reduce carbon dioxide emissions based on the warning level.
[0201] It should be noted that the device descriptions in the above embodiments correspond to the method descriptions in the embodiments, and the embodiments of the present invention will not be repeated here.
[0202] The execution entities of the aforementioned processor and memory can be devices with computing functions such as computers, microcontrollers, and single-chip microcomputers. In specific implementations, the embodiments of the present invention do not limit the execution entities and can select them according to the needs of actual applications.
[0203] Data signals are transmitted between the memory and the processor via a bus, which will not be elaborated upon in this embodiment of the invention.
[0204] Example 6
[0205] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium, the storage medium including a stored program, which, when the program is running, controls the device where the storage medium is located to execute the method steps in the above embodiments.
[0206] The computer-readable storage medium includes, but is not limited to, flash memory, hard disk, solid-state drive, etc.
[0207] It should be noted that the description of the readable storage medium in the above embodiments corresponds to the description of the method in the embodiments, and the embodiments of the present invention will not be repeated here.
[0208] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated.
[0209] A computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in or transmitted through a computer-readable storage medium. A computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic or semiconductor, etc.
[0210] Unless otherwise specified, the model numbers of the various devices in this embodiment of the invention are not limited, and any device that can perform the above functions is acceptable.
[0211] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0212] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for monitoring carbon emissions from thermal power plants by exploring deep time-dependent sedimentary ... The method includes: The original feature data is analyzed and preprocessed, and the processed data is then fed into the temporal attention layer. By performing attention analysis on each time step, significant attention is paid to key time steps, and information on time steps that are important for prediction is extracted and used as input data for TCN. Historical statistical information is used as a linear correlation variable, and the linear correlation variable is combined with the preliminary time dependency extracted by TCN as input data in the seq2seq model. In the seq2seq model, bidirectional long short-term memory is used to extract deep temporal dependencies in time series data; an encoding attention mechanism is employed; and AE is used as a predictor calibrator. All hyperparameters depend on the results obtained by the Bayesian hyperparameter optimization algorithm, and the model parameters are adjusted by minimizing the loss to achieve accurate prediction of the target features; Compare the predicted results with carbon emission thresholds, and formulate reasonable carbon emission strategies based on the comparison results to achieve energy conservation and emission reduction. The time attention layer assigns different weights to the data at each time step, defining a time attention factor. for: ; in, Indicates the time step of the input data. , This represents the number of input features and the input data. ; ; in, It is the hyperbolic tangent activation function. , These are learnable weights. It is a learnable bias, which incorporates the time attention factor. Normalization is performed in the time dimension using the softmax function to obtain the normalized time attention factor. for: ; ; The output of the temporal attention layer is then obtained through residual connections: ; in, This represents the Hadamard product. It is the output of the time attention layer. and These are the corresponding time steps. and The time attention factor; The output spatiotemporal variables of the TCN Compared with historical statistics Perform feature-level fusion to obtain vectors ,in ,Will As input variables for the encoder in a seq2seq model; In a seq2seq model, the decoder receives the memory cells and hidden outputs from the encoder's last time step, which serve as the initial values for the decoder's memory cells and hidden states. ; ; in, Represents a linear layer function. This represents the output of the memory cell at the last time step of the encoder. express The linear transformation output, This represents the hidden output of the encoder at the last time step. This represents the number of hidden features in the encoder and decoder; The output of the encoder's hidden layer As the initial hidden value for the decoder, and The memory cells in the decoder flow to the LSTM network units at all time steps, thus achieving the decoding output at each time step; The encoded attention mechanism is as follows: The hidden output of the encoder at all time steps is: ; The output of the LSTM unit at the current time step of the decoder is , , It is the expected prediction time range, decoder time step. The attention factor is: ; but The calculation is as follows: ; in, For transpose operation, These are learnable weights, obtained through linear layers, and applied to the activation function. Previously, a batch normalization layer was added; now, a time dropout layer is added to introduce regularization and adjust the attention factor. Normalization is performed using the softmax function over the time dimension: ; Obtain the normalized attention factor: ; Then through a linear layer Feature dimensions and network feature dimensions If aligned, then: ; Through attention factors With encoder unit output Obtain attention encoding vector for: ; Decode the current time step Unit output With attention encoding vector Combined, the final output is obtained through a linear layer: ; in, It is the expected number of predicted features, which will be the output of the current time step. It also serves as the input data for the LSTM unit in the next time step. Finally, the output of the decoder at all time steps is obtained. .
2. The method for monitoring carbon emissions from thermal power plants through deep geological time-dependent analysis according to claim 1, characterized in that, The historical statistical information is constructed from the target sequence. Historical statistics: ; Within each time window, the mean, median, maximum, minimum, variance, and first-order lag correlation coefficient of historical data were constructed as historical statistical information features. .
3. The method for monitoring carbon emissions from thermal power plants through deep geological time-dependent analysis according to claim 1, characterized in that, The use of AE as a prediction calibrator is as follows: Input features Truncate along the time dimension from back to front to obtain length ,get Output value and Data is fused by concatenating along the feature dimension to obtain the feature input of the AE network. , In AE, the encoder and decoder use the same network structure—BiLSTM—and the same number of hidden features; ; in, , These represent the encoder and decoder, respectively. Indicates the linear layer of the output. This indicates the final calibration output.
4. The method for monitoring carbon emissions from thermal power plants through deep geological time-dependent analysis according to claim 1, characterized in that, The loss function is: ; in, It is the fusion scaling factor for the MSE and MAE loss functions. Indicates the second-order difference. Represents the true value. Indicates the predicted value. This represents the smoothing factor.
5. The method for monitoring carbon emissions from thermal power plants through deep geological time-dependent analysis according to claim 1, characterized in that, The comparison formula is: ; ; in, It is the effective threshold for carbon emissions. The difference in emissions. It is a predicted value per unit of time in the future. and These are the threshold values for each warning level. Indicates a restriction condition. It is a monitoring and early warning variable, it has Different warning levels, The higher the value, the stronger the warning level.
6. A device for monitoring carbon emissions from thermal power plants based on deep geological time dependence, characterized in that, The device includes a processor and a memory, the memory storing program instructions, the processor invoking the program instructions stored in the memory to cause the device to perform the method according to any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described in any one of claims 1-5.