A carbon emission calculation method and device based on power grid power flow
By using a power grid flow-based carbon emission calculation method, and leveraging a power grid BP neural network model and user-differentiated scores, the complexity and user acceptance issues of traditional carbon emission calculations are resolved, achieving high-precision carbon emission prediction and practical application.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU FRONTIER ELECTRIC TECH
- Filing Date
- 2022-10-19
- Publication Date
- 2026-06-30
Smart Images

Figure CN115630779B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of carbon emission technology and relates to a carbon emission calculation method and apparatus based on power grid flow. Background Technology
[0002] Carbon emission calculation mainly includes several stages: model research, algorithm verification, software function description, and demonstration of carbon accounting capabilities. Traditional carbon emission calculation methods involve numerous indicators and are computationally difficult, creating obstacles to the practical application and widespread adoption of carbon emission calculation.
[0003] Furthermore, different carbon emission calculation projects have different objectives. There is a need to design a carbon composition parameter generation algorithm that is adaptable to different carbon emission calculation scenarios and has high user acceptance. This would be highly beneficial for promoting the implementation and deployment of carbon emission calculation. Summary of the Invention
[0004] Objective: In order to overcome the shortcomings of existing technologies and solve the problems of poor universality and low user acceptance of traditional analysis algorithms, this invention provides a carbon emission calculation method and device based on power grid flow.
[0005] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0006] Firstly, a carbon emission calculation method based on power grid flow is provided, including:
[0007] Obtain historical carbon emission calculation event data;
[0008] Based on the historical carbon emission calculation event data, the parameters of the pre-built power grid BP neural network model are updated until the variance E between the carbon emissions obtained from the current parameters output by the model and the expected carbon emissions is less than a set value, thus obtaining the determined parameters and the trained power grid BP neural network model; wherein the parameters include the weights w at each time point. i The magnification exponent m of the point-to-point distance;
[0009] Obtain the current electricity consumption and reference electricity consumption, input them into the trained power grid BP neural network model, and determine the carbon emission calculation result based on the output of the power grid BP neural network model.
[0010] In some embodiments, the carbon emission calculation method based on power grid flow further includes:
[0011] Based on the parameters and the point-by-point distance calculation formula, the distance between the electricity consumption curve and the reference electricity consumption curve is determined;
[0012] Based on the distance between the electricity consumption curve and the reference electricity consumption curve, calculate the user's differential score for electricity and typical events.
[0013] In some embodiments, the point-to-point distance calculation formula includes:
[0014]
[0015] Where p i , Representing time points i Electricity consumption and time points i Reference electricity consumption.
[0016] In some embodiments, the distance between the electricity consumption curve and the reference electricity consumption curve is determined based on the parameters and the point-to-point distance calculation formula. include:
[0017]
[0018] Where w i Weights for each time point; The formula for calculating point-to-point distance is given by , which represents the distance between the electricity consumption at time point i and the reference electricity consumption; m is the magnification index of the point-to-point distance; and l is the number of measurement time points.
[0019] In some embodiments, the method for calculating a user's differential score s includes:
[0020]
[0021] in This represents the distance between the electricity consumption curve and the reference electricity consumption curve.
[0022] Based on the user's differential score s, it can be determined whether the user's electricity consumption is abnormal.
[0023] In some embodiments, the power grid BP neural network model includes an input layer, a hidden layer, and an output layer;
[0024] Input historical carbon emission calculation event data into the power grid BP neural network model;
[0025] The input layer processes the result to obtain And sent to the hidden layer, where p i , Representing time points i Electricity consumption and reference electricity consumption;
[0026] The output h of each hidden layer i for m is the magnification exponent for the point-to-point distance;
[0027] The output layer outputs the calculated carbon emissions. cal :
[0028] Where n is the number of hidden layers, w i The weights for each time point.
[0029] In some embodiments, the method for calculating the variance E between the evaluation value obtained from the current parameter and the expected variance includes:
[0030]
[0031] Where E represents the variance between the carbon emissions obtained from the current parameters and the actual carbon emissions, o real Indicates the actual carbon emissions, o cal This indicates the calculated carbon emissions.
[0032] In some embodiments, updating parameters of a pre-built power grid BP neural network model includes:
[0033] w i Update according to the following formula:
[0034]
[0035] in, The variance E is the weight w of each hidden layer. i The partial derivative, The updated weights; η w For learning rate; o cal This represents the calculated carbon emissions, o real Indicates the actual carbon emissions; h i This represents the output of each hidden layer, where m is the amplification exponent for the point-to-point distance.
[0036] The update speed is calculated using the following formula:
[0037]
[0038] The magnification index m of the point-to-point distance is updated according to the following formula:
[0039]
[0040] Where m + For the updated amplification index, η m The learning rate is related to the amplification index.
[0041] Furthermore, the learning rate η w η m The default value is 0.1.
[0042] In a second aspect, the present invention provides a carbon emission calculation device based on power grid flow, including a processor and a storage medium;
[0043] The storage medium is used to store instructions;
[0044] The processor is configured to operate according to the instructions to perform the steps of the method according to the first aspect.
[0045] Thirdly, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0046] Beneficial effects: The carbon emission calculation method and device based on power grid flow provided by this invention have the following advantages: This invention utilizes the optimized initial weights and thresholds of the improved thinking evolution algorithm, resulting in higher generalization performance and lower prediction error of the BP neural network. Attached Figure Description
[0047] Figure 1 This is a flowchart of a carbon emission calculation method based on power grid flow according to an embodiment of the present invention;
[0048] Figure 2 This is a schematic diagram of a power grid network according to an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram showing the weights before and after optimization according to an embodiment of the present invention. Detailed Implementation
[0050] The present invention will be further described below with reference to the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and should not be used to limit the scope of protection of the present invention.
[0051] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0052] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0053] Example 1
[0054] A carbon emission calculation method based on power grid flow includes:
[0055] Obtain historical carbon emission calculation event data;
[0056] Based on the historical carbon emission calculation event data, the parameters of the pre-built power grid BP neural network model are updated until the variance E between the carbon emissions obtained from the current parameters output by the model and the expected carbon emissions is less than a set value, thus obtaining the determined parameters and the trained power grid BP neural network model; wherein the parameters include the weights w at each time point. i The magnification exponent m of the point-to-point distance;
[0057] Obtain the current electricity consumption and reference electricity consumption, input them into the trained power grid BP neural network model, and determine the carbon emission calculation result based on the output of the power grid BP neural network model.
[0058] In some embodiments, the carbon emission calculation method based on power grid flow further includes:
[0059] Based on the parameters and the point-by-point distance calculation formula, the distance between the electricity consumption curve and the reference electricity consumption curve is determined;
[0060] Based on the distance between the electricity consumption curve and the reference electricity consumption curve, calculate the user's differential score for electricity and typical events.
[0061] In some embodiments, the point-to-point distance calculation formula includes:
[0062]
[0063] Where p i , Representing time points i Electricity consumption and time points i Reference electricity consumption.
[0064] In some embodiments, the distance between the electricity consumption curve and the reference electricity consumption curve is determined based on the parameters and the point-to-point distance calculation formula. include:
[0065]
[0066] Where w i Weights for each time point; The formula for calculating point-to-point distance is given by , which represents the distance between the electricity consumption at time point i and the reference electricity consumption; m is the magnification index of the point-to-point distance; and l is the number of measurement time points.
[0067] In some embodiments, the method for calculating a user's differential score s includes:
[0068]
[0069] in This represents the distance between the electricity consumption curve and the reference electricity consumption curve.
[0070] Based on the user's differential score s, it can be determined whether the user's electricity consumption is abnormal.
[0071] In some embodiments, such as Figure 2 As shown, the power grid BP neural network model includes an input layer, a hidden layer, and an output layer;
[0072] Input historical carbon emission calculation event data into the power grid BP neural network model;
[0073] The input layer processes the result to obtain And sent to the hidden layer, where p i , Representing time points i Electricity consumption and reference electricity consumption;
[0074] The output h of each hidden layer i for m is the magnification exponent for the point-to-point distance;
[0075] The output layer outputs the calculated carbon emissions. cal :
[0076] Where n is the number of hidden layers, w i The weights for each time point.
[0077] In some embodiments, the method for calculating the variance E between the evaluation value obtained from the current parameter and the expected variance includes:
[0078]
[0079] Where E represents the variance between the carbon emissions obtained from the current parameters and the actual carbon emissions, o real Indicates the actual carbon emissions, o cal This indicates the calculated carbon emissions.
[0080] In some embodiments, updating parameters of a pre-built power grid BP neural network model includes:
[0081] w i Update according to the following formula:
[0082]
[0083] in, The variance E is the weight w of each hidden layer. i The partial derivative, The updated weights; η w For learning rate; o cal This represents the calculated carbon emissions, o real Indicates the actual carbon emissions; h i This represents the output of each hidden layer, where m is the amplification exponent for the point-to-point distance.
[0084] The update speed is calculated using the following formula:
[0085]
[0086] The magnification index m of the point-to-point distance is updated according to the following formula:
[0087]
[0088] Where m + For the updated amplification index, η m The learning rate is related to the amplification index.
[0089] Furthermore, the learning rate η w η m The default value is 0.1.
[0090] In some embodiments, the initial stage w i Set it to 1, and m to 2.
[0091] The update ends when the value of E is less than the set value; the update process is repeated when the value of E is greater than the set value until the parameters converge.
[0092] In some embodiments, this example simulates a company in Daxing District, Beijing, to analyze its carbon emissions. Considering data collection every five minutes, the neural network model uses a calculation cycle of 288 for each carbon emission event, since the calculation period is generally no more than 24 hours. 129 users are selected as the analysis subjects. These users experienced three carbon emission calculation events in 2017. For each event, each participating user was individually analyzed and evaluated. A total of 267 user analyses were performed across these three events.
[0093] In these carbon emission calculation events, the initial nine carbon emission calculation events were used as training samples. After calculation, a set of 288 points was obtained. Figure 3 An increasing weight vector (labeling only 24 points). m is adjusted to 5.7.
[0094] Comparing the simulation results, it is easy to see that by using the optimized initial weights and thresholds of the improved thinking evolution algorithm, the BP neural network has higher generalization performance and lower prediction error on the test set.
[0095] This embodiment conducts simulation tests on the carbon emission calculation system in Daxing District, Beijing, and proposes the most accurate and reliable carbon emission calculation method, with highly accurate calculation results. This method can be extended to the implementation of carbon emission calculation for other large energy-consuming institutions in smart grid parks, which is conducive to promoting the practical application of carbon emission calculation and contributing to the achievement of the national dual-carbon goals.
[0096] Example 2
[0097] Secondly, this embodiment provides a carbon emission calculation device based on power grid flow, including a processor and a storage medium;
[0098] The storage medium is used to store instructions;
[0099] The processor is configured to operate according to the instructions to perform the steps of the method according to Embodiment 1.
[0100] Example 3
[0101] Thirdly, this embodiment provides a storage medium on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in Embodiment 1.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for carbon emission calculation based on power grid power flow, characterized in that, include: Obtain historical carbon emission calculation event data; The historical carbon emission calculation event data includes power consumption at each time point , reference power consumption , and corresponding real carbon emission Based on the historical carbon emission calculation event data, parameters of a pre-constructed power grid BP neural network model are updated until a variance E of carbon emissions obtained by a current parameter output by the model and a real carbon emission is less than a set value, to obtain determined parameters and a trained power grid BP neural network model; wherein the parameters include weights at each time point and an amplification index m of the point-to-point distance. The power grid BP neural network model includes an input layer, a hidden layer, and an output layer; historical carbon emission calculation event data is input into the power grid BP neural network model; and the data is processed by the input layer to obtain... And sent to the hidden layer, where , Representing time points Power consumption and reference power consumption; output of each hidden layer for , m is the magnification exponent for the point-to-point distance; the output layer outputs the calculated carbon emissions. : Where n is the number of hidden layers. Weights for each time point; Update parameters for the pre-built power grid BP neural network model, including: Update according to the following formula: ; in, The weights of variance E with respect to each hidden layer The partial derivative, The updated weights; For learning rate; This represents the calculated carbon emissions. This represents the actual carbon emissions; This represents the output of each hidden layer, where m is the amplification exponent for the point-to-point distance. The update speed is calculated using the following formula: ; The magnification index m of the point-to-point distance is updated according to the following formula: ; in This is the updated amplification index. The learning rate with respect to the amplification index; Obtain the current electricity consumption and reference electricity consumption, input them into the trained power grid BP neural network model, and determine the carbon emission calculation result based on the output of the power grid BP neural network model.
2. The carbon emission calculation method based on power grid flow according to claim 1, characterized in that, Also includes: Based on the parameters and the point-by-point distance calculation formula, the distance between the electricity consumption curve and the reference electricity consumption curve is determined; Based on the distance between the electricity consumption curve and the reference electricity consumption curve, calculate the user's differential score for electricity and typical events.
3. The carbon emission calculation method based on power grid flow according to claim 2, characterized in that, The formula for calculating point-to-point distance includes: ; in , Representing time points Electricity consumption and time points Reference electricity consumption.
4. The carbon emission calculation method based on power grid flow according to claim 2, characterized in that, Based on the parameters and the point-to-point distance calculation formula, the distance between the electricity consumption curve and the reference electricity consumption curve is determined. ,include: ; in Weights for each time point; The formula for calculating point-to-point distance is given, where i represents the distance between the electricity consumption at time point i and the reference electricity consumption; m is the amplification index of the point-to-point distance. It represents the number of measurement points.
5. The carbon emission calculation method based on power grid flow according to claim 2, characterized in that, User Differentiation Score The calculation methods include: ; in This represents the distance between the electricity consumption curve and the reference electricity consumption curve.
6. The carbon emission calculation method based on power grid flow according to claim 1, characterized in that, The method for calculating the variance E between the carbon emissions obtained from the current parameters and the actual carbon emissions includes: ; Where E represents the variance between the carbon emissions obtained from the current parameters and the actual carbon emissions. This represents the actual carbon emissions. This represents the carbon emissions output by the model.
7. The carbon emission calculation method based on power grid flow according to claim 1, characterized in that, , It is 0.
1.
8. A carbon emission calculation device based on power grid flow, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1 to 7.