CN111695996B - Block chain consensus method and system based on pre-crossing honest gold - Google Patents
Block chain consensus method and system based on pre-crossing honest gold Download PDFInfo
- Publication number
- CN111695996B CN111695996B CN202010398280.1A CN202010398280A CN111695996B CN 111695996 B CN111695996 B CN 111695996B CN 202010398280 A CN202010398280 A CN 202010398280A CN 111695996 B CN111695996 B CN 111695996B
- Authority
- CN
- China
- Prior art keywords
- management
- dishonest
- node
- nodes
- consensus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 80
- 239000010931 gold Substances 0.000 title claims abstract description 69
- 229910052737 gold Inorganic materials 0.000 title claims abstract description 69
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 title claims abstract description 68
- 230000008569 process Effects 0.000 claims abstract description 43
- 238000007726 management method Methods 0.000 claims description 405
- 238000012790 confirmation Methods 0.000 claims description 43
- 238000012545 processing Methods 0.000 claims description 8
- 238000012937 correction Methods 0.000 claims description 2
- 230000006399 behavior Effects 0.000 abstract description 13
- 230000002452 interceptive effect Effects 0.000 description 24
- 239000003999 initiator Substances 0.000 description 8
- 230000003993 interaction Effects 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000002349 favourable effect Effects 0.000 description 5
- 230000000977 initiatory effect Effects 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 239000002699 waste material Substances 0.000 description 4
- 208000033748 Device issues Diseases 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000036772 blood pressure Effects 0.000 description 3
- 230000036541 health Effects 0.000 description 3
- 230000007774 longterm Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000001737 promoting effect Effects 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004146 energy storage Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012954 risk control Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Computer Security & Cryptography (AREA)
- General Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Technology Law (AREA)
- Strategic Management (AREA)
- Marketing (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a block chain consensus method and system based on pre-crossing loyalty, which are used for classifying nodes in a block chain, generating management nodes in the class according to the amount of the pre-crossing loyalty of the nodes, and completing consensus by adopting a two-stage consensus mode, wherein the two-stage consensus comprises primary consensus and secondary consensus; in the first-level consensus, each class processes the transaction in the class and forms a new block, and each class sends the formed new block to a chain through a management node to perform the second-level consensus. The management node is selected according to the dishonest amount, so that the maximum dishonest amount of the management node is ensured, and once dishonest behaviors occur, the maximum dishonest amount is received, so that effective frightening can be formed on dishonest behaviors of the management node, and huge loss caused by dishonest behaviors of the management node is prevented. In addition, for the election efficiency, the node voting link is omitted in a mode of directly comparing the value of the honest gold amount, so that the election program is further simplified, and the management node is facilitated to be rapidly generated.
Description
Technical Field
The invention relates to a block chain consensus method, in particular to a block chain consensus method and system based on pre-crossing sincerity.
Background
With the rapid development of technology in recent years, the scale of use of various electronic devices such as smart phones, smart watches, wearable medical devices and the like has been explosively increased, however, the wide use of electronic devices inevitably introduces hidden troubles such as security and anonymity while bringing convenience.
Blockchain is a point-to-point distributed ledger technique based on cryptographic algorithms, which is essentially an internet shared database. The blockchain technology is applied to the management of the electronic equipment, and the advantages of decentralization trust, safety, non-falsification, traceability and the like of the blockchain technology can be fully utilized. But competition for co-algorithms and accounting rights in the blockchain will place tremendous storage, computational stress on the electronic device.
Disclosure of Invention
The invention aims to provide a safe and reliable consensus method capable of saving time and reducing resource consumption, and the following technical scheme is provided:
classifying nodes in the block chain, generating management nodes in the class according to the amount of the node pre-honest gold, and completing consensus by adopting a two-stage consensus mode, wherein the two-stage consensus comprises primary consensus and secondary consensus; in the first-level consensus, each class processes the transaction in the class and forms a new block, and each class sends the formed new block to a chain through a management node to perform the second-level consensus.
The nodes can participate in the first-level consensus after pre-crossing a certain amount of honest money.
Within the management period, the management node will end the management period in advance when: the management node fails, cannot continue to fulfill management responsibilities, is judged to be dishonest in the management process, and enters a new round of selection process of the management node when the management period is finished in advance.
The first-level consensus workflow is that (1) the management node connects the transactions of all nodes in the managed class to form a block to be subjected to consensus; (2) The management node sends a block to be subjected to consensus to the node managed by the management node; (3) Other nodes in the same class check whether the block to be subjected to consensus is correct, and the checked content comprises whether the content of each transaction is correct or not and whether the hash value of each transaction is correct or not; (4) If the confirmation is correct, sending a confirmation message to the management node; if the confirmation is wrong, entering a punishment of the dishonest node; (5) When the confirmation information received by the management node reaches the set value, the management node submits the block in the step (1) to the block chain.
In the punishment of the dishonest node in the step (4) of the primary consensus working process, if a problem is considered to exist and is considered to be caused by dishonest of a certain managed node, negative acknowledgement information is sent to the management node and a dishonest node is indicated, and when the command for a certain node is received to reach a set value, dishonest of the managed node is judged. At this time, the pre-dishonest fund of the dishonest managed node is not received, the pre-dishonest fund is required to be re-pre-dishonest fund and the corrected transaction is submitted, and the management node re-formulates the consensus block and resumes the first-level consensus. For the undeniated pre-loyalty points, all nodes which send negative acknowledgement information to the management node and indicate bad nodes are distributed according to the proportion of the paid loyalty points.
In the punishment of the dishonest node in the step (4) of the primary consensus working process, if a problem is considered to exist and is considered to be caused by dishonest of the management node, sending negative acknowledgement information to other nodes in the class and requiring replacement of the management node, and judging that the management node is dishonest when the information requiring replacement of the management node reaches a set value. At this time, the pre-dishonest fee of the dishonest management node is not collected, the dishonest management node is required to pay the dishonest fee again, the process of replacing the management node is executed, and after the management node is replaced, a new management node re-formulates the consensus block and resumes the first-level consensus. For the uncollected pre-honest gold, all nodes which send negative acknowledgement information and require replacement management nodes are distributed according to the proportion of the honest gold.
The second-level consensus workflow is that after the blockchain receives new blocks formed by each class, a management node on the blockchain checks whether the blocks submitted by each block are correct, and sends out a confirmation message when the blocks are confirmed, and sends out a denial message when errors are found. If the management node sending the confirmation message reaches the specified value, the blockchain links the blocks of each class together at one time to form a new block of the blockchain, broadcasts the finally formed block, and starts the next consensus period.
If the management node that sent the acknowledgement message does not reach the specified value, processing is performed in one of two ways: (1) When the block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class exceeds a set value, punishment is carried out on the class, specifically, the honest money of the nodes participating in confirmation in the class is not received, the nodes participating in confirmation are required to be pre-treated with honest money again, and a management node is informed of submitting the corrected block. For the pre-dishonest of the failure, the failure is assigned by the management node on the blockchain. (2) When the block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class does not exceed a set value, the management node is judged to be dishonest at the moment, punishment is carried out on the management node of the class, specifically, the dishonest management node is not collected, the dishonest is paid again, the flow of replacing the management node is executed, and after the management node is replaced, the new management node is used for re-planning the consensus block. For the pre-dishonest gold that is not received, the management nodes on the blockchain that find errors are proportioned by the pre-dishonest gold.
The method for distributing the pre-dishonest gold according to the proportion of dishonest gold is characterized in that the dishonest gold amount is assumed to be M, the number of nodes which send denial information and require replacement of management nodes is N, and the dishonest gold of each node in the N nodes is N 1 、N 2 …N n The k node can obtain the pre-honesty gold of M k =M*N k /(N 1 +N 2 …+N n )。
The management node is generated by using the node with the most pre-honesty gold as the management node.
An electronic equipment management system based on a blockchain adopts the blockchain consensus method based on the pre-crossing sincerity to complete consensus.
Compared with the prior art, the invention has the beneficial effects that:
(1) The classification management system provided by the invention effectively reduces the scale of the nodes on the chain of the blockchain, reduces the requirements on the storage space and the operation capacity of the electronic equipment participating in the blockchain, manages the transactions on the blockchain by the management nodes in each class, and obviously improves the efficiency.
(2) In the prior art, all nodes can require consensus and form new blocks by means of workload proof algorithms and the like, and the number of the nodes is numerous, so that the efficiency is reduced directly, a great deal of computing power is consumed to solve a hash function to obtain the accounting rights. The single consensus can verify all transactions of a class in a consensus period, so that the efficiency of the single consensus is effectively improved. In addition, the first-level consensus of each class can be performed simultaneously, and the consensus efficiency is remarkably improved. In conclusion, compared with the prior art, the technical scheme provided by the invention improves the efficiency and reduces the resource waste.
(3) The management node is selected according to the dishonest amount, so that the maximum dishonest amount of the management node is ensured, and once dishonest behaviors occur, the maximum dishonest amount is received, so that effective frightening can be formed on dishonest behaviors of the management node, and huge loss caused by dishonest behaviors of the management node is prevented. In addition, for the election efficiency, the node voting link is omitted in a mode of directly comparing the value of the honest gold amount, so that the election program is further simplified, and the management node is facilitated to be rapidly generated.
(4) Encourages the honest nodes and penalizes the dishonest nodes, is favorable for forming effective supervision on all nodes, guides all nodes to make honest behaviors, and actively searches errors and reports.
(5) The method for distributing the disfavored loyalty gold according to the proportion of the pre-dishonest gold can encourage all nodes to pay as much dishonest gold as possible, and paying more dishonest gold is helpful for keeping the nodes in good faith, so the distribution method is favorable for promoting the nodes to keep in good faith.
(6) The dishonest lower limit is set to avoid dishonest nodes caused by too low dishonest cost, and the minimum cost of dishonest nodes can be guaranteed by the minimum requirement.
(7) In the second-level consensus, since only the management node can participate in the allocation of the refund pre-honest gold, more managed nodes are willing to participate in the competition of the management node by increasing the amount of the pre-honest gold. Furthermore, only the trusted nodes that find errors may participate in the allocation. Therefore, the system provided by the invention can guide the management node to keep the integrity so as to participate in the distribution of the uncollected pre-honest gold, and avoid the high pre-honest gold from being uncollected due to dishonest.
It should be noted that, according to the brevity requirement, the above 7 points are only an overview of the beneficial effects of the present invention, and not all the beneficial effects are covered, and the detailed description refers to the specific descriptions in the embodiments.
Description of the drawings:
FIG. 1 is a schematic diagram of a block chain technology based electronic device management system;
FIG. 2 is a schematic diagram of a device management chain completing a transaction;
FIG. 3 is a schematic diagram of a process flow after a transaction is received by a management node;
fig. 4 is a schematic diagram of determining election authority of each node according to the score in embodiment 6;
FIG. 5 is a schematic of the workflow of the first consensus in example 6;
FIG. 6 is a schematic of the workflow of the first consensus in example 7;
FIG. 7 is a schematic flow chart of a management node generation process in embodiment 8;
fig. 8 is a schematic flow chart of a management node generation process in embodiment 9.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It will be apparent that the described embodiments are some, but not all, embodiments of the invention.
Thus, the following detailed description of the embodiments of the invention is not intended to limit the scope of the invention, as claimed, but is merely representative of some embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, under the condition of no conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the description of the present invention, it should be noted that, the terms "upper", "lower", and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or an azimuth or a positional relationship conventionally put in use of the inventive product, or an azimuth or a positional relationship conventionally understood by those skilled in the art, such terms are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the apparatus or element to be referred must have a specific azimuth, be constructed and operated in a specific azimuth, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like, are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Example 1:
an electronic equipment management system based on a block chain technology comprises a local area management system and a wide area management system. Wherein the local area management system comprises a device management chain and the wide area management system comprises an interaction chain.
Example 2:
preferably, the device management chain comprises at least one management device for managing transactions of the device management chain; a plurality of electronic devices, each electronic device associated with a block; the connection of all the blocks constitutes a device management chain.
Preferably, the management device is determined by the device management chain owner.
Preferably, the management content of the management device includes block creation, key management, archiving request transaction, parameter request transaction, and interactive chain transaction conversion. After completing the transaction, the management device places the transaction associated with the electronic device in a block corresponding to the electronic device and updates to the device management chain.
Preferably, the block creation process is as follows: when a new electronic device obtains the consent of the device management chain owner to enter the device management chain, a block is created for the new electronic device, and the block is uniquely corresponding to the electronic device.
Preferably, the key management process is as follows: when a new electronic device obtains the consent of the owner of the device management chain to enter the device management chain, the management device issues a key for the electronic device, wherein the key is used for encrypting a transaction between the electronic device and the management device; when an electronic device is determined to be a dishonest device or an authorization period expires, the management device deregisters a previously issued key. Through the issuing and cancellation of the secret key, the electronic product is effectively managed.
Preferably, the interaction party needing data between the electronic devices can complete the functions of the interaction party, for example, the health monitoring related devices need to count data such as heart rate and blood pressure before judging the health condition. At this time, the electronic device with the need of acquiring the parameters sends a parameter request transaction to the management device, and after receiving the transaction, the management device issues a key to the electronic device which initiates the request, and the electronic device which initiates the request completes access through the key. According to the frequency of data requests, it is possible to divide the access into a single access and a repeated access, and thus, the management of keys is also divided into a single and a long term. For a single access, a single key is issued, which is only to complete the acquisition of the single data. For long-term access, a long-term key is issued, whereby the key can be repeatedly acquired within a certain period of time. The setting can avoid resource waste caused by repeatedly initiating transaction aiming at the same parameter request in a period of time.
Preferably, the archiving process is: the electronic device requiring archiving sends a transaction requesting archiving to the management device, after the management device receives the transaction, the management device issues a key to the electronic device initiating the request, and the electronic device completes the storage action of the storage unit through the key.
Preferably, when the electronic device that initiates the parameter request comes from the interactive chain, the block of the device management chain cannot directly account for the transaction of the interactive chain due to the difference between the transaction structures of the device management chain and the interactive chain, and at this time, the management device needs to perform structure conversion on the transaction of the interactive chain so as to enable the transaction to conform to the structural standard of the device management chain. The communication problem caused by the difference of the transaction structures of the equipment management chain and the interactive chain is effectively solved.
Preferably, the transaction in the device management chain can occur after being confirmed by the management device, has higher security, and does not need to be confirmed by the initiator and the signature of the initiator. Therefore, the present invention provides a simplified structure compared to the prior art blockchain data transaction structure. The device management chain transaction at least comprises the following data: (1) transaction number; (2) transaction types, such as access transactions, archive transactions; (3) The address of the target electronic device, i.e., the address of the electronic device requesting access; (4) whether or not the transaction is an interactive chain transaction.
Preferably, each block comprises a first portion, a second portion and a transaction portion. The first two parts of the block are the first part, the second part, followed by the transaction part. The first part stores the hash value of the previous block, and the second part is used for authorizing the newly added electronic device and recording the authority management method of the device owner for the electronic device, as shown in table 1. In a second example of behavior, he represents that the device numbered A1 cannot access the device numbered B2. The transaction part is used for storing all transactions of the electronic equipment corresponding to the block.
TABLE 1
Numbering device | Requesting device | Transaction type | Requested device | Rights control |
1 | A1 | Archiving | C1 | Y |
2 | A2 | Access to | B2 | N |
In the device management chain provided by the invention, the owner of the electronic device can add the electronic device in a mode of creating blocks by the management device, and each block in the device management chain is provided with a second part for authority management, so that the owner of the electronic device can control the authority of all the electronic devices in the device management chain. In addition, the hash value of the first part is utilized to ensure that the data on the chain is not tampered, and compared with a common electronic equipment management system, the electronic equipment management system is safer. Compared with the existing blockchain network, the device management chain is managed by the designated management device, so that extra computing power expenditure caused by contending for accounting does not exist, and when the electronic device is newly added, other nodes do not need to confirm through a consensus algorithm, and the time can be saved, and the efficiency can be improved.
Example 3:
preferably, the nodes of the interaction chain are made up of management devices of the respective device management chains.
Preferably, the nodes of the interaction chain are composed of management equipment of each equipment management chain, cloud storage equipment of the electronic equipment and related equipment for providing various services.
Preferably, in order to facilitate the realization of efficient management, the invention adopts a classified management mode to realize the management of the nodes.
Preferably, the classification management specifically classifies the nodes, determines a management node in each class of nodes, and the management node is used for managing transactions occurring in the class.
Preferably, the management node in the present invention is dynamically changed in order to reduce the loss caused by dishonest management nodes.
Preferably, the time of one management period is set to be the same as one consensus period.
The classification management system provided by the invention effectively reduces the scale of the nodes on the chain of the interactive chain, reduces the requirements on the storage space and the operation capacity of the electronic equipment participating in the blockchain, manages the transactions on the interactive chain by the management nodes in each class, and obviously improves the efficiency.
Preferably, the transactions in the interaction chain employ the following data structures: the trade mark, the previous trade mark, the key and signature of trade initiator, the key and signature of trade receiver, the trade processing result and trade content.
Preferably, the first part is the label of the current transaction, the second part is the label of the previous transaction and is used for pointing to the last transaction of the transaction initiator, and the structure is adopted to facilitate the concatenation of all the transactions of the same transaction initiator.
Preferably, the third and fourth parts are the key and signature of the transaction initiator, the key and signature of the transaction recipient, respectively.
Preferably, the fifth field is a result of the transaction processing, including the following parameters: the transaction is received or rejected.
Preferably, the sixth field is transaction content, which contains the operation that the transaction initiator wishes the transaction recipient to complete.
Preferably, each node is provided with a rights management list that identifies the node details to which the transaction can be initiated.
Preferably, each class is provided with a rights management list set, and the list set is a set of all rights management lists in the class.
Preferably, each node may add, delete, and modify the content in the rights management list set related to the transaction rights portion of itself.
Preferably, when a transaction is received by a management node, it is first checked whether the transaction recipient of the transaction is in the node it manages, and if not, the transaction is sent to the management node of the other class on the chain.
Preferably, when a transaction is received by a management node, it is first checked whether the transaction recipient of the transaction is in the node it manages, and if so, it is checked whether the initiator of the transaction is in the rights management list of the node. If so, sending the transaction to a transaction recipient and informing the management nodes of other classes in the chain that the transaction has been accepted; if not, the transaction is processed, and the processing result is refusal, informing the management nodes of other classes in the chain that the transaction has been processed.
Preferably, all received transactions will be stored by the management node, which integrates all transactions within one management cycle and organizes the creation of new blocks.
Preferably, the interactive chain comprises at least the following transaction types: archiving transactions, and parameter requesting transactions.
Preferably, the archiving transaction is used to store relevant data in the electronic device at a designated storage location, e.g., the health-detecting electronic device stores the detected data on a designated data health platform to facilitate a physician's timely knowledge of patient monitoring data.
Preferably, the workflow of archiving transactions is as follows: the method comprises the steps that an archiving request device initiates an archiving request transaction, the archiving request transaction is sent to a management device of the archiving request device, and after the management device confirms and performs format conversion on the archiving request transaction, the archiving request transaction is sent to a management node of the archiving request transaction; after receiving the archiving request transaction, a management node of the node where the archiving request equipment is located broadcasts the transaction; after receiving the archiving request transaction, the management node on the chain firstly confirms whether the transaction receiver of the archiving request transaction is in the node managed by the receiver, and if not, the archiving request transaction is sent to other management nodes on the chain; if the transaction is in the authority management list, the transaction is sent to the management equipment of the storage equipment, the management equipment of the storage equipment signs the transaction of the archiving request, and the signed transaction is sent to the management node thereof so as to be stored in the interaction chain; at this time, the management device of the archiving request device stores the parameters to be stored into the specified storage device through the data transmission protocol.
Preferably, the parameter request transaction is used to obtain parameters collected by the electronic device. Such as: a patient's physician wishes to obtain blood pressure parameters of the patient's blood pressure monitor.
Preferably, the workflow of the parameter request transaction is as follows: the parameter request transaction is used for acquiring parameters acquired by the electronic equipment, and the workflow of the parameter request transaction is as follows: the parameter request equipment initiates a parameter request transaction and sends the parameter request transaction to the management equipment of the request equipment, and the management equipment of the parameter request equipment confirms and carries out format conversion on the transaction and then sends the transaction to the management node thereof; after receiving the transaction, the management node of the node where the parameter request equipment is located broadcasts the transaction; after receiving the parameter request transaction, the management node on the chain firstly confirms whether the transaction requested equipment of the parameter request transaction is in the node managed by the management node, and if not, the management node on the chain sends the parameter request transaction to other management nodes on the chain; if the parameter request device of the transaction is in the authority management list, the transaction is sent to the management device of the node, the requested node management device signs the parameter request transaction and sends the signed transaction to the management node thereof so as to store the transaction in an interactive chain, and at the moment, the management device of the requested electronic device acquires the parameter from the requested electronic device and then sends the acquired parameter to the parameter request device through a data transmission protocol.
In the interactive chain, the parameters for requesting transmission are not transmitted on the chain as a part of the transaction, so that the advantages of the blockchain in the aspects of decentralizing evidence storage and verification are fully exerted on one hand, and transaction data are prevented from being tampered; on the other hand, the scale of the data on the chain is greatly reduced, and the requirements on the energy storage capacity and the calculation capacity of the equipment on the chain are reduced. The interactive chain proposed in the present invention is thus a significant improvement over the prior art.
Example 5:
preferably, the invention adopts a two-stage consensus mode to complete the consensus, wherein the two-stage consensus comprises a first-stage consensus and a second-stage consensus.
Preferably, in a first consensus, each class processes transactions inside the class and forms a new block. Each class sends the new blocks formed to the chain through the management node to facilitate secondary consensus.
Preferably, after expiration of the management period, a new round of the election process of the management node is entered.
Preferably, during the management period, the management node will end the management period in advance when: the management node fails, fails to continue to fulfill management responsibilities, and is judged as dishonest in the management process. And when the management period is finished in advance, entering a new round of selection process of the management node.
Preferably, the above set value may be set to 60%, 65% or 70%.
Preferably, the management node may be generated by one of three methods: generating a management node according to the credit score; generating a management node according to the pre-crossed honest gold amount; and generating a management node according to the credit score and the honest and honest judgment of the pre-crossing.
In the prior art, all nodes can require consensus and form new blocks by means of workload proof algorithms and the like, and the number of the nodes is numerous, so that the efficiency is reduced directly, a great deal of computing power is consumed to solve a hash function to obtain the accounting rights. The single consensus can verify all transactions of a class in a consensus period, so that the efficiency of the single consensus is effectively improved. In addition, the first-level consensus of each class can be performed simultaneously, and the consensus efficiency is remarkably improved. In conclusion, compared with the prior art, the technical scheme provided by the invention improves the efficiency and reduces the resource waste.
Example 6:
preferably, the workflow of generating the first consensus of the management node based on the credit score is (1) the management node connects the transactions of all nodes in the class managed by the management node to form a block to be subjected to consensus; (2) The management node sends a block to be subjected to consensus to the node managed by the management node; (3) Other nodes in the same class check whether the block to be identified is correct, and the checked content comprises whether the content of each transaction is correct or not and whether the hash value of each transaction is correct or not. (4) If the confirmation is correct, sending a confirmation message to the management node; if the confirmation is wrong, the punishment of the dishonest node is entered. (5) And (3) when the confirmation information received by the management node reaches a set value, submitting the block in the step (1) to the interactive chain by the management node.
Preferably, in the punishment of the dishonest node in step (4) of the first-level consensus operation process, if a problem is considered to exist and is considered to be caused by dishonest of a certain managed node, negative acknowledgement information is sent to the managed node and a dishonest node is indicated, and when the command for a certain node is received to reach a set value, dishonest of the managed node is determined. At this point, after deducting its program score, it is required to submit the corrected transaction, and the management node re-formulates the consensus block and resumes the first-level consensus. And carrying out corresponding credit scoring increasing operation on all nodes which send negative information to the management node and indicate dishonest nodes. And deducting the node credit score of the management node which is required to be replaced by the transmission of the negative acknowledgement information when the node which is used for indicating the dishonest node does not reach the set value, namely the indication is proved to be wrong.
On one hand, the mechanism can encourage more nodes to perform supervision under the responsibility of the dead end, and prevent the loss caused by dishonest nodes; on the other hand, it is possible to prevent some nodes from making an unexpected command to obtain a credit score award.
Preferably, the set value in the previous stage may be set to 60%, 65% or 70%.
Preferably, in the punishment of the dishonest node in step (4) of the first-level consensus operation process, if a problem is considered to exist and is considered to be caused by dishonest of the management node, sending negative acknowledgement information to other nodes in the class and requiring replacement of the management node, and when the information requiring replacement of the management node reaches a set value, determining that the management node is dishonest. At this time, deducting the credit score corresponding to the dishonest management node, executing the process of replacing the management node, and after replacing the management node, re-planning the consensus block by the new management node and restarting the first-level consensus. And carrying out corresponding credit scoring increasing operation on all nodes which send the negative acknowledgement information and require replacement management nodes. And deducting node credit scores of the nodes which send the negative acknowledgement information and require the replacement management node when the information of the replacement management node is required to not reach the set value, namely the indication control is proved to be wrong.
On one hand, the mechanism can form effective supervision of management nodes, can encourage more nodes to perform supervision in charge of due duty, and prevents huge loss caused by dishonest management nodes; on the other hand, it is possible to prevent some nodes from issuing dishonest directives for obtaining credit score rewards.
Preferably, the set value in the previous stage may be set to 60%, 65% or 70%.
Preferably, the second-level consensus workflow is that after receiving new blocks formed by each class, the management node on the interactive chain checks whether the blocks submitted by each block are correct, and sends out a confirmation message if the blocks submitted by each block are confirmed, and sends out a denial message if the blocks submitted by each block are found to be wrong. If the management node sending the confirmation message reaches the appointed value, the interactive chain links the blocks of each class together once to form a new block of the interactive chain, broadcasts the finally formed block, and starts the next consensus period.
Preferably, if the management node that sent the acknowledgement message does not reach the specified value, processing is performed in one of the following two ways: (1) When the block submitted by a class contains error transactions and the number of nodes participating in confirmation in the class exceeds a set value, punishment is performed on the class, specifically, credit scores of the nodes participating in confirmation in the class are deducted, and a management node is notified to submit the corrected block. (2) When the block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class does not exceed a set value, judging that the management nodes are dishonest at the moment, punishing the management nodes of the class, specifically, deducting credit scores of the management nodes in the class, executing a process of replacing the management nodes, and after replacing the management nodes, re-planning the consensus block by a new management node.
Preferably, the set value in the previous stage may be set to 60%, 65% or 70%.
Preferably, the method of generating a management node from a credit score comprises the steps of: (1) determining election authority of each node according to the scores; (2) electing to generate a new management node; (3) And adjusting the credit scores of the nodes according to the conditions during the management period.
Preferably, in the step (1) of the process of generating management nodes according to credit scores, the method includes the steps of ordering credit scores of all nodes in a class to form an ordered list, wherein the top of the order is 0% -a 1 Is identified as a high credit node, can participate in election as a preliminary management node, and has the right to elect and be elected at the same time; rank a 1 -a 2 The node of (a) is identified as a general node, has election rights, and is not elected; rank a 2 100% of the nodes are considered as low-credit nodes, have no election rights, are not elected, i.e. cannot participate in the election; wherein 0% is<a1<a2<100%。
Preferably, in the step (2) of the process of generating the management node according to the credit score, the first 0% -a is performed by voting 1 And selecting a new management node from the nodes, and obtaining the node selected management node with the most approval ticket. Nodes with the right to vote can vote in favor of the vote, and can vote in disuse of the vote.
Preferably, in the step (3) of the process of generating the management node according to the credit score, the credit score of the node is adjusted according to the following method: (1) When the selected management node keeps integrity in the management period, after the management period is finished, the credit score of the node which is priced for the ticket by the management node is increased by 1 point, the credit score of the node which is priced for the ticket by the management node is deducted by 0.5 point, and the unbuckled point of the abandoning right is not added. (2) And when the selected management node is dishonest in the management period, after the management period is finished, deducting the credit score of 0.5 point from the node which is prized by the management node for ticket, adding the credit score of 1 point to the node which is prized by the management node for ticket, and adding no point to the unbuckling of the override. (3) And when the selected management node is dishonest in the management period, the credit score is deducted from the management node for 5 minutes after the management period is finished. The number of nodes that send negative acknowledgement in the first consensus and require replacement of management nodes is increased by 1 point. (4) And the managed node is dishonest in a management period, and after the dishonest behavior is confirmed, the credit score is deducted for 2 points from the managed node, and the node which sends the denial information to the management node and indicates the dishonest node is increased by 0.5 point. (5) In the first consensus, when a node that sends negative acknowledgement to the management node and indicates a dishonest node does not reach a set value, a node that sends negative acknowledgement to the management node and indicates a dishonest node is deducted by 0.5 points. (6) In the first consensus, when the information of the replacement requiring management node does not reach the set value, 1 point is deducted from the node requiring the replacement management node. (7) And when the class is punished in the second-level consensus, deducting the credit score of the participating confirmation node in the class by 1 point.
The above limitation of increasing and deducting the score mainly considers the malicious degree of the node, and the specific analysis is as follows, and for the management node to be dishonest in the management period, the management node obviously has subjective deliberately and the damage caused by the dishonest of the management node is larger, so the treatment of deducting 5 points is adopted for the management node. For dishonest of the managed node, it is obvious that it is also subjective with intention but the harm caused by dishonest of the managed node is smaller, so a 2 point deduction treatment is adopted for it. For a management node to be dishonest in its management period, it is possible that a node that grants a ticket to the dishonest management node is too late, and therefore a process of deducting 0.5 points is adopted for it. When the denial information is sent to the management node and the node of the dishonest node does not reach the set value, namely the command is not established, the above-mentioned node initiating the command is discussed in two cases, the first is that the node initiating the command is a dishonest node and hopes to obtain the credit score through a dishonest command mode, and the second is that the node initiating the command is a good node, but the careless command is caused by carelessness. A severe penalty should be made for the first node, but an excessive penalty will frustrate the supervision enthusiasm of the second node. Therefore, the punishment of the nodes with the unsatisfied command is set to be 0.5, and the score which can be obtained by the establishment of the command is not exceeded, so that the dishonest nodes can be punished at the moment, and the supervision enthusiasm of the nodes with the frustrated meaning caused by the oversized punishment can be avoided.
According to the analysis, the credit score adjusting method is provided by reasonably setting the score of the addition and subtraction, so that the credit score adjusting method with strong operability can encourage all nodes to adhere to the integrity and effectively prevent malicious control.
Preferably, a default score is given to the newly added node, which may be set to 50, 60, or 70.
Example 7:
in the foregoing embodiment, a method for generating a management node according to a credit score is provided, but in actual operation, a better effect is often achieved by giving a substance reward to an honest node and giving a substance penalty to a dishonest node.
Preferably, the nodes can participate in the first-class consensus after pre-crossing a certain amount of loyalty.
Preferably, the loss due to dishonest managed nodes is small, while the loss due to dishonest managed nodes is large. Thus, the most prime nodes are used as management nodes.
Preferably, the specific workflow of the management node is generated according to the amount of the pre-honest gold: after the management period expires, the most dishonest node becomes the management node for the next management period. Within the management period, the management node will end the management period in advance when: the management node fails and cannot continue to fulfill management responsibilities; is judged as dishonest during the management process. The managed node does not receive the information sent by the management node within the appointed time, namely the management node is considered to be faulty, and a new round of management node selection process is performed. At this time, the generation process of the management node is as follows: and comparing the honest gold of all the nodes except the current management node, wherein the node with the highest honest gold of the pre-crossing is the management node.
Preferably, the above set value may be set to 60%, 65% or 70%.
The management node is selected according to the dishonest amount, so that the maximum dishonest amount of the management node is ensured, and once dishonest behaviors occur, the maximum dishonest amount is received, so that effective frightening can be formed on dishonest behaviors of the management node, and huge loss caused by dishonest behaviors of the management node is prevented. In addition, for the election efficiency, the node voting link is omitted in a mode of directly comparing the value of the honest gold amount, so that the election program is further simplified, and the management node is facilitated to be rapidly generated.
Preferably, the workflow of generating a primary consensus of the management node based on the pre-crossed loyalty points is the same as that of example 6.
Preferably, in the punishment of the dishonest node in step (4) of the first-level consensus operation process, if a problem is considered to exist and is considered to be caused by dishonest of a certain managed node, negative acknowledgement information is sent to the managed node and a dishonest node is indicated, and when the command for a certain node is received to reach a set value, dishonest of the managed node is determined. At this time, the pre-dishonest fund of the dishonest managed node is not received, the pre-dishonest fund is required to be re-pre-dishonest fund and the corrected transaction is submitted, and the management node re-formulates the consensus block and resumes the first-level consensus. For the undeniated pre-loyalty points, all nodes which send negative acknowledgement information to the management node and indicate bad nodes are distributed according to the proportion of the paid loyalty points.
The working method can form effective supervision on the managed nodes, guide all the nodes to make an faithful action, and actively search errors and report.
Preferably, according to the paymentThe distribution of the pre-dishonest gold which is not collected by the proportion of the dishonest gold is specifically as follows: assuming that the amount of the dishonest gold is M, sending denial information and requiring the number of nodes replacing the management node to be N, wherein the dishonest gold crossed by each node in the N nodes is N 1 、N 2 …N n The k node can obtain the pre-honesty gold of M k =M*N k /(N 1 +N 2 …+N n )。
By adopting the proportion distribution mode, all nodes can be encouraged to pay as much as possible of loyalty, and paying more loyalty is favorable for keeping the nodes in the integrity, so the distribution mode is favorable for promoting the nodes to keep in the integrity.
Preferably, the above set value may be set to 60%, 65% or 70%.
Preferably, in the punishment of the dishonest node in step (4) of the first-level consensus operation process, if a problem is considered to exist and is considered to be caused by dishonest of the management node, sending negative acknowledgement information to other nodes in the class and requiring replacement of the management node, and when the information requiring replacement of the management node reaches a set value, determining that the management node is dishonest. At this time, the pre-dishonest fee of the dishonest management node is not collected, the dishonest management node is required to pay the dishonest fee again, the process of replacing the management node is executed, and after the management node is replaced, a new management node re-formulates the consensus block and resumes the first-level consensus. For the uncollected pre-honest gold, all nodes which send negative acknowledgement information and require replacement management nodes are distributed according to the proportion of the honest gold. On one hand, the mechanism can form effective supervision on the management node, and prevent huge loss caused by dishonest management nodes; on the other hand, more nodes can be encouraged to be responsible for supervision.
Preferably, the above set value may be set to 60%, 65% or 70%.
Preferably, the amount of honest gold has the lowest requirement, but no upper limit. Too low a cost of dishonest will not be favorable for all nodes to remain dishonest, and minimum requirements are set to ensure the minimum cost of dishonest nodes.
Preferably, the second-level consensus workflow is that after receiving new blocks formed by each class, the management node on the interactive chain checks whether the blocks submitted by each block are correct, and sends out a confirmation message if the blocks submitted by each block are confirmed, and sends out a denial message if the blocks submitted by each block are found to be wrong. If the management node sending the confirmation message reaches the appointed value, the interactive chain links the blocks of each class together once to form a new block of the interactive chain, broadcasts the finally formed block, and starts the next consensus period.
Preferably, if the management node that sent the acknowledgement message does not reach the specified value, processing is performed in one of the following two ways: (1) When the block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class exceeds a set value, punishment is carried out on the class, specifically, the honest money of the nodes participating in confirmation in the class is not received, the nodes participating in confirmation are required to be pre-treated with honest money again, and a management node is informed of submitting the corrected block. For the pre-dishonest gold that is not received, it is allocated by the management node that finds the error on the interaction chain. (2) When the block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class does not exceed a set value, the management node is judged to be dishonest at the moment, punishment is carried out on the management node of the class, specifically, the dishonest management node is not collected, the dishonest is paid again, the flow of replacing the management node is executed, and after the management node is replaced, the new management node is used for re-planning the consensus block.
Preferably, the above set value may be set to 60%, 65% or 70%.
Preferably, for the pre-honest gold that is not earned, the management nodes on the interactive chain that find errors are proportioned by the pre-honest gold.
In the second-level consensus, since only the management node can participate in the allocation of the refund pre-honest gold, more managed nodes are willing to participate in the competition of the management node by increasing the amount of the pre-honest gold. Furthermore, only the trusted nodes that find errors may be assigned. Therefore, the system provided by the invention can guide the management node to keep the integrity so as to participate in the distribution of the uncollected pre-honest gold, and avoid the high pre-honest gold from being uncollected due to dishonest.
Example 8:
in order to fully exploit the advantages of the two management node generation methods in embodiment 6 and embodiment 7, a hybrid management node generation method is proposed in this embodiment by combining the features of the two.
Preferably, the workflow based on the first consensus of the hybrid management node generation method is the same as that of embodiment 6.
Preferably, in the punishment of the dishonest node in step (4) of the first-level consensus operation process, if a problem is considered to exist and is considered to be caused by dishonest of a certain managed node, negative acknowledgement information is sent to the managed node and a dishonest node is indicated, and when the command for a certain node is received to reach a set value, dishonest of the managed node is determined. At this time, the dishonest managed node is not received for the pre-dishonest fee, the pre-dishonest fee is again received, the corresponding credit score is deducted, the transaction after correction is required to be submitted, the management node re-formulates the consensus block and re-starts the first-level consensus. And carrying out corresponding credit scoring increasing operation on all nodes which send negative information to the management node and indicate dishonest nodes. And deducting the node credit score of the management node which is required to be replaced by the transmission of the negative acknowledgement information when the node which is used for indicating the dishonest node does not reach the set value, namely the indication is proved to be wrong. For the undeniated pre-loyalty points, all nodes which send negative acknowledgement information to the management node and indicate bad nodes are distributed according to the proportion of the paid loyalty points.
Preferably, the set value in the previous stage may be set to 60%, 65% or 70%.
Preferably, in the punishment of the dishonest node in step (4) of the first-level consensus operation process, if a problem is considered to exist and is considered to be caused by dishonest of the management node, sending negative acknowledgement information to other nodes in the class and requiring replacement of the management node, and when the information requiring replacement of the management node reaches a set value, determining that the management node is dishonest. At this time, the pre-dishonest fee of the dishonest management node is not received, the dishonest fee is required to be paid again, the corresponding credit score of the dishonest management node is deducted, the process of replacing the management node is executed, and after the management node is replaced, the new management node re-formulates the consensus block and resumes the first-level consensus. And carrying out corresponding credit scoring increasing operation on all nodes which send the negative acknowledgement information and require replacement management nodes. And deducting node credit scores of the nodes which send the negative acknowledgement information and require the replacement management node when the information of the replacement management node is required to not reach the set value, namely the indication control is proved to be wrong. For the uncollected pre-honest gold, all nodes which send negative acknowledgement information and require replacement management nodes are distributed according to the proportion of the honest gold.
Preferably, the set value in the previous stage may be set to 60%, 65% or 70%.
Preferably, the second-level consensus workflow is that after receiving new blocks formed by each class, the management node on the interactive chain checks whether the blocks submitted by each block are correct, and sends out a confirmation message if the blocks submitted by each block are confirmed, and sends out a denial message if the blocks submitted by each block are found to be wrong. If the management node sending the confirmation message reaches the appointed value, the interactive chain links the blocks of each class together once to form a new block of the interactive chain, broadcasts the finally formed block, and starts the next consensus period.
Preferably, if the management node that sent the acknowledgement message does not reach the specified value, processing is performed in one of the following two ways: (1) When the block submitted by a class contains error transaction and the number of the nodes participating in confirmation in the class exceeds a set value, punishment is carried out on the class, specifically, the honest fee of the nodes participating in confirmation in the class is not received, the nodes participating in confirmation are required to pay honest fee again, credit scores of the nodes participating in confirmation in the class are deducted, and a management node is informed to submit the corrected block. (2) When the block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class does not exceed a set value, judging that the management nodes are dishonest at the moment, punishing the management nodes of the class, specifically, collecting the dishonest management nodes for dishonest, requiring the dishonest management nodes to pay the dishonest, deducting the credit scores of the management nodes in the class, executing a process of replacing the management nodes, and after the management nodes are replaced, re-planning the consensus block by a new management node.
Preferably, the set value in the previous stage may be set to 60%, 65% or 70%.
Preferably, the method of generating a management node from a credit score comprises the steps of: (1) determining election authority of each node according to the scores; (2) Determining a management node in the nodes with the selected right according to the node pre-exchange loyalty money; (3) And adjusting the credit scores of the nodes according to the conditions during the management period.
Preferably, the step (1) of generating the hybrid management node includes the steps of ordering credit scores of all nodes in the class to form an ordered list, and ranking the top 0% -b 1 Is considered as a high credit node and can participate in election as a preparation management node, wherein 0 percent<b 1 <100%。
Preferably, in the step (2) of generating the hybrid management node, the credit score is ranked 0% -b before 1 And (3) sorting the nodes according to the pre-dishonest monetary amount, wherein the node with the highest pre-dishonest monetary amount is selected and managed.
Preferably, the score adjustment method in the hybrid management node generation step (3) is the same as that in embodiment 6.
Preferably, a default score is given to the newly added node, which may be set to 50, 60, or 70.
The management node generation method provided by the embodiment can avoid time and calculation waste caused by organizing voting, and can determine new management nodes through sorting. In addition, the method provided in the embodiment ensures that the node serving as the management node has higher trust score, namely higher credibility; on the other hand, the node with the highest loyalty money acts as the management node, so that the management node can be guaranteed to pay the maximum cost once dishonest behaviors occur, and the dishonest nodes are further prevented from being converted into dishonest nodes.
Example 9
In order to fully exploit the advantages of the two management node generation methods in embodiment 6 and embodiment 7, a hybrid management node generation method is proposed in this embodiment by combining the features of the two.
Preferably, the workflow based on the first consensus of the hybrid management node generation method is the same as that of embodiment 8.
Preferably, the punishment of the dishonest node of step (4) of the first-order consensus process is the same as in example 8.
Preferably, the workflow of the second consensus is the same as that of example 8.
Preferably, the hybrid management node generation steps are as follows: (1) determining election authority of each node according to the scores; (2) Determining a management node in the nodes with the selected right according to the node pre-crossing loyalty money and the credit score; (3) And adjusting the credit scores of the nodes according to the conditions during the management period.
Preferably, in the step (1) of generating the hybrid management node, the method includes the steps of ordering credit scores of all nodes in the class to form an ordered list, and ranking the top 0% -c 1 Is considered as a high credit node and can participate in election as a preparation management node, wherein 0 percent<c 1 <100%。
Preferably, in the step (2) of generating the hybrid management node, assuming that there are V nodes with credit scores ranging from 0% to c1, firstly, a credit score ranking table a of the V nodes is obtained, and secondly, a V node payment honest gold amount ranking table B is obtained, and then the comprehensive score of the node W is:
Z=s 1 *A W +s 2 *B W
wherein: s is(s) 1 、s 2 For credit scoring coefficient, pay honest and honest coefficient s 1 >0,s 2 >0,s 1 +s 2 =1;
A W Ranking the score corresponding to the ranking in the credit score of the node W, wherein the score corresponding to the 1 st is highest, and the scores are subtracted in turn1, for example: the corresponding score of 1 is V, the corresponding score of 2 is V-1, the corresponding score of 3 is V-2, and so on;
B W for the score of the node W corresponding to the ranking in the honest amount, the score of 1 st is highest, and the following steps are sequentially subtracted by 1, for example: the corresponding score of 1 is V, the corresponding score of 2 is V-1, the corresponding score of 3 is V-2, and so on;
And sorting according to the magnitude of the comprehensive score Z values, and selecting the management node by the node with the largest comprehensive score Z value.
Preferably, s can be set in the case of a low degree of mutual trust between nodes 1 The value is set to be small, s 2 The value is set to be larger. For example, will s 1 The value is set to 0.2 and the s2 value is set to 0.8. Preferably, s can be set in the case of complete distrust between nodes 1 The value is set to 0.1, s 2 The value is set to 0.9 and s is even 1 The value is set to 0, s 2 The value is set to 1.
Preferably, in the case of a high degree of mutual trust between nodes, s can be set 1 The value is set to be small, s 2 The value is set to be larger. For example, will s 1 The value is set to 0.8, s 2 The value was set to 0.2.
Preferably, the method for adjusting the credit score in the step (3) of generating the mixed management node is the same as that in the embodiment 8.
Preferably, a default score is given to the newly added node, which may be set to 50, 60, or 70.
By adopting the technical scheme in the embodiment, the corresponding credit scoring coefficient and the corresponding payment honest-gold coefficient can be dynamically adjusted according to the trust status among the nodes so as to meet the requirement of risk control. Specifically, in the case of a low degree of mutual trust, s is increased 2 And the value of the management node election strategy taking the size of the honest gold amount as a guide is ensured. Correspondingly, under the condition of higher mutual trust degree, s is increased 1 The value ensures the election strategy of the management node guided by the credit degree, and can reduce the height under the condition of ensuring the integrity of the management nodeThe dishonest gold causes a financial pressure on the node.
The above embodiments are only for illustrating the present invention and not for limiting the technical solutions described in the present invention, and although the present invention has been described in detail in the present specification with reference to the above embodiments, the present invention is not limited to the above specific embodiments, and thus any modifications or equivalent substitutions are made to the present invention; all technical solutions and modifications thereof that do not depart from the spirit and scope of the invention are intended to be included in the scope of the appended claims.
Claims (4)
1. A block chain consensus method based on pre-crossing honest gold is characterized in that: classifying nodes in the blockchain, and generating management nodes in the class according to the amount of the node pre-honest gold; adopting a two-stage consensus mode to complete consensus, wherein the two-stage consensus comprises a first-stage consensus and a second-stage consensus;
in the first-level consensus, each class processes the transaction in the class and forms a new block, and each class transmits the formed new block to a chain through a management node to carry out second-level consensus; the nodes can participate in the first-level consensus after pre-crossing a certain amount of honest money;
Within the management period, the management node will end the management period in advance when: the management node fails, cannot continue to fulfill management responsibilities, and is judged as dishonest in the management process; when the management period is finished in advance, a new round of selection process of the management node is entered;
the first-level consensus workflow is that (1) the management node connects the transactions of all nodes in the managed class to form a block to be subjected to consensus; (2) The management node sends a block to be subjected to consensus to the node managed by the management node; (3) Other nodes in the same class check whether the block to be subjected to consensus is correct, and the checked content comprises whether the content of each transaction is correct or not and whether the hash value of each transaction is correct or not; (4) If the confirmation is correct, sending a confirmation message to the management node; if the confirmation is wrong, entering a punishment of the dishonest node; (5) When the confirmation information received by the management node reaches a set value, the management node submits the block in the step (1) to a block chain;
in the punishment of the dishonest node in the step (4) of the primary consensus working process, if a problem is considered to exist and is considered to be caused by dishonest of a certain managed node, negative acknowledgement information is sent to the managed node and a dishonest node is indicated, and when the command for a certain node is received to reach a set value, dishonest of the managed node is judged; at this time, the pre-dishonest gold of the dishonest managed node is not received, the pre-dishonest gold is required to be re-pre-dishonest gold is submitted to the transaction after correction, and the management node re-formulates the consensus block and resumes the first-level consensus; for the undeniated pre-honest gold, all nodes which send negative information to the management node and indicate bad nodes are distributed according to the proportion of paying honest gold;
In the punishment of the dishonest node in the step (4) of the primary consensus working process, if a problem is considered to exist and is considered to be caused by dishonest of the management node, sending negative acknowledgement information to other nodes in the class and requiring replacement of the management node, and judging that the management node is dishonest when the information requiring replacement of the management node reaches a set value; at this time, the pre-dishonest fee of the dishonest management node is not received, the dishonest management node is required to pay the dishonest fee again, the process of replacing the management node is executed, and after the management node is replaced, a new management node re-formulates a consensus block and resumes the first-level consensus; for the uncollected pre-honest gold, distributing all nodes which send negative acknowledgement information and require replacement management nodes according to the proportion of the honest gold;
the second-level consensus workflow is that after receiving new blocks formed by each class, a management node on the blockchain checks whether the blocks submitted by each block are correct, and sends out a confirmation message if the blocks submitted by each block are confirmed, and sends out a denial message if the blocks submitted by each block are found to be wrong; if the management node sending the confirmation message reaches the appointed value, the block chain links all the blocks together once to form a new block of the block chain, the finally formed block is broadcasted, and the next consensus period is started;
If the management node that sent the acknowledgement message does not reach the specified value, processing is performed in one of two ways: (1) When the block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class exceeds a set value, punishment is carried out on the class, namely, the honest money of the nodes participating in confirmation in the class is not received, the nodes participating in confirmation are required to be pre-treated with honest money again, and a management node is informed of submitting the corrected block; for the collected pre-dishonest gold, the management node which finds errors on the blockchain is distributed; (2) When a block submitted by a class contains error transaction and the number of nodes participating in confirmation in the class does not exceed a set value, judging that the management nodes are dishonest at the moment, punishing the management nodes of the class, specifically, collecting dishonest management nodes, paying dishonest money again and executing a process of replacing the management nodes, and after replacing the management nodes, re-planning a consensus block by a new management node; for the pre-dishonest gold that is not received, the management nodes on the blockchain that find errors are proportioned by the pre-dishonest gold.
2. The blockchain consensus method based on pre-dishonest gold of claim 1, wherein: the method for distributing the pre-dishonest gold according to the proportion of dishonest gold is characterized in that the dishonest gold amount is assumed to be M, the number of nodes which send denial information and require replacement of management nodes is N, and the dishonest gold of each node in the N nodes is N 1 、N 2 …N n The k node can obtain the pre-honesty gold of M k =M*N k /(N 1 +N 2 …+N n )。
3. The blockchain consensus method based on pre-dishonest gold of claim 2, wherein: the management node is generated by using the node with the most pre-honesty gold as the management node.
4. A blockchain-based electronic device management system, wherein the blockchain consensus method based on the pre-cross loyalty is adopted to complete consensus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010398280.1A CN111695996B (en) | 2020-05-12 | 2020-05-12 | Block chain consensus method and system based on pre-crossing honest gold |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010398280.1A CN111695996B (en) | 2020-05-12 | 2020-05-12 | Block chain consensus method and system based on pre-crossing honest gold |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111695996A CN111695996A (en) | 2020-09-22 |
CN111695996B true CN111695996B (en) | 2024-02-20 |
Family
ID=72477698
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010398280.1A Active CN111695996B (en) | 2020-05-12 | 2020-05-12 | Block chain consensus method and system based on pre-crossing honest gold |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111695996B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107481146A (en) * | 2017-10-13 | 2017-12-15 | 深圳市招股科技有限公司 | One kind is based on the safe and efficient financial trade method of block chain |
GB201807568D0 (en) * | 2018-05-09 | 2018-06-20 | Centrica Plc | System for controlling energy supply and processing energy transactions |
CN108564468A (en) * | 2018-04-04 | 2018-09-21 | 上海金丘信息科技股份有限公司 | A kind of common recognition method based on the dynamic equity for trusting member |
CN109034813A (en) * | 2018-09-07 | 2018-12-18 | 腾讯科技(深圳)有限公司 | Represent node device electoral machinery, device, computer equipment and storage medium |
WO2019147295A1 (en) * | 2018-01-29 | 2019-08-01 | Ubiquicorp Limited | Proof of majority block consensus method for generating and uploading a block to a blockchain |
CN110189128A (en) * | 2019-06-06 | 2019-08-30 | 西安安盟智能科技股份有限公司 | A kind of algorithm and device of the distributed common recognition quickly generated for block |
CN110517139A (en) * | 2019-08-23 | 2019-11-29 | 电子科技大学 | A kind of alliance's block chain fraction common recognition method based on voting mechanism |
GB2577751A (en) * | 2018-10-05 | 2020-04-08 | Dragon Infosec Ltd | A consensus method and framework for a blockchain system |
CN111010278A (en) * | 2019-11-14 | 2020-04-14 | 江苏大学 | High fault tolerance layered consensus method based on DPoS |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018120121A1 (en) * | 2016-12-30 | 2018-07-05 | 深圳前海达闼云端智能科技有限公司 | Block chain permission control method, device, and node apparatus |
US10839379B2 (en) * | 2017-07-20 | 2020-11-17 | Chicago Mercantile Exchange Inc. | Blockchain including linked digital assets |
-
2020
- 2020-05-12 CN CN202010398280.1A patent/CN111695996B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107481146A (en) * | 2017-10-13 | 2017-12-15 | 深圳市招股科技有限公司 | One kind is based on the safe and efficient financial trade method of block chain |
WO2019147295A1 (en) * | 2018-01-29 | 2019-08-01 | Ubiquicorp Limited | Proof of majority block consensus method for generating and uploading a block to a blockchain |
CN108564468A (en) * | 2018-04-04 | 2018-09-21 | 上海金丘信息科技股份有限公司 | A kind of common recognition method based on the dynamic equity for trusting member |
GB201807568D0 (en) * | 2018-05-09 | 2018-06-20 | Centrica Plc | System for controlling energy supply and processing energy transactions |
CN109034813A (en) * | 2018-09-07 | 2018-12-18 | 腾讯科技(深圳)有限公司 | Represent node device electoral machinery, device, computer equipment and storage medium |
GB2577751A (en) * | 2018-10-05 | 2020-04-08 | Dragon Infosec Ltd | A consensus method and framework for a blockchain system |
CN110189128A (en) * | 2019-06-06 | 2019-08-30 | 西安安盟智能科技股份有限公司 | A kind of algorithm and device of the distributed common recognition quickly generated for block |
CN110517139A (en) * | 2019-08-23 | 2019-11-29 | 电子科技大学 | A kind of alliance's block chain fraction common recognition method based on voting mechanism |
CN111010278A (en) * | 2019-11-14 | 2020-04-14 | 江苏大学 | High fault tolerance layered consensus method based on DPoS |
Non-Patent Citations (2)
Title |
---|
宋焘谊 ; 赵运磊 ; .区块链共识算法的比较研究.计算机应用与软件.2020,(第08期),全文. * |
李忠诚 ; 黄建华 ; 唐瑞琮 ; 胡庆春 ; 夏旭 ; .一种基于权益代表的可扩展共识协议.应用科学学报.2018,(第01期),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111695996A (en) | 2020-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111695994B (en) | Block chain consensus method and system based on credit score | |
US20230316414A1 (en) | Blockchain subrogation claims with arbitration | |
US10230711B2 (en) | System and methods for enhancing authentication procedures in an anti-fraud environment | |
CN107220130B (en) | Method, device and system for realizing information consensus at nodes of block chain | |
CN110602217B (en) | Block chain-based alliance management method, device, equipment and storage medium | |
CN112039964A (en) | Node reputation consensus method based on block chain | |
CN112685766B (en) | Enterprise credit investigation management method and device based on block chain, computer equipment and storage medium | |
CN111754307B (en) | Multi-factor electric quantity transaction matching method and device based on block chain | |
CN106845210A (en) | Event authentication method and apparatus | |
CN111988137B (en) | DPoS (dual port service) consensus method and system based on threshold signature and fair reward | |
CN112636905B (en) | System and method for extensible consensus mechanism based on multiple roles | |
US20220351284A1 (en) | System and method for the rapid, flexible approval and disbursement of a loan | |
CN108769230A (en) | Transaction data storage method, device, server and storage medium | |
CN113407632A (en) | PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm | |
CN111695997B (en) | Block chain consensus method and system based on node credit scoring and pre-cross loyalty | |
CN115499129A (en) | Multimode trust cross-chain consensus method, system, medium, equipment and terminal | |
CN105590215A (en) | Device and method for data processing on-line processing of date mistakes between mechanisms | |
CN116015672A (en) | PBFT consensus mechanism based on reputation model | |
CN110445795A (en) | A kind of block chain certification uniqueness confirmation method | |
CN111695996B (en) | Block chain consensus method and system based on pre-crossing honest gold | |
CN111695995B (en) | Electronic equipment management system based on block chain technology | |
CN111899094B (en) | Block chain consensus method and system based on node credit scoring and pre-crossing loyalty | |
CN111741061B (en) | Electronic equipment wide area management system based on block chain technology | |
CN111741062B (en) | Electronic equipment local area management system based on block chain technology | |
CN113568972A (en) | Mixed consensus realization device and method for schema block chain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |