Block chain reliability proof consensus method, system and device and medium
The performance evaluation and grouping of sub-station nodes through the blockchain network, and the consensus is implemented in combination with the sub-station node type, solving the problems of poor node tolerance and high complexity of the blockchain consensus mechanism, and achieving rapid relay protection fixed value Tuning and information security improve the system's decentralization and block stability.
Patent Information
- Application Number
- CN202411586174.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In the prior art, the node tolerance of the blockchain consensus mechanism is poor, the consensus mechanism is complex, and the system is highly destructive after key nodes are hijacked, making it difficult to achieve rapid adjustment of relay protection fixed values and information security requirements.
The performance evaluation and optimal grouping of sub-station nodes are performed through blockchain network structure information, the initial reliability is calculated, and the consensus generation of blocks is performed in combination with the sub-station node type, and broadcast verification is performed to complete the storage and update of the protected fixed value data. Reduce consensus delay and improve system efficiency and decentralization.
It realizes information security and rapid adjustment of relay protection fixed value during remote operation, prevents malicious nodes from tampering, reduces the delay in the blockchain consensus process, improves the stability of block production and the degree of system decentralization. .
Smart Images

Figure CN119203242A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of power technology and blockchain consensus technology, and in particular to a blockchain reliability proof consensus method, system, device and medium. Background Art
[0002] In recent years, with the expansion of power grids and the influx of new energy sources, system operating modes have undergone frequent changes. To adapt protection to these new scenarios, relay protection settings must also be frequently modified. Traditional relay protection setting methods, combining setting sheets with manual adjustments, are inefficient and cumbersome in this context.
[0003] How to achieve rapid setting of protection settings through remote operation of protection settings, thereby improving the adaptability of protection to the operation mode of the power system, has become the focus of research.
[0004] Key nodes in remote operation include the relay protection system master station at the dispatching end, the substations within the substation, and the protection devices. Ensuring the secure transmission of setpoints between the control center and the substations is crucial for remote operation. Traditional remote operation models are centralized. If a critical node fails, setpoints cannot be correctly distributed, resulting in serious consequences. Blockchain's decentralized, traceable, and tamper-resistant features meet the information security requirements of remote operation.
[0005] The role of a consensus mechanism is to ensure the consistency of data stored across nodes in a decentralized system. The Proof of Work (PoW) mechanism relies on the computing power of each node to ensure the normal operation of a distributed network. Nodes compete for the right to generate blocks and receive rewards by continuously adjusting their random number values. While the PoW consensus algorithm is relatively secure, its drawbacks are significant: it consumes a significant amount of power and is inefficient, and a node controlling 51% of the network's computing power may falsify data. Compared to PoW, the Proof of Stake (PoS) mechanism relies on node stake to determine the probability of generating a block, increasing consensus efficiency and reducing energy consumption. However, the Proof of Stake mechanism is prone to accumulating stake and polarization.
[0006] Therefore, how to provide a blockchain reliability proof consensus method, system, device and medium is an urgent problem to be solved. Summary of the Invention
[0007] The embodiments of the present invention provide a blockchain reliability proof consensus method, system, device and medium to solve the problems in the prior art such as poor node fault tolerance, high complexity of the consensus mechanism, and severe damage to the system after the hijacking of key nodes.
[0008] To provide a basic understanding of some aspects of the disclosed embodiments, the following is a brief summary. This summary is not intended to be an extensive review, identify key or critical elements, or delineate the scope of these embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the detailed description that follows.
[0009] According to a first aspect of an embodiment of the present invention, a blockchain reliability proof consensus method is provided.
[0010] In one embodiment, the blockchain reliability proof consensus method includes: Based on the pre-acquired blockchain network structure information, the substation nodes are evaluated for performance and optimally grouped in turn to form a substation node grouping information matrix; Calculate the initial reliability of the substation node in the blockchain network and broadcast the predefined protection value data to each substation node for temporary storage; Determine the node type of each substation based on the group information matrix, generate a block after consensus is performed based on each substation node type, and broadcast and verify the block. Complete the protection of fixed value data storage based on the block verification results; After the consensus is completed, the initial reliability of the substation node in the blockchain network is updated to obtain the new reliability, and a new block is generated based on the new reliability to update the blockchain network.
[0011] In one embodiment, the substation nodes are sequentially evaluated for performance and optimally grouped based on the pre-acquired blockchain network structure information to form a substation node grouping information matrix, including: Determine the substation node type, which includes consensus node, verification storage node and supervision node; Set the node score matrix and weight matrix of the substation node under different performance indicators, and calculate the score vector of the substation node under each performance indicator; The optimization objective function is formed and solved to obtain the optimal grouping result of the substation nodes, which is added to the block header; Form a group information matrix of the substation nodes.
[0012] In one embodiment, setting a node score matrix and a weight matrix for evaluating the substation node under different performance indicators, and calculating a score vector for the substation node under each performance indicator includes: Obtain the node index score of the substation node under the predefined performance index, and set the upper and lower boundaries of the node index score to highlight the gap between the substation node in the high score range and the low score range; According to the relationship between performance indicators and corresponding node indicator scores, performance indicators are divided into positive indicators and negative indicators, and the scoring functions of substation nodes under different indicator types are set; Based on the scoring function, the score matrix of the substation node under different performance indicators is obtained, and weights are assigned to different indicator types to obtain a weight matrix; The score matrix is combined with the weight matrix to calculate the score vector of the substation node under each performance indicator.
[0013] In one embodiment, the initial reliability of the computing substation node in the blockchain network includes: The blockchain network topology model is established using the weighted adjacency matrix, and the average distance between any two groups of substation nodes in the blockchain network is calculated through the blockchain network topology model; The network cohesion of the blockchain network is analyzed based on the average distance between any two groups of sub-station nodes, and the node contraction technology is used to contract the sub-station nodes to obtain the contracted network cohesion; The changes in network cohesion before and after contraction are analyzed and the proportion is calculated to obtain the initial reliability of the substation node in the blockchain network.
[0014] In one embodiment, the method of shrinking the substation nodes using the node shrinking technology to obtain the shrunken network cohesion includes: Calculate the ratio of the network cohesion before and after the substation node is shrunk and compare the difference with the preset value; The changes in network cohesion before and after contraction are analyzed to obtain the initial reliability of the substation nodes, and the reliability ratio of each substation node is calculated based on the initial reliability.
[0015] In one embodiment, the steps of generating a block after consensus is performed based on each substation node type, broadcasting and verifying the block, and storing the protected fixed value data based on the block verification result include: The consensus nodes compete for proof of work to generate block headers and broadcast them for verification. Each block header is distributed to each sub-station node for temporary storage, and the data in the block header is the basis for the consensus process. Compete to package blocks based on the reliability and difficulty value of the corresponding substation node in the block header, and broadcast verification after the block is generated; The block is verified by the verification storage node, and after the block verification is completed, the block is connected to the local blockchain network to complete the protection of fixed value data storage.
[0016] In one embodiment, the calculation formula for the average distance between the two groups of substation nodes is: Where, represents the average distance between two groups of substation nodes; Indicates the number of substation nodes; Indicates a substation node and substation nodes The number of edges contained in the minimum distance between them.
[0017] According to a second aspect of an embodiment of the present invention, a blockchain reliability proof consensus system is provided.
[0018] In one embodiment, the blockchain reliability proof consensus system includes: A grouping information generation module is used to perform performance evaluation and optimal grouping of substation nodes in sequence based on pre-acquired blockchain network structure information, forming a grouping information matrix of substation nodes; The node reliability calculation module is used to calculate the initial reliability of the substation node in the blockchain network and broadcast the predefined protection value data to each substation node for temporary storage; The blockchain network consensus module is used to determine the node type of each substation based on the group information matrix, generate blocks after performing consensus based on the node type of each substation, broadcast and verify the blocks, and complete the protection of fixed value data storage based on the block verification results; The blockchain network update module is used to update the initial reliability of the substation node in the blockchain network to obtain a new reliability after the consensus is completed, and generate a new block based on the new reliability to update the blockchain network.
[0019] In one embodiment, the grouping information generation module includes a substation type determination module, a performance score calculation module, an optimal grouping generation module, and a grouping matrix determination module, wherein: The substation type determination module is used to determine the substation node type, and the substation node types include consensus nodes, verification storage nodes and supervision nodes; The performance score calculation module is used to set the node score matrix and weight matrix of the performance index evaluation substation node under different performance indicators, and calculate the score vector of the substation node under each performance indicator; The optimal grouping generation module is used to form an optimization objective function and solve the optimal grouping result of the substation nodes, and add it to the block header; The grouping matrix determination module is used to form a grouping information matrix of the substation nodes.
[0020] In one embodiment, the performance score calculation module includes a node index scoring module, an index partitioning module, a matrix generation module and a score vector calculation module, wherein: The node index scoring module is used to obtain the node index scores of the substation nodes under predefined performance indicators and set the upper and lower boundaries of the node index scores to highlight the gap between the substation nodes in the high score interval and the low score interval; The indicator classification module is used to classify the performance indicators into positive indicators and negative indicators according to the relationship between the performance indicators and the corresponding node indicator scores, and set the scoring functions of the substation nodes under different indicator types; The matrix generation module is used to obtain a score matrix of the substation node under different performance indicators based on the score function, and assign weights to different indicator types to obtain a weight matrix; The scoring vector calculation module is used to combine the scoring matrix with the weight matrix to calculate the scoring vector of the substation node under each performance indicator.
[0021] In one embodiment, the node reliability calculation module includes an average distance calculation module, a network cohesion analysis module and a reliability generation module, wherein: The average distance calculation module is used to calculate the average distance between any two groups of substation nodes in the blockchain network; The network cohesion analysis module is used to analyze the network cohesion of the blockchain network based on the average distance between any two groups of substation nodes, and to shrink the substation nodes using the node shrinkage technology to obtain the shrunken network cohesion; The reliability generation module is used to analyze the changes in network cohesion before and after contraction and perform ratio calculations to obtain the initial reliability of the substation node in the blockchain network.
[0022] In one embodiment, the network cohesion analysis module includes a cohesion comparison module and a reliability ratio calculation module, wherein: The cohesion comparison module is used to calculate the ratio of the network cohesion before and after the substation node is contracted and compare the difference with the preset value; The reliability ratio calculation module is used to analyze the change in network cohesion before and after contraction to obtain the initial reliability of the substation nodes, and calculate the reliability ratio of each substation node based on the initial reliability.
[0023] In one embodiment, the blockchain network consensus module includes a block header generation module, a block generation module, and a block verification module, wherein: The block header generation module is used to generate block headers through proof-of-work competition by consensus nodes and broadcast them for verification, and distribute each block header to each substation node for temporary storage. During the consensus process, the data in the block header shall prevail; The block generation module is used to compete for block packaging based on the reliability and difficulty value of the corresponding substation node in the block header, and broadcast verification after the block is generated; The block verification module is used to verify the block by verifying the storage node, and after the block verification is completed, the block is connected to the local blockchain network to complete the protection of the fixed value data storage.
[0024] In one embodiment, the calculation formula for the average distance between the two groups of substation nodes is: Where, represents the average distance between two groups of substation nodes; Indicates the number of substation nodes; Indicates a substation node and substation nodes The number of edges contained in the minimum distance between them.
[0025] According to a third aspect of an embodiment of the present invention, a computer device is provided.
[0026] In one embodiment, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0027] According to a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided.
[0028] In one embodiment, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0029] The technical solution provided by the embodiment of the present invention may have the following beneficial effects: (1) The present invention uses the control center and the substation relay protection system substation as nodes in the blockchain, introduces blockchain technology into the remote operation process of relay protection setting, gives full play to the characteristics of blockchain such as decentralization, tamper-proofing, and traceability, and ensures the information security of relay protection setting during remote operation.
[0030] (2) The present invention fully utilizes the node performance through the blockchain node classification and grouping and reliability evaluation mechanism, and influences the consensus process through the node reliability, thereby ensuring that legitimate nodes package and generate correct and reliable blocks containing fixed value information, while preventing malicious nodes from tampering with or attacking the fixed value information during the consensus process.
[0031] (3) The present invention reduces the delay of the blockchain consensus process through the consensus mechanism and consensus process of blockchain reliability proof, improves efficiency and increases the stability of block generation. Furthermore, through the consensus mechanism, the probability of honest nodes generating blocks is made more even, avoiding the concentration of "rights and interests" and increasing the degree of decentralization of the system.
[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0034] Figure 1This is a flowchart of a blockchain reliability proof consensus method according to an exemplary embodiment; Figure 2 This is a principle block diagram of a blockchain reliability proof consensus system according to an exemplary embodiment; Figure 3 is a structural diagram of a computer device according to an exemplary embodiment; Figure 4 This is a schematic diagram of a blockchain data structure suitable for protecting remote operation and storage of fixed values in a blockchain reliability proof consensus method according to an exemplary embodiment; Figure 5 This is a schematic diagram showing a comparison of block generation by consensus nodes in a blockchain reliability proof consensus method according to an exemplary embodiment; Figure 6 This is a schematic diagram showing how the reliability of a substation node changes with the number of consensus rounds in a blockchain reliability proof consensus method according to an exemplary embodiment. DETAILED DESCRIPTION
[0035] As used herein, unless otherwise specified, the term "plurality" means two or more.
[0036] In this document, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.
[0037] In this article, the term "and / or" is used to describe the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0038] It should be understood that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0039] Each module in the device or system of the present application can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
[0040] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0041] Figure 1 An embodiment of the blockchain reliability proof consensus method of the present invention is shown.
[0042] In this optional embodiment, the blockchain reliability proof consensus method includes: Step S101: Based on the pre-acquired blockchain network structure information, the substation nodes are sequentially evaluated for performance and optimally grouped to form a substation node grouping information matrix; Step S103: Calculate the initial reliability of the substation node in the blockchain network and broadcast the predefined protection value data to each substation node for temporary storage; Step S105: Determine the node type of each substation based on the grouping information matrix, generate a block after consensus is performed based on the node type of each substation, broadcast and verify the block, and complete the storage of the protection fixed value data based on the block verification result; Step S107: After consensus is reached, the initial reliability of the substation node in the blockchain network is updated to obtain a new reliability, and a new block is generated based on the new reliability to update the blockchain network.
[0043] In this optional embodiment, the substation nodes are sequentially evaluated for performance and optimally grouped based on the pre-acquired blockchain network structure information to form a substation node grouping information matrix, including: Determine the substation node type, which includes consensus nodes, verification storage nodes, and supervision nodes; set performance indicators to evaluate the node score matrix and weight matrix of the substation nodes under different performance indicators, and calculate the score vector of the substation nodes under each performance indicator; form an optimization objective function and solve it to obtain the optimal grouping result of the substation nodes, and add it to the block header; form a grouping information matrix of the substation nodes.
[0044] In this optional embodiment, setting a node score matrix and a weight matrix for evaluating the substation node under different performance indicators, and calculating a score vector for the substation node under each performance indicator includes: Obtain the node indicator score of the substation node under the predefined performance indicators, and set the upper and lower boundaries of the node indicator score to highlight the gap between the substation node in the high score range and the low score range; divide the performance indicators into positive indicators and negative indicators according to the relationship between the performance indicators and the corresponding node indicator scores, and set the scoring function of the substation node under different indicator types; obtain the score matrix of the substation node under different performance indicators based on the scoring function, and assign weights to different indicator types to obtain a weight matrix; combine the score matrix with the weight matrix to calculate the score vector of the substation node under each performance indicator.
[0045] In this optional embodiment, the steps of achieving optimal grouping of substation nodes include: First, determine the number of nodes under each node type. All nodes must be allocated and each node must belong to only one node type. To fully utilize the node performance, set corresponding weights for the performance scores, calculate the node scores under different node types, and form the optimization objective function. The objective function is the score of all nodes. The sum of is maximized. Solve the corresponding 0-1 integer programming problem to obtain the optimal grouping result of the substation nodes. The optimal grouping result is added to the block header in the form of a matrix for the entire network to obtain in order to execute the subsequent consensus process.
[0046] In this optional embodiment, the initial reliability of the computing substation node in the blockchain network includes: A blockchain network topology model is established using a weighted adjacency matrix, and the average distance between any two groups of substation nodes in the blockchain network is calculated through the blockchain network topology model. The network cohesion of the blockchain network is analyzed based on the average distance between any two groups of substation nodes, and the node shrinkage technology is used to shrink the substation nodes to obtain the network cohesion after shrinkage. The changes in network cohesion before and after shrinkage are analyzed and the proportion is calculated to obtain the initial reliability of the substation nodes in the blockchain network.
[0047] In this optional embodiment, the method of shrinking the substation nodes using the node shrinking technology to obtain the shrunken network cohesion includes: The ratio of the network cohesion before and after the substation node contraction is calculated and the difference is compared with the preset value; the change in network cohesion before and after the contraction is analyzed to obtain the initial reliability of the substation node, and the reliability ratio of each substation node is calculated based on the initial reliability.
[0048] In this optional embodiment, the steps of generating a block after consensus is performed based on each substation node type, broadcasting and verifying the block, and completing the storage of the protection fixed value data based on the block verification result include: The consensus nodes compete for proof of work to generate block headers and broadcast verification, and distribute each block header to each substation node for temporary storage. During the consensus process, the data in the block header shall prevail. The blocks are packaged according to the reliability and difficulty value of the corresponding substation node in the block header, and broadcast verification is performed after the block is generated. The blocks are verified by the verification storage node, and after the block verification is completed, the blocks are connected to the local blockchain network to complete the protection of fixed value data storage.
[0049] In this optional embodiment, the node reliability is calculated The steps include comprehensively considering the reliability of substation nodes in terms of the communication network topology and their contribution to the blockchain network, and proposing a node reliability evaluation that combines the two. Initial reliability is positively correlated with the reliability of the communication network topology. Subsequent reliability, based on the initial reliability, varies continuously with the node's performance in the blockchain network within a grouping cycle. Consensus nodes increase their probability of block packaging by improving node reliability. After the supervisory node updates and calculates the reliability of the substation node, it generates a node reliability matrix and adds it to the block header for network-wide access. Consensus nodes, based on their node reliability in the block header and after collecting substation relay protection setting data, compete to package the block.
[0050] In this optional embodiment, substation nodes are divided into three categories based on the computing power, data storage capacity, network status, etc. of each node. Each type of node (all nodes are substation nodes) plays a different role in maintaining the normal operation of the blockchain network. The substation node types include: 1) Consensus Node: A consensus node is an important participant in the system (referring to the block network system composed of the control center and the substation nodes of the substation relay protection system). It is responsible for verifying the fixed value information in the network, competing to generate blocks, verifying blocks, and broadcasting blocks to other nodes.
[0051] 2) Verification Storage Node: Verification Storage Node does not participate in block generation. It is responsible for forwarding information in the network, verifying the blocks generated by the consensus node, and storing the complete fixed-value data of the blockchain for query.
[0052] 3) Supervisory Node: Supervisory nodes are responsible for supervising the execution of the consensus and ensuring the stability and fairness of the system. They are mainly responsible for network monitoring, recording node behavior, and updating node reliability.
[0053] The number of each type of node can be set according to the system situation, and the number of consensus nodes and verification storage nodes should not be too small.
[0054] Node capabilities are evaluated using hardware performance, storage performance, and network performance, with multiple, non-overlapping metrics set for each performance level. When scoring node metrics, upper and lower score boundaries are set. Within these boundaries, a concave scoring function is used to minimize the gap between nodes when their scores are low and widen it when their scores are high. This facilitates the selection of high-performing nodes during subsequent node grouping optimization. A hierarchical analysis method (AHP) is used to weight each metric under each of the three performance levels, resulting in a scoring vector for each node under each of the three performance levels.
[0055] In this optional embodiment, the node reliability is calculated Including: Calculating the reliability of substation nodes in the communication network topology , using the weighted adjacency matrix Describe the blockchain substation node network topology model, where the edge weight is the inverse of the link communication capacity. First, calculate the average distance between any two nodes in the network, and use the weighted average shortest path length To express; then calculate the tightness of the entire network, using cohesion To express it, it is related to the number of nodes , weighted average shortest path length Inversely proportional to the reliability to be calculated After the nodes are contracted, a new network is obtained. The change in the cohesion of the new network is the reliability of the node. , which is also the initial reliability before consensus execution.
[0056] In this optional embodiment, the calculated reliability include: Node contraction merges the node and all directly connected nodes into a new node. Whether the new node is connected to the remaining nodes depends on the connection relationship between the merged node and the remaining nodes. The corresponding edge weight is expressed as the weighted average of the edge weights of the merged node and the remaining nodes.
[0057] The calculation process of network cohesion is as follows: first calculate the ratio of network cohesion before contraction to network cohesion after contraction, and then subtract the ratio from 1 to ensure node reliability. Take values within a certain range.
[0058] Calculated Then calculate the reliability ratio of each node, so that the node reliability distribution is within the range of [0, 1]. Updates are performed at intervals of one packet period.
[0059] In this optional embodiment, the computing node reliability Including: computing the reliability of nodes in the blockchain network , mainly judged by its behavior in four aspects, thereby quantifying its ability to maintain the normal operation of the blockchain network.
[0060] The four aspects of behavior are: whether the consensus node successfully generates a valid block within a grouping cycle; whether the node successfully verifies the block, with both valid blocks and invalid blocks considered successfully verified; whether the node engages in malicious behavior, including generating invalid blocks, not participating in block verification, or failing to verify a block; and whether the node does not participate in block generation. As consensus progresses, the probability of nodes that have not engaged in malicious behavior or generated blocks being included in the block increases, improving the system's decentralization.
[0061] The reliability of nodes that successfully generate and verify blocks Difference, node initial reliability The maximum difference between Quantify the weights of the four node behaviors to eliminate the initial reliability of the nodes Impact on node block generation.
[0062] In this optional embodiment, the blockchain data structure suitable for protecting remote operation and storage of fixed values includes: The block body that stores the relay protection device setting data and the block header of the system's key operating information.
[0063] The relay protection device setting data is stored in the block in the form of setting files or other forms, which can be regarded as "transactions" to establish a Merkle tree structure. The key setting information of a substation node to be remotely operated is encrypted with the public key of the node. Only with the private key of the node can the data be decrypted, preventing attackers from easily obtaining all key setting information data. The block header contains the basic information of the blockchain and key information for system operation. The basic information includes the hash value of the previous block, the block number, the timestamp, the Merkle tree root hash, the random number, and the uniform difficulty value of the entire network. .
[0064] Key information for system operation includes: the substation node that generates the block header ; The protection device number matrix corresponding to the fixed value information stored in this block ; Matrix of the number of three types of nodes ; After completing the optimal grouping and the matrix Corresponding, sequentially arranged substation number matrix ; Node reliability matrix arranged in order Consensus nodes use the information in the block header to compete to complete the block packaging work, verify that the storage nodes completely save the blockchain data, and the supervision nodes update the block header information in a timely manner.
[0065] In this optional embodiment, the consensus process based on reliability proof further includes: In the consensus process without executing group, the control center only needs to broadcast the fixed value information data, matrix , Difficulty Value When other substation nodes broadcast fixed value information data, they perform the same consensus operation. When executing a remote fixed value operation, the control center broadcasts the number of the protection device whose fixed value is to be modified. The corresponding substation protection device broadcasts the fixed value template file, and the system performs a consensus operation. The control center fills in the fixed value template file and broadcasts the information, and the system performs a consensus operation again. Once completed, the relay protection fixed value data and remote operation records will be stored in the blockchain to prevent data tampering and facilitate query.
[0066] In this optional embodiment, the calculation formula for the average distance between the two groups of substation nodes is: Where, represents the average distance between two groups of substation nodes; Indicates the number of substation nodes; Indicates a substation node and substation nodes The number of edges contained in the minimum distance between them.
[0067] Figure 2 An embodiment of the blockchain reliability proof consensus system of the present invention is shown.
[0068] In this optional embodiment, the blockchain reliability proof consensus system includes: The grouping information generation module 201 is used to sequentially evaluate the performance and optimally group the substation nodes based on the pre-acquired blockchain network structure information to form a grouping information matrix of the substation nodes; The node reliability calculation module 203 is used to calculate the initial reliability of the substation node in the blockchain network and broadcast the predefined protection value data to each substation node for temporary storage; The blockchain network consensus module 205 is used to determine the node type of each substation based on the grouping information matrix, generate blocks after performing consensus based on the node type of each substation, broadcast and verify the blocks, and complete the storage of protected fixed value data based on the block verification results; The blockchain network update module 207 is used to update the initial reliability of the substation node in the blockchain network to obtain a new reliability after the consensus is completed, and generate a new block based on the new reliability to update the blockchain network.
[0069] In this optional embodiment, the grouping information generation module includes a substation type determination module, a performance score calculation module, an optimal grouping generation module and a grouping matrix determination module, wherein: The substation type determination module is used to determine the substation node type, which includes consensus nodes, verification storage nodes and supervision nodes; the performance score calculation module is used to set the node score matrix and weight matrix of the performance index evaluation substation node under different performance indicators, and calculate the score vector of the substation node under each performance indicator; the optimal grouping generation module is used to form an optimization objective function and solve it to obtain the optimal grouping result of the substation node, and add it to the block header; the grouping matrix determination module is used to form the grouping information matrix of the substation node.
[0070] In this optional embodiment, the performance score calculation module includes a node index scoring module, an index partitioning module, a matrix generation module and a score vector calculation module, wherein: The node indicator scoring module is used to obtain the node indicator score of the substation node under predefined performance indicators, and set the upper and lower boundaries of the node indicator score to highlight the gap between the substation node in the high score interval and the low score interval; the indicator division module is used to divide the performance indicators into positive indicators and negative indicators according to the relationship between the performance indicators and the corresponding node indicator scores, and set the scoring function of the substation node under different indicator types; the matrix generation module is used to obtain the scoring matrix of the substation node under different performance indicators based on the scoring function, and assign weights to different indicator types to obtain a weight matrix; the scoring vector calculation module is used to combine the scoring matrix with the weight matrix to calculate the scoring vector of the substation node under each performance indicator.
[0071] In this optional embodiment, the node reliability calculation module includes an average distance calculation module, a network cohesion analysis module and a reliability generation module, wherein: The average distance calculation module is used to calculate the average distance between any two groups of substation nodes in the blockchain network; the network cohesion analysis module is used to analyze the network cohesion of the blockchain network based on the average distance between any two groups of substation nodes, and use the node shrinkage technology to shrink the substation nodes to obtain the network cohesion after shrinkage; the reliability generation module is used to analyze the changes in network cohesion before and after shrinkage and perform proportion calculation to obtain the initial reliability of the substation nodes in the blockchain network.
[0072] In this optional embodiment, the network cohesion analysis module includes a cohesion comparison module and a reliability ratio calculation module, wherein: The cohesion comparison module is used to calculate the ratio of the network cohesion before and after the substation node is contracted and then compare the difference with the preset value; the reliability ratio calculation module is used to analyze the changes in the network cohesion before and after the contraction to obtain the initial reliability of the substation node, and calculate the reliability ratio of each substation node based on the initial reliability.
[0073] In this optional embodiment, the blockchain network consensus module includes a block header generation module, a block generation module and a block verification module, wherein: The block header generation module is used to generate block headers through proof-of-work competition by consensus nodes and broadcast verification, and distribute each block header to each substation node for temporary storage, and the data in the block header shall be used as the basis during the consensus process; the block generation module is used to compete to package blocks according to the reliability and difficulty value of the corresponding substation node in the block header, and broadcast verification after the block is generated; the block verification module is used to verify the block through the verification storage node, and after the block verification is completed, the block is connected to the local blockchain network to complete the protection of fixed value data storage.
[0074] In this optional embodiment, the calculation formula for the average distance between the two groups of substation nodes is: Where, represents the average distance between two groups of substation nodes; Indicates the number of substation nodes; Indicates a substation node and substation nodes The number of edges contained in the minimum distance between them.
[0075] The present invention will be further described in detail below with reference to specific embodiments.
[0076] The substation relay protection system substation is used as the node of the blockchain. The control center determines the number of substation node types based on the current network structure and node status, and performs performance evaluation and optimal grouping of nodes (nodes are substation nodes) to form a grouping information matrix. N and S G , calculate node reliability R (Node reliability R (for initial reliability) and then broadcast the protection setting value and other information; The nodes confirm their node type according to the grouping situation, and the consensus nodes compete for simple proof of work to generate block headers, and then determine the reliability of the block headers. R and difficulty value, competing to generate blocks with a certain data structure and broadcast them; In addition to the supervisory node, other nodes verify the block, the verification storage node connects the block to the local blockchain, and the supervisory node updates the node reliability based on the performance of other nodes. R And recalculate the random number, update the block and broadcast; After updating the blocks, the control center determines whether to regroup and calculate the reliability based on the system operation status, the number of blocks, etc.
[0077] The present invention reduces the delay of the blockchain consensus process, increases the stability of block generation, avoids the concentration of block generation nodes, and increases the degree of decentralization of the system. At the same time, under the proposed consensus mechanism, the probability of malicious nodes generating blocks is greatly reduced, ensuring the reliability and security of fixed value information when it is remotely distributed and executed.
[0078] In this optional embodiment, determining the number of substation types and evaluating node performance includes: Substation nodes are divided into three categories based on their computing power, data storage capacity, network status, etc. Each type of node plays a different role in maintaining the normal operation of the blockchain network.
[0079] 1) Consensus Nodes: Consensus nodes are key participants in the system, responsible for verifying fixed-value information in the network, competing to generate blocks, verifying blocks, and broadcasting blocks to other nodes. Consensus nodes require high hardware performance and information processing capabilities.
[0080] 2) Verification Storage Nodes: Verification Storage Nodes do not participate in block generation. Instead, they are responsible for forwarding information within the network, verifying blocks generated by consensus nodes, and storing complete fixed-value data on the blockchain for query purposes. Verification Storage Nodes do not require high hardware performance, but do require strong storage capacity.
[0081] 3) Supervisory Nodes: Supervisory nodes are responsible for monitoring the execution of consensus and ensuring system stability and fairness. They are primarily responsible for network monitoring, recording node behavior, and updating node reliability. Supervisory nodes require good network communication performance.
[0082] The number of each type of node can be set according to the system situation. The number of consensus nodes and verification storage nodes should not be too small. The ratio of the three can be set to 5:4:1.
[0083] Node capabilities are evaluated using hardware, storage, and network performance, with four unique indicators set for each performance category. Ultimately, the optimal grouping is achieved based on the scores of these three performance categories, aligning node capabilities with node types. The results of the indicator selection for evaluating substation node capabilities in a substation relay protection system are shown in Table 1.
[0084] When scoring node indicators, set upper and lower bounds for the scores. The maximum score for each indicator is 10 points. The upper and lower bounds for each indicator score are shown in Table 1.
[0085] Table 1: Upper and lower bounds of indicator scores , In order to highlight the gap between nodes in the high-score range and the low-score range, the scoring function adopts a quadratic concave function, which reduces the score gap between multiple nodes when the scores are all low, and widens the score gap when the scores are all high, making it easier to screen out nodes with stronger performance during subsequent node grouping optimization.
[0086] According to indicator data The relationship between the size of the corresponding score is divided into positive indicators and negative indicators, and the scoring function is set under the two indicator types. , whose expressions include: ; ; Where, 、 Represent the set boundaries of performance indicators, Indicates the original data of the indicator (that is, the measured data of the node in various indicators, such as the specific CPU usage, the node computing power, etc.), Indicates the node corresponding score, represents the score function under the positive indicator, Represents the score function under the positive indicator.
[0087] After the performance evaluation of the corresponding indicators of the node is completed, the score matrix of the node under different performance indicators is obtained P H , P S , P N After the scores are determined, the weights of each indicator corresponding to the performance requirements in different aspects should also be determined to obtain the final scores for the three aspects of performance.
[0088] By node score matrix and the weight matrix Compute the scoring vector of the node under three performance conditions Then, according to the performance requirements of different types of nodes, the optimal node grouping is achieved through 0-1 integer programming, where the score vector The expression is: ; Where, represents the rating vector, Represents the node's score matrix under hardware performance, storage performance, and network performance respectively; Represents the weight matrix of the node under hardware performance, storage performance, and network performance respectively; The matrix is The score matrix of each node under three performances is The matrix, The matrix represents the weights of the importance of the four indicators when evaluating each node's performance. This matrix needs to be determined using a more objective evaluation method such as the hierarchical analysis method. The weight matrix here is used to calculate the node performance score, which is different from the weight matrix used later for the node grouping optimization problem.
[0089] The indicator weight matrix under the three performances is determined by using the indicator weight method such as the hierarchical analysis method as shown below: ; In this optional embodiment, achieving optimal grouping of substation nodes includes: The performance of relay protection substation nodes in different substations varies greatly. Assigning them to node types that are appropriate to their capabilities will help fully utilize the performance of substation nodes and improve the operating efficiency of the entire system.
[0090] The constraints and objective function for this problem are described as follows: First, the number of nodes under each node type is determined. All nodes must be allocated and each node must belong to only one node type. To fully utilize node performance, the roles and performance requirements of the three types of nodes in the blockchain network are comprehensively considered. The performance scores are assigned corresponding weights, and the node scores for different node types are calculated to form the optimization objective function. The performance score weight matrix expression is: ; Taking the consensus node as an example, its score for optimizing the objective function is: Where, The objective function is a 0-1 integer optimization function. The node grouping with the maximum score is the optimal grouping corresponding to the highest system efficiency. for Scores of the node under three performance conditions.
[0091] The objective function is the score of all nodes Z The sum of takes the maximum value, and its expression is: ; The above problem is established into a 0-1 integer programming model: ; Where, is the number of nodes; is the number of node types, with a value of 3, indicating three types of nodes; Represents a collection of nodes, ; Represents a set of node types, ; Indicates the number of nodes under each type, ; Represents decision variables, nodes Classified into type If yes, it is 1, otherwise it is 0. , ; Representation node No. Performance ratings, , , representing hardware performance, storage performance, and network performance respectively; Indicates the Class node The weight of each performance , .
[0092] Solve this 0-1 integer programming problem to obtain the optimal grouping of substation nodes. The grouping results are added to the block header in the form of a matrix for the entire network to access and execute the subsequent consensus process. Because the performance of substation nodes in the substation relay protection system is relatively stable and changes little in a short period of time, a grouping cycle is specified, and the grouping operation is performed after every 10 rounds of consensus.
[0093] In this optional embodiment, the node reliability is calculated R include: This approach combines the reliability of substation nodes in the communication network topology and their contribution to the blockchain network, and proposes a node reliability evaluation method that combines these two factors. Initial reliability is positively correlated with the reliability of the communication network topology. Subsequent reliability, based on initial reliability, varies with the node's performance within the blockchain network within a grouping cycle. Consensus nodes increase their probability of block packaging by improving node reliability, enabling more reliable nodes to generate blocks and achieving secure storage of fixed-value data.
[0094] The expression for defining the reliability of the substation node is: ; Where, and Represents the reliability of the node in two aspects, The determination should be based on This is to adapt to the calculation method of the blockchain, so as to avoid the nodes being continuously affected by the initial reliability during the process of generating blocks.
[0095] After the supervisory node updates and calculates the reliability of the substation node, it generates a node reliability matrix and adds it to the block header for the entire network to obtain. The consensus node collects the substation relay protection setting data based on the reliability of the node in the block header, and then competes to package the block according to the following formula, where the difficulty value is Adjustments can be made at any time according to the system status: ; Where, It is a hash digest algorithm that converts input information into a 256-bit hash value; is the random number in the block header data, That is, the remaining data information other than the random number in the block header.
[0096] First, the node that generates the block broadcasts it, and other nodes verify it. After passing the verification, the verification storage node connects the new block to the chain. The supervision node promptly updates the node reliability matrix and updates the block, and this round of consensus is completed.
[0097] In this optional embodiment, the node reliability is calculated include: The ability of a substation node to reliably maintain the normal operation of the blockchain network is closely related to its importance in the network topology. , and quantify its impact.
[0098] The blockchain peer-to-peer network is abstracted as a weighted network topology model, using a weighted adjacency matrix W describe: ; Where, Indicates the number of substation nodes, Represents a connected node and The edge weight is 0, which represents the node itself, greater than 0 represents the edge weight, and infinity represents that the two nodes are not connected. The inverse of the link communication capacity is used as the edge weight.
[0099] The weighted average shortest path length is used to measure the average distance between any two nodes in the network. Its calculation formula is: ; Where, represents the average distance between any two nodes in the network, Indicates the number of nodes, Substation node and substation nodes The number of edges contained in the minimum distance between them.
[0100] The node contraction method is used to measure the reliability of nodes in the network. Node contraction involves merging the node and all directly connected nodes into a new node. Whether the new node is connected to the remaining nodes depends on the connection relationship between the merged node and the remaining nodes. The corresponding edge weight is expressed as the weighted average of the edge weights of the merged node and the remaining nodes.
[0101] Before the nodes shrink, the density of the network is measured by cohesion. It is related to the number of nodes and the weighted average shortest path length, where the calculation formula for the density of the network is: ; After the node is contracted, the density of the network will be affected. Therefore, the change of network cohesion before and after contraction is used to measure the reliability of the substation node. After calculating the proportion, we get , reliability of substation nodes The calculation formula is: ; Where, The cohesion is used to express the closeness of the network. represents the average distance between any two nodes in the network, Indicates the number of nodes.
[0102] In this optional embodiment, the node reliability is calculated include: The reliability of a node in a blockchain network is mainly judged by its behavior in four aspects, thereby quantifying its ability to maintain the normal operation of the blockchain network. To ensure that the reliability measurement values of the two aspects are in the range of [0, 1], Calculate the proportion to get the reliability , reliability of substation nodes The calculation formula is: ; Where, Indicates the number of times a consensus node successfully generates valid blocks within a grouping period. It is reset to 0 at the end of a grouping period to prevent the node from continuously generating blocks. Indicates the number of times a node successfully verifies a block. Passing a valid block and discarding an invalid block are both considered successful block verification. Indicates the number of times the node has not engaged in malicious behavior, including generating invalid blocks, not participating in block verification, failing to verify blocks, etc. Indicates the number of times a node did not participate in generating blocks. As the consensus progresses, the probability of nodes that have not generated malicious behavior and blocks packaging blocks continues to increase, thereby improving the degree of decentralization of the system.
[0103] Since the substation nodes are not anonymous in joining the blockchain network and are less likely to be attacked, the probability of malicious behavior is low. Therefore, the node's block generation probability can be determined based on the node's performance in the blockchain network. The reliability of the node that successfully generates and verifies the block is determined by the node's performance in the blockchain network. Difference, node initial reliability The maximum difference is calculated to obtain four weight values and To reduce the initial reliability of the node The impact on node block generation is expressed as follows: ; Where, is the number of consensus nodes, are the initial highest and lowest reliability, These are the nodes with the highest and lowest initial reliability, and their reliability after successfully packaging and verifying the block.
[0104] In determining With each weight After that, you can adjust it as needed The value of , thereby adjusting the node's initial reliability and its performance in the blockchain network to the final reliability The degree of influence of the blockchain can be adjusted to adjust the concentration of block nodes.
[0105] Blockchain data structures suitable for protecting remote operations and storage of fixed values, such as Figure 4 shown.
[0106] The relay protection device setting data is stored in the block in the form of setting files or other forms, which can be regarded as "transactions" to establish a Merkle tree structure. The key setting information of a substation node to be remotely operated is encrypted with the public key of the node. Only with the private key of the node can the data be decrypted, preventing attackers from easily obtaining all key setting information data. The block header contains the basic information of the blockchain and key information for system operation. The basic information includes the hash value of the previous block, the block number, the timestamp, the Merkle tree root hash, the random number, and the uniform difficulty value of the entire network. The key information of system operation includes: the substation node that generates the block header ; The protection device number matrix corresponding to the fixed value information stored in this block ; Matrix of the number of three types of nodes ; After completing the optimal grouping, and the matrix Corresponding, sequentially arranged substation number matrix ; Node reliability matrix arranged in order Consensus nodes use the information in the block header to compete to complete the block packaging work, verify that the storage nodes completely save the blockchain data, and the supervision nodes update the block header information in a timely manner.
[0107] The blockchain consensus process based on reliability proof includes: (1) The control center determines the number of substation node types based on the current network structure and node status. After node performance evaluation and optimal grouping, a grouping information matrix is formed. and .
[0108] (2) The control center evaluates the reliability of the substation nodes of the substation relay protection system based on the system structure information. Calculation is performed. Since there is no consensus, the reliability of the node in the blockchain network is 0, so the reliability matrix formed Contains only .
[0109] (3) The control center will send the relay protection setting data and the above And unified difficulty value After the information is successfully verified, it will be temporarily stored and ready to execute the consensus.
[0110] (4) Nodes confirm their node types based on their grouping. Consensus nodes compete to generate block headers and broadcast verification by performing proof-of-work with a simple difficulty. This difficulty can be uniformly specified to reduce the probability of branch chains. After each node obtains the block header, it is temporarily stored, and the subsequent consensus process is based on the data in the block header.
[0111] (5) Consensus nodes compete to package blocks based on their reliability and difficulty in the block header. A node with a higher reliability has a greater probability of generating a block. After a block is generated, it is broadcast for verification.
[0112] (6) Except for the supervisory node, other nodes verify the block. After the verification storage node successfully verifies the block, it connects the block to the local blockchain to complete the storage of fixed value information.
[0113] (7) After consensus is reached, the supervisory node will promptly update the node reliability matrix based on the performance of other nodes. R , and according to S H The random number is recalculated with the corresponding new reliability to satisfy the competitive packing block formula to generate the updated block. The supervisory node broadcasts the new block to the entire network. After the node verifies successfully, the last block on the chain is updated. After a grouping cycle, the node's B p The data are reset to zero and the control center regroups and calculates the reliability.
[0114] (8) In the consensus process without executing group, the control center only needs to broadcast the fixed value information data, matrix S P , Difficulty Value d That's it.
[0115] The blockchain reliability proof consensus method of the present invention is described in detail below with reference to specific embodiments.
[0116] Establish the topological structure of 27 substation nodes in the blockchain network, calculate the index scores of the substation nodes, and then calculate the final scores of each node in three performance aspects to form a matrix .
[0117] The number of node types for substation nodes is divided into 5:4:1 ratios. The numbers of nodes of three types are rounded to 14, 11, and 2 respectively. After the score calculation is completed, the 0-1 integer programming problem of the optimal grouping is solved, and the optimal node grouping is obtained as shown in Table 2.
[0118] Table 2: Optimal node grouping
[0119] A 27-node blockchain model system was built to simulate the PoRel consensus mechanism. The initial node grouping is shown in Table 2. The program was run on a seventh-generation i7 processor, 16GB of RAM, Windows 10, Python version 3.11.0 64-bit, and the SHA-256 digest algorithm. Ten rounds of consensus were performed within a given grouping period to validate the proposed method.
[0120] Calculated from the initial reliability of the consensus node Take 70, weight When , the difference effect of initial reliability can be eliminated.
[0121] Since the correct generation of blocks is the most critical link in the remote operation and safe storage of relay protection setting data, the main focus is on the block generation status, behavior and reliability changes of the consensus nodes responsible for competing for block generation.
[0122] By adjusting The value of , thereby changing the impact of initial reliability on node block generation, and then we can observe the impact of the correlation coefficient on the equity concentration of the proposed consensus algorithm, as well as the difference with the PoS algorithm. λ The distribution of nodes producing blocks during the 50-round consensus of the PoS algorithm is as follows: Figure 5 shown.
[0123] Compared with the PoS consensus algorithm, the block generation probability distribution of each node in the PoRel mechanism is relatively uniform. Unlike the PoS mechanism, the nodes with greater "equity" pack more blocks more often, which shows a centralized trend. This verifies the fairness of the proposed mechanism. When the node is generated, the initial reliability of the node and the node's behavior in the blockchain network have the same influence on the node's generation of blocks. Therefore, it can be seen that the block generation is centralized to a certain extent at this time, and the nodes that pack blocks more times are all nodes with higher initial reliability.
[0124] As you can see, adjustment The value of can change the impact of initial reliability on block generation. The lower it is, the more the nodes are affected by the initial reliability, and the more concentrated the block generation is; conversely, the more uniform the block generation is, the higher the degree of decentralization is.
[0125] The design of the PoRel consensus mechanism avoids the concentration of "equity", improves the degree of decentralization, and ensures the security of the relay protection setting value data on-chain, thereby providing security for remote setting value operations.
[0126] Take 70, select substation nodes S4, S6, S8, S11, S12, S17, S20, S21, S22, S24, and their reliability changes with the number of consensus rounds as follows Figure 6 As shown in the figure, the arrows represent the substation nodes responsible for packaging blocks in each round of consensus process.
[0127] After successfully generating a block, node reliability decreases. As consensus progresses, the block-generating nodes constantly change, avoiding the risk of tampering caused by the nodes continuously generating blocks. Substation nodes S6 and S11 maintained good behavior throughout the consensus process, successfully generating valid blocks and verifying blocks, thereby gaining more opportunities to package blocks.
[0128] Substation node S12 failed to successfully verify the block in the second and fourth rounds, and substation node S24 failed to successfully verify the block in the fourth and fifth rounds, indicating malicious behavior. Since the simulation has a low tolerance for malicious behavior of nodes, it can be seen that the reliability of the two nodes has dropped significantly and has remained at a low level since then. Blocks failed to be packaged during the consensus process. It can be seen that the consensus mechanism can reduce the impact of risk nodes on the system, thereby ensuring the accuracy and reliability of relay protection setting data during remote operation.
[0129] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps of the above-mentioned method embodiment are implemented.
[0130] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0131] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiment when executing the computer program.
[0132] In addition, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0133] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware using a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes in the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0134] The present invention is not limited to the structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A blockchain reliability proof consensus method, characterized in that: include: Based on the pre-acquired blockchain network structure information, the substation nodes are evaluated for performance and optimally grouped in turn to form a grouping information matrix of the substation nodes; Calculate the initial reliability of the substation node in the blockchain network, and broadcast the predefined protection setting data to each substation node for temporary storage; Determine the node type of each substation based on the grouping information matrix, generate blocks after consensus is performed based on the node type of each substation, and broadcast and verify the blocks, and complete the protection of fixed value data storage based on the block verification results; After the consensus is completed, the initial reliability of the substation node in the blockchain network is updated to obtain the new reliability, and a new block is generated based on the new reliability to update the blockchain network.
2. The blockchain reliability proof consensus method according to claim 1 is characterized in that: The substation nodes are sequentially evaluated for performance and optimally grouped based on the pre-acquired blockchain network structure information to form a substation node grouping information matrix including: Determine the substation node type, the substation node type includes consensus node, verification storage node and supervision node; Set the node score matrix and weight matrix of the substation node under different performance indicators, and calculate the score vector of the substation node under each performance indicator; Form an optimization objective function and solve it to obtain the optimal grouping result of the substation nodes, and add it to the block header; Form a grouping information matrix of substation nodes.
3. The blockchain reliability proof consensus method according to claim 2 is characterized in that: The setting of the node score matrix and the weight matrix of the substation node under different performance indicators of the performance indicator evaluation and the calculation of the score vector of the substation node under each performance indicator includes: Obtain the node index score of the substation node under the predefined performance index, and set the upper and lower boundaries of the node index score to highlight the gap between the substation node in the high score interval and the low score interval; According to the relationship between the performance index and the corresponding node index score, the performance index is divided into positive index and negative index, and the score function of the substation node under different index types is set; Based on the score function, the score matrix of the substation node under different performance indicators is obtained, and weights are assigned to different indicator types to obtain a weight matrix; The score matrix is combined with the weight matrix to calculate the score vector of the substation node under each performance indicator.
4. The blockchain reliability proof consensus method according to claim 3 is characterized in that: The initial reliability of the computing substation node in the blockchain network includes: The weighted adjacency matrix is used to establish a blockchain network topology model, and the average distance between any two groups of substation nodes in the blockchain network is calculated through the blockchain network topology model; The network cohesion of the blockchain network is analyzed based on the average distance between any two groups of substation nodes, and the node shrinkage technology is used to shrink the substation nodes to obtain the network cohesion after shrinkage; The changes in network cohesion before and after contraction are analyzed and the proportion is calculated to obtain the initial reliability of the substation node in the blockchain network.
5. The blockchain reliability proof consensus method according to claim 4 is characterized in that: The network cohesion degree obtained by shrinking the substation nodes using the node shrinking technology includes: Calculate the ratio of the network cohesion before and after the substation node is shrunk and compare the difference with the preset value; The changes in network cohesion before and after contraction are analyzed to obtain the initial reliability of the substation nodes, and the reliability ratio of each substation node is calculated based on the initial reliability.
6. The blockchain reliability proof consensus method according to claim 5 is characterized in that: The above steps of generating a block after consensus is performed based on each substation node type and broadcasting and verifying the block, and completing the storage of the protection fixed value data based on the block verification result include: The consensus nodes compete for proof of work to generate block headers and broadcast them for verification. Each block header is allocated to each substation node for temporary storage, and the data in the block header shall prevail during the consensus process. Compete to package blocks based on the reliability and difficulty value of the corresponding substation node in the block header, and broadcast verification after the block is generated; The blocks are verified by verifying the storage nodes, and after the blocks are verified, they are connected to the local blockchain network to complete the protection of fixed-value data storage.
7. The blockchain reliability proof consensus method according to claim 6 is characterized in that: The calculation formula of the average distance between the two groups of substation nodes is: In the formula, represents the average distance between two groups of substation nodes; Indicates the number of substation nodes; Indicates a substation node and substation nodes The number of edges contained in the minimum distance between them.
8. A blockchain reliability proof consensus system, characterized in that: include: A grouping information generation module is used to evaluate the performance and optimally group the substation nodes in turn based on the pre-acquired blockchain network structure information to form a grouping information matrix of the substation nodes; The node reliability calculation module is used to calculate the initial reliability of the substation node in the blockchain network and broadcast the predefined protection setting data to each substation node for temporary storage; The blockchain network consensus module is used to determine the node type of each substation based on the group information matrix, generate blocks after consensus is performed based on the node type of each substation, broadcast and verify the blocks, and complete the storage of protection fixed value data based on the block verification results; The blockchain network update module is used to update the initial reliability of the substation node in the blockchain network to obtain a new reliability after the consensus is completed, and generate a new block based on the new reliability to update the blockchain network.
9. The blockchain reliability proof consensus system according to claim 8, characterized in that: The grouping information generation module includes a substation type determination module, a performance score calculation module, an optimal grouping generation module and a grouping matrix determination module, wherein: The substation type determination module is used to determine the substation node type, and the substation node type includes a consensus node, a verification storage node, and a supervision node; The performance score calculation module is used to set the node score matrix and weight matrix of the performance index evaluation substation node under different performance indicators, and calculate the score vector of the substation node under each performance indicator; The optimal grouping generation module is used to form an optimization objective function and solve the optimal grouping result of the substation nodes, and add it to the block header; The grouping matrix determination module is used to form a grouping information matrix of the substation nodes.
10. The blockchain reliability proof consensus system according to claim 9, characterized in that: The performance score calculation module includes a node index scoring module, an index division module, a matrix generation module and a score vector calculation module, wherein: The node index scoring module is used to obtain the node index scores of the substation nodes under the predefined performance indicators, and set the upper and lower boundaries of the node index scores to highlight the difference between the substation nodes in the high score interval and the low score interval; The indicator classification module is used to classify the performance indicators into positive indicators and negative indicators according to the relationship between the performance indicators and the corresponding node indicator scores, and set the score functions of the substation nodes under different indicator types; The matrix generation module is used to obtain a score matrix of the substation node under different performance indicators based on the score function, and to assign weights to different indicator types to obtain a weight matrix; The score vector calculation module is used to calculate the score vector of the substation node under each performance indicator by combining the score matrix with the weight matrix.
11. The blockchain reliability proof consensus system according to claim 10, characterized in that: The node reliability calculation module includes an average distance calculation module, a network cohesion analysis module and a reliability generation module, wherein: The average distance calculation module is used to calculate the average distance between any two groups of substation nodes in the blockchain network; The network cohesion analysis module is used to analyze the network cohesion of the blockchain network based on the average distance between any two groups of substation nodes, and to shrink the substation nodes using the node shrinkage technology to obtain the shrunken network cohesion; The reliability generation module is used to analyze the change in network cohesion before and after contraction and perform percentage calculation to obtain the initial reliability of the substation node in the blockchain network.
12. The blockchain reliability proof consensus system according to claim 11, characterized in that: The network cohesion analysis module includes a cohesion comparison module and a reliability ratio calculation module, wherein: The cohesion comparison module is used to calculate the ratio of the network cohesion before and after the substation node is shrunk and compare the difference with the preset value; The reliability ratio calculation module is used to analyze the change of network cohesion before and after contraction to obtain the initial reliability of the substation node, and calculate the reliability ratio of each substation node based on the initial reliability.
13. The blockchain reliability proof consensus system according to claim 12, characterized in that: The blockchain network consensus module includes a block header generation module, a block generation module and a block verification module, wherein: The block header generation module is used to generate block headers through proof-of-work competition by consensus nodes and broadcast verification, and distribute each block header to each substation node for temporary storage, and the data in the block header shall prevail during the consensus process; The block generation module is used to compete for packaging blocks according to the reliability and difficulty value of the corresponding substation node in the block header, and perform broadcast verification after the block is generated; The block verification module is used to verify the block by verifying the storage node, and after the block verification is completed, the block is connected to the local blockchain network to complete the protection of the fixed value data storage.
14. The blockchain reliability proof consensus system according to claim 13, characterized in that: The calculation formula of the average distance between the two groups of substation nodes is: In the formula, represents the average distance between two groups of substation nodes; Indicates the number of substation nodes; Indicates a substation node and substation nodes The number of edges contained in the minimum distance between them.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Element security proof method, device, apparatus and medium based on block chain
CN108985100A
Block chain consensus method, related device and system
CN110298657A
Internet of Things data sharing method based on block chain and federated learning
CN116471286A
Block chain consensus method based on node service score
CN117997511A
Decentralized computation system architecture based on node specialization
US20190363874A1
