Microgrid block chain rapid transaction method based on optimized PBFT
By introducing a credit scoring model and VRF dynamic leader election into the microgrid blockchain, and combining mutated Schnorr signatures and elliptic curve signature aggregation, the PBFT algorithm is optimized, solving the consensus efficiency and security issues in microgrid transactions, and achieving low latency and high TPS for high-frequency peer-to-peer energy transactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI'AN PETROLEUM UNIVERSITY
- Filing Date
- 2026-01-07
- Publication Date
- 2026-05-08
AI Technical Summary
Traditional PBFT algorithms suffer from low consensus efficiency and insufficient security in microgrid environments, failing to meet the demands of high-frequency, small-amount, and real-time microgrid energy transactions. In particular, they struggle to achieve high security and efficiency under dynamic topology changes and bandwidth constraints.
By dynamically electing leaders through a credit scoring model, combining verifiable random functions (VRF) and mutated Schnorr signatures, and employing multicast mechanisms and the linear homomorphic properties of elliptic curve signatures for signature aggregation, communication complexity and verification overhead are reduced. Furthermore, asynchronous responses are achieved using a block cache pool, thereby improving system robustness and transaction efficiency.
It significantly improves the TPS of microgrid blockchain transactions from 100 to 4000, reduces latency to 45-135ms, enhances system security and stability, and is suitable for distributed microgrid environments dominated by intermittent renewable energy, enabling efficient and secure high-frequency point-to-point energy trading.
Smart Images

Figure CN121998763A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of blockchain consensus mechanisms and the energy internet technology, specifically to a fast transaction method, system, medium, and device for microgrid blockchain based on optimized PBFT (Practical Byzantine Fault Tolerance). This invention is particularly aimed at the high-frequency peer-to-peer (P2P) energy trading needs of distributed energy nodes (DERs) in microgrid environments. Through in-depth optimization of the consensus algorithm in terms of leader election mechanism, signature strategy, and verification process, it aims to improve the consensus efficiency, security, and transaction throughput of the blockchain system in bandwidth-constrained environments. Background Technology
[0002] As an important form of distributed energy system, microgrids are experiencing increasingly frequent peer-to-peer (P2P) energy trading as renewable energy penetration (such as photovoltaics and wind power) continues to increase. Traditional centralized trading models suffer from high transaction latency, communication congestion, significant security risks, and single-point-of-failure risks, failing to meet the high-frequency, small-amount, and real-time energy trading demands of microgrids. Blockchain technology, with its decentralized, immutable, transparent, and traceable characteristics, offers a new approach to microgrid energy trading. Existing research has applied blockchain to distributed trading, smart contract settlement, and secure data storage in microgrids.
[0003] Currently, the Practical Byzantine Fault Tolerance (PBFT) algorithm is widely used in consortium blockchain consensus mechanisms due to its high security, low latency, and Byzantine fault tolerance capabilities, making it particularly suitable for scenarios with moderate node scale, such as microgrids. However, traditional PBFT algorithms suffer from drawbacks such as a fixed master node making them vulnerable to attacks and high communication complexity (O(n)). 2 Problems such as high overhead for signature verification result in low consensus efficiency and low TPS in microgrid dynamic topology changes, bandwidth constraints, and high-concurrency transaction environments, making it unable to support the rapid transaction needs of large-scale distributed energy nodes (DERs).
[0004] In recent years, scholars at home and abroad have made various optimizations to PBFT, such as introducing a credit mechanism for dynamic leader election, signature aggregation to reduce communication overhead, and hierarchical consensus to reduce node participation. However, most existing solutions have not fully considered the unique characteristics of microgrids, such as intermittent power generation, real-time timestamp requirements, and bandwidth constraints, making it difficult to achieve both high security and high efficiency. Although some studies combine VRF random election and credit scoring, they have not incorporated in-depth optimizations such as mutation signature anti-replay attack and batch verification O(1) overhead, resulting in problems such as large consensus latency and high security risks in high-frequency P2P transaction scenarios in microgrids.
[0005] It is evident that traditional PBFT and its existing optimizations are insufficient to fully meet the real-time, security, and scalability requirements of microgrid energy trading. Therefore, a PBFT optimization method specifically for microgrid scenarios is needed to improve consensus efficiency, reduce communication and computational overhead, and enhance system robustness and resistance to attacks. Summary of the Invention
[0006] A fast transaction method for microgrid blockchain based on optimized PBFT, characterized by the following steps:
[0007] Step 1: Initialization and Credit Assessment: Receive access requests from multiple distributed energy nodes (DERs) within the microgrid, construct a dynamic credit scoring model based on the historical transaction data and power generation stability parameters of each node, and store the credit scores in a distributed credit ledger.
[0008] Step 2: Dynamic Leader Election: At the beginning of each consensus cycle, a leader node for this round is randomly elected from the set of candidate nodes whose credit scores are higher than a preset threshold using a verifiable random function (VRF) combined with the credit score, thereby realizing non-fixed role admission that adapts to the dynamic topology changes of DERs.
[0009] Step 3: Pre-preparation and Mutation Signature: The leader node packages the electricity trading orders to be reached into blocks, integrates the real-time operation timestamp of the distribution network with the block hash to generate a mutated Schnorr leader signature, and broadcasts the pre-preparation message to the replica nodes through a multicast mechanism.
[0010] Step 4: Partial Signature Generation and Aggregation. After each replica node verifies the prepared message, it uses its private key to generate the corresponding mutated Schnorr partial signature. After obtaining the number of partial signatures that meet the threshold, the collection node uses the linear homomorphic property of elliptic curve signatures to perform a scalar linear aggregation operation on each partial signature, compressing multiple partial signatures into a single aggregated signature message containing global information.
[0011] Step 5: Batch Verification and Block Submission: Each node receives the aggregated signature message and performs batch verification using elliptic curve point addition. After successful verification, the transaction block is submitted to the distributed ledger, and the node credit score in the credit ledger is updated synchronously.
[0012] Step 6: Asynchronous response and caching acceleration: The submitted block is written to the block cache pool, which supports asynchronous response to the transaction node to confirm the result. The block cache pool is used to quickly respond to the node's historical block synchronous query, so as to realize low-latency confirmation of high-frequency point-to-point energy transactions in microgrids.
[0013] Furthermore, the initialization and credit assessment in step 1 specifically includes:
[0014] Step 11: Receive access requests from multiple distributed energy nodes (DERs) within the microgrid, and collect historical transaction data, power generation stability parameters, and behavior records of each node;
[0015] Step 12: Calculate the transaction success rate and rejection rate based on historical transaction data, and evaluate the node reliability in conjunction with power generation output stability parameters;
[0016] Step 13: Calculate the initial credit score using a weighted average method. The formula for calculating the credit score is as follows:
[0017] Credit = α × Transaction success rate + β × (1 - Rejection rate) + γ × Output stability coefficient (1)
[0018] Wherein, α, β, and γ are preset weighting coefficients, and α+β+γ=1; the output stability coefficient is calculated by the standard deviation of historical power generation data, and the smaller the standard deviation, the higher the coefficient.
[0019] Step 14: Include nodes with credit scores higher than a preset threshold (e.g., 0.7) in the candidate node set and store the credit scores in a distributed credit ledger to achieve transparency and tamper-proof credit data.
[0020] Furthermore, the specific operational steps for the dynamic leader election in step 2 include:
[0021] Step 21: Filter nodes with credit scores higher than a preset threshold to form a candidate node set; Step 22: Generate random values using a verifiable random function (VRF). The inputs to the VRF include the node's private key, the current consensus cycle number, and the credit score.
[0022] Step 23: Calculate the election probability interval mapping and determine the leader node:
[0023] 231. Weight Space Construction: Based on the credit scores of each node in the candidate node set, calculate the election probability weight of each node in this round of consensus.
[0024] P i =Credit i / ∑Credit j (2)
[0025] Where ∑Credit j The sum of the credit scores of all candidate nodes.
[0026] 232. Random value interval matching: Election probability P of all candidate nodes i The nodes are mapped sequentially to a continuous numerical range of [0, 1], with each node corresponding to a non-overlapping sub-interval whose length is proportional to its credit score.
[0027] 233. Mapping Logic Decision: The random result generated by VRF in step 22 (normalized to the range of [0, 1]) is used as a "random pointer". The node whose probability weight sub-interval the pointer falls into is the leader node of this consensus cycle.
[0028] Step 24: Randomly elect a leader node based on the VRF output and election probability to ensure the verifiability and fairness of the election process and prevent malicious nodes from dominating the consensus.
[0029] Furthermore, the specific operational steps of steps 3 and 4 include:
[0030] Step 31: The leader node packages the electricity trading orders awaiting consensus into blocks and obtains the real-time operation timestamp of the distribution network.
[0031] Step 32: Generate a mutated Schnorr leader signature. The hash input combines the block hash, timestamp, and random value Ri to enhance resistance to replay attacks. The signature generation formula is:
[0032] (R,s)=Sign(sk,Hash(block_hash||timestamp||Ri)) (3)
[0033] Where sk is the private key and Hash is the SHA-256 hash function.
[0034] Step 33: Send a pre-preparation message to the replica nodes in the microgrid via multicast mechanism to reduce communication overhead in bandwidth-constrained environments.
[0035] Step 34: After each replica node verifies the pre-prepared message, it generates the corresponding mutated Schnorr partial signature (Ri, si), with the hash input including Ri to support aggregation.
[0036] Step 35: After collecting a number of partial signatures that meet the 2f+1 threshold, perform a scalar linear aggregation operation to generate a single aggregated signature message aggSig. The aggregation logic formula is as follows:
[0037]
[0038] Among them, s i For the signature weight generated by the i-th replica node, R i The corresponding random point commitment is given, where n is the order of the elliptic curve; the generated aggregate signature aggSig=(R,S) can represent the endorsement opinions of all participating nodes and supports constant-order verification under BLS12-381 or Secp256k1 curves.
[0039] Step 51: Each node receives the aggregate signature message and reconstructs the aggregate public key P = ∑P using elliptic curve point addition. i And perform batch validation equations based on the aggregation results:
[0040] S·G=R+e·P (5)
[0041] Where G is the base point and e is the hybrid hash challenge value including timestamps. Through this equation, the verification node does not need to verify the signatures of 2f+1 nodes one by one, reducing the verification overhead of a single consensus from O(n) to a constant order O(1).
[0042] Step 52: After successful verification, submit the transaction block to the distributed ledger.
[0043] Step 53: Synchronously update the credit ledger based on the verification results and node behavior. If a node participates normally, its credit score will increase; if malicious behavior (such as signature forgery) is detected, the score will decrease. The update formula is:
[0044] New_Credit = Old_Credit ± δ × (behavioral factor) (6)
[0045] Where δ is the adjustment coefficient, and the behavioral factor has a positive or negative value depending on participation.
[0046] Step 54: Write the submitted block to the block cache pool, supporting asynchronous confirmation responses to transaction nodes.
[0047] Step 55: Utilize the block cache pool to quickly respond to the node's historical block synchronization query, thereby achieving low-latency confirmation and fast synchronization of high-frequency point-to-point energy transactions in the microgrid.
[0048] A microgrid blockchain fast transaction system based on optimized PBFT is characterized by comprising a credit assessment module, a dynamic leader election module, a pre-preparation and signature generation module, a signature aggregation module, a batch verification and submission module, and an asynchronous response and caching module; the credit assessment module is used to receive DERs access requests and construct and store a dynamic credit scoring model based on historical data and output stability; the dynamic leader election module is used to randomly elect leader nodes using VRF combined with credit scoring.
[0049] The pre-preparation and signature generation module is used to generate a mutated Schnorr signature with a merged timestamp and multicast the pre-preparation message; the signature aggregation module is used for partial signature generation and concatenation + hash aggregation; the batch verification and submission module is used for dot-addition batch verification, block submission and credit update; the asynchronous response and caching module is used for block caching and asynchronous response, supporting low-latency transaction confirmation.
[0050] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the steps in the fast transaction method for microgrid blockchain based on optimized PBFT as described in any one of claims 1-6.
[0051] Beneficial Effects: Compared with traditional PBFT, the optimized PBFT method proposed in this invention avoids the single point of attack risk of fixed master nodes through credit scoring + VRF dynamic leader election, and significantly reduces communication complexity (from O(n)) through mutated Schnorr signature (integrated with timestamp anti-replay) and concatenation + hash aggregation. 2 The response efficiency is further improved by reducing the overhead of verification (from O(n)) and authentication overhead (from O(n) to O(1)) and combining multicast mechanism and block caching asynchronous response. Credit assessment is incorporated into the power generation output stability parameter, which improves the robustness of microgrid DERs. Experimental results show that the unoptimized TPS is about 100, which is increased to 4000 after optimization. At the same time, the system security and grid operation stability are enhanced. It is particularly suitable for distributed microgrid environments dominated by intermittent renewable energy, achieving higher consensus efficiency and faster transaction confirmation. For specific experimental comparison results, please refer to [link to experimental results]. Figure 4 .
[0052] like Figure 4 As shown, in simulation experiments with node sizes ranging from 4 to 64, the TPS of the algorithm of this invention reaches 4000 with 4 nodes, far exceeding the 100 of the traditional PBFT and the 230 of the comparative optimization algorithm. As the number of nodes increases, the TPS of this invention decreases slowly, maintaining 3750 TPS even at 64 nodes, while the traditional PBFT drops to 10 TPS. Regarding latency, the average latency of this invention is 45-135ms, while that of the traditional PBFT is 120-7500ms, demonstrating the superior performance of this method in high-concurrency microgrid scenarios. This invention combines credit and signature optimization to further reduce latency and improve TPS; this method places greater emphasis on the stability of microgrid output in signature aggregation and credit mechanisms, achieving higher real-time scheduling efficiency.
[0053] Furthermore, this invention underwent simulation experiments in the Go programming language environment, setting the node size to 4-64 and batch_size to 200, to simulate a high-concurrency trading scenario in a microgrid (including intermittent power generation from DERs such as photovoltaics). The experimental results are as follows... Figure 4As shown, the TPS of the algorithm in this invention is significantly better than that of the traditional PBFT and the comparative optimization algorithm: With a small number of nodes (4 nodes), the TPS of this invention is 4000, while that of the traditional PBFT is only 100, and the comparative optimization algorithm is 230; with a large number of nodes (64 nodes), the TPS of this invention decreases by only 6.25% (from 4000 to 3750), while that of the traditional PBFT decreases by 92% (from 100 to 10). Latency tests show that the average latency of this invention is 45-135ms, while that of the traditional PBFT is 120-7500ms. These results demonstrate that this method effectively alleviates the pain points of limited bandwidth and high-frequency transactions in microgrids through mutation signature aggregation and batch verification, thereby improving the overall system performance. The credit mechanism of this method places greater emphasis on output stability, further reducing the risk of consensus interruption. Attached Figure Description
[0054] Figure 1 Architecture diagram of a microgrid trading system based on optimized PBFT;
[0055] Figure 2 A schematic diagram of the dynamic leader election logic based on VRF and credit weight provided in this embodiment of the invention;
[0056] Figure 3 : A schematic diagram illustrating the principle of scalar aggregation and batch verification of variant signatures provided in this embodiment of the invention;
[0057] Figure 4 Line graph comparing the performance of the algorithm of this invention with existing technologies at different node scales; Detailed Implementation
[0058] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0059] This invention discloses a method such as Figure 1 The fast transaction method for microgrid blockchains based on optimized PBFT, as shown, is based on the core logic of combining the physical characteristics of the microgrid (output stability) for credit evaluation and reducing consensus overhead through verifiable random functions (VRF) and aggregated signature technology. It includes the following steps:
[0060] Step 1: Initialization and Credit Assessment Receive access requests from multiple distributed energy nodes (DERs) within the microgrid and construct a dynamic credit scoring model.
[0061] Step 2: Dynamic Leader Election. Using VRF combined with credit score weights, a leader for the current round is randomly elected at the beginning of each consensus cycle.
[0062] Step 3: Pre-preparation and mutation signature generation. The leader node packages the transaction block and generates a mutation signature containing physical time dimension information.
[0063] Step 4: Partial signature generation and aggregation of replica nodes to endorse the message, and signature compression is achieved through scalar summation.
[0064] Step 5: Batch verification and block submission. All network nodes perform efficient verification and upload the results to the blockchain.
[0065] Step 6: Asynchronous replies and caching accelerate and optimize the real-time confirmation experience of microgrids.
[0066] Furthermore, the specific steps of step 1 include:
[0067] Step 11: Receive access requests from multiple DERs nodes within the microgrid. Collect historical transaction completion rates, output response times, and active power fluctuations for each node.
[0068] Step 12: Clean and standardize the collected data, remove outliers and bad points, and ensure data consistency.
[0069] Step 13: Construct a dynamic credit scoring model using the weighted comprehensive evaluation method. The calculation formula is: Credit = α × P success +β×(1-P reject )+γ×σ power (7)
[0070] Where α, β, γ are preset weights, and σ power The output stability coefficient (measured by the normalized standard deviation of historical output data).
[0071] Step 14: Write the calculated credit score into a distributed credit ledger. This ledger is maintained by all nodes in the network to ensure that the credit assessment process is transparent and tamper-proof, and serves as the sole weighting basis for selecting leaders in subsequent cycles.
[0072] Step 15: Periodically perform self-calibration of the credit assessment model. Adjust the weight parameters in the formula in real time based on the node's performance in the actual consensus process (such as whether there is a timeout or whether an error message is sent) to ensure that the model can sensitively reflect the honesty of the nodes.
[0073] Furthermore, the specific steps of step 2 include (the specific logic is as follows) Figure 2 As shown):
[0074] Step 21: Candidate nodes obtain the current block height and the current consensus cycle number as election seeds.
[0075] Step 22: Calculate the VRF proof and random value. Candidate nodes use their private key and election seed to call the VRF function to generate a verifiable proof π and a pseudo-random hash output Hash. vrfThis hash value is unpredictable and unique.
[0076] Step 23: Determine the leader mapping relationship. Construct a probability distribution interval based on credit weights: assign the election probability P of nodes in the candidate set to each node. i Let it be the proportion of its credit score. Divide the interval [0, 1] into multiple segments related to P. i The corresponding non-overlapping sub-intervals.
[0077] Step 24: Select a leader. The normalized hash... vrf As a random pointer, the node whose probability sub-interval it falls into is automatically elected as the consensus leader for this round. This process ensures that the master node election is both random (resistant to attacks) and takes into account business reliability (weighting favors nodes with higher scores).
[0078] Furthermore, step 3 specifically includes the following steps:
[0079] Step 31: The leader node collects P2P electricity trading orders within the microgrid, packages them into transaction blocks, and obtains the real-time synchronization timestamp T of the distribution network.
[0080] Step 32: Generate the mutated Schnorr leader signature. Perform a mixed hash operation on the block hash, timestamp T, and the random number selected by the leader to generate the challenge value e, using the following formula:
[0081] (R,s)=Sign(sk,Hash(block_hash||timestamp||Ri)) (8)
[0082] Here, sk is the private key. By introducing a timestamp T, the signature becomes time-sensitive, effectively preventing replay attacks in high-frequency transactions of microgrids.
[0083] Step 33: Use the multicast mechanism to send pre-prepare messages to the replica nodes in the microgrid to reduce network flooding overhead in bandwidth-constrained environments.
[0084] Furthermore, the specific steps of step 4 include (the principle of which is illustrated in the figure below). Figure 3 As shown):
[0085] Step 41: The replica node verifies the leader's identity, the block's legitimacy, and the validity of the timestamp T. Upon successful verification, it generates a mutated Schnorr partial signature s based on its local private key. i Step 42: After collecting a partial number of signatures that meet the 2f+1 threshold, the collecting node (or leader) performs scalar linear aggregation. The aggregation formula is as follows:
[0086] S=∑s i (mod n) (9)
[0087] Multiple independent signature packets are compressed into a single aggregated signature message. This step reduces the communication complexity of the consensus phase from O(n^2) in traditional PBFT. 2 The value is reduced to O(n).
[0088] Furthermore, step 5 includes the following specific steps:
[0089] Step 51: All nodes in the network receive the aggregated signature message and reconstruct the aggregated public key P = ∑P using elliptic curve point addition. i Perform constant-order batch verification equations:
[0090] S·G=R+e·P (10)
[0091] Where G is the base point and R is the aggregated random point. This verification method reduces the computational cost of a node from O(n) to O(1), significantly improving the processing capacity under high-concurrency transactions.
[0092] Step 52: After successful verification, the transaction block is officially submitted to the distributed ledger to complete the electricity transaction settlement. Simultaneously, the credit ledger is updated based on the nodes' behavior in this round of consensus (such as response latency and whether there were any violations).
[0093] Furthermore, step 6 includes the following specific steps:
[0094] Step 61: Write the latest submitted block to the block cache pool in real time to support high-speed memory-level queries.
[0095] Step 62: Employing an asynchronous response mechanism, the system asynchronously replies with confirmation results to the transaction initiator while performing on-chain operations on the block. If a node needs to synchronize historical data, it responds directly through the cache pool, effectively reducing the perceived latency of high-frequency transactions in the microgrid.
Claims
1. A fast transaction method for microgrid blockchain based on optimized PBFT, characterized in that, Includes the following steps: S1, Initialization and Credit Assessment: Receive access requests from multiple distributed energy nodes (DERs) within the microgrid, construct a dynamic credit scoring model based on the historical transaction data and power generation stability parameters of each node, and store the credit scores in a distributed credit ledger. S2, Dynamic Leader Election: At the beginning of each consensus cycle, a verifiable random function (VRF) is used in conjunction with the credit score to randomly elect the leader node for this round from the set of candidate nodes whose credit scores are higher than a preset threshold, thereby realizing non-fixed role admission that adapts to the dynamic topology changes of DERs. S3, Pre-preparation and Mutant Signature: The leader node packages the power trading orders to be reached into a block, integrates the real-time operation timestamp of the distribution network with the block hash to generate a mutated Schnorr leader signature, and broadcasts the pre-preparation message to the replica nodes through a multicast mechanism; S4, Partial Signature Generation and Aggregation: After each replica node verifies the prepared message, it generates the corresponding mutated Schnorr partial signature; after collecting the partial signatures that meet the threshold, it performs a concatenation + hash aggregation operation to generate a single aggregated signature message. S5, Batch Verification and Block Submission: Each node receives the aggregated signature message and performs batch verification using elliptic curve point addition. Once verified, the transaction block is submitted to the distributed ledger, and the node credit scores in the credit ledger are updated synchronously. S6, Asynchronous Response and Caching Acceleration: Submitted blocks are written to the block cache pool, supporting asynchronous response of confirmation results to transaction nodes, and utilizing the block cache pool to quickly respond to historical block synchronization queries of nodes, achieving low-latency confirmation of high-frequency point-to-point energy transactions in microgrids.
2. The fast transaction method for microgrid blockchain based on optimized PBFT according to claim 1, characterized in that, The methods for establishing a dynamic credit scoring model in step S1 include: Step S11: Assign an initial credit score C to the newly connected distributed energy nodes (DERs) of the microgrid. init The calculation formula is: C init =0.5+0.3×rand+0.2 (1) Where rand is a generated random number in the interval [0, 1]. Step S12: Establish a creditbook to record the credit score, historical output stability parameters, and historical transaction records of each node. Step S13: After each round of transaction consensus is completed, the score in the creditBook is dynamically weighted and updated based on the node's response speed during the consensus process, the validity of the signature, and whether there is any malicious view switching behavior.
3. The fast transaction method for microgrid blockchain based on optimized PBFT according to claim 1, characterized in that, The specific steps of step S2 include: Step S21: Retrieve all candidate nodes from the creditBook and select nodes with credit scores higher than the preset threshold (0.7) to enter the consensus candidate pool for this round. Step S22: Call the verifiable random function VRF based on the crypto.Keccak256 algorithm, using the candidate node's private key and the current block height as input, to generate a verifiable random proof value. Step S23: Select the node with the smallest random proof value as the leader node of this round of consensus, thereby constructing a dynamic admission mode with non-fixed roles to avoid targeted attacks on the core nodes of the microgrid.
4. The fast transaction method for microgrid blockchain based on optimized PBFT according to claim 1, characterized in that, The specific steps of step S3 include: Step S31: The leader node obtains the real-time operating timestamp T of the distribution network through the synchronization signal. Step S32: Using a modified Schnorr signature algorithm, the hash value m of the energy transaction block to be consensused is mixed with the timestamp T, and the challenge value is calculated using the following formula: e=H(m||T||R) (2) R is the random point selected by the master node. Step S33: Generate a mutated Schnorr leader signature containing timestamp information, and use a multicast mechanism to send the PrePrepare message to the replica nodes in the corresponding microgrid shard area.
5. A fast transaction method for microgrid blockchain based on optimized PBFT according to claim 1, characterized in that, The specific steps of step S4 include: Step S41: The replica node verifies the validity of the master node's signature. If it passes, it uses its own private key d. i Generate the corresponding mutated Schnorr partial signature s i =k i +e·d i (modern) (3) Where k i A random scalar generated for the node. Step S42: The collecting node stores the received partial signatures in a structured manner according to the sequence number and node ID in the PendingSigs cache area. Step S43: When the number of collected partial signatures n≥2f+1, perform scalar aggregation processing using the formula: s i =∑s i (mod n) (4) Compressing multiple partial signatures into a single aggregate signature reduces the communication complexity from 0(n²) to 0(n).
6. The fast transaction method for microgrid blockchain based on optimized PBFT according to claim 1, characterized in that, The specific steps of step S5 include: Step S51: The receiving node reconstructs the aggregated public key P = ∑Pi and the aggregated random point R = ΣRi using the public keys of each replica node. Step S52: Perform batch verification equations based on dotted addition: sG=R+e·P (5) Where G is the base point of the elliptic curve. Step S53: If the equation holds true, the verification passes and the verification overhead is reduced from 0n to constant order 01. The block is committed and the ledger state is updated.
7. A microgrid blockchain fast transaction system based on optimized PBFT, characterized in that, include: Credit assessment and leader selection module: used to randomly select a leader node from distributed energy nodes based on VRF function and dynamic credit score model; The secure signature and communication module generates mutated Schnorr signatures containing distribution network timestamps and transmits PrePrepare messages via multicast. The signature aggregation and batch verification module performs scalar aggregation of partial signatures during the Prepare phase and performs batch verification of aggregated signatures using elliptic curve point addition during the Commit phase. The response acceleration and caching module writes committed blocks to the blockCache block cache pool and uses an asynchronous processing mechanism to support rapid responses to high-frequency P2P electricity trading results.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the microelectronic blockchain fast transaction method based on optimized PBFT as described in any one of claims 1-6.