Carbon emission factor correction method and device based on dynamic energy composition analysis

By constructing a multi-dimensional feature tensor and physical constraint change model, combined with Monte Carlo Dropout and attention mechanism, the static and hysteresis problems of carbon emission factors are solved, and high-precision dynamic prediction and interpretability of carbon emission factors are achieved to meet carbon verification and audit requirements.

CN120258301BActive Publication Date: 2025-09-30NINGXIA LGG INSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510318923.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-09-30
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

Existing carbon emission accounting methods rely on static emission factors, which leads to large errors, cannot meet real-time data needs, and lack explainability, making it difficult to meet carbon verification and audit requirements.

Method used

By obtaining the calorific value of coal and the proportion of green electricity in the power grid, a multi-dimensional feature tensor is constructed. By combining the time, space and energy dimension information, an encoder and decoder are used to establish a physical constraint change model, and the Monte Carlo Dropout and attention mechanism are combined to correct the carbon emission factor.

Benefits of technology

It achieves dynamic calibration of carbon emission factors in seconds, reduces accounting errors, improves model generalization and interpretability, and meets the real-time data needs of the carbon trading market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258301B_ABST
    Figure CN120258301B_ABST
Patent Text Reader

Abstract

The present application relates to the field of intelligent monitoring technology, and in particular to a method and device for correcting carbon emission factors based on dynamic energy composition analysis, which includes: obtaining coal calorific value data and grid green electricity ratio data, and constructing a multidimensional feature tensor based on time, space, and energy dimension information; constructing a physical constraint change model based on the multidimensional feature tensor, including an encoder and a decoder, calculating the theoretical carbon emission factor and dual-drive loss value based on the encoder and decoder, and obtaining the degree of deviation between the prediction and the theoretical carbon emission factor; determining the number of Monte Carlo Dropout sampling times based on the degree of deviation, obtaining the prediction result and calculating the uncertainty interval of the carbon emission factor, determining the attention weight matrix based on the region or characteristics of the carbon emission factor uncertainty interval, tracing the key influencing factors, and correcting the model to achieve accurate carbon emission factor prediction. As a result, the problems of static carbon emission factors, hysteresis, and low interpretability in the existing technology are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent monitoring technology, and in particular to a method and device for correcting carbon emission factors based on dynamic energy composition analysis. Background Art

[0002] Currently, the mainstream approach to carbon emissions accounting relies on a static emission factor method, which primarily relies on default values ​​from international organizations or specific regions, such as the IPCC standards. However, due to the dynamic fluctuations in energy composition, this traditional approach faces significant error challenges: the calorific value of coal can fluctuate by up to ±20% depending on the origin and batch, while the penetration of green electricity in the power grid can fluctuate by over 30% on a minute-by-minute basis, driven by real-time changes in wind and solar power generation. However, traditional accounting methods still use annual average data, resulting in errors that generally exceed 15%.

[0003] Existing improvements to this problem primarily focus on regression analysis of historical data or employ simple time series models. However, these approaches still suffer from three significant shortcomings: First, these models fail to effectively couple with the physical combustion equations, leading to significant deviations between predictions and actual results in small sample sizes. Second, data timeliness is significantly insufficient. The day-ahead prediction model commonly used in current research falls far short of meeting the carbon trading market's urgent need for minute-by-minute data updates. Finally, cross-regional data silos are a significant issue, significantly reducing the generalization performance of models trained in a single region when faced with heterogeneous energy mixes. For example, actual measurement data from a thermal power plant showed that carbon emissions calculations using the static factor method deviated by 18.3% from the measured values. Even a dynamic model based on LSTM, ignoring real-time changes in boiler efficiency, resulted in a 9.6% error. Furthermore, existing technologies lack interpretable analysis of emission factor changes, making them difficult to meet the stringent requirements of carbon verification audits. Summary of the Invention

[0004] The present application provides a carbon emission factor correction method and device based on dynamic energy composition analysis to solve the problems of static carbon emission factors, hysteresis and low interpretability in the prior art.

[0005] The first aspect of the present application provides a carbon emission factor correction method based on dynamic energy composition analysis, comprising the following steps: obtaining coal calorific value data and grid green electricity ratio data; constructing a multidimensional feature tensor based on the coal calorific value data and the grid green electricity ratio data, combined with time, space and energy dimension information, wherein the multidimensional feature tensor includes decaying sinusoidal time coding, geographic hash space coding and hierarchical energy type coding; constructing a physical constraint change model based on the multidimensional feature tensor, wherein the physical constraint change model includes an encoder and a decoder, calculating a theoretical carbon emission factor and a dual-drive loss value based on the encoder and the decoder, and obtaining the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor based on the theoretical carbon emission factor and the dual-drive loss value; determining the number of Monte Carlo Dropout samplings based on the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor, obtaining a prediction result based on the number of samplings and calculating the uncertainty interval of the carbon emission factor, determining an attention weight matrix based on the region or feature of the carbon emission factor uncertainty interval, tracing key influencing factors based on the attention weight matrix, and correcting the physical constraint change model based on the key influencing factors to achieve accurate carbon emission factor prediction.

[0006] Optionally, the formula for the decaying sinusoidal time coding is:

[0007]

[0008] Where t is the time step number; i is the dimension index; d is the embedding dimension; λ is the decay coefficient;

[0009] The formula for the theoretical carbon emission factor is:

[0010]

[0011] Among them, C ad A is the carbon content of the fuel as received; ad is the ash content of the fuel as received; Q net,ar To receive the basic low calorific value of the fuel;

[0012] The formula for the dual drive loss value is:

[0013] L=β·MSE(EF pred ,EF real )+(1-β)·KL(EF pred ||EF phy )

[0014] Among them, α is the balance coefficient; EF pred Indicates the emission factor finally predicted by the model; EF real Indicates the measured emission factor; EF phyrepresents the theoretical emission factor; KL is the divergence function.

[0015] Optionally, the prediction results are obtained based on the number of sampling times and the uncertainty interval of the carbon emission factor is calculated, including:

[0016] The formula for calculating the dynamic carbon emission factor is:

[0017]

[0018] Where N is the number of sampling times; EF n It represents the model output value of the nth sampling; EF represents the final emission factor prediction value.

[0019] Optionally, tracing the key influencing factors according to the attention weight matrix includes: obtaining the attention weight matrix of the encoder; and calculating the feature contribution according to the attention weight matrix, wherein the formula of the feature contribution is:

[0020]

[0021] Among them, H is the number of attention heads, which indicates the number of different feature interaction patterns learned in parallel by the model; T is the time step, which indicates the time window length of the input sequence; Q t represents the query vector at the current time step t; represents the key vector of the i-th feature in the h-th attention head; Represents the attention weight of the h-th head on feature i at time step t; the key influencing factor is obtained according to the contribution of the feature.

[0022] Optionally, before constructing a multidimensional feature tensor based on coal calorific value data and grid green electricity ratio data, combined with time, space and energy dimension information, it includes: cross-regional pre-training, wherein the pre-training includes obtaining multi-source data, training under a multi-task learning framework based on the multi-source data, predicting the dynamic carbon emission factor for the next time period, and initializing the model by migrating the underlying parameters from the general time series prediction model through transfer learning; dynamically adjusting the model according to the model initialization parameters through the cosine annealing strategy and elastic weight consolidation algorithm, and implementing an automatic rollback mechanism to achieve the target model.

[0023] Optionally, the multi-source data includes historical dispatch data of the power grid and industrial analysis data of coal fed into the coal-fired power plant, wherein the industrial analysis data of coal fed into the coal-fired power plant includes elemental carbon content data and calorific value data. The formula of the elastic weight consolidation algorithm is:

[0024]

[0025] Among them, L newis the prediction error of the current fine-tuning data; λ is the weight controlling the importance of the old task; F i is the Fisher information matrix; θ i Represents the current parameter value of the model; θ old,i is the parameter value after convergence in the pre-training phase.

[0026] Optionally, before constructing a multidimensional feature tensor based on coal calorific value data and grid green electricity ratio data, combined with time, space and energy dimension information, it also includes: constructing a federal architecture; protecting data based on the federal architecture, wherein gradient encryption and differentiation are used to ensure the security of gradient transmission, and the Intel SGX trusted execution environment is used to ensure the isolation and security of data storage; utilizing the data sharing and protection provided by the federal architecture, dynamically weighted averaging to adjust weights according to data freshness and data volume, and when anomalies are detected, eliminating inconsistent gradients, regularly aggregating and storing the global model on the blockchain.

[0027] Optionally, adjust the weights based on data freshness and data volume using the formula:

[0028]

[0029] Among them, n i is the amount of data, t i The time difference between the latest timestamp of the data and the current time.

[0030] The second embodiment of the present application provides a carbon emission factor correction device based on dynamic energy composition analysis, including: an acquisition module for acquiring coal calorific value data and grid green electricity ratio data; a construction module for constructing a multidimensional feature tensor based on the coal calorific value data and the grid green electricity ratio data, combined with time, space and energy dimension information, wherein the multidimensional feature tensor includes attenuated sinusoidal time coding, geographic hash space coding and hierarchical energy type coding; a calculation module for constructing a physical constraint change model based on the multidimensional feature tensor, wherein the physical constraint change model includes an encoder and a decoder, and the physical constraint change model is calculated based on the encoder and the decoder. On the carbon emission factor and the dual-driven loss value, the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor is obtained according to the theoretical carbon emission factor and the dual-driven loss value; a correction module is used to determine the number of Monte Carlo Dropout samplings according to the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor, obtain the prediction result according to the sampling number and calculate the uncertainty interval of the carbon emission factor, determine the attention weight matrix according to the area or characteristics of the uncertainty interval of the carbon emission factor, trace the key influencing factors according to the attention weight matrix, and correct the physical constraint change model according to the key influencing factors, so as to finally achieve accurate carbon emission factor prediction.

[0031] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to perform the carbon emission factor correction method based on dynamic energy composition analysis as described in the above embodiment.

[0032] Therefore, this application has at least the following beneficial effects:

[0033] This embodiment of the application uses a high-frequency IoT sensor network to collect multi-dimensional data such as coal calorific value and green electricity ratio in real time, builds a feature engine that integrates spatiotemporal position coding, and designs a Transformer model enhanced with physical constraints to achieve dynamic calibration of emission factors in seconds. Specific goals include:

[0034] 1) Break through the linear assumption of the static factor method and establish a nonlinear dynamic mapping relationship between calorific value and emission factor to further reduce the calculation error;

[0035] 2) Integrate multi-regional data through a federated learning framework to improve model generalization capabilities while protecting data;

[0036] 3) Use the self-attention mechanism to analyze key influencing variables and generate traceability reports that meet audit requirements;

[0037] 4) Support lightweight deployment at the edge to meet the real-time computing needs of power plants, power grids and other scenarios;

[0038] This application can be applied to carbon quota trading and enterprise process optimization. For example, dynamic carbon emission factors can be used as a benchmark for real-time carbon price calculations, or to guide coal-fired units in adjusting fuel blending ratios to reduce carbon costs. This is expected to promote the transformation of carbon accounting from "ex post statistics" to "precise process control." This solves the problems of static carbon emission factors, hysteresis, and low interpretability in existing technologies.

[0039] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0041] Figure 1 A flowchart of a carbon emission factor correction method based on dynamic energy composition analysis provided in accordance with an embodiment of the present application;

[0042] Figure 2 A flowchart of a carbon emission factor correction method based on dynamic energy composition analysis according to one embodiment of the present application;

[0043] Figure 3 This is an example diagram of a carbon emission factor correction system based on dynamic energy composition analysis according to one embodiment of the present application;

[0044] Figure 4 This is a block diagram of an exemplary device for correcting carbon emission factors based on dynamic energy composition analysis according to an embodiment of the present application;

[0045] Figure 5 A schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0047] The following describes the carbon emission factor correction method and device based on dynamic energy component analysis of the embodiment of the present application with reference to the accompanying drawings. In response to the problem of static carbon emission factors mentioned in the above background technology, the present application provides a carbon emission factor correction method based on dynamic energy component analysis. In this method, a comprehensive feature tensor is constructed by integrating the calorific value of coal, the proportion of green electricity in the power grid, and multi-dimensional data in time, space and energy dimensions, and a specific encoding technology is introduced to enhance the model's sensitivity to changes in time periodicity, geographical location and energy type. The physical constraint change model established by the encoder and decoder is combined with the theoretical carbon emission factor and the dual-drive loss value to achieve high-precision dynamic prediction of the carbon emission factor. In addition, the Monte Carlo Dropout technology is used to quantify the prediction uncertainty, and the key influencing factors are traced through the attention mechanism to further improve the accuracy and generalization ability of the model. As a result, the problems of static carbon emission factors, hysteresis and low interpretability in the existing technology are solved.

[0048] The following describes the disaster warning control method, device and equipment based on changes in meteorological element information according to an embodiment of the present application with reference to the accompanying drawings.

[0049] Specifically, Figure 1 A flow chart of a carbon emission factor correction method based on dynamic energy composition analysis provided in an embodiment of the present application.

[0050] like Figure 1 As shown in FIG, the carbon emission factor correction method based on dynamic energy composition analysis includes the following steps:

[0051] In step S101, the calorific value data of coal and the green electricity ratio data of the power grid are obtained.

[0052] Among them, the calorific value of coal refers to the heat released when a unit mass of coal is completely burned; the green electricity proportion data of the power grid refers to the proportion of electricity from renewable energy in the power grid.

[0053] It can be understood that the embodiments of the present application can timely discover problems and potential risks in the energy system by acquiring and analyzing coal calorific value data and green electricity ratio data in the power grid, understand the development trend of renewable energy in the power grid, and provide data support for energy transformation.

[0054] It should be noted that the method of obtaining the calorific value data of coal is to use the fusion detection of laser induced breakdown spectroscopy sensor and near-infrared spectroscopy sensor, deployed on the coal conveyor belt or pulverizer inlet, with a sampling frequency of ≥1 time / minute and a calorific value detection error of ≤±0.5MJ / kg; the data on the proportion of green electricity in the power grid is obtained by collecting distribution node data through smart electricity meters, and accessing the power dispatching system API to obtain the real-time clean energy output ratio of cross-regional power transmission, with a data update cycle of ≤15 seconds; sliding window standardization is performed at the edge computing node (window length 30 minutes, step length 5 minutes), and the isolation forest algorithm is used to eliminate outliers in real time (confidence level >99%).

[0055] In step S102, a multidimensional feature tensor is constructed based on the coal calorific value data and the green electricity ratio data of the power grid, combined with the time, space and energy dimension information, wherein the multidimensional feature tensor includes a decaying sinusoidal time code, a geographic hash space code and a hierarchical energy type code.

[0056] Among them, multidimensional feature tensor can be a data structure used to store feature data with multiple dimensions; decaying sinusoidal time coding can capture the periodicity and nonlinear characteristics of time series data by converting time information into a sinusoidal waveform and performing decay processing; geo-hash spatial coding can be a method of converting geographic coordinates into a fixed-length string representation for indexing and retrieval of spatial data; hierarchical energy type coding can be a method of hierarchically encoding different types of energy to distinguish the differences and hierarchical relationships between different energy types.

[0057] It can be understood that the embodiment of the present application not only improves the accuracy and comprehensiveness of data analysis by integrating coal calorific value data with grid green electricity ratio data, and introduces information in three dimensions of time, space and energy, but also provides a rich perspective for subsequent analysis and prediction. Through technologies such as decaying sinusoidal time coding, geo-hash spatial coding and hierarchical energy type coding, the multidimensional feature tensor can capture the periodicity and nonlinear characteristics of time series, realize rapid matching and query of spatial data, and detailed distinction of energy types. The application of these coding technologies further enhances the readability and analysis efficiency of the data. In addition, the multidimensional feature tensor also provides strong support for accurate prediction and in-depth analysis. By constructing a prediction model based on this tensor, accurate prediction of key indicators such as energy use and carbon emissions can be achieved.

[0058] In the embodiment of the present application, the formula for decaying sinusoidal time coding is:

[0059]

[0060] Among them, t is the time step number; i is the dimension index; d is the embedding dimension; λ is the decay coefficient.

[0061] Specifically, the time dimension uses decaying sinusoidal time coding, and the formula is:

[0062]

[0063] Where t is a scalar, the time step number, indicating the position of the current data point in the time series; i is an integer, the dimension index, controlling the frequency distribution of the sine function, cyclically ranging from 0 to d / 2-1; d is a fixed constant, the embedding dimension, indicating the total length of the feature vector (must be an even number); λ is a hyperparameter, the decay coefficient, controlling the exponential decay rate of the weight of historical data. A larger value increases the importance of recent data, strengthening the weight of recent data and suppressing the interference of historical noise.

[0064] Spatial dimension: A unique geohash spatial code (Geohash precision level 8) is assigned to each generator set / grid node and embedded into the feature vector.

[0065] Energy type coding: Use a hierarchical labeling system (first-level classification: fossil energy / renewable energy; second-level classification: coal / gas / wind power / photovoltaic) and adopt dual-channel embedding vector fusion.

[0066] In an embodiment of the present application, before constructing a multidimensional feature tensor based on coal calorific value data and green electricity ratio data of the power grid, combined with time, space and energy dimension information, it includes: cross-regional pre-training, wherein the pre-training includes obtaining multi-source data, training under a multi-task learning framework based on the multi-source data, predicting the dynamic carbon emission factor for the next time period, and initializing the model by migrating the underlying parameters from the general time series prediction model through transfer learning; dynamically adjusting the model according to the model initialization parameters through the cosine annealing strategy and the elastic weight consolidation algorithm, and implementing an automatic rollback mechanism to achieve the target model.

[0067] The multi-source data may include historical dispatch data of the power grid and industrial analysis data of coal fed into coal-fired power plants, wherein the industrial analysis data of coal fed into coal-fired power plants may include elemental carbon content data and calorific value data.

[0068] It is understandable that the embodiment of the present application integrates diverse data from different regions, covering energy use, carbon emissions, economic activities and other aspects through a cross-regional pre-training strategy. On this basis, a multi-task learning framework is adopted to enable the model to handle multiple related tasks at the same time, such as predicting carbon emission factors and energy demand, so as to learn deeper features. At the same time, transfer learning is used to migrate the underlying parameters from the general time series prediction model to initialize the new model, which accelerates the training process and improves accuracy. During the training process, the cosine annealing strategy and elastic weight consolidation algorithm are implemented for dynamic adjustment, and an automatic rollback mechanism is introduced to ensure the stability and reliability of model training, which significantly improves the model's prediction accuracy for the dynamic carbon emission factors of the next time period, enhances the generalization ability of the model, and improves training efficiency.

[0069] Specifically, a provincial power grid is simulated to cover 3 thermal power clusters, 5 wind farms and 2 photovoltaic bases, with a total installed capacity of 18GW.

[0070] In the embodiment of the present application, the formula of the elastic weight consolidation algorithm is:

[0071]

[0072] Where Lnew is the prediction error of the current fine-tuning data; λ is the weight controlling the importance of the old task; Fi is the Fisher information matrix; θ i Represents the current parameter value of the model; θ old,i is the parameter value after convergence in the pre-training phase.

[0073] Specifically, the pre-training task is carried out under the multi-task learning framework, which includes the following key components:

[0074] Main Task: The main goal is to predict the dynamic carbon emission factor for the next period. To achieve this goal, the model uses the mean absolute error (MAE) loss as the optimization objective to ensure that the error between the predicted carbon emission factor and the actual value is minimized.

[0075] Auxiliary Task: To enhance the robustness and generalization capabilities of the model, an auxiliary task, reconstructing missing sensor data, is introduced. This task simulates scenarios with missing data using a Generative Adversarial Network (GAN) and trains the model to accurately reconstruct the missing data. This not only helps the model maintain performance when dealing with incomplete data but also enables it to learn deeper data features.

[0076] Model initialization: To improve training efficiency and model accuracy, we use transfer learning to migrate underlying parameters from a common time series prediction model to initialize a new model. This approach fully leverages the prior knowledge of the existing model and provides a solid foundation for the model to learn on new tasks.

[0077] Online fine-tuning mechanism:

[0078] Dynamic learning rate adjustment: To balance model convergence speed and stability, a cosine annealing strategy is used to adjust the learning rate. The initial learning rate is set to 1e-4, and the cycle is set to 24 hours. This means that every 24 hours, the learning rate is adjusted according to the changing pattern of the cosine function. This strategy helps the model converge quickly in the early stages of training and allows for fine-tuning of parameters later to achieve better performance.

[0079] Catastrophic forgetting suppression: To prevent the model from forgetting the learned knowledge during training, the elastic weight consolidation algorithm is introduced. The elastic weight consolidation algorithm formula is:

[0080]

[0081] Among them, L new is the prediction error of the current fine-tuning data; λ is the weight controlling the importance of the old task; F i is the Fisher information matrix; θ i Represents the current parameter value of the model; θ old,i is the parameter value after convergence in the pre-training phase;

[0082] Model version management: When the validation set error increases by more than 5% for three consecutive times, it will automatically roll back to the historical best version.

[0083] In an embodiment of the present application, before constructing a multidimensional feature tensor based on coal calorific value data and grid green electricity ratio data, combined with time, space and energy dimension information, it also includes: constructing a federal architecture; protecting data based on the federal architecture, wherein gradient encryption and differentiation are used to ensure the security of gradient transmission, and the Intel SGX trusted execution environment is used to ensure the isolation and security of data storage; utilizing the data sharing and protection provided by the federal architecture, dynamically weighted averaging adjusts weights according to data freshness and data volume, and when anomalies are detected, eliminates inconsistent gradients, regularly aggregates and stores the global model on the blockchain.

[0084] It is understandable that the embodiment of the present application allows data holders to jointly conduct model training and data analysis without sharing the original data by constructing a federal architecture. At the same time, a number of protection measures have been taken, including the use of gradient encryption and differential technology to ensure the security of gradient transmission, and the introduction of the Intel SGX trusted execution environment to ensure the isolation and security of data storage. In addition, the weights are adjusted by the dynamic weighted average method, the model training is optimized according to the freshness and amount of data, and abnormal or inconsistent gradients are automatically removed, which not only improves the accuracy and generalization ability of the model, but also significantly enhances the security of the data. The adoption of the federal architecture breaks the data silos, promotes the efficient circulation and sharing of data, and ensures the transparency and traceability of the model by storing the global model through the blockchain.

[0085] In the embodiment of the present application, the weight is adjusted according to the data freshness and data volume, and the weight formula is:

[0086]

[0087] Among them, n i is the amount of data, t i The time difference between the latest timestamp of the data and the current time.

[0088] Specifically, the federal architecture is designed to:

[0089] Participant roles: Data holders: power generation companies (coal quality data), provincial power grids (green electricity data), industrial parks (energy consumption data); coordination nodes: deployed on blockchain platforms (such as Hyperledger Fabric), responsible for gradient aggregation and model distribution; communication protocol: gRPC long connection + Protobuf data serialization, supporting 10,000 concurrent updates per second.

[0090] Protection mechanism:

[0091] Gradient encryption: Using the Paillier homomorphic encryption algorithm, gradients are calculated locally and then encrypted for transmission. The public key is distributed by the coordinating node. Differential protection: Gaussian noise is added during gradient updates (noise standard deviation σ = 0.01, budget ε = 1.0). Data isolation: Each participant's local data is stored in an encrypted container (Intel SGX trusted execution environment).

[0092] Federation aggregation strategy:

[0093] Dynamic weighted average: weights are assigned based on data freshness (time decay factor) and data volume. The formula is:

[0094]

[0095] Among them, n i is the amount of data, t i The difference between the latest timestamp of the data and the current time;

[0096] Anomaly detection: Calculate the cosine similarity between the participant gradient and the global gradient, and remove abnormal nodes with similarity < 0.7;

[0097] Model version control: The global model is aggregated every 6 hours, and an unalterable version hash is generated and stored in the blockchain.

[0098] In step S103, a physical constraint change model is constructed based on the multidimensional feature tensor, wherein the physical constraint change model includes an encoder and a decoder, and the theoretical carbon emission factor and the dual-drive loss value are calculated based on the encoder and the decoder. The degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor is obtained based on the theoretical carbon emission factor and the dual-drive loss value.

[0099] Among them, the theoretical carbon emission factor is an estimated value of carbon emissions calculated based on physical principles and known conditions; the dual-drive loss value may refer to a comprehensive loss value that takes into account the prediction error of carbon emissions and model complexity; the encoder is set to a 12-layer multi-head self-attention mechanism (8 heads) with an input dimension of 512; the decoder is set to a 4-layer cross-attention mechanism with an integrated fuel carbon oxidation rate physical equation constraint module.

[0100] It is understandable that the embodiment of the present application constructs a physical constraint change model capable of processing multi-dimensional feature tensors by introducing encoder and decoder structures. The model can efficiently extract key information from complex factors such as energy type, production process, equipment efficiency, and calculate the theoretical carbon emission factor in the latent space. By designing a dual-drive loss function, the model not only focuses on prediction accuracy, but also ensures that the predicted value meets the physical constraints, thereby improving the accuracy and physical rationality of the model. By comparing the predicted carbon emission factor with the theoretical carbon emission factor, the degree of deviation of the model prediction can be quantified, providing a basis for model improvement, which not only improves the prediction accuracy of the carbon emission factor, but also enhances the interpretability and robustness of the model.

[0101] In the embodiment of the present application, the formula for the theoretical carbon emission factor is:

[0102]

[0103] Among them, C ad A is the carbon content of the fuel as received; ad is the ash content of the fuel as received; Q net,ar To receive the basic low calorific value of the fuel;

[0104] The formula for the dual-drive loss value is:

[0105] L=β·MSE(EF pred ,EF real )+(1-β)·KL(EF pred ||EF phy )

[0106] Among them, α is the balance coefficient; EF pred Indicates the emission factor finally predicted by the model; EF real Indicates the measured emission factor; EF phy represents the theoretical emission factor; KL is the divergence function.

[0107] In step S104, the number of Monte Carlo Dropout sampling is determined according to the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor, the prediction result is obtained according to the sampling number and the uncertainty interval of the carbon emission factor is calculated, the attention weight matrix is ​​determined according to the region or characteristics of the uncertainty interval of the carbon emission factor, the key influencing factors are traced according to the attention weight matrix, and the physical constraint change model is corrected according to the key influencing factors to achieve accurate carbon emission factor prediction.

[0108] Among them, Monte Carlo Dropout is a method to estimate the uncertainty of model prediction by randomly discarding some neurons in the neural network. The attention weight matrix can be the importance of different input features in the prediction process; the key influencing factors can be key factors or features that have a significant impact on the prediction results.

[0109] It is understandable that the embodiment of the present application adopts the Monte Carlo Dropout sampling technology, which flexibly adjusts the number of sampling times according to the degree of deviation between the predicted carbon emission factor and the theoretical value, effectively reducing the random error of the prediction and improving the prediction accuracy. At the same time, by calculating the uncertainty interval of the carbon emission factor, a quantitative evaluation is provided for the prediction results, which enhances the scientific nature of the decision-making. Furthermore, the attention weight matrix is ​​constructed using the characteristics of the uncertainty interval, and the key factors affecting the carbon emission prediction are successfully traced, providing a strong basis for the formulation of emission reduction strategies. Finally, the physical constraint change model is optimized based on these key influencing factors, which significantly improves the predictive ability and adaptability of the model, enabling it to respond to various complex scenarios more accurately.

[0110] In the embodiment of the present application, the prediction result is obtained according to the number of sampling times and the uncertainty interval of the carbon emission factor is calculated, including: the formula for calculating the dynamic carbon emission factor is:

[0111]

[0112] Where N is the number of sampling times; EF n Represents the model output value of the nth sampling; Represents the final emission factor prediction value.

[0113] In an embodiment of the present application, tracing the key influencing factors according to the attention weight matrix includes: obtaining the attention weight matrix of the encoder; calculating the feature contribution according to the attention weight matrix, wherein the formula of the feature contribution is:

[0114]

[0115] Among them, H is the number of attention heads, which indicates the number of different feature interaction patterns learned in parallel by the model; T is the time step, which indicates the time window length of the input sequence; Q t represents the query vector at the current time step t; represents the key vector of the i-th feature in the h-th attention head; represents the attention weight of the h-th head on feature i at time step t;

[0116] The key influencing factors are obtained based on the feature contribution.

[0117] It is understood that the embodiments of this application use an attention weight matrix to intuitively display the contribution of features in predictions, quickly identify key influencing factors, and significantly improve prediction accuracy and reliability. This is particularly important in high-precision scenarios such as carbon emission forecasting. At the same time, it promotes the optimization of model structure, improves operational efficiency and computing speed. In addition, it enhances the interpretability of prediction results, enabling a clear understanding of the key factors affecting the prediction.

[0118] According to the carbon emission factor correction method based on dynamic energy composition analysis proposed in the embodiment of the present application, a comprehensive feature tensor is constructed by integrating the calorific value of coal, the proportion of green electricity in the power grid, and multi-dimensional data in time, space and energy dimensions, and a specific encoding technology is introduced to enhance the model's sensitivity to changes in time periodicity, geographical location and energy type. The physical constraint change model established by the encoder and decoder is combined with the theoretical carbon emission factor and the dual-drive loss value to achieve high-precision dynamic prediction of the carbon emission factor. In addition, the Monte Carlo Dropout technology is used to quantify the prediction uncertainty, and the key influencing factors are traced through the attention mechanism to further improve the accuracy and generalization ability of the model. As a result, the problems of static carbon emission factors, hysteresis and low interpretability in the existing technology are solved.

[0119] The following will illustrate the carbon emission factor correction method based on dynamic energy composition analysis through a specific example. Figure 2 As shown, the following steps are included:

[0120] 1. Real-time data collection of IoT sensors:

[0121] 1.1 Coal calorific value detection: Laser induced breakdown spectroscopy (LIBS) sensor and near-infrared spectroscopy (NIR) sensor fusion detection are used, deployed on the coal conveyor belt or coal mill inlet, with a sampling frequency of ≥1 time / minute and a calorific value detection error of ≤±0.5MJ / kg;

[0122] 1.2 Tracking the proportion of green electricity in the power grid: Smart electricity meters are used to collect data from distribution nodes and access the power dispatch system API to obtain the real-time clean energy output ratio of cross-regional power transmission. The data update cycle is ≤ 15 seconds;

[0123] 1.3 Data preprocessing: Sliding window normalization (window length 30 minutes, step length 5 minutes) is performed on the edge computing node, and the isolation forest algorithm is used to remove outliers in real time (confidence level > 99%).

[0124] 2. Multi-dimensional feature tensor construction:

[0125] 2.1 Spatiotemporal Position Coding:

[0126] Time dimension: using decaying sinusoidal position encoding, the formula is:

[0127]

[0128] Where t is a scalar, the time step number, indicating the position of the current data point in the time series; i is an integer, the dimension index, controlling the frequency distribution of the sine function, cyclically ranging from 0 to d / 2-1; d is a fixed constant, the embedding dimension, indicating the total length of the feature vector (must be an even number); λ is a hyperparameter, the decay coefficient, controlling the exponential decay rate of the weight of historical data. A larger value increases the importance of recent data, strengthening the weight of recent data and suppressing the interference of historical noise.

[0129] Spatial dimension: A unique geographic hash code (Geohash precision level 8) is assigned to each generator set / grid node and embedded into the feature vector.

[0130] 2.2 Energy type coding: A hierarchical labeling system is used (first-level classification: fossil energy / renewable energy; second-level classification: coal / gas / wind power / photovoltaic), and dual-channel embedding vector fusion is adopted.

[0131] 3. Physical constraint Transform modeling:

[0132] 3.1 Model Structure

[0133] Encoder: 12-layer multi-head self-attention mechanism (8 heads), input dimension 512;

[0134] Decoder: 4-layer cross-attention mechanism, integrated fuel carbon oxidation rate physical equation constraint module, theoretical carbon emission factor calculation formula is:

[0135]

[0136] Among them, C ad A is the carbon content of the fuel as received (dry basis), detected by elemental analyzer or LIBS sensor; ad Q is the ash content of the fuel as received, reflecting the proportion of the incombustible part during combustion; net,ar The lower calorific value of the fuel as received represents the actual available energy value; 44 / 12 represents the molar mass ratio of CO2 to carbon, which converts the carbon content into the CO2 emission coefficient.

[0137] Loss function: Define the physical-data dual-driven loss:

[0138] L=β·MSE(EF pred ,EF real )+(1-β)·KL(EF pred ||EF phy )

[0139] Among them, α is a hyperparameter, a balance coefficient, which adjusts the weight of data-driven loss and physical consistency loss; EF pred is a scalar, indicating the emission factor finally predicted by the model; EF real is a scalar, indicating the measured emission factor, obtained through the flue gas online monitoring system (CEMS); EF phy is a scalar, representing the theoretical emission factor; KL is the divergence function, Kullback-Leibler divergence, which measures the degree of deviation between the predicted value distribution and the theoretical value.

[0140] 3.2 Online Inference: Model calculation is triggered every 5 minutes, accelerated by the TensorRT engine, and the inference delay is less than 50ms.

[0141] 4. Trusted output and traceability:

[0142] 4.1 Uncertainty Assessment: The Monte Carlo Dropout method is used to quantify the uncertainty of the carbon emission factor. The calculation formula of the dynamic carbon emission factor is:

[0143]

[0144] Where N represents the number of sampling times, and the distribution of the predicted value is calculated through multiple forward propagations; EF n Represents the model output value of the nth sampling (keep Dropout activated during inference to simulate randomness); It represents the average value of all sampling results and represents the final emission factor prediction value.

[0145] 4.2 Variable traceability analysis: Extract the encoder's third layer attention weight matrix and calculate the feature contribution:

[0146]

[0147] Where H is the number of attention heads, which indicates the number of different feature interaction patterns learned in parallel by the model; T is the time step, which indicates the time window length of the input sequence (such as the past 24 hours of data); Q t The query vector (Query) at the current time step t is obtained by linearly transforming the input features; The key vector (Key) representing the i-th feature in the h-th attention head is obtained by linearly transforming the input feature; represents the attention weight of the hth head on feature i at time step t. This can output the top three influencing factors and their weight ratios (e.g., wind power output increased by 25% → contribution rate 38.2%).

[0148] In addition, the carbon emission factor correction system based on dynamic energy composition analysis is described according to the regional power grid, such as Figure 3 Shown, including:

[0149] Implementation scenario: Simulate a provincial power grid covering 3 thermal power clusters, 5 wind farms and 2 photovoltaic bases, with a total installed capacity of 18GW.

[0150] 1. Hardware deployment and data integration

[0151] Dynamic data source:

[0152] Thermal power plant: 12 LIBS coal quality monitors (deployed in the coal transportation systems of each power plant) transmit the calorific value of incoming coal in real time (average 20.3 MJ / kg, fluctuation ±15%).

[0153] New energy side: Wind power / photovoltaic SCADA system provides minute-level output data (sampling frequency 5 seconds);

[0154] Inter-provincial power transmission: Obtain the proportion of green electricity in the transmitted power through the power trading platform API (real-time fluctuation range 10%-65%).

[0155] Federation Node:

[0156] Participants: Three municipal power grid companies (managing thermal power, wind power, and photovoltaic clusters respectively);

[0157] Data isolation: Each company's data is stored locally in an encrypted database (AES-256), and only gradient parameters are uploaded to the coordination node.

[0158] 2. Model operation and dynamic factor calculation

[0159] Spatiotemporal feature construction:

[0160] Time dimension: 15 minutes as the time window, embedded decay position coding (λ = 0.02);

[0161] Spatial dimension: Divided into geographical grids (0.1°×0.1°), encoding the energy structure characteristics of each region.

[0162] Federal Training:

[0163] Model structure: 12-layer Transformer encoder (512 hidden layers), physical constraint decoder integrated grid carbon emission theory formula:

[0164]

[0165] Among them EF i is the carbon emission factor of each power source, P i To contribute in real time;

[0166] Training parameters: gradient aggregation every 2 hours, Paillier encryption key length 2048 bits, differential noise σ = 0.005.

[0167] Dynamic Output:

[0168] Update frequency: Release the dynamic emission factor of the entire network every 5 minutes;

[0169] Source analysis: Identify key influencing factors through attention weights (e.g., "a sudden drop in photovoltaic output at 14:00 caused the factor to increase by 0.12kg / kWh").

[0170] 3. Data comparison and effect verification are shown in Table 1 below.

[0171] Table 1 Data comparison

[0172]

[0173] Improved accuracy:

[0174] The mean absolute error (MAE) of the dynamic factor is 0.008 kg / kWh, which is 96% lower than that of the static factor method (0.199) and 86% lower than that of the day-ahead forecast model (0.057).

[0175] At 15:30, due to sudden cloudy weather, the photovoltaic output dropped by 70%. The real-time response error of the dynamic factor was only 1.1%, while the error of the day-ahead prediction model reached 13.2%.

[0176] The actual application effects are as follows:

[0177] Carbon trading optimization: Based on dynamic factors, the power grid company sold quotas at a low carbon factor of 0.45kg / kWh during the green electricity peak period (09:00-11:00), earning an additional 127,000 yuan per day compared to the static factor method;

[0178] Dispatch decision support: When the dynamic factor exceeds the threshold (0.6kg / kWh), the energy storage system is automatically prioritized to reduce the output of high-carbon power sources, reducing carbon emissions by 142 tons per day.

[0179] Cross-regional collaboration: After integrating data from neighboring provinces through federated learning, the model's prediction error in border areas was reduced from 7.3% to 2.8%.

[0180] In summary, through the Transformer model enhanced by IoT dynamic perception and physical constraints, high-precision correction of carbon emission factors is achieved at the minute level, reducing the average error of traditional static methods from 15%-40% to less than 3%. It also supports cross-regional secure collaborative computing and traceability of influencing factors. Compared with existing technologies, this method has achieved breakthroughs in data timeliness (updates in seconds), model interpretability (attribution of attention weights), and multi-source data fusion (federated learning), providing real-time and reliable data support for carbon market transactions and enterprise emission reduction process optimization.

[0181] With the help of high-precision IoT sensors, key parameters such as coal calorific value and green electricity ratio are collected in seconds. Combined with spatiotemporal decay coding technology, a multidimensional feature tensor is constructed, overcoming the data lag problem of traditional static factor methods. A physically constrained Transformer architecture is carefully designed, and the fuel carbon oxidation rate equation is cleverly integrated into the decoding layer, perfectly integrating theoretical emission calculations with data-driven predictions, effectively solving the "black box" problem common in pure AI models. The Monte Carlo Dropout method is used to generate carbon emission factors with confidence intervals, and self-attention weight parsing technology is used to accurately identify key influencing variables. This mechanism meets the strict interpretability requirements of carbon verification audits. Based on the federated learning framework, joint training of multi-region models is achieved. The use of Paillier homomorphic encryption and differential protection technology ensures data security and breaks the island phenomenon of energy data.

[0182] Next, a carbon emission factor correction device based on dynamic energy composition analysis proposed in accordance with an embodiment of the present application will be described with reference to the accompanying drawings.

[0183] Figure 4 It is a block diagram of a carbon emission factor correction device based on dynamic energy composition analysis in an embodiment of the present application.

[0184] like Figure 4 As shown, the carbon emission factor correction device 10 based on dynamic energy composition analysis includes: an acquisition module 100, a construction module 200, a calculation module 300 and a correction module 400.

[0185] Among them, the acquisition module 100 is used to obtain coal calorific value data and grid green electricity ratio data; the construction module 200 is used to construct a multidimensional feature tensor based on the coal calorific value data and the grid green electricity ratio data, combined with time, space and energy dimension information, wherein the multidimensional feature tensor includes attenuated sinusoidal time coding, geographic hash space coding and hierarchical energy type coding; the calculation module 300 is used to construct a physical constraint change model based on the multidimensional feature tensor, wherein the physical constraint change model includes an encoder and a decoder, and the theoretical carbon emission factor and the dual-driven loss value are calculated according to the encoder and the decoder, and the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor is obtained according to the theoretical carbon emission factor and the dual-driven loss value; the correction module 400 is used to determine the number of Monte Carlo Dropout samplings according to the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor, obtain the prediction result according to the number of samplings and calculate the uncertainty interval of the carbon emission factor, determine the attention weight matrix according to the region or characteristics of the carbon emission factor uncertainty interval, trace the key influencing factors according to the attention weight matrix, and correct the physical constraint change model according to the key influencing factors, so as to finally achieve accurate carbon emission factor prediction.

[0186] It should be noted that the above explanation of the embodiment of the carbon emission factor correction method based on dynamic energy component analysis is also applicable to the carbon emission factor correction device based on dynamic energy component analysis of this embodiment, and will not be repeated here.

[0187] According to the carbon emission factor correction device based on dynamic energy composition analysis proposed in the embodiment of the present application, a comprehensive feature tensor is constructed by integrating the calorific value of coal, the proportion of green electricity in the power grid, and multi-dimensional data in time, space and energy dimensions, and a specific encoding technology is introduced to enhance the model's sensitivity to changes in time periodicity, geographical location and energy type. The physical constraint change model established by the encoder and decoder is combined with the theoretical carbon emission factor and the dual-drive loss value to achieve high-precision dynamic prediction of the carbon emission factor. In addition, the Monte Carlo Dropout technology is used to quantify the prediction uncertainty, and the key influencing factors are traced through the attention mechanism, which further improves the accuracy and generalization ability of the model. As a result, the problems of static carbon emission factors, hysteresis and low interpretability in the existing technology are solved.

[0188] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0189] Memory 501 , processor 502 , and computer programs stored in the memory 501 and executable on the processor 502 .

[0190] When the processor 502 executes the program, the carbon emission factor correction method based on dynamic energy composition analysis provided in the above embodiment is implemented.

[0191] Furthermore, the electronic device further includes:

[0192] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0193] The memory 501 is used to store computer programs that can be run on the processor 502 .

[0194] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0195] If the memory 501, processor 502, and communication interface 503 are implemented independently, the communication interface 503, memory 501, and processor 502 can be interconnected via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0196] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0197] The processor 502 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0198] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0199] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this application, "N" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0200] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing a custom logical function or process step, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed in a different order than shown or discussed, including performing functions in a substantially simultaneous manner or in a reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

[0201] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiment, the N steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, it can be implemented using any one or a combination of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0202] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

Claims

1. A carbon emission factor correction method based on dynamic energy composition analysis, characterized in that: The following steps are involved: Obtain data on the calorific value of coal and the proportion of green electricity in the power grid; According to the coal calorific value data and the green electricity ratio data of the power grid, a multidimensional feature tensor is constructed by combining time, space and energy dimension information, wherein the multidimensional feature tensor includes a decaying sinusoidal time code, a geo-hash space code and a hierarchical energy type code, wherein the decaying sinusoidal time code formula is: Where t is the time step number; i is the dimension index; d is the embedding dimension; λ is the decay coefficient, λ = 0.01; Constructing a physical constraint change model based on the multidimensional feature tensor, wherein the physical constraint change model includes an encoder and a decoder, calculating a theoretical carbon emission factor and a dual-drive loss value based on the encoder and the decoder, and obtaining a degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor based on the theoretical carbon emission factor and the dual-drive loss value; The number of Monte Carlo Dropout sampling is determined based on the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor. The prediction result is obtained based on the sampling number and the uncertainty interval of the carbon emission factor is calculated. The attention weight matrix is ​​determined based on the region or characteristics of the uncertainty interval of the carbon emission factor. The key influencing factors are traced based on the attention weight matrix. The physical constraint change model is corrected based on the key influencing factors to achieve accurate carbon emission factor prediction. The formula of the theoretical carbon emission factor is: Among them, C ad A is the carbon content of the fuel as received; ad is the ash content of the fuel as received; Q net,ar To receive the basic low calorific value of the fuel; The formula for the dual drive loss value is: L=β·MSE(EF pred ,EF real )+(1-β)·KL(EF pred ||EF phy ) Among them, β is the balance coefficient; EF pred Indicates the emission factor finally predicted by the model; EF real Indicates the measured emission factor; EF phy represents the theoretical emission factor; KL is the divergence function.

2. The carbon emission factor correction method based on dynamic energy composition analysis according to claim 1 is characterized in that: The prediction results are obtained based on the number of sampling times and the uncertainty range of the carbon emission factor is calculated, including: The formula for calculating the dynamic carbon emission factor is: Where N is the number of sampling times; EF n Represents the model output value of the nth sampling; Represents the final emission factor prediction value.

3. The carbon emission factor correction method based on dynamic energy composition analysis according to claim 1 is characterized in that: According to the attention weight matrix, key influencing factors are traced, including: Get the encoder's attention weight matrix; The feature contribution is calculated according to the attention weight matrix, wherein the formula of the feature contribution is: Among them, H is the number of attention heads, which indicates the number of different feature interaction patterns learned in parallel by the model; T is the time step, which indicates the time window length of the input sequence; Q t represents the query vector at the current time step t; represents the key vector of the i-th feature in the h-th attention head; represents the attention weight of the h-th head on feature i at time step t; The key influencing factors are obtained according to the feature contribution.

4. The carbon emission factor correction method based on dynamic energy composition analysis according to claim 1 is characterized in that: Before constructing a multidimensional feature tensor based on the coal calorific value data and the green electricity ratio data of the power grid, combined with time, space and energy dimension information, the following steps are included: Perform pre-training across regions, where pre-training includes acquiring multi-source data, training under a multi-task learning framework based on the multi-source data, predicting the dynamic carbon emission factor for the next time period, and initializing the model by migrating underlying parameters from a general time series prediction model through transfer learning; According to the model initialization parameters, the cosine annealing strategy and elastic weight consolidation algorithm are used to dynamically adjust the model and implement an automatic rollback mechanism to achieve the target model.

5. The carbon emission factor correction method based on dynamic energy composition analysis according to claim 4 is characterized in that: The multi-source data includes historical dispatch data of the power grid and industrial analysis data of coal fed into coal-fired power plants, wherein the industrial analysis data of coal fed into coal-fired power plants includes elemental carbon content data and calorific value data. The formula of the elastic weight consolidation algorithm is: Among them, L new is the prediction error of the current fine-tuning data; λ is the weight controlling the importance of the old task; F i is the Fisher information matrix; θ i Represents the current parameter value of the model; θ old,i is the parameter value after convergence in the pre-training phase.

6. The carbon emission factor correction method based on dynamic energy composition analysis according to claim 1 is characterized in that: Before constructing a multidimensional feature tensor based on the coal calorific value data and the green electricity ratio data of the power grid and combining time, space and energy dimension information, the method further includes: Building a federal structure; Protecting data based on the federated architecture, using gradient encryption and differentials to ensure the security of gradient transmission, and using the Intel SGX trusted execution environment to ensure the isolation and security of data storage; By leveraging the data sharing and protection provided by the federated architecture, dynamic weighted averaging adjusts weights based on data freshness and volume. When anomalies are detected, inconsistent gradients are removed, and the global model is aggregated regularly and stored on the blockchain.

7. The carbon emission factor correction method based on dynamic energy composition analysis according to claim 6 is characterized in that: The weight is adjusted according to the data freshness and data volume. The weight formula is: Among them, n i is the amount of data, t i is the difference between the latest timestamp of the data and the current time, γ is the control attenuation factor, γ = 0.

1.

8. A carbon emission factor correction device based on dynamic energy composition analysis, characterized in that: include: The acquisition module is used to obtain coal calorific value data and green electricity ratio data of the power grid; A construction module is used to construct a multidimensional feature tensor based on the coal calorific value data and the green electricity ratio data of the power grid, combined with time, space and energy dimension information, wherein the multidimensional feature tensor includes a decaying sinusoidal time code, a geo-hash space code and a hierarchical energy type code, wherein the decaying sinusoidal time code formula is: Where t is the time step number; i is the dimension index; d is the embedding dimension; λ is the decay coefficient, λ = 0.01; a calculation module, configured to construct a physical constraint change model based on the multidimensional feature tensor, wherein the physical constraint change model includes an encoder and a decoder, calculate a theoretical carbon emission factor and a dual-drive loss value based on the encoder and the decoder, and obtain a degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor based on the theoretical carbon emission factor and the dual-drive loss value; A correction module is used to determine the number of Monte Carlo Dropout samplings based on the degree of deviation between the predicted carbon emission factor and the theoretical carbon emission factor, obtain the prediction result based on the sampling number and calculate the uncertainty interval of the carbon emission factor, determine the attention weight matrix based on the region or characteristics of the uncertainty interval of the carbon emission factor, trace the key influencing factors based on the attention weight matrix, and correct the physical constraint change model based on the key influencing factors, ultimately achieving accurate carbon emission factor prediction; wherein, the formula for the theoretical carbon emission factor is: Among them, C ad A is the carbon content of the fuel as received; ad is the ash content of the fuel as received; Q net,ar To receive the basic low calorific value of the fuel; The formula for the dual drive loss value is: L=β·MSE(EF pred ,EF real )+(1-β)·KL(EF pred ||EF phy ) Among them, β is the balance coefficient; EF pred Indicates the emission factor finally predicted by the model; EF real Indicates the measured emission factor; EF phy represents the theoretical emission factor; KL is the divergence function.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the carbon emission factor correction method based on dynamic energy composition analysis as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Carbon accounting process factor correction system based on LSTM network model

    CN118608162A

  • Generative adversarial network-based urban local carbon emission hotspot prediction and regulation method

    CN118982155A