Green power consumption classification accounting and right traceability method and system of multi-dimensional account

Through multi-dimensional account and distributed ledger technology, green power consumption data can be collected and accounted for real-time, solving the problems of inaccurate accounting and insufficient data security in traditional methods, and realizing accurate accounting of green power consumption and intelligent management of rights and interests.

CN119515411APending Publication Date: 2025-02-25STATE GRID DIGITAL TECHNOLOGY HOLDING CO LTD +1
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202411656746.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The traditional green power consumption accounting method cannot achieve real-time and accurate accounting, and the existing equity traceability system is susceptible to single point of failure and data tampering, and the classification method does not fully consider the power consumption characteristics and consumption patterns.

Method used

A multi-dimensional account green power consumption classification accounting and equity traceability method is adopted, and a distributed ledger node network is built by collecting electricity consumption data and power generation plan data in real time, and a distributed ledger node network is built, and the green power consumption weight coefficient is calculated based on smart contracts, and a green power equity certificate is generated.

Benefits of technology

It realizes accurate accounting of green power consumption, improves the credibility and transparency of transactions, and supports intelligent management and traceability of green power rights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515411A_ABST
    Figure CN119515411A_ABST
Patent Text Reader

Abstract

The invention provides a green power consumption classification accounting and right tracing method and system of a multi-dimensional account, and relates to the technical field of power, and the method comprises the steps: generating green power transaction matching data through collecting power utilization data and power generation plan data in real time; constructing a distributed account book node network, verifying the matched data, and generating a green power transaction block; and constructing a green power right traceability model based on the transaction block, calculating a green power consumption weight coefficient of the power consumption enterprise, and generating a green power consumption level and a right certificate. According to the invention, precise accounting and right traceability of green power consumption are realized, and the energy management efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to electric power technology, and in particular to a method and system for classifying and calculating green power consumption and tracing rights and interests of multi-dimensional accounts. Background Art

[0002] Traditional green power consumption accounting methods mainly rely on monthly or annual statistical data, which cannot achieve real-time and accurate green power consumption accounting. This rough accounting method is difficult to reflect the actual green power consumption of power users, and is not conducive to the refined management of green power trading.

[0003] Secondly, the existing green power rights and interests tracing system usually adopts a centralized data storage method, which is vulnerable to single point failure and data tampering. This method is difficult to ensure the authenticity and credibility of green power trading data, which is not conducive to the establishment of a fair and transparent green power trading market.

[0004] Finally, the current classification method of green electricity consumption is often too simplistic and fails to fully consider the electricity consumption characteristics and green electricity consumption patterns of different electricity users. This extensive classification method cannot accurately reflect the green electricity consumption level of electricity users and is not conducive to encouraging enterprises to increase the proportion of green electricity use. Summary of the invention

[0005] The embodiments of the present invention provide a method and system for classifying and calculating green electricity consumption and tracing rights and interests of multi-dimensional accounts, which can solve the problems in the prior art.

[0006] According to a first aspect of the embodiments of the present invention, Provides a multi-dimensional account-based green electricity consumption classification accounting and equity tracing method, including: Collect the electricity consumption data of the enterprise's electricity terminals in real time to generate an electricity load curve, obtain the power generation plan data of the green power production enterprise to generate a power generation load curve, match the electricity load curve with the power generation load curve in time dimension, and generate green power transaction matching data, the green power transaction matching data includes a green power production timestamp, a green power consumption timestamp, a green power production amount, and a green power consumption amount; Constructing a distributed ledger node network, the distributed ledger node network including a green power production enterprise node, a power grid dispatching node and a power user enterprise node, the distributed ledger node network receiving the green power transaction matching data, verifying the green power transaction matching data based on a preset consensus algorithm, and generating a green power transaction block, the green power transaction block including a green power production enterprise identifier, a green power type identifier, a power grid dispatching path identifier and a power user enterprise identifier; A green electricity rights and interests traceability model is constructed based on the green electricity trading block. The green electricity rights and interests traceability model automatically calculates the green electricity consumption weight coefficient of each electricity user through a smart contract, classifies the electricity users according to the green electricity consumption weight coefficient, generates a green electricity consumption grade, and generates a green electricity rights and interests certificate including the source of electricity, transmission and distribution path, and environmental benefits. The green electricity rights and interests certificate is pushed to the electricity user node through the blockchain network.

[0007] Matching the power consumption load curve with the power generation load curve in time dimension to generate green power transaction matching data includes: Collecting power load data of power terminals, discretizing the power load data according to a basic time unit of fifteen minutes to obtain a power load time series, wherein the power load time series includes power load values ​​corresponding to multiple time points; collecting green power generation plan data, discretizing the green power generation plan data according to the basic time unit to obtain a power generation load time series, wherein the power generation load time series includes power generation load values ​​corresponding to multiple time points; A distance matrix is ​​constructed based on the power load values ​​in the power load time series and the power generation load values ​​in the power generation load time series, wherein the matrix elements of the distance matrix are the Euclidean distances between the first time point in the power load time series and the second time point in the power generation load time series, and a time window constraint is set for the first time point, wherein the time window constraint limits the second time point to a time range of thirty minutes before and after the first time point; a cumulative distance matrix is ​​constructed based on the distance matrix, wherein the matrix elements of the cumulative distance matrix are calculated by a dynamic programming algorithm, and the initial condition of the dynamic programming algorithm is that the first matrix element of the cumulative distance matrix is ​​equal to the first matrix element of the distance matrix; An optimal path backtracking is performed in the cumulative distance matrix to obtain a matching sequence, and a load balancing constraint condition is determined based on the matching sequence. The load balancing constraint condition includes: the difference between the integral value of the electricity load and the integral value of the power generation load in the time period corresponding to the matching sequence does not exceed a preset threshold; when the difference exceeds the preset threshold, the time range of the time window constraint is adjusted to regenerate the distance matrix; and green power transaction matching data is generated based on the matching sequence that satisfies the load balancing constraint condition.

[0008] Constructing a distributed ledger node network, wherein the distributed ledger node network includes green power production enterprise nodes, power grid dispatching nodes, and power consumption enterprise nodes including: Construct a core ledger layer and an edge ledger layer, wherein the core ledger layer includes green power production enterprise nodes, power grid dispatching nodes and power consumption enterprise nodes, and the edge ledger layer includes smart meter nodes and distribution station nodes; the core ledger layer uses a Byzantine fault-tolerant consensus mechanism to reach consensus on power transaction data, and the Byzantine fault-tolerant consensus mechanism reaches data consensus through a pre-preparation phase, a preparation phase and a submission phase, and the edge ledger layer uses an authority proof consensus mechanism to reach consensus on power monitoring data; Based on the smart meter nodes and distribution station nodes in the edge ledger layer, power monitoring data is collected, the power monitoring data is batch packaged and processed according to a preset time window, and data summary information of the power monitoring data is generated; a node credit scoring model is established according to the online time, data accuracy and response time of the smart meter nodes and distribution station nodes, and a verification node is selected based on the node credit scoring model to verify the data summary information; The verified data summary information is submitted to the core ledger layer, and the green power production enterprise nodes, power grid dispatching nodes and power consumption enterprise nodes in the core ledger layer perform consensus confirmation on the data summary information; a cross-chain transaction record is generated based on the hash time lock contract, and the cross-chain transaction record includes the data summary information, node credit score and consensus confirmation information.

[0009] The method further comprises: Generate a Merkle tree containing multiple data blocks in the edge ledger layer, and submit the root node and proof path of the Merkle tree as an aggregate proof to the core ledger layer; the core ledger layer verifies the validity of the aggregate proof, generates status update information according to the verification result, and sends the status update information to the edge ledger layer to complete data synchronization; The power monitoring data in the edge ledger layer is stored in a hierarchical manner, the real-time power monitoring data is stored in a key-value database, and the historical power monitoring data is compressed and stored in a distributed storage system; the power transaction data in the core ledger layer is stored in a sharded manner, the power transaction data is divided into multiple data shards based on geographical regions and business types, and data synchronization is performed between different data shards through a status channel.

[0010] The distributed ledger node network receives the green power transaction matching data, verifies the green power transaction matching data based on a preset consensus algorithm, and generates a green power transaction block, including: Performing a repeatability check on the green power transaction matching data through a Bloom filter, and storing the green power transaction matching data that passes the check into a transaction pool; Based on the digital certificate, the power generation party information and the power user information in the green power transaction matching data are authenticated, and the green power production qualification in the power generation party information and the access qualification in the power user information are verified; according to the real-time operation status information of the power grid, the transaction power is matched and verified with the power generation capacity of the power generation enterprise and the available capacity of the power grid transmission channel; the rationality of the transaction price is verified based on the market benchmark price, and a transaction risk mark is generated according to the historical performance records of the two parties to the transaction; A verifiable random function algorithm is used to select a block generation node from the distributed ledger node network. The block generation node packages the verified green power transaction matching data to generate a transaction block including a block header and a block body. The block header includes a hash value of the previous block, a Merkle tree root, a timestamp, a difficulty target value, a random number, a total amount of electricity, and an average electricity price. The block body includes a transaction record list and verification proof data. Based on the Byzantine fault-tolerant algorithm, consensus processing is performed on the green power transaction matching data in the transaction block, and consensus processing is performed on the validity of the transaction block based on the proof-of-stake mechanism to generate a block consensus result; according to the block consensus result, the transaction block is added to the distributed ledger, and the power quota and fund balance of the two parties to the transaction are updated; The transaction block and the block consensus result are sent to a supervision node for storage, and the supervision node performs real-time supervision on green power transactions based on the transaction block and the block consensus result.

[0011] A green power equity traceability model is constructed based on the green power trading block. The green power equity traceability model automatically calculates the green power consumption weight coefficient of each power user through a smart contract, classifies the power users according to the green power consumption weight coefficient, and generates green power consumption levels including: Extracting the total transaction volume, transaction frequency, green electricity ratio, peak-valley distribution, and transaction price information of the power users from the green power transaction block, and standardizing the total transaction volume, transaction frequency, green electricity ratio, peak-valley distribution, and transaction price information to generate standardized data; Calculate the basic weight of the power user based on the standardized data, the basic weight includes green power utilization rate, time continuity, load stability, and contract fulfillment rate; calculate the adjustment coefficient based on the basic weight, the adjustment coefficient includes peak-valley responsiveness, carbon emission reduction contribution, regional factors, and industry characteristics; calculate the comprehensive weight coefficient of the power user based on the basic weight and the adjustment coefficient; The comprehensive weight coefficient is compared with the preset grade threshold to generate the green electricity consumption grade of the electricity user, and the green electricity consumption grade includes excellent grade, good grade, good grade, up-to-standard grade and improved grade; a rating certificate containing enterprise information, rating cycle, green electricity usage data, weight calculation process and rating results is generated based on the smart contract; When the change in the green electricity usage rate of an electricity user in a single month exceeds the preset threshold, the instant rating update mechanism is triggered to recalculate the comprehensive weight coefficient of the electricity user and update the green electricity consumption level of the electricity user; Receive the rating review application from the electricity user, call the standardized data, the basic weight, the adjustment coefficient, and the comprehensive weight coefficient based on the smart contract to perform automatic review, and generate a rating review result; record the rating review result in the blockchain.

[0012] According to a second aspect of the embodiments of the present invention, Provides a multi-dimensional account-based green electricity consumption classification accounting and equity tracing system, including: The first unit is used to collect the power consumption data of the enterprise power consumption terminal in real time to generate a power consumption load curve, and obtain the power generation plan data of the green power production enterprise to generate a power generation load curve, match the power consumption load curve with the power generation load curve in time dimension, and generate green power transaction matching data, wherein the green power transaction matching data includes a green power production timestamp, a green power consumption timestamp, a green power production amount, and a green power consumption amount; The second unit is used to construct a distributed ledger node network, the distributed ledger node network includes a green power production enterprise node, a power grid dispatching node and a power user enterprise node, the distributed ledger node network receives the green power transaction matching data, verifies the green power transaction matching data based on a preset consensus algorithm, and generates a green power transaction block, the green power transaction block includes a green power production enterprise identifier, a green power type identifier, a power grid dispatching path identifier and a power user enterprise identifier; The third unit is used to build a green electricity rights and interests traceability model based on the green electricity trading block. The green electricity rights and interests traceability model automatically calculates the green electricity consumption weight coefficient of each electricity user through a smart contract, classifies the electricity users according to the green electricity consumption weight coefficient, generates a green electricity consumption level, and generates a green electricity rights and interests certificate including the source of electricity, transmission and distribution path, and environmental benefits. The green electricity rights and interests certificate is pushed to the electricity user node through the blockchain network.

[0013] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0014] According to a fourth aspect of the embodiments of the present invention, A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0015] The beneficial effects of this application are as follows: 1. Accurate accounting of green electricity consumption: By collecting electricity consumption data and power generation plan data in real time and matching them in the time dimension, green power transaction matching data is generated. This method can accurately reflect the production and consumption of green power, achieve accurate accounting of green power consumption, and provide enterprises with reliable green power usage data.

[0016] 2. Improve the credibility and transparency of green power trading: The node network is built using distributed ledger technology to verify the green power transaction matching data and generate transaction blocks. This process enhances the credibility and transparency of green power transactions, effectively prevents data tampering, and provides reliable technical support for green power transactions.

[0017] 3. Realize intelligent management and traceability of green power rights and interests: By building a green power rights traceability model, using smart contracts to automatically calculate consumption weight coefficients, classifying power users and generating consumption levels. At the same time, a green power rights certificate containing detailed information is generated and pushed to power users through the blockchain network. This method realizes the intelligent management and full traceability of green power rights, which helps to improve the efficiency and traceability of green power transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flow chart of a method for classifying and calculating green power consumption and tracing rights and interests of a multi-dimensional account in an embodiment of the present invention; Figure 2 This is a structural diagram of the green electricity consumption classification accounting and rights and interests tracing system of the multi-dimensional account according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0020] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0021] Figure 1 : is a flow chart of a method for classifying and calculating green power consumption and tracing rights and interests of a multi-dimensional account according to an embodiment of the present invention, such as Figure 1 As shown, the method includes: S101. Collect the power consumption data of the enterprise power consumption terminal in real time to generate a power consumption load curve, obtain the power generation plan data of the green power production enterprise to generate a power generation load curve, match the power consumption load curve with the power generation load curve in time dimension, and generate green power transaction matching data, wherein the green power transaction matching data includes a green power production timestamp, a green power consumption timestamp, a green power production amount, and a green power consumption amount; S102. Construct a distributed ledger node network, the distributed ledger node network includes a green power production enterprise node, a power grid dispatching node and a power user enterprise node, the distributed ledger node network receives the green power transaction matching data, verifies the green power transaction matching data based on a preset consensus algorithm, and generates a green power transaction block, the green power transaction block includes a green power production enterprise identifier, a green power type identifier, a power grid dispatching path identifier and a power user enterprise identifier; S103. A green electricity rights and interests traceability model is constructed based on the green electricity trading block. The green electricity rights and interests traceability model automatically calculates the green electricity consumption weight coefficient of each electricity user through a smart contract, classifies the electricity users according to the green electricity consumption weight coefficient, generates a green electricity consumption level, and generates a green electricity rights and interests certificate including the source of electricity, transmission and distribution path, and environmental benefits. The green electricity rights and interests certificate is pushed to the electricity user node through the blockchain network.

[0022] This method first generates a power load curve by collecting power consumption data from the enterprise's power terminals in real time. Specifically, smart meters can be installed on each power-consuming device of the enterprise, and the power consumption data of each device can be collected in real time through the Internet of Things technology, including parameters such as voltage, current, and power. The collected data are arranged in chronological order to obtain the overall power load curve of the enterprise. For example, the power load curve of a manufacturing enterprise within 24 hours may show the characteristics of high power consumption during working hours and low power consumption at night.

[0023] At the same time, the power generation plan data of green power production enterprises is obtained to generate the power generation load curve. The power generation plans of green power production enterprises such as wind farms and photovoltaic power stations can be obtained from the power dispatch center, and the power generation load curve can be drawn according to the planned power generation data. For example, the power generation load curve of a photovoltaic power station presents an inverted "U" shape during the day, and the power generation is zero at night.

[0024] Next, the power load curve is matched with the power generation load curve in the time dimension to generate green power transaction matching data. Specifically, the two curves can be compared in the same coordinate system to find the part where the power generation and power consumption overlap in time, and the corresponding timestamp, power data and other information can be recorded. For example, in a certain hour, the photovoltaic power station generates 100 kWh of electricity and the manufacturing enterprise consumes 80 kWh of electricity, then 80 kWh of green power transactions can be matched.

[0025] Then, a distributed ledger node network is constructed, including nodes of green power production enterprises, power grid dispatching nodes, and power consumption enterprise nodes. Each node is an independent computing unit that can store transaction data, verify transactions, and generate new blocks. The nodes are connected through a P2P network to jointly maintain the consistency of the entire ledger.

[0026] The distributed ledger node network receives the green power transaction matching data generated in the previous step and verifies the data based on the preset consensus algorithm. The consensus algorithm can use proof of work (PoW), proof of stake (PoS), etc. to ensure that all nodes reach a consensus on the transaction data. After verification, a green power transaction block containing transaction information is generated and broadcast to all nodes in the network.

[0027] Each green power transaction block contains information such as the green power production enterprise identification, green power type identification, grid dispatch path identification, and power consumption enterprise identification. For example, a block may record a transaction in which a photovoltaic power station numbered G001 supplies 100 kWh of photovoltaic power to a manufacturing enterprise numbered U001 through a 110 kV transmission line.

[0028] Based on the generated green power transaction blocks, a green power rights and interests traceability model is constructed. The model is deployed in the blockchain network through smart contracts and can automatically execute the preset business logic. Smart contracts read the transaction data on the blockchain and calculate the green power consumption of each power user.

[0029] Specifically, the smart contract can count the total amount of green electricity consumed by each electricity-consuming enterprise within a certain period (such as one month), as well as the proportion of green electricity consumption to its total electricity consumption, and calculate the green electricity consumption weight coefficient accordingly. For example, if a company's total electricity consumption in a month is 10,000 kWh, of which green electricity consumption is 2,000 kWh, then its green electricity consumption weight coefficient is 20%.

[0030] According to the calculated green power consumption weight coefficient, the smart contract can classify the power users and generate the green power consumption level. For example, the following levels can be set: A (weight coefficient greater than 50%), B (30%-50%), C (10%-30%), D (less than 10%). This classification can intuitively reflect the green power consumption level of the enterprise.

[0031] Finally, the smart contract generates a green power rights certificate for each power user based on the transaction data recorded on the blockchain, including the power source, transmission and distribution path, and environmental benefits. The certificate records in detail the specific source of the green power consumed by the enterprise (such as a wind farm), the power transmission path, the reduced carbon emissions, and other information. These certificates are pushed to the nodes of each power user through the blockchain network, and the enterprise can view and verify its own green power consumption at any time.

[0032] The beneficial effects of this method include: 1. Accurate accounting and real-time tracking of green electricity consumption are achieved. By collecting real-time electricity consumption data through smart meters and combining it with green electricity production data, the production and consumption of green electricity can be accurately matched, avoiding the statistical errors and lags that may exist in traditional methods.

[0033] 2. Improved transparency and credibility of green power transactions. Using blockchain technology to build a distributed ledger, transaction data cannot be tampered with and is visible to the entire network, effectively preventing data falsification and enhancing the trust of all market parties in green power transactions.

[0034] 3. It provides strong support for the green transformation of enterprises. Through the green electricity consumption rating and the issuance of equity certificates, enterprises can be encouraged to actively increase the proportion of green electricity use and promote the development of the entire society towards low-carbonization.

[0035] In an optional implementation, matching the power load curve with the power generation load curve in time dimension to generate green power transaction matching data includes: Collecting power load data of power terminals, discretizing the power load data according to a basic time unit of fifteen minutes to obtain a power load time series, wherein the power load time series includes power load values ​​corresponding to multiple time points; collecting green power generation plan data, discretizing the green power generation plan data according to the basic time unit to obtain a power generation load time series, wherein the power generation load time series includes power generation load values ​​corresponding to multiple time points; A distance matrix is ​​constructed based on the power load values ​​in the power load time series and the power generation load values ​​in the power generation load time series, wherein the matrix elements of the distance matrix are the Euclidean distances between the first time point in the power load time series and the second time point in the power generation load time series, and a time window constraint is set for the first time point, wherein the time window constraint limits the second time point to a time range of thirty minutes before and after the first time point; a cumulative distance matrix is ​​constructed based on the distance matrix, wherein the matrix elements of the cumulative distance matrix are calculated by a dynamic programming algorithm, and the initial condition of the dynamic programming algorithm is that the first matrix element of the cumulative distance matrix is ​​equal to the first matrix element of the distance matrix; An optimal path backtracking is performed in the cumulative distance matrix to obtain a matching sequence, and a load balancing constraint condition is determined based on the matching sequence. The load balancing constraint condition includes: the difference between the integral value of the electricity load and the integral value of the power generation load in the time period corresponding to the matching sequence does not exceed a preset threshold; when the difference exceeds the preset threshold, the time range of the time window constraint is adjusted to regenerate the distance matrix; and green power transaction matching data is generated based on the matching sequence that satisfies the load balancing constraint condition.

[0036] This embodiment provides a method for generating green power transaction matching data. The method first collects power load data and green power generation plan data of power terminals, and discretizes these two types of data to obtain power load time series and power generation load time series.

[0037] Specifically, the power load data of the power terminal can be collected in real time through smart meters or load monitoring equipment. The collected continuous power data is discretized according to 15 minutes as the basic time unit to obtain the power load time series. For example, the average power consumption of a power terminal in the three time periods of 8:00-8:15, 8:15-8:30, and 8:30-8:45 is 100kW, 120kW, and 110kW respectively, and the power load time series [100, 120, 110] can be obtained.

[0038] Similarly, when collecting green power generation plan data, we can obtain the power generation plan data for the next 24 hours from the power generation company. Discretize the continuous power generation plan data into 15 minutes as the basic time unit to obtain the power generation load time series. For example, if a green power generation company plans to generate 90kW, 100kW, and 120kW in the three time periods of 8:00-8:15, 8:15-8:30, and 8:30-8:45, respectively, the power generation load time series [90, 100, 120] can be obtained.

[0039] Next, a distance matrix is ​​constructed based on the power load time series and the power generation load time series. Each element of the distance matrix represents the Euclidean distance between a time point in the power load time series and a time point in the power generation load time series. When calculating the distance, a time window constraint is set for each time point in the power load time series, and the matching time point in the power generation load time series is limited to 30 minutes before and after the time point.

[0040] For example, for the above power load time series [100, 120, 110] and power generation load time series [90,100, 120], calculate the distance between the power load 100kW in the time period of 8:00-8:15 and each time point in the power generation load time series: The distance from 90kW at 8:00-8:15 is |100-90|=10; The distance from 100kW at 8:15-8:30 is |100-100|=0; The distance from 120kW at 8:30-8:45 is |100-120|=20; The distances of other time points are calculated in the same way to obtain the distance matrix.

[0041] Then, a cumulative distance matrix is ​​constructed based on the distance matrix. Each element of the cumulative distance matrix is ​​calculated by a dynamic programming algorithm. The initial condition of the dynamic programming algorithm is that the first element of the cumulative distance matrix is ​​equal to the first element of the distance matrix. The calculation of subsequent elements takes into account the minimum cumulative distance from the starting point to the current point.

[0042] For example, for the distance matrix above, the first element of the cumulative distance matrix is ​​10. When calculating the second row and first column element, consider the two paths from (1,1) to (2,1) and from (1,2) to (2,1), and take the one with the smaller cumulative distance. Similarly, calculate other elements to obtain the cumulative distance matrix.

[0043] The optimal path is backtracked in the cumulative distance matrix to obtain the matching sequence. Starting from the lower right corner of the matrix, the adjacent element with the smallest cumulative distance is selected as the previous matching point each time until it is backtracked to the upper left corner to obtain a complete matching sequence.

[0044] Determine the load balance constraint condition based on the matching sequence. Calculate the difference between the power load integral value and the power generation load integral value during the time period corresponding to the matching sequence. If the difference does not exceed a preset threshold (e.g., 5%), the load balance constraint condition is considered to be met.

[0045] If the difference exceeds the preset threshold, it is necessary to adjust the range of the time window constraint, for example, expand the 30 minutes before and after to 45 minutes before and after, and then regenerate the distance matrix and repeat the subsequent steps until the load balance constraint is met.

[0046] Finally, the green power transaction matching data is generated based on the matching sequence that meets the load balance constraint conditions. The matching data includes the power load at each time point, the corresponding power generation load, and the matching time offset.

[0047] The beneficial effects of this method include: 1. Through time dimension matching, the precise correspondence between electricity load and green power generation load is achieved, and the matching accuracy of green power trading is improved.

[0048] 2. The introduction of time window constraints and load balance constraints ensures the rationality and reliability of the matching results and avoids unreasonable long-distance matching.

[0049] 3. The dynamic programming algorithm is used to search for the optimal path, which improves the efficiency of the matching process and is suitable for large-scale power trading scenarios.

[0050] In an optional implementation, a distributed ledger node network is constructed, wherein the distributed ledger node network includes green power production enterprise nodes, power grid dispatching nodes, and power consumption enterprise nodes, including: Construct a core ledger layer and an edge ledger layer, wherein the core ledger layer includes green power production enterprise nodes, power grid dispatching nodes and power consumption enterprise nodes, and the edge ledger layer includes smart meter nodes and distribution station nodes; the core ledger layer uses a Byzantine fault-tolerant consensus mechanism to reach consensus on power transaction data, and the Byzantine fault-tolerant consensus mechanism reaches data consensus through a pre-preparation phase, a preparation phase and a submission phase, and the edge ledger layer uses an authority proof consensus mechanism to reach consensus on power monitoring data; Based on the smart meter nodes and distribution station nodes in the edge ledger layer, power monitoring data is collected, the power monitoring data is batch packaged and processed according to a preset time window, and data summary information of the power monitoring data is generated; a node credit scoring model is established according to the online time, data accuracy and response time of the smart meter nodes and distribution station nodes, and a verification node is selected based on the node credit scoring model to verify the data summary information; The verified data summary information is submitted to the core ledger layer, and the green power production enterprise nodes, power grid dispatching nodes and power consumption enterprise nodes in the core ledger layer perform consensus confirmation on the data summary information; a cross-chain transaction record is generated based on the hash time lock contract, and the cross-chain transaction record includes the data summary information, node credit score and consensus confirmation information.

[0051] This embodiment provides a green power trading method based on a distributed ledger, and the specific steps are as follows: First, a distributed ledger node network is constructed, including the core ledger layer and the edge ledger layer. The core ledger layer includes green power production enterprise nodes, power grid dispatching nodes, and power user enterprise nodes. The edge ledger layer includes smart meter nodes and distribution station nodes.

[0052] The core ledger layer uses the Byzantine fault-tolerant consensus mechanism to reach consensus on power trading data. Specifically, the Byzantine fault-tolerant consensus mechanism reaches data consensus through the pre-preparation phase, the preparation phase, and the submission phase. In the pre-preparation phase, the master node broadcasts the pre-preparation message; in the preparation phase, each node broadcasts the preparation message and collects the preparation messages of other nodes; in the submission phase, each node broadcasts the submission message and waits for a sufficient number of submission messages. When the submission messages of more than 2 / 3 of the nodes are received, the consensus is reached.

[0053] The edge ledger layer uses the authority proof consensus mechanism to reach consensus on power monitoring data. Specifically, the node with the highest credit score is selected as the verification node, which verifies the data and broadcasts the verification results, and other nodes receive and confirm the verification results.

[0054] Next, the power monitoring data is collected based on the smart meter nodes and distribution station nodes in the edge ledger layer. For example, the smart meter collects power consumption data every 15 minutes, and the distribution station collects operating parameters such as voltage and current every hour. The collected power monitoring data is batch packaged according to the preset time window (such as 1 hour) to generate data summary information of the power monitoring data. The data summary information includes statistical features such as data collection time, data type, data volume, average value, maximum value, minimum value, etc.

[0055] Then, a node credit scoring model is established based on the online time, data accuracy and response time of smart meter nodes and distribution station nodes. Specifically, nodes with longer online time, higher data accuracy and shorter response time receive higher credit scores. Based on the node credit scoring model, the node with the highest credit score is selected as the verification node to verify the data summary information. The verification process includes checking the data format, value range, time continuity, etc.

[0056] The verified data summary information is submitted to the core ledger layer, and the green power production enterprise nodes, power grid dispatching nodes and power consumption enterprise nodes in the core ledger layer confirm the data summary information through consensus. The consensus confirmation process adopts the aforementioned Byzantine fault-tolerant consensus mechanism.

[0057] Finally, a cross-chain transaction record is generated based on the hash time lock contract. The cross-chain transaction record includes data summary information, node credit score, and consensus confirmation information. Specifically, a hash lock transaction containing data summary information and node credit score is first generated at the edge ledger layer, and the unlocking time is set to 24 hours. Then a hash lock transaction containing consensus confirmation information is generated at the core ledger layer, and the unlocking condition is the hash value of the edge ledger layer transaction. When both transactions are confirmed, the cross-chain transaction is completed.

[0058] The beneficial effects of this embodiment include: 1. A two-layer distributed ledger structure consisting of a core ledger layer and an edge ledger layer was constructed to achieve hierarchical management of power trading data and monitoring data, improving the scalability and efficiency of the system.

[0059] 2. The combination of Byzantine fault-tolerant consensus mechanism and authority proof consensus mechanism not only ensures the security of core transaction data, but also improves the processing efficiency of edge monitoring data.

[0060] 3. Through the node credit scoring model and hash time lock contract, the trusted transmission and transaction of cross-chain data is realized, and the data interoperability and consistency between different levels of ledgers are enhanced.

[0061] In an optional embodiment, the method further includes: Generate a Merkle tree containing multiple data blocks in the edge ledger layer, and submit the root node and proof path of the Merkle tree as an aggregate proof to the core ledger layer; the core ledger layer verifies the validity of the aggregate proof, generates status update information according to the verification result, and sends the status update information to the edge ledger layer to complete data synchronization; The power monitoring data in the edge ledger layer is stored in a hierarchical manner, the real-time power monitoring data is stored in a key-value database, and the historical power monitoring data is compressed and stored in a distributed storage system; the power transaction data in the core ledger layer is stored in a sharded manner, the power transaction data is divided into multiple data shards based on geographical regions and business types, and data synchronization is performed between different data shards through a status channel.

[0062] When generating a Merkle tree containing multiple data blocks in the edge ledger layer, the power monitoring data is first preprocessed and divided into blocks. The original data is divided into fixed-size data blocks according to dimensions such as timestamps or data types, such as hourly power load data as a data block. A hash value is calculated for each data block as a leaf node of the Merkle tree. Then the hash values ​​of adjacent leaf nodes are paired, and a new hash value is calculated as the parent node, and so on until the root node is generated. At the same time, the path from each node to the root node is recorded as a Merkle proof.

[0063] For example, the power load data of a distribution station for one day can be divided into 24 hour blocks, generating a Merkle tree containing 24 leaf nodes. The leaf node hash values ​​are H1-H24, the first-level parent node hash values ​​are H12=Hash(H1+H2), H34=Hash(H3+H4), etc., and finally the root node hash value is HR=Hash(H1234+H5678). The path from H1 to HR is the Merkle proof of H1.

[0064] Submit the Merkle tree root node hash value HR and the proof path to the core ledger layer. The core layer first verifies whether HR is consistent with the latest root node stored locally. If they are consistent, the verification is successful; if they are inconsistent, the root node hash value is recalculated using the proof path and compared with the submitted HR. After the verification is successful, the locally stored root node status is updated according to HR, and the status update information containing the new root node hash value is generated and sent to the edge layer to complete data synchronization.

[0065] In the edge ledger layer, the power monitoring data is stored and processed in a hierarchical manner. The real-time power load, voltage and other data in the last 24 hours are stored in key-value databases such as Redis for fast reading and real-time analysis. The historical data from 24 hours ago is compressed using algorithms such as gzip, and then stored in distributed file systems such as Hadoop HDFS to save storage space. For example, the real-time load data (time, load value) of a distribution station is stored as a hash structure in Redis, with the key being stationId:load:date, the field being hour, and the value being the load value. The historical data is compressed and packaged by month and stored in the / power / load / {year} / {month} / directory of HDFS.

[0066] In the core ledger layer, the power transaction data is stored and processed in shards. Based on geographical regions, the data is divided into regional shards such as Northeast China, North China, and East China. Each regional shard is further divided into sub-shards according to business types such as residential electricity consumption and industrial electricity consumption. Data synchronization is carried out between different shards through state channels. For example, a dedicated state channel is established between the industrial electricity transaction shard in the East China region and the industrial electricity transaction shard in the North China region to regularly synchronize the status changes of key data such as user registration and electricity volume transactions.

[0067] The beneficial effects of this method include: 1. Improved data verification and synchronization efficiency. Through the Merkle tree aggregation proof mechanism, the integrity of large amounts of data can be quickly verified, reducing the amount of data transmission between the core layer and the edge layer.

[0068] 2. Optimized data storage and processing performance. The hierarchical storage strategy makes real-time data query faster and historical data storage more space-efficient. Sharded storage improves the processing capacity and scalability of massive transaction data.

[0069] 3. Enhanced system security and reliability. Merkel proof can effectively prevent data tampering, distributed storage improves data fault tolerance, and state channels ensure data consistency between different regions.

[0070] In an optional implementation, the distributed ledger node network receives the green power transaction matching data, verifies the green power transaction matching data based on a preset consensus algorithm, and generates a green power transaction block, including: Performing a repeatability check on the green power transaction matching data through a Bloom filter, and storing the green power transaction matching data that passes the check into a transaction pool; Based on the digital certificate, the power generation party information and the power user information in the green power transaction matching data are authenticated, and the green power production qualification in the power generation party information and the access qualification in the power user information are verified; according to the real-time operation status information of the power grid, the transaction power is matched and verified with the power generation capacity of the power generation enterprise and the available capacity of the power grid transmission channel; the rationality of the transaction price is verified based on the market benchmark price, and a transaction risk mark is generated according to the historical performance records of the two parties to the transaction; A verifiable random function algorithm is used to select a block generation node from the distributed ledger node network. The block generation node packages the verified green power transaction matching data to generate a transaction block including a block header and a block body. The block header includes a hash value of the previous block, a Merkle tree root, a timestamp, a difficulty target value, a random number, a total amount of electricity, and an average electricity price. The block body includes a transaction record list and verification proof data. Based on the Byzantine fault-tolerant algorithm, consensus processing is performed on the green power transaction matching data in the transaction block, and consensus processing is performed on the validity of the transaction block based on the proof-of-stake mechanism to generate a block consensus result; according to the block consensus result, the transaction block is added to the distributed ledger, and the power quota and fund balance of the two parties to the transaction are updated; The transaction block and the block consensus result are sent to a supervision node for storage, and the supervision node performs real-time supervision on green power transactions based on the transaction block and the block consensus result.

[0071] In a specific implementation, after the distributed ledger node network receives the green power transaction matching data, the process of verifying the data based on a preset consensus algorithm and generating a green power transaction block includes the following steps: First, the received green power transaction matching data is checked for duplication. Specifically, a Bloom filter is used to quickly check the data for duplication. The Bloom filter is a probabilistic data structure with high space efficiency, which is used to determine whether an element belongs to a set. In this embodiment, the Bloom filter maintains an m-bit bit array, which is initially set to 0. K independent hash functions are calculated for each transaction data, and the results are mapped to k positions in the bit array and set to 1. During detection, if a new transaction data is mapped by the same k hash functions, and the corresponding k positions are all 1, it may be duplicate data; otherwise it must be new data. In this way, most of the duplicate transactions can be quickly filtered out, and the detected transaction data is stored in the transaction pool for subsequent processing.

[0072] Next, the green power transaction matching data in the trading pool is authenticated and the qualifications are reviewed. Specifically, the information of the power generator and the power user is authenticated based on the digital certificate. The digital certificate adopts the PKI (Public Key Infrastructure) system, which contains the user's public key, identity information, and the signature of the certificate authority (CA). During verification, first check whether the certificate is within the validity period, then verify the validity of the CA signature, and finally extract the public key to verify the user signature. For transactions that pass identity authentication, further verify the green power production qualifications of the power generator and the access qualifications of the power user. For example, check whether the power generator holds a valid renewable energy power generation license and whether the power user meets the access conditions for green power trading.

[0073] Then, according to the real-time operation status information of the power grid, the transaction power is matched and verified with the power generation capacity of the power generation enterprise and the available capacity of the power grid transmission channel. Specifically, the current available power generation capacity of the power generation enterprise and the available transmission capacity of the key transmission channel are obtained from the power grid dispatching system. For each transaction, check whether the remaining available power generation of the power generation enterprise meets the transaction power, and whether there is enough remaining capacity in the transmission channel from the power generation point to the power consumption point. Only transactions that meet these two conditions can pass the verification. For example, the power generation party of a transaction is wind farm A, the power consumption party is factory B, and the transaction power is 1 million kWh. During the verification, it was found that the current remaining available power generation of wind farm A is 1.5 million kWh, which meets the transaction requirements; but the remaining available capacity of the transmission channel from A to B is only 800,000 kWh, which cannot meet the transmission requirements, so the transaction failed to pass the verification.

[0074] Next, the rationality of the transaction price is verified and a transaction risk mark is generated. Specifically, the market benchmark price is first obtained. For example, the weighted average price of the same type of transactions in the past 7 days can be used as a benchmark. The transaction price is compared with the benchmark price. If the deviation exceeds the preset threshold (such as ±20%), it is marked as an abnormal price transaction. At the same time, a transaction risk mark is generated based on the historical performance records of both parties to the transaction. For example, the number of defaults of both parties in the past year can be counted, and the risk level can be divided into three levels: low, medium, and high according to the number of defaults. The transaction risk mark finally generated includes a price anomaly mark and a performance risk level.

[0075] After completing the above verification, the Verifiable Random Function (VRF) algorithm is used to select a block generation node from the distributed ledger node network. The VRF algorithm generates a pseudo-random number and a corresponding proof based on a private key and an input value (such as the current timestamp). Each node in the network independently calculates its own VRF output, and the node with the smallest output value is selected as the block generation node. The selected block generation node packages and processes the verified green power transaction matching data to generate a transaction block. The block consists of two parts: a block header and a block body. The block header includes information such as the hash value of the previous block, the Merkle tree root, a timestamp, a difficulty target value, a random number, the total electricity volume, and the average electricity price. The block body contains a list of transaction records and verification proof data. Among them, the transaction records are organized in a Merkle tree structure, which can efficiently verify the integrity and existence of the transaction.

[0076] After the transaction block is generated, the green power transaction matching data in the block is processed by consensus based on the Byzantine Fault Tolerance (BFT) algorithm. The BFT algorithm can reach consensus in the presence of a small number of malicious nodes. The specific process includes: the block generation node broadcasts the block proposal; other nodes verify the validity of the block, and if it is valid, broadcast the pre-voting message; the node that receives more than 2 / 3 of the pre-votes broadcasts the pre-submission message; the node that receives more than 2 / 3 of the pre-submissions considers that a consensus has been reached. At the same time, the validity of the transaction block is processed by consensus based on the Proof of Stake (PoS) mechanism. In PoS, the voting weight of the node is proportional to the number of tokens it stakes. In this way, it is ensured that the blocks recognized by the majority of honest nodes can eventually reach a consensus.

[0077] According to the block consensus result, the transaction block is added to the distributed ledger, and the power quota and fund balance of both parties are updated. Specifically, for each transaction in the block, the corresponding amount of electricity is deducted from the power generator's account, and the amount of electricity is increased in the power user's account; at the same time, the fund balance of both parties is adjusted according to the transaction amount. For example, if the power amount of a transaction is 1 million kWh and the unit price is 0.5 yuan / kWh, then 1 million kWh of electricity is deducted from the power generator's account and 500,000 yuan of funds are added; 1 million kWh of electricity is added to the power user's account and 500,000 yuan of funds are deducted.

[0078] Finally, the transaction blocks and block consensus results are sent to the supervision node for storage. The supervision node supervises green power transactions in real time based on the received information. Specifically, the supervision node can analyze transaction data in real time and monitor abnormal transaction behaviors, such as frequent transactions and large transactions. At the same time, combined with the grid operation data, the actual execution of green power is monitored to ensure that the transaction volume is effectively fulfilled. In addition, the supervision node can also regularly generate market analysis reports to provide data support for policy formulation and market planning.

[0079] The beneficial effects of this program are mainly reflected in the following three aspects: First, the decentralized and transparent green power transactions are achieved through distributed ledger technology. Transaction information is recorded on the tamper-proof blockchain, ensuring the authenticity and traceability of the data. At the same time, the consensus mechanism ensures the fairness of transactions and the security of the system, effectively preventing single-point evil.

[0080] Secondly, the use of multiple verification mechanisms improves the reliability and security of transactions. Through verification in multiple dimensions such as identity authentication, qualification review, and grid constraint inspection, the qualifications of the entities participating in the transaction and the enforceability of the transaction are ensured. The price rationality verification and risk marking mechanism help prevent market risks and protect the interests of transaction participants.

[0081] Finally, the introduction of regulatory nodes enables effective supervision of green power transactions. Regulatory nodes can obtain transaction information in real time, detect and handle abnormal situations in a timely manner, and ensure the healthy and orderly operation of the market. This blockchain-based regulatory approach not only ensures the timeliness and effectiveness of supervision, but also does not affect the decentralized nature of the market, providing strong support for the healthy development of the green power market.

[0082] In an optional implementation, a green power equity traceability model is constructed based on the green power trading block, and the green power equity traceability model automatically calculates the green power consumption weight coefficient of each power user through a smart contract, and classifies the power users according to the green power consumption weight coefficient to generate a green power consumption level including: Extracting the total transaction volume, transaction frequency, green electricity ratio, peak-valley distribution, and transaction price information of the power users from the green power transaction block, and standardizing the total transaction volume, transaction frequency, green electricity ratio, peak-valley distribution, and transaction price information to generate standardized data; Calculate the basic weight of the power user based on the standardized data, the basic weight includes green power utilization rate, time continuity, load stability, and contract fulfillment rate; calculate the adjustment coefficient based on the basic weight, the adjustment coefficient includes peak-valley responsiveness, carbon emission reduction contribution, regional factors, and industry characteristics; calculate the comprehensive weight coefficient of the power user based on the basic weight and the adjustment coefficient; The comprehensive weight coefficient is compared with the preset grade threshold to generate the green electricity consumption grade of the electricity user, and the green electricity consumption grade includes excellent grade, good grade, good grade, up-to-standard grade and improved grade; a rating certificate containing enterprise information, rating cycle, green electricity usage data, weight calculation process and rating results is generated based on the smart contract; When the change in the green electricity usage rate of an electricity user in a single month exceeds the preset threshold, the instant rating update mechanism is triggered to recalculate the comprehensive weight coefficient of the electricity user and update the green electricity consumption level of the electricity user; Receive the rating review application from the electricity user, call the standardized data, the basic weight, the adjustment coefficient, and the comprehensive weight coefficient based on the smart contract to perform automatic review, and generate a rating review result; record the rating review result in the blockchain.

[0083] This embodiment provides a method for constructing a green power equity traceability model based on blockchain. The method first extracts key transaction information of power users from the green power transaction block, including total transaction volume, transaction frequency, green power ratio, peak-valley distribution, and transaction price. These raw data are standardized to generate a standardized data set.

[0084] The standardization process uses the maximum and minimum value standardization method. Taking the total transaction volume as an example, assuming that the total transaction volume of a certain enterprise during the evaluation period is 10,000 MWh, the maximum value of this indicator is 50,000 MWh, and the minimum value is 1,000 MWh. Then the standardized value of the total transaction volume of the enterprise is (10,000-1,000) / (50,000-1,000)=0.18. Other indicators are standardized using similar methods to obtain standardized values ​​between 0 and 1.

[0085] Next, the basic weights of electricity users are calculated based on standardized data. The basic weights include four indicators: green electricity utilization rate, time continuity, load stability, and contract fulfillment rate.

[0086] Green electricity utilization rate reflects the extent to which enterprises use green electricity, and is calculated as the proportion of green electricity trading volume to total electricity consumption. Time continuity reflects the long-term and stable use of green electricity by enterprises, and is measured by the ratio of the number of consecutive trading months to the evaluation period. Load stability reflects the stability of the enterprise's electricity load, and is characterized by the coefficient of variation of the electricity load. The contract fulfillment rate reflects the company's fulfillment of the green electricity trading contract, and is calculated by the ratio of actual transaction electricity to contract electricity.

[0087] Take a certain enterprise as an example, assuming that its green electricity utilization rate is 30%, it has been traded for 10 consecutive months, the evaluation period is 12 months, the coefficient of variation of electricity load is 0.2, and the ratio of actual transaction electricity to contract electricity is 95%. Then the four basic weights are: 0.3, 0.83, 0.8, and 0.95 respectively.

[0088] On the basis of calculating the basic weights, the adjustment coefficients are further considered, including peak-valley responsiveness, carbon emission reduction contribution, regional factors and industry characteristics. Peak-valley responsiveness reflects the enthusiasm of enterprises to participate in the peak regulation of the power grid and is calculated by the peak-valley electricity ratio. Carbon emission reduction contribution considers the carbon emission reduction effect brought by the use of green electricity by enterprises and is proportional to the amount of green electricity used. Regional factors reflect the policy orientation of different regions and are formulated by local governments. Industry characteristics consider the electricity consumption characteristics of different industries, such as high-energy-consuming industries and high-tech industries.

[0089] Taking the above enterprise as an example, assuming that its peak-to-valley electricity ratio is 1.5, its annual carbon emission reduction is 5,000 tons, its regional factor is 1.1, and its industry characteristic coefficient is 0.9, the four adjustment coefficients are 1.5, 1.2, 1.1, and 0.9 respectively.

[0090] The calculation of the comprehensive weight coefficient takes into account the basic weight and the adjustment coefficient. The basic weight and the adjustment coefficient are assigned different weights respectively by weighted average, such as 60% for the basic weight and 40% for the adjustment coefficient. For the above-mentioned enterprise, the calculation result of its comprehensive weight coefficient is 0.756.

[0091] The classification of green electricity consumption levels is based on preset level thresholds. Assuming the thresholds are: excellent level>0.9, excellent level>0.8, good level>0.7, up-to-standard level>0.6, and improved level≤0.6. Then the green electricity consumption level of the enterprise is good.

[0092] Smart contracts automatically generate rating certificates, including basic information of the enterprise, rating cycle, green electricity usage data, weight calculation process and final rating results. Rating certificates are stored on the blockchain in the form of electronic documents to ensure their authenticity and immutability.

[0093] In order to timely reflect the changes in the green electricity usage of enterprises, an instant rating update mechanism is set up. When the change in the green electricity usage rate of an enterprise in a single month exceeds the preset threshold (such as 10%), a re-rating is triggered. Assuming that the green electricity usage rate of the enterprise drops suddenly to 15% in a certain month, an instant update is triggered. The recalculated comprehensive weight coefficient is 0.623, and the green electricity consumption level is updated to the standard level.

[0094] The rating review mechanism allows companies to raise objections to rating results. After receiving the review application, the smart contract automatically calls the relevant data and calculation process for review. If errors in the original data entry or calculation deviations are found, the rating results will be corrected; if the review is correct, the original rating will be maintained. The review results are also recorded in the blockchain to ensure that the entire process is traceable.

[0095] The beneficial effects of this method are mainly reflected in three aspects: First, the green power rights and interests traceability model built through blockchain technology has achieved a comprehensive and objective assessment of the green power consumption behavior of power users. The automated analysis based on transaction data avoids interference from human factors and improves the fairness and credibility of the rating.

[0096] Secondly, the multi-dimensional weight calculation system comprehensively considers the company's green electricity usage, electricity consumption characteristics and external factors, making the rating results more scientific and reasonable. The setting of dynamic update and review mechanism further improves the timeliness and accuracy of the rating.

[0097] Finally, the implementation method based on blockchain and smart contracts ensures the transparency and immutability of the entire rating process. Automated data processing and result generation greatly improves efficiency and reduces labor costs. The rating results can be widely used in multiple fields such as green finance and carbon trading, effectively promoting green electricity consumption.

[0098] Figure 2 Schematic diagram of the structure of the green power consumption classification accounting and equity tracing system of the multi-dimensional account in the embodiment of the present invention. Figure 2 As shown, the system comprises: The first unit is used to collect the power consumption data of the enterprise power consumption terminal in real time to generate a power consumption load curve, and obtain the power generation plan data of the green power production enterprise to generate a power generation load curve, match the power consumption load curve with the power generation load curve in time dimension, and generate green power transaction matching data, wherein the green power transaction matching data includes a green power production timestamp, a green power consumption timestamp, a green power production amount, and a green power consumption amount; The second unit is used to construct a distributed ledger node network, the distributed ledger node network includes a green power production enterprise node, a power grid dispatching node and a power user enterprise node, the distributed ledger node network receives the green power transaction matching data, verifies the green power transaction matching data based on a preset consensus algorithm, and generates a green power transaction block, the green power transaction block includes a green power production enterprise identifier, a green power type identifier, a power grid dispatching path identifier and a power user enterprise identifier; The third unit is used to build a green electricity rights and interests traceability model based on the green electricity trading block. The green electricity rights and interests traceability model automatically calculates the green electricity consumption weight coefficient of each electricity user through a smart contract, classifies the electricity users according to the green electricity consumption weight coefficient, generates a green electricity consumption level, and generates a green electricity rights and interests certificate including the source of electricity, transmission and distribution path, and environmental benefits. The green electricity rights and interests certificate is pushed to the electricity user node through the blockchain network.

[0099] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0100] According to a fourth aspect of the embodiments of the present invention, A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0101] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-dimensional account green electricity consumption classification accounting and equity tracing method, characterized in that: include: Collect the electricity consumption data of the enterprise's electricity terminals in real time to generate an electricity load curve, obtain the power generation plan data of the green power production enterprise to generate a power generation load curve, match the electricity load curve with the power generation load curve in time dimension, and generate green power transaction matching data, the green power transaction matching data includes a green power production timestamp, a green power consumption timestamp, a green power production amount, and a green power consumption amount; Constructing a distributed ledger node network, the distributed ledger node network including a green power production enterprise node, a power grid dispatching node and a power user enterprise node, the distributed ledger node network receiving the green power transaction matching data, verifying the green power transaction matching data based on a preset consensus algorithm, and generating a green power transaction block, the green power transaction block including a green power production enterprise identifier, a green power type identifier, a power grid dispatching path identifier and a power user enterprise identifier; A green electricity rights and interests traceability model is constructed based on the green electricity trading block. The green electricity rights and interests traceability model automatically calculates the green electricity consumption weight coefficient of each electricity user through a smart contract, classifies the electricity users according to the green electricity consumption weight coefficient, generates a green electricity consumption grade, and generates a green electricity rights and interests certificate including the source of electricity, transmission and distribution path, and environmental benefits. The green electricity rights and interests certificate is pushed to the electricity user node through the blockchain network.

2. The method according to claim 1, characterized in that Matching the power consumption load curve with the power generation load curve in time dimension to generate green power transaction matching data includes: Collecting power load data of power terminals, discretizing the power load data according to a basic time unit of fifteen minutes to obtain a power load time series, wherein the power load time series includes power load values ​​corresponding to multiple time points; collecting green power generation plan data, discretizing the green power generation plan data according to the basic time unit to obtain a power generation load time series, wherein the power generation load time series includes power generation load values ​​corresponding to multiple time points; A distance matrix is ​​constructed based on the power load values ​​in the power load time series and the power generation load values ​​in the power generation load time series, wherein the matrix elements of the distance matrix are the Euclidean distances between the first time point in the power load time series and the second time point in the power generation load time series, and a time window constraint is set for the first time point, wherein the time window constraint limits the second time point to a time range of thirty minutes before and after the first time point; a cumulative distance matrix is ​​constructed based on the distance matrix, wherein the matrix elements of the cumulative distance matrix are calculated by a dynamic programming algorithm, and the initial condition of the dynamic programming algorithm is that the first matrix element of the cumulative distance matrix is ​​equal to the first matrix element of the distance matrix; An optimal path backtracking is performed in the cumulative distance matrix to obtain a matching sequence, and a load balancing constraint condition is determined based on the matching sequence. The load balancing constraint condition includes: the difference between the integral value of the electricity load and the integral value of the power generation load in the time period corresponding to the matching sequence does not exceed a preset threshold; when the difference exceeds the preset threshold, the time range of the time window constraint is adjusted to regenerate the distance matrix; and green power transaction matching data is generated based on the matching sequence that satisfies the load balancing constraint condition.

3. The method according to claim 1, characterized in that Constructing a distributed ledger node network, wherein the distributed ledger node network includes green power production enterprise nodes, power grid dispatching nodes, and power consumption enterprise nodes including: Construct a core ledger layer and an edge ledger layer, wherein the core ledger layer includes green power production enterprise nodes, power grid dispatching nodes and power consumption enterprise nodes, and the edge ledger layer includes smart meter nodes and distribution station nodes; the core ledger layer uses a Byzantine fault-tolerant consensus mechanism to reach consensus on power transaction data, and the Byzantine fault-tolerant consensus mechanism reaches data consensus through a pre-preparation phase, a preparation phase and a submission phase, and the edge ledger layer uses an authority proof consensus mechanism to reach consensus on power monitoring data; Based on the smart meter nodes and distribution station nodes in the edge ledger layer, power monitoring data is collected, the power monitoring data is batch packaged and processed according to a preset time window, and data summary information of the power monitoring data is generated; a node credit scoring model is established according to the online time, data accuracy and response time of the smart meter nodes and distribution station nodes, and a verification node is selected based on the node credit scoring model to verify the data summary information; The verified data summary information is submitted to the core ledger layer, and the green power production enterprise nodes, power grid dispatching nodes and power consumption enterprise nodes in the core ledger layer perform consensus confirmation on the data summary information; a cross-chain transaction record is generated based on the hash time lock contract, and the cross-chain transaction record includes the data summary information, node credit score and consensus confirmation information.

4. The method according to claim 3, characterized in that The method further comprises: Generate a Merkle tree containing multiple data blocks in the edge ledger layer, and submit the root node and proof path of the Merkle tree as an aggregate proof to the core ledger layer; the core ledger layer verifies the validity of the aggregate proof, generates status update information according to the verification result, and sends the status update information to the edge ledger layer to complete data synchronization; The power monitoring data in the edge ledger layer is stored in a hierarchical manner, the real-time power monitoring data is stored in a key-value database, and the historical power monitoring data is compressed and stored in a distributed storage system; the power transaction data in the core ledger layer is stored in a sharded manner, the power transaction data is divided into multiple data shards based on geographical regions and business types, and data synchronization is performed between different data shards through a status channel.

5. The method according to claim 1, characterized in that The distributed ledger node network receives the green power transaction matching data, verifies the green power transaction matching data based on a preset consensus algorithm, and generates a green power transaction block, including: Performing a repeatability check on the green power transaction matching data through a Bloom filter, and storing the green power transaction matching data that passes the check into a transaction pool; Based on the digital certificate, the power generation party information and the power user information in the green power transaction matching data are authenticated, and the green power production qualification in the power generation party information and the access qualification in the power user information are verified; according to the real-time operation status information of the power grid, the transaction power is matched and verified with the power generation capacity of the power generation enterprise and the available capacity of the power grid transmission channel; the rationality of the transaction price is verified based on the market benchmark price, and a transaction risk mark is generated according to the historical performance records of the two parties to the transaction; A verifiable random function algorithm is used to select a block generation node from the distributed ledger node network. The block generation node packages the verified green power transaction matching data to generate a transaction block including a block header and a block body. The block header includes a hash value of the previous block, a Merkle tree root, a timestamp, a difficulty target value, a random number, a total amount of electricity, and an average electricity price. The block body includes a transaction record list and verification proof data. Based on the Byzantine fault-tolerant algorithm, consensus processing is performed on the green power transaction matching data in the transaction block, and consensus processing is performed on the validity of the transaction block based on the proof-of-stake mechanism to generate a block consensus result; according to the block consensus result, the transaction block is added to the distributed ledger, and the power quota and fund balance of the two parties to the transaction are updated; The transaction block and the block consensus result are sent to a supervision node for storage, and the supervision node performs real-time supervision on green power transactions based on the transaction block and the block consensus result.

6. The method according to claim 1, characterized in that A green power equity traceability model is constructed based on the green power trading block. The green power equity traceability model automatically calculates the green power consumption weight coefficient of each power user through a smart contract, classifies the power users according to the green power consumption weight coefficient, and generates green power consumption levels including: Extracting the total transaction volume, transaction frequency, green electricity ratio, peak-valley distribution, and transaction price information of the power users from the green power transaction block, and standardizing the total transaction volume, transaction frequency, green electricity ratio, peak-valley distribution, and transaction price information to generate standardized data; Calculate the basic weight of the power user based on the standardized data, the basic weight includes green power utilization rate, time continuity, load stability, and contract fulfillment rate; calculate the adjustment coefficient based on the basic weight, the adjustment coefficient includes peak-valley responsiveness, carbon emission reduction contribution, regional factors, and industry characteristics; calculate the comprehensive weight coefficient of the power user based on the basic weight and the adjustment coefficient; The comprehensive weight coefficient is compared with the preset grade threshold to generate the green electricity consumption grade of the electricity user, and the green electricity consumption grade includes excellent grade, good grade, good grade, up-to-standard grade and improved grade; a rating certificate containing enterprise information, rating cycle, green electricity usage data, weight calculation process and rating results is generated based on the smart contract; When the change in the green electricity usage rate of an electricity user in a single month exceeds the preset threshold, the instant rating update mechanism is triggered to recalculate the comprehensive weight coefficient of the electricity user and update the green electricity consumption level of the electricity user; Receive the rating review application from the electricity user, call the standardized data, the basic weight, the adjustment coefficient, and the comprehensive weight coefficient based on the smart contract to perform automatic review, and generate a rating review result; record the rating review result in the blockchain.

7. A multi-dimensional account green power consumption classification accounting and equity tracing system, used to implement the method described in any one of claims 1 to 6, characterized in that: include: The first unit is used to collect the power consumption data of the enterprise power consumption terminal in real time to generate a power consumption load curve, and obtain the power generation plan data of the green power production enterprise to generate a power generation load curve, match the power consumption load curve with the power generation load curve in time dimension, and generate green power transaction matching data, wherein the green power transaction matching data includes a green power production timestamp, a green power consumption timestamp, a green power production amount, and a green power consumption amount; The second unit is used to construct a distributed ledger node network, the distributed ledger node network includes a green power production enterprise node, a power grid dispatching node and a power user enterprise node, the distributed ledger node network receives the green power transaction matching data, verifies the green power transaction matching data based on a preset consensus algorithm, and generates a green power transaction block, the green power transaction block includes a green power production enterprise identifier, a green power type identifier, a power grid dispatching path identifier and a power user enterprise identifier; The third unit is used to build a green electricity rights and interests traceability model based on the green electricity trading block. The green electricity rights and interests traceability model automatically calculates the green electricity consumption weight coefficient of each electricity user through a smart contract, classifies the electricity users according to the green electricity consumption weight coefficient, generates a green electricity consumption level, and generates a green electricity rights and interests certificate including the source of electricity, transmission and distribution path, and environmental benefits. The green electricity rights and interests certificate is pushed to the electricity user node through the blockchain network.

8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Real-time electric charge settlement and intelligent charge deduction method for intelligent electric meter

    CN120278712A

  • A real-time electricity fee settlement and intelligent deduction method for a smart meter

    CN120278712B

  • Bank transaction verification system based on block chain

    CN120374114A

  • A blockchain-based bank transaction verification system

    CN120374114B

  • Electric power transaction intelligent algorithm platform based on block chain consensus

    CN120634776A