CN109525648A - Block chain common recognition mechanism, equipment and computer readable storage medium - Google Patents

Block chain common recognition mechanism, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109525648A
CN109525648A CN201811256702.0A CN201811256702A CN109525648A CN 109525648 A CN109525648 A CN 109525648A CN 201811256702 A CN201811256702 A CN 201811256702A CN 109525648 A CN109525648 A CN 109525648A
Authority
CN
China
Prior art keywords
block chain
block
cryptographic hash
chain node
difference
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.)
Pending
Application number
CN201811256702.0A
Other languages
Chinese (zh)
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 CN201811256702.0A priority Critical patent/CN109525648A/en
Publication of CN109525648A publication Critical patent/CN109525648A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the present invention provides a kind of block chain common recognition mechanism, equipment and computer readable storage medium.The embodiment of the present invention obtains the first cryptographic Hash of the N-1 block in block chain by block chain node, calculate the second cryptographic Hash of the n-th block that the block chain node generates, if within a preset time, the absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that the block chain node calculates is smaller than the absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that other described block chain nodes calculate, or the absolute value of the difference of the second cryptographic Hash and first cryptographic Hash of the block chain node calculating is less than preset threshold, then the block chain node obtains the book keeping operation power of the n-th block, compared to POW common recognition mechanism, a new block is generated not need to expend a large amount of calculation amount, save the energy, in addition, compared to Pos, the common recognition mechanism such as DPos, fairness is higher.

Description

Block chain common recognition mechanism, equipment and computer readable storage medium
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of block chain common recognition mechanism, equipment and computer Readable storage medium storing program for executing.
Background technique
The core of block chain is common recognition mechanism, and common recognition mechanism determines the way of realization of block chain, determines the side of trust Formula and rule, to determine the different application scene of block chain.The each increase for carrying information block of block chain, will be based on Certain mechanism and algorithm.
The mode of realization block chain common at present has proof of work (Proof Of Work, POW), equity to prove The common recognition mechanism such as (Proof of Stake, Pos), share authorisation verification (Delegated Proof of Stake, DPos), but It is, for POW common recognition mechanism, to generate a new block and need to expend a large amount of calculation amount, lead to energy waste.And Pos, DPos Etc. common recognitions mechanism fairness it is poor.
Summary of the invention
The embodiment of the present invention provides a kind of block chain common recognition mechanism, equipment and computer readable storage medium, to save energy Fairness is improved in source.
In a first aspect, the embodiment of the present invention provides a kind of block chain common recognition mechanism, comprising:
Block chain node obtains the first cryptographic Hash of the N-1 block in block chain;
The block chain node calculates the second cryptographic Hash of the n-th block that the block chain node generates, the block Chain node and other block chain nodes grab the book keeping operation power of n-th block, and the n-th block that the block chain node generates includes The expected obtained amount of money award of the block chain node, the n-th block that other described block chain nodes generate include it is described its The expected obtained amount of money award of his block chain node;
If the difference of the second cryptographic Hash and first cryptographic Hash that within a preset time, the block chain node calculates Absolute value is smaller than the absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that other described block chain nodes calculate, or The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that block chain node described in person calculates is less than preset threshold, then The block chain node obtains the book keeping operation power of the n-th block, wherein the preset time is to generate one in block chain network Maximum duration needed for a new block.
Second aspect, the embodiment of the present invention provide a kind of block chain node, comprising:
Memory;
Processor;
Communication interface;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor following Operation:
Obtain the first cryptographic Hash of the N-1 block in block chain;
Calculate the second cryptographic Hash of the n-th block that the block chain node generates, the block chain node and other areas Block chain node grabs the book keeping operation power of n-th block, and the n-th block that the block chain node generates includes the block chain node It is expected that obtained amount of money award, the n-th block that other described block chain nodes generate includes that other described block chain nodes are pre- The amount of money award that phase obtains;
If the difference of the second cryptographic Hash and first cryptographic Hash that within a preset time, the block chain node calculates Absolute value is smaller than the absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that other described block chain nodes calculate, or The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that block chain node described in person calculates is less than preset threshold, then The block chain node obtains the book keeping operation power of the n-th block, wherein the preset time is to generate one in block chain network Maximum duration needed for a new block.
The third aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, The computer program is executed by processor to realize method described in first aspect.
Block chain common recognition mechanism, equipment and computer readable storage medium provided in an embodiment of the present invention, pass through block chain Node obtains the first cryptographic Hash of the N-1 block in block chain, calculates the of the n-th block of block chain node generation Two cryptographic Hash, if within a preset time, the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node calculates Absolute value it is smaller than the absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that other described block chain nodes calculate, Or the absolute value of the difference of the second cryptographic Hash and first cryptographic Hash of the block chain node calculating is less than preset threshold, Then the block chain node obtains the book keeping operation power of the n-th block, compared to POW common recognition mechanism, generates a new block not It needs to expend a large amount of calculation amount, saves the energy, in addition, compared to the common recognition mechanism such as Pos, DPos, fairness is higher.
Detailed description of the invention
Fig. 1 is block chain provided in an embodiment of the present invention common recognition mechanism flow chart;
Fig. 2 is the schematic diagram of block chain node provided in an embodiment of the present invention;
Fig. 3 be another embodiment of the present invention provides block chain know together mechanism flow chart;
Fig. 4 is the structural schematic diagram of block chain node provided in an embodiment of the present invention.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Block chain common recognition mechanism provided by the invention, it is intended to solve the technical problem as above of the prior art.
How to be solved with technical solution of the specifically embodiment to technical solution of the present invention and the application below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Fig. 1 is block chain provided in an embodiment of the present invention common recognition mechanism flow chart.The embodiment of the present invention is directed to the prior art Technical problem as above, provide block chain common recognition mechanism, specific step is as follows for this method:
Step 101, block chain node obtain the first cryptographic Hash of the N-1 block in block chain.
As shown in Fig. 2, including block chain node 1, block chain node 2, block chain node 3 in block chain network, herein only It is to schematically illustrate, does not limit the specific structure of the block chain network, does not also limit block chain node in the block chain network Number.
Assuming that the N-1 block has generated in the block chain network, current time block chain node 1, block chain link Point 2, block chain node 3 grab the book keeping operation power of n-th block.Block chain node 1, block chain node 2, block chain node 3 can divide A random targets number is not obtained according to certain algorithm from the N-1 block, which specifically can be N-1 The cryptographic Hash of the N-1 block is denoted as the first cryptographic Hash such as hash1 herein by the cryptographic Hash of block.In other embodiments, The random targets number is not limited to the cryptographic Hash of the N-1 block, can also be it is relevant to the N-1 block other with Machine number.
Step 102, the block chain node calculate the second cryptographic Hash of the n-th block that the block chain node generates, The block chain node and other block chain nodes grab the book keeping operation power of n-th block, the n-th that the block chain node generates Block includes the expected obtained amount of money award of the block chain node, the n-th block packet that other described block chain nodes generate Include the expected obtained amount of money award of other described block chain nodes.
In the present embodiment, block chain node 1, block chain node 2, block chain node 3 are in the book keeping operation power to n-th block When being grabbed, bonus that block chain node 1, block chain node 2, block chain node 3 have selected respective expection to obtain respectively Volume, for example, the expected obtained amount of money award of block chain node 1 is MONEY-A, the expected obtained amount of money award of block chain node 2 For MONEY-B, the expected obtained amount of money award of block chain node 3 is MONEY-C.Block chain node 1 is calculated including MONEY-A The cryptographic Hash of n-th block inside is denoted as HASH-A, and block chain node 2 calculates the n-th block including MONEY-B Cryptographic Hash be denoted as HASH-B, the cryptographic Hash that block chain node 3 calculates the n-th block including MONEY-C is denoted as The cryptographic Hash of n-th block is denoted as the second cryptographic Hash herein by HASH-C.Optionally, the n-th that different blocks chain node generates Block may be different, and the cryptographic Hash of the calculated n-th block of different blocks chain node may be also different.
If step 103, within a preset time, the second cryptographic Hash and first cryptographic Hash that the block chain node calculates Difference the second cryptographic Hash for calculating than other described block chain nodes of absolute value and the difference of first cryptographic Hash it is exhausted The absolute value for the difference for being worth the second cryptographic Hash and first cryptographic Hash that the small or described block chain node calculates is less than pre- If threshold value, then the block chain node obtains the book keeping operation power of the n-th block, wherein the preset time is block link network Maximum duration needed for generating a new block in network.
In the present embodiment, block chain node 1, block chain node 2, which block chain node is at first in block chain node 3 Reach one of two following conditions, which just obtains the book keeping operation power of the n-th block:
Condition 1): within a preset time, the cryptographic Hash and the N-1 block of the n-th block which calculates Cryptographic Hash difference absolute value than the n-th block that other block chain nodes calculate cryptographic Hash and the N-1 block The absolute value of the difference of cryptographic Hash is small.When the preset time is longest needed for generating a new block in block chain network Between, which is denoted as TIME-MAX.
Condition 2): the difference of the cryptographic Hash of the cryptographic Hash and the N-1 block for the n-th block that the block chain node calculates Absolute value be less than preset threshold, which is the difference of the cryptographic Hash of n-th block Yu the cryptographic Hash of the N-1 block The minimum value of absolute value be denoted as hash-min.
For example, block chain node 1 is in preset time T IME- in block chain node 1, block chain node 2, block chain node 3 In MAX, the absolute value of the difference of the cryptographic Hash of the cryptographic Hash and the N-1 block of the n-th block of calculating is minimum, then block chain Node 1 just obtains the book keeping operation power of the n-th block;Alternatively, if the calculated n-th block at first of block chain node 1 The absolute value of the difference of the cryptographic Hash of cryptographic Hash and the N-1 block is less than preset threshold hash-min, then block chain node 1 is just Obtain the book keeping operation power of the n-th block.
For example, block chain node 1 has selected oneself expected amount of money award MONEY-A in preset time T IME-MAX, And by MONEY-A include the cryptographic Hash HASH-A that the n-th block is calculated in n-th block, block chain node 1 will wrap The n-th block and cryptographic Hash HASH-A for including MONEY-A are broadcast in block chain network, block chain node 2 and block chain node 3 When receiving the n-th block and cryptographic Hash HASH-A including MONEY-A, the cryptographic Hash of HASH-A and the N-1 block are determined The absolute value of difference be less than preset threshold hash-min, then block chain node 2 and block chain node 3 stop grabbing n-th area The book keeping operation of block is weighed, and until the n-th block is verified by rear, which has just obtained the approval of whole district's block chain network, Block chain node 1, block chain node 2 and block chain node 3 can continue to grab the book keeping operation power of the N+1 block.
After the block chain node obtains the book keeping operation power of the n-th block, what the block chain node was generated The n-th block is broadcast in block chain network.
For example, block chain node 1 obtains the book keeping operation power of the n-th block, the then n-th that block chain node 1 is generated Block is broadcast in block chain network, optionally, will after block chain node 1 signs to the n-th block using the private key of oneself The n-th block is broadcast in block chain network, then n-th block is successfully generated, block chain node 1, block chain node 2, area Block chain node 3 can continue to grab the book keeping operation power of the N+1 block.
In addition, if within a preset time, the second cryptographic Hash that the block chain node calculates and first cryptographic Hash The absolute value of difference is greater than the preset threshold, and the second cryptographic Hash and described first that other described block chain nodes calculate is breathed out The absolute value of the difference of uncommon value is greater than the preset threshold, beyond after the preset time, the block chain node calculate the The second cryptographic Hash that the absolute value of the difference of two cryptographic Hash and first cryptographic Hash is calculated than other described block chain nodes and The absolute value of the difference of first cryptographic Hash is small, then the block chain node obtains the book keeping operation power of the n-th block.
For example, block chain node 1, block chain node 2, block chain node 3 calculate separately in preset time T IME-MAX The cryptographic Hash of n-th block is gone out, for example, the N that block chain node 1, block chain node 2, block chain node 3 calculate separately out The cryptographic Hash of a block be HASH-A, HASH-B, HASH-C, and HASH-A, HASH-B, HASH-C respectively with the N-1 area The absolute value of the difference of the cryptographic Hash of block is both greater than preset threshold hash-min, then block chain node 1, block chain node 2, block The cryptographic Hash of the n-th block of each self-generating He the n-th block is broadcast in block chain network by chain node 3 respectively.Specifically , respective private key is respectively adopted to the n-th block of each self-generating in block chain node 1, block chain node 2, block chain node 3 It is broadcast in block chain network with after the cryptographic Hash signature of the n-th block.If having exceeded preset time T IME-MAX, block Chain node 1, block chain node 2, block chain node 3 stop calculating, at this point, comparing HASH-A, HASH-B, HASH-C respectively with the The absolute value of the difference of the cryptographic Hash of N-1 block, if the absolute value of the difference of the cryptographic Hash of HASH-A and the N-1 block is most It is small, it is determined that block chain node 1 obtains the book keeping operation power of the n-th block.
The embodiment of the present invention obtains the first cryptographic Hash of the N-1 block in block chain by block chain node, calculates institute State the second cryptographic Hash of the n-th block of block chain node generation, if within a preset time, the block chain node calculate the The second cryptographic Hash that the absolute value of the difference of two cryptographic Hash and first cryptographic Hash is calculated than other described block chain nodes and The second cryptographic Hash and described first that the absolute value of the difference of first cryptographic Hash is small or the block chain node calculates is breathed out The absolute value of the difference of uncommon value is less than preset threshold, then the block chain node obtains the book keeping operation power of the n-th block, compares In POW know together mechanism, generate a new block and do not need to expend a large amount of calculation amount, save the energy, in addition, compared to Pos, The common recognition mechanism such as DPos, fairness are higher.
Fig. 3 be another embodiment of the present invention provides block chain know together mechanism flow chart.On the basis of the above embodiments, Block chain common recognition mechanism provided in this embodiment specifically comprises the following steps:
Step 301, block chain node obtain the first cryptographic Hash of the N-1 block in block chain.
Step 301 is consistent with the implementation of step 101 and concrete principle, and details are not described herein again.
Step 302, the block chain node receive that other described block chain nodes broadcast in block chain network by institute State other block chain nodes generation n-th block and other described block chain nodes be calculated by other described areas Second cryptographic Hash of the n-th block that block chain node generates.
For example, block chain node 1 has calculated the cryptographic Hash of n-th block at first in preset time T IME-MAX HASH-A, then HASH-A and the n-th block are first broadcast in block chain network by block chain node 1, block chain node 2, area Block chain node 3 can be respectively received HASH-A and the n-th block.Wherein, n-th block packet that block chain node 1 issues Include the expected obtained amount of money award MONEY-A of block chain node 1.
Step 303, the block chain node calculate the second cryptographic Hash of the n-th block that the block chain node generates.
By taking block chain node 2 as an example, the cryptographic Hash for the n-th block that 2 calculation block chain node 2 of block chain node generates is HASH-B。
The second cryptographic Hash and described that step 304, the block chain node block chain node are calculated The second cryptographic Hash and described first that the absolute value of the difference of one cryptographic Hash and other described block chain nodes are calculated are breathed out The absolute value of the difference of uncommon value.
The difference of the cryptographic Hash of HASH-B and the N-1 block that 2 comparison blocks chain node 2 of block chain node is calculated Absolute value and the absolute value of the difference of the cryptographic Hash of HASH-A and the N-1 block that is calculated of block chain node 1.
If the difference of the second cryptographic Hash and first cryptographic Hash that step 305, the block chain node are calculated Absolute value be greater than the second cryptographic Hash and first cryptographic Hash that other described block chain nodes are calculated difference it is exhausted To value, then the block chain node reduces the amount of money award in the n-th block that the block chain node generates, wherein described The reduction amplitude of amount of money award is greater than predetermined amplitude.
If the absolute value of the difference of the cryptographic Hash of HASH-B and the N-1 block that block chain node 2 is calculated is big In the absolute value of the difference of the cryptographic Hash of HASH-A and the N-1 block that block chain node 1 is calculated, then block chain node 2 reduce the amount of money award in the n-th block that block chain node 2 generates, and the reduction amplitude of the amount of money award is greater than predetermined amplitude, The predetermined amplitude is denoted as MONEY-MIN.
Step 306, the block chain node recalculate the second cryptographic Hash of n-th block.
After block chain node 2 reduces the amount of money award in the n-th block that block chain node 2 generates, n-th is recalculated The cryptographic Hash of block for example obtains cryptographic Hash HASH-B2.
Block chain node 2 continues the absolute value for comparing the difference of the cryptographic Hash of HASH-B2 and the N-1 block, Yi Jiqu The absolute value of the difference of the cryptographic Hash of HASH-A and the N-1 block that block chain node 1 is calculated, it is assumed that block chain node 2 After calculating HASH-B2, still only block chain node 1 discloses the Kazakhstan of HASH-A and n-th block in the block chain network Uncommon value.If the absolute value of the difference of the cryptographic Hash of HASH-B2 and the N-1 block that block chain node 2 recalculates is big In the absolute value of the difference of the cryptographic Hash of HASH-A and the N-1 block that block chain node 1 is calculated, then block chain node 2 continue to reduce the amount of money award in the n-th block that block chain node amount of money award 2 generates, until block chain node 2 will reward When the amount of money is reduced to some value, the cryptographic Hash and the N-1 block of the n-th block that block chain node 2 recalculates The absolute value of difference of cryptographic Hash be less than the cryptographic Hash of HASH-A and the N-1 block that block chain node 1 is calculated The absolute value of difference.
If the second cryptographic Hash of the n-th block that step 307, the block chain node recalculate and first Hash The absolute value of the difference of value is than the second cryptographic Hash and first cryptographic Hash that other block chain nodes described in current time calculate Difference absolute value it is small, and the current time in the preset time, then the block chain node is generated N Second cryptographic Hash of a block and the n-th block is broadcast in block chain network.
For example, when MONEY-B is reduced to MONEY-B5 by block chain node 2, block chain node 2 recalculate The absolute value of the difference of the cryptographic Hash of the cryptographic Hash and the N-1 block of N number of block is than other block chain node meters of current time The absolute value of the difference of the cryptographic Hash of the cryptographic Hash and the N-1 block of the n-th block of calculation is small, that is to say, that block chain link The cryptographic Hash and N-1 for the n-th block that block chain link point 2 recalculates when MONEY-B is reduced to MONEY-B5 by point 2 The absolute value of the difference of the cryptographic Hash of a block be it is the smallest, and current time also in preset time T IME-MAX, then block The cryptographic Hash such as HASH-B5 of n-th block and the n-th block including MONEY-B5 is broadcast to area by chain node 2 In block chain network.Specifically, block chain node 2 can be using the private key of oneself to the n-th block including MONEY-B5 It is broadcast in block chain network with after the cryptographic Hash such as HASH-B5 signature of the n-th block.
In addition, block chain node 2 can if block chain node 2 determines that MONEY-B5 is less than paying for block chain node 2 To stop book keeping operation.
The embodiment of the present invention calculates the cryptographic Hash of n-th block by each block chain node, and compares the N-1 block Cryptographic Hash and n-th block cryptographic Hash, when some calculated n-th block of block chain node cryptographic Hash and N The absolute value of the difference of the cryptographic Hash of a block is minimum, alternatively, working as the Kazakhstan of some calculated n-th block of block chain node The absolute value of uncommon value and the difference of the cryptographic Hash of n-th block is less than preset threshold, then the block chain node just obtains described The book keeping operation of n-th block is weighed, and the threshold of block chain node is reduced, and more block chain nodes can be attracted to participate in book keeping operation power Plunder in, promote the development of block chain.
Fig. 4 is the structural schematic diagram of block chain node provided in an embodiment of the present invention.Block provided in an embodiment of the present invention Chain node can execute the process flow that block chain common recognition mechanism embodiment provides, as shown in figure 4, block chain node 40 includes: Memory 41, processor 42, computer program and communication interface 43;Wherein, computer program is stored in memory 41, and by It is configured to execute following operation by processor 42: obtaining the first cryptographic Hash of the N-1 block in block chain;Calculate the block Second cryptographic Hash of the n-th block that chain node generates, the block chain node and other block chain nodes grab n-th block Book keeping operation power, the n-th block that the block chain node generates includes the expected obtained amount of money award of the block chain node, institute The n-th block for stating the generation of other block chain nodes includes the expected obtained amount of money award of other described block chain nodes;If In preset time, described in the absolute value ratio of the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node calculates The absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that other block chain nodes calculate is small or the block chain The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that node calculates is less than preset threshold, then the block chain link Point obtains the book keeping operation power of the n-th block, wherein the preset time is generated needed for a new block in block chain network Maximum duration.
Optionally, processor 42 is also used to: after the block chain node obtains the book keeping operation power of the n-th block, being led to It crosses the communication interface n-th block of generation is broadcast in block chain network.
Optionally, it before the second cryptographic Hash that processor 42 calculates the n-th block that the block chain node generates, also uses In: by the communication interface receive that other described block chain nodes broadcast in block chain network by other described block chains What the n-th block and other described block chain nodes that node generates were calculated is generated by other described block chain nodes N-th block the second cryptographic Hash;Processor 42 calculates the second cryptographic Hash of the n-th block that the block chain node generates Later, be also used to: the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node is calculated it is exhausted The difference of the second cryptographic Hash and first cryptographic Hash that value and other described block chain nodes are calculated it is absolute Value;If the absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node is calculated is greater than institute The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that other block chain nodes are calculated is stated, then described in reduction The amount of money award in n-th block that block chain node generates, wherein the reduction amplitude of the amount of money award is greater than default width Degree.
Optionally, it after processor 42 reduces the amount of money award in the n-th block that the block chain node generates, also uses In: recalculate the second cryptographic Hash of n-th block;If the second cryptographic Hash of the n-th block recalculated and described first The absolute value of the difference of cryptographic Hash is breathed out than the second cryptographic Hash that other block chain nodes described in current time calculate with described first The absolute value of the difference of uncommon value is small, and the current time in the preset time, then passing through the communication interface will generate N-th block and the second cryptographic Hash of the n-th block be broadcast in block chain network.
Optionally, if within a preset time, the second cryptographic Hash and first cryptographic Hash that the block chain node calculates Difference absolute value be greater than the preset threshold, and other described block chain nodes calculate the second cryptographic Hash and described first The absolute value of the difference of cryptographic Hash is greater than the preset threshold, after exceeding the preset time, what the block chain node calculated The absolute value of the difference of second cryptographic Hash and first cryptographic Hash is than the second cryptographic Hash that other described block chain nodes calculate Small with the absolute value of the difference of first cryptographic Hash, then the block chain node obtains the book keeping operation power of the n-th block.
The block chain node of embodiment illustrated in fig. 4 can be used for executing the technical solution of above method embodiment, realize former Reason is similar with technical effect, and details are not described herein again.
In addition, the present embodiment also provides a kind of computer readable storage medium, it is stored thereon with computer program, the meter Calculation machine program is executed by processor to realize the common recognition mechanism of block chain described in above-described embodiment.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (11)

  1. The mechanism 1. a kind of block chain is known together characterized by comprising
    Block chain node obtains the first cryptographic Hash of the N-1 block in block chain;
    The block chain node calculates the second cryptographic Hash of the n-th block that the block chain node generates, the block chain link Point and other block chain nodes grab the book keeping operation power of n-th block, and the n-th block that the block chain node generates includes described The expected obtained amount of money award of block chain node, the n-th block that other described block chain nodes generate include other described areas The expected obtained amount of money award of block chain node;
    If the second cryptographic Hash that within a preset time, the block chain node calculates is absolute with the difference of first cryptographic Hash The absolute value for being worth the second cryptographic Hash and the difference of first cryptographic Hash that calculate than other described block chain nodes is small, Huo Zhesuo The absolute value for stating the second cryptographic Hash of block chain node calculating and the difference of first cryptographic Hash is less than preset threshold, then described Block chain node obtains the book keeping operation power of the n-th block, wherein the preset time is that one is generated in block chain network newly Maximum duration needed for block.
  2. 2. the method according to claim 1, wherein when the block chain node obtains the n-th block After book keeping operation power, the n-th block that the block chain node is generated is broadcast in block chain network.
  3. 3. method according to claim 1 or 2, which is characterized in that the block chain node calculates the block chain node Before second cryptographic Hash of the n-th block of generation, further includes:
    The block chain node receive that other described block chain nodes broadcast in block chain network by other described block chains What the n-th block and other described block chain nodes that node generates were calculated is generated by other described block chain nodes N-th block the second cryptographic Hash;
    The block chain node calculates after the second cryptographic Hash of the n-th block that the block chain node generates, further includes:
    The difference of the second cryptographic Hash and first cryptographic Hash that the block chain node block chain node is calculated The difference of the second cryptographic Hash and first cryptographic Hash that the absolute value of value and other described block chain nodes are calculated Absolute value;
    If the absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node is calculated is greater than The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that other described block chain nodes are calculated, the then area Block chain node reduces the amount of money award in the n-th block that the block chain node generates, wherein the reduction of the amount of money award Amplitude is greater than predetermined amplitude.
  4. 4. according to the method described in claim 3, it is characterized in that, the block chain node reduces the block chain node generation N-th block in amount of money award after, further includes:
    The block chain node recalculates the second cryptographic Hash of n-th block;
    If the second cryptographic Hash of the n-th block that the block chain node recalculates is exhausted with the difference of first cryptographic Hash The second cryptographic Hash calculated than other block chain nodes described in current time value is absolute with the difference of first cryptographic Hash Be worth it is small, and the current time in the preset time, then the block chain node is generated n-th block and described Second cryptographic Hash of n-th block is broadcast in block chain network.
  5. 5. method according to claim 1 or 2, which is characterized in that if within a preset time, the block chain node calculates The second cryptographic Hash and the absolute value of difference of first cryptographic Hash be greater than the preset threshold, and other described block chain links The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that point calculates is greater than the preset threshold, beyond described default After time, the absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node calculates than it is described other The absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that block chain node calculates is small, then the block chain node obtains Obtain the book keeping operation power of the n-th block.
  6. 6. a kind of block chain node characterized by comprising
    Memory;
    Processor;
    Communication interface;And
    Computer program;
    Wherein, the computer program stores in the memory, and is configured as executing following operation by the processor:
    Obtain the first cryptographic Hash of the N-1 block in block chain;
    Calculate the second cryptographic Hash of the n-th block that the block chain node generates, the block chain node and other block chains Node grabs the book keeping operation power of n-th block, and the n-th block that the block chain node generates includes that the block chain node is expected Obtained amount of money award, the n-th block that described other block chain nodes generate include that described other block chain nodes are expected The amount of money award arrived;
    If the second cryptographic Hash that within a preset time, the block chain node calculates is absolute with the difference of first cryptographic Hash The absolute value for being worth the second cryptographic Hash and the difference of first cryptographic Hash that calculate than other described block chain nodes is small, Huo Zhesuo The absolute value for stating the second cryptographic Hash of block chain node calculating and the difference of first cryptographic Hash is less than preset threshold, then described Block chain node obtains the book keeping operation power of the n-th block, wherein the preset time is that one is generated in block chain network newly Maximum duration needed for block.
  7. 7. block chain node according to claim 6, which is characterized in that the processor is also used to: when the block chain After node obtains the book keeping operation power of the n-th block, the n-th block of generation is broadcast to by area by the communication interface In block chain network.
  8. 8. block chain node according to claim 6 or 7, which is characterized in that the processor calculates the block chain link Before second cryptographic Hash of the n-th block that point generates, it is also used to:
    By the communication interface receive that other described block chain nodes broadcast in block chain network by other described blocks The n-th block and other described block chain nodes that chain node generates are calculated raw by other described block chain nodes At n-th block the second cryptographic Hash;
    After the processor calculates the second cryptographic Hash of the n-th block that the block chain node generates, it is also used to:
    Compare the absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node is calculated, and The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that other described block chain nodes are calculated;
    If the absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node is calculated is greater than The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that other described block chain nodes are calculated, then reduce institute State the amount of money award in the n-th block of block chain node generation, wherein the reduction amplitude of the amount of money award is greater than default width Degree.
  9. 9. block chain node according to claim 8, which is characterized in that it is raw that the processor reduces the block chain node At n-th block in amount of money award after, be also used to:
    Recalculate the second cryptographic Hash of n-th block;
    If the absolute value of the difference of the second cryptographic Hash of the n-th block recalculated and first cryptographic Hash compares current time The absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that other described block chain nodes calculate is small, and described current Moment in the preset time, then by the communication interface by the second of the n-th block of generation and the n-th block Cryptographic Hash is broadcast in block chain network.
  10. 10. block chain node according to claim 6 or 7, which is characterized in that if within a preset time, the block chain Node calculate the second cryptographic Hash and first cryptographic Hash difference absolute value be greater than the preset threshold, and it is described other The absolute value of the difference of the second cryptographic Hash and first cryptographic Hash that block chain node calculates is greater than the preset threshold, exceeds After the preset time, the absolute value ratio of the difference of the second cryptographic Hash and first cryptographic Hash that the block chain node calculates The absolute value of the second cryptographic Hash and the difference of first cryptographic Hash that other described block chain nodes calculate is small, then the block Chain node obtains the book keeping operation power of the n-th block.
  11. 11. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program, the computer program It is executed by processor to realize the method according to claim 1 to 5.
CN201811256702.0A 2018-10-26 2018-10-26 Block chain common recognition mechanism, equipment and computer readable storage medium Pending CN109525648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811256702.0A CN109525648A (en) 2018-10-26 2018-10-26 Block chain common recognition mechanism, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811256702.0A CN109525648A (en) 2018-10-26 2018-10-26 Block chain common recognition mechanism, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109525648A true CN109525648A (en) 2019-03-26

Family

ID=65773170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811256702.0A Pending CN109525648A (en) 2018-10-26 2018-10-26 Block chain common recognition mechanism, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109525648A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298757A (en) * 2019-07-05 2019-10-01 北京艾摩瑞策科技有限公司 It is related to the common recognition method and device thereof of DPoS
CN111464632A (en) * 2020-03-31 2020-07-28 中国联合网络通信集团有限公司 Block chain cross-chain forwarding method and block chain link point
CN111597264A (en) * 2020-05-15 2020-08-28 中国联合网络通信集团有限公司 Block chain accounting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016202952A1 (en) * 2015-06-16 2016-12-22 The Provost, Fellows, Foundation Scholars, & The Other Members Of Board, Of The College Of The Holy & Undiv. Trinity Of Queen Elizabeth, Near Dublin Digital token exchange system
CN106789908A (en) * 2016-11-23 2017-05-31 江苏通付盾科技有限公司 Block common recognition method for building up and system in block chain
US20170295180A1 (en) * 2016-04-06 2017-10-12 Guardtime Ip Holdings Limited System and Method for Access Control Using Context-Based Proof
CN107566124A (en) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 Common recognition method for building up, block catenary system and storage medium based on lottery mechanism
CN108667836A (en) * 2018-05-08 2018-10-16 众安信息技术服务有限公司 Block chain common recognition method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016202952A1 (en) * 2015-06-16 2016-12-22 The Provost, Fellows, Foundation Scholars, & The Other Members Of Board, Of The College Of The Holy & Undiv. Trinity Of Queen Elizabeth, Near Dublin Digital token exchange system
US20170295180A1 (en) * 2016-04-06 2017-10-12 Guardtime Ip Holdings Limited System and Method for Access Control Using Context-Based Proof
CN106789908A (en) * 2016-11-23 2017-05-31 江苏通付盾科技有限公司 Block common recognition method for building up and system in block chain
CN107566124A (en) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 Common recognition method for building up, block catenary system and storage medium based on lottery mechanism
CN108667836A (en) * 2018-05-08 2018-10-16 众安信息技术服务有限公司 Block chain common recognition method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298757A (en) * 2019-07-05 2019-10-01 北京艾摩瑞策科技有限公司 It is related to the common recognition method and device thereof of DPoS
CN111464632A (en) * 2020-03-31 2020-07-28 中国联合网络通信集团有限公司 Block chain cross-chain forwarding method and block chain link point
CN111464632B (en) * 2020-03-31 2021-12-07 中国联合网络通信集团有限公司 Block chain cross-chain forwarding method and block chain link point
CN111597264A (en) * 2020-05-15 2020-08-28 中国联合网络通信集团有限公司 Block chain accounting method and device
CN111597264B (en) * 2020-05-15 2023-06-23 中国联合网络通信集团有限公司 Block chain accounting method and device

Similar Documents

Publication Publication Date Title
CN109525648A (en) Block chain common recognition mechanism, equipment and computer readable storage medium
Sivasubramani et al. Environmental/economic dispatch using multi-objective harmony search algorithm
Nasre et al. Betweenness centrality–incremental and faster
CN109408595A (en) Block chain bookkeeping methods, equipment and computer readable storage medium
Xu et al. Hybrid pruning: Thinner sparse networks for fast inference on edge devices
CN107480990A (en) Block chain bookkeeping methods and device
CN107466406A (en) System and method for combining multiple prestige
CN111130790B (en) Block co-recognition method based on block chain node network
CN111047439B (en) Transaction processing method based on blockchain
Liu et al. Permissioned blockchain and deep reinforcement learning enabled security and energy efficient healthcare internet of things
CN106100922B (en) The prediction technique and device of the network flow of Train Communication Network
CN106095532A (en) A kind of virtual machine load balancing sacurity dispatching method in cloud environment
Qu et al. SIS epidemic spreading with correlated heterogeneous infection rates
Hu et al. Deterministic ripple-spreading model for complex networks
CN109067526A (en) Level public private key pair generation method and device
Kang et al. Simulation‐Based Optimization on the System‐of‐Systems Model via Model Transformation and Genetic Algorithm: A Case Study of Network‐Centric Warfare
CN105245343A (en) On-line off-line signature system and method based on multivariable cipher technology
Wei et al. SUCCESS: A Secure User-centric and Social-aware Reputation Based Incentive Scheme for DTNs.
Samaddar et al. Temporal parallelization of edge plasma simulations using the parareal algorithm and the SOLPS code
Yaguchi et al. Basic study of proximate optimality principle based combinatorial optimization method
CN108537550A (en) Prevent method, block catenary system and the computer readable storage medium of 51% attack
Singh et al. Rumor dynamics with inoculations for correlated scale free networks
CN116502680B (en) Parallel training method and device for mixed expert model
CN113297310B (en) Method for selecting block chain fragmentation verifier in Internet of things
Husted et al. Emergent properties & security: The complexity ofsecurity as a science

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