CN112734576A - Block chain consensus system and method - Google Patents

Block chain consensus system and method Download PDF

Info

Publication number
CN112734576A
CN112734576A CN202110071103.7A CN202110071103A CN112734576A CN 112734576 A CN112734576 A CN 112734576A CN 202110071103 A CN202110071103 A CN 202110071103A CN 112734576 A CN112734576 A CN 112734576A
Authority
CN
China
Prior art keywords
consensus
node
nodes
ciphertext
block chain
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.)
Granted
Application number
CN202110071103.7A
Other languages
Chinese (zh)
Other versions
CN112734576B (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202110071103.7A priority Critical patent/CN112734576B/en
Publication of CN112734576A publication Critical patent/CN112734576A/en
Application granted granted Critical
Publication of CN112734576B publication Critical patent/CN112734576B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/602Providing cryptographic facilities or services
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application discloses a block chain consensus system and a block chain consensus method, wherein accounting nodes are selected according to the sizes of random numbers and timestamps, and a waiting process after random waiting time is generated in a POET consensus algorithm is cancelled, so that the waiting time of the system is reduced, the efficiency of consensus achievement is improved, and the fairness of accounting participation of each node is ensured; meanwhile, the one-time secret key is used for encrypting the consensus information, so that the integrity and the safety of the consensus information are ensured; furthermore, the consensus device and the consensus engine are connected into the blockchain network in a pluggable mode through an interface, plug and play are achieved, the computational burden of nodes is not additionally increased, and the problem that the consensus algorithm is difficult to deploy and migrate in different blockchain networks is solved. Therefore, the technical problem that the transaction efficiency is reduced due to the fact that the transaction can be verified and processed only after the transaction is finished by the node with the shortest waiting time in the conventional POET common recognition mechanism is solved.

Description

Block chain consensus system and method
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a system and method for consensus of blockchains.
Background
The consensus algorithm is always the core technology of the blockchain technology, and with the continuous development of the blockchain technology, a plurality of consensus algorithms with respective characteristics are generated. The main consensus algorithm is as follows: the POET consensus, which is an efficient form of working validation based on an elapsed amount of time, eliminates the need for mining-intensive processes and replaces it with a random timer system, each node in the blockchain network is given a random wait time, the node that waits for completion earliest becomes the accounting node, which gains the right to pack and broadcast the blocks.
However, based on the common consensus mechanism (POET) of elapsed time, when all nodes in the blockchain network are waiting for a period of response white space, the transaction efficiency is reduced because the transaction must wait for the node with the shortest waiting time to finish waiting for the verification and processing of the transaction.
Disclosure of Invention
The embodiment of the application provides a block chain consensus system and a block chain consensus method, which are used for solving the technical problem that the transaction efficiency is reduced because the transaction can be verified and processed only after a node with the shortest waiting time is waited for the transaction in the conventional POET consensus mechanism.
In view of the above, a first aspect of the present application provides a block chain consensus system, which includes: a consensus engine and a consensus device; the consensus engine is communicatively linked with the consensus device; the consensus engine is connected with nodes of the block chain through interfaces, and each node comprises the consensus engine and the consensus equipment which are in one-to-one correspondence;
the consensus engine of the transaction node: the device comprises a receiving unit, a sending unit and a sending unit, wherein the receiving unit is used for receiving a consensus request sent by each node to be identified of the same block chain;
the consensus engine of each node to be consensus comprises:
the sending module is used for receiving the consensus request and sending a first instruction and the number of the consensus request to the corresponding consensus equipment;
the receiving module is used for receiving the consensus ciphertext and the public key;
the broadcast module is used for broadcasting the consensus ciphertext and the public key to other nodes;
the election module is used for receiving the consensus ciphertext and the public key of each node, decrypting the consensus ciphertext through the public key, and obtaining a random number and a timestamp corresponding to each node; based on a preset consensus strategy, selecting accounting nodes according to the random numbers and the time stamps corresponding to the nodes;
the consensus device: the public key management system is used for receiving the serial number, responding to the first instruction, generating a random number, a timestamp and a disposable key pair, encrypting the random number, the timestamp and the serial number according to a private key of the disposable key pair to obtain a consensus ciphertext, and sending the consensus ciphertext and a public key of the disposable key pair to a corresponding consensus engine.
Optionally, the accounting node is configured to: requesting to acquire transaction information, verifying the transaction information, packaging the transaction information into blocks, and broadcasting the blocks to each node of the same block chain;
the non-accounting node is used for: and receiving the block, updating the data state of the node after trading according to the trading information of the block, and accessing the block to the same block chain.
Optionally, the preset consensus policy is:
setting the node corresponding to the minimum random number as the accounting node; if the number of the nodes corresponding to the minimum random number is not less than one, setting the node corresponding to the earliest timestamp in the minimum random number as the accounting node; and if the number of the minimum random number and the earliest timestamp is not less than one, setting the node corresponding to the maximum random number as the accounting node.
Optionally, the consensus engine of each node to be consensus further includes:
and the first judgment module is used for judging whether the time for each node to receive the consensus ciphertext and the public key is in a preset stage to be consensus or not, if so, decrypting the consensus ciphertext through the public key, and otherwise, setting the node as a problem node.
Optionally, the consensus engine of each node to be consensus further includes:
and the second judging module is used for judging whether the number of the received consensus ciphertexts is less than half of the number of the nodes of the same block chain or not when the preset stage to be consensus ends, stopping calculation if the number of the received consensus ciphertexts is less than half of the number of the nodes of the same block chain, and decrypting the consensus ciphertexts through the public key if the number of the consensus ciphertexts is not less than half of the number of the nodes of the same block chain.
A second aspect of the present application provides a block chain consensus method applied to the block chain consensus system of the first aspect, where the method includes:
a consensus engine of a trading node sends a consensus request to each node to be consensus of the same block chain;
a consensus engine of each node to be identified receives the consensus request and sends a first instruction and the number of the consensus request to corresponding consensus equipment;
the consensus device receives the number, responds to the first instruction, generates a random number, a timestamp and a disposable key pair, encrypts the random number, the timestamp and the number according to a private key of the disposable key pair to obtain a consensus ciphertext, and sends the consensus ciphertext and a public key of the disposable key pair to corresponding consensus engines;
the consensus engine of each node to be consensus-identified receives the consensus ciphertext and the public key and broadcasts the consensus ciphertext and the public key to other nodes;
the consensus engine receives the consensus ciphertexts and the public keys of the nodes, decrypts the consensus ciphertexts through the public keys, and obtains random numbers and timestamps corresponding to the nodes; and based on a preset consensus strategy, selecting the accounting nodes according to the random numbers and the time stamps corresponding to the nodes.
Optionally, the accounting node is configured to: requesting to acquire transaction information, verifying the transaction information, packaging the transaction information into blocks, and broadcasting the blocks to each node of the same block chain;
the non-accounting node is used for: and receiving the block, updating the data state of the node after trading according to the trading information of the block, and accessing the block to the same block chain.
Optionally, the preset consensus policy is:
setting the node corresponding to the minimum random number as the accounting node; if the number of the nodes corresponding to the minimum random number is not less than one, setting the node corresponding to the earliest timestamp in the minimum random number as the accounting node; and if the number of the minimum random number and the earliest timestamp is not less than one, setting the node corresponding to the maximum random number as the accounting node.
Optionally, the receiving the consensus ciphertext and the public key of each node further includes:
and judging whether the time for each node to receive the consensus ciphertext and the public key is in a preset stage to be consensus or not, if so, decrypting the consensus ciphertext through the public key, and otherwise, setting the node as a problem node.
Optionally, the receiving the consensus ciphertext and the public key of each node further includes:
and when the preset stage to be identified is finished, judging whether the number of the received identified ciphertexts is less than half of the number of the nodes of the same block chain, if so, stopping calculation, and otherwise, decrypting the identified ciphertexts through the public key.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, the consensus system of the block chain is provided, the accounting node is selected through the numerical values of the random number and the timestamp, the process of waiting after the random waiting time is generated in the POET consensus algorithm is cancelled, the waiting time of the system is reduced, the efficiency of consensus is improved, and the fairness of the nodes participating in accounting is ensured; meanwhile, the one-time secret key is used for encrypting the consensus information, so that the integrity and the safety of the consensus information are ensured; furthermore, the consensus device and the consensus engine are connected into the blockchain network in a pluggable mode through an interface, plug and play are achieved, the computational burden of nodes is not additionally increased, and the problem that the consensus algorithm is difficult to deploy and migrate in different blockchain networks is solved. Therefore, the technical problem that the transaction efficiency is reduced due to the fact that the transaction can be verified and processed only after the transaction is finished by the node with the shortest waiting time in the conventional POET common recognition mechanism is solved.
Drawings
Fig. 1 is a schematic structural diagram of a block chain consensus system provided in an embodiment of the present application;
fig. 2 is a flowchart illustrating a block chain consensus method according to an embodiment of the present disclosure.
Reference numbers: 100. structure of consensus system of blockchains; 102. a consensus device; 104. a consensus engine; 112. a block chain network; 114. a node; 116. and (5) block chains.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a block chain consensus system according to an embodiment of the present application is shown.
An embodiment of a block chain consensus system provided in an embodiment of the present application includes:
a consensus engine and a consensus device; the consensus engine 104 is communicatively linked with the consensus device 102; the consensus engine 104 is interfaced with nodes 114 of the blockchain, and each node 114 includes a one-to-one correspondence of the consensus engine 104 and the consensus device 102.
It is understood that each node in the blockchain network 112 of the present embodiment includes a dedicated consensus device and a consensus engine, and is connected to the node of the blockchain network 112 in the form of pluggable components through an interface, and a plurality of nodes having the same function form the blockchain network 112, and fig. 1 depicts an example of the overall system structure 100 of the embodiment of the present application. In blockchain network 112, there are a plurality of nodes 114, each of which maintains a blockchain 116 in common by keeping a copy of blockchain 116 in the respective node.
It is noted that in the depicted example, 114a and 114b are nodes of a relational peer in a blockchain network. Each node is externally connected with a consensus device 102, the consensus device 102 communicates with a consensus engine 104 in the node, and the consensus engine 104 is configured as a component inside the node. The connection mode of the consensus device 102 and the node includes bluetooth, WIFI, etc., but is not limited to such a mode.
The consensus engine of the transaction node: the method is used for sending the consensus request to each node to be consensus of the same block chain.
It can be understood that the consensus engine of the node receiving the transaction initiates a consensus request, and requires each node to be identified in the same blockchain network to send a consensus ciphertext, so that each node to be identified automatically generates the consensus ciphertext after receiving the request.
The consensus engine of each node to be consensus comprises:
and the sending module is used for receiving the consensus request and sending the first instruction and the number of the consensus request to the corresponding consensus equipment.
And the receiving module is used for receiving the consensus ciphertext and the public key.
And the broadcasting module is used for broadcasting the consensus cryptograph and the public key to other nodes.
The election module is used for receiving the consensus cryptograph and the public key of each node, decrypting the consensus cryptograph through the public key and obtaining the random number and the timestamp corresponding to each node; and based on a preset consensus strategy, selecting the accounting nodes according to the random numbers and the time stamps corresponding to the nodes.
It should be noted that the consensus engine of each node to be consensus includes: the system comprises a sending module, a receiving module, a broadcasting module and an election module. In addition, in order to ensure security, the one-time key is destroyed immediately after being encrypted and decrypted.
It can be understood that, after a sending module of a certain node to be identified receives an identification request, a first instruction is sent to the identification devices belonging to the same node, so that the identification devices generate a random number, a timestamp and a one-time key after responding to the first instruction, and encrypt the random number, the timestamp and a number according to a private key of the one-time key pair respectively to obtain an identification ciphertext; at the moment, the consensus device sends the consensus ciphertext to the consensus engine of the same node, so that a receiving module of the consensus engine receives the consensus ciphertext and the public key; then the broadcast module of the consensus engine broadcasts the consensus ciphertext and the public key to other nodes to be consensus except the node per se, and the other nodes also broadcast the consensus ciphertext and the public key; therefore, the election module of the node also receives the consensus ciphertext and the public key broadcast by other nodes, so that the consensus ciphertext of each node is decrypted to obtain the random number and the timestamp of each node, and finally, the accounting node is elected according to the size of the random number and the timestamp.
Consensus equipment: the device is used for receiving the serial number, generating a random number and a time stamp after responding to the first instruction, generating a disposable key pair, encrypting the random number, the time stamp and the serial number according to a private key of the disposable key pair to obtain a consensus ciphertext, and sending the consensus ciphertext and a public key of the disposable key pair to a corresponding consensus engine.
In the embodiment of the application, the consensus system of the block chain is provided, accounting nodes are elected through numerical values of random numbers and timestamps, and a waiting process after random waiting time is generated in a POET consensus algorithm is cancelled, so that the waiting time of the system is reduced, the efficiency of consensus achievement is improved, and the fairness of accounting participation of each node is ensured; meanwhile, the one-time secret key is used for encrypting the consensus information, so that the integrity and the safety of the consensus information are ensured; furthermore, the consensus device and the consensus engine are connected into the blockchain network in a pluggable mode through an interface, plug and play are achieved, the computational burden of nodes is not additionally increased, and the problem that the consensus algorithm is difficult to deploy and migrate in different blockchain networks is solved. Therefore, the technical problem that the transaction efficiency is reduced due to the fact that the transaction can be verified and processed only after the transaction is finished by the node with the shortest waiting time in the conventional POET common recognition mechanism is solved.
Further, the accounting node of the embodiment of the present application is configured to: and requesting to acquire transaction information, verifying the transaction information, packaging the transaction information into blocks, and broadcasting the blocks to each node of the same block chain. The non-accounting node is used for: and receiving the block, updating the data state of the node after trading according to the trading information of the block, and accessing the block to the same block chain.
It should be noted that, if a certain node is selected as an accounting node, transaction information is requested immediately, after the accounting node receives the transaction information, the verifier verifies the validity of the transaction and verifies whether the context is complete, if the context is incomplete, the verifier requests a block chain network for a missing dependency or pre-task, after the context is complete, the transaction is packaged into a block and issued, and meanwhile, the transaction task is given to the transaction processor for execution, so as to change the data state of the node; the verifier of the non-accounting node receives the block issued by other nodes, analyzes the block, checks whether the context of the transaction content of the block is complete, if the context of the transaction content of the block is missing, requests related content from a block chain network, and finally delivers the transaction content to a transaction processor for execution according to the content of the transaction information, synchronizes the local data state, and adds the block to the block chain.
Further, the consensus strategy in the embodiment of the present application is as follows:
setting the node corresponding to the minimum random number as an accounting node; if the number of the nodes corresponding to the minimum random number is not less than one, setting the node corresponding to the earliest timestamp in the minimum random number as an accounting node; and if the number of the minimum random number and the earliest timestamp is not less than one, setting the node corresponding to the maximum random number as an accounting node.
It should be noted that, in this embodiment, the consensus policy is set as: firstly, comparing the sizes of random numbers, and selecting the node generating the minimum random number as an accounting node; if the random numbers are the same, comparing the timestamps, and appointing the node with the earliest timestamp as an accounting node; and if the random number and the timestamp are the same, selecting the node with the maximum random number as the accounting node. The setting can be carried out by a person skilled in the art according to the actual situation and is not limited herein.
Further, the consensus engine of each node to be consensus in the embodiment of the present application further includes:
and the first judgment module is used for judging whether the time for each node to receive the consensus ciphertext and the public key is in a preset stage to be agreed, if so, the consensus ciphertext is decrypted through the public key, and otherwise, the node is set as a problem node.
It can be understood that each node consensus engine receives consensus ciphertexts from other nodes in the blockchain network within the effective time of the network to-be-consensus phase (in this embodiment, the to-be-consensus phase is set to 10 seconds); if the node does not receive the consensus ciphertext from the node within the specified consensus time, the node is regarded as a problem node and does not participate in the current consensus; and the node successfully delivering the consensus ciphertext and the public key participates in the election of the accounting node.
Further, the consensus engine of each node to be consensus in the embodiment of the present application further includes:
and the second judging module is used for judging whether the number of the received consensus ciphertexts is less than half of the number of the nodes of the same block chain or not when the preset stage to be identified is ended, stopping calculation if the number of the received consensus ciphertexts is less than half of the number of the nodes of the same block chain, and decrypting the consensus ciphertexts through the public key if the number of the received consensus ciphertexts is not less than half of the number of the nodes of the same block.
It is understood that when the consensus process is over and the number of consensus ciphertexts received by a node is less than one-half of the number of nodes in the blockchain network, the node is presumed to be in a poor communication state, and actively gives up election and waits for receiving the next consensus request. In this embodiment, the judgment condition is set to be half of the number of nodes of the block chain, and a person skilled in the art can set the judgment condition as needed, which is not limited herein.
The above is an embodiment of a block chain consensus system provided in the embodiments of the present application, and the following is an embodiment of a block chain consensus method provided in the embodiments of the present application.
Referring to fig. 2, fig. 2 is a flowchart illustrating a block chain consensus method according to an embodiment of the present disclosure.
An embodiment of a block chain consensus method provided in an embodiment of the present application includes:
step 201, the consensus engine of the transaction node sends a consensus request to each node to be identified of the same block chain.
Step 202, the consensus engine of each node to be identified receives the consensus request and sends the first instruction and the number of the consensus request to the corresponding consensus device.
And 203, the consensus device receives the number, generates a random number and a time stamp after responding to the first instruction, and a disposable key pair, encrypts the random number, the time stamp and the number according to a private key of the disposable key pair to obtain a consensus ciphertext, and sends the consensus ciphertext and a public key of the disposable key pair to a corresponding consensus engine.
And step 204, the consensus engine of each node to be identified receives the consensus ciphertext and the public key and broadcasts the consensus ciphertext and the public key to other nodes.
Step 205, the consensus engine receives the consensus ciphertext and the public key of each node.
And step 206, judging whether the time for each node to receive the consensus ciphertext and the public key is in a preset stage to be consensus, if so, decrypting the consensus ciphertext through the public key, otherwise, setting the node as a problem node.
And step 207, when the preset stage to be identified is finished, judging whether the number of the received identified ciphertexts is less than half of the number of the nodes of the same block chain, if so, stopping calculating, and otherwise, decrypting the identified ciphertexts through the public key.
The consensus strategy in the embodiment of the present application is as follows: setting the node corresponding to the minimum random number as an accounting node; if the number of the nodes corresponding to the minimum random number is not less than one, setting the node corresponding to the earliest timestamp in the minimum random number as an accounting node; and if the number of the minimum random number and the earliest timestamp is not less than one, setting the node corresponding to the maximum random number as an accounting node.
Step 208, decrypting the consensus ciphertext through the public key to obtain a random number and a timestamp corresponding to each node; and based on a preset consensus strategy, selecting the accounting nodes according to the random numbers and the time stamps corresponding to the nodes.
Wherein the accounting node is configured to: requesting to acquire transaction information, verifying the transaction information, packaging the transaction information into blocks, and broadcasting the blocks to each node of the same block chain; the non-accounting node is used for: and receiving the block, updating the data state of the node after trading according to the trading information of the block, and accessing the block to the same block chain.
In the block chain consensus method in the embodiment of the application, the accounting nodes are selected according to the values of the random number and the timestamp, and the process of waiting after the random waiting time is generated in the POET consensus algorithm is cancelled, so that the waiting time of the system is reduced, the efficiency of consensus is improved, and the fairness of the nodes participating in accounting is ensured; meanwhile, the one-time secret key is used for encrypting the consensus information, so that the integrity and the safety of the consensus information are ensured; furthermore, the consensus device and the consensus engine are connected into the blockchain network in a pluggable mode through an interface, plug and play are achieved, the computational burden of nodes is not additionally increased, and the problem that the consensus algorithm is difficult to deploy and migrate in different blockchain networks is solved. Therefore, the technical problem that the transaction efficiency is reduced due to the fact that the transaction can be verified and processed only after the transaction is finished by the node with the shortest waiting time in the conventional POET common recognition mechanism is solved.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the method described above may refer to the corresponding process in the foregoing system embodiment, and is not described herein again.
The terms "first," "second," "third," "fourth," and the like in the description of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A block chain consensus system, comprising: a consensus engine and a consensus device; the consensus engine is communicatively linked with the consensus device; the consensus engine is connected with nodes of the block chain through interfaces, and each node comprises the consensus engine and the consensus equipment which are in one-to-one correspondence;
the consensus engine of the transaction node: the device comprises a receiving unit, a sending unit and a sending unit, wherein the receiving unit is used for receiving a consensus request sent by each node to be identified of the same block chain;
the consensus engine of each node to be consensus comprises:
the sending module is used for receiving the consensus request and sending a first instruction and the number of the consensus request to the corresponding consensus equipment;
the receiving module is used for receiving the consensus ciphertext and the public key;
the broadcast module is used for broadcasting the consensus ciphertext and the public key to other nodes;
the election module is used for receiving the consensus ciphertext and the public key of each node, decrypting the consensus ciphertext through the public key, and obtaining a random number and a timestamp corresponding to each node; based on a preset consensus strategy, selecting accounting nodes according to the random numbers and the time stamps corresponding to the nodes;
the consensus device: the public key management system is used for receiving the serial number, responding to the first instruction, generating a random number, a timestamp and a disposable key pair, encrypting the random number, the timestamp and the serial number according to a private key of the disposable key pair to obtain a consensus ciphertext, and sending the consensus ciphertext and a public key of the disposable key pair to a corresponding consensus engine.
2. The blockchain consensus system of claim 1, wherein the accounting node is configured to: requesting to acquire transaction information, verifying the transaction information, packaging the transaction information into blocks, and broadcasting the blocks to each node of the same block chain;
the non-accounting node is used for: and receiving the block, updating the data state of the node after trading according to the trading information of the block, and accessing the block to the same block chain.
3. The blockchain consensus system of claim 1, wherein the preset consensus strategy is:
setting the node corresponding to the minimum random number as the accounting node; if the number of the nodes corresponding to the minimum random number is not less than one, setting the node corresponding to the earliest timestamp in the minimum random number as the accounting node; and if the number of the minimum random number and the earliest timestamp is not less than one, setting the node corresponding to the maximum random number as the accounting node.
4. The system according to claim 1, wherein the consensus engine of each of the nodes to be consensus further comprises:
and the first judgment module is used for judging whether the time for each node to receive the consensus ciphertext and the public key is in a preset stage to be consensus or not, if so, decrypting the consensus ciphertext through the public key, and otherwise, setting the node as a problem node.
5. The blockchain consensus system of claim 4, wherein the consensus engine of each of said nodes to be consensus further comprises:
and the second judging module is used for judging whether the number of the received consensus ciphertexts is less than half of the number of the nodes of the same block chain or not when the preset stage to be consensus ends, stopping calculation if the number of the received consensus ciphertexts is less than half of the number of the nodes of the same block chain, and decrypting the consensus ciphertexts through the public key if the number of the consensus ciphertexts is not less than half of the number of the nodes of the same block chain.
6. A block chain consensus method applied to the block chain consensus system of any one of claims 1-5, comprising:
a consensus engine of a trading node sends a consensus request to each node to be consensus of the same block chain;
a consensus engine of each node to be identified receives the consensus request and sends a first instruction and the number of the consensus request to corresponding consensus equipment;
the consensus device receives the number, responds to the first instruction, generates a random number, a timestamp and a disposable key pair, encrypts the random number, the timestamp and the number according to a private key of the disposable key pair to obtain a consensus ciphertext, and sends the consensus ciphertext and a public key of the disposable key pair to corresponding consensus engines;
the consensus engine of each node to be consensus-identified receives the consensus ciphertext and the public key and broadcasts the consensus ciphertext and the public key to other nodes;
the consensus engine receives the consensus ciphertexts and the public keys of the nodes, decrypts the consensus ciphertexts through the public keys, and obtains random numbers and timestamps corresponding to the nodes; and based on a preset consensus strategy, selecting the accounting nodes according to the random numbers and the time stamps corresponding to the nodes.
7. The blockchain consensus method of claim 6, wherein the accounting node is configured to: requesting to acquire transaction information, verifying the transaction information, packaging the transaction information into blocks, and broadcasting the blocks to each node of the same block chain;
the non-accounting node is used for: and receiving the block, updating the data state of the node after trading according to the trading information of the block, and accessing the block to the same block chain.
8. The method of claim 6, wherein the pre-set consensus strategy is:
setting the node corresponding to the minimum random number as the accounting node; if the number of the nodes corresponding to the minimum random number is not less than one, setting the node corresponding to the earliest timestamp in the minimum random number as the accounting node; and if the number of the minimum random number and the earliest timestamp is not less than one, setting the node corresponding to the maximum random number as the accounting node.
9. The method of claim 6, wherein the receiving the consensus ciphertext and the public key for each node further comprises:
and judging whether the time for each node to receive the consensus ciphertext and the public key is in a preset stage to be consensus or not, if so, decrypting the consensus ciphertext through the public key, and otherwise, setting the node as a problem node.
10. The method of claim 9, wherein the receiving the consensus ciphertext and the public key for each node further comprises:
and when the preset stage to be identified is finished, judging whether the number of the received identified ciphertexts is less than half of the number of the nodes of the same block chain, if so, stopping calculation, and otherwise, decrypting the identified ciphertexts through the public key.
CN202110071103.7A 2021-01-19 2021-01-19 Block chain consensus system and method Expired - Fee Related CN112734576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110071103.7A CN112734576B (en) 2021-01-19 2021-01-19 Block chain consensus system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110071103.7A CN112734576B (en) 2021-01-19 2021-01-19 Block chain consensus system and method

Publications (2)

Publication Number Publication Date
CN112734576A true CN112734576A (en) 2021-04-30
CN112734576B CN112734576B (en) 2022-09-20

Family

ID=75593373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110071103.7A Expired - Fee Related CN112734576B (en) 2021-01-19 2021-01-19 Block chain consensus system and method

Country Status (1)

Country Link
CN (1) CN112734576B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254169A (en) * 2021-06-11 2021-08-13 北京百度网讯科技有限公司 Operation method, device, equipment and storage medium of block chain system
CN114331430A (en) * 2021-12-24 2022-04-12 杭州钛度科技有限公司 Block chain consensus method, apparatus, device and medium
CN117692128A (en) * 2024-02-02 2024-03-12 波维希数字科技有限公司 Three-level dense chain architecture

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147229A (en) * 2019-12-30 2020-05-12 山东爱城市网信息技术有限公司 Consensus method and device with block hash to be generated as seed and medium
CN111404900A (en) * 2020-03-06 2020-07-10 陕西省地质调查规划研究中心(陕西省地质勘查基金中心) Geological work result data sharing method and system based on block chain technology
CN111767569A (en) * 2020-06-23 2020-10-13 中国工商银行股份有限公司 Access authorization method and node of block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147229A (en) * 2019-12-30 2020-05-12 山东爱城市网信息技术有限公司 Consensus method and device with block hash to be generated as seed and medium
CN111404900A (en) * 2020-03-06 2020-07-10 陕西省地质调查规划研究中心(陕西省地质勘查基金中心) Geological work result data sharing method and system based on block chain technology
CN111767569A (en) * 2020-06-23 2020-10-13 中国工商银行股份有限公司 Access authorization method and node of block chain

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254169A (en) * 2021-06-11 2021-08-13 北京百度网讯科技有限公司 Operation method, device, equipment and storage medium of block chain system
CN113254169B (en) * 2021-06-11 2021-11-09 北京百度网讯科技有限公司 Operation method, device, equipment and storage medium of block chain system
CN114331430A (en) * 2021-12-24 2022-04-12 杭州钛度科技有限公司 Block chain consensus method, apparatus, device and medium
CN117692128A (en) * 2024-02-02 2024-03-12 波维希数字科技有限公司 Three-level dense chain architecture
CN117692128B (en) * 2024-02-02 2024-04-16 波维希数字科技有限公司 Three-stage chain sealing system

Also Published As

Publication number Publication date
CN112734576B (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN112734576B (en) Block chain consensus system and method
CN111143885B (en) Block chain transaction processing method and device and block chain link points
CN1829144B (en) Cryptographic communication system and method
WO2018024061A1 (en) Method, device and system for licensing shared digital content
CN101981889B (en) Secure communications in computer cluster systems
CN107528688A (en) A kind of keeping of block chain key and restoration methods, device based on encryption commission technology
CN109600350A (en) System and method for the secure communication between the controller in vehicle network
CN108173644A (en) Data transmission encryption method and device, storage medium, equipment and server
US20080059809A1 (en) Sharing a Secret by Using Random Function
JP2005236850A (en) Data communication apparatus and method, and program
CN106941404B (en) Key protection method and device
CN110674180A (en) Business data processing method and device and readable storage medium
CN109936552B (en) Key authentication method, server and system
CN110601830B (en) Key management method, device, equipment and storage medium based on block chain
US20210352067A1 (en) Method and system for managing cloud service cluster
CN114465803B (en) Object authorization method, device, system and storage medium
CN110224984A (en) A kind of multi-party authorization method and device based on block chain technology
CN110602133B (en) Intelligent contract processing method, block chain management device and storage medium
CN116204923A (en) Data management and data query methods and devices
Chenli et al. Fairtrade: Efficient atomic exchange-based fair exchange protocol for digital data trading
CN114978542B (en) Full life cycle-oriented internet of things equipment identity authentication method, system and storage medium
CN111614462A (en) Key calculation method and system based on block chain
CN113691376B (en) Key management method and device
CN116582286A (en) Block chain-based data uploading method, obtaining method and device
CN112003690A (en) Password service system, method and device

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220920

CF01 Termination of patent right due to non-payment of annual fee