CN110247753B - Block output method and device based on block chain node point network - Google Patents

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

Info

Publication number
CN110247753B
CN110247753B CN201910519296.0A CN201910519296A CN110247753B CN 110247753 B CN110247753 B CN 110247753B CN 201910519296 A CN201910519296 A CN 201910519296A CN 110247753 B CN110247753 B CN 110247753B
Authority
CN
China
Prior art keywords
block
hash
hash value
node
digital signature
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
CN201910519296.0A
Other languages
Chinese (zh)
Other versions
CN110247753A (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 CN201910519296.0A priority Critical patent/CN110247753B/en
Publication of CN110247753A publication Critical patent/CN110247753A/en
Application granted granted Critical
Publication of CN110247753B publication Critical patent/CN110247753B/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/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Abstract

The embodiment of the invention relates to a block output method and device based on a block link point network. The method comprises the following steps: generating a first block, and performing a first hash operation according to the first block to obtain a first hash value; signing the first hash value to obtain a first digital signature; performing a second hash operation on the second block to obtain a second hash value, wherein the second block is the next block of the first block; performing a third hash operation on the first digital signature and the second hash value to obtain a third hash value; and selecting a second block outlet node from the plurality of block outlet nodes as a block outlet node of the second block according to the third hash value and a preset random rule. Therefore, the next block output node can be designated by the block output node, the designation process has certain randomness and verifiability, the possibility that the block chain is attacked successfully can be reduced, the block output efficiency of the block chain link node network is improved, the accounting efficiency is further improved, and the block chain node network can be used in a service scene with a larger data scale.

Description

Block output 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 block output method and 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, the embodiments of the present invention provide a block output method and apparatus based on a block link point network.
In a first aspect, an embodiment of the present invention provides a block output method based on a block link point network. The block-link node network comprises a plurality of block output nodes, the method is applied to a first block output node, the first block output node is any one of the plurality of block output nodes, and the method comprises the following steps:
generating a first block, and performing a first hash operation according to the first block to obtain a first hash value;
signing the first hash value to obtain a first digital signature;
performing a second hash operation on a second block to obtain a second hash value, wherein the second block is the next block of the first block;
performing a third hash operation on the first digital signature and the second hash value to obtain a third hash value;
and selecting a second block outlet node from the plurality of block outlet nodes as a block outlet node of the second block according to the third hash value and a preset random rule.
In some embodiments, any two of the first, second and third hash operations are the same or different hash operations.
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 first block-out node, and n is an arbitrary 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 plurality of block output nodes;
and determining the verification node corresponding to the remainder as the second block output node.
In some embodiments, further comprising:
transmitting the first digital signature to the plurality of egress block nodes.
In some embodiments, further comprising:
receiving a second digital signature sent by a third block-out node, wherein the second digital signature is specific to a third block;
performing a second hash operation on a fourth block to obtain a fourth hash value, wherein the fourth block is a block next to the third block;
performing second hash operation on the second digital signature and the fourth hash value to obtain a fifth hash value;
judging whether the first block output node is the block output node of the fourth block or not according to the fifth hash value and a preset random rule;
and if so, packaging the fourth block.
In some embodiments, the determining, according to the fifth hash value and a preset random rule, whether the first block output node is a block output node of the fourth block includes:
determining the serial number of the block outlet node of the fourth block according to the fifth hash value and a preset random rule;
and judging whether the sequence number of the block outlet node of the fourth block is the sequence number of the first block outlet node.
In a second aspect, a block output device based on a block link point network is provided. The block-link node network comprises a plurality of block output nodes, the apparatus is adapted to a first block output node, which is any one of the plurality of block output nodes, and the apparatus comprises:
the first hash unit generates a first block, and performs a first hash operation according to the first block to obtain a first hash value;
the signature unit is used for signing the first hash value to obtain a first digital signature;
the second hash unit is used for carrying out second hash operation on a second block to obtain a second hash value, wherein the second block is the next block of the first block;
the third 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;
and the selecting unit is used for selecting a second block outlet node from the plurality of block outlet nodes as the block outlet node of the second block according to the third hash value and a preset random rule.
In some embodiments, any two of the first, second and third hash operations are the same or different hash operations.
In some embodiments, the third 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 first block-out node, and n is an arbitrary 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 plurality of block output nodes;
and determining the verification node corresponding to the remainder as the second block output node.
In some embodiments, further comprising:
a sending unit, configured to send the first digital signature to the plurality of egress nodes.
In some embodiments, further comprising:
a receiving unit, configured to receive a second digital signature sent by a third block output node, where the second digital signature is for a third block;
the second hash unit is further configured to perform a second hash operation on a fourth block to obtain a fourth hash value, where the fourth block is a block next to the third block;
the third hash unit is further configured to perform a third hash operation on the second digital signature and the fourth hash value to obtain a fifth hash value;
a determining unit, configured to determine whether the first block output node is a block output node of the fourth block according to the fifth hash value and a preset random rule;
and if so, the packing unit is used for packing the fourth block.
In some embodiments, the determining unit is specifically configured to:
determining the serial number of the block outlet node of the fourth block according to the fifth hash value and a preset random rule;
and judging whether the sequence number of the block outlet node of the fourth block is the sequence number of the first block outlet node.
In a third 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 executes the program to implement the method steps of any one or more of the first or second aspects.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one or more of the first or second aspects described above.
In a fifth 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.
Through the embodiment of the invention, the next block output node can be designated by the block output node, the designation process has certain randomness and verifiability, the possibility of successful attack of the block chain can be reduced, the block output 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 block output method based on a block link point network according to an embodiment of the present invention;
fig. 3 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. 4 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 block output method and device based on a block link point 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 out-block nodes may be candidate nodes, wherein the super node may be selected from the candidate nodes, and 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 computation 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 block output 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, such as the block-linked node network in the exemplary architecture shown in fig. 1, and the method is applied to a first 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 first block, and performing a first hash operation according to the first block 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 first block output node according to a block output consensus mechanism, and the first 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, 3 minutes, 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 current blockchain node needs to determine a next node needing to generate a block in generating the block, the current blockchain node may be called a first out-of-block node, the next node needing to generate the block may be called a second out-of-block node, the block generated by the current blockchain node may be called a first block, and the block generated by the next node needing to generate the block may be called a second block.
In order to increase the efficiency of selecting the out-of-block nodes of the node and reduce the load of the system, when the next out-of-block node is selected, the first hash operation may be performed on the first block 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, signing the first hash value to obtain a first digital signature.
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.
S230, performing a second hash operation on a second block to obtain a second hash value, where the second block is a next block of the first block.
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.
Since the next block has no way to predict, the whole process can be made more random.
And S240, performing third hash operation on the first digital signature and the second hash value to obtain a third hash value.
When the next block node is determined, a third hash operation may be performed on the first digital signature and the second hash value to obtain a third hash value. The block-out consensus mechanism may include a predefined third hash operation, and the third hash operation 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 second block outlet node from the plurality of block outlet nodes as a block outlet node of the second block according to the third hash value and a preset random rule.
Selection may be made based on the third hash value when determining the next out-of-block node. The block-out consensus mechanism may include a preset random rule according to which the block is selected, 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 second block output node.
Wherein the third value may be determined according to the number of verification nodes. For example, the number of out-of-block nodes may be 100, and the third value may be 100.
The third hash value guarantees randomness, and the verifiability of the second block-out node is guaranteed through the determination of the third hash value and a preset random rule.
The first out-block node may send the first digital signature to the second out-block node for the second out-block node to continue out-blocking. For example, the first digital signature may be transmitted to the plurality of out-blocking nodes by way of broadcasting.
The public keys of the first block and the first out-block node may also be sent to a second out-block node. 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 second out-of-block 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 carried in the first block.
After receiving the first digital signature, the second block output node may first verify the identity of the first block output node, and the identity of the block output node may be implemented by verifying the first digital signature through a public key of the block output node. After the verification is passed, the second out-block node may verify its own verification identity, and the verification process may perform verification based on a preset random rule to verify whether the out-block node of the second block includes itself. And after the two verification processes are passed, the second block outlet node packs the second block and performs full network synchronization on the packed second block.
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 first out-of-block node, or a value determined from the sequence number of the first out-of-block node. By means of the first value, the randomness of the selection of the block nodes can be further realized.
In some embodiments, the following steps may also be included:
1) receiving a second digital signature sent by a third block-out node, wherein the second digital signature is specific to a third block;
2) performing a second hash operation on a fourth block to obtain a fourth hash value, wherein the fourth block is a block next to the third block;
3) performing second hash operation on the second digital signature and the fourth hash value to obtain a fifth hash value;
4) judging whether the first block output node is the block output node of the fourth block or not according to the fifth hash value and a preset random rule;
5) and if so, packaging the fourth block.
6) If not, the process is ended.
In step 1), a third chunk, a public key and a second digital signature sent by a third chunk exit node may be received.
The third block may be a block newly generated by the third block output node. The second digital signature may be determined from the third block. Specifically, reference may be made to the foregoing process for acquiring the first digital signature, which is not described herein again.
The first block output node may further determine a public key of a third block output node, where the public key may be determined according to an address of the third block output node, or may obtain a public key carried in the third block.
In step 4), the sequence number of the out-block node of the fourth block may be determined according to the fifth hash value and a preset random rule; and judging whether the sequence number of the block outlet node of the fourth block is the sequence number of the first block outlet node.
In addition, after receiving the third block, the first out-block node may first verify the identity of the third out-block node, and the identity of the out-block node may be implemented through the following steps.
And step A, verifying the second digital signature by using a public key in a key pair of a third block-out node to obtain a sixth hash value.
Step B, carrying out first hash operation on the third block to obtain a seventh hash value;
the first block output node may compare whether the sixth hash value and the seventh hash value are the same, and if so, the second digital signature is the digital signature of the third block output node, that is, the verification is passed. If not, the verification fails.
In addition, the second block can also be a block before the first block. The method can be realized by the following steps: 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 chunk before the first chunk, n may be an integer greater than 0, and the n chunks 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 first block, where the value of n may be the number of the plurality of out-block nodes, and the number of 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, the plurality of second hash values may be determined according to a plurality of blocks of every n blocks before the first block, 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.
Through the embodiment of the invention, the next block output node can be designated by the block output node, the designation process has certain randomness and verifiability, the possibility of successful attack of the block chain can be reduced, the block output 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. 3 is a schematic structural diagram of a block output device based on a block link point network according to an embodiment of the present invention. The block-link point network includes a plurality of block output nodes, for example, the block-link point network in the exemplary architecture shown in fig. 1, and the apparatus is applied to a first block output node, where the first block output node is any one of the plurality of block output nodes, and the apparatus includes:
the first hash unit 301 generates a first block, and performs a first hash operation according to the first block to obtain a first hash value;
a signature unit 302, configured to sign the first hash value to obtain a first digital signature;
a second hash unit 303, configured to perform a second hash operation on a second block to obtain a second hash value, where the second block is a next block of the first block;
a third hash unit 304, 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 305, configured to select a second block output node from the multiple block output nodes as a block output node of the second block according to the third hash value and a preset random rule.
In some embodiments, any two of the first, second and third hash operations are the same or different hash operations.
In some embodiments, the third 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 first block-out node, and n is an arbitrary 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 plurality of block output nodes;
and determining the verification node corresponding to the remainder as the second block output node.
In some embodiments, further comprising:
a sending unit, configured to send the first digital signature to the plurality of egress nodes.
In some embodiments, further comprising:
a receiving unit, configured to receive a second digital signature sent by a third block output node, where the second digital signature is for a third block;
the second hash unit is further configured to perform a second hash operation on a fourth block to obtain a fourth hash value, where the fourth block is a block next to the third block;
the third hash unit is further configured to perform a third hash operation on the second digital signature and the fourth hash value to obtain a fifth hash value;
a determining unit, configured to determine whether the first block output node is a block output node of the fourth block according to the fifth hash value and a preset random rule;
and if so, the packing unit is used for packing the fourth block.
In some embodiments, the determining unit is specifically configured to:
determining the serial number of the block outlet node of the fourth block according to the fifth hash value and a preset random rule;
and judging whether the sequence number of the block outlet node of the fourth block is the sequence number of the first block outlet node.
It can be understood that the block output device based on the block 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 device in this embodiment, and is not repeated herein.
Fig. 4 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 410, a memory 420, an input/output interface 430, a communication interface 440, and a bus 450. Wherein the processor 440, the memory 420, the input/output interface 430 and the communication interface 440 are communicatively coupled to each other within the device via a bus 450.
The processor 410 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 420 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 420 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 420 and called to be executed by the processor 410.
The input/output interface 430 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 440 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 450 includes a pathway to transfer information between various components of the device, such as processor 410, memory 420, input/output interface 430, and communication interface 440.
It should be noted that although the above-mentioned device only shows the processor 410, the memory 420, the input/output interface 430, the communication interface 440 and the bus 450, in a specific implementation, the device 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 (10)

1. A block output method based on a block chain node network is characterized in that the block chain node network comprises a plurality of block output nodes, the method is applied to a first block output node, the first block output node is any one of the plurality of block output nodes, and the method comprises the following steps:
generating a first block, and performing a first hash operation according to the first block to obtain a first hash value;
signing the first hash value to obtain a first digital signature;
performing a second hash operation on a second block to obtain a second hash value, wherein the second block is the next block of the first block;
performing a third hash operation on the first digital signature and the second hash value to obtain a third hash value;
and selecting a second block outlet node from the plurality of block outlet nodes as a block outlet node of the second block according to the third hash value and a preset random rule.
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 on the first digital signature and the second hash value to obtain a third hash value comprises:
and performing second hash operation on the first digital signature, the second hash value and a first numerical value to obtain a third hash value, wherein the first numerical value is 1-n or the serial number of the first 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 plurality of block output nodes;
and determining the block output node corresponding to the remainder as the second block output node.
5. The method of claim 1, further comprising:
transmitting the first digital signature to the plurality of egress block nodes.
6. The method of claim 5, further comprising:
receiving a second digital signature sent by a third block-out node, wherein the second digital signature is specific to a third block;
performing a second hash operation on a fourth block to obtain a fourth hash value, wherein the fourth block is a block next to the third block;
performing a third hash operation on the second digital signature and the fourth hash value to obtain a fifth hash value;
judging whether the first block output node is the block output node of the fourth block or not according to the fifth hash value and a preset random rule;
and if so, packaging the fourth block.
7. The method according to claim 6, wherein the determining whether the first chunking node is the chunking node of the fourth chunk according to the fifth hash value and a preset random rule comprises:
determining the serial number of the block outlet node of the fourth block according to the fifth hash value and a preset random rule;
and judging whether the sequence number of the block outlet node of the fourth block is the sequence number of the first block outlet node.
8. A block output device based on a block chain node network, wherein the block chain node network includes a plurality of block output nodes, the device is adapted to a first block output node, which is any one of the plurality of block output nodes, and the device includes:
the first hash unit generates a first block, and performs a first hash operation according to the first block to obtain a first hash value;
the signature unit is used for signing the first hash value to obtain a first digital signature;
the second hash unit is used for carrying out second hash operation on a second block to obtain a second hash value, wherein the second block is the next block of the first block;
the third 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;
and the selecting unit is used for selecting a second block outlet node from the plurality of block outlet nodes as the block outlet node of the second block according to the third hash value and a preset random rule.
9. The apparatus of claim 8, further comprising:
a sending unit, configured to send the first digital signature to the plurality of egress nodes.
10. The apparatus of claim 9, further comprising:
a receiving unit, configured to receive a second digital signature sent by a third block output node, where the second digital signature is for a third block;
the second hash unit is further configured to perform a second hash operation on a fourth block to obtain a fourth hash value, where the fourth block is a block next to the third block;
the third hash unit is further configured to perform a third hash operation on the second digital signature and the fourth hash value to obtain a fifth hash value;
a determining unit, configured to determine whether the first block output node is a block output node of the fourth block according to the fifth hash value and a preset random rule;
and if so, the packing unit is used for packing the fourth block.
CN201910519296.0A 2019-06-17 2019-06-17 Block output method and device based on block chain node point network Active CN110247753B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910519296.0A CN110247753B (en) 2019-06-17 2019-06-17 Block output method and device based on block chain node point network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910519296.0A CN110247753B (en) 2019-06-17 2019-06-17 Block output method and device based on block chain node point network

Publications (2)

Publication Number Publication Date
CN110247753A CN110247753A (en) 2019-09-17
CN110247753B true CN110247753B (en) 2020-10-09

Family

ID=67887466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910519296.0A Active CN110247753B (en) 2019-06-17 2019-06-17 Block output method and device based on block chain node point network

Country Status (1)

Country Link
CN (1) CN110247753B (en)

Families Citing this family (5)

* 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
CN113052596B (en) * 2019-12-28 2024-04-09 中移(成都)信息通信科技有限公司 Block chain-based block discharging method, device, equipment and medium
CN111443895A (en) * 2020-03-12 2020-07-24 杭州泛链科技有限公司 Verifiable random number generation method applied to block chain
CN111598567B (en) * 2020-05-07 2023-11-10 深圳创客区块链技术有限公司 Method, device and storage medium for preventing blockchain powerful attack
CN112258326B (en) * 2020-12-24 2021-03-16 布比(北京)网络技术有限公司 Random block output method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911819A (en) * 2017-11-30 2018-04-13 江苏通付盾科技有限公司 The method and system of packing node are chosen based on phone number

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10204341B2 (en) * 2016-05-24 2019-02-12 Mastercard International Incorporated Method and system for an efficient consensus mechanism for permissioned blockchains using bloom filters and audit guarantees
EP3454519B1 (en) * 2016-12-23 2021-07-21 CloudMinds (Shanghai) Robotics Co., Ltd. Block generation method and device, and blockchain network
WO2019019162A1 (en) * 2017-07-28 2019-01-31 杭州复杂美科技有限公司 Receivable financing method based on block chain technology
CN108600161A (en) * 2018-03-12 2018-09-28 成都零光量子科技有限公司 A kind of fair efficient block chain common recognition method
CN108737375B (en) * 2018-04-13 2021-01-19 中山大学 Block chain consensus method and system
CN108596621B (en) * 2018-04-28 2020-10-27 三亚京牛数字科技有限公司 Block chain accounting node generation method and device, computer equipment and storage medium
CN108964879B (en) * 2018-07-20 2021-04-13 杭州复杂美科技有限公司 Lottery drawing method, consensus method, device and storage medium
CN109544310A (en) * 2018-11-13 2019-03-29 孙晞瑜 A kind of quick common recognition bookkeeping methods and its system based on block chain alliance chain
CN109785130B (en) * 2018-12-17 2021-05-28 金蝶软件(中国)有限公司 Block chain random consensus method and device, computer equipment and storage medium
CN109743173B (en) * 2018-12-20 2021-07-20 弗洛格(武汉)信息科技有限公司 Block out node determining method in block chain, block verification method and block chain system
CN109560939A (en) * 2019-01-29 2019-04-02 张超 A kind of block method and the device out of block chain
CN109889397B (en) * 2019-03-31 2021-08-31 杭州复杂美科技有限公司 Lottery method, block generation method, equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911819A (en) * 2017-11-30 2018-04-13 江苏通付盾科技有限公司 The method and system of packing node are chosen based on phone number

Also Published As

Publication number Publication date
CN110247753A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN110247753B (en) Block output method and device based on block chain node point network
CN110222537B (en) Verification method and device applied to block chain nodes
CN110223070B (en) Verification method and device based on block chain node point network
CN110210865A (en) Packaging method and device based on block chain
CN110233722B (en) Block output method and device on block chain
CN110222538B (en) Verification method and device related to block chain
CN110225044B (en) Verification method and device on block chain
CN110224813B (en) Block discharging method and device based on block chain
CN110298757B (en) Consensus method and device relating to DPoS
CN110224839B (en) Verification method and device applied to block chain
CN111831669A (en) Method and device for storing internet voting data according to block chain
CN110245949B (en) Packing method and device related to block chain
CN110225043B (en) Packing method and device applied to block chain
CN110224840B (en) Block chain based packaging method and device
CN110247773B (en) Packing method and device on block chain
CN110245950B (en) Block discharging method and device related to block chain
CN110298670B (en) Consensus method involving PBFT and apparatus therefor
CN111831670A (en) Storage method and device related to internet comment data on block chain
CN110990418A (en) Asynchronous processing method and device based on block chain user data
CN110223069A (en) Packaging method and device based on block chain meshed network
CN111078795A (en) Method and device for storing social data of internet on block chain
CN111831738A (en) Method and device for storing Internet recruitment data on block chain
CN111831671A (en) Method and device for storing internet advertisement data on block chain
CN111835815A (en) Synchronous storage method and device for internet self-media data on block chain
CN111831651A (en) Storage method and device for sharing economic data on block chain through Internet

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