CN109543075B - Block generation method and system - Google Patents

Block generation method and system Download PDF

Info

Publication number
CN109543075B
CN109543075B CN201811351343.7A CN201811351343A CN109543075B CN 109543075 B CN109543075 B CN 109543075B CN 201811351343 A CN201811351343 A CN 201811351343A CN 109543075 B CN109543075 B CN 109543075B
Authority
CN
China
Prior art keywords
voting
node
private key
key signature
effective
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.)
Expired - Fee Related
Application number
CN201811351343.7A
Other languages
Chinese (zh)
Other versions
CN109543075A (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.)
Iallchain Co Ltd
Original Assignee
Iallchain 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 Iallchain Co Ltd filed Critical Iallchain Co Ltd
Priority to CN201811351343.7A priority Critical patent/CN109543075B/en
Publication of CN109543075A publication Critical patent/CN109543075A/en
Application granted granted Critical
Publication of CN109543075B publication Critical patent/CN109543075B/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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The invention provides a block generation method and a block generation system, wherein the method comprises the following steps: each accounting node broadcasts an alternative block of the private key signature; each voting node acquires an alternative block, and broadcasts the alternative block and voting reward information which are signed by a private key of the voting node and a private key of a bookkeeping node to a block chain network; screening a valid voting node private key signature set from the voting node private key signature sets by each accounting node according to the voting reward information, and further determining a target accounting node; the target accounting node sends the alternative block to the timestamp server; and receiving the optional blocks which are broadcasted by the timestamp server and marked with the authentication timestamp and the timestamp private key signature, if the verification failure message is not received, broadcasting the effective blocks to the block chain network, logging in the block chain, and simultaneously, sending corresponding reward information to the corresponding effective voting nodes. Therefore, the block generation method is optimized, the enthusiasm of the participator of the block generation method is ensured, and the practicability is high.

Description

Block generation method and system
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a block generation method and system.
Background
The core of the block chain is a consensus mechanism, for example, a plurality of related nodes determine that a transaction is an effective transaction, and the consensus mechanism determines the implementation form of the block chain, determines the trust mode and rule, and thus determines different application scenarios of the block chain.
In the related art, the consensus mechanisms include Pow, Pos, DPos and some hybrid consensus mechanisms, algorithms of these consensus mechanisms are complex and time-consuming, and with popularization of a block chain, the number of services carried by the block chain is large, and the number of accounting nodes participating in block generation is often small compared to the number of generated block chains required by the block chain, so that the efficiency of block generation based on the consensus mechanisms is low, and therefore, a block generation method with high efficiency is urgently needed.
Disclosure of Invention
The invention provides a block generation method and a block generation system, which are used for solving the technical problem of low block generation efficiency caused by block generation based on a consensus mechanism with a complex algorithm in the prior art, and ensuring the participation enthusiasm of participants of a new block generation mode and the practicability of the new block generation mode on the premise of solving the technical problem of low block generation efficiency.
A first embodiment of the present invention provides a block generation method, including: each accounting node generates an alternative block comprising the transaction information of the current period and broadcasts the alternative block signed by a private key of the accounting node to a block chain network; each voting node acquires the alternative block, verifies the transaction information according to the transaction information stored in the local node, generates voting reward information corresponding to the alternative block if the verification is passed, and broadcasts the alternative block and the voting reward information which are signed by a voting node private key and a bookkeeping node private key to a block chain network; screening a voting node private key signature set corresponding to a self-bookkeeping node private key signature by each bookkeeping node, wherein the voting node private key signature set comprises voting reward information corresponding to different voting nodes, screening an effective voting node private key signature set from the voting node private key signature set according to the voting reward information, wherein the effective voting node private key signature set comprises effective voting node private key signatures and corresponding effective voting reward information, judging whether the effective voting node private key signature set is matched with a preset selection condition or not, and further determining a target bookkeeping node corresponding to a target effective voting node private key signature set which is successfully matched at first; the target accounting node sends the alternative block signed by a target accounting node private key signature and the target valid voting node private key signature set to a timestamp server, the timestamp server marks an authentication timestamp and broadcasts the alternative block to the block chain network after signing by a timestamp private key, so that a non-target accounting node of the block chain network verifies the alternative block, the authentication timestamp and the timestamp private key signature according to a valid voting node private key signature set corresponding to the non-target accounting node and the selection condition, and if the verification fails, a verification failure message is broadcast to the block chain network; and the target accounting node receives the alternative block which is broadcasted by the timestamp server and marked with the authentication timestamp and the timestamp private key signature, starts a timer, determines the alternative block generated by the target accounting node as an effective block if the verification failure message broadcasted by the non-target accounting node is not received within a preset time, broadcasts the effective block to the block chain network, logs in a block chain, and simultaneously sends corresponding reward information to the corresponding effective voting node according to the effective voting reward information.
A second embodiment of the present invention provides a block generation system, which includes a plurality of accounting nodes and a plurality of voting nodes, wherein each accounting node in the plurality of accounting nodes is configured to generate an alternative block including transaction information of a current period, and broadcast the alternative block signed by a private key of the accounting node to a blockchain network; each voting node in the plurality of voting nodes is used for acquiring the alternative block, verifying the transaction information according to the transaction information stored in a local node, if the transaction information passes the verification, generating voting reward information corresponding to the alternative block, and broadcasting the alternative block and the voting reward information which are subjected to the voting node private key signature and the accounting node private key signature to a block chain network; each accounting node is further configured to screen a voting node private key signature set corresponding to a self accounting node private key signature, where the voting node private key signature set includes voting reward information corresponding to different voting nodes, and screen an effective voting node private key signature set from the voting node private key signature set according to the voting reward information, where the effective voting node private key signature set includes effective voting node private key signatures and corresponding effective voting reward information, and determine whether the effective voting node private key signature set matches a preset selection condition, thereby determining a target accounting node corresponding to a target effective voting node private key signature set that matches successfully at first; the target accounting node is used for sending the alternative block signed by a target accounting node private key signature and the target valid voting node private key signature set to a timestamp server, the timestamp server marks an authentication timestamp and broadcasts the alternative block to the block chain network after signing by the timestamp private key, so that a non-target accounting node of the block chain network verifies the alternative block, the authentication timestamp and the timestamp private key signature according to a valid voting node private key signature set corresponding to the non-target accounting node and the selection condition, and if the verification fails, a verification failure message is broadcast to the block chain network; the target accounting node is further configured to receive the candidate block marked with the authentication timestamp and the timestamp private key signature and broadcast by the timestamp server, start a timer, determine that the candidate block generated by the target accounting node is an effective block if the verification failure message broadcast by the non-target accounting node is not received within a preset time, broadcast the effective block logging block chain to the block chain network, and simultaneously send corresponding reward information to a corresponding effective voting node according to the effective voting reward information.
A third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the block generation method described in the above embodiments is implemented.
A fourth embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the block generation method as described in the above embodiments.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the consensus can be achieved only through multiple broadcasting, the block linked into the block chain is determined based on two mechanisms of time and voting, the block generation mode is optimized without depending on a complex consensus mechanism algorithm, the block generation efficiency is improved, the method has a more prominent effect of efficiency improvement particularly in a generation scene of a union chain, the application scene is wider, the enthusiasm of participants of the block generation mode is ensured based on a reward mechanism, and the practicability is higher.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which,
FIG. 1 is a block diagram of a block generation system according to an embodiment of the invention;
FIG. 2 is a block generation system interaction diagram according to one embodiment of the invention; and
fig. 3 is a flowchart of a block generation method according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In order to solve the technical problem of low block generation efficiency caused by complex algorithm of the consensus mechanism in the background art, the invention provides a novel consensus mechanism to improve the block generation efficiency.
For clarity of description, first, a description is given to a block generation system according to an embodiment of the present invention, and fig. 1 is a schematic structural diagram of a block generation system according to an embodiment of the present invention, and as shown in fig. 1, the system includes a plurality of accounting nodes 100 and a plurality of voting nodes 200, where the accounting nodes 100 may be understood as nodes participating in block generation, and in a generation scenario of a federation block chain, generally, each organization party may specify which nodes are to be the accounting nodes of the block chain of the present federation, and the voting nodes 200 may be understood as nodes having a right to vote whether a block is valid, and generally, a voting node is a shareholder of the organization party connected according to the federation block chain. Alternatively, the voting node 200 page may be understood to be a node corresponding to an authority having a certain authority that determines whether a block is valid.
Referring to fig. 2, in an actual execution process, referring to fig. 2, in the actual execution process, each accounting node generates an alternative block including transaction information of a current period, and broadcasts the alternative block signed by a private key of the accounting node to a block chain network (step 1), after the accounting node generates the transaction information, the validity of the block is authenticated by each voting node first, in order to ensure participation enthusiasm of a voter for authentication, in an embodiment of the present invention, the voting node for voting is based on a reward to improve the voting enthusiasm of the voting node, and the operation of the block generation method of the embodiment of the present invention is maintained, that is, each voting node acquires the alternative block, verifies the transaction information according to the transaction information stored in a local node, and if the verification is passed, generates voting information corresponding to the alternative block, and broadcasts the alternative block signed by a private key of the voting node and a private key of the accounting node and voting reward information to the block chain network (step Step 2).
After the accounting node accounts successfully, the system distributes rewards, and the reward money of the voting nodes is extracted from the accounting nodes, so in order to ensure the accounting income, the accounting nodes can consider the voting reward money of the voting nodes participating in the voting to ensure the maximization of the benefits of the accounting nodes, namely, each accounting node screens a voting node private key signature set corresponding to the self accounting node private key signature, wherein the voting node private key signature set comprises voting reward information corresponding to different voting nodes, and an effective voting node private key signature set is screened from the voting node private key signature set according to the voting reward information, wherein the effective voting node private key signature set comprises effective voting node private key signatures and corresponding effective voting reward information, and as a plurality of effective voting nodes are provided, after the effective voting nodes vote, and secondly, the voting conditions of a plurality of effective voting nodes in the evaluation block are comprehensively evaluated, that is, whether the private key signature sets of the effective voting nodes are matched with a preset selection condition is judged, and then target accounting nodes corresponding to the target effective voting node private key signature sets which are successfully matched are determined (step 3), namely, target accounting nodes corresponding to the blocks generally approved by the effective voting nodes are preliminarily screened out.
In an embodiment of the present invention, the general acceptance of the voting nodes, that is, each accounting node, may be determined based on the number of approved valid voting nodes, the number of valid signatures in the private key signature set of the valid voting nodes is obtained, the number of valid signatures is compared with a preset first threshold, and a node corresponding to a target voting node private key signature set whose number of valid signatures is equal to the first threshold is first determined as a target accounting node.
In another embodiment of the present invention, as described above, each valid voting node is a shareholder in the related organization, and thus, the voting weight of each valid voting node may also be determined based on the number of shareholds held, and the general acceptance of the valid voting node is determined based on the total weight of the approved valid voting nodes, that is, each accounting node obtains the number of valid signatures in the valid voting node private key signature set and the weight values of different valid voting nodes, calculates the voting value according to the number of valid signatures and the weight values of different valid voting nodes, compares the voting value with a preset second threshold, and first determines the node corresponding to the target valid voting node private key signature set whose voting value is equal to the second threshold as the target accounting node.
And further, according to the time that the block is universally accepted by the voting nodes, a reliable block is further screened out, the target accounting node sends the alternative block which is signed by the target accounting node private key signature and the target valid voting node private key signature set to the timestamp server, the timestamp server marks an authentication timestamp and broadcasts the alternative block to the block chain network after being signed by the timestamp private key, so that the non-target accounting node of the block chain network verifies the alternative block, the authentication timestamp and the timestamp private key signature according to the valid voting node private key signature set corresponding to the non-target accounting node and the selection condition, and if the verification fails, a verification failure message is broadcast to the block chain network (step 4).
And finally, the target accounting node receives the alternative blocks marked with the authentication timestamp and the timestamp private key signature and broadcast by the timestamp server, starts a timer, determines the alternative blocks generated by the target accounting node as valid blocks if verification failure messages broadcast by non-target accounting nodes are not received within preset time, broadcasts the valid blocks to a block chain network, logs in a block chain, and simultaneously sends corresponding reward information to corresponding valid voting nodes according to the valid voting reward information (step 5).
Therefore, the block generation method provided by the embodiment of the invention does not rely on generation and comparison of random numbers in the traditional consensus mechanism, takes the time and voting mechanism as the block generation mechanism, improves the block generation efficiency in advance while ensuring the block generation reliability, ensures the enthusiasm of participants of the block generation mode based on the reward mechanism, and has high practicability.
Fig. 3 is a flowchart of a block generation method according to an embodiment of the present invention, as shown in fig. 3, the method includes:
step 101, each accounting node generates an alternative block comprising the current period transaction information and broadcasts the alternative block signed by the private key of the accounting node to the block chain network.
The transaction information comprises information for identifying transaction uniqueness, such as node identifiers of both transaction parties, transaction amount, transaction commodity names, transaction time and the like.
Specifically, in the current period, each accounting node generates an alternative block containing the transaction information of the current period, and in order to avoid the impersonation of other malicious nodes, the alternative block signed by the private key of the accounting node is broadcasted to the block chain, wherein the private key of the accounting node is only held by the accounting node.
And 102, each voting node acquires an alternative block, verifies the transaction information according to the transaction information stored in the local node, generates voting reward information corresponding to the alternative block if the verification is passed, and broadcasts the alternative block and the voting reward information which are subjected to the voting node private key signature and the accounting node private key signature to the block chain network.
It is understood that only one accounting node can preempt accounting right for one transaction, and therefore only one block in the candidate blocks can be used as a block linked into the block chain.
In order to improve the voting enthusiasm of the voting node, the voting node may request a voting reward of the current voting, so as to feed back the corresponding voting reward when the block of the voting is successfully linked into the block chain.
Specifically, after acquiring the candidate blocks, each voting node verifies the transaction information according to locally stored transaction information, and if the transaction information is consistent with the locally stored transaction information, the current transaction information is true and reliable, so that the verification is passed, at this time, after the voting is completed, voting reward information corresponding to the candidate blocks is generated, the reward information comprises voting reward amount, valid account information of the candidate blocks and the like, the candidate blocks and the reward information which are signed by the voting node private key and the accounting node private key are broadcast to the block chain network, and the verification at this time can be understood as successful voting.
103, screening a voting node private key signature set corresponding to the self-bookkeeping node private key signature by each bookkeeping node, wherein the voting node private key signature set comprises voting reward information corresponding to different voting nodes, screening an effective voting node private key signature set from the voting node private key signature set according to the voting reward information, wherein the effective voting node private key signature set comprises effective voting node private key signatures and corresponding effective voting reward information, judging whether the effective voting node private key signature set is matched with a preset selection condition or not, and further determining a target bookkeeping node corresponding to a target effective voting private key signature set which is successfully matched at first.
It should be understood that, since a plurality of voting nodes participate in the voting of the candidate blocks, each accounting node has the voting of a plurality of voting nodes, and a target accounting node corresponding to the candidate block generally accepted by the voting node should be screened out according to the voting result. Of course, since each voting node requires a voting reward, as described above, in order to ensure that the benefit of the node is maximized, the accounting node may determine, according to the reward information of the voting node, that the backup block signed by the valid voting node with the smaller total voting reward amount participates in the preemption of the accounting right.
Specifically, each accounting node screens a voting node private key signature set corresponding to a self accounting node private key signature, the voting node private key signature set corresponds to voting nodes voting for candidate blocks generated by the accounting node private key signature set, the voting node private key signature set includes voting reward information corresponding to different voting nodes, and a valid voting node private key signature set is screened from the voting node private key signature set according to the voting reward information, wherein the valid voting node private key signature set includes valid voting node private key signatures and corresponding valid voting reward information, and certainly the number of the private key signature sets at this time is greater than or equal to the number of votes required by the accounting right, in some possible examples, the corresponding voting reward in the acquired private key signatures is higher, but since the voting reward set in this embodiment is much smaller than the accounting reward, therefore, in order to improve the success rate of accounting right robbery, some accounting nodes can directly carry out the next step without waiting for the authentication of other voting nodes on the backup block even if the voting rewards corresponding to the voting reward information corresponding to different voting nodes are not satisfied in the currently acquired private key signature set.
And then, judging whether the valid voting node private key signature set is matched with a preset selection condition, wherein the preset selection condition corresponds to the fact that whether the voting node is generally accepted is determined, and further determining a target accounting node corresponding to the target valid voting node private key signature set which is successfully matched at first, namely after participating in the first round of voting mechanism, determining a block which can be linked into a block chain based on a time mechanism in the second round, namely that the candidate block which is successfully voted at first is reliable, and the probability of sending the candidate block after being intercepted by an illegal node is low.
It should be noted that, according to different application scenarios, the preset selection conditions are different, and examples are as follows:
in an embodiment of the present invention, the general acceptance of the voting nodes may be determined based on the number of approved voting nodes, that is, each accounting node obtains the number of signatures in the private key signature set of valid voting nodes, compares the number of signatures with a preset first threshold, and first determines that a node corresponding to a target valid voting node private key signature set whose number of signatures is equal to the first threshold is a target accounting node, where the first threshold may be determined according to the number of voting nodes, and the higher the number of voting nodes is, the higher the number of the first threshold is, in some possible examples, the number of the first threshold is greater than half of the number of voting nodes.
In another embodiment of the present invention, as described above, each voting node is a shareholder in the organization, and thus, the voting weight of each voting node may also be determined based on the number of shareholds, the general acceptance of the voting node is determined based on the total weight of the approved voting nodes, that is, each accounting node obtains the number of signatures in the private key signature set of the valid voting node and the weight values of different valid voting nodes, and calculates the voting value according to the number of valid signatures and the weight values of different valid voting nodes, for example, the sum of the products of the weight values corresponding to each signature is used as the voting value, or for example, the product of the sum of the weight values and the number of signatures is used as the voting value, as the voting value is compared with the preset second threshold, the node corresponding to the private key signature set of the target voting node with the voting value equal to the second threshold is first determined as the target accounting node, the second threshold is usually set according to the total weight value of all voting nodes, and the higher the total weight value of all voting nodes is, the higher the second threshold is.
In this embodiment, the weight values corresponding to different effective voting nodes may be determined based on different feature information, that is, feature information of the different effective voting nodes in the block chain network is obtained, where the feature information may be a number of shareholds or a node attribute (such as a personal node or a mechanism node), and then the weight values corresponding to the different effective voting nodes are determined according to the feature information, for example, a corresponding relationship between the feature information and the weight values is pre-established, and then, after the corresponding effective voting nodes are obtained, the corresponding relationship is queried, and then the corresponding weight values can be obtained.
And 104, the target accounting node sends the alternative block signed by the target accounting node private key signature and the target valid voting node private key signature set to the timestamp server, the timestamp server marks the authentication timestamp and broadcasts the alternative block to the block chain network after signing by the timestamp private key, so that the non-target accounting node of the block chain network verifies the alternative block, the authentication timestamp and the timestamp private key signature according to the valid voting node private key signature set corresponding to the non-target accounting node and the selection condition, and if the verification fails, a verification failure message is broadcast to the block chain network.
Specifically, when the second round determines the blocks in the linked block chain based on the time mechanism, a timestamp server with higher authority is introduced, and the winning time of the blocks in the linked block chain is authenticated based on the timestamp server.
Specifically, the target accounting node sends the alternative block signed by the target accounting node private key signature and the target valid voting node private key signature set to the timestamp server, the timestamp server marks an authentication timestamp and broadcasts the alternative block to the block chain network after signing by the timestamp private key, and the timestamp private key signature is only held by the timestamp server so as to prevent other illegal devices from being disguised as the timestamp server.
And then other non-target accounting nodes verify whether other candidate blocks are actually won before the winning time, the non-target accounting nodes of the block chain network verify the candidate blocks, the authentication timestamp and the timestamp private key signature according to the voting node private key signature set corresponding to the non-target accounting nodes and the selection condition, verify whether the self candidate blocks or other candidate blocks are actually won before the time, if not, the verification is considered to be passed, if yes, the verification is not passed, and a verification failure message is broadcast to the block chain network, so that the reliability of the blocks linked into the block chain is ensured based on the common identification supervision of a plurality of other non-target accounting nodes.
And 105, the target accounting node receives the alternative blocks marked with the authentication timestamp and the timestamp private key signature and broadcast by the timestamp server, starts a timer, determines the alternative blocks generated by the target accounting node as valid blocks if verification failure messages broadcast by non-target accounting nodes are not received within preset time, records the block chains into the block chains by broadcasting the valid blocks to the block chain network, and simultaneously sends corresponding reward information to the corresponding valid voting nodes according to the valid voting reward information.
Specifically, after two rounds of verification, the target accounting node determines whether the generated block successfully seizes the accounting right based on the verification result, the target accounting node receives the optional block which is broadcasted by the timestamp server and marked with the authentication timestamp and the timestamp private key signature, starts a timer, if the verification failure message broadcasted by the non-target accounting node is not received within the preset time, the two rounds of authentication are successful, the optional block generated by the target accounting node is determined to be an effective block, and the block chain is recorded into the block chain which is broadcasted by the block chain network. The preset time is determined according to the number of the non-target accounting nodes and the calculation speed, usually, in the non-target accounting nodes, the verification of the non-target accounting nodes is completed, and other illegal nodes have no time to generate a disguised verification message.
Meanwhile, the effective voting nodes participating in the effective block voting send corresponding reward information based on the effective voting reward information, in some possible examples, a list of the effective voting nodes corresponding to the effective blocks is stored, and after the effective blocks are confirmed, the corresponding reward information is automatically remitted to the effective voting nodes directly based on the list, for example, the corresponding money amount is remitted to the account of the effective voting nodes.
In an embodiment of the present invention, if the verification failure message broadcast by the non-target accounting node is received within the preset time, it is determined that the candidate block generated by the target accounting node is an invalid block.
In summary, the block generating method according to the embodiment of the present invention,
the consensus can be achieved only through multiple broadcasting, the block linked into the block chain is determined based on two mechanisms of time and voting, the block generation mode is optimized without depending on a complex consensus mechanism algorithm, the block generation efficiency is improved, the method has a more prominent effect of efficiency improvement particularly in a generation scene of a union chain, the application scene is wider, the enthusiasm of participants of the block generation mode is ensured based on a reward mechanism, and the practicability is higher.
In order to implement the foregoing embodiments, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the computer device implements the block generation method as described in the foregoing embodiments.
In order to implement the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is capable of implementing the block generation method as described in the foregoing embodiments.
In the present invention, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A block generation method, comprising:
each accounting node generates an alternative block comprising the transaction information of the current period and broadcasts the alternative block signed by a private key of the accounting node to a block chain network;
each voting node acquires the alternative block, verifies the transaction information according to the transaction information stored in the local node, generates voting reward information corresponding to the alternative block if the verification is passed, and broadcasts the alternative block and the voting reward information which are signed by a voting node private key and a bookkeeping node private key to a block chain network;
screening a voting node private key signature set corresponding to a self-bookkeeping node private key signature by each bookkeeping node, wherein the voting node private key signature set comprises voting reward information corresponding to different voting nodes, screening an effective voting node private key signature set from the voting node private key signature set according to the voting reward information, wherein the effective voting node private key signature set comprises effective voting node private key signatures and corresponding effective voting reward information, judging whether the effective voting node private key signature set is matched with a preset selection condition or not, and further determining a target bookkeeping node corresponding to a target effective voting node private key signature set which is successfully matched at first;
the target accounting node sends the alternative block signed by a target accounting node private key signature and the target valid voting node private key signature set to a timestamp server, the timestamp server marks an authentication timestamp and broadcasts the alternative block to the block chain network after signing by a timestamp private key, so that a non-target accounting node of the block chain network verifies the alternative block, the authentication timestamp and the timestamp private key signature according to a valid voting node private key signature set corresponding to the non-target accounting node and the selection condition, and if the verification fails, a verification failure message is broadcast to the block chain network;
and the target accounting node receives the alternative block which is broadcasted by the timestamp server and marked with the authentication timestamp and the timestamp private key signature, starts a timer, determines the alternative block generated by the target accounting node as an effective block if the verification failure message broadcasted by the non-target accounting node is not received within a preset time, broadcasts the effective block to the block chain network, logs in a block chain, and simultaneously sends corresponding effective reward information to the corresponding effective voting node according to the effective voting reward information.
2. The method of claim 1, wherein the determining whether the valid voting node private key signature set matches a preset selection condition to determine a target accounting node corresponding to a target valid voting node private key signature set that matches successfully first comprises:
obtaining the number of effective signatures in the effective voting node private key signature set, and comparing the number of effective signatures with a preset first threshold;
firstly, determining the node corresponding to the target valid voting node private key signature set with the valid signature quantity equal to the first threshold value as the target accounting node.
3. The method of claim 1, wherein the determining whether the valid voting node private key signature set matches a preset selection condition to determine a target accounting node corresponding to a target valid voting node private key signature set that matches successfully first comprises:
obtaining the number of effective signatures in the effective voting node private key signature set and the weight values of different effective voting nodes;
calculating a voting value according to the number of the effective signatures and the weight values of the different effective voting nodes;
comparing the voting value with a preset second threshold value;
firstly, determining a node corresponding to the target valid voting node private key signature set with the voting value equal to the second threshold value as the target accounting node.
4. The method of claim 3, further comprising:
acquiring feature information of the different effective voting nodes in the block chain network;
and determining the weight values corresponding to the different effective voting nodes and the upper limit value of the effective voting reward information according to the characteristic information.
5. The method of claim 1, further comprising, after the starting a timer:
if the verification failure message broadcast by the non-target accounting node is received within the preset time, determining that the alternative block generated by the target accounting node is an invalid block.
6. A block generation system comprising a plurality of accounting nodes and a plurality of voting nodes, wherein,
each accounting node in the plurality of accounting nodes is used for generating an alternative block comprising the current period transaction information and broadcasting the alternative block which is signed by a private key of the accounting node to a block chain network;
each voting node in the plurality of voting nodes is used for acquiring the alternative block, verifying the transaction information according to the transaction information stored in a local node, if the transaction information passes the verification, generating voting reward information corresponding to the alternative block, and broadcasting the alternative block and the voting reward information which are subjected to the voting node private key signature and the accounting node private key signature to a block chain network;
each accounting node is further configured to screen a voting node private key signature set corresponding to a self accounting node private key signature, where the voting node private key signature set includes voting reward information corresponding to different voting nodes, and screen an effective voting node private key signature set from the voting node private key signature set according to the voting reward information, where the effective voting node private key signature set includes effective voting node private key signatures and corresponding effective voting reward information, and determine whether the effective voting node private key signature set matches a preset selection condition, thereby determining a target accounting node corresponding to a target effective voting node private key signature set that matches successfully at first;
the target accounting node is used for sending the alternative block signed by a target accounting node private key signature and the target valid voting node private key signature set to a timestamp server, the timestamp server marks an authentication timestamp and broadcasts the alternative block to the block chain network after signing by the timestamp private key, so that a non-target accounting node of the block chain network verifies the alternative block, the authentication timestamp and the timestamp private key signature according to a valid voting node private key signature set corresponding to the non-target accounting node and the selection condition, and if the verification fails, a verification failure message is broadcast to the block chain network;
the target accounting node is further configured to receive the candidate block marked with the authentication timestamp and the timestamp private key signature and broadcast by the timestamp server, start a timer, determine that the candidate block generated by the target accounting node is an effective block if the verification failure message broadcast by the non-target accounting node is not received within a preset time, broadcast the effective block logging block chain to the block chain network, and simultaneously send corresponding effective reward information to a corresponding effective voting node according to the effective voting reward information.
7. The system of claim 6, wherein each accounting node is specifically configured to:
obtaining the number of effective signatures in the effective voting node private key signature set, and comparing the number of effective signatures with a preset first threshold;
firstly, determining the node corresponding to the target valid voting node private key signature set with the valid signature quantity equal to the first threshold value as the target accounting node.
8. The system of claim 6, wherein each accounting node is specifically configured to:
obtaining the number of effective signatures in the effective voting node private key signature set and the weight values of different effective voting nodes;
calculating a voting value according to the number of the effective signatures and the weight values of the different effective voting nodes;
comparing the voting value with a preset second threshold value;
firstly, determining a node corresponding to the target valid voting node private key signature set with the voting value equal to the second threshold value as the target accounting node.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the block generation method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the block generation method according to any one of claims 1 to 5.
CN201811351343.7A 2018-11-14 2018-11-14 Block generation method and system Expired - Fee Related CN109543075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811351343.7A CN109543075B (en) 2018-11-14 2018-11-14 Block generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811351343.7A CN109543075B (en) 2018-11-14 2018-11-14 Block generation method and system

Publications (2)

Publication Number Publication Date
CN109543075A CN109543075A (en) 2019-03-29
CN109543075B true CN109543075B (en) 2020-09-22

Family

ID=65847132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811351343.7A Expired - Fee Related CN109543075B (en) 2018-11-14 2018-11-14 Block generation method and system

Country Status (1)

Country Link
CN (1) CN109543075B (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110047004B (en) * 2019-04-23 2023-04-18 重庆金窝窝网络科技有限公司 Block chain accounting node selection method and device
CN111865595B (en) * 2019-04-29 2023-06-27 普天信息技术有限公司 Block chain consensus method and device
CN110300171B (en) * 2019-06-28 2022-04-15 深圳市元征科技股份有限公司 Information acquisition method, system, computer readable storage medium and electronic device
CN110400409B (en) * 2019-07-26 2022-02-22 深圳市迅雷网络技术有限公司 Threshold voting method, system and related equipment based on BLS signature algorithm
CN110598449B (en) * 2019-09-19 2024-04-02 腾讯科技(深圳)有限公司 Data processing method and device for performing insurance function, storage medium and computer equipment
CN111078787B (en) * 2019-11-11 2023-07-21 重庆邮电大学 Block chain consensus method based on random number mapping
CN111130790B (en) * 2019-12-09 2022-06-10 四川星际荣威科技有限公司 Block co-recognition method based on block chain node network
CN111314436A (en) * 2020-01-20 2020-06-19 柏建华 Hierarchical block chain system and implementation method
CN113206748B (en) * 2020-02-03 2022-10-18 北京百度网讯科技有限公司 Management method of alliance chain network, alliance chain network and electronic device
CN111047330B (en) * 2020-03-18 2020-09-22 杭州智块网络科技有限公司 Verification bonus awarding method and device for blocks
CN111526045B (en) * 2020-03-25 2023-05-02 莘上信息技术(上海)有限公司 Fault processing method and system for block chain
CN111431696B (en) * 2020-03-26 2023-10-17 深圳市欧欣泰科技有限公司 Block chain seal mechanism based on identity
CN111836269B (en) * 2020-07-10 2023-05-30 全链通有限公司 Micro base station deployment method, equipment and storage medium based on block chain
CN111885512A (en) * 2020-07-10 2020-11-03 全链通有限公司 Method for acquiring block chain reward by micro base station, accounting node, micro base station and medium
CN111885511B (en) * 2020-07-10 2021-09-10 全链通有限公司 Method for acquiring block chain reward by micro base station, accounting node, micro base station and medium
CN111836268B (en) * 2020-07-10 2023-04-28 全链通有限公司 Terminal equipment access information processing method, equipment and storage medium
CN112199444B (en) * 2020-10-10 2023-01-17 中国联合网络通信集团有限公司 Accounting method and server
CN112261145B (en) * 2020-10-22 2022-07-12 中国联合网络通信集团有限公司 New block chain generation method and device
CN112600682B (en) * 2020-12-09 2022-01-18 四川大学 Block chain consensus method and device based on delegation interest certification algorithm
CN112527908A (en) * 2020-12-22 2021-03-19 深圳壹账通智能科技有限公司 Block chain network construction method, node adding method, medium and equipment
CN112613601B (en) 2020-12-24 2024-01-16 暨南大学 Neural network model updating method, equipment and computer storage medium
CN112804333B (en) * 2021-01-15 2022-10-11 北京百度网讯科技有限公司 Exception handling method, device and equipment for out-of-block node and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108235799A (en) * 2017-12-27 2018-06-29 深圳达闼科技控股有限公司 Block generation method, device, storage medium and block chain network
WO2018189656A1 (en) * 2017-04-11 2018-10-18 nChain Holdings Limited Secure re-use of private key for dynamic group of nodes
CN108804928A (en) * 2018-07-09 2018-11-13 武汉工商学院 The secure and trusted block chain and management method of data in a kind of traceability system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018189656A1 (en) * 2017-04-11 2018-10-18 nChain Holdings Limited Secure re-use of private key for dynamic group of nodes
CN108235799A (en) * 2017-12-27 2018-06-29 深圳达闼科技控股有限公司 Block generation method, device, storage medium and block chain network
CN108804928A (en) * 2018-07-09 2018-11-13 武汉工商学院 The secure and trusted block chain and management method of data in a kind of traceability system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"区块链出块节点激励方案";钟晓宏;《https://www.jianshu.com/p/7c03fe85e5f4》;20181109;第1-3页 *
"区块链记账原理";Origheart;《https://www.jianshu.com/p/448ce760f3c5》;10170730;第1-4页 *

Also Published As

Publication number Publication date
CN109543075A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109543075B (en) Block generation method and system
US11799637B2 (en) Methods and systems for blockchain-implemented event-lock encryption
US20230120854A1 (en) Secure blockchain-based consensus
CN110443614B (en) Node equipment deleting method and device, computer equipment and storage medium
EP3610436B1 (en) Rapid distributed consensus on blockchain
CN108492103B (en) Joint block chain consensus method
CN109242467B (en) Block chain-based networking method and device, computer equipment and storage medium
CN109889382B (en) Domain name information maintenance system based on block chain hybrid consensus
CN109359978B (en) Intelligent contract trading method and system based on block chain network
CN108900507B (en) Block chain real-name authentication method and system
CN109451061B (en) Contract adjustment processing method and system for block chain
CN108880832B (en) Block chain real-name authentication method and system
CN109447799B (en) Intelligent contract trading method and system based on block chain network
CN112651830B (en) Block chain consensus method applied to power resource sharing network
CN112749968B (en) Service data recording method and device based on block chain
CN111258986A (en) Rollback method of block chain
CN112910661B (en) Block chain consensus method, device, equipment and medium suitable for electronic subscription
CN112019380B (en) Right excitation-based block chain consensus method combining Raft and PBFT algorithm
CN109543074B (en) Node validity detection based on block generation
CN116527684A (en) Multi-chain information interaction method based on 1+1+N relay consensus committee
CN112465516B (en) Block chain network-based device management method, related device and storage medium
CN112261145B (en) New block chain generation method and device
CN114650289B (en) Method and device for block chain consensus
CN110098934B (en) Electronic data certificate storing method, device and terminal
CN114650145B (en) Method and device for generating blocks in block chain and electronic equipment

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100191 1107c, 11 / F, Xueyuan international building, 1 Zhichun Road, Haidian District, Beijing

Applicant after: IALLCHAIN Co.,Ltd.

Address before: 100043 5158, 5 floor, 11 Shixing street, Shijingshan District, Beijing.

Applicant before: IALLCHAIN Co.,Ltd.

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

Granted publication date: 20200922

Termination date: 20211114