A distributed carbon metering communication method and system based on proxy transparent transmission mechanism
Patent Information
- Application Number
- CN202610937083.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-09-15
AI Technical Summary
在通信延时高、带宽受限且异构的混合网络中,缺乏一种能够协调所有节点进行有序迭代、实时判定收敛并全局同步的调度机制,极易导致计算逻辑混乱或陷入死锁
本发明将软件定义网络的思想引入电力碳计量领域,成功解耦了业务逻辑拓扑与物理通信拓扑。这使得原本只能在实验室理想环境下运行的先进去中心化算法,能够直接、无缝地部署在现有的、数以亿计的基于主从架构的工业级智能电表上,无需等待通信硬件的漫长更新换代,实现了技术的快速落地。
Smart Images

Figure CN122764985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of carbon emission metering technology in power systems, and specifically discloses a distributed carbon metering communication method and system based on a proxy transparent transmission mechanism. Background Technology
[0002] Carbon emission flow is a core concept in power system carbon emission metering. It refers to a virtual carbon emission network flow that exists in relation to power flow and moves directionally with the system's active power flow. It is used to characterize the process by which the carbon emission responsibility of the generation side is transferred to the load side along with power transmission. By tracking the flow of carbon from the generation side to the user side, accurate allocation of carbon responsibility across the entire source-grid-load chain can be achieved. To realize the engineering application of this theory, a decentralized iterative algorithm has been proposed: each node calculates its local carbon emission factor based on a weighted average of the carbon flow density injected by all upstream nodes, and then broadcasts the result to downstream nodes. This process requires close coordination between nodes, necessitating a mesh-like communication mode.
[0003] However, in reality, the communication network of the power Internet of Things, especially the low-voltage distribution grid with the widest coverage, is designed based on cost and reliability considerations, and has long been stable in a master-slave mode of "concentrator master station - slave meter station". This master-slave characteristic at the physical layer and the mesh requirements at the business layer have created a long-standing technical contradiction in the field of power carbon metering.
[0004] Current carbon metering methods in power systems are shifting from macroscopic statistics to microscopic real-time metering based on carbon emission flow theory. Decentralized carbon emission flow calculation requires metering nodes in the network to transmit the carbon flow density calculated upstream to downstream neighboring nodes in real time based on electrical connections, iterating through multiple rounds until the entire network converges. However, there is a fundamental contradiction between the current communication architecture of the power Internet of Things and the requirements of distributed algorithms, specifically manifested in the following technical shortcomings: Existing low-voltage power communication networks (such as transformer substations based on high-speed power line carrier or low-power wireless) generally adopt a tree-structured master-slave architecture of "master station-concentrator-meter". Under this architecture, the underlying terminal devices are physically isolated and cannot directly initiate point-to-point communication. This structure completely blocks the horizontal data interaction between neighboring nodes on which distributed algorithms depend, making it impossible to deploy and run theoretically mature decentralized algorithms on existing hardware facilities.
[0005] Carbon metering modules are typically embedded within electricity meters or installed independently under terminals, placing them at the very end of the communication network. According to existing communication protocols, these modules can only respond to query commands initiated by the master station or concentrator; they lack the ability to proactively establish network connections or broadcast data to peer devices. This passive response mode prevents edge-side data from actively participating in iterative calculations.
[0006] Distributed algorithms require hundreds or even thousands of nodes across the network to synchronously start computation under a unified time base (e.g., every 15 minutes on the hour) and complete multiple rounds of iteration and data exchange within milliseconds. In hybrid networks with high communication latency, limited bandwidth, and heterogeneity, the lack of a scheduling mechanism that can coordinate all nodes to perform orderly iterations, determine convergence in real time, and achieve global synchronization can easily lead to chaotic computational logic or deadlock.
[0007] In view of this, the present invention provides a distributed carbon metering communication method and system based on a proxy transparent transmission mechanism. By coordinating the master station to perform a three-step closed-loop operation of "proxy collection - virtual routing - proxy writing", a logically peer-to-peer communication coverage network is built on the physical master-slave network. This enables physically isolated end metering nodes to complete iterative data exchange in a virtual direct connection manner, thereby deploying the decentralized carbon flow algorithm on the existing power Internet of Things without modifying any existing hardware. Summary of the Invention
[0008] The purpose of this invention is to provide a distributed carbon metering communication method and system based on a proxy transparent transmission mechanism, addressing the problem of how to build logical peer-to-peer communication capabilities for distributed carbon metering algorithms on a physical master-slave network that does not support direct lateral communication. This enables physically isolated end-metering nodes to complete iterative data exchange, thereby deploying a decentralized carbon flow algorithm on the existing power Internet of Things without modifying any existing hardware. The specific solution is as follows: A distributed carbon metering communication method based on a proxy transparent transmission mechanism is applied to a three-layer architecture comprising a collaborative master station, edge gateways, and multiple end-point carbon metering modules. The carbon metering modules are physically isolated and can only communicate with the collaborative master station via their respective edge gateways in a master-slave manner. The method includes: Step 1: The collaborative master station constructs a logical topology representing the upstream and downstream adjacency relationships of each carbon metering module based on the electrical connection relationships of the power system, and generates a routing mapping table for logically adjacent node pairs by combining the physical addresses of each carbon metering module and the information of its respective edge gateway; Step 2: At the beginning of each calculation cycle, the collaborative master station broadcasts an initialization command to all carbon metering modules in the network via each edge gateway. Each carbon metering module responds, latches the current energy metering benchmark value, and resets its iteration state; Step 3: Based on the routing mapping table, the collaborative master station sequentially executes the proxy sampling... The closed-loop operation consists of collection, virtual routing, and proxy writing; the closed-loop operation includes obtaining the carbon flow density data of the current cycle from the logical upstream carbon metering module through the proxy reading mechanism; reorganizing the carbon flow density data into data units pointing to the logical downstream carbon metering module according to the logical topology; injecting the data units into the logical downstream carbon metering module through the proxy writing mechanism; triggering the downstream carbon metering module to complete the iterative update of the carbon emission factor locally; Step 4: After a round of closed-loop operation covers all logical adjacent node pairs, the main station collects the convergence status of each carbon metering module. When it is determined that the convergence condition is met or the iteration limit is reached (for example, the iteration limit N=10, and the iteration limit can be appropriately reduced for small networks), a settlement instruction is issued to the entire network. Each carbon metering module calculates the carbon emission amount for the current period based on the finally converged carbon emission factor and the electricity increment of the current cycle and persists it.
[0009] Further, step 1 includes: Step 11: The collaborative master station constructs a directed graph model with each carbon metering module as a node and the active power flow direction as a directed edge, and determines the upstream neighbor node set and downstream neighbor node set of each node based on the directed graph model; Step 12: The collaborative master station establishes a node-gateway affiliation mapping table according to the physical communication address registered by each carbon metering module and its corresponding edge gateway identifier; Step 13: The collaborative master station traverses all node pairs with directed edges in the directed graph model, and generates a static routing entry for each node pair containing the source node identifier, the target node identifier, and the power flow direction identifier, forming a routing mapping table.
[0010] Furthermore, for logically adjacent node pairs consisting of upstream and downstream nodes, the proxy acquisition is as follows: the collaborative master station sends a proxy read request to the first edge gateway to which the upstream node belongs; the first edge gateway addresses the upstream node on the local bus and reads its current round of carbon flow density data, encapsulates the read data, and returns it to the collaborative master station; the virtual routing is as follows: the collaborative master station queries the routing mapping table to determine the downstream node to which the data of the upstream node should be forwarded, reassembles the carbon flow density data, and constructs a data unit containing the source node identifier, carbon flow density value, and flow direction identifier; the proxy writing is as follows: the collaborative master station sends a proxy write request to the second edge gateway to which the downstream node belongs; the proxy write request carries the physical address of the downstream node and the data unit; the second edge gateway addresses the downstream node on the local bus and writes the data unit into the input buffer of the downstream node; after the carbon metering module of the downstream node detects the write event in the input buffer, it triggers the local carbon emission factor iterative calculation.
[0011] Furthermore, the carbon emission factor is iteratively calculated as follows: ; in, Let be the carbon emission factor calculated for node i in the (k+1)th iteration; For upstream nodes; The set of branches that inject active power into node i; For downstream nodes; This refers to the active power injected into node i from upstream node j. Let J be the carbon emission factor of the upstream neighbor node j after the k-th iteration. For generator sets; This is the set of generator sets connected to node i; The active power output of generator set S; denoted as the carbon emission factor of generator set s.
[0012] Furthermore, the collaborative master station adopts a round-by-round asynchronous concurrent mechanism to manage iterative data exchange between multiple edge gateways, including: at the beginning of each iteration, creating a logical batch for that round and sending the proxy read requests for that round to the relevant edge gateways; the responses from each relevant edge gateway are aggregated to a unified response mailbox via callbacks, the collaborative master station continuously consumes the responses in the unified response mailbox, and tracks the completion status of each proxy read request; when all proxy read requests for that round have received responses or triggered a timeout, the data for that round is sealed and reassembled; the proxy read request delivery for the next round is repeated.
[0013] Furthermore, it also includes: after the main station completes each round of response collection, it checks the convergence status flag of each carbon metering module; if the convergence status flag of all carbon metering modules in the network has been set, the remaining iteration rounds that have not yet been executed are truncated, and the process jumps to step 4 to perform settlement.
[0014] Furthermore, the convergence condition judgment mechanism is as follows: after each round of iteration, each carbon metering module calculates the difference between the carbon emission factor of the current round and the carbon emission factor of the previous round. If the difference is less than the preset difference threshold, the local convergence status flag is set. The collaborative master station collects the convergence status flags of the carbon metering modules concurrently through the proxy reading mechanism. When the convergence flags of all carbon metering modules are set, the entire network is determined to have converged.
[0015] Furthermore, fault tolerance processing is also included, including: maintaining an online state machine for each carbon metering module in collaboration with the master station; if multiple communication attempts to a carbon metering module fail to time out within a calculation cycle, historical data filling is automatically enabled; the historical data filling uses the carbon flow density data of the previous valid cycle of the carbon metering module as the replacement value for this round and participates in the iterative calculation of its downstream neighboring nodes; the fault status of the faulty carbon metering module is recorded, and communication is continuously attempted to be restored in subsequent calculation cycles.
[0016] Furthermore, in the three-layer architecture: the iterative calculation of carbon emission factors is executed by the local embedded processor of each carbon metering module; the collaborative master station transfers carbon emission factor data and branch active power data between carbon metering modules through a proxy transparent transmission mechanism; and the edge gateway performs communication protocol conversion and transparent transmission on the carbon metering service data.
[0017] This invention also provides a distributed carbon metering communication system based on a proxy transparent transmission mechanism, used to implement the distributed carbon metering communication method based on the proxy transparent transmission mechanism as described in any of the above claims, including a collaborative master station layer, an edge gateway layer, and a distributed metering layer: the collaborative master station layer includes a virtual routing engine, a global time-series scheduler, and a dual topology mapping module; the virtual routing engine is used to execute a closed-loop operation consisting of proxy acquisition, virtual routing, and proxy writing, establishing a communication channel for physically isolated carbon metering modules; the global time-series scheduler is responsible for the full lifecycle management of the distributed algorithm; the dual topology mapping module is used to maintain dual information of physical topology and logical topology, and generate a routing mapping table for logically adjacent node pairs; the edge gateway layer includes a fusion terminal or concentrator and a protocol conversion module; the fusion terminal or concentrator is connected to the collaborative master station layer; the protocol conversion module performs protocol format conversion and transparent transmission of carbon metering business data; the distributed metering layer includes multiple carbon metering modules, each carbon metering module deploying a carbon emission flow iterative algorithm engine, used to automatically trigger local carbon emission factor iterative calculation when new data is detected being written to the input buffer, and store the calculation result in the output buffer.
[0018] The present invention has the following advantages and beneficial effects: This invention introduces the concept of software-defined networking into the field of electricity carbon metering, successfully decoupling the business logic topology from the physical communication topology. This enables advanced decentralized algorithms, which previously could only operate in ideal laboratory environments, to be directly and seamlessly deployed on hundreds of millions of existing industrial-grade smart meters based on master-slave architectures, without waiting for lengthy upgrades to communication hardware, thus achieving rapid technology implementation.
[0019] The system implementation of this invention relies entirely on existing converged terminals and standard communication protocols, requiring no new communication lines or replacement of expensive communication modules. Its main investment lies in the development and deployment of the main station software and firmware upgrades of the metering module. For the vast existing market, this represents an economical, efficient, and rapidly replicable technological path.
[0020] Compared to a completely decentralized, purely peer-to-peer network, the collaborative master station in this invention possesses a global network view. When faced with abnormal conditions such as node offline or link interruption, the master station can proactively intervene, using strategies such as historical data filling and dynamic route retrying to ensure the continuity and stability of metering services, thus avoiding the risk of local faults spreading throughout the network and causing overall iteration divergence. Attached Figure Description
[0021] Figure 1 This is an architecture diagram of a distributed carbon metering communication system based on a proxy transparent transmission mechanism provided by the present invention; Figure 2 This is an iterative calculation flowchart of a distributed carbon metering communication method based on a proxy transparent transmission mechanism provided by the present invention; Figure 3 This is a schematic diagram of the logical topology and routing table mapping of the present invention; Figure 4 This is a timing diagram of data pass-through in this invention. Detailed Implementation
[0022] 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, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0023] Example 1 This embodiment provides a distributed carbon metering communication method based on a proxy transparent transmission mechanism. Figure 2 This is a flowchart of the iterative calculation process of the present invention. (For example...) Figure 2As shown, the data processing flow of this invention adopts a periodic iteration mechanism, with each processing cycle T being 15 minutes (this cycle can be configured according to actual needs). The data processing flow includes the following stages: Phase 1: Logical topology construction and routing table generation.
[0024] Figure 3 This is a schematic diagram of the logical topology and routing table mapping of the present invention. For example... Figure 3 As shown, the logical topology construction and routing table generation process of the present invention includes three levels: logical domain, physical domain, and routing table.
[0025] In the logical domain, an electrical connection topology is illustrated. This topology consists of four nodes: A1, A2, B1, and B2. Nodes A1 and A2 are connected via a flow direction 0x05 (upstream) → 0x0A (downstream); nodes A2 and B1 are connected via a flow direction 0x05 → 0x0A; and nodes B1 and B2 are connected via a flow direction 0x05 → 0x0A. This directed graph model uses each carbon metering module as a node and the active power flow direction as directed edges. Based on this directed graph model, the upstream and downstream neighbor sets of each node are determined.
[0026] In the physical domain, the device mounting relationships are illustrated. The system includes two gateways: Gateway A (GW-A) and Gateway B (GW-B). Gateway A has nodes A1 and A2 mounted, with node A1 having an address of 20 25 00 00 01 and node A2 having an address of 20 25 00 00 02. Gateway B has nodes B1 and B2 mounted, with node B1 having an address of 20 25 0000 11 and node B2 having an address of 20 25 00 00 12. The collaborative master station establishes a node-gateway affiliation mapping table based on the registered physical communication addresses of each carbon metering module and their respective edge gateway identifiers.
[0027] The routing table displays routing entries with logical adjacency relationships. The table includes three entries: Entry 1: Source node A1, destination node A2, flow direction upstream (0x05) → downstream (0x0A); Entry 2: Source node A2, destination node B1, flow direction upstream (0x05) → downstream (0x0A); Entry 3: Source node B1, destination node B2, flow direction upstream (0x05) → downstream (0x0A). The routing table is generated by the master station traversing all node pairs with directed edges in the directed graph model, generating a static routing entry for each node pair containing the source node identifier, destination node identifier, and flow direction identifier.
[0028] Specifically, when the system starts up or the network topology changes, the master station first loads the electrical connection information of the power system and constructs a logical directed graph. Then, based on the physical addresses of all registered nodes and their respective gateways, the master station establishes a complete node routing mapping table. The core of this mapping table is to identify all logically adjacent node pairs, that is, all combinations where data needs to flow from node A to node B, generating static routing rules for subsequent data transfer.
[0029] Phase Two: Global Timing Synchronization and Data Freezing.
[0030] At the start of each calculation cycle (e.g., on the hour), the timing scheduling engine of the coordinating master station broadcasts an initialization freeze command to all edge gateways in the network. This command is passed through the gateway to each metering module connected to it. Upon receiving the command, the module immediately performs the following operations: (a) latches the current energy register value as the baseline for the calculation of this cycle; (b) resets the internal iteration counter i=0 and clears the temporary calculation variables; (c) enters a ready state to wait for data from upstream nodes.
[0031] Phase 3: Point-to-point data exchange based on proxy pass-through.
[0032] This stage is the core innovative step of this invention. Figure 4 This is a data pass-through timing diagram of the present invention. For example... Figure 4 As shown, the data interaction process involves the main station, gateway A, gateway B, node A (logical upstream), and node B (logical downstream). The data exchange process of proxy pass-through includes the following steps: (1) Query the routing table. The main station first queries the routing table to determine that the data of node A needs to be forwarded to node B.
[0033] (2) Proxy Acquisition (Proxy Read Request). The master station sends a proxy read request to gateway A. The request includes the target node identifier (node A) and the operation instruction (OI = carbon flow density). Specifically, the master station's virtual routing engine identifies that the data of node A needs to be collected based on the routing table. The master station constructs a proxy read request message conforming to the DL / T 698.45 communication protocol standard. The target address of this message points to the edge gateway (gateway A) to which node A belongs, and the request parameters explicitly include the physical address of node A and the object attribute descriptor to be read. For example, the specific object identifier OI = carbon flow density represents carbon flow density.
[0034] (3) Local bus read request and response. After receiving the proxy read request, gateway A sends the read request to node A through the local bus. Node A responds to the read request and returns the carbon flow density value to gateway A.
[0035] (4) Proxy read response. Gateway A encapsulates the carbon flow density value obtained from node A into a proxy read response (data) and sends it to the master station.
[0036] (5) Virtual Routing and Proxy Write Request. The master station performs virtual routing operations: After successfully receiving data from node A, the master station immediately queries the internally maintained logical topology routing table to identify that the output data of node A should be forwarded to the downstream neighbor node B. The master station reassembles the received raw data packets to construct a new data unit, which contains the source node identifier (node A), the carbon flow density value, and the flow direction identifier (indicating that this data comes from the upper level input). Then, the master station sends a proxy write request to gateway B, which includes the target node identifier (node B), the operation instruction (OI = input buffer), and the data payload (carbon flow density).
[0037] (6) Write to the input buffer. After receiving the agent write request, Gateway B addresses Node B on the local bus and writes the data to its designated input buffer.
[0038] (7) Trigger local iterative calculation. The carbon metering module of node B detects the change in the state of the input buffer (a write event exists), is immediately awakened, reads the new data and substitutes it into the local carbon emission factor calculation formula, performs local iterative calculation, and updates its own carbon emission factor.
[0039] (8) Write confirmation and proxy write response. After completing the data write, node B sends a write confirmation to gateway B. After receiving the confirmation, gateway B sends a proxy write response (success) to the master station.
[0040] The aforementioned three-step closed loop of "collection-routing-writing" logically completely simulates the "send-receive" process of point-to-point communication, while physically the data flow always follows the master-slave path of "master station-gateway-node". By having the master station repeatedly execute this closed loop for each logically adjacent pair, the entire network of nodes can be driven to complete round after round of iterations. The core formula for the iterative calculation of the carbon emission factor is: ; in, Here is the carbon emission factor (unit: kgCO2 / kWh) calculated for node i in the (k+1)th iteration. For upstream nodes; The set of branches (upstream neighbor nodes) that inject active power into node i. For downstream nodes; This refers to the active power injected into node i from upstream node j. Let J be the carbon emission factor of the upstream neighbor node j after the k-th iteration. For generator sets; This is the set of generator sets connected to node i; The active power output of generator set S; Let be the carbon emission factor of generator unit s. The physical meaning of this formula is: the carbon emission factor of a node is equal to the weighted average of the carbon emissions carried by all power injected into that node, weighted by active power. The carbon emission factor of the generator-side nodes is directly given by the unit parameters (e.g., approximately 0.85 kgCO2 / kWh for thermal power, and 0 for photovoltaic power) and remains unchanged throughout the calculation cycle; the initial values of other nodes are set to default values or the converged values of the previous cycle. In each iteration, a node only needs to obtain the carbon emission factor and branch active power of its upstream neighbor nodes from the previous cycle, and substitute them into the above formula to independently update its own carbon emission factor, without needing to obtain information from the entire network.
[0041] The iteration begins on the power generation side and proceeds downstream level by level along the power flow direction. During initialization, the carbon emission factor of the power generation side nodes is directly given by the unit parameters. In the first iteration, the power generation side nodes pass their known carbon emission factors to their direct downstream neighbors, and the downstream nodes calculate their own carbon emission factors according to the above formula. In the second iteration, the nodes that have been updated in the first round continue to pass the new values downstream, and the nodes further downstream calculate their own factors based on the new values from upstream. This process of "receiving upstream data - local weighted calculation - passing the results downstream" is repeated.
[0042] After each round of iteration and exchange, the collaborative master station concurrently collects the convergence status flags of all nodes through a proxy reading mechanism. The convergence condition judgment mechanism is as follows: after each round of iteration, each carbon metering module calculates the difference between the carbon emission factor of this round and the carbon emission factor of the previous round. If the difference is less than a preset difference threshold (e.g., ...), If the convergence status flag of all carbon metering modules is set, the local convergence status flag is set. The collaborative master station concurrently collects the convergence status flags of the carbon metering modules through a proxy reading mechanism. When the convergence flags of all carbon metering modules are set, the entire network is considered to have converged.
[0043] Phase 4: Convergence determination and result settlement.
[0044] When the master station determines that all nodes have converged, or the number of iterations has reached a preset upper limit (e.g., 10 times), the current calculation cycle comes to an end. The master station sends settlement and storage instructions to all nodes in the network via a proxy write mechanism. Upon receiving the instructions, each node multiplies the finally converged carbon emission factor by the electricity increment for the current cycle to calculate the carbon emissions for that cycle, and adds it to the total carbon emissions register, completing data persistence. Afterward, the current cycle ends, awaiting the start of the next cycle, and returns to phase two to execute a new round of data freezing and initialization.
[0045] After the above iterative processing, the following are finally obtained: the real-time carbon emission factor (kgCO2 / kWh) of each node, reflecting the carbon emission intensity of a unit of electricity consumed at the node during the current period; the carbon emission amount (kgCO2) of each node during the period, that is, the indirect carbon emission amount within the current 15-minute calculation cycle; the cumulative total carbon emission (kgCO2) of each node, that is, the cumulative value of indirect carbon emissions since commissioning; and the carbon flow rate (kgCO2 / h) and carbon flow density of each branch, which are used for the refined accounting of network loss carbon emissions.
[0046] Example 2 This embodiment focuses on describing the asynchronous communication scheduling mechanism of the collaborative master station.
[0047] In distributed iterative computing scenarios, the computation progress of each node is interdependent and inherently asynchronous, but the convergence of the entire system requires globally ordered progress. The scheduler needs to manage timing constraints in two dimensions: cross-gateway concurrency and sequential iteration rounds. Specifically, the write operation in the current round must wait for all the read operations of all gateways in the previous round to be completed and the data to be reassembled before it can be executed; however, due to the huge differences in local computing speed and communication latency between nodes under different gateways, their response times are inherently asynchronous and out of order. If a synchronous blocking method is used to poll gateway by gateway, the total time will be equal to the sum of the time of each gateway, which cannot meet the real-time requirements; if a conventional asynchronous method is used for simple concurrency, it is impossible to guarantee the logical closed loop of data in the same round, which may cause downstream nodes to receive mixed data from different iteration rounds, causing the algorithm to diverge.
[0048] To this end, the scheduler of this invention is designed with a round-robin asynchronous concurrency mechanism, specifically including: At the start of each iteration, the scheduler creates a logical batch for that round, sending all proxy read requests for that round to the sending queues of all relevant gateways at once, and then enters an asynchronous waiting state.
[0049] Responses from all gateways converge to a single response mailbox via a callback mechanism. The scheduler continuously consumes responses in the mailbox and records their completion status. Only when all requests in the current round have received a response (or a timeout has been triggered) will the scheduler archive the current round, reassemble the data, and immediately begin sending requests to the next round. This design ensures strict serialization between rounds and full concurrency within rounds, avoiding the accumulation of latency caused by gateway-by-gateway blocking and eliminating the risk of data corruption across rounds.
[0050] Furthermore, the scheduler incorporates global stability assessment logic. After each round of response collection, the scheduler checks the convergence status flags of each node. If all nodes in the network are in a converged state, the scheduler proactively truncates the remaining iterations and jumps directly to the settlement phase, avoiding meaningless idle iterations and further shortening the computation cycle. This convergence determination logic, together with the round serial control, constitutes the scheduler's global cooperative state machine, distinguishing it from conventional asynchronous schedulers that only focus on I / O concurrency.
[0051] Example 3 This embodiment focuses on describing the definition of extended object property descriptors and the fault tolerance and breakpoint resume mechanism.
[0052] To support carbon metering services without altering the existing communication protocol framework, this invention extends the definition of a dedicated interface class object for carbon metering based on the DL / T698.45 standard. The core of this definition is a node exchange data set object, whose data type is a structure. This structure allows encapsulating information from multiple neighboring nodes within a single data frame, including node communication addresses, power flow direction identifiers, carbon flow density values, and time-period electrical energy. This batch data exchange method significantly improves channel utilization and reduces the number of communications. Specifically, the DL / T 698.45 protocol is the Chinese power industry standard "Object-Oriented Data Exchange Protocol," which defines the specifications for data communication between the master station and terminal equipment. It supports object-oriented access to data in devices and is the foundational protocol for implementing proxy pass-through functionality. Proxy service is a service mechanism in the communication protocol. Under this mechanism, the master station does not communicate directly with the target device but instead sends a request to an intermediate device (proxy). The proxy then performs the operation with the target device and returns the result to the master station. This invention utilizes this mechanism to penetrate the gateway and achieve read and write access to end-point meters. An object attribute descriptor is an encoding used in the DL / T 698.45 protocol to uniquely identify a data object within a device. It consists of two parts: an object identifier and an attribute identifier.
[0053] The master station maintains the online state machine for each node. If the master station fails to communicate with a node multiple times within a computation cycle due to timeouts, a fault-tolerance strategy is automatically triggered. This strategy includes enabling historical data filling, using the carbon flux density data from the previous valid cycle of that node as a substitute value for its downstream nodes in the current round of computation. Simultaneously, the master station records the node failure and continuously attempts to restore communication in subsequent cycles. This mechanism ensures that the entire network's iterative computation will not fall into deadlock due to a single point of communication failure, significantly improving the system's robustness.
[0054] Example 4 This embodiment highlights the fundamental difference between this solution and the traditional centralized solution. The method of this invention does not aggregate the raw data from all electricity meters or carbon terminals to a main station for centralized calculation. Instead, each carbon metering terminal independently completes the iterative calculation of carbon emission factors locally, with the main station only responsible for transferring intermediate variable data required for calculation between nodes. Specifically, the traditional centralized solution uploads the raw electrical quantity data (voltage, current, power, electricity consumption, etc.) of all electricity meters to the cloud main station via a concentrator. The main station then constructs a network-wide matrix model, uniformly solves the carbon emission factors for each node, and distributes the results to each user. In this solution, the main station undertakes all calculation tasks, while the terminals are only responsible for data collection and reporting.
[0055] The core calculation of the carbon emission factor in this invention is performed locally by an embedded chip deployed within the electricity meter or carbon metering module. Each terminal node only needs to obtain two intermediate variables: the carbon emission factor of its electrical upstream neighbor node and the electricity transmitted in the branch, to independently calculate its own carbon emission factor using a weighted average formula.
[0056] The master station utilizes a proxy pass-through mechanism to transport carbon emission factor data calculated by upstream nodes to downstream nodes, but does not parse or process the calculation process of this data. The master station reads from node A through the proxy to obtain the carbon emission factor value for its current iteration; based on the topology, the master station identifies all downstream neighbors of node A that should forward this data; the master station writes the data into the input buffer of the downstream node through the proxy; after detecting the new data, the metering module of the downstream node automatically triggers its local computing engine to update its own carbon emission factor. Therefore, this scheme is a collaborative architecture of edge computing and upper-layer communication: computation is pushed down to the edge, while communication routing remains on the central side. The master station does not participate in the numerical calculation of carbon emission factors, but only provides a logical channel for data exchange. This design achieves the separation of data and computation, protecting user data privacy while leveraging the low latency advantage of edge computing.
[0057] This invention constructs a logical peer-to-peer communication overlay network on top of the physical master-slave network by coordinating a master station to perform a three-step closed-loop operation of "agent data collection - virtual routing - agent writing". This enables physically isolated end-metering nodes to complete iterative data exchange through virtual direct connection, thereby deploying a decentralized carbon flow algorithm on the existing power Internet of Things without modifying any existing hardware. This invention overcomes the constraints of physical communication topology on distributed algorithms, achieving intelligent carbon metering upgrades for large-scale existing equipment at extremely low cost, demonstrating significant technological advancement and industrial application value.
[0058] Example 5 This embodiment provides a distributed carbon metering iterative communication system for power systems based on a proxy transparent transmission mechanism. Figure 1 This is a system architecture diagram. For example... Figure 1 As shown, the distributed carbon metering system of this invention adopts a three-layer architecture design, consisting of a collaborative master station layer, an edge gateway layer, and a distributed metering layer from top to bottom. This system employs a layered and decoupled design philosophy, with clearly defined functions and standardized interfaces for each layer.
[0059] The first layer is the collaborative master station layer (virtual routing center), which is the logical core of this invention and is typically deployed on a server or high-performance industrial control computer. The collaborative master station layer includes three functional modules: a virtual routing engine, a global time-series scheduler, and a dual topology mapping module.
[0060] The virtual routing engine executes a closed-loop operation consisting of proxy data collection, virtual routing, and proxy writing, establishing a communication channel for physically isolated carbon metering modules and serving as the core for achieving logical peer-to-peer communication. It receives data from the source node, identifies the target node based on the logical topology mapping table, repackages the data, and sends it to the target node, completing a logical data transfer. The global timing scheduler manages the entire lifecycle of the distributed algorithm. Based on a high-precision time base, it triggers and coordinates all network nodes to complete a standardized process of data freezing, initialization, iterative calculation, convergence determination, and result settlement. The dual topology mapping module maintains the "physical-logical" dual topology information for all network devices. The physical topology records the affiliation between devices and gateways, specifically including node ID, communication address, and gateway ID; the logical topology constructs a directed graph model based on the electrical connections of the power system, clearly defining each node's upstream (power supply side) and downstream (load side) neighbors.
[0061] The second layer is the edge gateway layer (transparent transmission channel). Located between the collaborative master station layer and the distributed metering layer, the edge gateway layer is typically handled by a power convergence terminal, concentrator, or communication management unit. The edge gateway layer includes the convergence terminal / concentrator and a protocol conversion module. The convergence terminal / concentrator establishes a bidirectional communication connection with the collaborative master station layer through the transparent transmission channel. Its core function is to establish and maintain a reliable long-term connection with the collaborative master station (e.g., a link based on the transmission control protocol). The protocol conversion module communicates with the convergence terminal / concentrator and each carbon metering module in the distributed metering layer. A key design feature is that the gateway layer does not parse, process, or cache any carbon metering business data; it only performs protocol conversion and transparent transmission, thus ensuring low latency and high throughput in data processing.
[0062] The third layer is the distributed metering layer (algorithm execution unit). This layer comprises multiple carbon metering modules, embedded within smart meters or installed independently. Each carbon metering module establishes a communication connection with the protocol conversion module via transparent transmission. Each module deploys a streamlined iterative carbon emission flow algorithm engine. Its core design principle is transparent communication; the module reads and writes data only through a standardized local interface (such as a Universal Asynchronous Receiver / Transmitter, UART), without needing to know whether the data originates from a physically adjacent device or is remotely forwarded from the master station. When new data is written to the input buffer, local computation is automatically triggered. After computation, the result is stored in the output buffer, awaiting retrieval.
[0063] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A distributed carbon metering communication method based on a proxy pass-through mechanism, applied to a three-layer architecture comprising a collaborative master station, an edge gateway and a plurality of end carbon metering modules, the carbon metering modules are physically isolated and can only communicate with the collaborative master station in a master-slave mode through the edge gateway to which they belong, characterized in that, include: Step 1: The collaborative master station constructs a logical topology representing the upstream and downstream adjacency relationship of each carbon metering module based on the electrical connection relationship of the power system, and generates a routing mapping table for logically adjacent node pairs by combining the physical address of each carbon metering module and its corresponding edge gateway information. Step 2: At the beginning of each calculation cycle, the collaborative master station broadcasts an initialization command to all carbon metering modules in the network through each edge gateway. After each carbon metering module responds, it latches the current electricity metering benchmark value and resets the iteration state. Step 3: Based on the routing mapping table, the collaborative master station sequentially executes a closed-loop operation consisting of proxy data collection, virtual routing, and proxy writing for each logically adjacent node pair. The closed-loop operation includes obtaining the current round's carbon flow density data from the logically upstream carbon metering module through a proxy reading mechanism; reorganizing the carbon flow density data into data units pointing to the logically downstream carbon metering module according to the logical topology; injecting the data units into the logically downstream carbon metering module through a proxy writing mechanism; and triggering the downstream carbon metering module to complete the iterative update of the carbon emission factor locally. Step 4: After a closed-loop operation covers all logically adjacent node pairs, the main station collects the convergence status of each carbon metering module. When it is determined that the convergence condition is met or the iteration limit is reached, a settlement instruction is issued to the entire network. Each carbon metering module calculates the carbon emissions for the current period based on the final converged carbon emission factor and the electricity increment for the current period and persists the data.
2. The distributed carbon metering communication method based on the proxy pass-through mechanism according to claim 1, characterized in that, Step 1 includes: Step 11: The collaborative master station constructs a directed graph model with each carbon metering module as a node and the direction of active power flow as a directed edge, and determines the upstream neighbor node set and downstream neighbor node set of each node based on the directed graph model. Step 12: The collaborative master station establishes a node-gateway affiliation mapping table based on the physical communication address registered by each carbon metering module and the identifier of its respective edge gateway; Step 13: The master station traverses all node pairs with directed edges in the directed graph model and generates a static route entry for each node pair, which includes the source node identifier, the target node identifier, and the power flow direction identifier, thus forming a route mapping table.
3. The distributed carbon metering communication method based on proxy pass-through mechanism according to claim 1, characterized in that, For a logically adjacent node pair consisting of an upstream node and a downstream node, the agent collection is as follows: The collaborative master station sends a proxy read request to the first edge gateway to which the upstream node belongs. The first edge gateway addresses the upstream node on the local bus and reads its current round of carbon flow density data. After encapsulating the read data, it returns it to the collaborative master station. The virtual route is: The main station queries the routing mapping table to determine the downstream node to which the data from the upstream node should be forwarded, reassembles the carbon flow density data, and constructs a data unit containing the source node identifier, carbon flow density value, and flow direction identifier. The proxy is written as: The master station sends a proxy write request to the second edge gateway to which the downstream node belongs. The proxy write request carries the physical address of the downstream node and the data unit. The second edge gateway addresses the downstream node on the local bus and writes the data unit into the input buffer of the downstream node; After the downstream node's carbon metering module detects a write event in the input buffer, it triggers a local iterative calculation of the carbon emission factor.
4. The distributed carbon metering communication method based on proxy pass-through mechanism according to claim 3, characterized in that, The carbon emission factor is calculated iteratively as follows: ; in, Let be the carbon emission factor calculated for node i in the (k+1)th iteration; For upstream nodes; The set of branches that inject active power into node i; For downstream nodes; This refers to the active power injected into node i from upstream node j. Let J be the carbon emission factor of the upstream neighbor node j after the k-th iteration. For generator sets; This is the set of generator sets connected to node i; The active power output of generator set S; denoted as the carbon emission factor of generator set s.
5. The distributed carbon metering communication method based on a proxy transparent transmission mechanism according to claim 1, characterized in that, The collaborative master station employs a round-robin asynchronous concurrent mechanism to manage iterative data exchange between multiple edge gateways, including: At the start of each iteration, a logical batch is created for that round, and the proxy read request for that round is sent to the relevant edge gateway; The responses from each relevant edge gateway are aggregated into a unified response mailbox via callbacks. The main station continuously consumes the responses in the unified response mailbox and tracks the completion status of each agent's read request. Once all proxy read requests in this round have received a response or triggered a timeout, the data in this round is sealed and reassembled. Repeat the next round of proxy read request delivery.
6. The distributed carbon metering communication method based on a proxy transparent transmission mechanism according to claim 5, characterized in that, Also includes: After each round of response collection is completed, the master station checks the convergence status flag of each carbon metering module; If the convergence status flags of all carbon metering modules in the network are set, then the remaining iterations that have not yet been executed are truncated, and the process jumps to step 4 to perform the settlement.
7. The distributed carbon metering communication method based on a proxy transparent transmission mechanism according to claim 1, characterized in that, The convergence condition determination mechanism is as follows: After each iteration, each carbon metering module calculates the difference between the carbon emission factor of the current round and the carbon emission factor of the previous round. If the difference is less than the preset difference threshold, the local convergence status flag is set. The collaborative master station concurrently collects the convergence status flags of the carbon metering modules through a proxy reading mechanism. When the convergence flags of all carbon metering modules are set, the entire network is considered to have converged.
8. The distributed carbon metering communication method based on a proxy transparent transmission mechanism according to claim 1, characterized in that, It also includes fault tolerance processing, including: The collaborative master station maintains an online state machine for each carbon metering module; If multiple communication attempts to a carbon metering module fail to time out within a calculation cycle, historical data filling is automatically enabled. The historical data filling uses the carbon flow density data of the previous effective cycle of the carbon metering module as the replacement value for this round and participates in the iterative calculation of its downstream neighboring nodes. Record the fault status of the faulty carbon metering module and continuously attempt to restore communication in subsequent calculation cycles.
9. The distributed carbon metering communication method based on a proxy transparent transmission mechanism according to claim 1, characterized in that, In the three-tier architecture: The iterative calculation of the carbon emission factor is performed by the local embedded processor of each carbon metering module; The collaborative master station uses a proxy pass-through mechanism to transfer carbon emission factor data and branch active power data between various carbon metering modules. The edge gateway performs communication protocol conversion and transparent transmission of carbon metering business data.
10. A distributed carbon metering communication system based on a proxy transparent transmission mechanism, characterized in that, The distributed carbon metering communication method based on the proxy transparent transmission mechanism as described in any one of claims 1 to 9 includes a collaborative master station layer, an edge gateway layer, and a distributed metering layer: The collaborative master station layer includes a virtual routing engine, a global time-series scheduler, and a dual topology mapping module. The virtual routing engine is used to execute a closed-loop operation consisting of proxy collection, virtual routing, and proxy writing, establishing a communication channel for physically isolated carbon metering modules. The global time-series scheduler is responsible for the full lifecycle management of the distributed algorithm. The dual topology mapping module is used to maintain dual information of physical topology and logical topology, and generate a routing mapping table for logically adjacent node pairs. The edge gateway layer includes a converged terminal or concentrator and a protocol conversion module; the converged terminal or concentrator is connected to the collaborative master station layer; the protocol conversion module performs protocol format conversion and transparent transmission of carbon metering business data; The distributed metering layer includes multiple carbon metering modules, each of which is equipped with a carbon emission flow iterative algorithm engine. This engine automatically triggers local carbon emission factor iterative calculations when new data is detected being written to the input buffer, and stores the calculation results in the output buffer.