CN110225043A - Packaging method and device applied to block chain - Google Patents
Packaging method and device applied to block chain Download PDFInfo
- Publication number
- CN110225043A CN110225043A CN201910519262.1A CN201910519262A CN110225043A CN 110225043 A CN110225043 A CN 110225043A CN 201910519262 A CN201910519262 A CN 201910519262A CN 110225043 A CN110225043 A CN 110225043A
- Authority
- CN
- China
- Prior art keywords
- block
- node
- block node
- digital signature
- cryptographic hash
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1441—Countermeasures against malicious traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3247—Cryptographic 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Storage Device Security (AREA)
Abstract
The present embodiments relate to a kind of packaging methods and device applied to block chain.Comprise determining that a first digital signature of block node out of specified quantity and described first goes out the first digital signature of block node, first digital signature of each block node out be signed to obtain by that should go out block node to the first cryptographic Hash, and first cryptographic Hash carries out the first Hash operation according to the first block and obtains;First digital signature of block node is gone out to the specified quantity and the first digital signature that described first goes out block node carries out the second Hash operation, obtains the second cryptographic Hash;According to second cryptographic Hash and preset first random rule, selects second to go out block node as the second block in the multiple block node out and go out block node.With this, can go out block node can specify next block node out, which has certain randomness and verifiability, can reduce block chain by the possibility of success attack, and improve the block efficiency out of block chain meshed network.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of packaging methods and device applied to block chain.
Background technique
Each of block chain network node is equivalent to store each computer of all block datas or service
Device terminal.The production of all new blocks, and the verifying and record keeping of transaction, and it is synchronous to be broadcasted to the whole network, all by node Lai
It completes.
Node is exactly the miner that we are commonly called as.The different of each miner calculate power, determine it can be assigned to how many record keeping
Power harvests how many rewards.
The block chain first generation knows together mechanism POW, is exactly proof of work common recognition mechanism, is commonly called as digging mine.It is new to produce
Block, must just carry out the operation of thousands of secondary Hash collisions.And these operations, many electric power can be consumed, the energy is caused
Waste, therefore also by dirty disease.Everybody is more allowed to worry, once most of power of calculating is monopolized, decentralization is just on the hazard.
The second generation knows together mechanism POS, is exactly that equity proves common recognition mechanism, it is to be determined according to quantity with cash in hand with the time
Who possesses more billing rights.The advantages of this common recognition mechanism is can be to avoid energy consumption, but the disadvantage is that right of speech is all held
Coin rich and influential family is controlled, and centralized feature is formed, and also the original intention with block chain decentralization runs in the opposite direction.
Third generation common recognition mechanism is exactly DPOS, maximum feature, is exactly to be added on the basis that POS equity proves
Electoral system.The super node for the final acquisition billing right being born by all votes by ballot of user with cash in hand is kept accounts, can
To significantly reduce the waste of the energy, still, on the super node all concentrated due to operation, to the calculation force request of super node
It is higher, and the efficiency of super node directly affects the efficiency of book keeping operation, this is resulted in, this kind of mode copes with the ability of large-scale data
Not strong, development is restricted.
Summary of the invention
Based on the above issues, the embodiment of the invention provides a kind of packaging methods and device applied to block chain.
In a first aspect, the embodiment of the invention provides a kind of packaging methods applied to block chain.The block chain node
Network include it is multiple go out block node, the method be suitable for first go out block node, described first go out block node be it is the multiple go out
Any one in block node, which comprises
Determine that a first digital signature of block node out of specified quantity and described first goes out the first digital signature of block node,
First digital signature of each block node out be signed to obtain by that should go out block node to the first cryptographic Hash, first Hash
Value carries out the first Hash operation according to the first block and obtains;
First digital signature of block node is gone out to the specified quantity and the first number label that described first goes out block node
Name carries out the second Hash operation, obtains the second cryptographic Hash;
According to second cryptographic Hash and preset first random rule, second is selected in the multiple block node out
Block node goes out block node as the second block out, and second block is next block of first block.
In some embodiments, first digital signature and described first for going out block node to the specified quantity goes out
First digital signature of block node carries out the second Hash operation, obtains the second cryptographic Hash, comprising:
A first digital signature of block node out of the specified quantity, described first are gone out to the first digital signature of block node
The second Hash operation is carried out with the first numerical value and obtains the second cryptographic Hash, and first numerical value is that 1-n or described first goes out block section
The sequence number of point, the n are arbitrary value.
In some embodiments, preset first random rule includes:
Second cryptographic Hash is converted into 10 systems, and takes the remainder of second value, the second value is according to
The quantity of multiple block nodes out determines;
Determine that the corresponding verifying node of the remainder goes out block node for described second.
In some embodiments, further includes:
The first block is generated, the first Hash operation is carried out to first block and obtains the first cryptographic Hash;
Go out block node to the specified quantity and sends first cryptographic Hash;
The specified quantity is received respectively goes out the first digital signature that block node is sent;
First cryptographic Hash is signed to obtain the first the first digital signature for going out block node.
In some embodiments, further includes:
According to preset second random rule, go out block node in the multiple selection specified quantity of block node out.
In some embodiments, further includes:
The third cryptographic Hash that third goes out the transmission of block node is received, the third cryptographic Hash is to carry out first to third block to breathe out
Uncommon operation obtains;
According to second random rule, verify whether itself is the section for needing to sign to the third cryptographic Hash
Point;
If it is, being signed to obtain the described first the second digital signature for going out block node to the third cryptographic Hash;
Go out block node to the third and sends the described first the second digital signature for going out block node.
In some embodiments, further includes:
First digital signature is sent to the multiple block node out.
In some embodiments, further includes:
It receives the 4th and goes out the third digital signature that block node is sent, second digital signature is directed to the 4th block;
The third digital signature of block node is gone out to the specified quantity and third number label that the described 4th goes out block node
Name carries out the second Hash operation, obtains the 4th cryptographic Hash;
According to the 4th cryptographic Hash and preset random rule, judge that described first goes out whether block node is described the
Five blocks go out block node, and the 5th block is next block of the 4th block;
If so, being packaged to the 5th block.
Second aspect provides a kind of packing apparatus applied to block chain, and the block chain meshed network includes multiple
Block node out, described device are suitable for first and go out block node, and described first goes out block node for appointing in the multiple block node out
Meaning one, described device include:
Determination unit goes out block node for determining that specified quantity goes out the first digital signature of block node and described first
First digital signature, the first digital signature of each block node out sign to the first cryptographic Hash by that should go out block node
It arrives, first cryptographic Hash carries out the first Hash operation according to the first block and obtains;
Hash units, the first digital signature and described first for going out block node to the specified quantity go out block node
The first digital signature carry out the second Hash operation, obtain the second cryptographic Hash;
Selecting unit is used for according to second cryptographic Hash and preset first random rule, in the multiple block out
It selects second to go out block node as the second block in node and goes out block node, second block is the next of first block
A block
In some embodiments, the hash units are specifically used for:
A first digital signature of block node out of the specified quantity, described first are gone out to the first digital signature of block node
The second Hash operation is carried out with the first numerical value and obtains the second cryptographic Hash, and first numerical value is that 1-n or described first goes out block section
The sequence number of point, the n are arbitrary value.
In some embodiments, preset first random rule includes:
Second cryptographic Hash is converted into 10 systems, and takes the remainder of second value, the second value is according to
The quantity of multiple block nodes out determines;
Determine that the corresponding verifying node of the remainder goes out block node for described second.
In some embodiments, further includes:
Generation unit carries out the first Hash operation to first block and obtains the first Hash for generating the first block
Value;
Transmission unit sends first cryptographic Hash for going out block node to the specified quantity;
Receiving unit goes out the first digital signature that block node is sent for receiving the specified quantity respectively;
Signature unit obtains the first the first digital signature for going out block node for being signed to first cryptographic Hash.
In some embodiments, further includes:
Selecting unit, for selecting specified quantity in the multiple block node out according to preset second random rule
Block node out.
In some embodiments, further includes:
Receiving unit, the third cryptographic Hash of block node transmission is gone out for receiving third, and the third cryptographic Hash is to third
Block carries out the first Hash operation and obtains;
Authentication unit, for according to second random rule, verifying whether itself is to need to the third cryptographic Hash
The node signed;
Signature unit, if so, going out block node for then being signed to obtain described first to the third cryptographic Hash
Second digital signature;
Transmission unit sends the described first the second digital signature for going out block node for going out block node to the third.
In some embodiments, further includes:
Transmission unit, for sending first digital signature to the multiple block node out.
In some embodiments, further includes:
Receiving unit goes out the third digital signature that block node is sent for receiving the 4th, and second digital signature is directed to
4th block;
Hash units, third digital signature and the described 4th for going out block node to the specified quantity go out block node
Third digital signature carry out the second Hash operation, obtain the 4th cryptographic Hash;
Judging unit, for judging that described first goes out block section according to the 4th cryptographic Hash and preset random rule
Point whether be the 5th block go out block node, the 5th block be the 4th block next block;
Packaged unit, if so, for being packaged to the 5th block.The third aspect, this specification embodiment mention
A kind of computer equipment has been supplied, including memory, processor and has stored the calculating that can be run on a memory and on a processor
Machine program, which is characterized in that the processor is realized any one in aforementioned first aspect or second aspect when executing described program
Aspect or various method and steps.
Fourth aspect provides a kind of computer readable storage medium, and meter is stored on the computer readable storage medium
Calculation machine program, the computer program realize either side or more in above-mentioned first aspect or second aspect when being executed by processor
Method described in aspect.
5th aspect, provides a kind of computer program product comprising instruction, when described instruction is run on computers
When, so that computer executes in above-mentioned first aspect or second aspect method described in either side or various aspects.
Through the embodiment of the present invention, out block node can specify it is next go out block node, the assignment procedure have it is certain with
Machine and verifiability can reduce block chain by the possibility of success attack, and improve the block out of block chain meshed network
Efficiency, and then book keeping operation efficiency is improved, allow block chain meshed network should the bigger service scenarios of data scale.
Detailed description of the invention
Fig. 1 applies the exemplary architecture of embodiment provided by the present application;
Fig. 2 is a kind of flow chart of the packaging method applied to block chain provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of the device of the release information based on block chain provided in an embodiment of the present invention;
Fig. 4 shows a kind of computer equipment structural schematic diagram provided by this specification embodiment.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of packaging methods and device applied to block chain.Fig. 1 is shown using this Shen
The exemplary architecture for the embodiment that please be provide.
As shown in Figure 1, the exemplary architecture may include multiple block chain nodes, multiple block chain node may include
Multiple block nodes 101 out and multiple block nodes 102 out.In one example, should go out block node can be to be selected by election mechanism
The quantity of the multiple super nodes selected, the super node can determine according to actual needs, and the quantity of the super node can be
Odd number, such as 21.In another example, multiple block node out can be alternate node, wherein the super node can
Think and chosen from alternate node, the quantity of the alternate node can also determine according to actual needs, for example, can be 100,
Wherein, alternate node can be selected according to preset first random rule, for example, calculating the highest specified quantity node of power
It can be used as alternate node.In another example, verifying node can also be all or part of section in addition to block node out
Point.Wherein, block chain node can be realized in a software form, can also realize in the form of hardware.When implemented in hardware, may be used
To be laptop, desktop computer and mobile terminal etc..
Block node is mainly used for based on common recognition mechanism out, the data in system in designated time period is produced block, also
It is primarily used for keeping accounts.Verifying node is mainly used for based on common recognition mechanism, and the block generated to block node out is verified, and passes through
The block of verifying can be recorded in block chain.It is can communicate between node to synchronize the data such as block chain.For example, section
It can be communicated based on D2D agreement between point.
In order to facilitate understanding of embodiments of the present invention, it is further explained below in conjunction with attached drawing with specific embodiment
Bright, embodiment does not constitute the restriction to the embodiment of the present invention.
Fig. 2 is a kind of flow chart of the packaging method applied to block chain provided by the invention.The block chain meshed network
Including the block chain meshed network in multiple block nodes, such as exemplary architecture shown in FIG. 1 out, this method is suitable for first and goes out
Block node, this first go out block node be it is multiple go out block nodes in any one.As shown in Fig. 2, this method specifically includes:
S210 determines that a first digital signature of block node out of specified quantity and described first goes out the first number of block node
Signature, it is each go out block node the first digital signature by that block node should be signed to obtain to the first cryptographic Hash out, described the
One cryptographic Hash carries out the first Hash operation according to the first block and obtains.
Wherein, each node in block chain meshed network is run based on common recognition mechanism.The common recognition mechanism is predefined,
The common recognition mechanism, which can wrap, includes block common recognition mechanism, verifying common recognition mechanism etc..
Block node out in block chain meshed network can determine that first goes out block node according to the common recognition mechanism of block out, this first
The data in system in designated time period can be generated block by block node out.The designated time period can according to actual needs really
It is fixed, such as can be 1 second, 10 seconds, 3 minutes or 10 minutes etc..The system can be corresponding whole for the block chain meshed network
A block catenary system.Wherein, block chain has multiple blocks to constitute, and each block can carry the mark of a block
The storage organization of chain type is formed.
Current block chain node is generating block it needs to be determined that next node for needing to generate block, the current block chain
Node is properly termed as first and goes out block node, which is properly termed as second and goes out block node, deserve
The block that preceding block chain link point generates is properly termed as the first block, and the block which generates can
To be known as the second block.
In order to increase the efficiency for going out the selection of block node of node, reduce the burden of system, next block node out is being selected
When, the first Hash operation can be carried out to the first block, obtain the first cryptographic Hash.Wherein, verifying common recognition mechanism may include pre-
First Hash operation of definition, which can determine according to actual needs, for example, the first Hash operation can be
SHA-256 etc..
Determine the first the first digital signature for going out block node and a block node out of specified quantity.
Wherein, the first the first digital signature for going out block node can determine as follows:
A: generating the first block, carries out the first Hash operation to first block and obtains the first cryptographic Hash.
B: the first cryptographic Hash is signed to obtain the first the first digital signature for going out block node.
The first digital signature that specified quantity goes out block node can determine as follows:
A: go out block node to specified quantity and send the first cryptographic Hash;
B: specified quantity is received respectively and goes out the first digital signature that block node is sent.
Wherein, each block chain node may include at least one secret key pair, and each secret key pair includes a public key and one
A private key, the private key are stored in local, which can be sent to other block chain nodes.
Block node can sign to the cryptographic Hash after determining the first cryptographic Hash out, obtain this go out block node
One digital signature.First digital signature can be used the private key for block node and sign, and use the corresponding public affairs of the private key
Key can verify first digital signature.
S220, to specified quantity go out the first digital signature of block node and first go out the first digital signature of block node into
The second Hash operation of row, obtains the second cryptographic Hash.
When determining next block node out, the first digital signature and first that can go out block node to specified quantity goes out
First digital signature of block node carries out the second Hash operation, obtains the second cryptographic Hash.Wherein, block common recognition mechanism may include out
Predefined second Hash operation, second Hash operation can determine according to actual needs, for example, the second Hash operation can be with
For SHA-256 etc..Wherein, the first Hash operation and the second Hash operation can be able to be different Kazakhstan for identical Hash operation
Uncommon operation.
S230 is selected in the multiple block node out according to second cryptographic Hash and preset first random rule
The second block node out for going out block node as the second block is selected, second block is next block of first block.
When determining next block node out, can be selected according to the second cryptographic Hash.Wherein, verifying common recognition mechanism can
To include preset first random rule of selection gist, preset first random rule is with certain randomness and can test
Card property.
In one example, which may include:
Second cryptographic Hash is converted into 10 systems, and takes the remainder of second value;
Determine that the corresponding verifying node of the remainder goes out block node for second.
Wherein, which can determine according to the quantity of verifying node.For example, the quantity of verifying node can be
100, which can be 100.
First go out block node the first digital signature can be sent to second go out block node, so as to second go out block node continue
Block out.For example, the first digital signature can be sent to multiple block nodes out by way of broadcast.
Block node the first block of transmission and first can also be gone out to second and go out the public key of block node.Wherein, the public key is sent
Form may include a variety of.In one example, can be generated according to the public key this first go out block address of node, the address
It can be used as the transaction that first goes out block node and produce or be transferred to address, this second goes out block node and first can go out block section according to this
Point address determine this first go out block node public key.In another example, the public key can carry in the first block into
Row is sent.
Second goes out block node after receiving the first block, can verify the first identity for going out block node first, this first
The first digital signature that the public key that the identity of block node can go out block node by first out goes out block node to first is verified
It realizes.After being verified, second go out block node can the verifying identity to itself verify, which can be with
It is verified based on preset random rule, whether includes its own to verify the block node out of the second block.Above-mentioned two
After verification process all passes through, second, which goes out block node, is again packaged the second block, and the second block of packing is carried out the whole network
It is synchronous.
In some embodiments, above-mentioned steps S220 can be specifically achieved by the steps of:
First digital signature and the first numerical value are subjected to the second Hash operation and obtain the second cryptographic Hash.
Wherein, the first numerical value is the predefined fixed values such as 1-n, which is arbitrary value.
First numerical value can also for first go out block node sequence number, or according to first go out block node sequence number it is true
Fixed numerical value.By first numerical value, the randomness of block node selection can be further realized out.
In some embodiments, can also include the following steps: according to preset second random rule, in multiple block sections out
Point selection specified quantity goes out block node.
Verifying common recognition mechanism may include preset second random rule of selection gist, preset second random rule
With certain randomness and verifiability.
In one example, which may include:
First cryptographic Hash is converted into 10 systems, and takes the remainder of third value;
Determine that sequence number is less than the block node out for going out block node for specified quantity of the remainder.
Wherein, which can determine according to the quantity of block node out.For example, the quantity of block node can be out
21, which can be 21.
Through the embodiment of the present invention, it is also that can be randomly selected that specified quantity, which goes out block node, is further ensured that with this
Randomness and verifiability.
Based on the above embodiment, in some embodiments, this method can also include the following steps:
1) the third cryptographic Hash that third goes out the transmission of block node is received, which is to carry out first to third block to breathe out
Uncommon operation obtains;The third block can go out the newly-generated block of block node for second.
2) according to second random rule, verify whether itself is the section for needing to sign to the third cryptographic Hash
Point;
3) if it is, being signed to obtain the described first the second number label for going out block node to the third cryptographic Hash
Name;
4) Xiang Suoshu third go out block node send described first go out block node the second digital signature.
5) if it is not, then abandoning the third cryptographic Hash.
In some embodiments, can also include the following steps:
1) it receives the 4th and goes out the third digital signature that block node is sent, the third digital signature is directed to the 4th block;
2) the third digital signature of block node is gone out to the specified quantity and third number that the described 4th goes out block node
Signature carries out the second Hash operation, obtains the 4th cryptographic Hash;
3) according to the 4th cryptographic Hash and preset random rule, judge that described first goes out whether block node is described
5th block goes out block node, and the 5th block is next block of the 4th block;
4) if so, being packaged to the 5th block.
5) if it is not, then terminating.
In step 1), it can receive the 4th and go out the 4th block, public key and third digital signature that block node is sent.
Wherein, the 4th block can go out the newly-generated block of block node for the 4th.The third digital signature can be according to this
4th block determines.It specifically may refer to the acquisition process of aforementioned first digital signature, details are not described herein again.
First, which goes out block node, can also determine that the 4th public key for going out block node, the public key can go out block node according to the 4th
Address determine, also available public key of the carrying in the 4th block of band.
, can be according to the 4th cryptographic Hash and preset random rule in step 3), determine the 5th block goes out block section
The serial number of point;Whether the serial number for going out block node for judging the 5th block is the first serial number for going out block node.
In some embodiments, the above method further include:
1) according to preset second random rule, verifying specified quantity, whether block node is correct out;
It is available according to the multiple of the second random rule determination when whether block node is correct out for verifying specified quantity
The public key of block node out, and verified using the first digital signature that each public key goes out block node to specified quantity.
If 2) correct, according to second cryptographic Hash and preset first random rule, determine that second goes out block section
The serial number of point.
If 3) incorrect, terminate process.
Through the embodiment of the present invention, can go out block node can specify next block node out, which has certain
Randomness and verifiability, block chain can be reduced by the possibility of success attack, and improve block chain meshed network
Block efficiency out, and then book keeping operation efficiency is improved, allow block chain meshed network should the bigger service scenarios of data scale.
Fig. 3 is a kind of packing apparatus structural schematic diagram applied to block chain provided in an embodiment of the present invention.The block chain
Meshed network includes the block chain meshed network in multiple block nodes, such as exemplary architecture shown in FIG. 1 out, and described device is suitable
For currently going out block node, the current block node out is any one in the multiple block node out, and described device includes:
Determination unit 301 goes out block section for determining that specified quantity goes out the first digital signature of block node and described first
First digital signature of point, the first digital signature of each block node out sign to the first cryptographic Hash by that should go out block node
It obtains, first cryptographic Hash carries out the first Hash operation according to the first block and obtains;
Hash units 302, the first digital signature and described first for going out block node to the specified quantity go out block
First digital signature of node carries out the second Hash operation, obtains the second cryptographic Hash;
Selecting unit 303, for according to second cryptographic Hash and preset first random rule, it is the multiple go out
It selects second to go out block node as the second block in block node and goes out block node, second block is under first block
One block
In some embodiments, the hash units are specifically used for:
A first digital signature of block node out of the specified quantity, described first are gone out to the first digital signature of block node
The second Hash operation is carried out with the first numerical value and obtains the second cryptographic Hash, and first numerical value is that 1-n or described first goes out block section
The sequence number of point, the n are arbitrary value.
In some embodiments, preset first random rule includes:
Second cryptographic Hash is converted into 10 systems, and takes the remainder of second value, the second value is according to
The quantity of multiple block nodes out determines;
Determine that the corresponding verifying node of the remainder goes out block node for described second.
In some embodiments, further includes:
Generation unit carries out the first Hash operation to first block and obtains the first Hash for generating the first block
Value;
Transmission unit sends first cryptographic Hash for going out block node to the specified quantity;
Receiving unit goes out the first digital signature that block node is sent for receiving the specified quantity respectively;
Signature unit obtains the first the first digital signature for going out block node for being signed to first cryptographic Hash.
In some embodiments, further includes:
Selecting unit, for selecting specified quantity in the multiple block node out according to preset second random rule
Block node out.
In some embodiments, further includes:
Receiving unit, the third cryptographic Hash of block node transmission is gone out for receiving third, and the third cryptographic Hash is to third
Block carries out the first Hash operation and obtains;
Authentication unit, for according to second random rule, verifying whether itself is to need to the third cryptographic Hash
The node signed;
Signature unit, if so, going out block node for then being signed to obtain described first to the third cryptographic Hash
Second digital signature;
Transmission unit sends the described first the second digital signature for going out block node for going out block node to the third.
In some embodiments, further includes:
Transmission unit, for sending first digital signature to the multiple block node out.
In some embodiments, further includes:
Receiving unit goes out the third digital signature that block node is sent for receiving the 4th, and second digital signature is directed to
4th block;
Hash units, third digital signature and the described 4th for going out block node to the specified quantity go out block node
Third digital signature carry out the second Hash operation, obtain the 4th cryptographic Hash;
Judging unit, for judging that described first goes out block section according to the 4th cryptographic Hash and preset random rule
Point whether be the 5th block go out block node, the 5th block be the 4th block next block;
Packaged unit, if so, for being packaged to the 5th block.
It is appreciated that the packing apparatus applied to block chain of the present embodiment is corresponding with embodiment of the method shown in Fig. 2,
Therefore, the device of the present embodiment is equally applicable to above with respect to the description of embodiment of the method shown in Fig. 2, details are not described herein.
Fig. 4 shows a kind of computer equipment structural schematic diagram, the computer equipment provided by this specification embodiment
It may include: processor 410, memory 420, input/output interface 430, communication interface 440 and bus 450.Wherein processor
440, memory 420, input/output interface 430 and communication interface 440 by bus 450 realize between inside equipment
Communication connection.
Processor 410 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 420 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 420 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 420, and execution is called by processor 410.
Input/output interface 430 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 440 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 450 includes an access, in various components (such as the processor 410, memory 420, input/output of equipment
Interface 430 and communication interface 440) between transmit information.
It should be noted that although above equipment illustrates only processor 410, memory 420, input/output interface
430, communication interface 440 and bus 450, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
Professional should further appreciate that, described in conjunction with the examples disclosed in the embodiments of the present disclosure
Unit and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, hard in order to clearly demonstrate
The interchangeability of part and software generally describes each exemplary composition and step according to function in the above description.
These functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.
Professional technician can use different methods to achieve the described function each specific application, but this realization
It should not be considered as beyond the scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can be executed with hardware, processor
The combination of software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only memory
(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
In any other form of storage medium well known to interior.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all any modification, equivalent substitution, improvement and etc. within the scope of the present invention, done should be included in this hair
Within bright protection scope.
Claims (10)
1. a kind of packaging method applied to block chain, which is characterized in that block chain meshed network includes multiple block nodes out, institute
State method suitable for first go out block node, described first go out block node be it is the multiple go out block node in any one, it is described
Method includes:
Determine that a first digital signature of block node out of specified quantity and described first goes out the first digital signature of block node, each
The first digital signature of block node is signed to obtain by that should go out block node to the first cryptographic Hash out, the first cryptographic Hash root
The first Hash operation is carried out according to the first block to obtain;
To the specified quantity go out the first digital signature of block node and described first go out the first digital signature of block node into
The second Hash operation of row, obtains the second cryptographic Hash;
According to second cryptographic Hash and preset first random rule, selection second goes out block in the multiple block node out
Node goes out block node as the second block, and second block is next block of first block.
2. the method according to claim 1, wherein first number for going out block node to the specified quantity
The first digital signature that word signature goes out block node with described first carries out the second Hash operation, obtains the second cryptographic Hash, comprising:
The specified quantity is gone out into the first digital signature of block node, described first goes out the first digital signature and the of block node
One numerical value carries out the second Hash operation and obtains the second cryptographic Hash, and first numerical value is that 1-n or described first goes out block node
Sequence number, the n are arbitrary value.
3. the method according to claim 1, wherein preset first random rule includes:
Second cryptographic Hash is converted into 10 systems, and takes the remainder of second value, the second value is according to the multiple
The quantity of block node determines out;
Determine that the corresponding verifying node of the remainder goes out block node for described second.
4. the method according to claim 1, wherein further include:
The first block is generated, the first Hash operation is carried out to first block and obtains the first cryptographic Hash;
Go out block node to the specified quantity and sends first cryptographic Hash;
The specified quantity is received respectively goes out the first digital signature that block node is sent;
First cryptographic Hash is signed to obtain the first the first digital signature for going out block node.
5. according to the method described in claim 4, it is characterized by further comprising:
According to preset second random rule, go out block node in the multiple selection specified quantity of block node out.
6. according to the method described in claim 5, it is characterized by further comprising:
The third cryptographic Hash that third goes out the transmission of block node is received, the third cryptographic Hash is to carry out the first Hash fortune to third block
It obtains;
According to second random rule, verify whether itself is the node for needing to sign to the third cryptographic Hash;
If it is, being signed to obtain the described first the second digital signature for going out block node to the third cryptographic Hash;
Go out block node to the third and sends the described first the second digital signature for going out block node.
7. the method according to claim 1, wherein further include:
First digital signature is sent to the multiple block node out.
8. the method according to the description of claim 7 is characterized in that further include:
It receives the 4th and goes out the third digital signature that block node is sent, the third digital signature is directed to the 4th block;
To the specified quantity go out the third digital signature of block node and the described 4th go out the third digital signature of block node into
The second Hash operation of row, obtains the 4th cryptographic Hash;
According to the 4th cryptographic Hash and preset random rule, judge that described first goes out whether block node is the 5th block
Block node out, the 5th block are next block of the 4th block;
If so, being packaged to the 5th block.
9. a kind of packing apparatus applied to block chain, which is characterized in that the block chain meshed network includes multiple block sections out
Point, described device go out block node for first, and described first goes out block node for any one in the multiple block node out, institute
Stating device includes:
Determination unit goes out the first of block node for determining that specified quantity goes out the first digital signature of block node and described first
Digital signature, the first digital signature of each block node out be signed to obtain by that should go out block node to the first cryptographic Hash, institute
The first cryptographic Hash is stated to be obtained according to the first Hash operation of the first block progress;
Hash units, the first digital signature and described first for going out block node to the specified quantity go out the of block node
One digital signature carries out the second Hash operation, obtains the second cryptographic Hash;
Selecting unit is used for according to second cryptographic Hash and preset first random rule, in the multiple block node out
The middle block node out for selecting second to go out block node as the second block, second block are next area of first block
Block.
10. a kind of machine readable storage medium, which is characterized in that the machine readable storage medium is stored with the executable finger of machine
It enables, for the machine-executable instruction when being called and being executed by processor, the machine-executable instruction promotes the processor
Realize the described in any item methods of claim 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910519262.1A CN110225043B (en) | 2019-06-17 | 2019-06-17 | Packing method and device applied to block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910519262.1A CN110225043B (en) | 2019-06-17 | 2019-06-17 | Packing method and device applied to block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110225043A true CN110225043A (en) | 2019-09-10 |
CN110225043B CN110225043B (en) | 2021-04-02 |
Family
ID=67817210
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910519262.1A Active CN110225043B (en) | 2019-06-17 | 2019-06-17 | Packing method and device applied to block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110225043B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170046792A1 (en) * | 2015-08-13 | 2017-02-16 | The Toronto-Dominion Bank | Systems and method for tracking subdivided ownership of connected devices using block-chain ledgers |
CN107005574A (en) * | 2016-12-23 | 2017-08-01 | 深圳前海达闼云端智能科技有限公司 | Block generation method and device and block chain network |
CN107078910A (en) * | 2016-12-23 | 2017-08-18 | 深圳前海达闼云端智能科技有限公司 | Generate method, device, node, signature device and the system of block chain block |
CN108596621A (en) * | 2018-04-28 | 2018-09-28 | 深圳市优学链科技有限公司 | Block chain accounting nodes generation method, device, computer equipment and storage medium |
CN108964879A (en) * | 2018-07-20 | 2018-12-07 | 杭州复杂美科技有限公司 | A kind of drawing method, common recognition method, equipment and storage medium |
CN109785130A (en) * | 2018-12-17 | 2019-05-21 | 金蝶软件(中国)有限公司 | Block chain is known together method, apparatus, computer equipment and storage medium at random |
US20190179801A1 (en) * | 2016-08-31 | 2019-06-13 | Industry-University Cooperation Foundation Sogang University | File management/search system and file management/search method based on block chain |
-
2019
- 2019-06-17 CN CN201910519262.1A patent/CN110225043B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170046792A1 (en) * | 2015-08-13 | 2017-02-16 | The Toronto-Dominion Bank | Systems and method for tracking subdivided ownership of connected devices using block-chain ledgers |
US20190179801A1 (en) * | 2016-08-31 | 2019-06-13 | Industry-University Cooperation Foundation Sogang University | File management/search system and file management/search method based on block chain |
CN107005574A (en) * | 2016-12-23 | 2017-08-01 | 深圳前海达闼云端智能科技有限公司 | Block generation method and device and block chain network |
CN107078910A (en) * | 2016-12-23 | 2017-08-18 | 深圳前海达闼云端智能科技有限公司 | Generate method, device, node, signature device and the system of block chain block |
CN108596621A (en) * | 2018-04-28 | 2018-09-28 | 深圳市优学链科技有限公司 | Block chain accounting nodes generation method, device, computer equipment and storage medium |
CN108964879A (en) * | 2018-07-20 | 2018-12-07 | 杭州复杂美科技有限公司 | A kind of drawing method, common recognition method, equipment and storage medium |
CN109785130A (en) * | 2018-12-17 | 2019-05-21 | 金蝶软件(中国)有限公司 | Block chain is known together method, apparatus, computer equipment and storage medium at random |
Also Published As
Publication number | Publication date |
---|---|
CN110225043B (en) | 2021-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110210865A (en) | Packaging method and device based on block chain | |
CN110247753A (en) | Go out block method and device based on block chain meshed network | |
CN110222537A (en) | Verification method and device applied to block chain link | |
CN110223070A (en) | Verification method and device based on block chain meshed network | |
CN110233737A (en) | Common recognition method, apparatus, computer equipment and storage medium based on DPoS | |
CN108848148A (en) | Transaction Information confirmation method and device based on block chain | |
CN110225044A (en) | Verification method and device on block chain | |
CN109857810A (en) | Data synchronization unit and method based on block chain | |
CN110233722A (en) | Go out block method and device on block chain | |
CN110222538A (en) | It is related to the verification method and device of block chain | |
CN110298757A (en) | It is related to the common recognition method and device thereof of DPoS | |
CN109918445A (en) | Digging mine device and method based on block chain | |
CN113536240A (en) | Method and device for using admission ticket by combining NFT (network File transfer) | |
CN110224813A (en) | Go out block method and device based on block chain | |
CN110224839A (en) | Applied to the verification method and device on block chain | |
CN110223069A (en) | Packaging method and device based on block chain meshed network | |
CN110225043A (en) | Packaging method and device applied to block chain | |
CN110445620A (en) | The marriage certificate for being related to block chain deposits card method and device thereof | |
CN111831669A (en) | Method and device for storing internet voting data according to block chain | |
CN110245949A (en) | It is related to the packaging method and device of block chain | |
CN110247773A (en) | Packaging method and device on block chain | |
CN110245950A (en) | Be related to block chain goes out block method and device | |
CN110224840A (en) | Packaging method and device based on block chain | |
CN111882325A (en) | Anti-counterfeiting method and device for electronic product, storage medium and electronic equipment | |
CN111835815A (en) | Synchronous storage method and device for internet self-media data on block chain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 100085 No. 108, 1st Floor, No. 9, Shangdi Jiujie, Haidian District, Beijing Applicant after: Beijing ruice Technology Co., Ltd Address before: 100085 No. 108, 1st Floor, No. 9, Shangdi Jiujie, Haidian District, Beijing Applicant before: BEIJING AIMO RUICE TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |