Power distribution network carbon emission accounting method, device and equipment and storage medium

By using graph convolutional network calculation model in the distribution network, the carbon emission factors of each node are calculated based on topological connection data and electrical carbon information, the problem of carbon emission accounting in the distribution network is solved and an accurate carbon emission assessment is achieved.

CN119295283APending Publication Date: 2025-01-10STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411350226.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing carbon emission flow method is difficult to apply to distribution network carbon emission accounting. It is mainly due to the wide distribution range of the distribution network and the limited distribution of measurement equipment, which leads to the lack of network-wide trend calculation conditions, making it difficult to accurately calculate the carbon emissions of the distribution network.

Method used

Using the carbon emission factor calculation model based on graph convolution network, by obtaining the topological connection data of the distribution network and the node electrical carbon information, building an adjacency matrix and input matrix, training the carbon emission factor calculation model, and calculating the carbon emission factor of each node. Carbon emission accounting is then carried out to avoid trend calculations across the network.

Benefits of technology

It improves the accuracy of carbon emission factors and reduces the difficulty of carbon emission accounting in the distribution network. The accounting results can more truly reflect the actual situation and are suitable for carbon emission calculation in the distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295283A_ABST
    Figure CN119295283A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution network carbon emission accounting method, apparatus and device, and a storage medium. The method comprises the steps of obtaining topological connection data and node power carbon information of a power distribution network; constructing an adjacent matrix according to the topological connection data, and constructing an input matrix according to the node electric carbon information; establishing a carbon emission factor calculation model based on the graph convolutional network, and training the carbon emission factor calculation model according to the adjacent matrix and the input matrix to obtain a trained carbon emission factor calculation model; and inputting the electric carbon information of the to-be-tested node into the trained carbon emission factor calculation model, outputting the carbon emission factor of the to-be-tested node, and performing carbon emission accounting of the power distribution network based on the carbon emission factor. With the adoption of the embodiment of the invention, the carbon emission factor of each node of the power distribution network is calculated by utilizing the measurement information of the existing power distribution network without calculating the power flow of the whole network, so that the accuracy of the carbon emission factor is improved, the carbon emission accounting difficulty of the power distribution network is reduced, and the accounting result can reflect the actual situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distribution network, and in particular to a distribution network carbon emission accounting method, device, equipment and storage medium. Background Art

[0002] The current calculation of carbon emissions in the power system mainly focuses on the transmission network, and the calculation is based on the distribution of the whole network power flow method to realize the calculation. If the carbon emission flow method of the existing transmission network is to be applied to the carbon emission accounting of the distribution network, it is necessary to calculate the power flow of the whole network, but the distribution range of the distribution network is wide and complex, and its measurement equipment is generally distributed on the source side and the load side to obtain the measurement information of important source and load nodes. Considering the engineering practicality and economy, it is difficult to install measurement equipment on all nodes of the distribution network. Therefore, the measurement information of the distribution network is far less than that of the transmission network, and it does not have the conditions for directly applying the carbon emission flow method to calculate carbon emissions, which makes it difficult to calculate the carbon emissions of the distribution network. Summary of the invention

[0003] The present invention provides a distribution network carbon emission accounting method, device, equipment and storage medium to solve the problem that the existing carbon emission flow method is difficult to apply to the distribution network carbon emission accounting. There is no need to calculate the power flow of the entire network, but the existing distribution network measurement information is used to calculate the carbon emission factor of each node in the distribution network, which improves the accuracy of the carbon emission factor, reduces the difficulty of carbon emission accounting for the distribution network, and the accounting results can reflect the actual situation.

[0004] To achieve the above objectives, an embodiment of the present invention provides a method for calculating carbon emissions in a distribution network, comprising:

[0005] Acquire topological connection data and node carbon information of the distribution network; construct an adjacency matrix according to the topological connection data, and construct an input matrix according to the node carbon information;

[0006] Establishing a carbon emission factor calculation model based on a graph convolutional network, training the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model;

[0007] The electric carbon information of the node to be tested is input into the trained carbon emission factor calculation model, the carbon emission factor of the node to be tested is output, and the carbon emission accounting of the distribution network is performed based on the carbon emission factor.

[0008] As an improvement of the above solution, the node electric carbon information includes the injected power and carbon emission factor of the node;

[0009] For source-side nodes, the injected power is equal to the active power of the unit; for load-side nodes, the injected power is equal to the negative value of the load active power; for nodes with both units and loads, the injected power is equal to the active power of the unit minus the active power of the load; for nodes with neither units nor loads, the injected power is equal to 0;

[0010] For source-side nodes, the carbon emission factor is equal to the carbon emission intensity of the unit; for non-source-side nodes, the carbon emission factor is equal to the load average carbon emission factor, which is calculated by the following formula:

[0011]

[0012] in, is the average carbon emission factor of the load; P G is the active power of the unit; P L is the load active power; e G is the carbon emission factor of the unit node.

[0013] As an improvement of the above solution, the step of constructing an adjacency matrix according to the topological connection data and constructing an input matrix according to the node electrical carbon information includes:

[0014] A graph structure consisting of nodes and edges is constructed according to the topological connection data. If the total number of nodes is N, an N×N dimensional adjacency matrix A is formed, wherein if node i and node j in the distribution network have a connection relationship, the corresponding position of the i-th row and j-th column of the adjacency matrix is ​​set to 1, otherwise it is set to 0;

[0015] According to the node carbon information, define the carbon information vector W of node i (1≤i≤N) i =(P i ,e i ) T , where P i is the injected power of node i, e i is the carbon emission factor of node i; according to the electric carbon information vector of each node, a 2×N-dimensional first matrix X=(W1,…,W i ,…,W N ); Let the second matrix at time t be X t , then the third matrix at m moments Form an input matrix of N×2m dimensions in for The transpose of .

[0016] As an improvement of the above scheme, the carbon emission factor calculation model includes an input layer, a feature extraction layer and an output layer:

[0017] Wherein, the input layer is composed of the input matrix and the adjacency matrix;

[0018] The feature extraction layer is composed of a two-layer graph convolutional network and an activation function, which is used to integrate and learn the data information of the input layer and output feature information, wherein each layer of the graph convolutional network uses the output information of the previous layer of the graph convolutional network as input information;

[0019] The output layer is composed of a fully connected layer, which is used to map the feature information dimension integrated and output by the feature extraction layer to the target output dimension and output the carbon emission factor.

[0020] As an improvement of the above solution, the carbon emission factor calculation model is trained according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model, including:

[0021] Importing the adjacency matrix, the input matrix and the carbon emission factor target value data into the carbon emission factor calculation model, and randomly dividing all samples into a training set, a validation set and a test set for training;

[0022] The parameters of the carbon emission factor calculation model in training are transferred through the following formula:

[0023]

[0024] Among them, X (h-1) is the input information of the hth layer; X (h) is the output information after integration of the h-th layer graph convolutional network; is the new matrix obtained by adding the adjacency matrix A to the identity matrix I, that is, is a diagonal matrix that satisfies ψ (h) is the parameter matrix in the h-th layer graph convolutional network; σ is the nonlinear activation function;

[0025] The gradient of the loss function to the model parameters is calculated through the back-propagation algorithm, and the model parameters are iteratively updated along the negative gradient direction to establish a mapping relationship between the carbon emission factor and the node electric carbon information. Until the preset number of iterations is reached, a trained carbon emission factor calculation model is obtained.

[0026] As an improvement of the above solution, the calculation formula of the loss function is as follows:

[0027] Let the carbon emission factor target value data of each node in the distribution network at time t be vector E N,t The carbon emission factor vector output by the carbon emission factor calculation model training is Then the loss function at m moments is:

[0028]

[0029] in, For vector The second norm of , and 1≤k≤m.

[0030] As an improvement of the above scheme, after obtaining the trained carbon emission factor calculation model, the calculation effect of the carbon emission factor calculation model is evaluated by the mean square error and the mean absolute error. The specific formula is as follows:

[0031]

[0032] Among them, MSE is the mean square error, MAE is the mean absolute error; xy is the carbon emission factor calculated by the trained carbon emission factor calculation model at the node y in the x-th sample; is the carbon emission factor calculated at node y in the xth sample based on the carbon emission flow theory; n1 is the number of nodes in each sample; n2 is the number of samples included in the test set.

[0033] To achieve the above purpose, an embodiment of the present invention further provides a distribution network carbon emission accounting device, including:

[0034] A data acquisition module is used to acquire topological connection data and node carbon information of the distribution network; construct an adjacency matrix according to the topological connection data, and construct an input matrix according to the node carbon information;

[0035] A model training module, used to establish a carbon emission factor calculation model based on a graph convolutional network, and to train the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model;

[0036] The carbon emission accounting module is used to input the electric carbon information of the node to be tested into the trained carbon emission factor calculation model, output the carbon emission factor of the node to be tested, and perform carbon emission accounting of the distribution network based on the carbon emission factor.

[0037] To achieve the above objectives, an embodiment of the present invention further provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the above distribution network carbon emission accounting method when executing the computer program.

[0038] To achieve the above-mentioned purpose, an embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the above-mentioned distribution network carbon emission accounting method.

[0039] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer program product, which includes a computer program; wherein, when the computer program is running, it controls the device where the program product is located to execute the above-mentioned distribution network carbon emission accounting method.

[0040] Implementing the embodiments of the present invention has the following beneficial effects:

[0041] The distribution network carbon emission accounting method, device, equipment and storage medium provided by the embodiments of the present invention obtain the topological connection data and node electric carbon information of the distribution network; construct an adjacency matrix according to the topological connection data, and construct an input matrix according to the node electric carbon information; establish a carbon emission factor calculation model based on a graph convolutional network, and train the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model; input the electric carbon information of the node to be tested into the trained carbon emission factor calculation model, output the carbon emission factor of the node to be tested, and perform carbon emission accounting for the distribution network based on the carbon emission factor. There is no need to calculate the power flow of the entire network, but instead uses the existing distribution network measurement information to calculate the carbon emission factor of each node in the distribution network, which improves the accuracy of the carbon emission factor, reduces the difficulty of carbon emission accounting for the distribution network, and the accounting results can reflect the actual situation. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a flow chart of a method for calculating carbon emissions in a distribution network provided by an embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of the composition structure of the carbon emission factor calculation model provided by an embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of a carbon emission factor calculation model training process provided by an embodiment of the present invention;

[0045] Figure 4 It is a structural block diagram of a distribution network carbon emission accounting device provided by an embodiment of the present invention;

[0046] Figure 5 It is a structural block diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] In the description of the present invention, it should be noted that the step numbers in the text are only for the convenience of explaining the specific embodiments and do not serve to limit the order in which the steps are executed. The terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features.

[0049] The development of artificial intelligence has provided technical support for the calculation of carbon emissions in distribution networks based on measurement information. Among them, the graph convolutional network algorithm is very suitable for processing complex graph data. It can simulate the complex spatiotemporal dependencies in the original data and capture its implicit characteristics without the need for manual feature selection.

[0050] See also Figure 1 , Figure 1 : is a flow chart of a distribution network carbon emission accounting method provided by an embodiment of the present invention, the distribution network carbon emission accounting method comprises steps S1 to S3, which are specifically as follows:

[0051] S1. Acquire topological connection data and node carbon information of the distribution network; construct an adjacency matrix according to the topological connection data, and construct an input matrix according to the node carbon information;

[0052] S2. Establishing a carbon emission factor calculation model based on a graph convolutional network, training the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model;

[0053] S3. Input the electric carbon information of the node to be tested into the trained carbon emission factor calculation model, output the carbon emission factor of the node to be tested, and perform carbon emission accounting of the distribution network based on the carbon emission factor.

[0054] In an embodiment of the present invention, by obtaining topological connection data and node electricity-carbon information of the distribution network; constructing an adjacency matrix according to the topological connection data, and constructing an input matrix according to the node electricity-carbon information; establishing a carbon emission factor calculation model based on a graph convolutional network, and training the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model; inputting the electricity-carbon information of the node to be tested into the trained carbon emission factor calculation model, outputting the carbon emission factor of the node to be tested, and performing carbon emission accounting for the distribution network based on the carbon emission factor, there is no need to calculate the power flow of the entire network. Based on the measurement information of the distribution network, the carbon emission factor of each node in the distribution network can be calculated, thereby improving the accuracy of the carbon emission factor, quantifying the spatiotemporal differences in carbon emissions generated by different nodes, reducing the difficulty of carbon emission accounting for the distribution network, and facilitating the formulation of targeted emission reduction strategies to control the carbon emissions on both the source and load sides of the distribution network.

[0055] In an optional embodiment, the node electric carbon information includes the injected power and carbon emission factor of the node;

[0056] For source-side nodes, the injected power is equal to the active power of the unit; for load-side nodes, the injected power is equal to the negative value of the load active power; for nodes with both units and loads, the injected power is equal to the active power of the unit minus the active power of the load; for nodes with neither units nor loads, the injected power is equal to 0;

[0057] For source-side nodes, the carbon emission factor is equal to the carbon emission intensity of the unit; for non-source-side nodes, the carbon emission factor is equal to the load average carbon emission factor, which is calculated by the following formula:

[0058]

[0059] in, is the average carbon emission factor of the load; P G is the active power of the unit; P L is the load active power; e G is the carbon emission factor of the unit node.

[0060] It can be understood that for source-side nodes, their carbon information is characterized by the carbon emission intensity of the unit; for non-source-side nodes, their carbon information is estimated based on the carbon emission flow theory, as follows:

[0061] When network loss is ignored, the carbon flow rate R injected into the system is G and the system outflow load carbon flow rate R L is equal to the sum of

[0062] ∑ 流入 R G =∑流出 R L (0)

[0063] Since the relationship between the carbon flow rate R, the carbon emission factor e and the active power flow P is:

[0064] R=Pe (2)

[0065] Assume that there are n loads in the distribution network and the carbon emission factor of the unit node is e G , the load active power is P L , then the average carbon flow rate of the load in the system is and load average active power for:

[0066]

[0067] Therefore, the average carbon emission factor of the load is the average carbon flow rate of the load Average active power of load The ratio of, that is:

[0068]

[0069] In summary, As the carbon emission factor of the non-source side node.

[0070] In the embodiment of the present invention, by accurately defining and calculating the injected power and carbon emission factor of each node, the electric-carbon information of different nodes in the distribution network can be more realistically reflected, providing a data basis for subsequent model training.

[0071] In an optional embodiment, constructing an adjacency matrix according to the topological connection data and constructing an input matrix according to the node electrochemical information includes:

[0072] A graph structure consisting of nodes and edges is constructed according to the topological connection data. If the total number of nodes is N, an N×N dimensional adjacency matrix A is formed, wherein if node i and node j in the distribution network have a connection relationship, the corresponding position of the i-th row and j-th column of the adjacency matrix is ​​set to 1, otherwise it is set to 0;

[0073] According to the node carbon information, define the carbon information vector W of node i (1≤i≤N) i =(P i ,e i ) T , where P i is the injected power of node i, e i is the carbon emission factor of node i; according to the electric carbon information vector of each node, a 2×N-dimensional first matrix X=(W1,…,W i ,…,WN ); Let the second matrix at time t be X t , then the third matrix at m moments Form an input matrix of N×2m dimensions in for The transpose of .

[0074] It can be understood that, according to the topological connection data of the distribution network, a graph structure of the distribution network is constructed, and the graph structure is represented by an ordered pair (V, E). Where V is a set of nodes in the graph structure, each of which represents a corresponding bus in the distribution network; E is a set of edges in the graph structure, each of which represents a corresponding branch connecting each bus in the distribution network. Define v∈V as a node in the graph structure, (v i ,v j )∈E is the edge connecting node i and node j; if there are N nodes in the distribution network, then A is defined as an N-dimensional adjacency matrix of the graph structure, and the adjacency matrix represents the connection relationship between nodes in the graph structure. If node i connects node j, that is, (v i ,v j )∈E, then A ij =1, otherwise A ij =0.

[0075] In an embodiment of the present invention, by constructing an adjacency matrix and an input matrix, the physical topology structure and node carbon information of the distribution network can be converted into a format suitable for graph convolutional network processing, which helps the model to better learn and train and improve the accuracy of calculations.

[0076] In an optional embodiment, the carbon emission factor calculation model includes an input layer, a feature extraction layer and an output layer:

[0077] Wherein, the input layer is composed of the input matrix and the adjacency matrix;

[0078] The feature extraction layer is composed of a two-layer graph convolutional network and an activation function, which is used to integrate and learn the data information of the input layer and output feature information, wherein each layer of the graph convolutional network uses the output information of the previous layer of the graph convolutional network as input information;

[0079] The output layer is composed of a fully connected layer, which is used to map the feature information dimension integrated and output by the feature extraction layer to the target output dimension and output the carbon emission factor.

[0080] In the embodiment of the present invention, the graph convolutional network can effectively process large graph data and is suitable for complex networks with many nodes and edges such as distribution networks. The measured node carbon information is constructed as an input matrix, combined with the adjacency matrix that represents the topological connection structure of the distribution network, through the multi-level feature extraction of the double-layer graph convolutional network and the mapping of the fully connected layer, the carbon information of the nodes can be effectively integrated, the complex spatiotemporal relationship between nodes can be captured, and the accuracy of the calculation of the carbon emission factor can be improved.

[0081] For example, see Figure 2 The carbon emission factor calculation model includes an input layer, a feature extraction layer and an output layer. The input layer is composed of an input matrix X representing the node electric carbon information. in and an adjacency matrix A that characterizes the topological connection structure. The feature extraction layer is composed of a double-layer GCN (Graph Convolutional Network) and an activation function, which is used to integrate and learn the data information of the input layer to output feature information, and each layer of GCN uses the output information of the previous layer of GCN as input information. Among them, the activation function includes ReLU (RectifiedLinearUnit, linear rectification function). The output layer is composed of a fully connected layer, the purpose of which is to map the feature information dimension integrated and output by the feature extraction layer to the target output dimension and output the carbon emission factor.

[0082] In an optional embodiment, the step of training the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model includes:

[0083] Importing the adjacency matrix, the input matrix and the carbon emission factor target value data into the carbon emission factor calculation model, and randomly dividing all samples into a training set, a validation set and a test set for training;

[0084] The parameters of the carbon emission factor calculation model in training are transferred through the following formula:

[0085]

[0086] Among them, X (h-1) is the input information of the hth layer; X (h) is the output information after integration of the h-th layer graph convolutional network; is the new matrix obtained by adding the adjacency matrix A to the identity matrix I, that is, is a diagonal matrix that satisfies ψ (h) is the parameter matrix in the h-th layer graph convolutional network; σ is the nonlinear activation function;

[0087] The gradient of the loss function to the model parameters is calculated through the back-propagation algorithm, and the model parameters are iteratively updated along the negative gradient direction to establish a mapping relationship between the carbon emission factor and the node electric carbon information. Until the preset number of iterations is reached, a trained carbon emission factor calculation model is obtained.

[0088] It is understandable that graph convolutional networks are deep learning algorithms that need to be trained and learned based on target values. The carbon emission factor target value of each node can be calculated through the carbon emission flow method. The training process of the carbon emission factor calculation model is to continuously update the parameter matrix, and the direction and size of the parameter update depend on the gradient of the loss function.

[0089] In the embodiment of the present invention, the back propagation algorithm can gradually reduce the prediction error and improve the generalization ability of the model by optimizing the loss function through gradient descent. Through the multi-level feature extraction of the double-layer graph convolutional network and the optimization of the back propagation algorithm, the model can process complex graph data, extract effective feature information, and map it to the carbon emission factor, so as to achieve efficient carbon emission factor calculation and improve the accuracy and adaptability of the model operation.

[0090] In an optional embodiment, the calculation formula of the loss function is as follows:

[0091] Let the carbon emission factor target value data of each node in the distribution network at time t be vector E N,t The carbon emission factor vector output by the carbon emission factor calculation model training is Then the loss function at m moments is:

[0092]

[0093] in, For vector The second norm of , and 1≤k≤m.

[0094] In an embodiment of the present invention, there is no need to calculate the power flow. Instead, based on the distribution network measurement information, the measured node electricity carbon information is constructed as an input matrix, and combined with the adjacency matrix that characterizes the topological connection structure of the distribution network, a two-layer graph convolutional network is trained. The generalization ability of the model is improved through the bi-norm loss function, and the mapping relationship between the carbon emission factor and the known measurement data is established. Finally, the carbon emission factor of each node in the distribution network is calculated. Compared with the existing power grid average carbon emission factor technology, the calculation result is expanded in both time and space dimensions.

[0095] For example, Figure 3 As shown, the distribution network topology connection data, the distribution network node electricity carbon information and the carbon emission factor target value data are imported into the carbon emission factor calculation model. The samples are randomly divided into a training set, a validation set and a test set.

[0096] In the double-layer GCN and fully connected layer, by Parameter transfer is performed on the carbon emission factor calculation model in training. Specifically, X (h-1) First, multiply the updated adjacency matrix by left multiplication Realize the adjacent node feature propagation, and then multiply the learnable parameter matrix ψ on the right (h) Achieve linear transformation of smoothed node features; before outputting feature information, apply nonlinear activation function σ to obtain the input information X of the next layer of GCN (h) The entire model training process continuously updates the parameter matrix ψ (h) , the direction and size of the parameter update depend on the gradient of the two-norm loss function.

[0097] The gradient of the loss function to the model parameters is calculated through the back-propagation algorithm, and the model parameters are iteratively updated along the negative gradient direction. The carbon emission factor calculation model can establish a mapping relationship between the carbon emission factor and the node electric carbon information until the preset number of iterations is reached to obtain a trained carbon emission factor calculation model.

[0098] After the parameters have been updated multiple times, the carbon emission factor calculation model can learn the mapping rule between the carbon emission factor and the electric carbon information, so as to input the node electric carbon information of the test set into the trained carbon emission factor calculation model to obtain the corresponding carbon emission factor calculation results.

[0099] In an optional embodiment, after the trained carbon emission factor calculation model is obtained, the calculation effect of the carbon emission factor calculation model is evaluated by the mean square error and the mean absolute error. The specific formula is as follows:

[0100]

[0101] Among them, MSE is the mean square error, MAE is the mean absolute error; xy is the carbon emission factor calculated by the trained carbon emission factor calculation model at the node y in the x-th sample; is the carbon emission factor calculated at node y in the xth sample based on the carbon emission flow theory; n1 is the number of nodes in each sample; n2 is the number of samples included in the test set.

[0102] The distribution network carbon emission accounting method provided by the embodiment of the present invention obtains the topological connection data and node electric carbon information of the distribution network; constructs an adjacency matrix according to the topological connection data, and constructs an input matrix according to the node electric carbon information; establishes a carbon emission factor calculation model based on a graph convolutional network, and trains the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model; inputs the electric carbon information of the node to be tested into the trained carbon emission factor calculation model, outputs the carbon emission factor of the node to be tested, and performs carbon emission accounting for the distribution network based on the carbon emission factor. There is no need to calculate the power flow of the entire network, but instead uses the existing distribution network measurement information to calculate the carbon emission factor of each node in the distribution network, which improves the accuracy of the carbon emission factor, reduces the difficulty of carbon emission accounting for the distribution network, and the accounting result can reflect the actual situation.

[0103] See also Figure 4 , Figure 4 : is a structural block diagram of a distribution network carbon emission accounting device 10 provided in an embodiment of the present invention, wherein the distribution network carbon emission accounting device 10 comprises:

[0104] The data acquisition module 11 is used to acquire the topological connection data and node carbon information of the distribution network; construct an adjacency matrix according to the topological connection data, and construct an input matrix according to the node carbon information;

[0105] A model training module 12 is used to establish a carbon emission factor calculation model based on a graph convolutional network, and train the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model;

[0106] The carbon emission accounting module 13 is used to input the electric carbon information of the node to be tested into the trained carbon emission factor calculation model, output the carbon emission factor of the node to be tested, and perform carbon emission accounting of the distribution network based on the carbon emission factor.

[0107] Optionally, the node electricity-carbon information includes the injected power and carbon emission factor of the node;

[0108] For source-side nodes, the injected power is equal to the active power of the unit; for load-side nodes, the injected power is equal to the negative value of the load active power; for nodes with both units and loads, the injected power is equal to the active power of the unit minus the active power of the load; for nodes with neither units nor loads, the injected power is equal to 0;

[0109] For source-side nodes, the carbon emission factor is equal to the carbon emission intensity of the unit; for non-source-side nodes, the carbon emission factor is equal to the load average carbon emission factor, which is calculated by the following formula:

[0110]

[0111] in, is the average carbon emission factor of the load; P G is the active power of the unit; P L is the load active power; e G is the carbon emission factor of the unit node.

[0112] Optionally, the data acquisition module 11 is further used for:

[0113] A graph structure consisting of nodes and edges is constructed according to the topological connection data. If the total number of nodes is N, an N×N dimensional adjacency matrix A is formed, wherein if node i and node j in the distribution network have a connection relationship, the corresponding position of the i-th row and j-th column of the adjacency matrix is ​​set to 1, otherwise it is set to 0;

[0114] According to the node carbon information, define the carbon information vector W of node i (1≤i≤N) i =(P i ,e i ) T , where P i is the injected power of node i, e i is the carbon emission factor of node i; according to the electric carbon information vector of each node, a 2×N-dimensional first matrix X=(W1,…,W i ,…,W N ); Let the second matrix at time t be X t , then the third matrix at m moments Form an input matrix of N×2m dimensions in for The transpose of .

[0115] Optionally, the carbon emission factor calculation model includes an input layer, a feature extraction layer and an output layer:

[0116] Wherein, the input layer is composed of the input matrix and the adjacency matrix;

[0117] The feature extraction layer is composed of a two-layer graph convolutional network and an activation function, which is used to integrate and learn the data information of the input layer and output feature information, wherein each layer of the graph convolutional network uses the output information of the previous layer of the graph convolutional network as input information;

[0118] The output layer is composed of a fully connected layer, which is used to map the feature information dimension integrated and output by the feature extraction layer to the target output dimension and output the carbon emission factor.

[0119] Optionally, the model training module 12 is further used for:

[0120] Importing the adjacency matrix, the input matrix and the carbon emission factor target value data into the carbon emission factor calculation model, and randomly dividing all samples into a training set, a validation set and a test set for training;

[0121] The parameters of the carbon emission factor calculation model in training are transferred through the following formula:

[0122]

[0123] Among them, X (h-1) is the input information of the hth layer; X (h) is the output information after integration of the h-th layer graph convolutional network; is the new matrix obtained by adding the adjacency matrix A to the identity matrix I, that is, is a diagonal matrix that satisfies ψ (h) is the parameter matrix in the h-th layer graph convolutional network; σ is the nonlinear activation function;

[0124] The gradient of the loss function to the model parameters is calculated through the back-propagation algorithm, and the model parameters are iteratively updated along the negative gradient direction to establish a mapping relationship between the carbon emission factor and the node electric carbon information. Until the preset number of iterations is reached, a trained carbon emission factor calculation model is obtained.

[0125] Optionally, the loss function is calculated as follows:

[0126] Let the carbon emission factor target value data of each node in the distribution network at time t be vector E N,t The carbon emission factor vector output by the carbon emission factor calculation model training is Then the loss function at m moments is:

[0127]

[0128] in, For vector The second norm of , and 1≤k≤m.

[0129] Optionally, the distribution network carbon emission accounting device 10 further includes:

[0130] The model evaluation module is used to evaluate the calculation effect of the carbon emission factor calculation model through mean square error and mean absolute error after obtaining the trained carbon emission factor calculation model. The specific formula is as follows:

[0131]

[0132] Among them, MSE is the mean square error, MAE is the mean absolute error; xy is the carbon emission factor calculated by the trained carbon emission factor calculation model at the node y in the x-th sample; is the carbon emission factor calculated at node y in the xth sample based on the carbon emission flow theory; n1 is the number of nodes in each sample; n2 is the number of samples included in the test set.

[0133] It is worth noting that the working process of each module in the distribution network carbon emission accounting device 10 described in the embodiment of the present invention can refer to the working process of the distribution network carbon emission accounting method described in the above embodiment, and will not be repeated here.

[0134] The distribution network carbon emission accounting device provided by the embodiment of the present invention obtains the topological connection data and node electricity carbon information of the distribution network; constructs an adjacency matrix according to the topological connection data, and constructs an input matrix according to the node electricity carbon information; establishes a carbon emission factor calculation model based on a graph convolutional network, and trains the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model; inputs the electricity carbon information of the node to be tested into the trained carbon emission factor calculation model, outputs the carbon emission factor of the node to be tested, and performs carbon emission accounting for the distribution network based on the carbon emission factor. There is no need to calculate the power flow of the entire network, but instead uses the existing distribution network measurement information to calculate the carbon emission factor of each node in the distribution network, which improves the accuracy of the carbon emission factor, reduces the difficulty of carbon emission accounting for the distribution network, and the accounting result can reflect the actual situation.

[0135] In addition, an embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the above-mentioned distribution network carbon emission accounting method.

[0136] An embodiment of the present invention further provides a computer program product, which includes a computer program; wherein, when the computer program is running, the device where the computer program product is located is controlled to execute the above-mentioned distribution network carbon emission accounting method.

[0137] See also Figure 5 , Figure 5: is a structural block diagram of a computer device 20 provided in an embodiment of the present invention, and the computer device 20 includes: a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps in the above-mentioned distribution network carbon emission accounting method embodiment are implemented. Alternatively, when the processor 21 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0138] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the computer device 20.

[0139] The computer device 20 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 20 and does not limit the computer device 20. The computer device 20 may include more or fewer components than shown in the figure, or may combine certain components, or different components. For example, the computer device 20 may also include input and output devices, network access devices, buses, etc.

[0140] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 21 is the control center of the computer device 20, and uses various interfaces and lines to connect various parts of the entire computer device 20.

[0141] The memory 22 can be used to store the computer program and / or module. The processor 21 implements various functions of the computer device 20 by running or executing the computer program and / or module stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0142] Wherein, if the module / unit integrated in the computer device 20 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor 21. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0143] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for calculating carbon emissions from a distribution network, characterized in that: include: Obtain topological connection data and node electricity carbon information of the distribution network; Constructing an adjacency matrix according to the topological connection data, and constructing an input matrix according to the node electro-carbon information; Establishing a carbon emission factor calculation model based on a graph convolutional network, training the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model; The electric carbon information of the node to be tested is input into the trained carbon emission factor calculation model, the carbon emission factor of the node to be tested is output, and the carbon emission accounting of the distribution network is performed based on the carbon emission factor.

2. The method for calculating carbon emissions from a distribution network according to claim 1, characterized in that: The node electricity-carbon information includes the injected power and carbon emission factor of the node; For source-side nodes, the injected power is equal to the active power of the unit; for load-side nodes, the injected power is equal to the negative value of the load active power; for nodes with both units and loads, the injected power is equal to the active power of the unit minus the active power of the load; For a node with neither a unit nor a load, its injected power is equal to 0; For source-side nodes, the carbon emission factor is equal to the carbon emission intensity of the unit; for non-source-side nodes, the carbon emission factor is equal to the load average carbon emission factor, which is calculated by the following formula: in, is the average carbon emission factor of the load; P G is the active power of the unit; P L is the load active power; e G is the carbon emission factor of the unit node.

3. The method for calculating carbon emissions from a distribution network according to claim 2, characterized in that: The step of constructing an adjacency matrix according to the topological connection data and constructing an input matrix according to the node electrical carbon information includes: A graph structure consisting of nodes and edges is constructed according to the topological connection data. If the total number of nodes is N, an N×N dimensional adjacency matrix A is formed, wherein if node i and node j in the distribution network have a connection relationship, the corresponding position of the i-th row and j-th column of the adjacency matrix is ​​set to 1, otherwise it is set to 0; According to the node carbon information, define the carbon information vector W of node i (1≤i≤N) i =(P i ,e i ) T , where P i is the injected power of node i, e i is the carbon emission factor of node i; according to the electric carbon information vector of each node, a 2×N-dimensional first matrix X=(W1,…,W i ,…,W N ); Let the second matrix at time t be X t , then the third matrix at m moments Form an input matrix of N×2m dimensions in for The transpose of .

4. The method for calculating carbon emissions from a distribution network according to claim 1, characterized in that: The carbon emission factor calculation model includes an input layer, a feature extraction layer and an output layer: Wherein, the input layer is composed of the input matrix and the adjacency matrix; The feature extraction layer is composed of a two-layer graph convolutional network and an activation function, which is used to integrate and learn the data information of the input layer and output feature information, wherein each layer of the graph convolutional network uses the output information of the previous layer of the graph convolutional network as input information; The output layer is composed of a fully connected layer, which is used to map the feature information dimension integrated and output by the feature extraction layer to the target output dimension and output the carbon emission factor.

5. The method for calculating carbon emissions from a distribution network according to claim 4, characterized in that: The step of training the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model includes: Importing the adjacency matrix, the input matrix and the carbon emission factor target value data into the carbon emission factor calculation model, and randomly dividing all samples into a training set, a validation set and a test set for training; The parameters of the carbon emission factor calculation model in training are transferred through the following formula: Among them, X (h-1) is the input information of the hth layer; X (h) is the output information after integration of the h-th layer graph convolutional network; is the new matrix obtained by adding the adjacency matrix A to the identity matrix I, that is, is a diagonal matrix that satisfies ψ (h) is the parameter matrix in the h-th layer graph convolutional network; σ is the nonlinear activation function; The gradient of the loss function to the model parameters is calculated through the back-propagation algorithm, and the model parameters are iteratively updated along the negative gradient direction to establish a mapping relationship between the carbon emission factor and the node electric carbon information. Until the preset number of iterations is reached, a trained carbon emission factor calculation model is obtained.

6. The method for calculating carbon emissions from a distribution network according to claim 5, characterized in that: The calculation formula of the loss function is as follows: Let the carbon emission factor target value data of each node in the distribution network at time t be vector E N,t The carbon emission factor vector output by the carbon emission factor calculation model training is Then the loss function at m moments is: in, For vector The second norm of , and 1≤k≤m.

7. The method for calculating carbon emissions from a distribution network according to claim 6, characterized in that: After the trained carbon emission factor calculation model is obtained, the calculation effect of the carbon emission factor calculation model is evaluated by the mean square error and the mean absolute error. The specific formula is as follows: Among them, MSE is the mean square error, MAE is the mean absolute error; xy is the carbon emission factor calculated by the trained carbon emission factor calculation model at the node y in the x-th sample; is the carbon emission factor calculated at node y in the xth sample based on the carbon emission flow theory; n1 is the number of nodes in each sample; n2 is the number of samples included in the test set.

8. A distribution network carbon emission accounting device, characterized in that: include: A data acquisition module is used to obtain topological connection data and node electricity carbon information of the distribution network; Constructing an adjacency matrix according to the topological connection data, and constructing an input matrix according to the node electro-carbon information; A model training module, used to establish a carbon emission factor calculation model based on a graph convolutional network, and to train the carbon emission factor calculation model according to the adjacency matrix and the input matrix to obtain a trained carbon emission factor calculation model; The carbon emission accounting module is used to input the electric carbon information of the node to be tested into the trained carbon emission factor calculation model, output the carbon emission factor of the node to be tested, and perform carbon emission accounting of the distribution network based on the carbon emission factor.

9. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the distribution network carbon emission accounting method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is run, it controls the device where the computer-readable storage medium is located to execute the distribution network carbon emission accounting method according to any one of claims 1 to 7.