A method and system for calculating power carbon emission factors

By using a linear regression model and Kalman filter algorithm to calculate the carbon emission factor of electricity, the problems of large computational workload and poor real-time performance in traditional methods are solved, and high-precision and fast-response carbon emission factor calculation is achieved.

CN122133107APending Publication Date: 2026-06-02ZHONGSHAN POWER SUPPLY BUREAU OF GUANGDONG POWER GRID
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGSHAN POWER SUPPLY BUREAU OF GUANGDONG POWER GRID
Filing Date
2026-03-03
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Traditional methods for calculating carbon emission factors in the power sector are computationally intensive and lack real-time performance when dealing with complex power grids or large-scale systems. They also struggle to capture the volatility and time-varying nature of carbon emission flows, thus reducing the accuracy of calculations.

Method used

By acquiring power generation data and historical carbon emission data, a method for calculating the carbon emission factor of electricity is established by using a linear regression model to solve for the initial carbon emission factor and then correcting it using a Kalman filter algorithm.

Benefits of technology

It improves the accuracy and real-time performance of calculating the carbon emission factor of electricity, adapts to frequent changes in the power generation structure of the power system, and reduces errors caused by data noise and model simplification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122133107A_ABST
    Figure CN122133107A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for calculating the carbon emission factor of electricity, relating to the field of carbon emission intensity assessment technology. The method involves acquiring power generation data and historical carbon emission data, solving a pre-set linear regression model based on the historical carbon emission data to obtain the corresponding initial carbon emission factor, estimating the carbon emission factor of electricity based on the initial carbon emission factor and power generation data, and then applying Kalman filtering to correct the initial carbon emission factor to obtain the final carbon emission factor. This method overcomes the technical problems of traditional methods for calculating the carbon emission factor of electricity, which mainly rely on analyzing parameters such as grid node voltage and power to simulate power flow and combining generator fuel type and combustion efficiency to estimate the carbon emission factor. However, these methods suffer from high computational workload, poor real-time performance, difficulty in capturing the volatility and time-varying nature of carbon emission flow, and reduced accuracy in calculating the carbon emission factor of electricity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of carbon emission intensity assessment technology, and in particular to a method and system for calculating the carbon emission factor of electricity. Background Technology

[0002] With global warming becoming an increasingly serious problem, countries around the world are focusing on carbon neutrality goals and accelerating the transformation of their energy structures to reduce the impact of greenhouse gas emissions on the ecological environment. As a core sector of carbon emissions, the accuracy of carbon emission accounting in the power industry directly affects the formulation and implementation of emission reduction targets. The power carbon emission factor, as a key indicator for measuring the carbon emission intensity of the power system, requires dynamic and accurate calculation, which is crucial for promoting the low-carbon transformation of the power industry.

[0003] Currently, traditional methods for calculating the carbon emission factor of electricity mainly involve analyzing parameters such as voltage and power at power grid nodes to simulate electricity flow and combining the fuel type and combustion efficiency of generator sets to estimate the carbon emission factor of electricity. However, when faced with complex power grids or large-scale systems, this method suffers from problems such as large computational workload and poor real-time performance. It is difficult to capture the volatility and time-varying nature of carbon emission flow, which reduces the accuracy of the calculation of the carbon emission factor of electricity. Summary of the Invention

[0004] This invention provides a method and system for calculating the carbon emission factor of electricity. It solves the technical problem that traditional methods for calculating the carbon emission factor of electricity mainly simulate the flow of electricity by analyzing parameters such as voltage and power of power grid nodes and combining the fuel type and combustion efficiency of generator sets to estimate the carbon emission factor of electricity. However, when facing complex power grids or large-scale systems, this method has the problems of large computational workload and poor real-time performance. It is difficult to capture the fluctuation and time-varying nature of carbon emission flow, which reduces the accuracy of the calculation of the carbon emission factor of electricity.

[0005] The first aspect of this invention provides a method for calculating the carbon emission factor of electricity, comprising: Acquire power generation data and historical carbon dioxide data, and solve the preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor; Based on the initial carbon emission factor and the power generation data, the carbon emission factor of electricity is estimated to obtain the corresponding initial carbon emission factor of electricity. The initial electricity carbon emission factor is corrected by Kalman filtering to obtain the corresponding electricity carbon emission factor.

[0006] Optionally, the step of solving a preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor includes: A corresponding energy structure matrix is ​​constructed using the historical electricity consumption data of the historical carbon data, and a corresponding observed carbon factor sequence is constructed using the historical carbon factor data of the historical carbon data. The energy structure matrix and the observed carbon factor sequence are input into a preset linear regression model to obtain the corresponding target linear regression model; Based on the preset objective function, the least squares method is used to solve the objective linear regression model to obtain the corresponding initial carbon factor.

[0007] By adopting the above technical solution, an energy structure matrix is ​​first constructed using historical electricity consumption data, and an observed carbon factor sequence is constructed using historical carbon factor data. This transforms the scattered, time-series historical carbon factor data into a standardized data format that meets the input requirements of a linear regression model. This not only standardizes the data dimensions and ensures data consistency over time, but also allows the data to accurately match the model's computational logic, avoiding model fitting bias caused by unstructured data input. This provides standardized and unified data support for subsequent modeling and solving. Then, the structured energy structure matrix and observed carbon factor sequence are input into a preset linear regression model to obtain the target linear regression model. The model is then used to establish an energy structure matrix. The quantitative linear correlation between power supply structure and carbon emission factors eliminates reliance on human experience and removes parameter bias caused by subjective human setting of carbon factors, making the solution of initial electric carbon factors more consistent with the actual carbon emission characteristics of the power system. Finally, based on a preset objective function with the residual sum of squares as the core, the least squares method is used to solve the parameters of the objective linear regression model. By minimizing the residual sum of squares between the model fitting value and the actual observed value through mathematical optimization, the electric carbon factor parameter vector that best fits the historical electric carbon data pattern can be accurately found, making the solved initial electric carbon factor the optimal solution and effectively improving the accuracy of the initial electric carbon factor solution.

[0008] Optionally, the power generation data includes electricity consumption in the steel industry, the ceramics industry, the chemical industry, and a renewal factor. The step of estimating the electricity carbon emission factor based on the initial electricity carbon factor and the power generation data to obtain the corresponding initial electricity carbon emission factor includes: The electricity consumption of the steel industry, the ceramics industry, and the chemical industry is summed to obtain the corresponding total electricity consumption value; When the total electricity consumption is greater than the preset electricity consumption benchmark value, the initial carbon dioxide factor is updated using the update factor to obtain the corresponding target carbon dioxide factor. The electricity consumption of the steel industry, the ceramics industry, and the chemical industry is weighted based on the target electrocarbon factor to obtain the corresponding total carbon emissions. The ratio of the total carbon emissions to the total electricity consumption is used to obtain the corresponding initial electricity carbon emission factor. When the total electricity consumption is less than or equal to the electricity consumption benchmark value, the preset benchmark electricity carbon emission factor is determined as the corresponding initial electricity carbon emission factor.

[0009] By adopting the above technical solution, the electricity consumption of the steel, ceramics, and chemical industries is used as the core calculation basis, accurately anchoring the main sources of electricity consumption in the power system. Furthermore, the electricity consumption structure of these three industries corresponds one-to-one with the power generation structure of coal-fired power, gas-fired power, and purchased electricity. This allows subsequent carbon emission weighted calculations to accurately match the actual characteristics of electricity supply and consumption, avoiding the problem of results being out of sync with reality caused by traditional estimation methods failing to distinguish between electricity users. The total electricity consumption value is obtained by summing the electricity consumption of the steel, ceramics, and chemical industries, and a benchmark value is set as a scenario switching node. When the total electricity consumption value is greater than the benchmark value, the deduction is completed based on actual electricity consumption data and the electricity carbon factor. When the total electricity consumption value is less than or equal to the benchmark value, a preset benchmark electricity carbon emission factor is directly assigned. This effectively avoids problems such as meaningless division and distorted calculation results when the electricity consumption value is zero or too low, ensuring the continuity of the calculation process and the rationality of the results under different electricity consumption scenarios.

[0010] Optionally, the step of updating the initial electrocarbon factor using the update factor to obtain the corresponding target electrocarbon factor includes: Determine whether the update factor is greater than or equal to a preset update threshold; When the update factor is equal to the update threshold, the pre-acquired updated carbon factor is determined as the target carbon factor. When the update factor is not equal to the update threshold, the initial electrocarbon factor is determined as the corresponding target electrocarbon factor.

[0011] By adopting the above technical solution, using the update threshold as a unified judgment benchmark, the system determines whether the update factor meets the update conditions simply through numerical comparison. The judgment logic is extremely simple and standardized, requiring no complex parameter derivation or model recalculation. This allows for rapid completion of the update judgment of the electricity carbon factor, efficiently matching the basic mathematical operations such as the initial total electricity consumption calculation and subsequent weighted calculation, ensuring the overall efficiency of the initial electricity carbon emission factor estimation and meeting the real-time requirements of the power system for carbon emission factor calculation. Simultaneously, this solution establishes a clear electricity carbon factor update triggering mechanism. Only when the update factor equals the update threshold is the pre-calibrated electricity carbon factor generated according to the latest policy requirements and changes in energy structure activated. When there are no relevant changes, the initial electricity carbon factor obtained by the least squares method is directly used. This ensures that the electricity carbon factor can accurately and promptly respond to the actual operational changes of the power system, avoiding calculation deviations caused by changes in the external environment for fixed carbon factors. Furthermore, it eliminates the need to re-solve the linear regression model, significantly saving computational resources and balancing the dynamic adaptability and computational efficiency of the target electricity carbon factor.

[0012] Optionally, the step of performing Kalman filtering correction on the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor includes: Input the pre-acquired prior covariance estimate into the preset Kalman gain function to obtain the corresponding Kalman gain; The first multiplication value is obtained by multiplying the pre-acquired prior state estimate and the preset observation matrix. The initial electricity carbon emission factor is compared with the first multiplication value to obtain the corresponding first difference value. The first difference is multiplied by the Kalman gain to obtain the corresponding second multiplication value; The second multiplier is summed with the prior state estimate to obtain the corresponding electricity carbon emission factor.

[0013] By adopting the above-mentioned technical solutions, existing technologies mostly use simplified mathematical models to calculate carbon emission factors, and lack effective error correction mechanisms. This makes it difficult to eliminate errors caused by data acquisition noise and model simplification, and also fails to compensate for calculation deviations caused by fluctuations in carbon emission flows, resulting in low calculation accuracy. In contrast, this application introduces a Kalman filter algorithm for optimal state estimation correction based on the initial estimation of the electricity carbon emission factor. Through a closed-loop iterative process of prediction and update, it effectively reduces the impact of various errors, making the corrected carbon emission factor more closely match the actual value and significantly improving calculation accuracy. The corrected error fluctuates slightly around zero, far lower than the calculation error of existing technologies.

[0014] Optionally, the objective function is specifically: ; in, For the sum of squared residuals, For the first k Measured values ​​of carbon emission factors for electricity at any given time. For the first k Coal-fired power generation at any given time For the first k Real-time gas-fired power generation For the first k Purchase electricity from external sources at all times. It is the first element of the electrocarbon factor. It is the second element of the electrocarbon factor. It is the third element in the electrocarbon factor. n For time points, k For time indexing.

[0015] A second aspect of the present invention provides a power carbon emission factor calculation system, comprising: The data acquisition module is used to acquire power generation data and historical carbon dioxide data, and to solve a preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor. The estimation module is used to estimate the electricity carbon emission factor based on the initial electricity carbon factor and the power generation data, and obtain the corresponding initial electricity carbon emission factor. The correction module is used to perform Kalman filtering correction on the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor.

[0016] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the electricity carbon emission factor calculation method as described above.

[0017] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the electricity carbon emission factor calculation method as described above.

[0018] The fifth aspect of the present invention provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein, when the program instructions are executed by a computer, the computer performs the electricity carbon emission factor calculation method as described above.

[0019] As can be seen from the above technical solutions, the present invention has the following advantages: This invention acquires power generation data and historical carbon emission data, solves a pre-defined linear regression model based on the historical carbon emission data to obtain the corresponding initial carbon emission factor, estimates the carbon emission factor based on the initial carbon emission factor and power generation data, and then applies Kalman filtering to correct the initial carbon emission factor to obtain the final carbon emission factor. This overcomes the technical problems of traditional carbon emission factor calculations, which mainly simulate power flow by analyzing parameters such as grid node voltage and power, and then extrapolate the carbon emission factor based on generator fuel type and combustion efficiency. However, these methods suffer from high computational workload, poor real-time performance, and difficulty in capturing the volatility and time-varying nature of carbon emission flows, thus reducing the accuracy of carbon emission factor calculations. Compared to traditional methods, this invention estimates the carbon emission factor based on the initial carbon emission factor and power generation data, which can quickly adapt to frequent changes in the power generation structure in the power system, thereby improving the timeliness of the initial carbon emission factor calculation. Furthermore, the Kalman filtering correction of the initial carbon emission factor effectively reduces data noise and errors caused by model simplification, improving the accuracy of the carbon emission factor calculation. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of the steps in a method for calculating the carbon emission factor of electricity provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of the steps in a method for calculating the carbon emission factor of electricity provided in Embodiment 2 of the present invention; Figure 3 This is a dynamic calculation diagram of the carbon emission factor of electricity provided in Embodiment 2 of the present invention; Figure 4 This is a calculation error analysis diagram provided in Embodiment 2 of the present invention; Figure 5 This is a structural block diagram of a power carbon emission factor calculation system provided in Embodiment 3 of the present invention; Figure 6 This is a structural block diagram of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

[0022] This invention provides a method and system for calculating the carbon emission factor of electricity. It addresses the technical problem that traditional methods for calculating the carbon emission factor of electricity mainly involve analyzing parameters such as voltage and power of power grid nodes to simulate power flow and combining the fuel type and combustion efficiency of generator sets to estimate the carbon emission factor. However, when dealing with complex power grids or large-scale systems, this method suffers from problems such as large computational workload, poor real-time performance, and difficulty in capturing the volatility and time-varying nature of carbon emission flow, which reduces the accuracy of the calculation of the carbon emission factor of electricity.

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be noted that in the optional embodiments of the present invention, the object information and other related data involved require the permission or consent of the object when the embodiments of the present invention are applied to specific products or technologies, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. That is to say, if the embodiments of the present invention involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations, and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required, and the embodiments also need to be implemented with the authorization and consent of the object.

[0024] Please see Figure 1 , Figure 1 The flowchart illustrates the steps of a method for calculating the carbon emission factor of electricity, as provided in Embodiment 1 of the present invention.

[0025] This invention provides a method for calculating the carbon emission factor of electricity, comprising: Step 101: Obtain power generation data and historical carbon dioxide data. Solve the preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor.

[0026] Power generation data refers to electricity production and related data, including electricity consumption data from industries such as steel, ceramics, and chemicals, as well as update factors used to update the carbon factor.

[0027] Historical electricity carbon data refers to historical data related to carbon emissions from electricity, including but not limited to historical electricity consumption data and historical carbon factor data.

[0028] The initial carbon emission factor refers to the carbon emission factor parameter vector obtained by solving the linear regression model using historical carbon emission data. It includes carbon emission factor elements corresponding to coal-fired power, gas-fired power, and purchased electricity (wherein, the carbon emission factor element corresponding to coal-fired power represents the carbon emissions generated per unit of coal-fired power generation, reflecting the carbon emission intensity of coal-fired power generation; the carbon emission factor element corresponding to gas-fired power represents the carbon emissions generated per unit of gas-fired power generation, reflecting the carbon emission intensity of gas-fired power generation; and the carbon emission factor element corresponding to purchased electricity represents the carbon emissions generated per unit of purchased electricity, reflecting the overall carbon emission intensity of purchased electricity).

[0029] In this embodiment of the invention, power generation data and historical carbon dioxide data are acquired, the historical carbon dioxide data is preprocessed (i.e., timestamp unification, data sorting alignment, and zero-value filling for missing values), and the preset linear regression model is solved based on the preprocessed historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor.

[0030] In another embodiment, power generation data and historical carbon emission data are acquired. A corresponding energy structure matrix is ​​constructed using historical electricity consumption data from the historical carbon emission data, and a corresponding observed carbon emission factor sequence is constructed using historical carbon factor data from the historical carbon emission data. The energy structure matrix and the observed carbon emission factor sequence are input into a preset linear regression model to obtain a corresponding target linear regression model. The parameters of the target linear regression model are solved using the least squares method to obtain an initial carbon emission factor that includes carbon emission intensity parameters corresponding to coal-fired power, gas-fired power, and purchased electricity.

[0031] It should be noted that the preprocessing process mainly completes timestamp unification, data sorting and alignment, and zero-value filling for missing values, ensuring the consistency and integrity of the data in the time dimension.

[0032] It is worth mentioning that the unification of timestamps specifically involves converting time records of different formats and precisions from multi-source heterogeneous data such as power generation data, historical carbon emission data (including historical electricity consumption data and historical carbon factor data), and meteorological data into a unified standard time format and time precision. At the same time, the time attributes of each data are calibrated according to the same time dimension identification rules to ensure the consistency and compatibility of all data involved in the calculation of electricity carbon emission factors in the time dimension. In practice, a unified time format standard is first determined, generally adopting the ISO 8601 standard time format, covering the complete time dimensions of year, month, day, hour, minute, and second. Next, a unified time precision is defined. Based on the requirement for dynamic calculation of city-level electricity carbon emission factors at the minute level, the time precision of all data is unified to the minute level. Raw data with precision higher than the minute level (such as second-level or millisecond-level) is rounded down or averaged to the corresponding minute level. Raw data with precision lower than the minute level (such as hour-level or day-level) is split into corresponding minute dimensions according to time intervals and time dimension identifiers are added. Finally, a unified timestamp field identifier is added to all data, completing the full-dimensional unification of the format, precision, and field identifiers of timestamps from various data sources, enabling data from different sources to achieve precise time series alignment based on the unified timestamp.

[0033] It is worth mentioning that data sorting and alignment refers to the process of uniformly preprocessing the timestamps of power generation data and historical carbon factor data. Using the unified standard timestamp as the sole benchmark, all datasets involved in the calculation, including historical electricity consumption data, historical carbon factor data, and electricity consumption data from the steel / ceramics / chemical industries, are arranged in ascending order from earliest to latest time, generating a continuous and uninterrupted timeline sequence. Then, the relevant data fields such as electricity consumption, power generation, and carbon factor corresponding to the same timestamp in each data source are precisely mapped and matched to the corresponding positions on the timeline, achieving a one-to-one correspondence between multiple source data at the same time node. For cases where some data sources do not have corresponding data at certain timestamps, the timestamp position is retained and marked as missing, and then uniformly improved in the subsequent missing value processing stage. This eliminates the time dimension misalignment problem caused by inconsistent order during data collection and storage, ensuring the consistency and matching of all data in the time series.

[0034] It is worth mentioning that zero-value imputation refers to the process of filling missing values ​​with zero values ​​after the timestamps of power generation data and historical carbon emission data are unified and the data is sorted and aligned. For missing items with no corresponding data under individual timestamps marked during the preprocessing, zero values ​​are used for unified imputation. For all datasets involved in the calculation of carbon emission factors of electricity, such as historical electricity consumption data, historical carbon factor data, and electricity consumption data of the steel / ceramics / chemical industries, the missing data positions of each data source are assigned zero values ​​in the standard timeline sequence after sorting and alignment. This is to fill in the data dimensions, improve the integrity of the dataset, and ensure the continuity and effectiveness of data calculation in subsequent steps such as energy structure matrix construction, linear regression model solution, and carbon emission factor estimation of electricity, avoiding calculation interruptions or result deviations caused by missing data.

[0035] Step 102: Estimate the electricity carbon emission factor based on the initial electricity carbon factor and power generation data to obtain the corresponding initial electricity carbon emission factor.

[0036] In this embodiment of the invention, the electricity consumption of the steel industry, the ceramics industry, and the chemical industry is summed to obtain the corresponding total electricity consumption value. When the total electricity consumption value is greater than 0, the initial electricity carbon factor is updated using an update factor to obtain the corresponding target electricity carbon factor. Based on the target electricity carbon factor, the electricity consumption of the steel industry, the ceramics industry, and the chemical industry is weighted to obtain the corresponding total carbon emissions. The ratio of the total carbon emissions to the total electricity consumption value is calculated to obtain the corresponding initial electricity carbon emission factor. When the total electricity consumption value is less than or equal to 0, a preset benchmark electricity carbon emission factor is determined as the corresponding initial electricity carbon emission factor.

[0037] It is worth mentioning that existing technologies rely on power flow simulation and fuel efficiency extrapolation, resulting in long calculation cycles and an inability to adapt to dynamic changes in power system generation structure and industry electricity load, leading to poor real-time performance. In contrast, this application uses the initial electric carbon factor derived from historical electric carbon data as a basis, combined with real-time power generation data from industries such as steel, ceramics, and chemicals, to quickly estimate the initial electric carbon emission factor. This eliminates the need for complex iterative extrapolation, rapidly responds to dynamic changes in the power system, and enables dynamic calculation of the carbon emission factor, meeting the real-time requirements of carbon emission accounting.

[0038] Step 103: Perform Kalman filtering correction on the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor.

[0039] In this embodiment of the invention, the Kalman filter algorithm is used to correct the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor.

[0040] In another embodiment, a pre-acquired prior covariance estimate is input into a preset Kalman gain function to obtain the corresponding Kalman gain. The pre-acquired prior state estimate and a preset observation matrix are multiplied to obtain a first multiplier. The initial electricity carbon emission factor is then differenced from the first multiplier to obtain a first difference. This first difference is then multiplied by the Kalman gain to obtain a second multiplier. Finally, the second multiplier is summed with the prior state estimate to obtain the corresponding electricity carbon emission factor.

[0041] It should be noted that Kalman filter correction is an algorithm based on the linear system state equation, which uses system input and output observation data to make the optimal estimate of the system state. In this method, it is used to correct the initial power carbon emission factor, reduce the impact of data noise and model error, and improve the calculation accuracy.

[0042] It is worth mentioning that existing technologies mainly simulate power flow by analyzing complex parameters such as grid node voltage and power, and then calculate carbon emission factors by combining generator fuel type and combustion efficiency. This requires extremely high levels of data acquisition and calculation of grid operating parameters, and the computational workload increases dramatically when dealing with complex grids or large-scale systems. In contrast, this application only requires acquiring power generation data and historical carbon emission data, and completes the calculation through three core steps: model solving, factor estimation, and filtering correction. It eliminates the need to build complex power flow simulation models, greatly simplifies the calculation process, reduces the requirements for hardware computing power and data acquisition, and is suitable for the computational needs of power systems of various sizes.

[0043] It is worth mentioning that existing technologies mostly use simplified mathematical models to calculate carbon emission factors and lack effective error correction mechanisms. This makes it difficult to eliminate errors caused by data acquisition noise and model simplification, and also fails to compensate for calculation deviations caused by fluctuations in carbon emission flows, resulting in low calculation accuracy. In contrast, this application introduces a Kalman filter algorithm for optimal state estimation correction based on the initial estimation of the electricity carbon emission factor. Through a closed-loop iterative process of prediction and update, it effectively reduces the impact of various errors, making the corrected carbon emission factor more closely match the actual value and significantly improving calculation accuracy. The corrected error fluctuates slightly around zero, far lower than the calculation error of existing technologies.

[0044] In this embodiment of the invention, by acquiring power generation data and historical carbon emission data, a preset linear regression model is solved based on the historical carbon emission data to obtain the corresponding initial carbon emission factor. The initial carbon emission factor is then estimated based on the initial carbon emission factor and power generation data to obtain the corresponding initial carbon emission factor. Finally, Kalman filtering is applied to the initial carbon emission factor to obtain the final carbon emission factor. This overcomes the technical problems of traditional carbon emission factor calculations, which mainly simulate power flow by analyzing parameters such as grid node voltage and power, and then extrapolating the carbon emission factor based on generator fuel type and combustion efficiency. However, these methods suffer from high computational workload, poor real-time performance, and difficulty in capturing the volatility and time-varying nature of carbon emission flows, thus reducing the accuracy of carbon emission factor calculations. Compared to traditional carbon emission factor calculation methods, this invention estimates the carbon emission factor based on the initial carbon emission factor and power generation data, which can quickly adapt to frequent changes in the power generation structure in the power system, thereby improving the timeliness of the initial carbon emission factor calculation. Furthermore, by applying Kalman filtering to the initial carbon emission factor, errors caused by data noise and model simplification are effectively reduced, improving the accuracy of the carbon emission factor calculation.

[0045] Please see Figure 2 , Figure 2 This is a flowchart illustrating the steps of a method for calculating the carbon emission factor of electricity, as provided in Embodiment 2 of the present invention.

[0046] This invention provides a method for calculating the carbon emission factor of electricity, comprising: Step 201: Obtain power generation data and historical carbon electricity data. Construct the corresponding energy structure matrix using historical electricity consumption data from the historical carbon electricity data, and construct the corresponding observed carbon electricity factor sequence using historical carbon factor data from the historical carbon electricity data.

[0047] Historical electricity consumption data refers to the records of the power generation or consumption scale of various energy sources such as coal-fired power, gas-fired power, and purchased electricity at different points in the past.

[0048] Historical carbon factor data refers to the electricity carbon emission factor (i.e. carbon emission intensity) obtained through actual measurement at different points in the past.

[0049] The energy structure matrix refers to an n×3-dimensional matrix (where n is the number of time points) constructed based on historical electricity consumption data from historical electricity carbon data and categorized into three energy types: coal-fired power, gas-fired power, and purchased electricity. Each row corresponds to a time point, and the three columns represent the coal-fired power generation, gas-fired power generation, and purchased electricity at the corresponding time point, intuitively reflecting the energy supply structure of the power system at different time points.

[0050] The observed carbon emission factor sequence refers to an n×1 dimensional sequence (n being the number of time points) formed by arranging historical carbon emission factor data from historical carbon emission data in chronological order. Each element corresponds to a carbon emission factor of electricity actually measured at a time point, reflecting the actual observed value of carbon emission factor of electricity at different time points.

[0051] In this embodiment of the invention, power generation data and historical carbon emission data are acquired. Historical electricity consumption data is categorized and organized according to three energy types: coal-fired power, gas-fired power, and purchased electricity. An energy structure matrix with dimensions n×3 (where n is the number of time points and 3 corresponds to the three energy types) is constructed. Each row in the energy structure matrix corresponds to a time point, and the three columns correspond to the specific values ​​of coal-fired power generation, gas-fired power generation, and purchased electricity at that time point. Historical carbon factor data is arranged chronologically to construct an n×1 sequence of observed carbon emission factors. Each element in the observed carbon emission factor sequence corresponds to an actual measured carbon emission factor for electricity at a given time point.

[0052] In another embodiment, power generation data and historical carbon emission data are acquired, and preprocessing operations are performed on the power generation data and historical carbon emission data (i.e., timestamp unification, data sorting alignment, and zero-value filling for missing values ​​are performed on the two types of data). Historical electricity consumption data is extracted from the historical carbon emission data and classified and organized according to three energy types: coal-fired power, gas-fired power, and purchased electricity. An energy structure matrix with dimension n×3 is constructed, where n is the number of time points. Each row in the matrix corresponds to a time point, and the three columns correspond to the specific values ​​of coal-fired power generation, gas-fired power generation, and purchased electricity at that time point, respectively. At the same time, historical carbon factor data is extracted from the historical carbon emission data and arranged in chronological order to construct an n×1 observed carbon emission factor sequence. Each element in the sequence corresponds to the actual measured electricity carbon emission factor at a time point.

[0053] It is worth mentioning that by constructing an energy structure matrix using historical electricity consumption data and constructing an observed carbon factor sequence using historical carbon factor data, the scattered historical carbon data is transformed into a structured and time-series data form that meets the input requirements of the linear regression model. This not only standardizes the data dimensions but also allows the data to accurately match the model's computational logic, avoiding model computational biases caused by unstructured data input.

[0054] Step 202: Input the energy structure matrix and the observed carbon factor sequence into the preset linear regression model to obtain the corresponding target linear regression model.

[0055] A linear regression model is a pre-defined mathematical model used to explore the linear relationship between independent and dependent variables. In this invention, it is used to establish the quantitative relationship between energy structure and electricity carbon emission factor, and is the basic mathematical model for solving the initial electricity carbon factor.

[0056] The target linear regression model refers to a personalized linear regression model that conforms to the actual electricity carbon emission data patterns after the energy structure matrix and the observed electricity carbon factor sequence are input into a preset linear regression model and the data is adapted and the model parameters and structure are adjusted. It can be directly used to solve the initial electricity carbon factor.

[0057] In this embodiment of the invention, the energy structure matrix and the observed carbon factor sequence are input into a preset linear regression model to obtain the corresponding target linear regression model.

[0058] In another embodiment, the energy structure matrix and the observed carbon emission factor sequence are input into a preset linear regression model. The quantitative correlation between the two is established based on the linear fitting characteristics of the model. The energy structure matrix is ​​used as the independent variable of the model and the observed carbon emission factor sequence is used as the dependent variable of the model to complete the data adaptation. The model completes parameter adaptation and structural adjustment based on the characteristics of the input historical carbon emission data, and finally forms a target linear regression model that fits the actual carbon emission data pattern of electricity.

[0059] It should be noted that the linear regression model is as follows:

[0060] in, To observe the electric carbon factor sequence, For the energy structure matrix, As the initial electric carbon factor, This is a random error vector.

[0061] The random error vector is a vector representing the random and irregular deviation between actual electricity carbon emission data and the model's linear fit results after the energy structure matrix and observed electricity carbon factor sequence are input into a pre-defined linear regression model. It is an important component of the linear regression model and is used to quantify the degree of random error in the model's inability to perfectly fit the actual data. Furthermore, the error values ​​in the random error vector exhibit random distribution characteristics, have no fixed pattern of change, and are not systematic errors caused by improper model settings or data processing.

[0062] It is worth mentioning that by inputting the energy structure matrix and the observed carbon emission factor sequence into the preset linear regression model, the target linear regression model is obtained. The model constructs a quantitative linear relationship between the power energy supply structure and the carbon emission factor, replacing the traditional method of setting fixed carbon factors based on human experience. This eliminates the parameter bias caused by human subjective judgment and makes the solution of the initial carbon emission factor more consistent with the actual carbon emission characteristics of the power system.

[0063] Step 203: Based on the preset objective function, the least squares method is used to solve the objective linear regression model to obtain the corresponding initial carbon factor.

[0064] In this embodiment of the invention, based on a preset objective function, the least squares method is used to solve the objective linear regression model (the least squares method is used in the solution process, and the sum of squared residuals is minimized through matrix operations) to obtain the corresponding initial carbon factor (i.e. =( , , )).

[0065] In another embodiment, based on a preset objective function, the least squares method is used to solve the objective linear regression model. The minimization of the sum of squared residuals is taken as the core optimization objective. The objective function is solved through matrix operations to find the electric carbon factor parameter vector that best matches the characteristics of historical electric carbon data. Finally, the initial electric carbon factor containing the carbon emission intensity parameters corresponding to coal power, gas power, and purchased electricity is solved.

[0066] It should be noted that the least squares method is a mathematical optimization technique that finds the electric carbon factor parameter vector that best matches the historical patterns of electric carbon data by minimizing the sum of squared residuals between the model fitted value and the actual observed value. This makes the initial electric carbon factor the optimal solution under the linear regression model, providing accurate and objective basic parameters for subsequent estimation of electric carbon emission factors.

[0067] It should be noted that the objective function is as follows:

[0068] in, For the sum of squared residuals, For the first k Measured values ​​of carbon emission factors for electricity at any given time. For the first k Coal-fired power generation at any given time For the first k Real-time gas-fired power generation For the first k Purchase electricity from external sources at all times. It is the first element of the electrocarbon factor. It is the second element of the electrocarbon factor. It is the third element in the electrocarbon factor. n For time points, k For time indexing.

[0069] It is worth mentioning that, based on the objective function, the least squares method is used to solve the model parameters, and the optimal initial carbon emission factor is obtained through mathematical optimization. This allows the solved carbon emission factor to closely match the actual characteristics of electricity carbon emissions, effectively improving the accuracy of the initial carbon emission factor solution. This provides accurate and objective basic parameters for subsequent carbon emission factor estimation. At the same time, the solution logic is adaptable to historical carbon emission data of various time series and has good versatility.

[0070] It should be noted that by constructing an energy structure matrix using historical electricity consumption data and an observed carbon factor sequence using historical carbon factor data, the fragmented, time-series historical carbon factor data is transformed into a standardized data format that meets the input requirements of a linear regression model. This not only standardizes the data dimensions and ensures data consistency over time, but also allows the data to accurately match the model's computational logic, avoiding model fitting bias caused by unstructured data input. This provides standardized and unified data support for subsequent modeling and solving. The structured energy structure matrix and observed carbon factor sequence are then input into a pre-set linear regression model to obtain the target linear regression model. The model is used to establish a power energy... The quantitative linear correlation between supply structure and carbon emission factors eliminates reliance on human experience and removes parameter bias caused by subjective human setting of carbon factors, making the solution of initial electric carbon factors more closely match the actual carbon emission characteristics of the power system. Finally, based on a preset objective function with the residual sum of squares as the core, the least squares method is used to solve the parameters of the objective linear regression model. By minimizing the residual sum of squares between the model fitting value and the actual observed value through mathematical optimization, the electric carbon factor parameter vector that best fits the historical electric carbon data pattern can be accurately found, making the solved initial electric carbon factor the optimal solution and effectively improving the accuracy of the initial electric carbon factor solution.

[0071] Step 204: Estimate the electricity carbon emission factor based on the initial electricity carbon factor and power generation data to obtain the corresponding initial electricity carbon emission factor.

[0072] Furthermore, the power generation data includes electricity consumption in the steel industry, the ceramics industry, the chemical industry, and the update factor. Step 204 includes the following sub-steps: S11. Add up the electricity consumption of the steel industry, the ceramics industry, and the chemical industry to obtain the corresponding total electricity consumption value.

[0073] Electricity consumption in the steel industry refers to the total amount of electricity consumed in the entire steel production and processing process (including mining, ironmaking, steelmaking, rolling, etc.), which is a significant category of industrial electricity consumption.

[0074] Electricity consumption in the ceramics industry refers to the amount of electricity consumed in the production process of ceramic products (including raw material processing, molding, firing, glazing, etc.), which falls under the category of electricity consumption in high-energy-consuming industries.

[0075] Electricity consumption in the chemical industry refers to the total amount of electricity consumed in the production of various chemical products (such as fertilizers, pesticides, plastics, rubber, etc.) in the chemical industry.

[0076] In this embodiment of the invention, the sum of electricity consumption in the steel industry, the ceramics industry, and the chemical industry is calculated to obtain the corresponding total electricity consumption. For example... ,in, TP This represents the total electricity consumption. Ec For electricity used by the steel industry, Eg For electricity used by the ceramics industry, Ei Electricity for the chemical industry.

[0077] It is worth mentioning that the power generation data includes electricity consumption and replacement factors from the three major energy-intensive industries of steel, ceramics and chemicals, accurately anchoring the core electricity users of the city-level power system, making the carbon emission factor estimation more in line with the actual electricity consumption structure.

[0078] S12. When the total electricity consumption is greater than the preset electricity consumption benchmark value, the initial carbon factor is updated using an update factor to obtain the corresponding target carbon factor.

[0079] Furthermore, S12 includes the following sub-steps: S121. Determine whether the update factor is equal to the preset update threshold.

[0080] The update factor refers to the numerical value of factors affecting the carbon factor, such as policy adjustments and changes in energy structure, and takes the value of 0 or 1.

[0081] The update threshold refers to a preset critical value, which is 1.

[0082] In this embodiment of the invention, it is determined whether the update factor is 1.

[0083] S122. When the update factor equals the update threshold, the pre-acquired update carbon factor is determined as the target carbon factor.

[0084] Updating the carbon factor refers to the carbon factor generated in advance by calibrating it in response to the latest policy requirements and changes in the energy structure.

[0085] The target electric carbon factor refers to the electric carbon factor that is finally determined after the update factor determination and used for subsequent carbon emission calculations. It is either the initial electric carbon factor or the updated electric carbon factor.

[0086] In this embodiment of the invention, when the update factor is 1, the pre-obtained updated carbon factor is determined as the target carbon factor.

[0087] It is worth mentioning that the updated electricity carbon factor used in the update is a parameter that was pre-calibrated and generated based on the latest policy requirements and energy structure changes, rather than being derived from temporary extrapolation. This ensures the accuracy and relevance of the updated target electricity carbon factor, allowing subsequent calculations of total carbon emissions based on the target electricity carbon factor and initial estimations of electricity carbon emission factors to reflect the actual carbon emission characteristics of the power system, further improving the overall calculation accuracy.

[0088] S123. When the update factor is not equal to the update threshold, it means that the current power system policy requirements and energy generation structure have changed in practice. The initial electric carbon factor is then determined as the corresponding target electric carbon factor.

[0089] In this embodiment of the invention, when the update factor is 0, the initial electrocarbon factor is determined as the corresponding target electrocarbon factor.

[0090] It is worth mentioning that the binary judgment method of "comparing the update factor with the preset update threshold" only requires a simple judgment of whether they are equal to determine the update strategy of the carbon emission factor. This eliminates the need for complex parameter derivation and model recalculation, simplifying the calculation steps and enabling rapid update determination. This aligns with the simple mathematical operations in the initial total electricity consumption calculation and subsequent weighted calculations, ensuring the real-time accuracy of the overall initial carbon emission factor estimation and adapting to the calculation requirements of dynamic changes in the power system. By clearly defining the update threshold as the judgment criterion, the carbon emission factor is only updated when the update factor equals the update threshold; otherwise, the initial carbon emission factor is used. This provides a clear and unified quantitative standard for triggering the carbon emission factor update. The rules are clear and easy to understand, allowing for engineering implementation without professional parameter tuning. It also facilitates subsequent technical debugging and logic optimization, demonstrating excellent practicality. The target carbon factor is determined based on the differential judgment results. When there are influencing factors such as policy adjustments or energy structure changes (when the updated factor equals the threshold), the pre-calibrated updated carbon factor is used to keep up with the actual operation changes of the power system. When there are no relevant changes, the initial carbon factor is used. This avoids the calculation deviation caused by the fixed carbon factor and eliminates the need to repeatedly solve the linear regression model, thus saving a lot of computing resources while ensuring adaptability.

[0091] S13. Based on the target electric carbon factor, perform weighted calculations on the electricity consumption of the steel industry, the ceramics industry, and the chemical industry to obtain the corresponding total carbon emissions.

[0092] Total carbon emissions refer to the total carbon emissions obtained after weighted calculation of electricity consumption in the three major industries of steel, ceramics, and chemicals. It is a key basic data for calculating the initial electricity carbon emission factor.

[0093] In this embodiment of the invention, a target electrocarbon factor is used to weight the electricity consumption of the steel industry, the ceramics industry, and the chemical industry to obtain the corresponding total carbon emissions. For example, total carbon emissions = Electricity consumption in the steel industry + Electricity consumption in the ceramics industry Electricity consumption in the chemical industry.

[0094] It should be noted that in city-level power systems, the electricity demand of the steel, ceramics, and chemical industries directly corresponds to the power generation supply of coal-fired power, gas-fired power, and purchased electricity (i.e., "industry electricity consumption structure = energy generation structure").

[0095] S14. Ratio the total carbon emissions to the total electricity consumption to obtain the corresponding initial electricity carbon emission factor.

[0096] In this embodiment of the invention, the ratio between total carbon emissions and total electricity consumption is calculated to obtain the corresponding initial electricity carbon emission factor. For example, the initial electricity carbon emission factor = total carbon emissions / total electricity consumption.

[0097] It is worth mentioning that by setting a benchmark value for electricity consumption as the switching node for the estimation logic, the problem of calculation distortion and meaninglessness when the total electricity consumption is zero or too low is effectively avoided, ensuring the continuity of the calculation process and the rationality of the results.

[0098] S15. When the total electricity consumption is less than or equal to the electricity consumption benchmark value, the preset benchmark electricity carbon emission factor shall be determined as the corresponding initial electricity carbon emission factor.

[0099] The electricity consumption benchmark value refers to the preset critical standard for electricity consumption, which is set to 0.

[0100] The benchmark electricity carbon emission factor refers to a preset fixed electricity carbon factor value, which is generated by combining industry general conditions, historical average carbon emission intensity and relevant standards, and is usually set to 0.45.

[0101] In this embodiment of the invention, when the total electricity consumption is 0, the preset benchmark electricity carbon emission factor is determined as the corresponding initial electricity carbon emission factor.

[0102] It is worth mentioning that the differentiated setting of the benchmark electricity carbon emission factor assignment rules makes the estimation logic more flexible and engineering practical. The overall estimation steps are simple and efficient, without the need for complex grid parameter simulation, and can quickly adapt to changes in real-time power generation data, which greatly improves the estimation efficiency and fit of the initial electricity carbon emission factor.

[0103] It should be noted that by using the electricity consumption of the steel, ceramics, and chemical industries as the core calculation basis, the main sources of electricity in the power system are accurately identified. Furthermore, the electricity consumption structure of these three industries corresponds one-to-one with the power generation structure of coal-fired power, gas-fired power, and purchased electricity. This ensures that subsequent weighted carbon emission calculations accurately match the actual characteristics of electricity supply and consumption, avoiding the disconnect between results and reality caused by traditional estimation methods that fail to differentiate between electricity users. The total electricity consumption is obtained by summing the electricity consumption of the steel, ceramics, and chemical industries, and a benchmark value is set as a scenario switching node. When the total electricity consumption is greater than the benchmark value, the calculation is performed based on actual electricity consumption data and the electricity carbon factor. When the total electricity consumption is less than or equal to the benchmark value, a preset benchmark electricity carbon emission factor is directly assigned. This effectively avoids problems such as meaningless division and distorted calculation results when the electricity consumption is zero or too low, ensuring the continuity of the calculation process and the rationality of the results under different electricity consumption scenarios.

[0104] Step 205: Perform Kalman filtering correction on the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor.

[0105] Furthermore, step 205 includes the following sub-steps: S21. Input the pre-acquired prior covariance estimate into the preset Kalman gain function to obtain the corresponding Kalman gain.

[0106] The prior covariance estimate refers to the parameter pre-set in the Kalman filter, which is determined based on the historical electricity carbon emission factor and system uncertainty analysis. It is the posterior covariance estimate in the previous electricity carbon emission factor calculation process (if there is no previous electricity carbon emission factor calculation, the prior covariance estimate is 0.5).

[0107] The specific expression for the posterior covariance estimate is as follows:

[0108] in, This is the posterior covariance estimate. It is an identity matrix.

[0109] Kalman gain refers to the weighting coefficients obtained by solving the Kalman gain function. It is used to balance the contributions of prior state estimates and actual observations to the Kalman filter correction, determining the magnitude of the error correction. The identity matrix is ​​a first-order identity matrix with dimensions 1×1. Its unique element is 1, and it is a square matrix in linear algebra where all elements on the main diagonal are 1 and all other elements are 0.

[0110] In this embodiment of the invention, a pre-acquired prior covariance estimate is input into a preset Kalman gain function to obtain the corresponding Kalman gain.

[0111] It should be noted that the Kalman gain function is as follows:

[0112] in, For Kalman gain, This is the prior covariance estimate. For the observation matrix, To observe the noise covariance, k This is used to identify the type of energy.

[0113] It should be noted that the observation matrix is ​​a preset parameter in the Kalman filter, with a value of 1. The observation noise covariance is a preset parameter in the Kalman filter, with a value of 0.1, used to quantify the impact of errors during the observation process on the initial power carbon emission factor.

[0114] S22. Multiply the pre-acquired prior state estimate and the preset observation matrix to obtain the corresponding first multiplier.

[0115] The prior state estimate refers to the output of the Kalman filter prediction stage, which is calculated based on the previously calculated power carbon emission factor and state transition matrix (i.e., prior state estimate = power carbon emission factor × state transition matrix).

[0116] In this embodiment of the invention, the multiplication between the pre-acquired prior state estimate and the preset observation matrix is ​​calculated to obtain the corresponding first multiplication value.

[0117] S23. Perform a difference processing on the initial electricity carbon emission factor and the first multiplication value to obtain the corresponding first difference value.

[0118] In this embodiment of the invention, the multiplication between the initial electricity carbon emission factor and the first multiplication value is calculated to obtain the corresponding first difference.

[0119] S24. Multiply the first difference with the Kalman gain to obtain the corresponding second multiplier.

[0120] In this embodiment of the invention, the multiplication between the first difference and the Kalman gain is calculated to obtain the corresponding second multiplication.

[0121] S25. The second multiplier is summed with the prior state estimate to obtain the corresponding electricity carbon emission factor.

[0122] In this embodiment of the invention, the sum between the second multiplier and the prior state estimate is calculated to obtain the corresponding electricity carbon emission factor.

[0123] In another embodiment, the pre-acquired prior state estimate, the preset observation matrix, the Kalman gain, and the initial electricity carbon emission factor are input into a preset electricity carbon emission factor function to obtain the corresponding electricity carbon emission factor.

[0124] It should be noted that the specific function for the electricity carbon emission factor is as follows:

[0125] in, As a carbon emission factor for electricity, These are the prior state estimates. For Kalman gain, As the initial carbon emission factor for electricity, This is the observation matrix.

[0126] It is worth mentioning that, see Figure 3 As shown, it is clearly observed that the carbon emission factor for electricity consistently approximates the actual value, and the deviation from the actual value continues to narrow over time, strongly demonstrating the significant role of the iterative correction mechanism in improving calculation accuracy. (See also...) Figure 4As shown, it can be clearly seen that the absolute value of the error between the electricity carbon emission factor and the actual value is significantly smaller than the absolute value of the error between the initial electricity carbon emission factor and the actual value. Moreover, after Kalman filtering correction, the error fluctuates slightly around the zero value, which fully demonstrates that Kalman filtering correction effectively compensates for the error accumulation caused by data acquisition noise and model simplification, and improves the calculation accuracy of the electricity carbon emission factor.

[0127] In this embodiment of the invention, by acquiring power generation data and historical carbon emission data, a preset linear regression model is solved based on the historical carbon emission data to obtain the corresponding initial carbon emission factor. The initial carbon emission factor is then estimated based on the initial carbon emission factor and power generation data to obtain the corresponding initial carbon emission factor. Finally, Kalman filtering is applied to the initial carbon emission factor to obtain the final carbon emission factor. This overcomes the technical problems of traditional carbon emission factor calculations, which mainly simulate power flow by analyzing parameters such as grid node voltage and power, and then extrapolating the carbon emission factor based on generator fuel type and combustion efficiency. However, these methods suffer from high computational workload, poor real-time performance, and difficulty in capturing the volatility and time-varying nature of carbon emission flows, thus reducing the accuracy of carbon emission factor calculations. Compared to traditional carbon emission factor calculation methods, this invention estimates the carbon emission factor based on the initial carbon emission factor and power generation data, which can quickly adapt to frequent changes in the power generation structure in the power system, thereby improving the timeliness of the initial carbon emission factor calculation. Furthermore, by applying Kalman filtering to the initial carbon emission factor, errors caused by data noise and model simplification are effectively reduced, improving the accuracy of the carbon emission factor calculation.

[0128] Please see Figure 5 , Figure 5 This is a structural block diagram of an electricity carbon emission factor calculation system provided in Embodiment 3 of the present invention.

[0129] This invention provides a power carbon emission factor calculation system, comprising: The data acquisition module 301 is used to acquire power generation data and historical carbon dioxide data, and solve the preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor. The estimation module 302 is used to estimate the electricity carbon emission factor based on the initial electricity carbon factor and power generation data, and obtain the corresponding initial electricity carbon emission factor. The correction module 303 is used to perform Kalman filtering correction on the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor.

[0130] Furthermore, the acquisition module 301 includes: The construction submodule is used to construct the corresponding energy structure matrix using historical electricity consumption data from historical carbon data, and to construct the corresponding observed carbon factor sequence using historical carbon factor data from historical carbon data. The input submodule is used to input the energy structure matrix and the observed carbon factor sequence into a preset linear regression model to obtain the corresponding target linear regression model; The analysis submodule is used to solve the target linear regression model based on a preset objective function using the least squares method to obtain the corresponding initial carbon factor.

[0131] Furthermore, the power generation data includes electricity consumption in the steel industry, ceramics industry, and chemical industry, as well as update factors. The estimation module 302 includes: The summation submodule is used to sum the electricity consumption of the steel industry, the ceramics industry, and the chemical industry to obtain the corresponding total electricity consumption value; The update submodule is used to update the initial carbon factor by using an update factor when the total electricity consumption value is greater than the preset electricity consumption benchmark value, so as to obtain the corresponding target carbon factor. The weighted submodule is used to perform weighted calculations on the electricity consumption of the steel industry, the ceramics industry, and the chemical industry based on the target electric carbon factor to obtain the corresponding total carbon emissions; The ratio submodule is used to process the ratio of total carbon emissions to total electricity consumption to obtain the corresponding initial electricity carbon emission factor. A submodule is selected to determine the preset benchmark electricity carbon emission factor as the corresponding initial electricity carbon emission factor when the total electricity consumption is less than or equal to the benchmark electricity consumption value.

[0132] Furthermore, update the submodules, including: The first analysis unit is used to determine whether the update factor is equal to the preset update threshold; The second analysis unit is used to determine the pre-acquired updated electric carbon factor as the target electric carbon factor when the update factor equals the update threshold. The third analysis unit is used to determine the initial electrocarbon factor as the corresponding target electrocarbon factor when the update factor is not equal to the update threshold.

[0133] Furthermore, the correction module 303 includes: The first correction submodule is used to input the pre-acquired prior covariance estimate into the preset Kalman gain function to obtain the corresponding Kalman gain; The first multiplication value is obtained by multiplying the pre-acquired prior state estimate and the preset observation matrix. The second correction submodule is used to perform difference processing between the initial electricity carbon emission factor and the first multiplication value to obtain the corresponding first difference value. The first difference is multiplied by the Kalman gain to obtain the corresponding second multiplication value; The second multiplier is summed with the prior state estimate to obtain the corresponding electricity carbon emission factor.

[0134] Furthermore, the objective function is specifically as follows: ; in, For the sum of squared residuals, For the first k Measured values ​​of carbon emission factors for electricity at any given time. For the first k Coal-fired power generation at any given time For the first k Real-time gas-fired power generation For the first k Purchase electricity from external sources at all times. It is the first element of the electrocarbon factor. It is the second element of the electrocarbon factor. It is the third element in the electrocarbon factor. n For time points, k For time indexing.

[0135] Please see Figure 6 , Figure 6 This is a structural block diagram of an electronic device provided in Embodiment 4 of the present invention.

[0136] An electronic device according to an embodiment of the present invention includes: a memory 401 and a processor 402. The memory 401 stores a computer program. When the computer program is executed by the processor 402, the processor 402 executes the electricity carbon emission factor calculation method as described in any of the above embodiments.

[0137] Memory 401 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Memory 401 has storage space 403 for program code 413 for performing any of the method steps described above. For example, storage space 403 for program code may include individual program codes 413 for implementing the various steps in the methods described above. This program code may be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, CDs, memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When run by a computing processing device, this code causes the computing processing device to perform the various steps in the methods described above. This program code may be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, CDs, memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When this code is run by a computing processing device, it causes the device to perform the various steps in the electricity carbon emission factor calculation method described above.

[0138] Embodiment 5 of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the electricity carbon emission factor calculation method as described in any of the above embodiments.

[0139] Embodiment 6 of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the electricity carbon emission factor calculation method as described in any of the above embodiments.

[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0141] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0142] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0143] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0144] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0145] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for calculating the carbon emission factor of electricity, characterized in that, include: Acquire power generation data and historical carbon dioxide data, and solve the preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor; Based on the initial carbon emission factor and the power generation data, the carbon emission factor of electricity is estimated to obtain the corresponding initial carbon emission factor of electricity. The initial electricity carbon emission factor is corrected by Kalman filtering to obtain the corresponding electricity carbon emission factor.

2. The method for calculating the carbon emission factor of electricity according to claim 1, characterized in that, The step of solving a preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor includes: A corresponding energy structure matrix is ​​constructed using the historical electricity consumption data of the historical carbon data, and a corresponding observed carbon factor sequence is constructed using the historical carbon factor data of the historical carbon data. The energy structure matrix and the observed carbon factor sequence are input into a preset linear regression model to obtain the corresponding target linear regression model; Based on the preset objective function, the least squares method is used to solve the objective linear regression model to obtain the corresponding initial carbon factor.

3. The method for calculating the carbon emission factor of electricity according to claim 1, characterized in that, The power generation data includes electricity consumption in the steel industry, the ceramics industry, the chemical industry, and a renewal factor. The step of estimating the electricity carbon emission factor based on the initial electricity carbon factor and the power generation data to obtain the corresponding initial electricity carbon emission factor includes: The electricity consumption of the steel industry, the ceramics industry, and the chemical industry is summed to obtain the corresponding total electricity consumption value; When the total electricity consumption is greater than the preset electricity consumption benchmark value, the initial carbon dioxide factor is updated using the update factor to obtain the corresponding target carbon dioxide factor. The electricity consumption of the steel industry, the ceramics industry, and the chemical industry is weighted based on the target electrocarbon factor to obtain the corresponding total carbon emissions. The ratio of the total carbon emissions to the total electricity consumption is used to obtain the corresponding initial electricity carbon emission factor. When the total electricity consumption is less than or equal to the electricity consumption benchmark value, the preset benchmark electricity carbon emission factor is determined as the corresponding initial electricity carbon emission factor.

4. The method for calculating the carbon emission factor of electricity according to claim 3, characterized in that, The step of updating the initial electrocarbon factor using the update factor to obtain the corresponding target electrocarbon factor includes: Determine whether the update factor is greater than or equal to a preset update threshold; When the update factor is equal to the update threshold, the pre-acquired updated carbon factor is determined as the target carbon factor. When the update factor is not equal to the update threshold, the initial electrocarbon factor is determined as the corresponding target electrocarbon factor.

5. The method for calculating the carbon emission factor of electricity according to claim 1, characterized in that, The step of performing Kalman filtering correction on the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor includes: Input the pre-acquired prior covariance estimate into the preset Kalman gain function to obtain the corresponding Kalman gain; The first multiplication value is obtained by multiplying the pre-acquired prior state estimate and the preset observation matrix. The initial electricity carbon emission factor is compared with the first multiplication value to obtain the corresponding first difference value. The first difference is multiplied by the Kalman gain to obtain the corresponding second multiplication value; The second multiplier is summed with the prior state estimate to obtain the corresponding electricity carbon emission factor.

6. The method for calculating the carbon emission factor of electricity according to claim 2, characterized in that, The objective function is specifically: ; in, For the sum of squared residuals, For the first k Measured values ​​of carbon emission factors for electricity at any given time. For the first k Coal-fired power generation at any given time For the first k Real-time gas-fired power generation For the first k Purchase electricity from external sources at all times. It is the first element of the electrocarbon factor. It is the second element of the electrocarbon factor. It is the third element in the electrocarbon factor. n For time points, k For time indexing.

7. A power carbon emission factor calculation system, characterized in that, include: The data acquisition module is used to acquire power generation data and historical carbon dioxide data, and to solve a preset linear regression model based on the historical carbon dioxide data to obtain the corresponding initial carbon dioxide factor. The estimation module is used to estimate the electricity carbon emission factor based on the initial electricity carbon factor and the power generation data, and obtain the corresponding initial electricity carbon emission factor. The correction module is used to perform Kalman filtering correction on the initial electricity carbon emission factor to obtain the corresponding electricity carbon emission factor.

8. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the electricity carbon emission factor calculation method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the method for calculating the carbon emission factor of electricity as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, wherein when the program instructions are executed by a computer, the computer performs the electricity carbon emission factor calculation method as described in any one of claims 1-6.