A unit-weighted consensus algorithm to improve the security of special equipment blockchain systems
By setting unit weights and dynamically adjusting them, and adopting a probabilistic method of selecting block generation nodes, the problems of low efficiency, high cost and poor security in the special equipment blockchain system are solved, and more efficient and secure data exchange and sharing are achieved.
Patent Information
- Application Number
- CN202311073653.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-08-24
AI Technical Summary
The application of blockchain consensus algorithm in the field of special equipment has the problems of low efficiency, high cost, poor security, and does not take into account the authority, professionalism, trust and data contribution of the unit.
A consensus algorithm based on unit weight is adopted, which sets a fixed weight for each unit and dynamically adjusts the unit weight according to the amount and quality of data. Block generation nodes are selected probabilistically to ensure that each unit has the opportunity to participate, thereby improving the decentralization and fairness of the system.
Encourage each unit to provide more and better data, improve the security, efficiency and credibility of the special equipment blockchain system, avoid risks controlled by a single unit, and enhance the decentralization and fairness of the system.
Smart Images

Figure CN117134879B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a unit weight-based consensus algorithm for improving the security of a special equipment blockchain system. Background Art
[0002] The application of blockchain consensus algorithm in the field of special equipment has problems such as low efficiency, high cost and poor security. The current general blockchain consensus algorithm does not take into account the authority, professionalism and trust of the participating units on each chain in the field of special equipment, nor does it take into account the contribution, activity and integrity of each unit in the data volume of the special equipment blockchain system. Therefore, a unit weight-based consensus algorithm suitable for the special equipment blockchain system is proposed. Summary of the Invention
[0003] The purpose of the present invention is to provide a unit weight-based consensus algorithm that improves the security of a special equipment blockchain system, which can be used for safe, efficient and reliable data exchange and sharing of special equipment blockchain systems, and solve the problems of low efficiency, high cost and poor security in the application of blockchain consensus algorithms in the field of special equipment.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a unit weight-based consensus algorithm for improving the security of a special equipment blockchain system, comprising the following steps:
[0005] Step S1: Set the fixed weight W of the unit u In each block generation cycle, the data weight W of each unit in the current block generation cycle is obtained based on the data volume D and data quality Q contributed by each unit in the previous block generation cycle. d and dynamic weight W;
[0006] Step S2: According to the dynamic weight W of each unit in the current block generation cycle, according to the selection probability P n Select one or more candidate nodes as block generation nodes;
[0007] Step S3: The block generation node verifies, sorts, and packages all the data collected during the current block generation cycle according to the consensus rule F of the blockchain system, generates a new block, and broadcasts the new block to other nodes;
[0008] Step S4: After receiving the new block, other nodes verify and confirm the new block according to the consensus rule F of the blockchain system; if the verification is successful, other nodes will add the new block to their own blockchain and update their own ledger status; if the verification fails, other nodes will refuse to accept the new block and wait for the next block generation cycle.
[0009] Furthermore, the fixed weight W of the setting unit u Further: each unit in the equipment blockchain system is weighted and classified, with the regulatory unit given the highest weight, the inspection unit given the second highest weight, the production unit given the third highest weight, and the platform unit given the fourth highest weight; fixed weights are set according to the weight of each unit in the classification category.
[0010] Furthermore, the fixed weight W of the supervisory unit u The value range is 0.6-1, and the fixed weight W of the inspection unit u The value range is 0.5-0.9, and the fixed weight W of the production unit u The value range is 0.4-0.6, and the fixed weight W of the platform unit u The value range is 0.3-0.7.
[0011] Furthermore, the data weight W of the unit d The algorithm formula is W d =αD+βQ, where α and β are adjustment coefficients.
[0012] Furthermore, the selection probability P n The algorithm formula is ;
[0013] Where N is the total number of candidate nodes, W(i) is the dynamic weight of the i-th candidate node, and W(n) is the dynamic weight of the n-th node.
[0014] Furthermore, the adjustment coefficients α and β both have a value range of 0-1.
[0015] Furthermore, the algorithm formula of the consensus rule F of the blockchain system is f(W u ,W d ,P n ).
[0016] The beneficial effects of the present invention are as follows: according to the amount and quality of data contributed by each unit in each block generation cycle, the weight of each unit is dynamically adjusted, so that the weight can reflect the actual contribution and value of each unit in the special equipment blockchain system, thereby incentivizing each unit to provide more and better data, improving the data volume and data quality of the special equipment blockchain system, and adopting a probabilistic selection method to select block generation nodes, so that any unit has the opportunity to become a block generation node, thereby avoiding the risk of a single or a few units controlling the entire special equipment blockchain system, and improving the decentralization and fairness of the special equipment blockchain system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION
[0018] The present invention will be further described below with reference to the accompanying drawings.
[0019] See also Figure 1 The present invention provides an embodiment of a unit weight-based consensus algorithm for improving the security of a special equipment blockchain system, comprising the following steps:
[0020] Step S1: Set the fixed weight W of the unit u In each block generation cycle, the data weight W of each unit in the current block generation cycle is obtained based on the data volume D and data quality Q contributed by each unit in the previous block generation cycle. d and dynamic weight W;
[0021] The dynamic weight W is the fixed weight W of the unit u and data weight W d The product of , where the unit weight is a fixed value predetermined according to the unit category; the data weight W d It is a value dynamically adjusted based on data volume D and data quality Q; data volume D refers to the number of data items submitted by the unit to the blockchain system during the previous block generation cycle; data quality Q refers to an evaluation indicator of whether the data submitted by the unit is true, valid, complete, and timely.
[0022] Step S2: According to the dynamic weight W of each unit in the current block generation cycle, according to the selection probability P n One or more candidate nodes are selected as block generation nodes. Candidate nodes are nodes that are eligible to participate in the block generation process, usually servers or terminal devices deployed by various units in the blockchain system. Block generation nodes are nodes that are actually responsible for generating new blocks, and there are usually only one or a few of them. The probability of selecting a block generation node and its dynamic weight W d That is, the higher the dynamic weight, the greater the probability of being selected as a block generation node.
[0023] Step S3: The block generation node verifies, sorts, and packages all the data collected during the current block generation cycle according to the consensus rule F of the blockchain system, generates a new block, and broadcasts the new block to other nodes;
[0024] Step S4: After receiving the new block, other nodes verify and confirm the new block according to the consensus rule F of the blockchain system; if the verification is successful, other nodes will add the new block to their own blockchain and update their own ledger status; if the verification fails, other nodes will refuse to accept the new block and wait for the next block generation cycle.
[0025] Please continue reading Figure 1 As shown, in one embodiment of the present invention, the fixed weight W of the setting unit u Further, each unit in the equipment blockchain system is weighted and classified, with the supervisory unit given the highest weight, the inspection unit given the second highest weight, the production unit given the third highest weight, and the platform unit given the fourth highest weight; fixed weights are set according to the weight of each unit in the classification category. Different weights are given according to the roles and responsibilities of different units to influence their role and benefits in the consensus process. The units in the special equipment blockchain system are divided into:
[0026] (1) Regulatory units: including special equipment regulatory departments at the national, provincial and municipal levels, which are responsible for formulating and implementing relevant laws, regulations, standards and policies for special equipment, and supervising and managing special equipment. They are the most authoritative and trusted units in the special equipment blockchain system, and therefore are given the highest weight.
[0027] (2) Inspection units: including special equipment inspection agencies at the national, provincial and municipal levels, which are responsible for regular or irregular inspection and testing of special equipment to ensure the safety performance and quality of special equipment. They are the most professional and impartial units in the special equipment blockchain system, and therefore are given the second highest weight.
[0028] (3) Production units: including all kinds of special equipment manufacturers, responsible for the production and sale of special equipment that meets the standards and requirements. They are the most innovative and competitive units in the special equipment blockchain system, so they are given the third highest weight. Among them, according to factors such as the scale, brand, and market share of the production enterprise, they can be further divided into different levels of production units and given different weights;
[0029] (4) Platform units: including platform enterprises that provide special equipment-related services, such as SAAS service platforms, data analysis platforms, repair and maintenance platforms, etc., which are responsible for providing value-added services for special equipment. They are the most dynamic and diverse units in the special equipment blockchain system, and therefore are given the fourth highest weight.
[0030] Please continue reading Figure 1 As shown, in one embodiment of the present invention, the fixed weight W of the supervisory unit u The value range is 0.6-1, and the fixed weight W of the inspection unit u The value range is 0.5-0.9, and the fixed weight W of the production unit u The value range is 0.4-0.6, and the fixed weight W of the platform unit uThe value range is 0.3-0.7. The fixed weight values assigned to each unit in the supervision unit, inspection unit, production unit and platform unit will also vary due to the different unit levels. For example, supervision units and inspection units are divided into national, provincial and municipal levels, and production units and platform units are divided into large, medium and small levels.
[0031] For example: W u It represents the fixed weight of the unit. According to the weight classification of each unit in the device blockchain system, the fixed weight value assigned to each unit is as follows:
[0032] Unit Type Unit Level Unit fixed weight Regulatory authorities nation 1 Regulatory authorities provincial 0.8 Regulatory authorities Municipal level 0.6 Inspection Unit nation 0.9 Inspection Unit provincial 0.7 Inspection Unit Municipal level 0.5 Production Unit Large 0.6 Production Unit Medium 0.5 Production Unit Small 0.4 Platform Unit Large 0.7 Platform Unit Medium 0.5 Platform Unit Small 0.3
[0033] Please continue reading Figure 1 As shown, in one embodiment of the present invention, the data weight W of the unit d The algorithm formula is W d =αD+βQ, where α and β are adjustment coefficients. They can be dynamically adjusted based on the amount of data D and the quality of data Q submitted by the unit in the previous block generation cycle. The adjustment coefficients α and β can be used to adjust the degree of influence of data quantity and data quality on the unit's data weight. For example, if α>β, it means that data quantity has a greater impact on the unit's data weight than data quality; if α<β, it means that data quality has a greater impact on the unit's data weight than data quantity.
[0034] Please continue reading Figure 1 As shown, in one embodiment of the present invention, the value ranges of the adjustment coefficients α and β are both 0-1.
[0035] Please continue reading Figure 1 As shown, in one embodiment of the present invention, the selection probability P n The algorithm formula is ;
[0036] Where N is the total number of candidate nodes, W(i) is the dynamic weight of the i-th candidate node, and W(n) is the dynamic weight of the n-th node. The probability of selection Pn of a block generation node is proportional to its dynamic weight W. That is, the higher the dynamic weight, the greater the probability of being selected as a block generation node.
[0037] Please continue reading Figure 1 As shown, in one embodiment of the present invention, the algorithm formula of the consensus rule F of the blockchain system is f(W u ,W d ,P n ). f(W u ,W d ,P n ) is the formula for the selection probability of the block generation node, whose input is the fixed weight W of the unit u, the unit's data weight W d and the dynamic weight W of the node, whose output is the selection probability P of the node n .
[0038] For example:
[0039] The present invention has the following working principle: the present invention gives different weights according to the roles and responsibilities of different units in the special equipment blockchain system, so that units with high weights have greater effects and benefits in the consensus process, thereby encouraging each unit to actively participate in the construction and operation of the special equipment blockchain system, and improving the security, efficiency and credibility of the special equipment blockchain system.
[0040] The present invention dynamically adjusts the weight of each unit according to the amount and quality of data contributed by each unit in each block generation cycle, so that the weight can reflect the actual contribution and value of each unit in the special equipment blockchain system, thereby incentivizing each unit to provide more and better data and improving the data volume and data quality of the special equipment blockchain system.
[0041] The present invention adopts a probabilistic selection method to select block generation nodes, so that any unit has the opportunity to become a block generation node, thereby avoiding the risk of a single or a few units controlling the entire special equipment blockchain system, and improving the decentralization and fairness of the special equipment blockchain system. Specific embodiment 1:
[0042] A means: large, B means: medium, C means: small;
[0043] X1 means: large, X2 means: medium, and X3 means: small.
[0044] 1. Fixed weight information W of the unit u;
[0045] Unit Type Unit logo Unit fixed weight Regulatory authorities nation 1 Regulatory authorities provincial 0.8 Inspection Unit nation 0.9 Inspection Unit provincial 0.7 Production Unit A 0.6 Production Unit B 0.5 Production Unit C 0.4 Platform Unit X1 0.7 Platform Unit X2 0.5 Platform Unit X3 0.3
[0046] 2. Data volume D and data quality Q;
[0047] Unit Type Unit logo Data volume D (10,000) Data quality Q (points) Regulatory authorities nation 100 10 Regulatory authorities provincial 80 9 Inspection Unit nation 90 10 Inspection Unit provincial 70 9 Production Unit A 60 8 Production Unit B 50 7 Production Unit C 40 6 Platform Unit X1 30 5 Platform Unit X2 20 4 Platform Unit X3 10 3
[0048] 3. Assume that the adjustment coefficients α and β are 0.01 and 0.1 respectively, and the data weight W d= αD+βQ;
[0049] Unit Type Unit logo Wd Regulatory authorities nation 0.01×100+0.1×10=2 Regulatory authorities provincial 0.01×80+0.1×9=1.7 Inspection Unit nation 0.01×90+0.1×10=1.9 Inspection Unit provincial 0.01×70+0.1×9=1.6 Production Unit A 0.01×60+0.1×8=1.4 Production Unit B 0.01×50+0.1×7=1.2 Production Unit C 0.01×40+0.1×6=1 Platform Unit X1 0.01×30+0.1×5=0.8 Platform Unit X2 0.01×20+0.1×4=0.6 Platform Unit X3 0.01×10+0.1×3=0.4
[0050] 4. The dynamic weight of each unit in the current block generation cycle is W=W d ×W u;
[0051] Unit Type Unit logo Wu Wd W Regulatory authorities nation 1 2 2 Regulatory authorities provincial 0.8 1.7 1.36 Inspection Unit nation 0.9 1.9 1.71 Inspection Unit provincial 0.7 1.6 1.12 Production Unit A 0.6 1.4 0.84 Production Unit B 0.5 1.2 0.6 Production Unit C 0.4 1 0.4 Platform Unit X1 0.7 0.8 0.56 Platform Unit X2 0.5 0.6 0.3 Platform Unit X3 0.3 0.4 0.12
[0052] 5. According to the formula , we can calculate the selection probability Pn of each unit as a block generation node,
[0053] Where ∑W represents the sum of the dynamic weights of all units, i.e. ∑W=9.67;
[0054] Unit Type Unit logo W Pn Regulatory authorities nation 2 2 / 9.67=0.207 Regulatory authorities provincial 1.36 1.36 / 9.67=0.141 Inspection Unit nation 1.71 1.71 / 9.67=0.177 Inspection Unit provincial 1.12 1.12 / 9.67=0.116 Production Unit A 0.84 0.84 / 9.67=0.087 Production Unit B 0.6 0.6 / 9.67=0.062 Production Unit C 0.4 0.4 / 9.67=0.041 Platform Unit X1 0.24 0.24 / 9.67=0.025 Platform Unit X2 0.18 0.18 / 9.67=0.018 Platform Unit X3 0.12 0.12 / 9.67=0.012
[0055] As can be seen from the table above, the probability of selecting the national level for regulatory units is the highest, at 20.7%, followed by the national level for inspection units, at 17.7%, and then the provincial level for regulatory units, at 14.1%. This demonstrates that the consensus algorithm of this patented invention can effectively reflect the authority, professionalism, and trustworthiness of different units in the special equipment blockchain system, thereby improving the security and credibility of the system.
[0056] The block generation node then verifies, sorts, and packages all data collected during the current block generation cycle according to the consensus rules, generating a new block and broadcasting it to other nodes. Finally, upon receiving the new block, other nodes verify and confirm it based on this selection probability and the consensus rules of consensus algorithms such as Proof-of-Stake or Delegated Proof-of-Stake. If verification succeeds, the other nodes add the new block to their own blockchains and update their own ledger states. If verification fails, the other nodes reject the new block and wait for the next block generation cycle.
[0057] The above description is only a preferred embodiment of the present invention and should not be understood as limiting the present application. All equivalent changes and modifications made within the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A unit-weighted consensus algorithm to improve the security of special equipment blockchain systems, characterized by: The steps include: Step S1: Set the fixed weight W of the unit u In each block generation cycle, the data weight W of each unit in the current block generation cycle is obtained based on the data volume D and data quality Q contributed by each unit in the previous block generation cycle. d and dynamic weight W; The dynamic weight W is the fixed weight W of the unit u and data weight W d The product of , where the unit weight is a fixed value predetermined according to the unit category; the data weight W d It is a value that is dynamically adjusted based on the data volume D and data quality Q; Data volume D refers to the number of data items submitted by an organization to the blockchain system during the previous block generation cycle; data quality Q refers to an evaluation indicator of whether the data submitted by an organization is authentic, valid, complete, and timely. Step S2: According to the dynamic weight W of each unit in the current block generation cycle, according to the selection probability P (n) Select one or more candidate nodes as block generation nodes; Selection probability P (n) The algorithm formula is ; Where N is the total number of candidate nodes, W(i) is the dynamic weight of the i-th candidate node; W(n) is the dynamic weight of the n-th node; Step S3: The block generation node verifies, sorts, and packages all data collected during the current block generation cycle according to the consensus rule F of the blockchain system, generates a new block, and broadcasts the new block to other nodes; Step S4: After receiving the new block, other nodes verify and confirm the new block according to the consensus rule F of the blockchain system. If the verification passes, other nodes will add the new block to their own blockchain and update their own ledger status. If the verification fails, other nodes will refuse to accept the new block and wait for the next block generation cycle. The data weight W of the unit d The algorithm formula is W d =αD+βQ, where α and β are adjustment coefficients; The adjustment coefficients α and β both have a value range of 0-1.
2. The unit weight-based consensus algorithm for improving the security of the special equipment blockchain system according to claim 1 is characterized by: The fixed weight W of the setting unit u Further: each unit in the equipment blockchain system is weighted and classified, with the regulatory unit given the highest weight, the inspection unit given the second highest weight, the production unit given the third highest weight, and the platform unit given the fourth highest weight; Fixed weights are set according to the weight of each unit in the classification category.
3. The unit weight-based consensus algorithm for improving the security of the special equipment blockchain system according to claim 2 is characterized by: The fixed weight W of the supervisory unit u The value range is 0.6-1, and the fixed weight W of the inspection unit u The value range is 0.5-0.9, and the fixed weight W of the production unit u The value range is 0.4-0.6, and the fixed weight W of the platform unit u The value range is 0.3-0.7.