Carbon emission monitoring method and system
By segmenting, decomposing the trend-seasonal terms, and performing dual clustering on the multivariate time series of carbon emissions monitoring from thermal power plants, combined with spatiotemporal collaborative attention prediction, the problems of cross-scale dynamic characteristics and computational complexity in existing technologies have been solved, achieving efficient and accurate carbon emissions monitoring.
Patent Information
- Application Number
- CN202511066692.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-21
AI Technical Summary
Existing carbon emission monitoring methods cannot accurately capture cross-scale dynamic characteristics and physical constraints in thermal power plants, resulting in large prediction errors and high computational complexity, making it difficult to meet the requirements of real-time performance and low resource consumption in industrial scenarios.
By segmenting multivariate time series data, performing trend-seasonal decomposition, and enhancing dual clustering features in both time and channel dimensions, combined with spatiotemporal collaborative attention prediction, computational complexity is reduced and prediction reliability is improved.
It achieves improved accuracy and real-time performance of carbon emission monitoring while reducing computational complexity, adapts to the complexity of multi-scale coupling, and meets the stringent requirements of industrial scenarios.
Smart Images

Figure CN120995267A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of carbon emission monitoring technology, specifically to a method and system for monitoring carbon emissions. Background Technology
[0002] Global warming is mainly caused by greenhouse gas emissions, especially excessive emissions of carbon dioxide (CO2). Fossil energy consumption in high-emission industries such as electricity, cement, and steel is the main source. The electricity industry, especially thermal power plants, is a high-energy-consuming and high-emission sector, and its greenhouse gas emissions account for a relatively high proportion. Therefore, monitoring carbon emissions generated during electricity production is of great significance for achieving energy conservation and emission reduction goals.
[0003] Traditional carbon monitoring methods rely heavily on statistical methods or empirical formulas. However, in actual operation, when power generation equipment ages, energy structure is fine-tuned, or the operating status of environmental protection facilities changes, traditional monitoring cannot accurately capture fluctuations in carbon emissions, leading to prediction errors and making it difficult to meet the needs of precise control.
[0004] In recent years, the rapid development of deep learning technology has opened up new paths for time series prediction. For example, in related technologies, the patent application document with publication number CN116754722A proposes to use a neural network model to predict carbon emission data. However, existing time series prediction technologies have some limitations in the field of carbon emission prediction, such as: (1) Multi-scale modeling defects: In the scenario of carbon emission monitoring in thermal power plants, the change of carbon emission shows typical cross-scale dynamic characteristics. Although traditional methods such as WaveNet model can capture local time series dependence, they cannot explicitly model the cross-scale dynamic mechanism of carbon emission change. For example, the macro-scale fluctuation of carbon emission is affected by the fine adjustment of energy structure or the operating status of environmental protection facilities, while the micro-scale fluctuation is mainly affected by operating parameters such as coal particle size and primary wind pressure. Existing single-scale models are difficult to distinguish the driving factors of the two. (2) Lack of physical constraints: Although the prediction model based on LSTM can learn the statistical law of data, the model accuracy is not high and the prediction error is larger than the physical simulation result. (3) Although Transformer-type models have advantages in accuracy, the computational load is too high. Its self-attention complexity is O(T 2 When the history window T=96, a single inference requires 1.2GB of memory, which far exceeds the real-time processing capability of edge devices (such as Jetson TX2, 8GB RAM), making it difficult to apply to real-time scenarios.
[0005] The recently proposed PatchTST (Patch Time Series Transformer) significantly reduces the computational complexity of the model by cutting long sequences into semantically informative local sub-blocks, while enhancing the ability to extract refined local features. For example, the paper "A Multivariate Time Series Prediction Method Integrating Local and Global Correlation, First Published Online in *Computer Applications*" mentions dividing the input time series into fixed-length patch sequences to maintain the locality of the time series. At the same time, the reduced length of the input sequence after division can effectively reduce time and space complexity. However, this single-scale division strategy is difficult to adapt to the complexity of multi-scale coupling in carbon emission prediction.
[0006] Furthermore, although the partitioning strategy reduces the computational burden, the mainstream model (Transformer) still has tens of millions of parameters, facing memory overflow and latency issues when deployed on embedded devices. Taking a provincial power grid edge monitoring node as an example, the existing model requires more than 16GB of GPU memory to process 96 hours of historical data, while the actual hardware configuration is usually less than 8GB. This forces enterprises to adopt compromise solutions such as downsampling or feature pruning, sacrificing prediction accuracy for feasibility. At the same time, the contradiction between the stringent real-time requirements of industrial scenarios (such as sub-second response) and model complexity is further highlighted. Existing methods have not yet made a breakthrough in balancing accuracy and efficiency, and the engineering adaptability of the models also faces severe challenges. Summary of the Invention
[0007] The technical problem to be solved by this invention is how to reduce computational complexity while enhancing the reliability of carbon emission monitoring, so as to meet the stringent requirements of industrial scenarios for real-time inference and low resource consumption.
[0008] The present invention solves the above-mentioned technical problems through the following technical means:
[0009] A method for monitoring carbon emissions is proposed, the method comprising the following steps:
[0010] Multivariate time series related to changes in carbon emissions are segmented to obtain subsequence blocks at different scales;
[0011] Perform trend-seasonal decomposition on the subsequence blocks to obtain the seasonal and trend terms corresponding to subsequence blocks at different scales;
[0012] Dual clustering feature enhancement processing is performed on the seasonal and trend terms corresponding to subsequence blocks at different scales to obtain clustering results. The dual clustering includes time-dimensional clustering and channel-dimensional clustering.
[0013] Based on the clustering results, spatiotemporal collaborative attention prediction is performed to obtain the predicted carbon emission value.
[0014] Furthermore, the multivariate time series related to changes in carbon emissions is segmented into subsequence blocks of different scales, including:
[0015] The multivariate time series is segmented to obtain several overlapping subsequence blocks;
[0016] The subsequence blocks are subjected to cascaded downsampling to obtain subsequence blocks of different scales, wherein the downsampling ratio is scale = 2. {l-1} , where l represents the decomposition level.
[0017] Furthermore, the trend-seasonal decomposition of the subsequence blocks yields the seasonal and trend terms corresponding to subsequence blocks at different scales, expressed by the formula:
[0018]
[0019]
[0020] In the formula: This represents the seasonal term of the k-th subsequence block in the l-th decomposition level. This represents the downsampled sequence of the k-th subsequence block in the l-th decomposition level. This represents the trend term of the k-th subsequence block in the l-th decomposition level, Pad indicates symmetric padding, and AvgPool indicates mean pooling.
[0021] Furthermore, the dual clustering feature enhancement processing performed on the seasonal and trend terms corresponding to subsequence blocks of different scales yields the clustering results, including:
[0022] Extract the latent distribution features of the trend terms at different scales, and perform time-dimensional clustering on the latent distribution features corresponding to each subsequence block to obtain cluster features;
[0023] The seasonal terms at different scales are converted into frequency domain features, and channel dimension clustering is performed on the frequency domain features to obtain the channel mask.
[0024] Furthermore, the latent distribution features of the trend term extracted at different scales are expressed by the following formula:
[0025]
[0026] In the formula: Z k This represents the potential distribution characteristics corresponding to the nth subsequence block. This represents the trend term of the k-th subsequence block in the l-th decomposition level, where ∈ indicates a standard normal distribution. The random variables sampled in the middle, ⊙ represents the Hadamard product, Softplus represents the activation function; Encoder represents the neural network encoder, which outputs the mean μ∈R. d Standard deviation σ∈R d .
[0027] Further, the step of converting the seasonal terms at different scales into frequency domain features and performing channel-dimensional clustering on the frequency domain features to obtain a channel mask includes:
[0028] Fourier transforms are performed on the seasonal terms at different scales to obtain the corresponding frequency domain features;
[0029] The formula for calculating channel correlation based on frequency domain characteristics is as follows:
[0030]
[0031] In the formula: d(X) i ,X j () represents the distance between channel i and channel j. This represents the frequency domain characteristics corresponding to channel i. Let Q represent the frequency domain characteristics corresponding to channel j, Q represent the inverse of the covariance matrix, and T represent the transpose sign.
[0032] The channel mask is generated by selecting some strongly correlated channel pairs based on the distance between channels.
[0033] Furthermore, the clustering results include cluster features and channel masks, and the spatiotemporal collaborative attention prediction based on the clustering results to obtain the predicted carbon emissions includes:
[0034] Based on the clustering results, local predictions are performed to generate spatiotemporal features at each scale, and the spatiotemporal features include time weights and channel weights.
[0035] The spatiotemporal features at each scale are mapped to local predicted values at each decomposition level via a fully connected network;
[0036] The local predicted values corresponding to each decomposition level are weighted and fused based on the fusion weight to obtain the predicted carbon emission value.
[0037] Furthermore, the local prediction based on the clustering results generates spatiotemporal features for each scale, wherein the spatiotemporal features include time weights and channel weights, including:
[0038] The query matrix, key matrix, and value matrix of the multi-layer attention layer are initialized using cluster features, and time weights are generated based on the query matrix, key matrix, and value matrix, as expressed in the formula:
[0039]
[0040] In the formula: A t Represents time weights, Q, K, V are the query matrix, key matrix, and value matrix, respectively, and d k C represents the scaling factor. l represents the feature cluster corresponding to the l-th decomposition level, Linear represents the fully connected layer, and Softmax represents the normalized exponential function;
[0041] Based on the channel mask, channel weights are generated, expressed by the following formula:
[0042] A c =Sigmoid(M mask ·W c )
[0043] In the formula: A c M represents the channel weight. mask W represents the channel mask matrix. c This represents a randomly selected learnable weight matrix, and Sigmoid represents the activation function.
[0044] Furthermore, the mapping of the spatiotemporal features at each scale to the local predicted values of each decomposition level via a fully connected network is expressed by the following formula:
[0045]
[0046] In the formula: A represents the local predicted value at level l. t Represents time weight, A c The channel weights are represented by "Concat", which indicates a concatenation operation along the feature dimension, and "FC" indicates a fully connected network. This represents the dimensionality transformation of a fully connected layer.
[0047] Furthermore, the local predicted values corresponding to each decomposition level are weighted and fused based on the fusion weights to obtain the predicted carbon emissions, expressed as follows:
[0048]
[0049] In the formula: α represents the predicted carbon emissions. l Indicates the fusion weight. This represents the local prediction value at level l, where l represents the number of decomposition levels;
[0050] Fusion weight α l The expression is:
[0051]
[0052] In the formula: w l and wm Both represent learnable parameters, and exp represents an exponential function. Represents a real number.
[0053] Furthermore, this invention also proposes a carbon emission monitoring system, comprising:
[0054] The segmentation module is used to segment multivariate time series related to changes in carbon emissions into subsequence blocks of different scales.
[0055] The trend-seasonal term decomposition module is used to perform trend-seasonal term decomposition on subsequence blocks to obtain seasonal and trend terms corresponding to subsequence blocks at different scales.
[0056] The dual clustering module is used to perform dual clustering feature enhancement processing on seasonal and trend items corresponding to subsequence blocks at different scales to obtain clustering results. The dual clustering includes time-dimensional clustering and channel-dimensional clustering.
[0057] The prediction module is used to perform spatiotemporal collaborative attention prediction based on clustering results to obtain predicted carbon emissions.
[0058] The advantages of this invention are:
[0059] (1) This invention first divides the multivariate time series related to carbon emissions into blocks to obtain subsequence blocks of different scales. Blocking reduces computational complexity and enhances the ability to extract local features in a refined manner. Then, the subsequence blocks are decomposed into trend-seasonal terms to obtain seasonal terms and trend terms of different scales, so as to deal with long-term and short-term features at the same time and improve the ability to capture complex dependencies. Then, the seasonal terms and trend terms of different scales are subjected to dual clustering feature enhancement processing in time dimension and channel dimension to dynamically identify data distribution patterns under different working conditions, strengthen the impact of carbon emission mutation moments and important variables on carbon emissions, and can adaptively identify extreme working conditions, providing structured feature constraints for subsequent spatiotemporal attention and sparse connection constraints for channel attention. Finally, spatiotemporal collaborative attention prediction is performed based on the dual clustering results, and the carbon emission prediction value is output after fusion to enhance the prediction reliability of the model in complex environments. Therefore, this invention reduces computational complexity while enhancing the reliability of carbon emission prediction, which can meet the stringent requirements of industrial scenarios for real-time inference and low resource consumption.
[0060] (2) By clustering trend terms in the time dimension, this invention can adaptively identify extreme working conditions. Based on the frequency domain distance metric and the interaction of sparsified channels, it can automatically identify the physical relationship between key variables, effectively suppress noise interference, and improve the interpretability of feature representation.
[0061] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0062] Figure 1 This is a schematic flowchart of a carbon emission monitoring method proposed in an embodiment of the present invention;
[0063] Figure 2 This is a schematic diagram of a carbon emission monitoring system proposed in an embodiment of the present invention. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] like Figure 1 As shown, the first embodiment of the present invention proposes a method for monitoring carbon emissions, the method comprising the following steps:
[0066] S10. The multivariate time series related to carbon emission variables is segmented to obtain subsequence blocks of different scales;
[0067] It should be noted that multivariate time series refers to time series data in which each point in time contains observations of multiple variables. These variables may have interrelationships. By analyzing and modeling the historical data of these variables, the value of the target variable at a future point in time can be predicted.
[0068] It should be noted that thermal power unit operation data and its carbon emission data often have the following characteristics: (1) Multidimensional: Thermal power unit operation data usually includes multiple dimensions. The variables included at each point in time in the multivariate time series related to carbon emission variables include active power, oxygen content, flue gas flow rate, sulfur dioxide concentration, etc. These data together reflect the operating status and carbon emission situation of thermal power units. (2) Time series: These data are generated continuously over time and have obvious time series characteristics. There is a time dependence between data at different points in time. (3) Periodicity: Since carbon emission is closely related to the operating status of thermal power units, and with the periodic changes in electricity demand, the carbon emission of thermal power units also has periodic characteristics, such as seasonal changes, annual changes and long-term trend changes, which are reflected in the monitoring data as multi-scale characteristics. (4) Complexity: The operating status and carbon emission of thermal power units are affected by a variety of factors, and the data may contain complex patterns and relationships. Therefore, thermal power unit operation data contains characteristics at different time scales, such as short-term fluctuations and long-term trends.
[0069] It should be noted that by segmenting multivariate time series, computational complexity is reduced and the ability to refine local features is enhanced. Moreover, the multiple subsequence blocks obtained by the segmentation strategy enable spatiotemporal collaborative attention to simultaneously capture long-term periodic features and short-term fluctuation patterns. Combined with multi-scale decomposition and hybridization mechanisms, the accuracy and stability of time series prediction are significantly improved.
[0070] S20. Perform trend-seasonal decomposition on the subsequence blocks to obtain the seasonal and trend terms corresponding to subsequence blocks at different scales;
[0071] It should be noted that by performing trend-seasonal decomposition on the subsequence blocks, seasonal terms and trend terms at different scales are obtained, which can simultaneously address long-term and short-term features and improve the ability to capture complex dependencies.
[0072] S30. Perform dual clustering feature enhancement processing on the seasonal and trend terms corresponding to subsequence blocks at different scales to obtain clustering results. The dual clustering includes time-dimensional clustering and channel-dimensional clustering.
[0073] It should be noted that, since a single-scale partitioning strategy is difficult to adapt to the complexity of multi-scale coupling in carbon emission prediction, relying solely on fixed blocks will lead to the loss of cross-scale feature interactions and will not be able to accurately characterize, for example, the dynamic correlation between sudden changes in unit operating load and the lagged response of carbon emissions. Therefore, this embodiment enhances the data distribution patterns under different operating conditions by performing dual clustering feature enhancement processing on seasonal terms and trend terms at different scales in both time and channel dimensions. This strengthens the impact of sudden changes in carbon emissions and important variables on carbon emissions, and can adaptively identify extreme operating conditions. It provides structured feature constraints for subsequent spatiotemporal attention and sparse connection constraints for channel attention, thereby enhancing the predictive reliability of spatiotemporal collaborative attention in complex environments.
[0074] S40. Based on the clustering results, perform spatiotemporal collaborative attention prediction to obtain the predicted carbon emission value.
[0075] It should be noted that this embodiment specifically employs a pre-trained spatiotemporal collaborative attention prediction model capable of carbon emission prediction to process the dual clustering results for real-time carbon emission monitoring. The spatiotemporal collaborative attention prediction model utilizes existing technologies to achieve multi-scale prediction fusion. The clustering results obtained through a series of processing steps are input into the spatiotemporal collaborative attention model, incorporating domain knowledge constraints to enhance model interpretability. Therefore, this embodiment achieves time-series prediction that balances multi-scale feature fusion and dynamic operating condition adaptation. It can collaboratively analyze long-term trends and instantaneous fluctuations through cross-scale interactive networks, while also incorporating domain knowledge constraints to enhance model interpretability. This approach enhances the reliability of carbon emission prediction while reducing computational complexity, meeting the stringent requirements of industrial scenarios for real-time inference and low resource consumption.
[0076] As a further preferred technical solution, step S10: The multivariate time series related to changes in carbon emissions is segmented to obtain sub-series blocks of different scales, specifically including the following steps:
[0077] S11. The multivariate time series is segmented to obtain several overlapping subsequence blocks;
[0078] Specifically, in this embodiment, the collected original multivariate time series is divided into K overlapping subsequence blocks according to a preset block length (e.g., P = 24 hours) and step size (S = 12 hours), wherein, This indicates rounding down, and N represents the total length of the original multivariate time series. Generate the input sequence. Where T = 96 (historical 4-day data) and C = 7 (number of variables in the multivariate time series).
[0079] S12. Perform cascaded downsampling on the subsequence blocks to obtain subsequence blocks of different scales, wherein the downsampling ratio is scale = 2. {l-1} , where l represents the decomposition level.
[0080] Specifically, in this embodiment, each subsequence block is decomposed at different scales. Taking a decomposition order of L=4 as an example, each subsequence block is generated into four scale sequences (24h, 12h, 6h, and 3h) through cascaded downsampling, as expressed by the formula:
[0081]
[0082] In the formula: This represents the downsampling sequence of the k-th sub-block at the l-th decomposition level, with dimension . Represents a real number; Downsample indicates a downsampling operation, using mean pooling to compress high-frequency noise; scale = 2 l-1 The downsampling ratio is denoted by l, which represents the decomposition level. The downsampling ratio is related to the decomposition level l. The downsampling ratio determines the degree to which the multivariate time series is compressed at each decomposition level. For example, l=1 is the coarsest scale (24 hours), l=2 is downsampled to 1 / 2 of the original length, i.e., the scale is 12 hours, l=3 is downsampled to 1 / 4 of the original length, i.e., the scale is 6 hours, and l=4 is downsampled to 1 / 8 of the original sequence length, i.e., the finest scale is 3 hours.
[0083] It should be noted that, in this embodiment, before performing cascaded downsampling on each subsequence block, mean pooling is first performed on the subsequence block to compress high-frequency noise.
[0084] As a further preferred technical solution, step S20: performing trend-seasonal decomposition on the subsequence blocks to obtain the seasonal and trend terms corresponding to subsequence blocks at different scales, expressed by the formula:
[0085]
[0086] In the formula: The seasonal term represents the k-th subsequence block of the l-th decomposition level, expressed as a result of the moving average (window length = downsampled sequence length P). l It is obtained by extracting periodic components; This represents the downsampled sequence of the k-th subsequence block in the l-th decomposition level; The trend term represents the k-th subsequence block of the l-th decomposition level. Remove seasonal items The remaining part; Pad indicates symmetric padding to avoid loss of boundary information; AvgPool indicates mean pooling operation, with the window size being equal to the downsampled sequence length P. l Consistent.
[0087] As a further preferred technical solution, step S30: performing dual clustering feature enhancement processing on the seasonal and trend terms corresponding to subsequence blocks of different scales to obtain clustering results, specifically including the following steps:
[0088] S31. Extract the potential distribution features of the trend terms at different scales, and perform time-dimensional clustering on the potential distribution features corresponding to each sub-sequence block to obtain cluster features;
[0089] S32. Convert the seasonal terms at different scales into frequency domain features, and perform channel dimension clustering on the frequency domain features to obtain the channel mask.
[0090] It should be noted that this embodiment performs time-dimensional clustering and channel-dimensional clustering by using multi-scale trend terms and seasonal terms respectively. The obtained cluster features and channel masks are used as structured feature constraints and sparse connection constraints for subsequent spatiotemporal collaborative attention, which enables the spatiotemporal collaborative attention model to incorporate domain knowledge constraints to enhance model interpretability. At the same time, sparse attention and quantization compression techniques are used to adapt to the resource limitations of edge devices.
[0091] As a further preferred technical solution, step S31: extracting the potential distribution features of the trend terms at different scales, and performing time-dimensional clustering on the potential distribution features corresponding to each sub-sequence block to obtain cluster features, specifically including:
[0092] The latent distribution features of the trend terms at different scales are extracted using an encoder;
[0093] Clustering of the potential distribution features corresponding to each subsequence block along the time dimension yields cluster features.
[0094] Furthermore, the trend item After distributed routing, the latent distribution features are extracted by the encoder, and the formula is expressed as follows:
[0095]
[0096] In the formula: Z k This represents the latent distribution characteristics corresponding to the k-th subsequence block. This represents the trend term of the k-th subsequence block in the l-th decomposition level, where ∈ indicates a standard normal distribution. The random variable is sampled in the middle, and ⊙ represents the element-wise product (Hadamard product); Encoder represents the neural network encoder, which outputs the mean μ∈R. d Standard deviation σ∈R d R d Let x represent a d-dimensional real vector space; Softplus represents the activation function, defined as Softplus(x) = log(1 + e^(-1 / 2)). x ), ensuring that the standard deviation σ is non-negative; K l P represents the number of subsequence blocks at level l. l This indicates the window length at level l.
[0097] It should be noted that this embodiment can use existing technologies such as K-Means clustering to perform time-dimensional clustering of the potential distribution features, obtaining cluster features C corresponding to different scales. l .
[0098] As a further preferred technical solution, step S32: converting the seasonal terms at different scales into frequency domain features, and performing channel-dimensional clustering on the frequency domain features to obtain a channel mask, specifically includes the following steps:
[0099] S321. Perform Fourier transform on the seasonal terms at different scales to obtain the corresponding frequency domain features;
[0100] S322. Calculate channel correlation based on frequency domain characteristics, expressed as follows:
[0101]
[0102] In the formula: d(X) i ,X j () represents the distance between channel i and channel j, used to measure the correlation between variables; Let F represent the frequency domain features corresponding to channel i and channel j, respectively, with dimension F = 64; Q represents the inverse of the covariance matrix, and T represents the transpose sign;
[0103] S323. Select some strongly correlated channel pairs based on the distance between channels to generate the channel mask.
[0104] It should be noted that this embodiment uses Mahalanobis distance to statistically measure the similarity of these frequency domain features, thereby determining whether channels share the same periodic pattern. Then, based on the magnitude of the Mahalanobis distance, a subset of strongly correlated channels are selected, for example, the top 40% of strongly correlated channels are selected according to their distance from high to low to generate the channel mask M. mask ∈{0,1} C×C The formula is expressed as:
[0105]
[0106] This embodiment transforms the periodicity of seasonal terms into channel correlation priors through frequency domain analysis, providing sparse connectivity constraints for channel attention in the spatiotemporal collaborative attention model, so that the model only focuses on channels with highly consistent periodicity of seasonal terms.
[0107] As a further preferred technical solution, step S40: performing spatiotemporal collaborative attention prediction based on clustering results to obtain predicted carbon emission values, specifically includes the following steps:
[0108] S41. Based on the clustering results, perform local prediction to generate spatiotemporal features at each scale, wherein the spatiotemporal features include time weights and channel weights;
[0109] Specifically, the query matrix, key matrix, and value matrix of the multi-layer attention layer are initialized using cluster features, and time weights are generated based on the query matrix, key matrix, and value matrix, as expressed in the formula:
[0110]
[0111] In the formula: A t Represents time weights, Q, K, V are the query matrix, key matrix, and value matrix, respectively, and d k This represents the scaling factor, which scales the dot product to ensure numerical stability and prevent data bursts; C l represents the feature cluster corresponding to the l-th decomposition level, Linear represents the fully connected layer, and Softmax represents the normalized exponential function;
[0112] Based on the channel mask, channel weights are generated, expressed by the following formula:
[0113] A c =Sigmoid(M mask ·W c )
[0114] In the formula: A c M represents the channel weight. mask W represents the channel mask matrix. c This represents a randomly selected learnable weight matrix, and Sigmoid represents the activation function.
[0115] It should be noted that in this embodiment, cluster features are used to provide structured feature constraints for spatiotemporal attention and calculate time weights to highlight key time points (such as moments of sudden changes in carbon emissions). For example, based on the distribution of time weights, a threshold is set, and time points with time weights higher than the threshold are considered key time points; or the time weights are sorted, and the top few time points with the largest weights are selected as key time points. Therefore, the channel weights can reflect the importance of each channel.
[0116] This embodiment enhances the cluster features of important variables (such as the impact of voltage on carbon emissions) in the time dimension of time attention, directly involving them in the generation of the query matrix, key matrix, and value matrix. This ensures that the attention mechanism focuses on key fluctuation patterns (such as periodic spikes). By adding a mask matrix to the channel attention to constrain the connections between channels, interference from irrelevant variables is avoided, improving computational efficiency. Through interaction between frequency domain distance metrics and sparse channels, the physical relationships between key variables are automatically identified, achieving multivariate coupling analysis, effectively suppressing noise interference, and improving the interpretability of feature representation.
[0117] S42. The spatiotemporal features of each scale are mapped to the local predicted values of each decomposition level through a fully connected network;
[0118] It should be noted that the spatiotemporal collaborative attention model set in this embodiment adopts a multi-head attention mechanism, corresponding to the decomposition levels, in order to perform multi-scale prediction fusion. The spatiotemporal attention output of each level is as follows:
[0119]
[0120] Based on the prediction results corresponding to block scales of 24h, 12h, 6h, and 3h respectively, It represents a real number with dimension 48×1.
[0121] Specifically, this involves dividing the spatiotemporal features A at each scale. t With A c Mapped to local predicted values via a fully connected network:
[0122]
[0123] In the formula: This represents the local prediction result at level l, predicting the change in carbon emissions over the next 48 hours (τ = 48 hours). Represents the time attention weight matrix. This represents the channel attention weight matrix; Concat indicates the concatenation operation along the feature dimension, with an output dimension of... FC stands for Fully Connected Network, which maps concatenated features to predicted values. Its structure is as follows:
[0124] S43. Based on the fusion weight, the local predicted values corresponding to each decomposition level are weighted and fused to obtain the predicted carbon emission value.
[0125] Specifically, the predicted carbon emissions are expressed as follows:
[0126]
[0127] In the formula: α represents the predicted carbon emissions. l Indicates the fusion weight. This represents the local predicted value at level l, where L represents the number of decomposition levels.
[0128] Among them, the fusion weight α l The expression is:
[0129]
[0130] In the formula: w l and w m Both represent learnable parameters, w l α represents the learnable weight parameters of the l-th layer, initialized to 0 and adaptively adjusted through training; l ∈[0,1] represents the normalized hierarchical weights; exp represents the exponential function, ensuring that the weights are non-negative.
[0131] It should be noted that the fusion weight α l The learnable parameters w are determined beforehand through model training. l Calculate the fusion weight α at each scale l The values reflect the contribution of different scales to the final prediction. For example, α1 (24h) can reflect the contribution of long-term trends and is affected by coarse-grained clustering of time-dimensional clustering, while α4 (3h) can reflect the contribution of short-term fluctuations and is affected by frequency domain detail optimization of soft clustering of channel dimensions.
[0132] As a further preferred technical solution, the pre-training process of the entire network model in this embodiment adopts a two-stage training strategy. First, it learns general temporal features through self-supervised pre-training by masking 40% of the sub-sequence blocks. Then, it fine-tunes the prediction head based on the MAE loss function to obtain a carbon emission prediction model for processing multivariate sequences collected by sensors in real time and outputting carbon emission prediction values for the next 48 hours. This enables early warning of carbon emission exceeding the standard in the power industry.
[0133] Specifically, to adapt to edge devices and ensure a balance between prediction accuracy and inference efficiency, this embodiment uses the parameters of a trained FP32 model as input data, and then converts the weights and activation values from FP32 to INT8:
[0134]
[0135] In the formula: Δ represents the scaling factor, which is dynamically calibrated layer by layer.
[0136] Therefore, this embodiment can convert the FP32 model into a lightweight INT8 model by converting the model's weights and activation values from FP32, which can significantly reduce the model's memory usage and computational load, thereby improving the model's inference speed and efficiency.
[0137] It should be noted that the carbon emission time series prediction method proposed in this embodiment, which takes into account multi-scale feature fusion, dynamic operating condition adaptation and lightweight design, can not only analyze long-term trends and instantaneous fluctuations through cross-scale interactive networks, but also enhance the interpretability of the model by incorporating domain knowledge constraints. At the same time, it adapts to the resource constraints of edge devices through sparse attention and quantization compression technology, meets the stringent requirements of industrial scenarios for real-time inference and low resource consumption, realizes real-time monitoring and fault early warning of carbon emissions of power companies, and can also be extended to carbon emission monitoring of high-emission industries such as cement and steel.
[0138] In addition, such as Figure 2 As shown, another embodiment of the present invention also proposes a carbon emission monitoring system, comprising:
[0139] The segmentation module 10 is used to segment the multivariate time series related to changes in carbon emissions into subsequence blocks of different scales.
[0140] The trend-seasonal term decomposition module 20 is used to perform trend-seasonal term decomposition on the subsequence blocks to obtain the seasonal term and trend term corresponding to the subsequence blocks at different scales.
[0141] The dual clustering module 30 is used to perform dual clustering feature enhancement processing on the seasonal and trend items corresponding to subsequence blocks at different scales to obtain clustering results. The dual clustering includes time-dimensional clustering and channel-dimensional clustering.
[0142] The spatiotemporal collaborative attention prediction module 40 is used to perform spatiotemporal collaborative attention prediction based on clustering results to obtain carbon emission prediction values.
[0143] As a further preferred technical solution, the segmentation processing module 10 specifically includes:
[0144] The segmentation processing unit is used to segment the multivariate time series to obtain several overlapping subsequence blocks.
[0145] A scale partitioning unit is used to perform cascaded downsampling processing on the subsequence blocks to obtain subsequence blocks of different scales, wherein the downsampling ratio is scale = 2. {l-1} , where l represents the decomposition level.
[0146] As a further preferred technical solution, the trend-seasonal term decomposition module 20 is specifically used to perform trend-seasonal term decomposition on the subsequence blocks using the following formula to obtain the seasonal term and trend term corresponding to subsequence blocks at different scales:
[0147]
[0148] In the formula: This represents the seasonal term of the k-th subsequence block in the l-th decomposition level. This represents the downsampled sequence of the k-th subsequence block in the l-th decomposition level. This represents the trend term of the k-th subsequence block in the l-th decomposition level, Pad indicates symmetric padding, and AvgPool indicates mean pooling.
[0149] As a further preferred technical solution, the dual clustering module 30 includes:
[0150] The temporal clustering unit is used to extract the potential distribution features of the trend terms at different scales, and to perform temporal dimension clustering on the potential distribution features corresponding to each subsequence block to obtain cluster features;
[0151] The channel clustering unit is used to convert the seasonal terms at different scales into frequency domain features, and to perform channel-dimensional clustering on the frequency domain features to obtain the channel mask.
[0152] As a further preferred technical solution, the time clustering unit includes:
[0153] The feature extraction subunit is used to extract the latent distribution features of the trend term at different scales through the encoder, and is expressed by the following formula:
[0154]
[0155] In the formula: Z k This represents the latent distribution characteristics corresponding to the k-th subsequence block. This represents the trend term of the k-th subsequence block in the l-th decomposition level, where ∈ indicates a standard normal distribution. The random variables sampled in the middle, ⊙ represents the Hadamard product, Softplus represents the activation function; Encoder represents the neural network encoder, which outputs the mean μ∈R. d Standard deviation σ∈R d .
[0156] Clustering subunits are used to perform time-dimensional clustering of the potential distribution features corresponding to each subsequence block to obtain cluster features.
[0157] As a further preferred technical solution, the channel clustering unit specifically includes:
[0158] The transformation subunit is used to perform Fourier transform on the seasonal terms at different scales to obtain the corresponding frequency domain features;
[0159] The correlation calculation subunit, used to calculate channel correlation based on frequency domain characteristics, is expressed by the following formula:
[0160]
[0161] In the formula: d(X) i ,X j () represents the distance between channel i and channel j. This represents the frequency domain characteristics corresponding to channel i. Let Q represent the frequency domain characteristics corresponding to channel j, Q represent the inverse of the covariance matrix, and T represent the transpose sign.
[0162] A mask generation subunit is used to select partially strongly correlated channel pairs based on the distance between channels to generate the channel mask.
[0163] As a further preferred technical solution, the spatiotemporal collaborative attention prediction module 40 specifically includes:
[0164] The spatiotemporal feature generation unit is used to generate spatiotemporal features at each scale based on the clustering results through local prediction. The spatiotemporal features include time weights and channel weights.
[0165] Local prediction units are used to map the spatiotemporal features at each scale to local prediction values at each decomposition level via a fully connected network.
[0166] The global fusion unit is used to perform weighted fusion of the local prediction values corresponding to each decomposition level based on the fusion weight to obtain the carbon emission prediction value.
[0167] As a further preferred technical solution, the spatiotemporal feature generation unit is specifically used for:
[0168] The query matrix, key matrix, and value matrix of the multi-layer attention layer are initialized using cluster features, and time weights are generated based on the query matrix, key matrix, and value matrix, as expressed in the formula:
[0169]
[0170] In the formula: A t Represents time weights, Q, K, V are the query matrix, key matrix, and value matrix, respectively, and d k C represents the scaling factor. l represents the feature cluster corresponding to the l-th decomposition level, Linear represents the fully connected layer, and Softmax represents the normalized exponential function;
[0171] Based on the channel mask, channel weights are generated, expressed by the following formula:
[0172] A c =Sigmoid(M mask ·W c )
[0173] In the formula: A c M represents the channel weight. mask W represents the channel mask matrix. c This represents a randomly selected learnable weight matrix, and Sigmoid represents the activation function.
[0174] As a further preferred technical solution, the local prediction unit is used to map the spatiotemporal features of each scale to the local prediction value of each decomposition level via a fully connected network, as expressed by the formula:
[0175]
[0176] In the formula: A represents the local predicted value at level l. t Represents time weight, A c The channel weights are represented by "Concat", which indicates a concatenation operation along the feature dimension, and "FC" indicates a fully connected network. This represents the dimensionality transformation of a fully connected layer.
[0177] As a further preferred technical solution, the global fusion unit is specifically used to perform weighted fusion of the local prediction values corresponding to each decomposition level based on the fusion weight, to obtain the carbon emission prediction value, expressed as follows:
[0178]
[0179] In the formula: α represents the predicted carbon emissions. l Indicates the fusion weight. This represents the local predicted value at level l, where L represents the number of decomposition levels.
[0180] Fusion weight α l The expression is:
[0181]
[0182] In the formula: w l and w m Both represent learnable parameters, and exp represents an exponential function.
[0183] It should be noted that other embodiments or specific implementation methods of the carbon emission monitoring system described in this invention can refer to the above-described method embodiments, and will not be repeated here.
[0184] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0185] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0186] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0187] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0188] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for monitoring carbon emissions, characterized in that, include: Multivariate time series related to changes in carbon emissions are segmented to obtain subsequence blocks at different scales; Perform trend-seasonal decomposition on the subsequence blocks to obtain the seasonal and trend terms corresponding to subsequence blocks at different scales; Dual clustering feature enhancement processing is performed on the seasonal and trend terms corresponding to subsequence blocks at different scales to obtain clustering results. The dual clustering includes time-dimensional clustering and channel-dimensional clustering. Based on the clustering results, spatiotemporal collaborative attention prediction is performed to obtain the predicted carbon emission value.
2. The carbon emission monitoring method as described in claim 1, characterized in that, The process of segmenting the multivariate time series related to changes in carbon emissions into subsequence blocks of different scales includes: The multivariate time series is segmented to obtain several overlapping subsequence blocks; The subsequence blocks are subjected to cascaded downsampling to obtain subsequence blocks of different scales, wherein the downsampling ratio is scale = 2. {l-1} , where l represents the decomposition level.
3. The carbon emission monitoring method as described in claim 1, characterized in that, The trend-seasonal decomposition of the subsequence blocks yields the seasonal and trend terms corresponding to subsequence blocks at different scales, expressed as follows: In the formula: This represents the seasonal term of the k-th subsequence block in the l-th decomposition level. This represents the downsampled sequence of the k-th subsequence block in the l-th decomposition level. This represents the trend term of the k-th subsequence block in the l-th decomposition level, Pad indicates symmetric padding, and AvgPool indicates mean pooling.
4. The carbon emission monitoring method as described in claim 1, characterized in that, The dual clustering feature enhancement process is applied to the seasonal and trend terms corresponding to subsequence blocks at different scales to obtain clustering results, including: Extract the latent distribution features of the trend terms at different scales, and perform time-dimensional clustering on the latent distribution features corresponding to each subsequence block to obtain cluster features; The seasonal terms at different scales are converted into frequency domain features, and channel dimension clustering is performed on the frequency domain features to obtain the channel mask.
5. The carbon emission monitoring method as described in claim 4, characterized in that, The latent distribution features of the trend term extracted at different scales are expressed by the following formula: In the formula: Z k This represents the latent distribution characteristics corresponding to the k-th subsequence block. This represents the trend term of the k-th subsequence block in the l-th decomposition level, where ∈ indicates a standard normal distribution. The random variables sampled in the middle, ⊙ represents the Hadamard product, Softplus represents the activation function; Encoder represents the neural network encoder, which outputs the mean μ∈R. d Standard deviation σ∈E d .
6. The carbon emission monitoring method as described in claim 4, characterized in that, The step of converting the seasonal terms at different scales into frequency domain features and performing channel-dimensional clustering on the frequency domain features to obtain a channel mask includes: Fourier transforms are performed on the seasonal terms at different scales to obtain the corresponding frequency domain features; The formula for calculating channel correlation based on frequency domain characteristics is as follows: In the formula: d(X) i ,X j () represents the distance between channel i and channel j. This represents the frequency domain characteristics corresponding to channel i. Let Q represent the frequency domain characteristics corresponding to channel j, Q represent the inverse of the covariance matrix, and T represent the transpose sign. The channel mask is generated by selecting some strongly correlated channel pairs based on the distance between channels.
7. The carbon emission monitoring method as described in claim 1, characterized in that, The clustering results include cluster features and channel masks. The spatiotemporal collaborative attention prediction based on the clustering results to obtain the predicted carbon emissions includes: Based on the clustering results, local predictions are performed to generate spatiotemporal features at each scale, and the spatiotemporal features include time weights and channel weights. The spatiotemporal features at each scale are mapped to local predicted values at each decomposition level via a fully connected network; The local predicted values corresponding to each decomposition level are weighted and fused based on the fusion weight to obtain the predicted carbon emission value.
8. The carbon emission monitoring method as described in claim 7, characterized in that, The process of generating spatiotemporal features at each scale based on clustering results through local prediction includes time weights and channel weights, comprising: The query matrix, key matrix, and value matrix of the multi-layer attention layer are initialized using cluster features, and time weights are generated based on the query matrix, key matrix, and value matrix, as expressed in the formula: Where Q,K,V=Linear(C l ) In the formula: A t Represents time weights, Q, K, V are the query matrix, key matrix, and value matrix, respectively, and d k C represents the scaling factor. l represents the feature cluster corresponding to the l-th decomposition level, Linear represents the fully connected layer, and Softmax represents the normalized exponential function; Based on the channel mask, channel weights are generated, expressed by the following formula: A c =Sigmoid(M mask ·W c ) In the formula: A c M represents the channel weight. mask W represents the channel mask matrix. c This represents a randomly selected learnable weight matrix, and Sigmoid represents the activation function.
9. The carbon emission monitoring method as described in claim 7, characterized in that, The process of mapping the spatiotemporal features of each scale to the local predicted values of each decomposition level via a fully connected network is expressed by the following formula: In the formula: A represents the local predicted value at level l. t Represents time weight, A c The channel weights are represented by "Concat", which indicates a concatenation operation along the feature dimension, and "FC" indicates a fully connected network. This represents the dimensionality transformation of a fully connected layer.
10. The carbon emission monitoring method as described in claim 7, characterized in that, The local predicted values corresponding to each decomposition level are weighted and fused based on the fusion weight to obtain the predicted carbon emissions, which is expressed by the following formula: In the formula: α represents the predicted carbon emissions. l Indicates the fusion weight. This represents the local predicted value at level l, where L represents the number of decomposition levels. Fusion weight α l The expression is: In the formula: w l and w m Both represent learnable parameters, and exp represents an exponential function. Represents a real number.
11. A carbon emission monitoring system, characterized in that, include: The segmentation module is used to segment multivariate time series related to changes in carbon emissions into subsequence blocks of different scales. The trend-seasonal term decomposition module is used to perform trend-seasonal term decomposition on subsequence blocks to obtain seasonal and trend terms corresponding to subsequence blocks at different scales. The dual clustering module is used to perform dual clustering feature enhancement processing on seasonal and trend items corresponding to subsequence blocks at different scales to obtain clustering results. The dual clustering includes time-dimensional clustering and channel-dimensional clustering. The prediction module is used to perform spatiotemporal collaborative attention prediction based on clustering results to obtain predicted carbon emissions.
Citation Information
Patent Citations
Method and system for realizing carbon emission monitoring based on unmanned aerial vehicle
CN116754722A
Cited By
Method and system for dynamically predicting water quality in marine ranch culture environment
CN121388492A