CN110223070B - Verification method and device based on block chain node point network - Google Patents

Verification method and device based on block chain node point network Download PDF

Info

Publication number
CN110223070B
CN110223070B CN201910519299.4A CN201910519299A CN110223070B CN 110223070 B CN110223070 B CN 110223070B CN 201910519299 A CN201910519299 A CN 201910519299A CN 110223070 B CN110223070 B CN 110223070B
Authority
CN
China
Prior art keywords
block
hash value
hash
node
verification
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.)
Active
Application number
CN201910519299.4A
Other languages
Chinese (zh)
Other versions
CN110223070A (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.)
Beijing Ruice Technology Co Ltd
Original Assignee
Beijing Ruice 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 Beijing Ruice Technology Co Ltd filed Critical Beijing Ruice Technology Co Ltd
Priority to CN201910519299.4A priority Critical patent/CN110223070B/en
Publication of CN110223070A publication Critical patent/CN110223070A/en
Application granted granted Critical
Publication of CN110223070B publication Critical patent/CN110223070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Storage Device Security (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to a verification method and a verification device based on a block link point network. The method comprises the following steps: generating a block to be verified, and performing a first hash operation according to the block to be verified to obtain a first hash value; determining a first digital signature; determining second hash values, and performing second hash operation on each second hash value according to the next block to obtain second hash values; performing a third hash operation on the first digital signature and the second hash value to obtain a third hash value; selecting a target verification node from the plurality of verification nodes according to the third hash value and a preset random rule; and sending the block to be verified to the target verification node. Therefore, partial nodes except the block nodes can be selected to verify the block, the selection of the partial nodes has certain randomness and verifiability, the possibility that the block chain is attacked successfully can be reduced, the verification efficiency of the block chain node network is improved, and the accounting efficiency is further improved.

Description

Verification method and device based on block chain node point network
Technical Field
The invention relates to the technical field of computers, in particular to a verification method and a verification device based on a block link point network.
Background
Each node in the blockchain network is equivalent to each computer or server terminal storing all the block data. The production of all new blocks, as well as the verification and accounting of transactions and broadcasting them to the network-wide sync, is done by the nodes.
The node is the miner which we commonly call. The different power of each miner determines how much billing rights it can allocate and how much rewards it can earn.
The first generation of consensus mechanism for block chains is called POW, which is a workload proving consensus mechanism and is commonly called mining. Thousands of hash hits must be performed to create a new block. These operations consume much power and cause energy waste, so they are also affected by the scale. Even more feared is that once most of the computing power is monopolized, decentralization is threatened.
The second generation of consensus mechanism called POS is the rights and interests identification mechanism, which decides who has more accounting rights according to the amount of money held and the time. The recognition mechanism has the advantages of avoiding energy consumption, but has the disadvantages that the speaking right is controlled by the large user holding the money, the characteristic of central collection right is formed, and the characteristic runs counter to the original intention of decentralization of the block chain.
The third generation consensus mechanism is DPOS, and the biggest characteristic of the mechanism is that an election system is added on the basis of POS right certificate. The super nodes which finally obtain the billing right and are produced by voting of all the money-holding users can perform billing, so that the energy waste can be greatly reduced, but the calculation requirements on the super nodes are high due to the centralized calculation on the super nodes, and the efficiency of the super nodes directly influences the billing efficiency, so that the mode has weak capacity of dealing with large-scale data, and the development is restricted.
Disclosure of Invention
Based on the above problem, embodiments of the present invention provide a verification method and apparatus based on a blockchain node network.
In a first aspect, an embodiment of the present invention provides a verification method based on a block link point network. The block-link node network comprises a plurality of block-out nodes and a plurality of verification nodes, the method is applied to a current block-out node, the current block-out node is any one of the plurality of block-out nodes, and the method comprises the following steps:
generating a block to be verified, and performing a first hash operation according to the block to be verified to obtain a first hash value;
determining a first digital signature, wherein the first digital signature is obtained by signing the first hash value;
determining second hash values, and performing second hash operation on each second hash value according to the next block to obtain second hash values;
performing a third hash operation on the first digital signature and the second hash value to obtain a third hash value;
selecting a target verification node from the plurality of verification nodes according to the third hash value and a preset random rule;
and sending the block to be verified to the target verification node so that the target verification node verifies the block to be verified.
In some embodiments, determining the second hash value comprises:
determining at least one verified block before a specified interval of the current block, wherein the specified interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
In some embodiments, the performing a third hash operation on the first digital signature and the second hash value to obtain a third hash value includes:
and performing second hash operation on the first digital signature, the second hash value and a first numerical value to obtain a second hash value and a third hash value, wherein the first numerical value is 1-n or the serial number of the current block node, and n is an arbitrary value.
In a second aspect, a method for block link point network based authentication is provided. The block-link node network comprises a plurality of block-out nodes and a plurality of verification nodes, the method is applied to a current verification node, the current verification node is any one of the plurality of verification nodes, and the method comprises the following steps:
receiving a block to be verified, a public key and a first digital signature which are sent by a current block node;
verifying the first digital signature by using the public key to obtain a first hash value;
performing first hash operation on the block to be verified to obtain a fourth hash value;
if the first hash value is the same as the fourth hash value, performing third hash operation on the first digital signature and the second hash value to obtain third hash values, wherein each second hash value performs second hash operation according to the next block to obtain second hash values;
determining a serial number of a target verification node according to the third hash value and a preset random rule;
and if the serial number of the target verification node is the serial number of the current verification node, verifying the block to be verified, and broadcasting a verification result in the block link point network.
In some embodiments, further comprising:
determining at least one verified block before a specified interval of the current block, wherein the specified interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
In a third aspect, a block link point network-based authentication device is provided. The block-link node network comprises a plurality of block-out nodes and a plurality of verification nodes, the device is suitable for a current block-out node, the current block-out node is any one of the plurality of block-out nodes, and the device comprises:
the first hash unit is used for generating a block to be verified and carrying out first hash operation according to the block to be verified to obtain a first hash value;
a first determining unit, configured to determine a first digital signature, where the first digital signature is obtained by signing the first hash value;
a second determining unit, configured to determine second hash values, where each second hash value performs a second hash operation according to the next block to obtain a second hash value;
the second hash unit is used for carrying out third hash operation on the first digital signature and the second hash value to obtain a third hash value;
a selecting unit, configured to select a target verification node from the multiple verification nodes according to the third hash value and a preset random rule;
and the sending unit is used for sending the block to be verified to the target verification node so that the target verification node verifies the block to be verified. .
In some embodiments, the second determining unit is specifically configured to:
determining at least one verified block before a specified interval of the current block, wherein the specified interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
In some embodiments, the second hash unit is specifically configured to:
and performing second hash operation on the first digital signature, the second hash value and a first numerical value to obtain a second hash value and a third hash value, wherein the first numerical value is 1-n or the serial number of the current block node, and n is an arbitrary value.
In a fourth aspect, a validation apparatus based on a block-link point network is provided. The block link node network comprises a plurality of block outlet nodes and a plurality of verification nodes, the device is suitable for a current verification node, the current verification node is any one of the plurality of verification nodes, and the device comprises:
the receiving unit is used for receiving the block to be verified, the public key and the first digital signature which are sent by the current block node;
the first verification unit is used for verifying the first digital signature by using the current public key to obtain a first hash value;
the first hash unit is used for carrying out first hash operation on the block to be verified to obtain a fourth hash value;
the second hash unit is used for performing third hash operation on the first digital signature and the second hash value to obtain a third hash value if the first hash value is the same as the fourth hash value, wherein each second hash value performs second hash operation according to the next block to obtain a second hash value;
the determining unit is used for determining the serial number of the target verification node according to the third hash value and a preset random rule;
and the second verification unit is used for verifying the block to be verified and broadcasting a verification result in the block link point network if the serial number of the target verification node is the serial number of the current verification node.
In some embodiments, a third hash unit is further included to:
determining at least one verified block before a specified interval of the current block, wherein the specified interval can be determined according to the number of the plurality of out-of-block nodes;
and the third hash unit is used for respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
In some embodiments, the preset random rule comprises:
converting the second hash value into a 10-system, and taking the remainder of the number of the verification nodes;
and determining the verification node corresponding to the remainder as the target verification node.
In some embodiments, any two of the first, second and third hash operations are the same or different hash operations.
In a fifth aspect, the present specification provides a computer device, including a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method steps of any one or more of the first or second aspects when executing the program.
A sixth aspect provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any one or more of the first or second aspects described above.
In a seventh aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one or more of the first or second aspects described above.
By the embodiment of the invention, partial nodes except the block nodes can be selected to verify the block, the selection of the partial nodes has certain randomness and verifiability, the possibility of successfully attacking the block chain can be reduced, the verification efficiency of the block chain node network is improved, the accounting efficiency is further improved, and the block chain node network can be applied to a service scene with larger data scale.
Drawings
FIG. 1 illustrates an exemplary architecture for applying embodiments provided herein;
fig. 2 is a flowchart of a verification method based on a block link point network according to an embodiment of the present invention;
fig. 3 is a flowchart of another verification method based on a block link point network according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for publishing information based on a block chain according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for publishing information based on a block chain according to an embodiment of the present invention;
fig. 6 shows a schematic structural diagram of a computer device provided in an embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a verification method and a verification device based on a block chain node network. Fig. 1 shows an exemplary architecture to which embodiments provided herein apply.
As shown in fig. 1, the exemplary architecture may include a plurality of blockchain nodes, which may include a plurality of out-of-block nodes 101 and a plurality of verification nodes 102. In one example, the block node may be a plurality of super nodes selected by an election mechanism, the number of the super nodes may be determined according to actual needs, and the number of the super nodes may be an odd number, for example, 21. In another example, the plurality of verification nodes may be candidate nodes, wherein the super node may be selected from the candidate nodes, the number of the candidate nodes may also be determined according to actual needs, for example, may be 100, wherein the candidate nodes may be selected according to a preset random rule, for example, a specified number of nodes with the highest computational power may be used as the candidate nodes. In another example, the verification node may also be all or part of a node other than the out-of-block node. The block link point may be implemented in a software form or a hardware form. When implemented as hardware, it may be a notebook computer, a desktop computer, a mobile terminal, and the like.
The block-out node is mainly used for producing the data blocks in a specified time period in the system based on a consensus mechanism, namely mainly used for accounting. The verification node is mainly used for verifying the blocks generated by the block generation node based on a consensus mechanism, and the verified blocks are recorded in the block chain. The nodes may communicate with each other to synchronize data such as blockchains. For example, the nodes may communicate based on the D2D protocol.
For the purpose of facilitating understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 2 is a flowchart of a verification method based on a block link point network according to the present invention. The block-linked node network includes a plurality of out-block nodes and a plurality of verification nodes, such as the block-linked node network in the exemplary architecture shown in fig. 1, and the method is applied to a current out-block node, which is any one of the plurality of out-block nodes. As shown in fig. 2, the method specifically includes:
s210, generating a block to be verified, and performing a first hash operation according to the block to be verified to obtain a first hash value.
Wherein each node in the block-link node network operates based on a consensus mechanism. The consensus mechanism is predefined and may include a block consensus mechanism, a verification consensus mechanism, and the like.
The block output node in the block link node network may determine a current block output node according to a block output consensus mechanism, and the current block output node may generate a block from data in a specified time period in the system. The specified time period can be determined according to actual needs, and can be 1 second, 10 seconds, 10 minutes, or the like, for example. The system may be the entire blockchain system corresponding to the blockchain link point network. The block chain is composed of a plurality of blocks, and each block can carry a storage structure with the identification of the last block forming a chain.
When a previous blockchain node needs to be verified to uplink a new block, the new block may be referred to as a to-be-verified block.
In order to increase the verification efficiency of the nodes and reduce the burden of the system, a certain number of verification nodes can be selected for verification.
When the verification node is selected, a first hash operation may be performed on the block to be verified to obtain a first hash value. The verification consensus mechanism may include a predefined first hash operation, which may be determined according to actual needs, for example, the first hash operation may be SHA-256 or the like.
S220, determining a first digital signature. The first digital signature is obtained by signing the first hash value.
Each blockchain node may include at least one key pair, each key pair including a public key and a private key, the private key being stored locally, the public key being transmittable to other blockchain nodes.
After determining the first hash value, the current blockchain node may sign the hash value to obtain a first digital signature. The signature may be signed using a private key, and the signature may be verified using a corresponding public key of the private key.
And S230, determining second hash values, and performing second hash operation on each second hash value according to the next block to obtain second hash values.
In some embodiments, this step may be achieved by:
a: at least one verified block prior to the current block specified interval is determined. The designated interval may be determined according to the number of the plurality of out-of-block nodes;
b: and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
In one example, a second hash value may be determined, the second hash value may be determined according to the nth block before the block to be verified, n may be an integer greater than 0, and the n blocks may be the specified interval in the foregoing step a. For example, the value of n may be the number of the multiple out-of-block nodes, for example, the number of out-of-block nodes is 21, and n may be 21.
In another example, a plurality of second hash values may be determined, where the plurality of second hash values may be determined according to a plurality of consecutive blocks starting from the nth block before the block to be verified, where a value of the n may be a number of a plurality of out-block nodes, and a number of the consecutive blocks may be a preset value, where the preset value may be determined according to actual needs, for example, 5.
In another example, a plurality of second hash values may be determined, where the plurality of second hash values may be determined according to a plurality of blocks every n blocks before the block to be verified, and a value of the interval n may be determined according to a number of a plurality of out-of-block nodes, for example, the number of out-of-block nodes is 21, and n may be 20.
The verification consensus mechanism may include a predefined second hash operation, which may be determined according to actual needs, for example, the second hash operation may be SHA-256 or the like.
And S240, performing third hash operation on the first digital signature and the second hash value to obtain a third hash value.
When the verification node is selected, a third hash operation may be performed on the first digital signature and the second hash value to obtain a third hash value. The verification consensus mechanism may include a predefined third hash operation, which may be determined according to actual needs, for example, the third hash operation may be SHA-256 or the like.
In the embodiment of the present invention, any two operations of the first hash operation, the second hash operation, and the third hash operation may be the same or different hash operations. In one example, the first, second, and third hash operations may be the same hash operation, in another example, the first, second, and third hash operations may be different hash operations.
And S250, selecting a target verification node from the plurality of verification nodes according to the third hash value and a preset random rule. The target verification node may include one or more.
In selecting the verification node, the selection may be made based on the third hash value. The verification consensus mechanism may include a preset random rule according to which the selection is based, where the preset random rule has certain randomness and verifiability.
In one example, the preset random rule may include:
converting the third hash value into a 10-system, and taking the remainder of the second numerical value;
and determining the verification node corresponding to the remainder as a target verification node.
Wherein the third value may be determined according to the number of verification nodes. For example, the number of verification nodes may be 100, and the third value may be 100.
The third hash value guarantees randomness, and the verifiability of the target verification node is guaranteed through the determination of the third hash value and a preset random rule.
S260, sending the block to be verified to the target verification node so that the target verification node verifies the block to be verified.
The current block-out node can send the block to be verified to the target verification node for verification. When the block to be verified is sent to the target verification node, the target verification node may send the first digital signature and the public key. The form of sending the public key may include various forms. In one example, the address of the out-of-block node may be generated from the public key, the address may be a roll-out or roll-in address for the transaction, and the target verification node may determine the public key of the out-of-block node from the address of the out-of-block node. In another example, the public key may be sent with the block to be verified.
After receiving the block to be verified, the target verification node can verify the identity of the current block output node, and the identity of the block output node can verify the first digital signature through the public key of the block output node. After the verification passes, the target verification node can verify the verification identity of the target verification node, and the verification process can select the same rule of the target verification node for verification based on the block-out node so as to verify whether the target verification node comprises the target verification node. And after the two verification processes are passed, the target verification node verifies the block to be verified again, and performs whole-network synchronization on the verification result. For the verification of the block to be verified, it is mainly verified whether the block node is correctly accounted, and specific verification methods may include various methods, which are not described herein again.
By the embodiment of the invention, partial nodes except the block nodes can be selected to verify the block, the selection of the partial nodes has certain randomness and verifiability, the possibility of successfully attacking the block chain can be reduced, the verification efficiency of the block chain node network is improved, the accounting efficiency is further improved, and the block chain node network can be applied to a service scene with larger data scale.
In some embodiments, the step S240 may be specifically implemented by the following steps:
and performing second hash operation on the first digital signature, the second hash value and the first numerical value to obtain a third hash value of the second hash value.
Wherein the first value is a predefined fixed value such as 1-n, and n is an arbitrary value.
The first value may also be a sequence number of the current out-of-block node or a value determined according to the sequence number of the current out-of-block node. By means of the first value, the randomness of the selection of the block nodes can be further realized.
Fig. 3 is a flowchart of another verification method based on a block link point network according to the present invention. The block-linked node network includes a plurality of out-block nodes and a plurality of verification nodes, for example, the block-linked node network in the exemplary architecture shown in fig. 1, and the method is applied to a current verification node, which is any one of the plurality of verification nodes, as shown in fig. 3, and specifically includes: :
s310, receiving the block to be verified, the public key and the first digital signature sent by the current block node.
Wherein each node in the block-link node network operates based on a consensus mechanism. The consensus mechanism is predefined and may include a block consensus mechanism, a verification consensus mechanism, and the like. The authentication node is primarily used to perform an authentication consensus mechanism.
The block to be verified may be a block newly generated by the current block output node. The first digital signature may be determined from the block to be verified. Specifically, the current block may perform a first hash operation on the block to be verified to obtain a first hash value, and perform a signature on the first hash value by using a private key to obtain a first digital signature. Specifically, reference may be made to the foregoing embodiment shown in fig. 2, which is not described herein again.
The current verification node can also determine a public key of the current block output node, and the public key can be determined according to the address of the current block output node and can also obtain the public key carried in the verification block.
Wherein each node may comprise at least one asymmetrically encrypted key pair, each key pair comprising a public key and a private key.
After receiving the to-be-verified block, the target verification node may first verify the identity of the current out-block node, and the identity of the out-block node may be implemented through steps S320 to S330 described below.
And S320, verifying the first digital signature by using the public key of the current block node to obtain a first hash value.
S330, performing first hash operation on the block to be verified to obtain a fourth hash value;
the first hash operation is an operation of generating a first hash value by the node of the block. The first hash operation may be predefined in the authentication consensus mechanism.
The current verification node may compare whether the first hash value and the fourth hash value are the same, and if so, this indicates that the first digital signature is the digital signature of the out-blocking node, that is, the verification is passed. If not, the verification fails.
After the verification passes, the current verification node may verify the verification identity of itself, and the verification process may be implemented through steps S340 and S350.
S340, if the first hash value is the same as the fourth hash value, performing a third hash operation on the first digital signature and the second hash value to obtain a third hash value, where each second hash value performs a second hash operation according to the next block to obtain a second hash value;
the determination of the second hash value may be combined with the foregoing description in the embodiment shown in fig. 2, and is not described herein again.
The second hash operation is an operation of generating a second hash value by the node, and the third hash operation is an operation of generating a third hash value by the node. The second hash operation and the third hash operation may be predefined in a verification consensus mechanism. The first hash operation and the second hash operation may be the same operation or different operations. The first hash operation, the second hash operation and the third hash operation may be combined with the foregoing discussion in the embodiment shown in fig. 2, and are not described here again.
And S350, determining the serial number of the target verification node according to the third hash value and a preset random rule.
The preset random rule is a rule for selecting a target verification node from the block-out node. The preset random rule may be predefined in the authentication consensus mechanism. The preset random rule may be combined with the foregoing discussion in the embodiment shown in fig. 2, and is not described here again.
After determining the sequence number of the target authentication node, it may be determined whether the sequence number of the target authentication node includes itself. If yes, step S360 is executed, and if not, the verification process is ended.
S360, if the serial number of the target verification node is the serial number of the current verification node, verifying the block to be verified, and broadcasting a verification result in the block link point network.
After the two verification processes are passed, the current verification node needs to verify the block to be verified, and the verification result is subjected to whole-network synchronization. For the verification of the block to be verified, it is mainly verified whether the block node is correctly accounted, and specific verification methods may include various methods, which are not described herein again.
By the embodiment of the invention, partial nodes except the block nodes can be selected to verify the block, the selection of the partial nodes has certain randomness and verifiability, the possibility of successfully attacking the block chain can be reduced, the verification efficiency of the block chain node network is improved, the accounting efficiency is further improved, and the block chain node network can be applied to a service scene with larger data scale.
Fig. 4 is a schematic structural diagram of a verification apparatus based on a block link point network according to an embodiment of the present invention. The block-linked node network includes a plurality of out-blocking nodes and a plurality of verification nodes, for example, the block-linked node network in the exemplary architecture shown in fig. 1, the apparatus is adapted to a current out-blocking node, the current out-blocking node is any one of the plurality of out-blocking nodes, and the apparatus includes:
the first hash unit 401 generates a block to be verified, and performs a first hash operation according to the block to be verified to obtain a first hash value;
a first determining unit 402, configured to determine a first digital signature, where the first digital signature is obtained by signing the first hash value;
a second determining unit 403, configured to determine second hash values, where each second hash value performs a second hash operation according to the next block to obtain a second hash value;
a second hash unit 404, configured to perform a third hash operation on the first digital signature and the second hash value to obtain a third hash value;
a selecting unit 405, configured to select a target verification node from the multiple verification nodes according to the third hash value and a preset random rule;
a sending unit 406, configured to send the block to be verified to the target verification node, so that the target verification node verifies the block to be verified. .
In some embodiments, the second determining unit 403 is specifically configured to:
determining at least one verified block before a specified interval of the current block, wherein the specified interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
In some embodiments, the second hash unit 404 is specifically configured to:
and performing second hash operation on the first digital signature, the second hash value and a first numerical value to obtain a second hash value and a third hash value, wherein the first numerical value is 1-n or the serial number of the current block node, and n is an arbitrary value.
It can be understood that the verification apparatus based on the blockchain link point network in this embodiment corresponds to the method embodiment shown in fig. 2, and therefore, the above description about the method embodiment shown in fig. 2 is also applicable to the apparatus in this embodiment, and is not repeated herein.
Fig. 5 is a schematic structural diagram of a verification apparatus based on a block link point network according to an embodiment of the present invention. The block-link point network includes a plurality of egress nodes and a plurality of verification nodes, for example, the block-link point network in the exemplary architecture shown in fig. 1, and the apparatus is adapted to a current verification node, where the current verification node is any one of the plurality of verification nodes, and the apparatus includes:
a receiving unit 501, configured to receive a block to be verified, a public key, and a first digital signature sent by a current block node;
a first verification unit 502, configured to verify the first digital signature by using the current public key to obtain a first hash value;
a first hash unit 503, configured to perform a first hash operation on the block to be verified to obtain a fourth hash value;
a second hash unit 504, configured to perform a third hash operation on the first digital signature and the second hash value to obtain a third hash value if the first hash value is the same as the fourth hash value, where each second hash value performs the second hash operation according to the next block to obtain a second hash value;
a determining unit 505, configured to determine a sequence number of the target verification node according to the third hash value and a preset random rule;
a second verifying unit 506, configured to verify the block to be verified and broadcast a verification result in the block link point network if the serial number of the target verifying node is the serial number of the current verifying node.
In some embodiments, a third hash unit is further included to:
determining at least one verified block before a specified interval of the current block, wherein the specified interval can be determined according to the number of the plurality of out-of-block nodes;
and the third hash unit is used for respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
It can be understood that the verification apparatus based on the block link point network in this embodiment corresponds to the method embodiment shown in fig. 3, and therefore, the above description about the method embodiment shown in fig. 3 is also applicable to the apparatus in this embodiment, and is not repeated herein.
Fig. 6 shows a schematic structural diagram of a computer device provided in an embodiment of the present specification, where the computer device may include: a processor 610, a memory 620, an input/output interface 630, a communication interface 640, and a bus 650. Wherein processor 640, memory 620, input/output interface 630, and communication interface 640 are communicatively coupled to each other within the device via bus 650.
The processor 610 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 620 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 620 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 620 and called by the processor 610 to be executed.
The input/output interface 630 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 640 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 650 includes a pathway to transfer information between various components of the device, such as processor 610, memory 620, input/output interface 630, and communication interface 640.
It should be noted that although the above-mentioned devices only show the processor 610, the memory 620, the input/output interface 630, the communication interface 640 and the bus 650, in a specific implementation, the devices may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the scope of the present invention should be included in the scope of the present invention.

Claims (8)

1. A verification method based on a block chain node network, wherein the block chain node network comprises a plurality of block outlet nodes and a plurality of verification nodes, the method is applied to a current block outlet node, the current block outlet node is any one of the plurality of block outlet nodes, and the method comprises the following steps:
generating a block to be verified, and performing a first hash operation according to the block to be verified to obtain a first hash value;
determining a first digital signature, wherein the first digital signature is obtained by signing the first hash value;
performing a second hash operation according to the next block to obtain a second hash value;
performing a third hash operation according to the first digital signature and the second hash value to obtain a third hash value;
selecting a target verification node from the plurality of verification nodes according to the third hash value and a preset random rule;
sending the block to be verified to the target verification node so that the target verification node verifies the block to be verified;
determining a second hash value, comprising:
determining at least one verified block before a current block designated interval, wherein the designated interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
2. The method of claim 1, wherein any two of the first hash operation, the second hash operation, and the third hash operation are the same or different hash operations.
3. The method of claim 1, wherein performing a third hash operation based on the first digital signature and the second hash value to obtain a third hash value comprises:
and performing third hash operation on the first digital signature, the second hash value and the first numerical value to obtain a third hash value, wherein the first numerical value is 1-n or the serial number of the current block-out node, and n is an arbitrary value.
4. The method of claim 1, wherein the preset random rule comprises:
converting the third hash value into a 10-system, and taking the remainder of the number of the verification nodes;
and determining the verification node corresponding to the remainder as the target verification node.
5. A verification method based on a block chain node network is characterized in that the block chain node network comprises a plurality of block outlet nodes and a plurality of verification nodes, the method is applied to a current verification node, the current verification node is any one of the plurality of verification nodes, and the method comprises the following steps:
receiving a block to be verified, a public key and a first digital signature which are sent by a current block node;
verifying the first digital signature by using the public key to obtain a first hash value;
performing first hash operation according to the block to be verified to obtain a fourth hash value;
if the first hash value is the same as the fourth hash value, performing third hash operation on the first digital signature and the second hash value to obtain third hash values, wherein each second hash value performs second hash operation according to the next block to obtain second hash values;
determining a serial number of a target verification node according to the third hash value and a preset random rule;
if the serial number of the target verification node is the serial number of the current verification node, verifying the block to be verified, and broadcasting a verification result in the block link point network;
the method further comprises the following steps:
determining at least one verified block before a current block designated interval, wherein the designated interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
6. The method of claim 5, wherein the preset random rule comprises:
converting the third hash value into a 10-system, and taking the remainder of the number of the verification nodes;
and determining the verification node corresponding to the remainder as the target verification node.
7. An apparatus for performing block-based link point network authentication, wherein the block-based link node network comprises a plurality of egress nodes and a plurality of authentication nodes, the apparatus is adapted to a current egress node, the current egress node being any one of the plurality of egress nodes, and the apparatus comprises:
the first hash unit is used for generating a block to be verified and carrying out first hash operation according to the block to be verified to obtain a first hash value;
a first determining unit, configured to determine a first digital signature, where the first digital signature is obtained by signing the first hash value;
the second determining unit is used for determining second hash values, and each second hash value is subjected to second hash operation according to the next block to obtain a second hash value;
the second hash unit is used for carrying out third hash operation according to the first digital signature and the second hash value to obtain a third hash value;
a selecting unit, configured to select a target verification node from the multiple verification nodes according to the third hash value and a preset random rule;
a sending unit, configured to send the block to be verified to the target verification node, so that the target verification node verifies the block to be verified;
the second determining unit that determines a second hash value includes:
determining at least one verified block before a current block designated interval, wherein the designated interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
8. An apparatus for block-based link-node network authentication, wherein the block-based link-node network comprises a plurality of egress nodes and a plurality of authentication nodes, the apparatus is adapted to a current authentication node, the current authentication node is any one of the plurality of authentication nodes, the apparatus comprises:
the receiving unit is used for receiving the block to be verified, the public key and the first digital signature which are sent by the current block node;
the first verification unit is used for verifying the first digital signature by using the current public key to obtain a first hash value;
the first hash unit is used for carrying out first hash operation according to the block to be verified to obtain a fourth hash value;
the second hash unit is used for performing third hash operation on the first digital signature and the second hash value to obtain a third hash value if the first hash value is the same as the fourth hash value, wherein each second hash value performs second hash operation according to the next block to obtain a second hash value;
the determining unit is used for determining the serial number of the target verification node according to the third hash value and a preset random rule;
the second verification unit is used for verifying the block to be verified and broadcasting a verification result in the block link point network if the serial number of the target verification node is the serial number of the current verification node;
the second hash unit determines a second hash value, specifically:
determining at least one verified block before a current block designated interval, wherein the designated interval can be determined according to the number of the plurality of out-of-block nodes;
and respectively carrying out second hash operation on each of the at least one verified block to obtain a second hash value.
CN201910519299.4A 2019-06-17 2019-06-17 Verification method and device based on block chain node point network Active CN110223070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910519299.4A CN110223070B (en) 2019-06-17 2019-06-17 Verification method and device based on block chain node point network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910519299.4A CN110223070B (en) 2019-06-17 2019-06-17 Verification method and device based on block chain node point network

Publications (2)

Publication Number Publication Date
CN110223070A CN110223070A (en) 2019-09-10
CN110223070B true CN110223070B (en) 2020-12-11

Family

ID=67817182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910519299.4A Active CN110223070B (en) 2019-06-17 2019-06-17 Verification method and device based on block chain node point network

Country Status (1)

Country Link
CN (1) CN110223070B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597489B (en) * 2019-09-26 2023-11-24 腾讯科技(深圳)有限公司 Random number generation method, equipment and medium
CN111865894B (en) * 2020-05-27 2022-07-01 布比(北京)网络技术有限公司 Block validity verification method and device
CN113255001B (en) * 2021-06-09 2023-05-23 湖北央中巨石信息技术有限公司 Block chain-based calculation accounting method, system and device and medium
CN113239635A (en) * 2021-06-16 2021-08-10 中国银行股份有限公司 Model evaluation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548349A (en) * 2016-11-02 2017-03-29 江苏通付盾科技有限公司 Transaction Information verification method and system
CN108964879A (en) * 2018-07-20 2018-12-07 杭州复杂美科技有限公司 A kind of drawing method, common recognition method, equipment and storage medium
CN109559122A (en) * 2018-12-07 2019-04-02 北京瑞卓喜投科技发展有限公司 Block chain data transmission method and block chain data transmission system
CN109743173A (en) * 2018-12-20 2019-05-10 弗洛格(武汉)信息科技有限公司 Go out block node in block chain and determines method, block verification method and block catenary system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102417067B1 (en) * 2017-12-08 2022-07-05 한국전자통신연구원 Method and apparatus for generating blocks in node on a block-chain network
KR101937090B1 (en) * 2018-04-20 2019-01-11 주식회사 시그마체인 Method of verifying block based on block chain
CN109067516B (en) * 2018-07-20 2021-05-11 杭州复杂美科技有限公司 Lottery drawing method, consensus method, device and storage medium
CN109087111A (en) * 2018-08-31 2018-12-25 深圳付贝科技有限公司 Common recognition verification method, digging mine machine and block catenary system based on block chain
CN109583892A (en) * 2018-11-21 2019-04-05 安徽高山科技有限公司 A kind of random number selecting method in block chain
CN109785130B (en) * 2018-12-17 2021-05-28 金蝶软件(中国)有限公司 Block chain random consensus method and device, computer equipment and storage medium
CN109831509B (en) * 2019-02-18 2021-07-13 三亚京牛数字科技有限公司 Method for realizing random block output with same weight

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548349A (en) * 2016-11-02 2017-03-29 江苏通付盾科技有限公司 Transaction Information verification method and system
CN108964879A (en) * 2018-07-20 2018-12-07 杭州复杂美科技有限公司 A kind of drawing method, common recognition method, equipment and storage medium
CN109559122A (en) * 2018-12-07 2019-04-02 北京瑞卓喜投科技发展有限公司 Block chain data transmission method and block chain data transmission system
CN109743173A (en) * 2018-12-20 2019-05-10 弗洛格(武汉)信息科技有限公司 Go out block node in block chain and determines method, block verification method and block catenary system

Also Published As

Publication number Publication date
CN110223070A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
CN110222537B (en) Verification method and device applied to block chain nodes
CN110223070B (en) Verification method and device based on block chain node point network
CN110247753B (en) Block output method and device based on block chain node point network
CN110225044B (en) Verification method and device on block chain
CN108848148B (en) Transaction information confirmation method and device based on block chain
CN110210865A (en) Packaging method and device based on block chain
CN110222538B (en) Verification method and device related to block chain
CN110233722B (en) Block output method and device on block chain
CN110224839B (en) Verification method and device applied to block chain
CN110224813B (en) Block discharging method and device based on block chain
CN111831669A (en) Method and device for storing internet voting data according to block chain
CN110225043B (en) Packing method and device applied to block chain
CN110247773B (en) Packing method and device on block chain
CN111078715A (en) Synchronous storage method and device for internet advertisement data on block chain
CN110245949B (en) Packing method and device related to block chain
CN111831738A (en) Method and device for storing Internet recruitment data on block chain
CN110224840B (en) Block chain based packaging method and device
CN110245950B (en) Block discharging method and device related to block chain
CN110223069A (en) Packaging method and device based on block chain meshed network
CN111046048A (en) Method and device for storing Internet business license data on block chain
CN111831670A (en) Storage method and device related to internet comment data on block chain
CN111078795A (en) Method and device for storing social data of internet on block chain
CN111833054A (en) Method and device for storing Internet e-commerce data on block chain
CN111835815A (en) Synchronous storage method and device for internet self-media data on block chain
CN114978537B (en) Identity recognition method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information
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.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant