CN111695994B - Block chain consensus method and system based on credit score - Google Patents

Block chain consensus method and system based on credit score Download PDF

Info

Publication number
CN111695994B
CN111695994B CN202010398222.9A CN202010398222A CN111695994B CN 111695994 B CN111695994 B CN 111695994B CN 202010398222 A CN202010398222 A CN 202010398222A CN 111695994 B CN111695994 B CN 111695994B
Authority
CN
China
Prior art keywords
management
node
nodes
consensus
dishonest
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
Application number
CN202010398222.9A
Other languages
Chinese (zh)
Other versions
CN111695994A (en
Inventor
彭祎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xinyu Matrix Technology Co ltd
Original Assignee
Chengdu Xinyu Matrix Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chengdu Xinyu Matrix Technology Co ltd filed Critical Chengdu Xinyu Matrix Technology Co ltd
Priority to CN202010398222.9A priority Critical patent/CN111695994B/en
Publication of CN111695994A publication Critical patent/CN111695994A/en
Application granted granted Critical
Publication of CN111695994B publication Critical patent/CN111695994B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting 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 credit scoring, which are used for classifying nodes in a block chain and generating management nodes in the class, wherein the two-stage consensus mode is adopted to complete the consensus, and 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 sends the formed new block to a chain through a management node to perform the second-level consensus. The nodes in each class only need to carry out consensus on the blocks proposed by the management nodes and determine the correct blocks, thereby obviously reducing the calculation frequency. 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.

Description

Block chain consensus method and system based on credit score
Technical Field
The invention relates to a block chain consensus method, in particular to a credit score-based block chain consensus method and system.
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:
and classifying nodes in the block chain, generating management nodes in the class, and completing consensus by adopting a two-stage consensus mode, 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 sends the formed new block to a chain through a management node to perform the second-level consensus.
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 department of the dishonest node (5) when the confirmation information received by the management node reaches a set value, submitting the block in the step (1) to the blockchain by the management node.
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, after deducting the program score, the management node asks for submitting the corrected transaction, and the management node re-formulates the consensus block and re-starts the first-level consensus; performing corresponding credit scoring increasing operation on all nodes which send negative acknowledgement information to the management node and indicate dishonest nodes; when the denial information is sent to the management node and the dishonest node is indicated not to reach the set value, namely the control is wrong, deducting the node credit score of the management node which is required to be replaced by the denial information;
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, deducting the corresponding credit scores of the dishonest management nodes, executing a process of replacing the management nodes, and after replacing the management nodes, re-planning the consensus blocks by the new management nodes and restarting the first-level consensus; performing corresponding credit score 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 command is incorrect.
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 one class contains error transaction and the number of nodes participating in confirmation in the class exceeds a set value, punishing the class, namely deducting credit scores of the nodes participating in confirmation in the class and notifying a management node 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.
The method for generating the management node according to the credit score comprises the following steps: (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.
In the step (1) of the process of generating management nodes according to the credit scores, the method comprises the following steps of sorting the credit scores of all nodes in the class to form a sorting table, wherein the nodes with the top ranking of 0% -a1 are identified as high credit nodes and can be used as preparation management nodes to participate in election, and the election and the elected rights are provided; the nodes ranked a1-a2 are identified as general nodes, have elections, and are not elected; the nodes with the rank of a2-100% are identified as low credit nodes, have no election rights, are not elected rights, and can not participate in the election; wherein 0% < a1< a2<100%;
In the step (2) of the process of generating the management nodes according to the credit scores, selecting new management nodes from the front 0% -a1 nodes in a voting mode to obtain the node selected management node with the most approval; nodes with the right to vote can vote in favor of the vote, and can vote in disuse of the vote.
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, adding credit score for 1 score to the node which is approved by the management node for ticket, deducting credit score for 0.5 score to the node which is approved by the management node for ticket, and adding no score to the unbuckled right; (2) When the selected management node is dishonest in the management period, after the management period is finished, deducting credit score of 0.5 score from the node which is approved by the management node to be voted, adding credit score of 1 score to the node which is approved by the management node to be anti-voted, and adding no score to the unbuckled weight of the abandonment; (3) The selected management node is dishonest in the management period, and after the management period is finished, the credit score is deducted from the management node for 5 points; adding 1 score to all nodes which send negative acknowledgement information in the first-level consensus and require replacement of management nodes; (4) The managed node is dishonest in a management period, and after the dishonest behavior is confirmed, credit scores are deducted from the managed node for 2 points, negative acknowledgement information is sent to the management node, and the node of the dishonest node is indicated to be added by 0.5 point; (5) In the first-level consensus, when the node which sends the denial information to the management node and indicates the dishonest node does not reach the set value, the node which sends the denial information to the management node and indicates the dishonest node deducts 0.5 point; (6) In the first-level consensus, when the information of the required replacement management node does not reach a set value, deducting 1 point from the node required 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.
A blockchain-based electronic device management system employs a blockchain consensus method based on credit score as described above 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) On one hand, the punishment mechanism of the dishonest node can form effective supervision of the management node, encourages more nodes to perform supervision in charge of the full duty, and prevents huge loss caused by the dishonest management node; on the other hand, it is possible to prevent some nodes from issuing dishonest directives for obtaining credit score rewards.
(4) A complete credit score adjusting method is established, and by reasonably setting up the plus-minus score, the credit score adjusting method with strong operability is provided, so that not only can the integrity of all nodes be encouraged, but also malicious control can be effectively prevented.
It should be noted that, according to the need of brevity, the above 4 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 Selecting new management node from the nodes to obtainThe most priced nodes select the management node. 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, the pre-dishonest gold which is not collected is distributed according to the proportion of the dishonest gold collection 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 For the score corresponding to the ranking in the credit score of the node W, the score corresponding to the 1 st is highest, and the scores are subtracted by 1 in turn, 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 can be scored according to the trust status among the nodesThe coefficient and the payment honest and honest coefficient are dynamically adjusted 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 fund pressure on the node caused by high-priced honesty under the condition of ensuring the honesty of the management 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 (5)

1. A blockchain consensus method based on credit scoring, characterized by: classifying nodes in the block chain, generating management nodes in the class according to credit scores of the nodes, and completing consensus by adopting a two-stage consensus mode, 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;
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 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, after deducting the program score, the management node asks for submitting the corrected transaction, and the management node re-formulates the consensus block and re-starts the first-level consensus; performing corresponding credit scoring increasing operation on all nodes which send negative acknowledgement information to the management node and indicate dishonest nodes; when the denial information is sent to the management node and the dishonest node is indicated not to reach the set value, namely the control is wrong, deducting the node credit score of the sent denial information and the dishonest node;
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, deducting the corresponding credit scores of the dishonest management nodes, executing a process of replacing the management nodes, and after replacing the management nodes, re-planning the consensus blocks by the new management nodes and restarting the first-level consensus; performing corresponding credit score increasing operation on all nodes which send the negative acknowledgement information and require replacement management nodes; when the information of the required replacement management node does not reach the set value, namely the command is incorrect, deducting the node credit score of the required replacement management node, which sends the negative acknowledgement information;
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 one class contains error transaction and the number of nodes participating in confirmation in the class exceeds a set value, punishing the class, namely deducting credit scores of the nodes participating in confirmation in the class and notifying a management node 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.
2. The blockchain consensus method based on credit scoring as in claim 1, wherein: the method for generating the management node according to the credit score comprises the following steps: (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.
3. The blockchain consensus method based on credit scoring as in claim 2, wherein:
in the step (1) of the process of generating management nodes according to the credit scores, the method comprises the following steps of sorting the credit scores of all nodes in the class to form a sorting table, wherein the nodes with the top ranking of 0% -a1 are identified as high credit nodes and can be used as preparation management nodes to participate in election, and the election and the elected rights are provided; the nodes ranked a1-a2 are identified as general nodes, have elections, and are not elected; the nodes with the rank of a2-100% are identified as low credit nodes, have no election rights, are not elected rights, and can not participate in the election; wherein 0% < a1< a2<100%;
in the step (2) of the process of generating the management nodes according to the credit scores, selecting new management nodes from the front 0% -a1 nodes in a voting mode to obtain the node selected management node with the most approval; nodes with the right to vote can vote in favor of the vote, and can vote in disuse of the vote.
4. A blockchain consensus method based on credit scores as in claim 3, wherein: 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, adding credit score for 1 score to the node which is approved by the management node for ticket, deducting credit score for 0.5 score to the node which is approved by the management node for ticket, and adding no score to the unbuckled right; (2) When the selected management node is dishonest in the management period, after the management period is finished, deducting credit score of 0.5 score from the node which is approved by the management node to be voted, adding credit score of 1 score to the node which is approved by the management node to be anti-voted, and adding no score to the unbuckled weight of the abandonment; (3) The selected management node is dishonest in the management period, and after the management period is finished, the credit score is deducted from the management node for 5 points; adding 1 score to all nodes which send negative acknowledgement information in the first-level consensus and require replacement of management nodes; (4) The managed node is dishonest in a management period, and after the dishonest behavior is confirmed, credit scores are deducted from the managed node for 2 points, negative acknowledgement information is sent to the management node, and the node of the dishonest node is indicated to be added by 0.5 point; (5) In the first-level consensus, when the node which sends the denial information to the management node and indicates the dishonest node does not reach the set value, the node which sends the denial information to the management node and indicates the dishonest node deducts 0.5 point; (6) In the first-level consensus, when the information of the required replacement management node does not reach a set value, deducting 1 point from the node required 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.
5. A blockchain-based electronic device management system, wherein the consensus is accomplished using a blockchain consensus method based on credit scores as in any of claims 1-4.
CN202010398222.9A 2020-05-12 2020-05-12 Block chain consensus method and system based on credit score Active CN111695994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010398222.9A CN111695994B (en) 2020-05-12 2020-05-12 Block chain consensus method and system based on credit score

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010398222.9A CN111695994B (en) 2020-05-12 2020-05-12 Block chain consensus method and system based on credit score

Publications (2)

Publication Number Publication Date
CN111695994A CN111695994A (en) 2020-09-22
CN111695994B true CN111695994B (en) 2023-12-26

Family

ID=72477661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010398222.9A Active CN111695994B (en) 2020-05-12 2020-05-12 Block chain consensus method and system based on credit score

Country Status (1)

Country Link
CN (1) CN111695994B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112926091B (en) * 2021-03-26 2022-08-12 支付宝(杭州)信息技术有限公司 Block chain-based data ownership recording and data transaction verification method and device
CN115021968B (en) * 2022-05-07 2023-04-25 北京航空航天大学 Trusted alliance link point management method taking credibility as core
CN115118436B (en) * 2022-08-23 2022-11-22 北京优品三悦科技发展有限公司 Block chain consensus method and device, storage medium and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107147735A (en) * 2017-05-12 2017-09-08 北京博晨技术有限公司 A kind of distributed account book system based on hierarchy
CN107528886A (en) * 2017-07-25 2017-12-29 中国科学院计算技术研究所 Block chain the whole network method for splitting and system
CN108122165A (en) * 2017-12-15 2018-06-05 北京中电普华信息技术有限公司 A kind of block chain common recognition method and system
CN109766673A (en) * 2019-01-18 2019-05-17 四川大学 A kind of alliance's formula audio-video copyright block catenary system and audio-video copyright cochain method
CN109819022A (en) * 2019-01-11 2019-05-28 华侨大学 A kind of block chain common recognition method based on credit appraisal
CN109872159A (en) * 2019-01-07 2019-06-11 必可嘉(武汉)科技有限公司 A kind of block chain common recognition method and framework
CN109993647A (en) * 2019-03-08 2019-07-09 西安电子科技大学 A kind of pay taxes credit investigation system and processing method based on block chain
CN111010278A (en) * 2019-11-14 2020-04-14 江苏大学 High fault tolerance layered consensus method based on DPoS

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10862959B2 (en) * 2016-11-28 2020-12-08 Keir Finlow-Bates Consensus system and method for adding data to a blockchain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107147735A (en) * 2017-05-12 2017-09-08 北京博晨技术有限公司 A kind of distributed account book system based on hierarchy
CN107528886A (en) * 2017-07-25 2017-12-29 中国科学院计算技术研究所 Block chain the whole network method for splitting and system
CN108122165A (en) * 2017-12-15 2018-06-05 北京中电普华信息技术有限公司 A kind of block chain common recognition method and system
CN109872159A (en) * 2019-01-07 2019-06-11 必可嘉(武汉)科技有限公司 A kind of block chain common recognition method and framework
CN109819022A (en) * 2019-01-11 2019-05-28 华侨大学 A kind of block chain common recognition method based on credit appraisal
CN109766673A (en) * 2019-01-18 2019-05-17 四川大学 A kind of alliance's formula audio-video copyright block catenary system and audio-video copyright cochain method
CN109993647A (en) * 2019-03-08 2019-07-09 西安电子科技大学 A kind of pay taxes credit investigation system and processing method based on block chain
CN111010278A (en) * 2019-11-14 2020-04-14 江苏大学 High fault tolerance layered consensus method based on DPoS

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张永 ; 李晓辉 ; .一种改进的区块链共识机制的研究与实现.电子设计工程.2018,(第01期),全文. *
王晓光 ; .区块链技术共识算法综述.信息与电脑(理论版).2017,(第09期),全文. *

Also Published As

Publication number Publication date
CN111695994A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN111695994B (en) Block chain consensus method and system based on credit score
US11710190B2 (en) Blockchain subrogation claims with arbitration
CN107220130B (en) Method, device and system for realizing information consensus at nodes of block chain
US10230711B2 (en) System and methods for enhancing authentication procedures in an anti-fraud environment
CN112685766B (en) Enterprise credit investigation management method and device based on block chain, computer equipment and storage medium
CN109325848B (en) Debt collection urging method and device based on block chain and computer readable storage medium
CN111754307B (en) Multi-factor electric quantity transaction matching method and device based on block chain
CN106845210A (en) Event authentication method and apparatus
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
CN111695997B (en) Block chain consensus method and system based on node credit scoring and pre-cross loyalty
CN113704810A (en) Federated learning oriented chain-crossing consensus method and system
CN113268543A (en) Block chain-based security content sharing management method in Internet of vehicles
CN109347877B (en) Block chain structure storage controlling method
CN105590215A (en) Device and method for data processing on-line processing of date mistakes between mechanisms
CN112599249A (en) Medical data security consensus method based on credit rating classification
CN116015672A (en) PBFT consensus mechanism based on reputation model
CN111695996B (en) Block chain consensus method and system based on pre-crossing honest gold
CN111899094B (en) Block chain consensus method and system based on node credit scoring and pre-crossing loyalty
CN111695995B (en) Electronic equipment management system based on block chain technology
CN110930158A (en) Block chain DPoS common recognition method based on reward and punishment mechanism
US20050125253A1 (en) System and method for using medication and medical condition information in automated insurance underwriting
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
KR20020043463A (en) Evaluating method of tender price, and online tender system and tender service method using the same for electronic tender

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