A CEMS carbon monitoring method, system and storage medium
By combining wavelet transform and self-attention convolution mechanism with semi-supervised learning, the monitoring problem of carbon emission models of thermal power units in the absence of labeled data is solved, achieving efficient and accurate carbon emission prediction and reducing the cost of data label collection.
Patent Information
- Application Number
- CN202510235454.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-02-28
AI Technical Summary
Existing technologies lack effective methods for constructing carbon emission models for thermal power units, especially in the absence of a large amount of labeled data, making it difficult to achieve accurate carbon emission monitoring.
By employing wavelet transform and self-attention convolution mechanisms, combined with semi-supervised learning methods, a carbon monitoring model is trained using a small amount of labeled data by extracting time-frequency features and augmenting data from historical operating data of thermal power units, and by introducing gradient density and pseudo-label techniques to optimize the model training process.
It improves the accuracy and anti-interference ability of carbon emission monitoring, reduces the dependence on label data, enhances the model's recognition ability under complex working conditions, and reduces the cost of data label collection.
Smart Images

Figure CN120162646B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of emission monitoring, in particular to a CEMS carbon monitoring method, system and storage medium. BACKGROUND
[0002] With the increasingly serious global climate change problem, carbon emission monitoring has become one of the important means to cope with climate change. CEMS (Continuous Emission Monitoring System) is an advanced technology that can monitor the concentration of greenhouse gases such as carbon dioxide in industrial emissions in real time. Its importance is reflected in many aspects: first, the CEMS system can accurately monitor the concentration of pollutants in industrial emissions, helping enterprises and governments to timely discover and solve emission problems, thereby reducing pollution to the atmospheric environment and improving air quality. Second, the supervision of greenhouse gas emissions by governments around the world is becoming increasingly stringent, and the CEMS system provides an effective monitoring tool for enterprises to comply with environmental regulations and avoid penalties for excessive emissions. In addition, by monitoring emission data in real time, enterprises can optimize production processes and equipment operation, improve energy utilization efficiency, reduce production costs, and enhance the market competitiveness of enterprises. Finally, the accurate data provided by the CEMS system provides an important basis for governments and enterprises to develop emission reduction strategies and policies, which helps to achieve scientific management and sustainable development.
[0003] Currently, many power plants have not installed CEMS carbon emission monitoring systems. Since the carbon emissions of thermal power units are closely related to multiple unit parameters, including fuel-related parameters, unit operating parameters, and environmental and operating parameters, etc. Therefore, CEMS carbon emission soft measurement can be achieved using these easily obtained parameters, the essence of which is to establish a mapping relationship or model between unit operating parameters and carbon emission parameters (such as concentration). The core of this model construction lies in two points: one is the design of the model itself, and the other is the training of the model. The model design needs to consider the time characteristics of unit operation and carbon emission, and the model training needs to be based on a small amount of artificial flue gas sampling calibration data (i.e. a small amount of carbon emission labels). This work is currently lacking in research. SUMMARY
[0004] To solve the above technical problems, the present application provides a CEMS carbon monitoring method, system and storage medium.
[0005] To solve the above technical problems, the present application adopts the following technical solutions:
[0006] A CEMS carbon monitoring method, the carbon monitoring model used can output corresponding carbon emission parameters according to real-time operation data of a thermal power unit, and the training process of the carbon monitoring model includes:
[0007] The historical operation data of the thermal power generating unit is acquired as input data, part of the data is manually labeled to generate labeled data, and the rest of the data is used as unlabeled data;
[0008] Wavelet transform is used to extract time-frequency features of the labeled data and the unlabeled data;
[0009] The time-frequency features of the unlabeled data are respectively enhanced strongly and weakly;
[0010] The time-frequency features of the labeled data and the enhanced time-frequency features of the unlabeled data are respectively input into two parameter-shared time-frequency information extraction modules, distance information on the input data in the time-frequency domain is extracted based on self-attention convolution, and self-attention feature maps corresponding to the labeled data and the unlabeled data are obtained.
[0011] The self-attention feature map corresponding to the labeled data is input into a linear layer E1, and the corresponding carbon emission parameter is output, and a supervised loss is calculated; the self-attention feature map corresponding to the unlabeled data is input into linear layers E1 and E2, and a consistency loss of the strong-enhanced unlabeled data and the weak-enhanced unlabeled data after being output by the carbon monitoring model is calculated, and an unsupervised loss is calculated based on the consistency loss and the gradient density; the carbon monitoring model is trained based on the supervised loss and the unsupervised loss.
[0012] In one of the embodiments, the historical operation data of the thermal power generating unit is acquired as unlabeled data, part of the unlabeled data is manually labeled to generate labeled data, and the specific process includes:
[0013] The historical operation data of the unit is acquired as a data set, and the operation data includes fuel-related parameters, unit operation parameters, and environmental and operation parameters;
[0014] The historical operation data of multiple time points is selected from a part of the historical operation data set, labeled with carbon emission labels, and multiple labeled data is obtained to form a labeled data set; the historical operation data of multiple time points is randomly selected from another part of the multi-dimensional time series to obtain multiple unlabeled data to form an unlabeled data set.
[0015] In one of the embodiments, the wavelet transform is used to extract time-frequency features of the labeled data and the unlabeled data, and the specific process includes:
[0016] The labeled data and the unlabeled data are collectively denoted as input data x(t), and the input data x(t) is subjected to wavelet transform:
[0017]
[0018] WT x (α,τ) represents the wavelet transform result, is a wavelet basis function, a is a dilation factor to realize the stretching of the basic wavelet, and t is a translation factor to reflect the displacement of the wavelet function in the transformation.
[0019] In one of the embodiments, the time-frequency features of the unlabeled data are respectively strongly enhanced and weakly enhanced, specifically including:
[0020] The weak enhancement is achieved by adding Gaussian noise to the time-frequency features of the unlabeled data to obtain weak enhancement samples, and the strong enhancement is achieved by setting different sampling rates and translations to realize the strong enhancement of the time-frequency features of the unlabeled data to obtain strong enhancement samples.
[0021] In one of the embodiments, the time-frequency features of the labeled data and the enhanced time-frequency features of the unlabeled data are respectively input into two parameter-shared time-frequency information extraction modules, the distance information on the input data in the time-frequency domain is extracted based on self-attention convolution to obtain the self-attention feature map corresponding to the labeled data and the self-attention feature map corresponding to the unlabeled data, specifically including:
[0022] After the input time-frequency features are generated into feature maps by the convolution network, they are respectively passed through three convolution structures as the query, key and value of the time-frequency features:
[0023] K=FW k , Q=FW q , V=FW v ;
[0024]
[0025] A=SoftMax(S);
[0026] O=AV;
[0027] wherein F is the feature map generated after the time-frequency features are input into the convolution network, K, Q and V are the key, query and value respectively, W k , W q and W v are the parameter matrices of the convolution kernels of the three convolution structures respectively; S is a similarity score matrix, is a scaling factor, A is an attention weight, and O is a self-attention feature map.
[0028] In one of the embodiments, the self-attention feature map corresponding to the labeled data is input into a linear layer E1 to output the corresponding carbon emission parameter, and a supervised loss is calculated, specifically including:
[0029] The supervised loss is directly calculated by combining the results output by the linear layer E1 with a gradient balance mechanism:
[0030] g=|E1(O)-p* |;
[0031]
[0032] where g is the gradient norm, O is the self-attention feature map corresponding to the labeled data, p * is the true carbon emission label of the labeled data, B l represents the set number of labeled data, GD(·) is the gradient density, l ∈ (g) is the length of the effective interval, used for normalization; g k is the gradient norm of the kth input, and a function δ k (g ∈ ,g) related to g k (g is defined; when ∈ (g k ,g) = 1, otherwise δ ∈ (g k ,g) = 0;
[0033] By the gradient density, a weight is assigned to each labeled data: β i is the weight of the i-th labeled data, g i is the gradient norm of the i-th labeled data;
[0034] When the carbon emission parameter output by the carbon monitoring model is a carbon emission level classification, the supervised loss L s is:
[0035]
[0036] H is the cross-entropy;
[0037] When the carbon emission parameter output by the carbon monitoring model is a carbon dioxide concentration classification, the supervised loss L s is:
[0038]
[0039] In one embodiment, the self-attention feature map corresponding to the unlabeled data is input into the linear layer E1, E2, the consistency loss of the strongly enhanced unlabeled data and the weakly enhanced unlabeled data after being output by the carbon monitoring model is calculated, and the unsupervised loss is constructed based on the consistency loss calculation and the gradient density. Specifically, it includes:
[0040] The consistency loss of the strongly enhanced unlabeled data and the weakly enhanced unlabeled data after being output by the carbon monitoring model is calculated
[0041]
[0042] O s,i is the self-attention feature map corresponding to the i-th unlabeled data in a batch of training data after strong enhancement, O w,i is the self-attention feature map corresponding to the i-th unlabeled data in a batch of training data after weak enhancement, H represents cross-entropy;
[0043] The gradient density GD is introduced to measure the density of the gradient norm g in the sample distribution:
[0044] g = |E1(O s,i ) - E1(O w,i ) |;
[0045]
[0046] where B u represents the number of unlabeled data in a batch of training data, l ∈ (g) is the length of the effective interval, used for normalization; g k is the gradient norm of the k-th input, and a function δ k (g ∈ , g) related to g k , g) is defined; when , δ ∈ (g k , g) = 1, otherwise δ ∈ (g k , g) = 0;
[0047] Through the gradient density GD(g), a weight is assigned to each unlabeled data:
[0048]
[0049] The unsupervised loss is calculated by combining the results output by E1 and the weight of each unlabeled data;
[0050] When the carbon emission parameter output by the carbon monitoring model is a carbon emission level classification, the unsupervised loss L GHM based on gradient balancing is:
[0051]
[0052] The unsupervised loss L CE based on cross-entropy is calculated by combining the results output by E2:
[0053]
[0054] When the carbon emission parameter output by the carbon monitoring model is a carbon dioxide concentration classification, the unsupervised loss LGHM is:
[0055]
[0056] The unsupervised loss L is calculated based on cross-entropy combined with the results output by E2 CE :
[0057]
[0058] The final unsupervised loss L u is:
[0059] L u = L GHM + L CE .
[0060] In one of the embodiments, the carbon monitoring model is trained based on the supervised loss and the unsupervised loss, specifically comprising:
[0061] An unsupervised loss weighting function is constructed; the weakly augmented unlabeled data is used as pseudo labels, and the confidence max(p) of the pseudo labels follows a dynamically changing truncated Gaussian distribution; in the rth iteration, the mean and variance of the confidence distribution of the pseudo labels are μ r and The weighting function is defined as:
[0062]
[0063] where λ(·) represents the weight of the unsupervised loss, λ max is the maximum weight of the unlabeled data, p is the output of the carbon monitoring model, μ r and The mean and variance of the current batch are estimated by the model's prediction on the historical batches:
[0064] μ r = mμ r-1 +(1-m)μ c ;
[0065]
[0066] where m is the momentum parameter of the exponential moving average, μ c and are the mean and variance of the current batch;
[0067] The pseudo label distribution is defined as the expectation of the carbon monitoring model's prediction on the unlabeled data Each pseudo label is normalized by the following formula:
[0068]
[0069] where UA(·) denotes the uniform alignment operation, u(C) is the uniform distribution of the target class, is the current pseudo-label distribution estimated by EMA, Normalize(·) ensures the probability is normalized to 1; the pseudo-labels after the uniform alignment operation are used to recalculate the sample weights, so as to balance between the number and quality of pseudo-labels;
[0070] The overall loss function L is used to train the carbon monitoring model; the overall loss function is composed of a supervised loss L s and an unsupervised loss L u :
[0071] L=L s +λ(E2(O w,i ))L u ;
[0072] O w,i is the self-attention feature map corresponding to the i-th unlabeled data in a batch of training data after weak enhancement.
[0073] A CEMS carbon monitoring system, comprising:
[0074] A data acquisition module: obtaining historical operation data of a thermal power unit as unlabeled data, and manually labeling part of the unlabeled data to generate labeled data;
[0075] A time-frequency feature extraction module: performing time-frequency feature extraction on the labeled data and the unlabeled data by using wavelet transform;
[0076] A data enhancement module: respectively performing strong enhancement and weak enhancement on the time-frequency features of the unlabeled data;
[0077] A time-frequency information extraction module: inputting the time-frequency features of the labeled data and the enhanced time-frequency features of the unlabeled data into two time-frequency information extraction modules sharing parameters, respectively, extracting distance information in the time-frequency domain of the input data based on self-attention convolution, and obtaining a self-attention feature map corresponding to the labeled data and a self-attention feature map corresponding to the unlabeled data;
[0078] A model training module: inputting the self-attention feature map corresponding to the labeled data into a linear layer E1, outputting corresponding carbon emission parameters, and calculating a supervised loss; inputting the self-attention feature map corresponding to the unlabeled data into linear layers E1 and E2, calculating a consistency loss of the strong enhanced unlabeled data and the weak enhanced unlabeled data output by the carbon monitoring model, constructing an unsupervised loss based on the consistency loss and the gradient density; and training the carbon monitoring model based on the supervised loss and the unsupervised loss.
[0079] A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method in any of the embodiments.
[0080] Compared with the prior art, the beneficial technical effects of the present application are:
[0081] 1、The present application realizes the prediction of carbon emission parameters (such as concentration) by a plurality of unit parameters, including fuel-related parameters, unit operation parameters, and environmental and operation parameters, etc., and simultaneously adopts wavelet transform to convert unit real-time data into a time-frequency image, so as to analyze data in multiple dimensions from the aspects of time domain and frequency domain, thereby improving the anti-interference ability and accuracy of the monitoring method.
[0082] 2、The present application utilizes a self-attention-convolution mechanism to help the model capture long-distance dependencies and improve fine-grained recognition ability, so as to realize accurate monitoring and evaluation of fixed-source carbon emissions.
[0083] 3、The present application has a small demand for label data, utilizes label data for supervised learning, respectively performs weak enhancement and strong enhancement on the unlabeled data before input, outputs the data after weak enhancement as pseudo-labels, and trains the model through the consistency loss after the two kinds of enhancement. The semi-supervised method can improve the model effect by utilizing unlabeled data under the condition of a small amount of labeled data. The problem of high data label acquisition cost in reality is solved.
[0084] 4、The present application adopts a SoftMatch framework, simultaneously utilizes unlabeled data and labeled data to train a CEMS carbon emission prediction model based on a semi-supervised algorithm, introduces a Gaussian weighting function and a unified alignment technology, balances the quantity and quality of pseudo-labels, improves the prediction effect of the algorithm, and reduces the dependence on labeled data.
[0085] 5、The present application introduces a gradient balancing mechanism, improves the recognition ability of the algorithm for carbon parameters in difficult-to-distinguish and easily-confused working conditions, and simultaneously innovates to adopt a double-head structure to retain a cross-entropy loss, so as to ensure that the semi-supervised algorithm can maintain high-quality pseudo-labels in the learning process, and improve the prediction accuracy of the algorithm for carbon parameters. BRIEF DESCRIPTION OF DRAWINGS
[0086] Figure 1 The method flowchart in the embodiment of the present application is shown in the figure;
[0087] Figure 2 The model architecture diagram in the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0088] A preferred embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0089] As Figure 1 indicated, the present application provides a CEMS carbon monitoring method, the carbon monitoring model used can output corresponding carbon emission parameters according to real-time operation data of a thermal power generating unit, and the training process of the carbon monitoring model comprises:
[0090] Step S1: obtaining historical operation data of the thermal power generating unit as input data, artificially marking part of the data to generate labeled data, and the rest of the data as unlabeled data;
[0091] Step S2: performing time-frequency feature extraction on the labeled data and the unlabeled data by using wavelet transform;
[0092] Step S3: respectively performing strong enhancement and weak enhancement on the time-frequency features of the unlabeled data;
[0093] Step S4: inputting the time-frequency features of the labeled data and the time-frequency features of the enhanced unlabeled data into two parameter-shared time-frequency information extraction modules respectively, extracting distance information on the time-frequency domain of the input data based on self-attention convolution, and obtaining a self-attention feature map corresponding to the labeled data and a self-attention feature map corresponding to the unlabeled data;
[0094] Step S5: inputting the self-attention feature map corresponding to the labeled data into a linear layer E1, outputting corresponding carbon emission parameters, and calculating a supervised loss; inputting the self-attention feature map corresponding to the unlabeled data into linear layers E1 and E2, calculating a consistency loss of the strong-enhanced unlabeled data and the weak-enhanced unlabeled data after being output by the carbon monitoring model, constructing an unsupervised loss based on the consistency loss calculation and gradient density; and training the carbon monitoring model based on the supervised loss and the unsupervised loss.
[0095] The present application effectively improves the precision and robustness of carbon emission monitoring of the thermal power generating unit by combining wavelet transform time-frequency analysis and semi-supervised learning method. Specifically, the wavelet transform is used to convert the multi-dimensional operation data into a time-frequency image, the features are extracted from the time domain and the frequency domain, and the anti-interference ability is enhanced; the pseudo-labels are generated by weak enhancement and strong enhancement data, and a consistency loss function is designed to realize the performance improvement of the model under the condition of only a small amount of artificially labeled data; the self-attention-convolution module is innovatively introduced to capture the long-distance dependency, and the bilinear layer structure and the gradient balance mechanism are combined to improve the fine-grained recognition ability of complex working conditions and ensure the quality of pseudo-labels. The overall scheme significantly reduces the dependence on artificially labeled data, and solves the problem of high cost of label collection in practical application.
[0096] In one of the embodiments, the obtaining of the historical operation data of the thermal power generating unit as the unlabeled data in step S1 comprises:
[0097] obtaining a dataset of historical operation data of the unit, the operation data including fuel-related parameters, unit operation parameters, and environmental and operation parameters;
[0098] selecting historical operation data of multiple time points from one part of the dataset of historical operation data, performing labeling of carbon emission labels, obtaining multiple labeled data, and forming a labeled dataset; randomly selecting a fixed-length sequence in another part of the multi-dimensional time sequence as unlabeled data, and obtaining an unlabeled dataset.
[0099] Specifically, the dataset required for training and testing the carbon monitoring model is prepared: historical operation data of the unit is obtained, including fuel-related parameters, unit operation parameters, and environmental and operation parameters. In a preferred embodiment, the fuel-related parameters include fuel consumption, fuel type (such as coal, natural gas, etc.), fuel quality (such as carbon content per unit heat value), and carbon oxidation rate, which directly affect the amount of carbon dioxide produced by fuel combustion. Unit operation parameters such as unit load, boiler efficiency, boiler air intake, and coal mill separator speed will affect the combustion efficiency and carbon emission concentration. In addition, environmental temperature and operation optimization measures (such as adjusting the boiler air intake, optimizing the coal blending scheme, etc.) will also have some impact on the carbon emission concentration. These historical operation data constitute a multi-dimensional time sequence denoted as X.
[0100] From X, select multiple time points for manual flue gas sampling labeling, and assign carbon emission labels to obtain labeled data and form a labeled dataset; randomly select another part of the fixed-length sequence as unlabeled data to obtain an unlabeled dataset; a fixed-length multi-dimensional time sequence is denoted as x(t), and the carbon emission label is denoted as y. The carbon emission label can be continuous, such as CO2 concentration, or discrete, such as emission level, reliability level, etc.
[0101] In one embodiment, the wavelet transform is used in step S2 to extract time-frequency features from the labeled data and the unlabeled data, specifically including:
[0102] The labeled data and the unlabeled data are collectively denoted as input data x(t), and the input data x(t) is subjected to wavelet transform:
[0103]
[0104] wherein WT x (α,τ) represents the wavelet transform result, is a wavelet basis function, α is an expansion factor for realizing stretching of a basic wavelet, and τ is a translation factor reflecting displacement of the wavelet function in the transform.
[0105] In one of the embodiments, the strong enhancement and the weak enhancement of the time-frequency features of the unlabeled data in step S3 are performed respectively, specifically including:
[0106] The weak enhancement sample is obtained by adding Gaussian noise to the unlabeled data, and the strong enhancement sample is obtained by setting different sampling rates and shifting.
[0107] For the unlabeled data, the present application introduces it into the training process through pseudo labels, and performs strong enhancement and weak enhancement on the unlabeled data respectively, so as to simulate various situations that may be encountered in the actual environment,
[0108] In one of the embodiments, the time-frequency features of the labeled data and the time-frequency features of the enhanced unlabeled data are input into two parameter-shared time-frequency information extraction modules in step S4, the distance information on the input data time-frequency domain is extracted based on the self-attention convolution, and the self-attention feature map corresponding to the labeled data and the self-attention feature map corresponding to the unlabeled data are obtained, specifically including:
[0109] After the input time-frequency features are generated into feature maps by the convolution network, they are respectively passed through three convolution structures as the query, key and value of the time-frequency features:
[0110] K=FW k , Q=FW q , V=FW v ;
[0111]
[0112] A=SoftMax(S);
[0113] O=AV;
[0114] Wherein, F is the feature map generated after the time-frequency features are input into the convolution network, K, Q and V are the key, query and value obtained, W k , W q and W v are the parameter matrices of the convolution kernels of the three convolution structures respectively; S is a similarity score matrix, is a scaling factor, A is an attention weight, and O is a self-attention feature map.
[0115] The present application builds a long-distance time-frequency information extraction module based on self-attention convolution, which can improve the ability of the model to extract information on the long-distance time-frequency domain, improve the model granularity, facilitate the modeling of multi-level dependency relationship, improve the recognition ability of difficult samples, and reform the feature extraction model by using the self-attention mechanism.
[0116] In one of the embodiments, the self-attention feature map corresponding to the labeled data is input into the linear layer E1 in step S5, and the corresponding carbon emission parameter is output, and a supervised loss is calculated, which specifically includes:
[0117] The supervised loss is directly calculated by combining the output of the linear layer E1 with the gradient balance mechanism:
[0118] g = |E1 (O) - p * |;
[0119]
[0120] wherein g is the gradient norm, O is the self-attention feature map corresponding to the labeled data, p * is the true carbon emission label of the labeled data, B l represents the number of labeled data set, GD(·) is the gradient density, l ∈ (g) is the length of the effective interval, used for normalization; when , δ ∈ (g k , g) = 1, otherwise δ ∈ (g k , g) = 0.
[0121] By the gradient density, a weight is assigned to each labeled data: β i is the weight of the i-th labeled data, g i is the gradient norm of the i-th labeled data.
[0122] When the carbon emission parameter output by the carbon monitoring model is a carbon emission level classification, the supervised loss L s is:
[0123]
[0124] H is the cross-entropy.
[0125] When the carbon emission parameter output by the carbon monitoring model is a carbon dioxide concentration classification, the supervised loss L s is:
[0126]
[0127] In one of the embodiments, the self-attention feature map corresponding to the unlabeled data is input into the linear layers E1 and E2 in step S5, and a consistency loss is calculated after the strongly enhanced unlabeled data and the weakly enhanced unlabeled data are output by the carbon monitoring model, and an unsupervised loss is constructed based on the consistency loss and the gradient density, which specifically includes:
[0128] Calculate the consistency loss between strongly enhanced and weakly enhanced unlabeled data after passing through the carbon monitoring model output.
[0129]
[0130] O s,i Let O be the self-attention feature map corresponding to the i-th unlabeled data in a batch of training data after strong enhancement. w,i Let H be the self-attention feature map corresponding to the i-th unlabeled data in a batch of training data after weak enhancement, where H refers to the cross-entropy.
[0131] We introduce gradient density GD to measure the density of the gradient norm g in the sample distribution:
[0132] g=|E1(O s,i )-E1(O w,i )|;
[0133]
[0134] Among them, B u l represents the number of unlabeled data points in a batch of training data. ∈ (g) is the length of the effective interval, used for normalization; when At that time, δ ∈ (g k ,g)=1, otherwise δ ∈ (g k ,g)=0.
[0135] A weight is assigned to each unlabeled data point using the gradient density GD(g):
[0136]
[0137] The unsupervised loss is calculated by combining the results from the E1 output with the weights of each unlabeled data point.
[0138] When the carbon emission parameters output by the carbon monitoring model are carbon emission level classifications, the unsupervised loss L based on gradient balancing is used. GHM for:
[0139]
[0140] Combining the results from the E2 output, the unsupervised loss L is calculated based on cross-entropy. CE :
[0141]
[0142] When the carbon emission parameters output by the carbon monitoring model are classified as carbon dioxide concentrations, the unsupervised loss L based on gradient balancing is used.GHM is:
[0143]
[0144] The unsupervised loss L is calculated based on the cross-entropy combined with the results output by E2 CE :
[0145]
[0146] The final unsupervised loss L u is:
[0147] L u = L GHM + L CE .
[0148] The unsupervised loss in the application mainly consists of two parts. Since carbon monitoring is easily disturbed by the environment in an open environment, some difficult samples are formed, and the overall carbon monitoring data set has the problem of difficulty imbalance. Therefore, the application introduces a gradient balancing mechanism to solve such problems.
[0149] In one embodiment, the training of the carbon monitoring model based on the supervised loss and the unsupervised loss in step S5 specifically includes:
[0150] An unsupervised loss weighting function is constructed; the weakly enhanced unlabeled data is used as a pseudo label, and the confidence max(p) of the pseudo label follows a dynamically changing truncated Gaussian distribution; in the rth iteration, the mean and variance of the confidence distribution of the pseudo label are μ r and The weighting function is defined as:
[0151]
[0152] Where λ(·) represents the weight of the unsupervised loss, λ max is the maximum weight of the unlabeled data, p is the output of the carbon monitoring model, μ r and The mean and variance of the current batch are estimated by the prediction of the model on the historical batches:
[0153] μ r = mμ r-1 +(1-m)μ c ;
[0154]
[0155] Where m is the momentum parameter of the exponential moving average, μ c and are the mean and variance of the current batch.
[0156] The pseudo-label distribution is defined as the expectation of the carbon monitoring model for unlabeled data prediction Each pseudo-label is normalized by the following formula:
[0157]
[0158] where UA(·) represents the uniform alignment operation, u(C) is the uniform distribution of the target class, is the current pseudo-label distribution estimated by EMA, Normalize(·) ensures the probability normalization to 1; the pseudo-label after the uniform alignment operation is used to recalculate the sample weight, so as to balance between the number and quality of pseudo-labels;
[0159] The overall loss function L is constructed to train the carbon monitoring model; the overall loss function is composed of supervised loss L s and unsupervised loss L u :
[0160] L=L s +λ(E2(O w,i ))L u ;
[0161] O w,i is the self-attention feature map corresponding to the i-th unlabeled data in a batch of training data after weak enhancement.
[0162] After the carbon monitoring model is trained, the carbon monitoring model is written into the related device, and the real-time operation data of the thermal power unit is input, so that the corresponding carbon emission parameter can be output in real time by E1.
[0163] It should be understood that although each step in the flowchart of the drawings is displayed in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless explicitly stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart of the drawings can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0164] Based on the description of the method embodiments, the disclosure also provides a CEMS carbon monitoring system. The system can include a system (including a distributed system), software (application), module, component, server, client, etc. using the method described in the embodiments of the present specification, and a system combined with necessary implementation hardware. Based on the same innovative concept, the system in one or more embodiments provided by the embodiments of the disclosure is as described in the following embodiments. Since the implementation scheme of the system solves the problem similar to the method, the implementation of the specific system in the embodiments of the present specification can be referred to the implementation of the foregoing method. The term "module" or "module" used below can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is conceived.
[0165] A CEMS carbon monitoring system comprises:
[0166] A data acquisition module: acquires historical operation data of a thermal power generating unit as unlabeled data, and manually labels part of the unlabeled data to generate labeled data;
[0167] A time-frequency feature extraction module: performs time-frequency feature extraction on the labeled data and the unlabeled data by using wavelet transform;
[0168] A data enhancement module: respectively performs strong enhancement and weak enhancement on the time-frequency features of the unlabeled data;
[0169] A time-frequency information extraction module: inputs the time-frequency features of the labeled data and the time-frequency features of the enhanced unlabeled data into two time-frequency information extraction modules sharing parameters respectively, extracts distance information on the time-frequency domain of the input data based on self-attention convolution, and obtains a self-attention feature map corresponding to the labeled data and a self-attention feature map corresponding to the unlabeled data;
[0170] A model training module: inputs the self-attention feature map corresponding to the labeled data into a linear layer E1, outputs a corresponding carbon emission parameter, and calculates a supervised loss; inputs the self-attention feature map corresponding to the unlabeled data into linear layers E1 and E2, calculates a consistency loss of the strong enhanced unlabeled data and the weak enhanced unlabeled data after being output by the carbon monitoring model, constructs an unsupervised loss based on the consistency loss calculation and gradient density; and trains the carbon monitoring model based on the supervised loss and the unsupervised loss.
[0171] In the exemplary embodiments, a computer readable storage medium including instructions, such as a memory including instructions, is also provided, which can be executed by a processor to complete the above method. The storage medium can be a computer readable storage medium, for example, the computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0172] It is obvious to a person skilled in the art that the present application is not limited to the details of the above exemplary embodiments, but can be implemented in other concrete forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered in all aspects as exemplary and non-limiting, and the scope of the present application is defined by the appended claims rather than the above description, and therefore all changes falling within the meaning and range of the equivalent elements of the claims are intended to be embraced in the present application, and any reference signs in the claims should not be considered as limiting the claims involved.
[0173] Furthermore, it should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, and the present specification is described in this way only for the sake of clarity, and a person skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by a person skilled in the art.
Claims
1. A CEMS carbon monitoring method, characterized in that, The carbon monitoring model used can output corresponding carbon emission parameters based on the real-time operating data of thermal power units. The training process of the carbon monitoring model includes: Historical operating data of thermal power units is used as input data. Some data is manually labeled to generate tagged data, while the rest is treated as unlabeled data. Wavelet transform was used to extract time-frequency features from labeled and unlabeled data; Strong and weak enhancements were applied to the time-frequency features of the unlabeled data, respectively. The time-frequency features of labeled data and the time-frequency features of enhanced unlabeled data are respectively input into two time-frequency information extraction modules with shared parameters. The distance information in the time-frequency domain of the input data is extracted based on self-attention convolution to obtain the self-attention feature map corresponding to labeled data and the self-attention feature map corresponding to unlabeled data. The self-attention feature maps corresponding to the labeled data are input into the linear layer. Output the corresponding carbon emission parameters and calculate the supervised loss; input the self-attention feature map corresponding to the unlabeled layer into the linear layer. , The consistency loss of strongly enhanced and weakly enhanced unlabeled data after passing through the carbon monitoring model is calculated. An unsupervised loss is constructed based on the consistency loss and gradient density. The carbon monitoring model is then trained based on the supervised and unsupervised losses, specifically including: Construct an unsupervised loss weighting function; use the weakly augmented unlabeled data as pseudo-labels, and set the confidence level of the pseudo-labels. It follows a dynamically changing truncated Gaussian distribution; in the... In this iteration, the mean and variance of the confidence distribution of the pseudo-labels are respectively and The weighting function is defined as: ; in, The weights representing unsupervised loss. The maximum weight is the unlabeled data, and p is the output of the carbon monitoring model. and The following estimates were obtained through model predictions on historical batches: ; ;in, It is the momentum parameter of the exponential moving average. and These are the mean and variance of the current batch; the pseudo-label distribution is defined as the expected value of the carbon monitoring model's prediction for unlabeled data. Each pseudo-label is normalized using the following formula: ;in, This indicates a uniform alignment operation. It is a uniform distribution of the target category. The current pseudo-label distribution is estimated using EMA. Ensure the probability is normalized to 1; normalized pseudo-labels after a uniform alignment operation are used to recalculate sample weights, thereby balancing the quantity and quality of pseudo-labels; construct the overall loss function. The carbon monitoring model is trained; the overall loss function consists of supervised loss. and unsupervised loss composition: ; For the first training data in a batch The self-attention feature map corresponding to an unlabeled data point after weak enhancement.
2. The CEMS carbon monitoring method according to claim 1, characterized in that, The process of acquiring historical operating data of thermal power units as unlabeled data, and manually labeling a portion of the unlabeled data to generate labeled data, specifically includes: Acquire a dataset of historical operating data for the unit, including fuel-related parameters, unit operating parameters, and environmental and operational parameters; From one part of the historical operational data dataset, select historical operational data from multiple time points and label them with carbon emission tags to obtain multiple labeled data, forming a labeled dataset; randomly select historical operational data from multiple time points in another part of the multidimensional time series to obtain multiple unlabeled data, forming an unlabeled dataset.
3. The CEMS carbon monitoring method according to claim 1, characterized in that, The step of using wavelet transform to extract time-frequency features from labeled and unlabeled data specifically includes: Labeled and unlabeled data are collectively referred to as input data. For input data Perform wavelet transform: ; in, This represents the wavelet transform result. For wavelet basis functions, It is the dilation factor that realizes basic wavelet stretching. It is a translation factor that reflects the displacement of the wavelet function during the transformation.
4. The CEMS carbon monitoring method according to claim 1, characterized in that, The time-frequency features of the unlabeled data were enhanced strongly and weakly, respectively, specifically including: Weak enhancement samples were obtained by adding Gaussian noise to the time-frequency features of unlabeled data; strong enhancement samples were obtained by setting different sampling rates and shifting.
5. The CEMS carbon monitoring method according to claim 1, characterized in that, The process involves inputting the time-frequency features of labeled data and the enhanced time-frequency features of unlabeled data into two time-frequency information extraction modules that share parameters. Distance information in the time-frequency domain of the input data is extracted based on self-attention convolution, resulting in self-attention feature maps corresponding to labeled data and unlabeled data. Specifically, this includes: The input time-frequency features are used to generate feature maps using a convolutional network, and then passed through three convolutional structures to serve as the query, key, and value of the time-frequency features: , , ; ; ; ; in, The time-frequency features are input into the convolutional network to generate feature maps. , , They are key, query, and value, respectively. , and These are the parameter matrices corresponding to the convolution kernels of the three convolutional structures; This is the similarity score matrix. Scaling factor For attention weights, This is a self-attention feature map.
6. The CEMS carbon monitoring method according to claim 1, characterized in that, The self-attention feature map corresponding to the labeled data is input into the linear layer. Output the corresponding carbon emission parameters and calculate the supervised loss, specifically including: Supervision loss is directly applied using a linear layer The output results are calculated using a gradient balancing mechanism: ; ; in, For gradient norm, This is the self-attention feature map corresponding to the labeled data. For authentic carbon emission labels with tagged data, This indicates the set number of tagged data items. For gradient density, It is the length of the effective interval, used for normalization; Let the gradient norm of the k-th input be defined as... Related functions ;when hour, ,otherwise ; A weight is assigned to each labeled data point using gradient density: ; The weight of the i-th labeled data. Let be the gradient norm of the i-th labeled data; When the carbon emission parameters output by the carbon monitoring model are carbon emission level classifications, the monitoring loss... for: ; Cross-entropy; When the carbon emission parameters output by the carbon monitoring model are classified as carbon dioxide concentration, the monitoring loss is... for: 。 7. The CEMS carbon monitoring method according to claim 1, characterized in that, The self-attention feature map corresponding to the unlabeled layer is input into the linear layer. , The consistency loss of strongly enhanced and weakly enhanced unlabeled data after passing through the carbon monitoring model is calculated. Based on the consistency loss, an unsupervised loss is constructed using the gradient density. Specifically, this includes: Calculate the consistency loss between strongly enhanced and weakly enhanced unlabeled data after passing through the carbon monitoring model output. : ; For the first training data in a batch The self-attention feature map corresponding to the unlabeled data after strong enhancement. For the first training data in a batch The self-attention feature map corresponding to the unlabeled data after weak enhancement Cross-entropy; Introducing gradient density To measure the gradient norm Density in the sample distribution: ; ; in, This indicates the number of unlabeled data points in a batch of training data. It is the length of the effective interval, used for normalization; Let the gradient norm of the k-th input be defined as... Related functions ;when hour, ,otherwise ; Through gradient density Assign a weight to each unlabeled data point: ; Combined with the process The output results include the weights of each unlabeled data point, and the calculation of the unsupervised loss. When the carbon emission parameters output by the carbon monitoring model are carbon emission level classifications, the unsupervised loss is based on gradient balancing. for: ; Combined with the process The output results are calculated based on the unsupervised loss using cross-entropy. : ; When the carbon emission parameters output by the carbon monitoring model are classified as carbon dioxide concentrations, the unsupervised loss is based on gradient balancing. for: ; Combined with the process The output results are calculated based on the unsupervised loss using cross-entropy. : ; Ultimate unsupervised loss for: 。 8. A CEMS carbon monitoring system, characterized in that, include: Data acquisition module: Acquires historical operating data of thermal power units as unlabeled data, and manually labels some of the unlabeled data to generate labeled data; Time-frequency feature extraction module: Wavelet transform is used to extract time-frequency features from labeled and unlabeled data; Data augmentation module: Strong and weak augmentation were performed on the time-frequency features of the unlabeled data, respectively; Time-frequency information extraction module: The time-frequency features of labeled data and the enhanced time-frequency features of unlabeled data are input into two time-frequency information extraction modules with shared parameters. The distance information in the time-frequency domain of the input data is extracted based on self-attention convolution to obtain the self-attention feature map corresponding to the labeled data and the self-attention feature map corresponding to the unlabeled data. Model training module: Inputs the self-attention feature maps corresponding to the labeled data into the linear layer. Output the corresponding carbon emission parameters and calculate the supervised loss; input the self-attention feature map corresponding to the unlabeled layer into the linear layer. , The consistency loss of strongly enhanced and weakly enhanced unlabeled data after being output by the carbon monitoring model is calculated, and an unsupervised loss is constructed based on the consistency loss and gradient density. The carbon monitoring model is trained based on the supervised and unsupervised losses, specifically including: Construct an unsupervised loss weighting function; use the weakly augmented unlabeled data as pseudo-labels, and set the confidence level of the pseudo-labels. It follows a dynamically changing truncated Gaussian distribution; in the... In this iteration, the mean and variance of the confidence distribution of the pseudo-labels are respectively and The weighting function is defined as: ; in, The weights representing unsupervised loss. The maximum weight is the unlabeled data, and p is the output of the carbon monitoring model. and The following estimates were obtained through model predictions on historical batches: ; ;in, It is the momentum parameter of the exponential moving average. and These are the mean and variance of the current batch; the pseudo-label distribution is defined as the expected value of the carbon monitoring model's prediction for unlabeled data. Each pseudo-label is normalized using the following formula: ;in, This indicates a uniform alignment operation. It is a uniform distribution of the target category. The current pseudo-label distribution is estimated using EMA. Ensure the probability is normalized to 1; normalized pseudo-labels after a uniform alignment operation are used to recalculate sample weights, thereby balancing the quantity and quality of pseudo-labels; construct the overall loss function. The carbon monitoring model is trained; the overall loss function consists of supervised loss. and unsupervised loss composition: ; For the first training data in a batch The self-attention feature map corresponding to an unlabeled data point after weak enhancement.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Semi-supervised radar radiation source individual identification method and system based on SMCFN model in combination with CFNO
CN117668639A
Semi-supervised HRRP noise label filtering method based on early learning guidance
CN118395295A