Block chain power transaction performance data storage method

By preprocessing power transaction performance data and verifying it using blockchain consensus algorithms, and adjusting storage redundancy, hash operation frequency, and gas capacity, the real-time and throughput issues in blockchain power transaction performance data storage are resolved, enabling efficient data updates and verification.

CN121958285AInactive Publication Date: 2026-05-01SHANXI ELECTRIC POWER TRADING CENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANXI ELECTRIC POWER TRADING CENT CO LTD
Filing Date
2025-12-29
Publication Date
2026-05-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing blockchain-based power transaction data storage methods, cross-segment transactions rely on centralized coordination by the root committee and multiple rounds of interaction, resulting in insufficient real-time updates. Furthermore, the throughput and storage scalability are limited, making it difficult to meet the real-time settlement and precise supervision needs of tens of millions of distributed energy entities.

Method used

By preprocessing power transaction performance data, timestamped data blocks are generated and verified through a blockchain consensus algorithm. Based on indicators such as data block verification latency, throughput, and packet loss rate, storage redundancy, hash operation proof submission frequency, and gas capacity limit are adjusted to optimize the blockchain's data storage and verification process.

Benefits of technology

It improves the real-time update and verification efficiency of power transaction performance data, reduces the impact of remote access delays and network congestion on transaction execution, and ensures data integrity and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958285A_ABST
    Figure CN121958285A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a block chain power transaction performance data storage method, which comprises the following steps: preprocessing collected power transaction performance data to output a power transaction data packet, performing hash operation on the power transaction data packet to generate a corresponding hash value, and storing the hash value into a database; generating a data block with a timestamp according to the power transaction data packet and the corresponding hash value; verifying the data block through a consensus algorithm of the block chain to confirm the validity of the data block, and writing the verified data block into a preset position in the block chain to form a performance data block chain; determining whether the storage redundancy of the power transaction performance data needs to be increased; determining whether the Hash operation proof submission frequency under the performance data block chain needs to be reduced or not; and determining the capacity upper limit of the data block Gas based on the packet loss rate of the power transaction performance data communication. According to the invention, the updating real-time performance of the power transaction performance data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method for storing blockchain-based electricity transaction fulfillment data Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method for storing data on blockchain-based electricity transaction fulfillment. Background Technology

[0002] Against the backdrop of deepening power market reform, widespread integration of distributed energy resources, and high-frequency settlement in the electricity spot market, power transaction performance data exhibits complex characteristics such as large volume, high timeliness, and numerous stakeholders. Core businesses such as grid dispatching, market supervision, and electricity bill settlement have an increasingly urgent need for reliable storage and efficient verification of performance data. The core value of blockchain-based power transaction performance data storage methods lies in their ability to integrate multi-source heterogeneous data, including generation metering data, electricity settlement data, dispatch instruction data, and market rule data. Through hash anchoring, timestamp solidification, and automatic execution of smart contracts, it achieves reliable evidence storage and tamper-proof traceability throughout the entire power transaction performance process. This effectively addresses the pain points of traditional centralized storage, such as easy data tampering, high costs of cross-institutional mutual trust, and long settlement and reconciliation cycles. It promotes the upgrade of power transaction performance from manual reconciliation to automated and reliable execution, providing technical support for fair settlement and penetrating supervision in the power market. However, existing methods still generally suffer from problems such as low on-chain efficiency due to inconsistent multi-source data format standards, insufficient flexibility of smart contracts in supporting complex settlement rules, and limited blockchain throughput and storage scalability in high-frequency trading scenarios, making it difficult to meet the real-time settlement and precise supervision needs of tens of millions of distributed energy entities.

[0003] Chinese Patent Publication No. CN115689760A discloses a blockchain sharding consensus method, apparatus, and device for high-concurrency power trading. The method includes: after initializing a distributed power trading system, determining a target root committee node and at least one shard-specific delegator nodes from at least one distributed node included in the distributed power trading system, wherein the at least one distributed node includes distributed nodes from each of the at least one shard, and the shard-specific delegator nodes in a shard are a subset of the distributed nodes in that shard; when a first target shard in the at least one shard needs to conduct intra-shard power trading, executing a smart contract based on intra-shard trading parameters through the trading nodes in the first target shard to obtain intra-shard trading data, and then using the intra-shard delegator nodes in the first target shard to perform intra-shard power trading based on the intra-shard trading parameters. Intra-shard transaction data generates a first block, and PBFT consensus is performed on the first block. After consensus is passed, the first block is written into the blockchain of the intra-shard delegator nodes included in the first target shard. When a second target shard in at least one shard needs to conduct cross-shard power transactions with a third target shard, the transaction nodes in the second target shard submit the cross-shard transaction parameters to the target root committee node. The target root committee node enables the transaction nodes in the second and third target shards to perform the corresponding intra-shard operations for the cross-shard power transactions based on the cross-shard transaction parameters, obtaining cross-shard transaction data. A second block is generated based on the cross-shard transaction data, and PBFT consensus is performed on the second block. After consensus is passed, the second block is written into the blockchain of the target root committee node. Therefore, the blockchain sharding consensus method, apparatus, and equipment for high-concurrency power transactions suffer from insufficient real-time updates of power transaction performance data due to the reliance on centralized coordination and multiple rounds of interaction by the root committee for cross-shard transactions, coupled with shard data synchronization delays. Summary of the Invention

[0004] To address this issue, the present invention provides a blockchain-based method for storing electricity transaction performance data, which overcomes the problem of insufficient real-time updates of electricity transaction performance data in existing technologies due to the reliance on centralized coordination by the root committee and multiple rounds of interaction for cross-shard transactions, coupled with the synchronization delay of sharded data.

[0005] To achieve the above objectives, this invention provides a blockchain-based method for storing electricity transaction performance data, comprising: preprocessing collected electricity transaction performance data to output electricity transaction data packets; performing hash operations on the electricity transaction data packets to generate corresponding hash values; generating timestamped data blocks based on the electricity transaction data packets and the corresponding hash values; verifying the data blocks using a blockchain consensus algorithm to confirm their validity; writing the verified data blocks to a preset location in the blockchain to form a performance data blockchain; obtaining the verification delay duration of the data blocks; and determining the electricity transaction performance based on the verification delay duration of the data blocks. The system checks whether the real-time update of the performance data meets the requirements. If the real-time update of the power transaction performance data does not meet the requirements, it determines whether it is necessary to increase the storage redundancy of the power transaction performance data. If it is not necessary to increase the storage redundancy of the power transaction performance data, it obtains the throughput of the power transaction performance data per unit time to determine whether the verification efficiency of the consensus algorithm meets the requirements. If the verification efficiency of the consensus algorithm does not meet the requirements, it determines whether it is necessary to reduce the submission frequency of hash operation proofs under the performance data blockchain. If it is not necessary to reduce the submission frequency of hash operation proofs under the performance data blockchain, it determines the upper limit of the data block gas capacity based on the packet loss rate of power transaction performance data communication.

[0006] Further, determining whether the real-time update of the power transaction performance data meets the requirements based on the verification delay duration of the data block includes: comparing the verification delay duration of the data block with a preset first delay duration; if the verification delay duration of the data block is less than or equal to the preset first delay duration, then the real-time update of the power transaction performance data meets the requirements; if the verification delay duration of the data block is greater than the preset first delay duration, then the real-time update of the power transaction performance data does not meet the requirements.

[0007] Further, determining whether it is necessary to increase the storage redundancy of power transaction performance data includes: comparing the verification delay of the data block with the preset first delay and the preset second delay respectively; if the verification delay of the data block is greater than the preset second delay, it is determined that it is necessary to increase the storage redundancy of the power transaction performance data; if the verification delay of the data block is greater than the preset first delay and less than or equal to the preset second delay, it is determined that it is not necessary to increase the storage redundancy of the power transaction performance data.

[0008] Furthermore, the increase in the storage redundancy of the power transaction performance data is determined by the difference between the verification delay time of the data block and the preset second delay time.

[0009] Further, determining whether the verification efficiency of the consensus algorithm meets the requirements based on the throughput of power transaction performance data per unit time includes: comparing the throughput of the power transaction performance data per unit time with a preset second throughput; if the throughput of the power transaction performance data per unit time is greater than the preset second throughput, then determining that the verification efficiency of the consensus algorithm meets the requirements, and determining whether the storage redundancy of the power transaction performance data meets the requirements; if the throughput of the power transaction performance data per unit time is less than or equal to the preset second throughput, then determining that the verification efficiency of the consensus algorithm does not meet the requirements.

[0010] Further, determining whether it is necessary to reduce the hash calculation proof submission frequency under the performance data blockchain includes: comparing the throughput of the power transaction performance data per unit time with a preset first throughput and a preset second throughput respectively; if the throughput of the power transaction performance data per unit time is greater than the preset first throughput and less than or equal to the preset second throughput, then it is determined that it is necessary to reduce the hash calculation proof submission frequency under the performance data blockchain; if the throughput of the power transaction performance data per unit time is less than or equal to the preset first throughput, then it is determined that it is not necessary to reduce the hash calculation proof submission frequency under the performance data blockchain.

[0011] Furthermore, the reduction in the hash operation proof submission frequency under the performance data blockchain is determined by the difference between the throughput of the power transaction performance data per unit time and the preset first throughput.

[0012] Furthermore, determining the upper limit of data block gas capacity based on the packet loss rate of power transaction performance data communication includes: comparing the packet loss rate of the power transaction performance data communication with a preset packet loss rate; if the packet loss rate of the power transaction performance data communication is less than or equal to the preset packet loss rate, it is determined that the integrity of the multi-source electromagnetic data block generation meets the requirements, and there is no need to increase the upper limit of data block gas capacity, and it is also determined whether the hash operation proof submission frequency under the performance data blockchain meets the requirements; if the packet loss rate of the power transaction performance data communication is greater than the preset packet loss rate, it is determined that the integrity of the multi-source electromagnetic data block generation does not meet the requirements, and it is necessary to increase the upper limit of data block gas capacity.

[0013] Furthermore, the packet loss rate of the power transaction performance data communication is the ratio of the amount of power transaction performance data lost during the network transmission of power transaction performance data to the total amount of power transaction performance data.

[0014] Furthermore, the reduction in the upper limit of the data block gas capacity is determined by the difference between the packet loss rate of the power transaction performance data communication and the preset packet loss rate.

[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: The method of this invention adjusts the storage redundancy of power transaction performance data based on the verification delay of data blocks. Since verification nodes in the power transaction performance blockchain need to frequently access historical transaction proofs and smart contract storage data in distributed storage, the access time due to remote replica synchronization delays exceeds the total verification time threshold, reducing transaction execution and consensus verification speed. By increasing the redundancy of performance data storage, the number of replicas of frequently accessed data can be expanded, allowing high-speed storage media or nearby data replicas to be prioritized when reading verification status, reducing remote access waiting and synchronization delays, and shortening the single-block verification time. Furthermore, the method adjusts the hash operation proof submission frequency under the performance data blockchain based on the throughput of power transaction performance data per unit time. Since the power transaction performance process involves a large number of hash operations and status proofs, frequent submissions... Submitting proofs compresses the block space, and the overhead of repeated calculations by verification nodes causes congestion in the verification queue. By reducing the frequency of hash operation proof submissions under the performance data blockchain, multiple proofs can be aggregated into batch submissions, reducing the number of verification requests to handle more transaction performance data verification and confirmation requests, thus improving verification efficiency per unit time. The upper limit of data block gas capacity is adjusted according to the packet loss rate of power transaction performance data communication. Due to network congestion and link quality fluctuations during the multi-node communication transmission of power transaction performance data, some transaction data packets are lost and cannot be resent in a timely manner, resulting in an incomplete transaction set received by the verification nodes. By increasing the upper limit of data block gas capacity, the transaction capacity of a single block can be expanded, providing space for supplementing missing data, enabling verification nodes to complete data supplementation and on-chain in subsequent blocks, thus improving the real-time update of power transaction performance data.

[0016] Furthermore, the method of the present invention adjusts the storage redundancy of power transaction performance data by setting a preset first delay duration and a preset second delay duration. Since the verification nodes in the power transaction performance blockchain need to frequently access historical transaction proofs and smart contract storage data in the distributed storage, the access time of the nodes due to remote replica synchronization delays exceeds the threshold of the total verification time, reducing the speed of transaction execution and consensus verification. By increasing the redundancy of performance data storage, the number of replicas of high-frequency access data can be expanded, so that when reading the verification status, high-speed storage media or adjacent data replicas are selected first, reducing remote access waiting and synchronization delays, shortening the single block verification time, and further improving the real-time update of power transaction performance data.

[0017] Furthermore, the method of the present invention adjusts the submission frequency of hash operation proofs under the performance data blockchain by setting a preset first throughput and a preset second throughput. Since the performance of power transactions involves a large number of hash operations and state proofs, frequent submission of proofs leads to the compression of block space, and the repeated calculation overhead of verification nodes causes congestion in the verification queue. By reducing the submission frequency of hash operation proofs under the performance data blockchain, multiple proofs can be aggregated into batch submissions, reducing the number of verification requests to handle more transaction performance data verification and confirmation requests, improving the verification efficiency per unit time, and further improving the real-time update of power transaction performance data.

[0018] Furthermore, the method described in this invention adjusts the upper limit of the data block gas capacity by setting a preset packet loss rate. Due to network congestion and link quality fluctuations during the multi-node communication transmission of power transaction performance data, some transaction data packets are lost and cannot be resent in a timely manner, resulting in an incomplete transaction set received by the verification node. By increasing the upper limit of the data block gas capacity, the transaction capacity of a single block can be expanded, providing space for supplementing missing data. This allows the verification node to complete the data supplementation and on-chaining in subsequent blocks, further improving the real-time update of power transaction performance data. Attached Figure Description

[0019] Figure 1 is an overall flowchart of the blockchain power transaction performance data storage method according to an embodiment of the present invention; Figure 2 is a logical flowchart of the process of determining the storage redundancy of power transaction performance data in the blockchain power transaction performance data storage method according to an embodiment of the present invention; Figure 3 is a logical flowchart of the process of determining the hash operation proof submission frequency under the blockchain of performance data in the blockchain power transaction performance data storage method according to an embodiment of the present invention; Figure 4 is a logical flowchart of the process of determining the upper limit of data block gas capacity in the blockchain power transaction performance data storage method according to an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0021] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0022] Please refer to Figure 1, which is an overall flowchart of the blockchain power transaction performance data storage method according to an embodiment of the present invention.

[0023] This invention discloses a blockchain-based method for storing electricity transaction performance data, comprising: Step S1, preprocessing collected electricity transaction performance data to output electricity transaction data packets, performing hash operations on the electricity transaction data packets to generate corresponding hash values, and generating data blocks with timestamps based on the electricity transaction data packets and the corresponding hash values; Step S2, verifying the data blocks using a blockchain consensus algorithm to confirm their validity, and writing the verified data blocks to a preset location in the blockchain to form a performance data blockchain; Step S3, obtaining the verification delay duration of the data blocks, and determining the update of the electricity transaction performance data based on the verification delay duration of the data blocks. Step S4: If the real-time update of the power transaction performance data does not meet the requirements, determine whether it is necessary to increase the storage redundancy of the power transaction performance data; Step S5: If it is not necessary to increase the storage redundancy of the power transaction performance data, obtain the throughput of the power transaction performance data per unit time to determine whether the verification efficiency of the consensus algorithm meets the requirements; Step S6: If the verification efficiency of the consensus algorithm does not meet the requirements, determine whether it is necessary to reduce the hash operation proof submission frequency under the performance data blockchain; Step S7: If it is not necessary to reduce the hash operation proof submission frequency under the performance data blockchain, determine the upper limit of the data block gas capacity based on the packet loss rate of power transaction performance data communication.

[0024] Specifically, electricity transaction performance data includes electricity transaction prices, payment data, and default record data.

[0025] Specifically, preprocessing includes cleaning, conversion, noise reduction, uniform formatting, and merging compression.

[0026] Specifically, the power transaction data package is a structured collection of all pre-processed power transaction performance data.

[0027] Specifically, the process of performing hash operations on power transaction data packets to generate corresponding hash values ​​involves serializing the power transaction data packets according to a standard format, inputting them into a hash algorithm for irreversible operation, and outputting a unique hash value of fixed length corresponding to the power transaction data packets.

[0028] Specifically, the hash algorithm can be SHA-256, BLAKE2, or MD5, with SHA-256 being the preferred embodiment.

[0029] Specifically, the process of generating a timestamped data block based on the power transaction data packet and its corresponding hash value involves aggregating multiple performance data packets and their corresponding hash values ​​into a transaction list, calculating the Merkle root hash, constructing a block header that includes the previous block hash, timestamp, version number, and Merkle root hash, and forming a complete data block consisting of the block header and the transaction list.

[0030] Specifically, the Merkle root hash is a unique hash value representing the entire dataset, calculated using the Merkle tree algorithm.

[0031] Specifically, the consensus algorithm can be Practical Byzantine Fault Tolerance, off-chain consensus, and DPoS, with Practical Byzantine Fault Tolerance being the preferred embodiment.

[0032] Specifically, the process of writing verified data blocks into a preset position in the blockchain to form a performance data blockchain involves broadcasting the consensus-passed block to each node and adding it to the end position of the local blockchain to form a consistent and tamper-proof performance data blockchain.

[0033] Specifically, the storage redundancy of power transaction performance data is the number of additional independent data copies of power transaction performance data on other storage nodes besides the current storage point.

[0034] Specifically, the hash calculation proof submission frequency under the performance data blockchain is the number of times, per unit time, a proof used to verify the correctness of the calculation of the off-chain power transaction performance data is submitted to the blockchain during the power transaction performance process.

[0035] Specifically, the data block gas capacity limit is the maximum capacity of the total amount of computational work and storage resource consumption allowed to be contained within a single block.

[0036] In implementation, the method of this invention adjusts the storage redundancy of power transaction performance data based on the verification delay of data blocks. Because verification nodes in the power transaction performance blockchain frequently access historical transaction proofs and smart contract storage data in distributed storage, the access time due to remote replica synchronization delays exceeds the total verification time threshold, reducing transaction execution and consensus verification speed. By increasing the redundancy of performance data storage, the number of replicas of frequently accessed data can be expanded, allowing high-speed storage media or nearby data replicas to be prioritized when reading verification status, reducing remote access waiting and synchronization delays, and shortening the single block verification time. The method also adjusts the hash operation proof submission frequency under the performance data blockchain based on the throughput of power transaction performance data per unit time. Since power transaction performance involves a large number of hash operations and status proofs, frequent proof submissions lead to block redundancy. Space compression and repetitive computation overhead by verification nodes cause congestion in the verification queue. By reducing the frequency of hash operation proof submissions under the performance data blockchain, multiple proofs can be aggregated into batch submissions, reducing the number of verification requests to handle more transaction performance data verification and confirmation requests, thus improving verification efficiency per unit time. The upper limit of data block gas capacity is adjusted according to the packet loss rate of power transaction performance data communication. Due to network congestion and link quality fluctuations during the multi-node communication transmission of power transaction performance data, some transaction data packets are lost and cannot be resent in time, resulting in an incomplete transaction set received by the verification nodes. By increasing the upper limit of data block gas capacity, the transaction capacity of a single block can be expanded, providing space for supplementing missing data, enabling verification nodes to complete data supplementation and on-chain in subsequent blocks, thus improving the real-time update of power transaction performance data.

[0037] Please refer to Figure 2, which is a logical flowchart of the process of determining the storage redundancy of power transaction performance data in the blockchain power transaction performance data storage method of this embodiment of the invention.

[0038] Specifically, determining whether the real-time update of the power transaction performance data meets the requirements based on the verification delay duration of the data block includes: comparing the verification delay duration of the data block with a preset first delay duration; if the verification delay duration of the data block is less than or equal to the preset first delay duration, then the real-time update of the power transaction performance data meets the requirements; if the verification delay duration of the data block is greater than the preset first delay duration, then the real-time update of the power transaction performance data does not meet the requirements.

[0039] One reason why the real-time update of power transaction performance data might not meet requirements could be that the consensus algorithm's verification efficiency is insufficient, or that the storage redundancy of the power transaction performance data is inadequate. The next step is to determine which specific cause it is, which is essentially the process of deciding whether to increase the storage redundancy of the power transaction performance data.

[0040] Specifically, determining whether it is necessary to increase the storage redundancy of power transaction performance data includes: comparing the verification delay of the data block with the preset first delay and the preset second delay respectively; if the verification delay of the data block is greater than the preset second delay, it is determined that it is necessary to increase the storage redundancy of the power transaction performance data; if the verification delay of the data block is greater than the preset first delay and less than or equal to the preset second delay, it is determined that it is not necessary to increase the storage redundancy of the power transaction performance data.

[0041] Specifically, if the verification delay of a data block exceeds a preset second delay, it indicates that the reason for the non-compliance of the real-time update of the power transaction performance data is that the storage redundancy of the power transaction performance data is insufficient, thus requiring an increase in the storage redundancy of the power transaction performance data. If the verification delay of a data block exceeds a preset first delay but is less than or equal to a preset second delay, it can be preliminarily determined that the verification efficiency of the consensus algorithm is insufficient. The next step is to determine whether the verification efficiency of the consensus algorithm meets the requirements based on the throughput of power transaction performance data per unit time, i.e., to determine whether the non-compliance of the real-time update of the power transaction performance data is due to the non-compliance of the verification efficiency of the consensus algorithm.

[0042] Understandably, the preset first delay duration is less than the preset second delay duration. The three intervals divided by the preset first and second delay durations correspond to three different situations: The first interval is when the verification delay duration of the data block is less than or equal to the preset first delay duration, indicating that the real-time update of the power transaction performance data meets the requirements, and no adjustment is needed. The second interval is when the verification delay duration of the data block is greater than the preset first delay duration but less than or equal to the preset second delay duration, indicating that due to the large number of hash operations and state proofs involved in the power transaction performance process, frequent proof submissions lead to block space compression, and the repeated calculation overhead of verification nodes causes congestion in the verification queue. In this case, it is necessary to further determine whether the verification efficiency of the consensus algorithm meets the requirements. The third interval is when the verification delay duration of the data block is greater than the preset second delay duration, indicating that due to the need for verification nodes in the power transaction performance blockchain to frequently access historical transaction proofs in distributed storage and smart contract storage data, the access time due to remote replica synchronization delays exceeds the total verification time threshold, reducing the transaction execution and consensus verification speed. In this case, it is necessary to adjust the storage redundancy of the power transaction performance data.

[0043] Understandably, in the storage of blockchain-based power transaction performance data, preset first and second delay durations are used to characterize the real-time update of this data. The core logic is to transform the abstract real-time requirement into a quantifiable delay range judgment by correlating the verification delay duration of data blocks with the real-time update of the power transaction performance data. The preset first delay duration serves as the dividing line between whether the real-time update of power transaction performance data meets the standards, and its core function is to determine whether the system meets the basic timeliness standards for power market settlement and control command response. The preset second delay duration serves as the dividing line between the severity and cause of delay problems, and its core function is to determine the root cause of non-compliance with real-time requirements. The preset first and second delay durations can be set according to actual operating conditions. The setting of the preset first and second delay durations aims to ensure the real-time update and usability of power transaction performance data. Optionally, the preset first delay duration and the preset second delay duration are determined through a limited number of trials by evaluating the effect of different generation delay durations on the updating of power transaction performance data. The determined preset first delay duration and preset second delay duration should satisfy the condition that they are neither too small nor cause excessive interference to the storage process of blockchain power transaction performance data. For example, the preset first delay duration is generally selected in the range of [45ms, 55ms], and the preset second delay duration is generally selected in the range of [95ms, 105ms].

[0044] Preferably, the first delay duration is 50ms in a preferred embodiment, and the second delay duration is 100ms in a preferred embodiment.

[0045] Specifically, the verification latency of a data block is the total time from when a verification node in the blockchain network fully receives the block data packet until that node independently completes all internal verification rules for the block data packet.

[0046] Specifically, the increase in the storage redundancy of the power transaction performance data is determined by the difference between the preset first delay duration and the verification delay duration of the data block.

[0047] Specifically, when the difference between the verification delay of a data block and the preset first delay is within 10ms, the storage redundancy of the power transaction performance data increases to 1.1 times the original value. When the difference between the verification delay of a data block and the preset first delay exceeds 10ms, in addition to increasing to 1.1 times the original value, the storage redundancy of the power transaction performance data increases by 0.4 for every 4ms exceeding the original value. For example, when the difference between the verification delay of a data block and the preset first delay is 18ms, the current storage redundancy of the power transaction performance data is 1, and the increased storage redundancy of the power transaction performance data is 1×1.1+0.4×2≈2.

[0048] Specifically, when the storage redundancy of power transaction performance data is a decimal, it is automatically rounded up and retained as an integer.

[0049] In practice, the method of the present invention adjusts the storage redundancy of power transaction performance data by setting a preset first delay duration and a preset second delay duration. Since the verification nodes in the power transaction performance blockchain need to frequently access historical transaction proofs and smart contract storage data in the distributed storage, the access time of the nodes due to remote replica synchronization delays exceeds the threshold of the total verification time, reducing the speed of transaction execution and consensus verification. By increasing the redundancy of performance data storage, the number of replicas of high-frequency access data can be expanded, so that when reading the verification status, high-speed storage media or adjacent data replicas are selected first, reducing remote access waiting and synchronization delays, shortening the single block verification time, and further improving the real-time update of power transaction performance data.

[0050] Please refer to Figure 3, which is a flowchart illustrating the process of determining the hash operation proof submission frequency under the blockchain for power transaction performance data storage in this embodiment of the invention. Specifically, determining whether the verification efficiency of the consensus algorithm meets the requirements based on the throughput of power transaction performance data per unit time includes: comparing the throughput of the power transaction performance data per unit time with a preset second throughput; if the throughput of the power transaction performance data per unit time is greater than the preset second throughput, then determining that the verification efficiency of the consensus algorithm meets the requirements, and determining whether the storage redundancy of the power transaction performance data meets the requirements; if the throughput of the power transaction performance data per unit time is less than or equal to the preset second throughput, then determining that the verification efficiency of the consensus algorithm does not meet the requirements.

[0051] Specifically, when the throughput of power transaction performance data per unit time is greater than the preset second throughput, it is determined that the verification efficiency of the consensus algorithm meets the requirements. However, it has been previously determined that the real-time update of power transaction performance data does not meet the requirements. Therefore, it is necessary to further determine whether the storage redundancy of power transaction performance data meets the requirements.

[0052] In implementation, the storage redundancy of the actual power transaction performance data is compared with a predetermined redundancy threshold to determine whether the storage redundancy of the power transaction performance data meets the requirements. If the storage redundancy of the actual power transaction performance data is less than the predetermined redundancy threshold, the storage redundancy of the power transaction performance data is determined to be non-compliant. The predetermined redundancy threshold is the average storage redundancy of the power transaction performance data monitored in the previous three months of the historical period.

[0053] If the storage redundancy of the power transaction performance data does not meet the requirements, the storage redundancy of the power transaction performance data will be increased; if the storage redundancy of the power transaction performance data meets the requirements, the verification delay time of the data block will be re-collected, and the real-time update of the power transaction performance data will be re-evaluated to determine whether it meets the requirements.

[0054] If the throughput of power transaction performance data per unit time is less than or equal to a preset second throughput, it can be determined that the reason for the failure to meet the real-time update requirements of the power transaction performance data is that the verification efficiency of the consensus algorithm is not up to standard. The reasons for this failure may include: the hash proof submission frequency under the performance data blockchain is not up to standard; or the integrity of the generated data blocks is not up to standard. The next step is to determine which specific reason it is, which is essentially the process of deciding whether to reduce the hash proof submission frequency under the performance data blockchain.

[0055] Specifically, determining whether it is necessary to reduce the submission frequency of hash operation proofs under the performance data blockchain includes: comparing the throughput of the power transaction performance data per unit time with a preset first throughput and a preset second throughput respectively; if the throughput of the power transaction performance data per unit time is greater than the preset first throughput and less than or equal to the preset second throughput, it is determined that it is necessary to reduce the submission frequency of hash operation proofs under the performance data blockchain; if the throughput of the power transaction performance data per unit time is less than or equal to the preset first throughput, it is determined that it is not necessary to reduce the submission frequency of hash operation proofs under the performance data blockchain.

[0056] Specifically, when the throughput of power transaction performance data per unit time is greater than a preset first throughput but less than or equal to a preset second throughput, it is determined that the reason for the data block generation's incomplete integrity is that the hash calculation proof submission frequency under the performance data blockchain does not meet the requirements. Therefore, it is necessary to reduce the hash calculation proof submission frequency under the performance data blockchain. When the throughput of power transaction performance data per unit time is less than or equal to the preset first throughput, it can be preliminarily determined that the data block generation's incomplete integrity does not meet the requirements. Next, it is necessary to make a final determination on whether the data block generation's incomplete integrity meets the requirements based on the packet loss rate of power transaction performance data communication, that is, to determine whether the reason for the data block generation's incomplete integrity is indeed due to the incomplete integrity of the data block generation.

[0057] Understandably, the preset first throughput is less than the preset second throughput. The three intervals between the preset first and second throughputs correspond to three scenarios: The first interval is when the throughput of power transaction fulfillment data per unit time is less than or equal to the preset first throughput. This corresponds to the situation where network congestion and link quality fluctuations occur during the multi-node communication transmission of power transaction fulfillment data, resulting in the loss of some transaction data packets and their inability to be resent in a timely manner. This leads to an incomplete transaction set received by the verification nodes, requiring further assessment of whether the integrity of the generated data blocks meets the requirements. The second interval is when the throughput of power transaction fulfillment data per unit time is greater than the preset first throughput and less than or equal to the preset second throughput. This corresponds to the situation where a large number of hash operations and state proofs are involved in the power transaction fulfillment process. Frequent proof submissions lead to block space compression, and the repeated calculation overhead of verification nodes causes congestion in the verification queue. This requires adjusting the hash operation proof submission frequency under the fulfillment data blockchain. The third interval is when the throughput of power transaction fulfillment data per unit time is greater than the preset second throughput. This corresponds to the situation where the verification efficiency of the consensus algorithm meets the requirements. In this case, it is necessary to further determine whether the storage redundancy of the power transaction fulfillment data meets the requirements.

[0058] It is understandable that in the storage process of blockchain power transaction performance data, the introduction of preset first throughput and preset second throughput to characterize the verification efficiency of the consensus algorithm is based on the correlation between throughput per unit time and the verification efficiency of the consensus algorithm, transforming the abstract verification capability into a quantifiable throughput range judgment. The preset first throughput is the critical point for distinguishing whether the verification efficiency of the consensus algorithm meets the basic requirements of power transaction settlement, while the preset second throughput is the dividing line for distinguishing the severity of insufficient verification efficiency. The preset first throughput and preset second throughput can be set according to actual working conditions, aiming to ensure the real-time update and usability of power transaction performance data. Optionally, the preset first throughput and preset second throughput are determined through a limited number of trials by evaluating the effect of different contour line throughputs on the update of power transaction performance data. The determined preset first throughput and preset second throughput should be neither too small nor cause excessive interference to the storage process of blockchain power transaction performance data. For example, the preset first throughput is generally selected in the range of [2900 TPS, 3100 TPS], and the preset second throughput is generally selected in the range of [3900 TPS, 4100 TPS].

[0059] Preferably, the first throughput is 3000 TPS in a preferred embodiment, and the second throughput is 4000 TPS in a preferred embodiment.

[0060] Specifically, TPS stands for Transactions Per Second, which is the number of electricity transaction fulfillment data entries processed per second.

[0061] Specifically, the throughput of power transaction performance data per unit time is the amount of power transaction performance data that is processed and verified within a unit time.

[0062] Specifically, the reduction in the submission frequency of hash operation proofs under the performance data blockchain is determined by the difference between the throughput of power transaction performance data per unit time and the preset first throughput.

[0063] Specifically, when the difference between the throughput of power transaction performance data per unit time and the preset first throughput is within 300 TPS, the hash operation proof submission frequency under the performance data blockchain is reduced to 0.9 times the original. When the difference between the throughput of power transaction performance data per unit time and the preset first throughput exceeds 500 TPS, on the basis of reducing to 0.9 times the original, for every 200 TPS exceeding, the hash operation proof submission frequency under the performance data blockchain is reduced by 1 time / h. For example, when the difference between the throughput of power transaction performance data per unit time and the preset first throughput is 900 TPS, the current hash operation proof submission frequency under the performance data blockchain is 5 times / h, and the increased hash operation proof submission frequency under the performance data blockchain is 5×0.9-1×2≈3 times / h.

[0064] Specifically, when the submission frequency of hash operation proofs under the performance data blockchain is a decimal, it is automatically rounded up and retained as an integer.

[0065] In practice, the method of the present invention adjusts the submission frequency of hash operation proofs under the performance data blockchain by setting a preset first throughput and a preset second throughput. Since the performance of power transactions involves a large number of hash operations and state proofs, frequent submission of proofs leads to the compression of block space, and the repeated calculation overhead of verification nodes causes congestion in the verification queue. By reducing the submission frequency of hash operation proofs under the performance data blockchain, multiple proofs can be aggregated into batch submissions, reducing the number of verification requests to handle more transaction performance data verification and confirmation requests, improving the verification efficiency per unit time, and further improving the real-time update of power transaction performance data.

[0066] Please refer to Figure 4, which is a logical flowchart of the process of determining the upper limit of the Gas capacity of the data block in the blockchain power transaction performance data storage method of this embodiment of the invention.

[0067] Specifically, determining the upper limit of data block gas capacity based on the packet loss rate of power transaction performance data communication includes: comparing the packet loss rate of the power transaction performance data communication with a preset packet loss rate; if the packet loss rate of the power transaction performance data communication is less than or equal to the preset packet loss rate, it is determined that the integrity of the multi-source electromagnetic data block generation meets the requirements, and there is no need to increase the upper limit of data block gas capacity, and it is also determined whether the hash operation proof submission frequency under the performance data blockchain meets the requirements; if the packet loss rate of the power transaction performance data communication is greater than the preset packet loss rate, it is determined that the integrity of the multi-source electromagnetic data block generation does not meet the requirements, and the upper limit of data block gas capacity needs to be increased.

[0068] Specifically, when the packet loss rate of power transaction performance data communication is less than or equal to the preset packet loss rate, it is determined that the integrity of the generated data block meets the requirements. However, if the verification efficiency of the consensus algorithm has been determined to be unsatisfactory, it is necessary to further determine whether the hash operation proof submission frequency under the performance data blockchain meets the requirements.

[0069] In implementation, the submission frequency of hash operation proofs under the actual performance data blockchain is compared with the predetermined frequency threshold to determine whether the submission frequency of hash operation proofs under the performance data blockchain meets the requirements. If the submission frequency of hash operation proofs under the actual performance data blockchain is greater than the predetermined frequency threshold, it is determined that the submission frequency of hash operation proofs under the performance data blockchain does not meet the requirements. The predetermined frequency threshold is the average value of the submission frequency of hash operation proofs under the performance data blockchain monitored in the previous three months of the historical period.

[0070] If the submission frequency of hash operation proofs under the actual performance data blockchain does not meet the requirements, the submission frequency of hash operation proofs under the actual performance data blockchain will be reduced; if the submission frequency of hash operation proofs under the actual performance data blockchain meets the requirements, the throughput of power transaction performance data per unit time will be re-collected, and the verification efficiency of the consensus algorithm will be re-evaluated to see if it meets the requirements.

[0071] When the packet loss rate of power transaction performance data communication exceeds the preset packet loss rate, it can be determined that the reason why the verification efficiency of the consensus algorithm does not meet the requirements is that the integrity of the data block generation does not meet the requirements. Therefore, it is necessary to increase the upper limit of the data block gas capacity.

[0072] Understandably, the two intervals of the preset packet loss rate correspond to two different scenarios: The first interval is when the packet loss rate of power transaction performance data communication is less than or equal to the preset packet loss rate, which corresponds to the situation where the integrity of the generated data block meets the requirements. In this case, it is necessary to further determine whether the hash operation proof submission frequency under the performance data blockchain meets the requirements. The second interval is when the packet loss rate of power transaction performance data communication is greater than the preset packet loss rate, which corresponds to the situation where network congestion and link quality fluctuations occur during the multi-node communication transmission of power transaction performance data, resulting in the loss of some transaction data packets and the inability to resend them in a timely manner. This results in an incomplete transaction set received by the verification node, and in this case, it is necessary to adjust the upper limit of the data block gas capacity.

[0073] Understandably, in the storage process of blockchain power transaction performance data, using a preset packet loss rate to characterize the integrity of data block generation is based on the core logic of transforming the abstract requirement of block integrity into a quantifiable judgment of network transmission quality by correlating the network communication packet loss rate with the integrity of data block generation. The preset packet loss rate serves as a dividing line to distinguish whether the integrity of data block generation meets the standard, and its core function is to determine whether the underlying network transmission quality meets the basic requirements for the integrity of the blockchain's on-chain data set. The preset packet loss rate can be set according to actual operating conditions. The setting of the preset packet loss rate aims to ensure the real-time update and usability of power transaction performance data. Optionally, the preset packet loss rate is determined through a limited number of experiments by evaluating the effect of different packet loss rates on the update of power transaction performance data. The determined preset packet loss rate should be neither too low nor cause excessive interference to the storage process of blockchain power transaction performance data. For example, the preset packet loss rate is generally selected in the range of [0.1%, 0.3%].

[0074] Preferably, the preset packet loss rate is 0.2% in this preferred embodiment.

[0075] Specifically, the packet loss rate of the power transaction performance data communication is the ratio of the amount of power transaction performance data lost during network transmission to the total amount of power transaction performance data.

[0076] Specifically, the reduction in the upper limit of the data block gas capacity is determined by the difference between the packet loss rate of power transaction performance data communication and the preset packet loss rate.

[0077] Specifically, when the difference between the packet loss rate of power transaction fulfillment data communication and the preset packet loss rate is within 0.1%, the upper limit of data block gas capacity is increased to 1.1 times the original value. When the difference between the packet loss rate of power transaction fulfillment data communication and the preset packet loss rate exceeds 0.1%, in addition to increasing to 1.1 times the original value, for every 0.05% exceeding the preset packet loss rate, the upper limit of data block gas capacity increases by 50 Mbps. For example, when the difference between the packet loss rate of power transaction fulfillment data communication and the preset packet loss rate is 0.2%, the current upper limit of data block gas capacity is 1000 Mbps, and the increased upper limit of data block gas capacity is 1000 × 1.1 + 50 × 2 = 1200 Mbps.

[0078] In practice, the method described in this invention adjusts the upper limit of the data block gas capacity by setting a preset packet loss rate. Due to network congestion and link quality fluctuations during the multi-node communication transmission of power transaction performance data, some transaction data packets are lost and cannot be resent in a timely manner, resulting in an incomplete transaction set received by the verification node. By increasing the upper limit of the data block gas capacity, the transaction capacity of a single block can be expanded, providing space for supplementing missing data. This allows the verification node to complete the data supplementation and on-chaining in subsequent blocks, further improving the real-time update of power transaction performance data.

[0079] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A method for storing blockchain-based electricity transaction fulfillment data, characterized in that, include: The collected power transaction performance data is preprocessed to output a power transaction data packet. The power transaction data packet is hashed to generate a corresponding hash value. A data block with a timestamp is generated based on the power transaction data packet and the corresponding hash value. The data blocks are verified using a consensus algorithm of the blockchain to confirm their validity. The verified data blocks are then written to a preset location in the blockchain to form a performance data blockchain. The verification delay time of the data blocks is obtained, and the real-time update of the power transaction performance data is determined based on the verification delay time. If the real-time update of the power transaction performance data does not meet the requirements, it is determined whether it is necessary to increase the storage redundancy of the power transaction performance data. If there is no need to increase the storage redundancy of power transaction performance data, then the throughput of power transaction performance data per unit time is obtained to determine whether the verification efficiency of the consensus algorithm meets the requirements; if the verification efficiency of the consensus algorithm does not meet the requirements, then it is determined whether it is necessary to reduce the hash operation proof submission frequency under the performance data blockchain; if there is no need to reduce the hash operation proof submission frequency under the performance data blockchain, then the upper limit of data block gas capacity is determined based on the packet loss rate of power transaction performance data communication.

2. The blockchain power transaction performance data storage method according to claim 1, characterized in that, Determining whether the real-time update of power transaction performance data meets the requirements based on the verification delay duration of the data block includes: determining that the integrity of the multi-source electromagnetic data block generation meets the requirements and that it is not necessary to increase the upper limit of the data block gas capacity; comparing the verification delay duration of the data block with a preset first delay duration; if the verification delay duration of the data block is less than or equal to the preset first delay duration, then determining that the real-time update of the power transaction performance data meets the requirements; if the verification delay duration of the data block is greater than the preset first delay duration, then determining that the real-time update of the power transaction performance data does not meet the requirements.

3. The blockchain power transaction performance data storage method according to claim 2, characterized in that, Determining whether it is necessary to increase the storage redundancy of power transaction performance data includes: comparing the verification delay of the data block with the preset first delay and the preset second delay respectively; if the verification delay of the data block is greater than the preset second delay, it is determined that it is necessary to increase the storage redundancy of the power transaction performance data; if the verification delay of the data block is greater than the preset first delay and less than or equal to the preset second delay, it is determined that it is not necessary to increase the storage redundancy of the power transaction performance data.

4. The blockchain power transaction performance data storage method according to claim 3, characterized in that, The increase in the storage redundancy of the power transaction performance data is determined by the difference between the verification delay time of the data block and the preset second delay time.

5. The blockchain power transaction performance data storage method according to claim 4, characterized in that, Determining whether the verification efficiency of the consensus algorithm meets the requirements based on the throughput of power transaction performance data per unit time includes: comparing the throughput of the power transaction performance data per unit time with a preset second throughput; If the throughput of power transaction performance data per unit time is greater than the preset second throughput, then it is determined that the verification efficiency of the consensus algorithm meets the requirements, and it is determined whether the storage redundancy of the power transaction performance data meets the requirements. If the throughput of power transaction performance data per unit time is less than or equal to the preset second throughput, then the verification efficiency of the consensus algorithm is determined to be unsatisfactory.

6. The blockchain power transaction fulfillment data storage method according to claim 5, characterized in that, Determining whether to reduce the hash calculation proof submission frequency under the performance data blockchain includes: comparing the throughput of the power transaction performance data per unit time with a preset first throughput and a preset second throughput respectively; if the throughput of the power transaction performance data per unit time is greater than the preset first throughput and less than or equal to the preset second throughput, then it is determined that the hash calculation proof submission frequency under the performance data blockchain needs to be reduced; if the throughput of the power transaction performance data per unit time is less than or equal to the preset first throughput, then it is determined that the hash calculation proof submission frequency under the performance data blockchain does not need to be reduced.

7. The blockchain power transaction fulfillment data storage method according to claim 6, characterized in that, The reduction in the submission frequency of hash operation proofs under the blockchain of the performance data is determined by the difference between the throughput of the power transaction performance data per unit time and the preset first throughput.

8. The blockchain power transaction performance data storage method according to claim 7, characterized in that, Determining the upper limit of data block gas capacity based on the packet loss rate of power transaction performance data communication includes: comparing the packet loss rate of the power transaction performance data communication with a preset packet loss rate; if the packet loss rate of the power transaction performance data communication is less than or equal to the preset packet loss rate, it is determined that the integrity of the multi-source electromagnetic data block generation meets the requirements, and there is no need to increase the upper limit of data block gas capacity, and it is also determined whether the hash operation proof submission frequency under the performance data blockchain meets the requirements; if the packet loss rate of the power transaction performance data communication is greater than the preset packet loss rate, it is determined that the integrity of the multi-source electromagnetic data block generation does not meet the requirements, and the upper limit of data block gas capacity needs to be increased.

9. The blockchain power transaction performance data storage method according to claim 8, characterized in that, The packet loss rate of the power transaction performance data communication is the ratio of the amount of power transaction performance data lost during network transmission to the total amount of power transaction performance data.

10. The blockchain power transaction performance data storage method according to claim 9, characterized in that, The reduction in the upper limit of the data block gas capacity is determined by the difference between the packet loss rate of power transaction performance data communication and the preset packet loss rate.

Citation Information

Patent Citations

  • Block chain fragment consensus method, device and equipment for high-concurrency power transaction

    CN115689760A