Regional carbon emission prediction method based on fine granularity and application thereof
By constructing a deep learning model with dynamic causal graphs and attention mechanisms, the problem of insufficient causal relationship capture in existing carbon emission predictions is solved, achieving high-precision regional carbon emission prediction and supporting scientific decision-making for differentiated emission reduction policies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-13
AI Technical Summary
Existing carbon emission prediction methods struggle to capture dynamic causal relationships and ignore the dynamic evolution of factors, resulting in systematic biases and unquantifiable risks in the prediction results, and failing to provide reliable predictions with fine granularity.
By constructing a dynamic causal graph, employing a long short-term memory network with an attention mechanism and a graph attention network, and combining transitive entropy and penalty terms, we can finely characterize the dynamics of the power grid and predict the probability distribution of electricity and non-electricity carbon emissions.
It has achieved high-precision prediction of regional carbon emission factors, providing a scientific basis to support the formulation of differentiated emission reduction policies and the dynamic quantitative evaluation of policy effectiveness, effectively mitigating risks.
Smart Images

Figure CN121660188A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of deep learning technology, and in particular to a fine-grained method for predicting regional carbon emissions and its application. Background Technology
[0002] Against the backdrop of addressing climate change and the deepening progress towards "dual carbon" goals, fine-grained carbon emission forecasting has become a task of high strategic importance and urgency. Carbon emission forecasting provides crucial scientific evidence for macroeconomic policy-making and is directly related to the optimization and adjustment of the energy structure, the transformation and upgrading of energy-intensive industries, and coordinated emission reduction among regions. However, achieving fine-grained carbon emission forecasting faces enormous challenges. Because the evolution of carbon emissions is influenced by the synergistic effects of multiple dimensions such as regional population size, industrial structure, and meteorological conditions, coupled with complex inter-regional interactive coupling effects, this places extremely high demands on the forecasting models.
[0003] In recent years, with the rapid development of artificial intelligence technology, deep learning models have been widely used in carbon emission prediction due to their powerful feature learning capabilities and advantages in handling complex patterns. Prediction methods based on graph neural networks (GNNs) capture spatial dependencies by constructing regional association graphs to model spatial interaction relationships, and aggregate neighboring node information through graph propagation mechanisms to achieve modeling of spatial interaction relationships. For example, Wan Junqiang et al. (<A Short-Term Prediction Method and System for Spatial Carbon Emissions Based on Graph Neural Networks, Patent CN202211232236.9>, 2022) learned static spatial associations through graph convolutional networks (GCNs) and then combined them with long short-term memory (LSTM) networks to process time series data to achieve short-term carbon emission prediction. Fan Yubo et al. (<A Method and System for Predicting Carbon Emissions in Industrial Parks Based on Graph Neural Networks, Patent CN202311101980.X>, 2023) generated graph structures for different industrial parks using a Graph Recurrent Neural Network (GNN), and used carbon emission data as features of the graph structures, inputting them into a Spatio-Temporal Graph Convolutional Network (STMN) to predict the carbon emissions of each device within the park. While GNN-based methods can model spatial adjacency or pre-defined causal relationships, the graph structures they rely on are typically static and invariant, making it difficult to capture dynamic interactions between regions caused by sudden events, policy adjustments, and other factors. Furthermore, these methods simplify the relationships between influencing factors to fixed numerical correlations, failing to delve into the dynamic causal relationships evolving over time behind these factors, thus limiting the accuracy and interpretability of the model's prediction results.
[0004] Prediction methods based on hybrid models and feature fusion improve performance by combining different model structures or fusing multi-source data. For example, Wang Yuanyuan et al. (<A Ground-based Carbon Emission Monitoring Method Based on Multi-source Data Interaction Network, Patent CN202311456651.7>, 2023) used a multi-source data interaction network and an attention mechanism to fuse satellite and auxiliary data to achieve ground-based carbon emission monitoring. Ju Yuechuang (China Carbon Emission Prediction Based on Spatiotemporal LightGBM Model [D], Nanjing University of Posts and Telecommunications, 2023) proposed a model based on the spatiotemporal lightweight gradient booster (LightGBM) to capture the nonlinear relationship between carbon emissions and influencing factors. Liu Daliang et al. (<A Method for Predicting Electricity Carbon Emissions by Fusion of Temporal and Structural Features, Patent CN202410930610.5>, 2024) fused the time series model GRU-Transformer and a graph convolutional network based on power grid topology to design a cross-prediction mechanism for information entropy and electricity carbon emission factors. When calculating electricity carbon emissions using the methods described above, coarse-grained electricity carbon emission factors, either annually or at a fixed rate, are commonly used. This ignores hidden carbon emissions resulting from real-time changes in the power generation energy structure and from the grid's efforts to balance renewable energy fluctuations, leading to systematic biases in the prediction results. These models struggle to clearly quantify the specific mechanisms by which each factor affects carbon emissions, and they typically provide a single, deterministic point prediction, failing to measure the inherent uncertainty and risk of the prediction itself and lacking an assessment of the confidence level of the prediction results.
[0005] To address the shortcomings of the aforementioned known methods in areas such as dynamic causal relationship mining, refined calculation of power grid carbon emission factors, and quantification of prediction uncertainties, this application proposes a fine-grained regional carbon emission prediction method. This method aims to reliably predict regional carbon emissions by deeply mining causal logic and finely characterizing power grid dynamics. Summary of the Invention
[0006] The main objective of this application is to provide a fine-grained method for predicting regional carbon emissions, aiming to solve the problem of how to predict regional carbon emissions.
[0007] To achieve the above objectives, this application provides a fine-grained method for predicting regional carbon emissions, the method comprising: S10, Collect historical carbon emission time-series data of the area to be tested, and construct a dynamic causal graph based on the data format of the historical carbon emission time-series data using the transfer entropy. S20, a long short-term memory network with attention mechanism is used to predict the power carbon emission factor of the region to be tested, and the power carbon emission factor is corrected based on three positive penalty terms: structural imbalance, system volatility and structural change rate, to obtain the corrected power carbon emission factor. S30, the dynamic causal graph is injected into the graph attention network as prior knowledge for feature weighting, the feature stream output by the graph attention network is obtained, the feature stream is divided into power consumption stream and non-power consumption stream, and the power consumption stream and non-power consumption stream are co-coded in a time series to predict the probability distribution of power consumption and the probability distribution of non-power carbon emissions. S40, the product of the probability distribution of electricity consumption and the modified electricity carbon emission factor is determined as the probability distribution of electricity carbon emissions, and the carbon emission prediction result of the area to be measured is determined based on the probability distribution of electricity carbon emissions and the probability distribution of non-electricity carbon emissions.
[0008] Optionally, S10 includes: S11, let a fixed length be... The time window is used to generate an independent causal graph for the data segment covered by each time window. Within the current time window, for all Each pair of ordered variables is obtained by combining each characteristic variable in pairs. Iterative calculation of ordered variables Transitive entropy between : in, From time series arrive The transfer entropy value is used to quantify the transfer from arrive The intensity of directed information flow, and These are sequences and The historical backtracking length defines the amount of data that needs to be considered in past time steps during computation. Time series The state at the next moment, Time series At any moment Previous A vector composed of historical states, Time series At any moment Previous A vector consisting of historical states; S12, Repeat step S11 until a fully connected initial weighted directed graph is obtained, and randomly shuffle the time series within the time window. Generate a proxy time series based on the time sequence. ; S13, Calculate the agent time series Corresponding proxy transit entropy : in, From agent time series arrive The transfer entropy value is used to quantify the transfer from arrive The intensity of directed information flow, For proxy time series At any moment Previous A vector consisting of historical states; S14, Calculate the transit entropy Passing entropy with the agent empirical distribution values between : in, This represents the total number of random permutation tests performed. This indicates the number of times the proxy's propagation entropy is greater than the original propagation entropy; S15, empirical distribution values Connections smaller than a preset threshold are removed, resulting in a dynamic graph that has passed a significance test. .
[0009] Optionally, in step S20, a long short-term memory network with an attention mechanism is used to predict the electricity carbon emission factor of the region to be tested, specifically including: S21, The output of the linear layer of the Long Short-Term Memory network is normalized using the Softmax function: in, For predicted future moments The energy structure proportion vector; For the decoder LSTM in the future moment The hidden state vector; These are the weight matrix and bias vector of the linear fully connected layer, respectively; S22 will predict the proportion of each energy structure. With the corresponding preset inherent emission coefficient Multiply and add them together to obtain the electricity carbon emission factor for the predicted time series unit. : .
[0010] Optionally, in step S20, the electricity carbon emission factor is corrected based on three positive penalty terms: structural imbalance, system volatility, and structural change rate, to obtain a corrected electricity carbon emission factor, specifically including: S23, Determine the proportion of energy structure Shannon entropy Based on the Shannon entropy Determine the degree of structural imbalance of the aforementioned electricity carbon emission factors: in, The Shannon entropy of the system; The maximum possible entropy of the system is when all energy types generate electricity on average (i.e., When it reaches ), its value is ; It is the normalized imbalance index, where a value of 0 indicates perfect equilibrium and a value of 1 indicates complete dominance by a single energy source. S24, Determine the proportion of energy structure System volatility index Based on the system volatility index Determine the magnitude of the system volatility of the electricity carbon emission factor: in, For the collection of all intermittent energy sources, intermittent energy At any moment The proportion of electricity generation; S25, Determine the proportion of energy structure The rate of change of power generation structure index Based on the power generation structure change rate index Determine the degree of change in the power generation structure of the aforementioned electricity carbon emission factor: in, This is the rate of change index of power generation structure. For a moment The energy structure proportion vector, Let L be the L1 norm of the vector, which is the sum of the absolute values of all elements in the vector, and M be the total number of energy types. S26, according to Shannon entropy System volatility index and the rate of change of power generation structure index Determine the penalty coefficient for real-time operating status. : in, These are the weighting coefficients for the three penalty dimensions, representing the relative importance of structural imbalance, system fluctuation, and structural change to the loss of system efficiency, respectively. S27, the real-time running state penalty coefficient and the aforementioned electricity carbon emission factor The product of these factors is determined as the corrected carbon emission factor for electricity. : .
[0011] Optionally, in step S30, the dynamic causal graph is injected as prior knowledge into the graph attention network for feature weighting to obtain the feature stream output by the graph attention network, specifically including: S31, calculate the attention coefficients corresponding to the dynamic causal graph using the graph attention network, and normalize the attention coefficients using the Softmax function to obtain the attention weights. ; S32, the graph attention network is based on the attention weights A weighted aggregation of the feature information of all driving nodes is performed to generate nodes. Feature representation after causal knowledge enhancement processing : In the formula, For nodes Updated feature vectors It is a non-linear activation function. From dynamic cause-effect graph Definition, at the current moment For nodes The set of "upstream" neighbor nodes with direct causal influence. At any moment Attention weights dynamically calculated by the model, 0 1 represents a node. To what extent should a node "pay attention" to neighboring nodes when updating its own state? Information. The shared weight matrix is a learnable matrix, randomly initialized at the start of model training and continuously optimized through backpropagation. Neighboring nodes At any moment The original input feature vector; S33, the graph attention network represents the features of each node i. Integrate into feature stream Obtain the feature stream .
[0012] Optionally, in step S30, the feature flow is divided into power consumption flow and non-power consumption flow, and the power consumption flow and non-power consumption flow are co-coded in a time series to predict the probability distribution of power consumption and the probability distribution of non-power carbon emissions, specifically including: S34, the feature stream is distributed to two dedicated channels to form a power consumption stream and a non-power consumption stream; S35 characterizes the electricity consumption flow A. As a query, the characteristic representation of non-electricity consumption flow B Simultaneously, using these as keys and values, the similarity between the query of power consumption flow A and the keys of each non-power consumption flow B is calculated. This similarity is then used as an attention weight to perform a weighted summation of the value vectors of non-power consumption flows B, generating a context vector. , context vector The features of the power consumption flow A are concatenated with those of the flow itself to form the first enhanced feature vector. The first enhanced feature vector Send to the timing processing module; S36 characterizes the power consumption flow B. As a query, the characteristic representation of non-electricity consumption flow A Simultaneously, the process in step S35 is performed symmetrically as both key and value to obtain the second enhanced feature vector. The second enhanced feature vector Send to the timing processing module; S37, the time-series processing module acquires the first enhanced feature vector. The output probability distribution of power consumption, and based on the second enhanced feature vector The probability distribution of output non-electric carbon emissions.
[0013] Optionally, during the prediction process, the output layer of the prediction model is the mean of the predicted Gaussian distribution. and standard deviation And the negative log-likelihood loss is used as the loss function. : In the formula, N represents the total number of samples involved in the loss calculation. Indicates the first The variance of the predicted Gaussian distribution corresponding to each sample. Indicates the first The true label (actual observation value) of each sample. Indicates the first The mean of the predicted Gaussian distribution corresponding to each sample.
[0014] In addition, to achieve the above objectives, this application also provides a fine-grained regional carbon emission prediction method as described in any of the preceding claims, and its application in carbon emission prediction.
[0015] In addition, to achieve the above objectives, this application also provides a computer system comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the fine-grained regional carbon emission prediction method as described in any of the preceding claims.
[0016] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the fine-grained regional carbon emission prediction method as described in any of the preceding claims.
[0017] This application has at least the following beneficial effects: 1. By using dynamic causal discovery, causal knowledge injection, and a causal-guided prediction framework to predict regional carbon emission factors, a novel time-series data prediction solution combining correlation and causality is provided, which comprehensively reflects the correlation in the data and logical knowledge in the field of carbon emissions. 2. By refining the carbon emission factors and deeply exploring the causal relationships, the systematic bias caused by the use of static parameters and reliance on spurious correlations is effectively overcome, and the shortcomings of existing methods that can only provide a single "point prediction" and cannot quantify risks are effectively compensated.
[0018] 3. Through high-precision prediction of regional carbon emission factors, a scientific basis is provided for the formulation of targeted regional and differentiated emission reduction policies and the dynamic quantitative evaluation of policy effectiveness. The method of quantifying uncertainty enables decision-makers to make robust decisions based on the confidence interval of the prediction and effectively avoid risks. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the fine-grained regional carbon emission prediction method involved in the embodiments of this application; Figure 2 This is a flowchart illustrating the construction of a causal graph based on transitive entropy, as described in an embodiment of this application. Figure 3 This is a cross-stream fusion prediction graph involved in the embodiments of this application; Figure 4 This is a graph showing the performance evaluation results of the model involved in the embodiments of this application; Figure 5 This is a schematic diagram of the hardware operating environment of the computer system involved in the embodiments of this application.
[0020] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] To better understand the above technical solutions, exemplary embodiments of this disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art.
[0022] First Embodiment Reference Figure 1 This embodiment provides a method for predicting regional carbon emissions based on fine-grained methods, the method comprising: S10, Collect historical carbon emission time-series data of the area to be tested, and construct a dynamic causal graph based on the data format of the historical carbon emission time-series data using the transfer entropy. In this embodiment, a dynamic cause-effect graph is first constructed.
[0023] In some alternative implementations, the carbon emission factor prediction task is decomposed into two parts: electricity carbon emissions and non-electricity carbon emissions, and the data collected in the area to be measured are classified as two types of data: power generation end data and user end data, according to their functions.
[0024] Data collected and processed from the power generation end aims to train models to predict the structural proportion of power generation energy and, based on this, calculate the dynamic electricity carbon emission factor, providing key coefficients for electricity carbon emission calculations. Considering the macroeconomic adjustment cycle of the power generation energy structure, this data is presented in monthly or quarterly units. The collected data primarily includes the power generation proportions of various energy sources such as thermal power, hydropower, wind power, and photovoltaic power, as well as various exogenous variables used as the basis for prediction, including meteorological data such as temperature, weather conditions, wind speed, and solar irradiance that directly affect the power generation energy proportions, along with corresponding monthly and quarterly time markers.
[0025] The collection and processing of user-end data aims to predict electricity consumption and carbon emissions from non-electricity sources. Because user-end socioeconomic activities change more frequently, this data is presented in daily or hourly units to capture more refined dynamic information. User-end data includes time-series data reflecting daily patterns such as dates, weekend factors, and holiday factors; the ratio of traditional energy to new energy vehicles in the target area reflecting traffic emission intensity indicators; meteorological data such as temperature, weather, and wind speed affecting electricity load and residential activities; and indicators reflecting macroeconomic conditions such as GDP, industrial output, electricity prices, coal prices, and fuel prices. Short-term impacts from major events are also considered. Since electricity emissions often dominate carbon emissions in a region, historical electricity consumption data from user-end systems must also be collected as a core basis for model training and prediction.
[0026] To achieve data cleaning, firstly, forward imputation and linear interpolation are used to fill in missing data. Then, outliers are detected using the interquartile range (ICM) method, and extreme values are smoothed or removed to prevent them from disproportionately interfering with model training. Due to the significant differences in the numerical ranges of different features, Z-score standardization is used, i.e.: All features are scaled to a distribution with a mean of 0 and a standard deviation of 1. Since the model cannot directly handle text categories or periodic time features, one-hot encoding is used for unordered category features such as "weather type," while trigonometric function encoding is used for periodic time features to preserve their periodic information. This ensures the data quality and format consistency of the input model, providing a foundation for subsequent high-precision predictions.
[0027] Furthermore, refer to Figure 2 The flowchart shown illustrates the construction of a causal graph based on transfer entropy. To significantly improve the model's prediction accuracy for user-end electricity consumption and non-electricity carbon emissions, feature enhancement is applied to the input data. The influencing factors not only exhibit simple numerical correlations, but more importantly, they conceal dynamic causal relationships that evolve over time. To accurately uncover and utilize this deep, non-linear causal structure, a causal graph is constructed for each window by combining a sliding window mechanism and transfer entropy. Compared to other causal testing methods that primarily capture linear relationships, transfer entropy is a non-parametric method that is equally sensitive to non-linear relationships, making it more suitable for describing complex real-world systems. Through iterative calculations and significance tests on the sliding data window, a causal graph is generated for each time period. This serves as an important input for the subsequent causal attention layer.
[0028] By constructing a dynamic causal graph This method transforms time-series data into a network structure that reflects the true driving relationships between variables. A sliding window approach is used to ensure the network can capture system dynamics as it evolves over time. First, a fixed length is set... A time window is used, which slides along the entire time axis, and an independent cause-effect graph is generated for each data segment covered by the window. Within the current window, for all Each feature variable is paired up, and each pair of ordered variables is iteratively calculated. Transitive entropy between : in, From time series arrive The transfer entropy value is used to quantify the transfer from arrive The intensity of directed information flow, and These are sequences and The historical backtracking length defines the amount of data that needs to be considered in past time steps during computation. Time series The state at the next moment, Time series At any moment Previous A vector composed of historical states, Time series At any moment Previous A vector consisting of historical states.
[0029] Following the steps above, we obtain an initially fully connected weighted directed graph, where nodes... Pointing to node The weights of the edges are the untested raw transit entropy values. To overcome the problem that transit entropy may contain spurious correlations caused by random fluctuations or common driving factors, a permutation test is used to determine the validity of each connection. In order to verify the hypothesis " Historical information "It provides no valuable information about the future," by randomly shuffling the time series within the window. Generate a proxy time series based on the time sequence. The random shuffling operation disrupted and The actual time relationship between them, but preserved Its own statistical distribution characteristics.
[0030] Based on proxy sequence Calculate the proxy transit entropy ,pass The proxy propagation entropy is calculated repeatedly to obtain an empirical distribution of propagation entropy under the condition that the null hypothesis holds. Finally, the originally calculated true propagation entropy value is used. Compare with the empirical distribution of agent transit entropy, and calculate : in, This represents the total number of random permutation tests performed.
[0031] Set a significance level threshold =0.05, meaning there's a maximum 5% chance that the misjudgment is due to random coincidence (i.e., a Type I error). If the calculated... Less than Then we reject the null hypothesis and believe that from arrive If the information flow is statistically significant, the connection is retained; otherwise, it is removed. By performing significance tests on all connections and removing spurious connections, the initial fully connected graph is pruned into a sparse, dynamic graph that better reflects the true causal relationships within the system. .
[0032] The following steps are required to organize the information: S11, let a fixed length be... The time window is used to generate an independent causal graph for the data segment covered by each time window. Within the current time window, for all Each pair of ordered variables is obtained by combining each characteristic variable in pairs. Iterative calculation of ordered variables Transitive entropy between : in, From time series arrive The transfer entropy value is used to quantify the transfer from arrive The intensity of directed information flow, and These are sequences and The historical backtracking length defines the amount of data that needs to be considered in past time steps during computation. Time series The state at the next moment, Time series At any moment Previous A vector composed of historical states, Time series At any moment Previous A vector consisting of historical states; S12, Repeat step S11 until a fully connected initial weighted directed graph is obtained, and randomly shuffle the time series within the time window. Generate a proxy time series based on the time sequence. ; S13, Calculate the agent time series Corresponding proxy transit entropy : in, From agent time series arrive The transfer entropy value is used to quantify the transfer from arrive The intensity of directed information flow, For proxy time series At any moment Previous A vector consisting of historical states; S14, Calculate the transit entropy Passing entropy with the agent empirical distribution values between : in, This represents the total number of random permutation tests performed. Indicates the total number of energy types; S15, empirical distribution values Connections smaller than a preset threshold are removed, resulting in a dynamic graph that has passed a significance test. .
[0033] S20, a long short-term memory network with attention mechanism is used to predict the power carbon emission factor of the region to be tested, and the power carbon emission factor is corrected based on three positive penalty terms: structural imbalance, system volatility and structural change rate, to obtain the corrected power carbon emission factor. In this embodiment, after constructing the dynamic causal graph, an attention-based encoder-decoder-long short-term memory network model is used for model training based on power generation data to predict the future electricity carbon emission factor. Simultaneously, to correct the deviation between theoretical values and actual operation, a system fluctuation loss measuring energy diversity imbalance, system volatility loss due to the proportion of intermittent energy sources, and power generation structure change loss due to unit regulation pressure are designed to collectively constitute a real-time operating state penalty coefficient. This coefficient, combined with the basic electricity carbon emission factor, yields a refined dynamic electricity carbon emission factor.
[0034] In the field of electricity carbon emission forecasting, traditional electricity carbon emission factors adopt an "annual fixed value" calculation model, the core drawback of which is that it cannot reflect the dynamic changes in the power generation energy structure in real time. The power generation energy structure is affected by both long-term dependence and short-term patterns, exhibiting typical complex time series characteristics, which fixed period factors cannot capture, thus limiting the accuracy of subsequent carbon emission forecasts.
[0035] To address the aforementioned issues, this embodiment designs a deep learning model capable of accurately predicting the energy structure at any future time point. To effectively handle prediction tasks where the lengths of the input historical sequence and the output future sequence may differ and contain complex time dependencies, an encoder-decoder architecture consisting of two core LSTM networks is adopted. The encoder efficiently reads and compresses the complete input sequence containing historical energy structures and exogenous variables, extracting its essential information and transforming it into a context vector that retains both long-term and short-term features. The decoder uses this context vector as its initial state, combined with the already filled time information, to generate the final predicted value point by point.
[0036] Traditional encoder-decoder architectures must compress any input sequence, regardless of its length, into a fixed-length context vector. This can easily lead to the model forgetting crucial information from earlier parts of the input sequence in later prediction stages, resulting in information attenuation and decreased prediction accuracy. The core purpose of attention mechanisms is to address this bottleneck and significantly enhance the model's ability to process long sequences. To this end, this embodiment introduces an attention mechanism between the encoder and decoder. This allows the decoder to dynamically and selectively backtrack and focus on all historical information points processed by the encoder when generating each prediction, rather than relying on a single, fixed context vector. It then dynamically calculates the importance weights for each historical information point and performs a weighted summation, thereby generating a unique and highly relevant context vector for each prediction step, thus improving the accuracy and reliability of the prediction.
[0037] When generating the final energy structure proportion prediction, it is essential to ensure that the output conforms to physical constraints, namely, the proportion values of all energy types must range from 0 to 1 and sum to 1. However, the direct output of the fully connected linear layer following the decoder LSTM network is a set of arbitrary real values, which does not satisfy the above constraints. Therefore, this embodiment uses the Softmax function to normalize the output of the linear layer: in, For predicted future moments The energy structure proportion vector, For the decoder LSTM in the future moment The hidden state vector, These are the weight matrix and bias vector of the linear fully connected layer, respectively. As an activation function, through its exponential and normalization properties, it can transform any real vector into a valid probability distribution, thereby ensuring that the final predicted energy structure proportion vector is mathematically valid.
[0038] The predicted energy structure proportion is multiplied by the corresponding inherent emission coefficient and then summed to obtain the baseline value of the electricity carbon emission factor for the predicted time series unit. : in, For a moment Basic electricity carbon emission factors Energy type At any moment The proportion of electricity generation, Energy type The inherent emission coefficient is an a priori constant based on the physicochemical properties of this energy source. This represents the total number of energy types.
[0039] The steps for predicting the carbon emission factor of electricity are as follows: S21, The output of the linear layer of the Long Short-Term Memory network is normalized using the Softmax function: in, For predicted future moments The energy structure proportion vector; For the decoder LSTM in the future moment The hidden state vector; These are the weight matrix and bias vector of the linear fully connected layer, respectively; S22 will predict the proportion of each energy structure. With the corresponding preset inherent emission coefficient Multiply and add them together to obtain the electricity carbon emission factor for the predicted time series unit. : .
[0040] Furthermore, since structural imbalances, system fluctuations, and drastic load changes in the power grid can all lead to decreased operating efficiency and thus generate additional carbon emissions, this invention further considers dynamic interactions and efficiency losses at the system level to refine the value of the electricity carbon emission factor. To accurately capture the hidden carbon emissions generated by energy dispatch, structural imbalances, and fluctuation balance in actual power grid operation, this invention designs three positive penalty terms—structural imbalance, system fluctuation, and changes in power generation structure—to jointly construct a dynamic modulation coefficient. This refines the predicted theoretical electricity carbon emission factor, thereby improving the accuracy of electricity carbon emission calculations.
[0041] (1) Measurement of structural imbalance To quantify the potential system risks and efficiency losses caused by a single power generation structure and a lack of resilience, Shannon entropy is introduced to quantify the diversity of the energy structure. A highly diversified energy structure (high entropy value) indicates a low dependence on a single energy source and strong resilience. Conversely, a structure dominated by a single energy source (such as thermal power) (low entropy value) is very fragile. By normalizing the entropy value and subtracting it from 1, a diversity score is transformed into a more intuitive penalty indicator. : in, Shannon entropy is the system's metric for measuring the system's diversity or uncertainty. The maximum possible entropy of the system is when all energy types generate electricity on average (i.e., When it reaches ), its value is ; It is the normalized imbalance index, where a value of 0 indicates perfect equilibrium and a value of 1 indicates complete dominance by a single energy source.
[0042] (2) Measurement of system volatility While renewable energy sources like wind and solar are themselves zero-emission, their power generation process is inherently uncertain. To balance electricity supply and demand in real time, grid operators must keep traditional fossil fuel generators, especially fast-responding but inefficient gas turbines, in hot standby or frequently start-stop and power output fluctuations. These operations are typically inefficient, generating substantial but often overlooked hidden carbon emissions. To quantify the system regulation costs and hidden carbon emissions resulting from the grid connection of wind and solar power, which involve a high proportion of unstable intermittent energy sources, a system volatility index is defined. To measure the proportion of these renewable energy sources: in, For the collection of all intermittent energy sources, intermittent energy At any moment The proportion of electricity generated.
[0043] (3) Measurement of changes in power generation structure Large generator sets, especially thermal and nuclear power plants, are most efficient under stable operating conditions. However, when the load changes rapidly, the output power of the generator sets must be adjusted quickly. This power adjustment process causes them to deviate significantly from their optimal operating point, resulting in incomplete fuel combustion and a sudden increase in actual carbon emissions per unit of electricity generation. To quantify the efficiency loss caused by drastic load changes, this invention uses the L1 norm to measure the total adjustment range of the entire energy structure per unit time, thus more intuitively reflecting the "regulation pressure" that the power grid is experiencing. in, This is the rate of change index of power generation structure. For a moment The energy structure proportion vector, It is the L1 norm of the vector (i.e., the sum of the absolute values of the elements in the vector).
[0044] Finally, combining the theoretical baseline electricity carbon emission factor and various penalty factors, the real electricity carbon emission factor is clearly decomposed into two parts: the theoretical baseline value and the real-time operational penalty. From the perspective of system operation status, the additional carbon emission costs brought about by the three key physical dimensions of diversity, volatility, and regulation pressure are quantified. This expands the characterization of the power grid status from a single dimension to multiple dimensions, resulting in a more refined and realistic electricity carbon emission factor. in, To obtain the final refined carbon emission factor for electricity; The penalty coefficient for real-time running status is the weighted sum of the three penalty terms, and it is a coefficient greater than or equal to 1. The weighting coefficients for the three penalty dimensions represent the relative importance of structural imbalance, system fluctuation, and structural change to the loss of system efficiency.
[0045] The following steps are required to organize the information: S23, Determine the proportion of energy structure Shannon entropy Based on the Shannon entropy Determine the degree of structural imbalance of the aforementioned electricity carbon emission factors: in, The Shannon entropy of the system; The maximum possible entropy of the system is when all energy types generate electricity on average (i.e., When it reaches ), its value is ; It is the normalized imbalance index, where a value of 0 indicates perfect equilibrium and a value of 1 indicates complete dominance by a single energy source. S24, Determine the proportion of energy structure System volatility index Based on the system volatility index Determine the magnitude of the system volatility of the electricity carbon emission factor: in, For the collection of all intermittent energy sources, intermittent energy At any moment The proportion of electricity generation; S25, Determine the proportion of energy structure The rate of change of power generation structure index Based on the power generation structure change rate index Determine the degree of change in the power generation structure of the aforementioned electricity carbon emission factor: in, This is the rate of change index of power generation structure. For a moment The energy structure proportion vector, Let L be the L1 norm of the vector, which is the sum of the absolute values of all elements in the vector, and M be the total number of energy types. S26, according to Shannon entropy System volatility index and the rate of change of power generation structure index Determine the penalty coefficient for real-time operating status. : in, These are the weighting coefficients for the three penalty dimensions, representing the relative importance of structural imbalance, system fluctuation, and structural change to the loss of system efficiency, respectively. S27, the real-time running state penalty coefficient and the aforementioned electricity carbon emission factor The product of these factors is determined as the corrected carbon emission factor for electricity. : .
[0046] S30, the dynamic causal graph is injected into the graph attention network as prior knowledge for feature weighting, the feature stream output by the graph attention network is obtained, the feature stream is divided into power consumption stream and non-power consumption stream, and the power consumption stream and non-power consumption stream are co-coded in a time series to predict the probability distribution of power consumption and the probability distribution of non-power carbon emissions. In this embodiment, after obtaining the corrected electricity carbon emission factor Subsequently, the dynamic causal graph constructed in step S10 is injected as prior knowledge into the Graph Attention Network (GAT) for feature weighting, and the feature stream output by the Graph Attention Network is obtained.
[0047] Guided Graph Attention Network (GAT) dynamically weights input features in real time. This network performs weighting at any given time step... They will simultaneously receive feature matrices representing the real-time state of the system. and dynamic causal graphs that reveal the driving logic behind these states To enable the model to better learn the complex relationships between features, all input raw features are multiplied by a weight matrix. This is then projected into a higher-dimensional feature space. For causal graphs... For each edge present in the array, calculate its attention coefficient based on GAT. The calculation considers both the eigenvalues of the two nodes and the structure of the causal graph to determine the current time step. Driving features Information about target features The importance of.
[0048] For ease of comparison and use, these importance scores are normalized using a softmax function to obtain the final attention weights. Thus, the features at the current moment are quantified. What percentage of "attention" should be allocated to each upstream feature that has a causal influence on it? .
[0049] Finally, GAT uses the calculated attention weights to perform a weighted aggregation of the feature information of all driving nodes to generate nodes. Feature representation after causal knowledge enhancement processing : in, For nodes Updated feature vectors It is a non-linear activation function. From dynamic cause-effect graph Definition, at the current moment For nodes The set of "upstream" neighbor nodes with direct causal influence. At any moment Attention weights dynamically calculated by the model, 0 1 represents a node. To what extent should a node "pay attention" to neighboring nodes when updating its own state? Information. The shared weight matrix is a learnable matrix, randomly initialized at the start of model training and continuously optimized through backpropagation. Neighboring nodes At any moment The original input feature vector.
[0050] The network ultimately outputs a new feature stream enhanced with causal knowledge. Features identified as key driving factors by causal graphs and attention mechanisms were amplified and highlighted, while other features were suppressed accordingly.
[0051] The following steps are required to organize the information: S31, calculate the attention coefficients corresponding to the dynamic causal graph using the graph attention network, and normalize the attention coefficients using the Softmax function to obtain the attention weights. ; S32, the graph attention network is based on the attention weights A weighted aggregation of the feature information of all driving nodes is performed to generate nodes. Feature representation after causal knowledge enhancement processing : In the formula, For nodes Updated feature vectors It is a non-linear activation function. From dynamic cause-effect graph Definition, at the current moment For nodes The set of "upstream" neighbor nodes with direct causal influence. At any moment Attention weights dynamically calculated by the model, 0 1 represents a node. To what extent should a node "pay attention" to neighboring nodes when updating its own state? Information. The shared weight matrix is a learnable matrix, randomly initialized at the start of model training and continuously optimized through backpropagation. Neighboring nodes At any moment The original input feature vector; S33, the graph attention network represents the features of each node i. Integrate into feature stream Obtain the feature stream .
[0052] Furthermore, refer to Figure 3 The cross-flow fusion prediction map shown is based on the calculated characteristic flow. Based on this, to enable the two independent flows of electricity consumption and non-electricity carbon emissions to share useful information, a dual-stream architecture is designed, consisting of cross-stream information fusion and temporal dependency capture. Specifically, the feature streams are divided into electricity consumption streams and non-electricity consumption streams, and collaborative temporal coding is performed on these streams to predict the probability distributions of electricity consumption and non-electricity carbon emissions. This includes: First, Distributed to two dedicated channels, forming the characteristic of flow A (power consumption). Characteristics of Flow B (non-electricity carbon emissions) To enable these two independent streams to share useful information, a scaled dot product attention mechanism is used for cross-stream information fusion, and the feature representation of stream A is... As a "query", the characteristic representation of query flow B Simultaneously serving as both "key" and "value," the attention mechanism dynamically generates a set of attention weights by calculating the similarity between the query and the key. This precisely quantifies which information in flow B is most relevant to the current state of flow A. Subsequently, the attention mechanism uses these weights to perform a weighted summation of the value vector of flow B, generating a context vector. It is then concatenated with the features of flow A itself to form an enhanced feature vector. Then it is sent to the subsequent timing processing module. Stream B will also perform the same process symmetrically to obtain information from stream A.
[0053] Enhanced feature sequences and The sequences are fed into independent LSTM networks for temporal encoding to capture the evolutionary patterns and long-term dependencies of the sequence over time, effectively avoiding the vanishing gradient problem. After the entire sequence has been processed, the final hidden state of the LSTM output describes all the important causal, cross-current, and temporal evolutionary patterns in the entire time series, and is passed to the probabilistic output layer in the next stage.
[0054] The following steps are required to organize the information: S34, the feature stream is distributed to two dedicated channels to form a power consumption stream and a non-power consumption stream; S35 characterizes the electricity consumption flow A. As a query, the characteristic representation of non-electricity consumption flow B Simultaneously, using these as keys and values, the similarity between the query of power consumption flow A and the keys of each non-power consumption flow B is calculated. This similarity is then used as an attention weight to perform a weighted summation of the value vectors of non-power consumption flows B, generating a context vector. , context vector The features of the power consumption flow A are concatenated with those of the flow itself to form the first enhanced feature vector. The first enhanced feature vector Send to the timing processing module; S36 characterizes the power consumption flow B. As a query, the characteristic representation of non-electricity consumption flow A Simultaneously, the process in step S35 is performed symmetrically as both key and value to obtain the second enhanced feature vector. The second enhanced feature vector Send to the timing processing module; S37, the time-series processing module acquires the first enhanced feature vector. The output probability distribution of power consumption, and based on the second enhanced feature vector The probability distribution of output non-electric carbon emissions.
[0055] S40, the product of the probability distribution of electricity consumption and the modified electricity carbon emission factor is determined as the probability distribution of electricity carbon emissions, and the carbon emission prediction result of the area to be measured is determined based on the probability distribution of electricity carbon emissions and the probability distribution of non-electricity carbon emissions.
[0056] In this embodiment, after obtaining the probability distributions of the two types of carbon emissions, the probability distribution of electricity consumption is also obtained. With deterministic constants Multiplying these together yields the probability distribution of carbon emissions from electricity: By using the probability distribution of electricity carbon emissions Probability distribution of non-electricity carbon emissions Adding them together, we obtain the probability distribution of the total carbon emissions for the region: Ultimately, a prediction result describing the probability distribution of carbon emissions in the region is obtained, which includes point predictions (most likely values), i.e., the mean of the final distribution. And the prediction interval (range of uncertainty), based on the standard deviation of the final distribution. It can calculate prediction intervals with any confidence level.
[0057] In the technical solution provided in this embodiment, a dynamic causal graph among various influencing factors within a region is first established based on a sliding window and transfer entropy, and this graph is injected into a graph attention network as prior knowledge to achieve feature weighting. Next, three positive penalty terms—structural imbalance, system volatility, and structural change rate—are designed, and a long short-term memory network based on an attention mechanism is proposed to predict the future power generation energy structure, allowing for refined dynamic correction of the electricity carbon emission factor. Finally, a dual-stream time-series model for collaborative learning of electricity and non-electricity heterogeneous emission tasks is designed to predict the probability distributions of electricity consumption and non-electricity carbon emissions in the target region, thus obtaining the final probability distribution of carbon emissions in the region under test. By deeply mining the causal logic of features within a continuous time-series window, finely characterizing the regional power grid dynamics, and quantifying prediction uncertainty, the accuracy and reliability of the prediction can be significantly improved.
[0058] like Figure 4 As shown, the model proposed in this invention exhibits excellent predictive performance on the test set. From the evaluation metrics, the model achieves a high coefficient of determination (R²) of 0.9554. 2 The model effectively fits the complex nonlinear trends in regional carbon emissions. In terms of error control, the mean absolute percentage error (MAPE) is only 5.90%, and the root mean square error (RMSE) is controlled at 70.78%, demonstrating extremely high accuracy. Furthermore, the coverage of the 95% confidence interval reaches 97.56%, further validating the model's high reliability in uncertainty quantification and its ability to meet the needs of accurate carbon emission monitoring and trend early warning in real-world industrial scenarios.
[0059] Furthermore, as an implementation scheme, this embodiment provides a fine-grained regional carbon emission prediction method as described in the first embodiment, and its application in carbon emission prediction. Specifically, it is as follows: S1, Construction of Dynamic Cause-Effect Graph Historical power grid data for the past five years in the region of City A was collected from relevant websites. Power generation data included: thermal power share, hydropower share, wind power share, photovoltaic power share, nuclear power share, total regional power generation, average temperature, average wind speed, average solar irradiance, and month (monthly averages for temperature, irradiance, and wind speed). User data included: month, date, weekend / holiday status, temperature, wind speed, season, ratio of traditional energy to new energy vehicles, GDP, industrial output, electricity price, coal and fuel oil prices, social activity factors, total daily electricity consumption in the region, and non-electricity carbon emissions (daily).
[0060] Next, data preprocessing is performed according to step S10. The quarterly GDP data and monthly industrial output data are downsampled to daily granularity using the forward imputation method. Missing values are filled using the linear interpolation method. All numerical feature data are standardized using Z-score to eliminate the influence of units. The three periodic features of season, month, and day are encoded using trigonometric cosine function. The three features of social activity factor, whether it is a weekend, and whether it is a holiday are encoded using one-hot encoding.
[0061] After processing the data, a sliding window is used, with a set window length. =90 days, sliding step size =30 days, segment the user-side data, and then construct a dynamic cause-effect graph using a combination of transfer entropy and significance testing (permutation test). =1000 times, with a significance level of 0.05, the partial transfer entropy matrix of data segment P is shown in Table 1.
[0062] Table 1. Data Fragment Transfer Entropy Matrix Fragment
[0063] Next, the significance test is performed to determine the value corresponding to data segment P. Value, and significance level =0.05 comparison, remove Edges with values greater than 0.05 are used to obtain the adjacency matrix of the features of data segment P, as shown in Table 2: Table 2. Adjacency Matrix of Feature-to-Cause Graph within Data Fragments
[0064] S2, Calculation of Dynamic Electricity Carbon Emission Factor Based on the monthly power generation data of the past five years, the data was preprocessed according to step 1.1. The window size was set to 5, and the data of 5 consecutive months was taken as a feature segment. That is, the first to 5 months were the first data segment, the second to 6 months were the second data segment, and so on, and finally 56 data segments were divided. Table 3 is the standardized matrix of a certain feature segment.
[0065] Table 3. Standardized matrix of a certain feature segment
[0066] The 56 standardized data segments were used as input to the Attention-LSTM model for training. Then, the month to be predicted and the four consecutive months preceding it were taken as input to the prediction segments. Finally, the complete output segments after prediction were obtained. Table 4 shows the decoded energy share prediction result segments, with the result corresponding to month M being the prediction result. Table 4. Energy Share Forecast Results
[0067] The energy structure data for the following month was extracted from the predicted data fragments. The predicted energy structure results and the inherent emission coefficients of various energy sources are shown in Table 5. Table 5. Forecast results of power generation energy structure and inherent emission coefficients for the next month
[0068] Based on the data in Table 5, the basic electricity carbon emission factor was calculated. It is 0.605 tCO2 / MWh. Basic electricity carbon emission factor. It is a standard weighted average method for calculating the carbon intensity of mixed energy sources, which ignores dynamic interactions and efficiency losses at the system level. The carbon emission factor of electricity calculated by this method is idealized. In reality, structural imbalances in the power grid, system fluctuations, and drastic load changes can all lead to a decrease in operating efficiency, thereby generating additional carbon emissions. It must be refined and corrected.
[0069] Next, the coefficient of the structural imbalance penalty term is calculated. The value is 0.380, and the coefficient of the system volatility penalty term is calculated. The coefficient for the penalty term due to changes in the power generation structure is calculated to be 0.205. The value is 0.120, and the weighting coefficients are set as follows: =0.15, =0.35, =0.20, and finally, the corrected carbon emission factor for the next month is calculated according to formulas (2-6) and (2-7). It is 0.698tCO2 / MWh.
[0070] S3: Prediction of Regional Carbon Emissions Probability Distribution The dynamic causal graph constructed in step S10 is used as structured prior knowledge and input into the graph attention network (GAT). GAT dynamically weights the input user-side features based on the causal relationships revealed by the causal graph, and then normalizes them using the Softmax function to obtain the final attention weights. GAT uses the calculated attention weights to perform a weighted aggregation of the feature information of all driving nodes to generate nodes. Feature Flow Enhanced by Causal Knowledge Table 6 shows the feature flow matrix of a portion of the data in a certain data window.
[0071] Table 6. Feature Flow Matrix of Partial Data in a Data Window
[0072] Then, the feature stream of causal perception Characteristics of being distributed to power consumption flow A Characteristics of non-electric carbon emission stream B Two dedicated channels fuse cross-stream information using a scaled dot product attention mechanism, with each channel acting as the other's "key" and "value," dynamically generating attention weights, which are then weighted and summed again to generate a context vector. Then, the context vector is calculated and concatenated with the other party's features to form an enhanced feature vector. and These two enhanced vectors are fed into the LSTM. Table 7 shows the enhanced feature vector matrix of a certain data window portion of the data.
[0073] Table 7. Enhanced Feature Vector Matrix of Partial Data in a Data Window
[0074] Meanwhile, the negative log-likelihood loss is used as the loss function to train the model. After training, the feature data for the next seven days are processed according to the method in step S10, leaving the non-electricity carbon emissions and electricity consumption features blank. This data is used as the input to the model, and the model infers two independent probability distributions for the electricity consumption and corresponding non-electricity carbon emissions for the next seven days. Table 8 shows the electricity consumption and non-electricity carbon emissions for the next seven days, with a confidence interval of 95%.
[0075] Table 8. Forecasted Average Electricity Consumption and Non-Electricity Carbon Emissions for the Next Seven Days
[0076] Subsequently, based on probability propagation theory, the probability distribution of the predicted daily total electricity consumption is compared with the corrected electricity carbon emission factor calculated in S20. Multiplying approximately 0.000698 million tons of CO2 per 10,000 kWh yields the probability distribution of carbon emissions from electricity generation. The probability distribution of predicted non-electricity carbon emissions Add them together to get the carbon emissions for city A over the next seven days. As shown in Table 9.
[0077] Table 9. Forecast of Carbon Emissions for City A in the Next Seven Days
[0078] As one implementation scheme, Figure 5 This is a schematic diagram of the hardware operating environment of the computer system involved in the embodiments of this application.
[0079] like Figure 5 As shown, the computer system may include: a processor 1001, such as a CPU; a memory 1005; a user interface 1003; a network interface 1004; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0080] Those skilled in the art will understand that Figure 5 The computer system architecture shown does not constitute a limitation on the computer system and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0081] like Figure 5 As shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and computer programs. The operating system is a program that manages and controls the hardware and software resources of the computer system, as well as the operation of the computer programs and other software or programs.
[0082] exist Figure 5 In the computer system shown, the user interface 1003 is mainly used to connect to the terminal and communicate with the terminal; the network interface 1004 is mainly used to communicate with the backend server; and the processor 1001 can be used to call the computer program stored in the memory 1005.
[0083] In this embodiment, the computer system includes: a memory 1005, a processor 1001, and a computer program stored in the memory and executable on the processor, wherein: When processor 1001 calls a computer program stored in memory 1005, it performs the following operations: S10, Collect historical carbon emission time-series data of the area to be tested, and construct a dynamic causal graph based on the data format of the historical carbon emission time-series data using the transfer entropy. S20, a long short-term memory network with attention mechanism is used to predict the power carbon emission factor of the region to be tested, and the power carbon emission factor is corrected based on three positive penalty terms: structural imbalance, system volatility and structural change rate, to obtain the corrected power carbon emission factor. S30, the dynamic causal graph is injected into the graph attention network as prior knowledge for feature weighting, the feature stream output by the graph attention network is obtained, the feature stream is divided into power consumption stream and non-power consumption stream, and the power consumption stream and non-power consumption stream are co-coded in a time series to predict the probability distribution of power consumption and the probability distribution of non-power carbon emissions. S40, the product of the probability distribution of electricity consumption and the modified electricity carbon emission factor is determined as the probability distribution of electricity carbon emissions, and the carbon emission prediction result of the area to be measured is determined based on the probability distribution of electricity carbon emissions and the probability distribution of non-electricity carbon emissions.
[0084] Furthermore, those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in a computer system to implement the process steps of the embodiments of the above methods.
[0085] Therefore, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the various steps of the fine-grained regional carbon emission prediction method described in the above embodiments.
[0086] The computer-readable storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0087] It should be noted that, since the storage medium provided in the embodiments of this application is the storage medium used to implement the methods of the embodiments of this application, those skilled in the art can understand the specific structure and variations of the storage medium based on the methods described in the embodiments of this application, and therefore will not be repeated here. All storage media used in the methods of the embodiments of this application fall within the scope of protection of this application.
[0088] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0089] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0090] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0091] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0092] It should be noted that any reference signs placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. This application can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0093] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0094] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for predicting regional carbon emissions based on fine-grained calculations, characterized in that, The method includes: S10, Collect historical carbon emission time-series data of the area to be tested, and construct a dynamic causal graph based on the data format of the historical carbon emission time-series data using the transfer entropy. S20, a long short-term memory network with attention mechanism is used to predict the power carbon emission factor of the region to be tested, and the power carbon emission factor is corrected based on three positive penalty terms: structural imbalance, system volatility and structural change rate, to obtain the corrected power carbon emission factor. S30, the dynamic causal graph is injected into the graph attention network as prior knowledge for feature weighting, the feature stream output by the graph attention network is obtained, the feature stream is divided into power consumption stream and non-power consumption stream, and the power consumption stream and non-power consumption stream are co-coded in a time series to predict the probability distribution of power consumption and the probability distribution of non-power carbon emissions. S40, the product of the probability distribution of electricity consumption and the modified electricity carbon emission factor is determined as the probability distribution of electricity carbon emissions, and the carbon emission prediction result of the area to be measured is determined based on the probability distribution of electricity carbon emissions and the probability distribution of non-electricity carbon emissions.
2. The method as described in claim 1, characterized in that, S10 includes: S11, let a fixed length be... The time window is used to generate an independent causal graph for the data segment covered by each time window. Within the current time window, for all Each pair of ordered variables is obtained by combining each characteristic variable in pairs. Iterative calculation of ordered variables Transitive entropy between : ; in, From time series arrive The transfer entropy value is used to quantify the transfer from arrive The intensity of directed information flow, and These are sequences and The historical backtracking length defines the amount of data that needs to be considered in past time steps during computation. Time series The state at the next moment, Time series At any moment Previous A vector composed of historical states, Time series At any moment Previous A vector consisting of historical states; S12, Repeat step S11 until a fully connected initial weighted directed graph is obtained, and randomly shuffle the time series within the time window. Generate a proxy time series based on the time sequence. ; S13, Calculate the agent time series Corresponding proxy transit entropy : ; in, From agent time series arrive The transfer entropy value is used to quantify the transfer from arrive The intensity of directed information flow, For proxy time series At any moment Previous A vector consisting of historical states; S14, Calculate the transit entropy Passing entropy with the agent empirical distribution values between : ; in, This represents the total number of random permutation tests performed. This indicates the number of times the proxy's propagation entropy is greater than the original propagation entropy; S15, empirical distribution values Connections smaller than a preset threshold are removed, resulting in a dynamic graph that has passed a significance test. .
3. The method as described in claim 1, characterized in that, In step S20, a long short-term memory network with an attention mechanism is used to predict the electricity carbon emission factor of the region to be tested, specifically including: S21, The output of the linear layer of the Long Short-Term Memory network is normalized using the Softmax function: ; in, For predicted future moments The energy structure proportion vector; For the decoder LSTM in the future moment The hidden state vector; These are the weight matrix and bias vector of the linear fully connected layer, respectively; S22 will predict the proportion of each energy structure. With the corresponding preset inherent emission coefficient Multiply and add them together to obtain the electricity carbon emission factor for the predicted time series unit. : 。 4. The method as described in claim 1 or 3, characterized in that, In step S20, the electricity carbon emission factor is corrected based on three positive penalty terms: structural imbalance, system volatility, and structural change rate, resulting in a corrected electricity carbon emission factor, which specifically includes: S23, Determine the proportion of energy structure Shannon entropy Based on the Shannon entropy Determine the degree of structural imbalance of the aforementioned electricity carbon emission factors: ; in, The Shannon entropy of the system; The maximum possible entropy of the system is when all energy types generate electricity on average (i.e., When it reaches ), its value is ; It is the normalized imbalance index, where a value of 0 indicates perfect equilibrium and a value of 1 indicates complete dominance by a single energy source. S24, Determine the proportion of energy structure System volatility index Based on the system volatility index Determine the magnitude of the system volatility of the electricity carbon emission factor: ; in, For the collection of all intermittent energy sources, intermittent energy At any moment The proportion of electricity generation; S25, Determine the proportion of energy structure The rate of change of power generation structure index Based on the power generation structure change rate index Determine the degree of change in the power generation structure of the aforementioned electricity carbon emission factor: ; in, This is the rate of change index of power generation structure. For a moment The energy structure proportion vector, Let L be the L1 norm of the vector, which is the sum of the absolute values of all elements in the vector, and M be the total number of energy types. S26, according to Shannon entropy System volatility index and the rate of change of power generation structure index Determine the penalty coefficient for real-time operating status. : ; in, These are the weighting coefficients for the three penalty dimensions, representing the relative importance of structural imbalance, system fluctuation, and structural change to the loss of system efficiency, respectively. S27, the real-time running state penalty coefficient and the aforementioned electricity carbon emission factor The product of these factors is determined as the corrected carbon emission factor for electricity. : 。 5. The method as described in claim 1, characterized in that, In step S30, the dynamic causal graph is injected as prior knowledge into the graph attention network for feature weighting to obtain the feature stream output by the graph attention network, specifically including: S31, calculate the attention coefficients corresponding to the dynamic causal graph using the graph attention network, and normalize the attention coefficients using the Softmax function to obtain the attention weights. ; S32, the graph attention network is based on the attention weights A weighted aggregation of the feature information of all driving nodes is performed to generate nodes. Feature representation after causal knowledge enhancement processing : ; In the formula, For nodes Updated feature vectors It is a non-linear activation function. From dynamic cause-effect graph Definition, at the current moment For nodes The set of "upstream" neighbor nodes with direct causal influence. At any moment Attention weights dynamically calculated by the model, 0 1 represents a node. To what extent should a node "pay attention" to neighboring nodes when updating its own state? Information. The shared weight matrix is a learnable matrix, randomly initialized at the start of model training and continuously optimized through backpropagation. Neighboring nodes At any moment The original input feature vector; S33, the graph attention network represents the features of each node i. Integrate into feature stream Obtain the feature stream .
6. The method as described in claim 1 or 5, characterized in that, In step S30, the feature stream is divided into power consumption stream and non-power consumption stream, and the power consumption stream and non-power consumption stream are co-coded in a time series to predict the probability distribution of power consumption and the probability distribution of non-power carbon emissions, specifically including: S34, the feature stream is distributed to two dedicated channels to form a power consumption stream and a non-power consumption stream; S35 characterizes the power consumption flow A. As a query, the characteristic representation of non-electricity consumption flow B Simultaneously, using these as keys and values, the similarity between the query of power consumption flow A and the keys of each non-power consumption flow B is calculated. This similarity is then used as an attention weight to perform a weighted summation of the value vectors of non-power consumption flows B, generating a context vector. , context vector The features of the power consumption flow A are concatenated with those of the flow itself to form the first enhanced feature vector. The first enhanced feature vector Send to the timing processing module; S36 characterizes the power consumption flow B. As a query, the characteristic representation of non-electricity consumption flow A Simultaneously, the process in step S35 is performed symmetrically as both key and value to obtain the second enhanced feature vector. The second enhanced feature vector Send to the timing processing module; S37, the time-series processing module acquires the first enhanced feature vector. The output probability distribution of power consumption, and based on the second enhanced feature vector The probability distribution of output non-electric carbon emissions.
7. The method as described in claim 6, characterized in that, During the prediction process, the output layer of the prediction model is the mean of the predicted Gaussian distribution. and standard deviation And the negative log-likelihood loss is used as the loss function. : ; In the formula, N represents the total number of samples involved in the loss calculation. Indicates the first The variance of the predicted Gaussian distribution corresponding to each sample. Indicates the first The true label of each sample, i.e., the actual observed value. Indicates the first The mean of the predicted Gaussian distribution corresponding to each sample.
8. The application of a fine-grained regional carbon emission prediction method as described in any one of claims 1 to 7 in carbon emission prediction.
9. A computer system, characterized in that, The computer system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the fine-grained regional carbon emission prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the fine-grained regional carbon emission prediction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Airspace carbon emission short-term prediction method and system based on graph neural network
CN115564114A
Park carbon emission prediction method and system based on graph neural network
CN117151486A
Ground carbon emission monitoring method based on multi-source data interaction network
CN117454116A
Electric power carbon emission prediction method fusing time sequence and structural characteristics
CN118627011A