CN108964879A - A kind of drawing method, common recognition method, equipment and storage medium - Google Patents

A kind of drawing method, common recognition method, equipment and storage medium Download PDF

Info

Publication number
CN108964879A
CN108964879A CN201810806721.XA CN201810806721A CN108964879A CN 108964879 A CN108964879 A CN 108964879A CN 201810806721 A CN201810806721 A CN 201810806721A CN 108964879 A CN108964879 A CN 108964879A
Authority
CN
China
Prior art keywords
random number
common recognition
node
committeeman
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810806721.XA
Other languages
Chinese (zh)
Other versions
CN108964879B (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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN201810806721.XA priority Critical patent/CN108964879B/en
Publication of CN108964879A publication Critical patent/CN108964879A/en
Application granted granted Critical
Publication of CN108964879B publication Critical patent/CN108964879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention devises a kind of drawing method, freezes a certain number of assets first, to obtain the qualification with the first random number of assets respective numbers;Secondly, according to several second generating random number seed informations of top n block, wherein N is positive integer;The first random number is generated further according to seed information;Judge whether present node is chosen for common recognition committeeman further according to the difficulty value of the first random number and pre-configuration held;Finally, broadcast the first held random number, and receive the first random number of other node broadcasts, after the sequence of the first random number of the first random number held and other node broadcasts, the method that the corresponding common recognition committeeman of the first random number each in ranking results is divided into accounting nodes and node of knowing together according to the rule of pre-configuration, when so that each round being known together, common recognition committeeman is made of different nodes, solves the problems, such as common recognition committeeman and conspires to obtain interests and damage other node interests.

Description

A kind of drawing method, common recognition method, equipment and storage medium
Technical field
The present invention relates to block chain technical field, it is related to a kind of drawing method, common recognition method, equipment and storage medium.
Background technique
In existing block chain network, since number of nodes is big, cause each block that can only be packaged less Transaction Information. In order to improve the block chain network performance per second for being packaged number of transaction, existing solution is to pick out fixed several Possess the super node composition common recognition committee of stronger public credibility.Super node is as common recognition committeeman, to Transaction Information It knows together, generates the operation such as block.Since super node is fixed and invariable, theoretically for, who has no idea to guarantee Super node will not be conspired for interests, damage the interests of other nodes.
Conspire and damage other in conclusion currently needing to provide one kind and can successfully prevent common recognition committeeman The method of node interests.
Summary of the invention
In view of this, the present invention provides a kind of a kind of drawing method solved or part solves the above problems.
In a first aspect, the present invention provides a kind of drawing method, comprising:
Freeze a certain number of assets, to obtain the qualification with the first random number of assets respective numbers;
According to several second generating random number seed informations of top n block, wherein N is positive integer;
The first random number is generated according to seed information;
Judge whether present node is chosen for common recognition committee according to the difficulty value of the first random number and pre-configuration held Member can member;
The first held random number is broadcasted, and receives the first random number of other node broadcasts, first will held It is random by ranking results each first according to the rule of pre-configuration after the sequence of first random number of random number and other node broadcasts The corresponding common recognition committeeman of number is divided into accounting nodes and common recognition node.
Second aspect, the present invention also provides a kind of common recognition methods, comprising:
Block is generated after carrying out two stages ballot operation using BFT common recognition algorithm.
The third aspect, the present invention also provides a kind of equipment, including one or more processors and memory, wherein memory Comprising can by instruction that the one or more processors execute so that the one or more processors execute it is each according to the present invention The drawing method and common recognition method that embodiment provides.
Fourth aspect, the present invention also provides a kind of storage medium for being stored with computer program, which makes to count Calculation machine executes the drawing method that each embodiment provides according to the present invention and common recognition method.
Beneficial achievement of the invention are as follows:
The present invention devises a kind of drawing method, freezes a certain number of assets first, to obtain and assets respective numbers The first random number qualification;Secondly, according to several second generating random number seed informations of top n block, wherein N is positive Integer;The first random number is generated further according to seed information;Sentence further according to the difficulty value of the first random number and pre-configuration held Whether disconnected present node is chosen for common recognition committeeman;Finally, the first random number that broadcast is held, and receive other sections First random number of point broadcast, after the sequence of the first random number of the first random number held and other node broadcasts, according to The corresponding common recognition committeeman of first random number each in ranking results is divided into accounting nodes and common recognition by the rule of pre-configuration The method of node, when so that each round being known together, common recognition committeeman is made of different nodes, solves common recognition committee The problem of member meeting member conspires to obtain interests and damages other node interests.
The present invention devises a kind of common recognition method that can execute above-mentioned drawing method, carries out two using BFT common recognition algorithm Block is generated after stage ballot operation, improves the block chain network performance per second for being packaged number of transaction.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is the schematic diagram of lot scene in one embodiment of the invention.
Fig. 2 is a kind of flow chart for drawing method that one embodiment of the invention provides.
Fig. 3 is the flow chart of step S13 in a kind of preferred embodiment shown in FIG. 1.
Fig. 4 is the flow chart of step S15 in a kind of preferred embodiment shown in FIG. 1.
Fig. 5 is a kind of flow chart of preferred embodiment shown in FIG. 1.
Fig. 6 is a kind of flow chart for common recognition method that one embodiment of the invention provides.
Fig. 7 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
Specific implementation method
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to invention is illustrated only in attached drawing.It should be noted that in the absence of conflict, the application In embodiment and embodiment in feature can be combined with each other.It is described in detail this below with reference to the accompanying drawings and in conjunction with the embodiments Application.
Fig. 1 is the schematic diagram of lot scene in one embodiment of the invention.As shown in Figure 1, in the present embodiment, accounting nodes One block of every generation can generate N number of second random number of sequence, and N number of second random number is broadcast to block chain Network, wherein N is positive integer;Assuming that N is 5, the accounting nodes for generating the block that height is H are accounting nodes A, accounting nodes A 5 the second random numbers of sequence, respectively A1, A2, A3, A4, A5 are generated after generation block H, and this 5 second random numbers are wide It is multicast to block chain network;The accounting nodes for generating the block that height is H+1 are accounting nodes B, and accounting nodes B generates block H+1 5 the second random numbers of sequence, respectively B1, B2, B3, B4, B5 are generated afterwards, and this 5 second random numbers are broadcast to block Chain network;The accounting nodes for generating the block that height is H+2 are accounting nodes C, and accounting nodes C generates the row of generation after block H+2 5 the second random numbers of sequence, respectively C1, C2, C3, C4, C5, and this 5 second random numbers are broadcast to block chain network;It is raw The accounting nodes for the block for be H+3 at height are accounting nodes D, and 5 of sequence the are generated after accounting nodes D generation block H+3 Two random numbers, respectively D1, D2, D3, D4, D5, and this 5 second random numbers are broadcast to block chain network;Generating height is H The accounting nodes of+4 block are accounting nodes E, and 5 the second random numbers of sequence are generated after accounting nodes E generation block H+4, Respectively E1, E2, E3, E4, E5, and this 5 second random numbers are broadcast to block chain network;
Fig. 2 is a kind of flow chart for drawing method that one embodiment of the invention provides.As shown in Fig. 2, in the present embodiment, The present invention provides a kind of drawing method, comprising:
S11: freezing a certain number of assets, to obtain the qualification with the first random number of assets respective numbers;
S13: according to several second generating random number seed informations of top n block, wherein N is positive integer;
S15: the first random number is generated according to seed information;
S17: judge whether present node is chosen for altogether according to the difficulty value of the first random number and pre-configuration held Know committeeman;
S19: the first held random number of broadcast, and the first random number of other node broadcasts is received, by what is held After the sequence of first random number of the first random number and other node broadcasts, according to the regular by ranking results each first of pre-configuration The corresponding common recognition committeeman of random number is divided into accounting nodes and common recognition node.
Specifically, by taking application scenarios shown in FIG. 1 as an example, it is assumed that assets are assets token, often freeze 10000 assets generations The available qualification for obtaining 1 the first random number of coin;Assuming that node F has 10000 assets tokens, node F held One random number is less than the difficulty value being pre-configured.
In step s 11, node F freezes 10000 assets tokens, and node F obtains the qualification for obtaining 1 random number;
In step s 13, node F is according to several second generating random number seed informations of preceding 5 blocks;
In step S15, node F generates the first random number according to seed information;
In step S17, node F judges that present node is according to the difficulty value of the first random number and pre-configuration held It is no to be chosen for common recognition committeeman;Since the first random number of node F held is less than the difficulty value being pre-configured, Node F is chosen for common recognition committeeman.
In step S19, node F broadcasts held the first random number, and receives the first random of other node broadcasts Number will row according to the rule of pre-configuration after the sequence of the first random number of the first random number held and other node broadcasts The corresponding common recognition committeeman of each first random number is divided into accounting nodes and common recognition node in sequence result.
Fig. 3 is the flow chart of step S13 in a kind of preferred embodiment shown in Fig. 2.As shown in figure 3, preferred real one It applies in example, step S13 includes:
S131: several second random numbers for generating top n block are obtained;
S133: Hash operation is carried out after several second random number combinatorial operations that will acquire, obtains seed information, wherein Each second random number is only used for generating a seed information.
Specifically, by taking application scenarios shown in FIG. 1 as an example, it is assumed that current block height is H+5.
In step S131, node F obtains several second random numbers for generating preceding 5 blocks, for example, taking the block height to be The second random number on H to the diagonal line for the block that block height is H+4: A5, B4, C3, D2, E1;
In step S133, Hash operation is carried out after several second random number combinatorial operations that node F will acquire, is planted Sub-information seed, seed=sha256 (A5+B4+C3+D2+E1).
It should be noted that in the present example, Hash operation uses sha256 () algorithm, before seed information is The second random number on the diagonal line of 5 blocks;In more embodiments, Hash operation can be MD5, sha1, sha2 or its It calculates the algorithm of cryptographic Hash, and seed information can be the second random number of other combinations of top n block, can be achieved identical Technical effect.
Fig. 4 is the flow chart of step S15 in a kind of preferred embodiment shown in Fig. 2.As shown in figure 4, preferred real one It applies in example, step S15 includes:
S151: Hash operation is carried out to the public key of seed information and present node, obtains the first cryptographic Hash;
S153: signing to the first cryptographic Hash by the private key of present node, generates signing messages;
S155: Hash operation is carried out to signing messages, obtains the first random number.
Specifically, by taking application scenarios shown in FIG. 1 as an example,
In step S151, node F carries out Hash operation to the public key Pub (F) of seed information seed and node F, obtains First cryptographic Hash, hash1=sha256 (Head (H-1)+Pub (F));
In step S153, node F signs to the first cryptographic Hash hash1 by the private key Priv (F) of node F, raw At signing messages, sign=Sign (Priv (F), hash1);
In step S137, node F carries out Hash operation to signing messages sign, obtains the first random number, R=sha256 (sign)。
The generation of random number has randomness and verifiability, can neither be predicted be faked.It needs to illustrate It is that in the present example, Hash operation uses sha256 () algorithm, and the public information of a upper block is upper one The block head information of block;In more embodiments, Hash operation can be MD5, sha1, sha2 or other and calculate cryptographic Hash Algorithm, the public information of a upper block can be a block Mei Keergen or other public informations, can be achieved phase Same technical effect.
In a preferred embodiment, the size judgement of the difficulty value of random number and pre-configuration that present node is held is compared Whether present node is chosen for common recognition committeeman, if the random number that present node is held is less than the difficulty being pre-configured Value, then present node is chosen for common recognition committeeman.
In a preferred embodiment, the first random number that broadcast present node is held, and receive other node broadcasts After the first random number sequence of first random number, the first random number that present node is held and other node broadcasts, according to The corresponding common recognition committeeman of first random number each in ranking results is divided into accounting nodes and common recognition by the rule of pre-configuration Node includes:
First random number of the first random number and the other node broadcasts of reception that present node is held is ranked up behaviour Make;
The accounting nodes that node corresponding to the smallest first random number of numerical value is current block are chosen, accounting nodes are removed Outer common recognition committeeman is the common recognition node of current block.
Fig. 5 is a kind of flow chart of preferred embodiment shown in FIG. 1.As shown in figure 5, in a preferred embodiment, root The first random number is generated according to seed information, comprising:
Overtime duration is set;
According to several second generating random number seed informations of top n block;
The first random number is generated according to seed information;
Judge whether present node is chosen for common recognition committee according to the difficulty value of the first random number and pre-configuration held Member can member;
In overtime duration, according to the threshold decision of common recognition committeeman's number and the common recognition committeeman's number being pre-configured Whether common recognition committeeman's number forms the complete common recognition committee, if it is not, not forming the common recognition committee then, does not divide note Account node and common recognition node.
Specifically, setting a length of 15s when overtime, setting participates in the common recognition committee of common recognition by taking application scenarios shown in FIG. 1 as an example Member meeting member shares 33, and in overtime duration, common recognition committeeman does not reach 33, the not formed common recognition committee.
In the step s 21, overtime duration, a length of 15s when overtime are set;
In step S23, node F is according to several second generating random number seed informations of top n block;
In step s 25, node F generates the first random number according to seed information;
In step s 27, node F judges that present node is according to the difficulty value of the first random number and pre-configuration held No to be chosen for common recognition committeeman, since the random number of node F is less than the difficulty value being pre-configured, node F is selected For the committeeman that knows together;
In step S29, node F is in overtime duration, according to the common recognition committee member of common recognition committeeman's number and pre-configuration Whether threshold decision common recognition committeeman's number of meeting number of members forms the complete common recognition committee, since in 15s, common recognition is entrusted Member meeting member does not reach 33, and the not formed common recognition committee does not divide accounting nodes and common recognition node.
In a preferred embodiment, when the upper not formed common recognition committee of block height, block chain network is being worked as The difficulty value that preceding block height adjustment is pre-configured, comprising:
The difficulty value that adjustment is pre-configured in current block height, in overtime duration, there is enough nodes selected It is taken as common recognition committeeman;
The complete common recognition committee is formed in overtime duration.
Specifically, the common recognition committeeman that setting participates in common recognition shares 33.Assuming that a upper block height is H+5, And in 15s, the random number that only 30 nodes are held is less than the difficulty value being pre-configured, the not formed common recognition committee.In area When block height is H+6, the difficulty value that the adjustment of block chain network is pre-configured, so that having more than or equal to 33 node quilts in 15s It is chosen for common recognition committeeman, to form the complete common recognition committee.
In this example, it is assumed that adjusting the difficulty value of pre-configuration by the value for changing degree-of-difficulty factor.Assuming that being pre-configured Difficulty value D and degree-of-difficulty factor C relationship are as follows: D=33*C;Since a upper block height is H+5, and in 15s, only 30 The random number that a node is held is less than the difficulty value being pre-configured, the not formed common recognition committee, therefore is H+6 in block height When, degree-of-difficulty factor C should be increased, to increase difficulty value D;The numerical value of the difficulty value D of pre-configuration is higher, and node more readily satisfies institute The random number R held is less than the condition for the difficulty value D being pre-configured, and in overtime duration 15s, has enough nodes to be chosen for altogether Committeeman is known, so that block height be allow to be that the block of H+6 forms the complete common recognition committee.It should be noted that In more embodiments, the difficulty value being pre-configured can be changed by other algorithms such as addition, multiplication, identical skill can be achieved Art effect.
Fig. 6 is a kind of flow chart for common recognition method that one embodiment of the invention provides.As shown in fig. 6, in the present embodiment, The present invention provides a kind of common recognition method, comprising:
S31: block is generated after carrying out two stages ballot operation using BFT common recognition algorithm.
In a preferred embodiment, when accounting nodes generate correct block, accounting nodes will acquire certain number Assets are as reward.
In a preferred embodiment, it block is generated to accounting nodes when common recognition node makes two stages and correctly vote operation Afterwards, common recognition node will acquire the assets of certain number as reward.
Fig. 5 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
As shown in fig. 7, present invention also provides a kind of equipment 700, including one or more centres as on the other hand Unit (CPU) 701 is managed, can be added according to the program being stored in read-only memory (ROM) 702 or from storage section 708 The program that is downloaded in random access storage device (RAM) 703 and execute various movements appropriate and processing.In RAM703, also deposit It contains equipment 800 and operates required various programs and data.CPU701, ROM702 and RAM703 pass through the phase each other of bus 704 Even.Input/output (I/O) interface 705 is also connected to bus 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.; And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon Computer program be mounted into storage section 708 as needed.
Particularly, in accordance with an embodiment of the present disclosure, the equity of any of the above-described embodiment description proves that common recognition method can be by It is embodied as computer software programs.For example, embodiment of the disclosure includes a kind of computer program product comprising visibly wrap Containing computer program on a machine-readable medium, the computer program includes for executing drawing method and method of knowing together Program code.In such embodiments, which can be downloaded and be pacified from network by communications portion 709 Dress, and/or be mounted from detachable media 711.
As another aspect, present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums Matter can be computer readable storage medium included in the device of above-described embodiment;It is also possible to individualism, it is unassembled Enter the computer readable storage medium in equipment.Computer-readable recording medium storage has one or more than one program, should Program is used to execute the drawing method and common recognition method for being described in the application by one or more than one processor.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depending on related function.Also it wants It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yitong The dedicated hardware based system of functions or operations as defined in executing is crossed to realize, or by specialized hardware and can be calculated The combination of machine instruction is realized.
The foregoing is merely the preferred embodiments of the invention, the claims that are not intended to limit the invention. Simultaneously it is described above, for those skilled in the technology concerned it would be appreciated that and implement, therefore other be based on institute of the present invention The equivalent change that disclosure is completed, should be included in the covering scope of the claims.

Claims (12)

1. a kind of drawing method characterized by comprising
Freeze a certain number of assets, to obtain the qualification with the first random number of assets respective numbers;
According to several second generating random number seed informations of top n block, wherein N is positive integer;
First random number is generated according to the seed information;
Judge whether present node is chosen for the common recognition committee according to the difficulty value of the first random number and pre-configuration held Member;
The first held random number is broadcasted, and receives the first random number of other node broadcasts, it is random by held first After several the first random number sequences with other node broadcasts, according to the regular by the first random number pair each in ranking results of pre-configuration The common recognition committeeman answered is divided into accounting nodes and common recognition node.
2. the method according to claim 1, wherein described raw according to several second random numbers of top n block At seed information, comprising:
Obtain several second random numbers for generating top n block, wherein accounting nodes one block of every generation can generate sequence N number of second random number, and N number of second random number is broadcast to block chain network;
Hash operation is carried out after several second random number combinatorial operations that will acquire, obtains seed information, wherein Mei Gesuo The second random number is stated to be only used for generating a seed information.
3. the method according to claim 1, wherein described generate described first at random according to the seed information Number, comprising:
Hash operation is carried out to the public key of the seed information and present node, obtains the first cryptographic Hash;
It is signed by the private key of present node to first cryptographic Hash, generates signing messages;
Hash operation is carried out to the signing messages, obtains first random number.
4. the method according to claim 1, wherein described according to the first random number held and pre-configuration Difficulty value judges whether present node is chosen for common recognition committeeman, comprising:
The size of the difficulty value of held the first random number and pre-configuration is compared, if the first random number held is less than prewired The difficulty value set then is chosen for common recognition committeeman.
5. the method according to claim 1, wherein described broadcast the first held random number, and receiving it First random number of its node broadcasts, after the sequence of the first random number of the first random number held and other node broadcasts, Common recognition committeeman is divided into accounting nodes according to the rule of pre-configuration and common recognition node includes:
The first random number held and the first random number for receiving other node broadcasts are ranked up operation;
The accounting nodes that node corresponding to the smallest first random number of numerical value is current block are chosen, the accounting nodes are removed The outer common recognition committeeman is the common recognition node of current block.
6. the method according to claim 1, wherein described generate described first at random according to the seed information Number, comprising:
Overtime duration is set;
According to several second generating random number seed informations of top n block;
The first random number is generated according to the seed information;
Judge whether present node is chosen for the common recognition committee according to the difficulty value of the first random number and pre-configuration held Member;
In overtime duration, according to the threshold decision of common recognition committeeman's number and the common recognition committeeman's number being pre-configured Whether common recognition committeeman's number forms the complete common recognition committee, if it is not, the then not formed common recognition committee, does not divide note Account node and common recognition node.
7. according to the method described in claim 6, it is characterized in that, the not formed common recognition committee of upper block height When, difficulty value of the block chain network in the adjustment pre-configuration of current block height, comprising:
The difficulty value that adjustment is pre-configured in current block height, for thering are enough nodes to be chosen in overtime duration Know together committeeman;
The complete common recognition committee is formed in overtime duration.
8. a kind of common recognition method, which is characterized in that the common recognition method is by such as described in any item drawing methods of claim 1-7 Selected node executes, comprising:
Block is generated after carrying out two stages ballot operation using BFT common recognition algorithm.
9. according to the method described in claim 8, it is characterized in that, when the accounting nodes generate correct block when, it is described Accounting nodes will acquire the assets of certain number as reward.
10. according to the method described in claim 8, it is characterized in that, when the common recognition node is to the accounting nodes generation area Block makes two stages and correctly votes after operation, and the common recognition node will acquire the assets of certain number as reward.
11. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors Execute such as method of any of claims 1-10.
12. a kind of storage medium for being stored with computer program, which is characterized in that realize when the program is executed by processor as weighed Benefit requires method described in any one of 1-10.
CN201810806721.XA 2018-07-20 2018-07-20 Lottery drawing method, consensus method, device and storage medium Active CN108964879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810806721.XA CN108964879B (en) 2018-07-20 2018-07-20 Lottery drawing method, consensus method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810806721.XA CN108964879B (en) 2018-07-20 2018-07-20 Lottery drawing method, consensus method, device and storage medium

Publications (2)

Publication Number Publication Date
CN108964879A true CN108964879A (en) 2018-12-07
CN108964879B CN108964879B (en) 2021-04-13

Family

ID=64495870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810806721.XA Active CN108964879B (en) 2018-07-20 2018-07-20 Lottery drawing method, consensus method, device and storage medium

Country Status (1)

Country Link
CN (1) CN108964879B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508565A (en) * 2018-12-29 2019-03-22 莆田市烛火信息技术有限公司 A kind of account book bookkeeping methods of the shared block chain network for calculating power of multichain
CN110011974A (en) * 2019-03-07 2019-07-12 深圳市融汇通金科技有限公司 Bookkeeping methods, device, terminal and the computer readable storage medium of block chain
CN110210865A (en) * 2019-06-17 2019-09-06 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain
CN110222537A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Verification method and device applied to block chain link
CN110224813A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Go out block method and device based on block chain
CN110225044A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Verification method and device on block chain
CN110223070A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Verification method and device based on block chain meshed network
CN110223069A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain meshed network
CN110224840A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain
CN110225043A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Packaging method and device applied to block chain
CN110222538A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 It is related to the verification method and device of block chain
CN110224839A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Applied to the verification method and device on block chain
CN110233722A (en) * 2019-06-17 2019-09-13 北京艾摩瑞策科技有限公司 Go out block method and device on block chain
CN110247773A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 Packaging method and device on block chain
CN110247753A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 Go out block method and device based on block chain meshed network
CN110245949A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 It is related to the packaging method and device of block chain
CN110457006A (en) * 2019-07-22 2019-11-15 上海朝夕网络技术有限公司 The hardware based distributed multi-party random digit generation method of one kind and system
CN110545170A (en) * 2019-09-16 2019-12-06 福建中科中欣智能科技有限公司 Block chain consensus method, device and equipment based on password drawing
CN111402079A (en) * 2020-03-24 2020-07-10 中国南方电网有限责任公司 Method and device for acquiring power block, computer equipment and storage medium
CN117037988A (en) * 2023-08-22 2023-11-10 广州视景医疗软件有限公司 Electronic medical record storage method and device based on blockchain

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015031755A1 (en) * 2013-08-29 2015-03-05 Wandisco, Inc. Distributed file system using consensus nodes
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN106936589A (en) * 2017-04-21 2017-07-07 杭州秘猿科技有限公司 A kind of acentric the license parallel sharding method of chain and method of commerce

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015031755A1 (en) * 2013-08-29 2015-03-05 Wandisco, Inc. Distributed file system using consensus nodes
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN106936589A (en) * 2017-04-21 2017-07-07 杭州秘猿科技有限公司 A kind of acentric the license parallel sharding method of chain and method of commerce

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508565A (en) * 2018-12-29 2019-03-22 莆田市烛火信息技术有限公司 A kind of account book bookkeeping methods of the shared block chain network for calculating power of multichain
CN110011974A (en) * 2019-03-07 2019-07-12 深圳市融汇通金科技有限公司 Bookkeeping methods, device, terminal and the computer readable storage medium of block chain
CN110011974B (en) * 2019-03-07 2021-08-10 港融科技有限公司 Accounting method and device of block chain, terminal and computer-readable storage medium
CN110247753A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 Go out block method and device based on block chain meshed network
CN110247773B (en) * 2019-06-17 2020-12-25 北京瑞策科技有限公司 Packing method and device on block chain
CN110225044A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Verification method and device on block chain
CN110223070A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Verification method and device based on block chain meshed network
CN110223069A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain meshed network
CN110224840A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain
CN110225043A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Packaging method and device applied to block chain
CN110222538A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 It is related to the verification method and device of block chain
CN110224839A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Applied to the verification method and device on block chain
CN110233722A (en) * 2019-06-17 2019-09-13 北京艾摩瑞策科技有限公司 Go out block method and device on block chain
CN110247773A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 Packaging method and device on block chain
CN110222537A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Verification method and device applied to block chain link
CN110245949A (en) * 2019-06-17 2019-09-17 北京艾摩瑞策科技有限公司 It is related to the packaging method and device of block chain
CN110210865A (en) * 2019-06-17 2019-09-06 北京艾摩瑞策科技有限公司 Packaging method and device based on block chain
CN110225043B (en) * 2019-06-17 2021-04-02 北京瑞策科技有限公司 Packing method and device applied to block chain
CN110224840B (en) * 2019-06-17 2019-12-31 北京艾摩瑞策科技有限公司 Block chain based packaging method and device
CN110224813A (en) * 2019-06-17 2019-09-10 北京艾摩瑞策科技有限公司 Go out block method and device based on block chain
CN110222538B (en) * 2019-06-17 2020-09-08 北京瑞策科技有限公司 Verification method and device related to block chain
CN110223070B (en) * 2019-06-17 2020-12-11 北京瑞策科技有限公司 Verification method and device based on block chain node point network
CN110457006B (en) * 2019-07-22 2021-08-06 上海朝夕网络技术有限公司 Distributed multi-party random number generation method and system based on hardware
CN110457006A (en) * 2019-07-22 2019-11-15 上海朝夕网络技术有限公司 The hardware based distributed multi-party random digit generation method of one kind and system
CN110545170A (en) * 2019-09-16 2019-12-06 福建中科中欣智能科技有限公司 Block chain consensus method, device and equipment based on password drawing
CN111402079A (en) * 2020-03-24 2020-07-10 中国南方电网有限责任公司 Method and device for acquiring power block, computer equipment and storage medium
CN117037988A (en) * 2023-08-22 2023-11-10 广州视景医疗软件有限公司 Electronic medical record storage method and device based on blockchain
CN117037988B (en) * 2023-08-22 2024-05-17 广州视景医疗软件有限公司 Electronic medical record storage method and device based on blockchain

Also Published As

Publication number Publication date
CN108964879B (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN108964879A (en) A kind of drawing method, common recognition method, equipment and storage medium
CN109067516A (en) A kind of drawing method, common recognition method, equipment and storage medium
JP7292365B2 (en) Cryptographic methods and systems for secure extraction of data from blockchains
CN108683539B (en) Block chain network management method, block chain network management device, block chain network management medium and electronic equipment
US10790971B1 (en) Preventing misrepresentation of input data by participants in a secure multi-party computation
JP2020511809A (en) Validating the integrity of data stored on the consortium blockchain using the public sidechain
CN109271446A (en) A kind of parallel chain method of data synchronization, equipment and storage medium
CN109377225A (en) Transaction allocation method, common recognition method, equipment and storage medium
CN108984662A (en) A kind of block chain method of data synchronization
CN105338071A (en) Information pushing method and device
JP2020145681A (en) Verifying integrity of data stored in consortium blockchain using public sidechain
CN108418876B (en) Store proof of work method and system, motivational techniques and system
CN109242665B (en) Business rule multi-channel sharing method, device, equipment and storage medium
Fan et al. CONFIDENCE SETS FOR SOME PARTIALLY IDENTIFIED PARAMETERS.
CN109447639A (en) Privacy transactions balances scan method, equipment and storage medium
CN110149335A (en) Establish the method and apparatus of the home zone for the protection of block chain data-privacy
CN109995775A (en) Block chain identifying code application method, equipment and storage medium
CN109685448A (en) A kind of engineering project bidding Management method and system
CN108964878A (en) A kind of drawing method, common recognition method, equipment and storage medium
CN111444309A (en) System for learning graph
Hsueh et al. EPoW: Solving blockchain problems economically
CN109040142A (en) Private communication method, address configuration method, equipment and storage medium
CN116069767A (en) Equipment data cleaning method and device, computer equipment and medium
CN108564406A (en) A kind of method and apparatus of excitation push
US12058201B2 (en) Read access for computational results of a distributed network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant