CN109493061B - Verification method and device for data of block chain, electronic equipment and storage medium - Google Patents

Verification method and device for data of block chain, electronic equipment and storage medium Download PDF

Info

Publication number
CN109493061B
CN109493061B CN201811622433.5A CN201811622433A CN109493061B CN 109493061 B CN109493061 B CN 109493061B CN 201811622433 A CN201811622433 A CN 201811622433A CN 109493061 B CN109493061 B CN 109493061B
Authority
CN
China
Prior art keywords
block
block chain
data
layer block
bottom layer
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
CN201811622433.5A
Other languages
Chinese (zh)
Other versions
CN109493061A (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.)
Hefei DappWorks Technology Co Ltd
Original Assignee
Hefei DappWorks 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 Hefei DappWorks Technology Co Ltd filed Critical Hefei DappWorks Technology Co Ltd
Priority to CN201811622433.5A priority Critical patent/CN109493061B/en
Publication of CN109493061A publication Critical patent/CN109493061A/en
Application granted granted Critical
Publication of CN109493061B publication Critical patent/CN109493061B/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/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules

Abstract

The invention discloses a data verification method, a data verification device, electronic equipment and a storage medium of a block chain, wherein the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the method is applied to the upper layer block chain nodes and comprises the following steps: sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node; for any block in an upper layer block chain corresponding to an upper layer block chain network to which the node belongs, block data corresponding to the block and stored in a bottom layer block chain is obtained, and the validity of the block is verified based on the block data. By applying the embodiment of the invention, the data can be verified.

Description

Verification method and device for data of block chain, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for verifying data of a block chain, an electronic device, and a storage medium.
Background
Blockchains are a distributed accounting technique. The blockchain has the advantages of decentralization, no tampering and no need of trust guarantee of a third party, and is widely regarded.
There are various problems with current mainstream blockchain networks. The most prominent of these is the severe shortfall in transaction throughput per second (tps). Visa processes 1667 transactions per second on average in 2016, while bitcoin can only process 3 to 4 transactions per second, and etherhouses can only process 20 transactions per second. In order to make blockchains a truly viable transfer technology, it is not trivial to expand transaction throughput per second.
Furthermore, the blockchain network is vulnerable to malicious node tampering or hacking in the early stages of creation due to the sparse number of full nodes and the low level of total effort of the machine. This can result in a significant economic loss and even a collapse of the entire blockchain system.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for verifying data of a block chain, an electronic device, and a storage medium, so as to verify data.
The invention solves the technical problems through the following technical scheme:
the embodiment of the invention provides a data verification method of a block chain, wherein the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the method is applied to the upper layer block chain nodes and comprises the following steps:
and sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node.
For any block in an upper layer block chain corresponding to an upper layer block chain network to which the node belongs, block data corresponding to the block and stored in a bottom layer block chain is obtained, and the validity of the block is verified based on the block data.
Optionally, the block data includes hash values corresponding to the blocks;
the obtaining block data corresponding to the block and stored in the bottom layer block chain, and the verifying the validity of the block based on the block data includes: and acquiring a hash value corresponding to the block and stored in the bottom layer block chain, determining that the block is illegal when the acquired hash value is different from the hash value currently corresponding to the block, and determining that the block is legal when the acquired hash value is the same as the hash value currently corresponding to the block.
Optionally, when it is determined that the block is illegal, performing data recovery on the block by using block data corresponding to the block and stored in the bottom layer block chain.
Optionally, different upper tier blockchain networks correspond to different upper tier blockchains, the different upper tier blockchains storing transaction information corresponding to different types of transactions.
The embodiment of the invention provides a data verification device of a block chain, wherein the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the device is applied to the upper layer block chain nodes and comprises the following steps:
and the safety processing module is used for sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain nodes, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node.
The verification module is used for acquiring block data corresponding to the block stored in the bottom layer block chain for any block in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs, and verifying the validity of the block based on the block data.
Optionally, the block data includes hash values corresponding to the blocks;
the verification module acquires block data corresponding to the block and stored in the bottom layer block chain, and verifying the validity of the block based on the block data comprises the following steps: the verification module is configured to obtain a hash value corresponding to the block and stored in the underlying block chain, determine that the block is illegal when the obtained hash value is different from the hash value currently corresponding to the block, and determine that the block is legal when the obtained hash value is the same as the hash value currently corresponding to the block.
Optionally, the apparatus further comprises:
and the recovery module is used for performing data recovery on the block by using the block data which is stored in the bottom layer block chain and corresponds to the block when the block is determined to be illegal.
Optionally, different upper tier blockchain networks correspond to different upper tier blockchains, the different upper tier blockchains storing transaction information corresponding to different types of transactions.
An embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the computer device implements the data processing method of any one of the above block chains.
The embodiment of the present invention provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the instructions cause the processor to execute any one of the above-mentioned methods for processing data of a blockchain.
Compared with the prior art, the invention has the following advantages:
by applying the embodiment of the invention, the problems of low transaction throughput, low initial creation security and the like of the block chain network in the prior art can be at least partially solved, alleviated, inhibited and even avoided, so that the legality of the block data in the upper block chain is subjected to double verification of the upper block chain network and the lower block chain network.
Drawings
Fig. 1 is an exemplary system architecture of a data processing method and apparatus to which blockchains may be applied, according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a method for verifying block chain data according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a block chain data verification apparatus according to an embodiment of the present invention;
fig. 4 schematically illustrates a block diagram of a blockchain system in accordance with an embodiment of the present disclosure;
fig. 5 schematically shows a block diagram of a computer device adapted to implement the above described method according to an embodiment of the present disclosure.
Detailed Description
The following examples are given for the detailed implementation and specific operation of the present invention, but the scope of the present invention is not limited to the following examples.
The embodiment of the invention provides a method and a device for verifying data of a block chain, an electronic device and a storage medium, and firstly introduces the method for verifying the data of the block chain provided by the embodiment of the invention.
In one particular implementation of an embodiment of the present invention,
the embodiment of the invention is preferably applicable to a novel block chain network, and the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, wherein the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, and the upper layer block chain network comprises a plurality of upper layer block chain nodes. The method comprises a block data sending stage and a security reinforcing stage, wherein the block data sending stage is executed by an upper layer block chain node, the block data in an upper layer block chain corresponding to an upper layer block chain network to which the node belongs is sent to a bottom layer block chain node,
fig. 1 is an exemplary system architecture 100 of a data processing method and apparatus to which blockchains may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in FIG. 1, a system architecture 100 according to this embodiment may include a plurality of electronic devices (101-107). The electronic devices (101-107) may be Personal Computers (PCs), web servers, database servers, and the like. Each of the electronic devices (101-107) may have the same or different computing capabilities.
As an embodiment, a plurality of electronic devices may communicate with each other to form a blockchain network, each electronic device serves as a blockchain node in the blockchain network, and each blockchain node maintains the same blockchain database (hereinafter, collectively referred to as "blockchain"). In addition, in the system architecture 100, each tile link point may respectively communicate with computing devices (e.g., a server/server cluster, a terminal device, etc.) of different service providers and/or clients, that is, each service provider and/or client may respectively serve as a corresponding tile link point for each service provider and/or client, and each service provider and/or client may perform operations such as reading and writing data in a tile chain through the corresponding tile link point.
It should be understood that the number of electronic devices in fig. 1 is merely illustrative. There may be any number of electronic devices, as desired for implementation.
The data processing method of the block chain provided by the embodiment of the disclosure can be operated in the electronic device shown in fig. 1.
As shown in fig. 2, the method is applied to a novel block chain network constructed by the present disclosure, where the block chain network includes a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network includes a plurality of bottom layer block chain nodes, and the upper layer block chain network includes a plurality of upper layer block chain nodes. The method is executed by an upper layer blockchain node in a blockchain network, and the data processing process of the blockchain provided by the disclosure is explained from the upper layer blockchain node side.
The method includes acquiring block data in an upper layer block chain corresponding to an upper layer block chain network to which a node belongs in operation S201.
Then, in operation S202, the block data is sent to the bottom layer block chain nodes, so that each bottom layer block chain node stores the block data in a bottom layer block chain corresponding to the bottom layer block chain network through consensus verification.
It can be seen that, the method shown in fig. 2 creatively constructs a composite dual-layer blockchain network including a bottom-layer blockchain network and at least one upper-layer blockchain network, for any upper-layer blockchain network, an upper-layer blockchain node in the upper-layer blockchain network can send block data in a blockchain corresponding to the upper-layer blockchain network to the bottom-layer blockchain network, the block data in the upper-layer blockchain is further stored in the bottom-layer blockchain by the bottom-layer blockchain node through common identification verification, so that the validity of the block data in the upper-layer blockchain is double verified by the upper-layer blockchain network and the bottom-layer blockchain network, the security of the block data is double protected by the upper-layer blockchain and the bottom-layer blockchain, the multi-side evidence and non-falsification characteristics of the blockchain are further enhanced, and the existing one-dimensional blockchain network is expanded into a two-dimensional blockchain network by the combination of the bottom-layer blockchain network and the upper-layer blockchain network, the method can greatly improve the transaction throughput of the whole block chain network, and meets the requirement of the current rapidly-developed transaction current situation on the block chain network.
In an embodiment of the present disclosure, sending the block data in the upper layer blockchain node corresponding to the upper layer blockchain network to which the node belongs to the method shown in fig. 2 to the bottom layer blockchain node may specifically include: and when the node serves as a common node to create a new block and adds the new block into the upper layer block chain, sending data corresponding to the new block to the bottom layer block chain node. Or when the node serves as a common node to create a new block and adds the new block into the upper layer block chain, sending data corresponding to a preset number of blocks before the new block to the bottom layer block chain node.
According to this embodiment, for any upper layer blockchain network, in one case, an upper layer blockchain node serving as a common identification node may create a new block and chain the block into the end of an upper layer blockchain corresponding to the upper layer blockchain network, and at the same time, send the related data of the new block to a lower layer blockchain network, that is, the related data of the new block is synchronized to the lower layer blockchain network while the upper layer blockchain generates the latest block, so that each lower layer blockchain node in the lower layer blockchain network can store the related data of the latest block in the upper layer blockchain into the lower layer blockchain after common identification verification, and this process is the same for each newly generated block in the upper layer blockchain. Therefore, the latest block generated in each time in the upper layer block chain can be synchronously verified by each bottom layer block chain node in the bottom layer block chain network, if the latest block has a problem, the feedback of the bottom layer block chain network can be obtained in time, and then the upper layer block chain network can avoid that a new block is subsequently linked behind the problematic block.
In another case, the upper layer block chain node serving as the common identification node may create a new block and chain the block into the end of the upper layer block chain corresponding to the upper layer block chain network, and at the same time, send the relevant data of a preset number of blocks located before the new block in the upper layer block chain to the lower layer block chain network, that is, the relevant data of the irreversible block already existing in the upper layer block chain for a period of time is synchronized to the lower layer block chain network, so that each lower layer block chain node in the lower layer block chain network can store the relevant data of the irreversible block in the upper layer block chain into the lower layer block chain after the common identification verification, where the process is the same for each irreversible block in the upper layer block chain. In this way, the upper block chain network synchronizes the block in the upper block chain, which is in an irreversible state after a period of time, to the bottom block chain, that is, directly synchronizes the block with higher reliability to the bottom block chain.
It can be known that, no matter which way is adopted to synchronize the block data in the upper layer block chain to the lower layer block chain, the only data stored in the lower layer block chain is legal and credible block data in each upper layer block chain, and especially, under the condition that the upper layer block chain network is not complete and the number of nodes of the upper layer block chain is small, so that the legality and the safety of the blocks stored in the upper layer block chain are low, the block data of the upper layer block chain confirmed to be credible is stored in the lower layer block chain, so that the block data is used as the legal basis of the blocks in the upper layer block chain, and the stability of the upper layer block chain network is maintained.
In operation S203, for any block in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs, block data stored in the lower layer block chain and corresponding to the block in the upper layer block chain is obtained, and validity of the block in the upper layer block chain is verified based on the obtained block data.
According to the embodiment of the disclosure, the problems of low transaction throughput, low initial-stage creation security and the like of the block chain network in the prior art can be at least partially solved, alleviated, inhibited and even avoided, so that the legality of the block data in the upper block chain is verified by the upper block chain network and the lower block chain network, the security of the block data is protected by the upper block chain and the lower block chain, the characteristics of multi-party evidence and non-falsification of the block chain are further enhanced, and the existing one-dimensional block chain network is expanded into a two-dimensional block chain network by combining the lower block chain network and the upper block chain network, so that the transaction throughput of the whole block chain network can be greatly improved, and the requirements of the current rapidly-developed transaction status quo on the block chain network are met.
Specifically, as an optional embodiment, the chunk data includes a hash value corresponding to the chunk. The obtaining of the block data stored in the bottom block chain and corresponding to the block in the upper block chain, and the verifying the validity of the block in the upper block chain based on the obtained block data includes: the method comprises the steps of obtaining a hash value which is stored in a bottom layer block chain and corresponds to a block in an upper layer block chain, determining that the block in the upper layer block chain is illegal when the obtained hash value is different from a hash value which is currently corresponding to the block in the upper layer block chain, and determining that the block in the upper layer block chain is legal when the obtained hash value is the same as the hash value which is currently corresponding to the block in the upper layer block chain.
The present embodiment can deal with a situation that a block in an upper layer block chain is attacked by a malicious attack, for example, when a certain block a in the upper layer block chain is generated, data included in the block a is legal, block data corresponding to the block a is synchronized into a bottom layer block chain network, and after a consensus verification is performed on each bottom layer block chain node, the block data corresponding to the block a is stored into the bottom layer block chain. When the block a in the upper block chain may be tampered, the block data of the block a stored in the lower block chain may be used as a legal basis, specifically, a hash value 1 corresponding to the block a stored in the lower block chain is obtained, a hash value 2 corresponding to the block a in the current upper block chain is obtained, and when the hash value 2 is different from the hash value 1, it is determined that the block a in the upper block chain is indeed tampered, otherwise, the block a is not tampered, and is still legal.
Further, in the above embodiment, after the block data of the upper block chain stored in the bottom block chain is used as a criterion for judging the validity of the block in the upper block chain, and whether the block in the upper block chain is valid is judged, in an embodiment of the present disclosure, the method shown in fig. 2 further includes: and when the block in the upper layer block chain is determined to be illegal, performing data recovery on the block in the upper layer block chain by using the block data which is stored in the bottom layer block chain and corresponds to the block in the upper layer block chain.
Following the above example, after confirming that the block a in the upper layer block chain is indeed tampered, the authentic block data corresponding to the block a stored in the bottom layer block chain can be used to recover the tampered block a in the upper layer block chain, so as to recover the authentic and authentic of the upper layer block chain. In the embodiment, for the situation that nodes in the upper layer block chain network are few, and the upper layer block is easy to be tampered and forged, when the upper layer block chain cannot recover correct data by means of a self-consensus mechanism, the data in the upper layer block chain can be recovered by means of backup in the bottom layer block chain.
Corresponding to the embodiment shown in fig. 2 of the present invention, an embodiment of the present invention further provides a data verification apparatus for a block chain.
Fig. 3 is a schematic structural diagram of a verification apparatus for blockchain data according to an embodiment of the present invention, as shown in fig. 3, the verification apparatus 300 for blockchain data is applied to an upper-layer blockchain node, and includes: a security processing module 310 and a verification module 320.
The safety processing module 310 is configured to send the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that each bottom layer block chain node stores the block data in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification.
The verifying module 320 is configured to, for any block in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs, obtain block data corresponding to the block stored in the lower layer block chain, and verify the validity of the block based on the block data.
Specifically, as an optional embodiment, the tile data includes a hash value corresponding to the tile. The verifying module 320 obtains block data corresponding to the block stored in the bottom layer block chain, and verifying the validity of the block based on the block data includes: the verification module 320 is configured to obtain a hash value corresponding to the block stored in the underlying block chain, determine that the block is illegal when the obtained hash value is different from the hash value currently corresponding to the block, and determine that the block is legal when the obtained hash value is different from the hash value currently corresponding to the block.
In an embodiment of the present disclosure, the recovering module 330 (not shown in the figure) is configured to perform data recovery on the block by using block data corresponding to the block stored in the bottom layer block chain when the block is determined to be illegal.
Fig. 4 schematically shows a block diagram of a blockchain system according to an embodiment of the present disclosure.
As shown in fig. 4, the blockchain system 400 includes: a bottom layer blockchain network 410 and at least one upper layer blockchain network 420.
The underlay blockchain network 410 includes a plurality of underlay blockchain nodes 411 and the overlay blockchain network 420 includes a plurality of overlay blockchain nodes 421.
The upper layer blockchain node 421 is configured to send the blockchain data in the upper layer blockchain corresponding to the upper layer blockchain network 420 to which the upper layer blockchain node 421 belongs to the lower layer blockchain node 411.
The bottom layer block chain nodes 411 are configured to broadcast the received block data to each bottom layer block chain node 411, so that each bottom layer block chain node 411 stores the block data in a bottom layer block chain corresponding to the bottom layer block chain network 410 through consensus verification.
It should be noted that the implementation, solved technical problems, implemented functions, and achieved technical effects of each module/unit/subunit and the like in the apparatus part embodiment are respectively the same as or similar to the implementation, solved technical problems, implemented functions, and achieved technical effects of each corresponding step in the method part embodiment, and are not described herein again.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, the security processing module 310 and the verification module 320 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, the secure processing module 310 and the verification module 320 may be implemented at least partially as hardware circuits, such as Field Programmable Gate Arrays (FPGAs), Programmable Logic Arrays (PLAs), systems on a chip, systems on a substrate, systems on a package, Application Specific Integrated Circuits (ASICs), or may be implemented in hardware or firmware by any other reasonable manner of integrating or packaging circuits, or in any one of three implementations of software, hardware and firmware, or in any suitable combination of any of them. Alternatively, the security processing module 310, the authentication module 320 may be at least partly implemented as computer program modules, which, when executed, may perform corresponding functions.
Fig. 5 schematically shows a block diagram of a computer device adapted to implement the above described method according to an embodiment of the present disclosure. The computer device shown in fig. 5 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
As shown in fig. 5, a computer device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the apparatus 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, device 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The device 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (8)

1. A data verification method of a block chain, wherein the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the method is applied to the upper layer block chain nodes and comprises the following steps:
sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node;
for any block in an upper layer block chain corresponding to an upper layer block chain network to which the node belongs, acquiring block data corresponding to the block and stored in a bottom layer block chain, and verifying the validity of the block based on the block data;
the block data comprises hash values corresponding to the blocks;
the obtaining block data corresponding to the block and stored in the bottom layer block chain, and the verifying the validity of the block based on the block data includes: and acquiring a hash value corresponding to the block and stored in the bottom layer block chain, determining that the block is illegal when the acquired hash value is different from the hash value currently corresponding to the block, and determining that the block is legal when the acquired hash value is the same as the hash value currently corresponding to the block.
2. The method of claim 1, wherein when the block is determined to be illegal, performing data recovery on the block by using block data corresponding to the block and stored by an underlying block chain.
3. The method of claim 1, wherein different networks of upper zone block chains correspond to different upper zone block chains, the different upper zone block chains storing transaction information corresponding to different types of transactions.
4. A data verification device of a block chain, wherein the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the device is applied to the upper layer block chain nodes and comprises the following steps:
the safety processing module is used for sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain nodes, so that the block data are stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node;
the verification module is used for acquiring block data corresponding to the block stored in the bottom layer block chain for any block in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs, and verifying the validity of the block based on the block data;
the block data comprises hash values corresponding to the blocks;
the verification module acquires block data corresponding to the block and stored in the bottom layer block chain, and verifying the validity of the block based on the block data comprises the following steps: the verification module is configured to obtain a hash value corresponding to the block and stored in the underlying block chain, determine that the block is illegal when the obtained hash value is different from the hash value currently corresponding to the block, and determine that the block is legal when the obtained hash value is the same as the hash value currently corresponding to the block.
5. The apparatus of claim 4, further comprising:
and the recovery module is used for performing data recovery on the block by using the block data which is stored in the bottom layer block chain and corresponds to the block when the block is determined to be illegal.
6. The apparatus of claim 4, wherein different networks of upper zone block chains correspond to different upper zone block chains, the different upper zone block chains storing transaction information corresponding to different types of transactions.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the data processing method of a blockchain according to any one of claims 1 to 3 when executing the program.
8. A computer-readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform a method of data processing of a blockchain as claimed in any one of claims 1 to 3.
CN201811622433.5A 2018-12-28 2018-12-28 Verification method and device for data of block chain, electronic equipment and storage medium Active CN109493061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811622433.5A CN109493061B (en) 2018-12-28 2018-12-28 Verification method and device for data of block chain, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811622433.5A CN109493061B (en) 2018-12-28 2018-12-28 Verification method and device for data of block chain, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109493061A CN109493061A (en) 2019-03-19
CN109493061B true CN109493061B (en) 2021-03-23

Family

ID=65712928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811622433.5A Active CN109493061B (en) 2018-12-28 2018-12-28 Verification method and device for data of block chain, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109493061B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768202A (en) * 2019-04-24 2020-10-13 北京京东尚科信息技术有限公司 Payment verification method, payment verification node, full-amount node and storage medium
CN110995664B (en) * 2019-11-15 2021-10-08 国网河南省电力公司信息通信公司 Block chain-based Internet of things heterogeneous identifier analysis system and method
CN110942316A (en) * 2019-12-04 2020-03-31 趣派(海南)信息科技有限公司 Transfer verification method and system based on multi-party verification
CN111143381B (en) * 2019-12-11 2023-05-19 支付宝(杭州)信息技术有限公司 Method and device for updating trust points in multi-layer block chain structure
CN111262921B (en) * 2020-01-13 2022-11-11 北京百度网讯科技有限公司 Application request processing method, device, equipment and medium based on block chain network
CN112333173B (en) * 2020-03-11 2023-07-04 合肥达朴汇联科技有限公司 Data transmission method, system, equipment and storage medium based on data provider
CN111061813B (en) * 2020-03-16 2020-07-07 支付宝(杭州)信息技术有限公司 Method, apparatus and computing device for data synchronization in blockchain network
CN111488349A (en) * 2020-04-08 2020-08-04 北京瑞策科技有限公司 Data query method and device based on service data block chain
CN111915301B (en) * 2020-08-05 2022-08-26 腾讯科技(深圳)有限公司 Data processing method and device based on block chain, electronic equipment and readable medium
CN112633882A (en) * 2020-12-28 2021-04-09 青岛海链数字科技有限公司 Block chain network, data storage method and device, electronic equipment and storage medium
CN113010903A (en) * 2021-02-22 2021-06-22 杭州肥牛信息科技有限公司 Catering industry oil smoke online monitoring method and system based on block chain

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273759A (en) * 2017-05-08 2017-10-20 上海点融信息科技有限责任公司 Method, equipment and computer-readable recording medium for protecting block chain data
CN107358420A (en) * 2017-06-09 2017-11-17 北京博晨技术有限公司 Method for realizing the block catenary system of focus account and realizing focus account
EP3413254A1 (en) * 2017-06-06 2018-12-12 Siemens Aktiengesellschaft Method and device for providing a transaction dataset

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273759A (en) * 2017-05-08 2017-10-20 上海点融信息科技有限责任公司 Method, equipment and computer-readable recording medium for protecting block chain data
EP3413254A1 (en) * 2017-06-06 2018-12-12 Siemens Aktiengesellschaft Method and device for providing a transaction dataset
CN107358420A (en) * 2017-06-09 2017-11-17 北京博晨技术有限公司 Method for realizing the block catenary system of focus account and realizing focus account

Also Published As

Publication number Publication date
CN109493061A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109493061B (en) Verification method and device for data of block chain, electronic equipment and storage medium
KR102469024B1 (en) Digital certificate verification method and apparatus, computer device, and storage medium
US11501533B2 (en) Media authentication using distributed ledger
CN109067543B (en) Digital certificate management method, device, computer equipment and storage medium
WO2018076760A1 (en) Block chain-based transaction processing method, system, electronic device, and storage medium
CN108492183B (en) Block chain account transaction method, system and computer readable storage medium
US9530009B2 (en) Secure execution and update of application module code
CN108270874B (en) Application program updating method and device
CN109727132B (en) Method and device for acquiring block chain consensus node, electronic equipment and storage medium
US20210200750A1 (en) Method and device of processing data for blockchain, and blockchain system
CN111258599B (en) Firmware upgrade method, system and computer readable storage medium
TW202111568A (en) Shared blockchain data storage based on error correction coding in trusted execution environments
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
CN108696356B (en) Block chain-based digital certificate deleting method, device and system
CN110084600B (en) Processing and verifying method, device, equipment and medium for resolution transaction request
CN113746638B (en) NFT storage method, NFT restoration method, computer device, and storage medium
US9203616B1 (en) Multi-server fault tolerant data store update
CN109698806B (en) User data verification method and system
US11307790B2 (en) Method, device, and computer program product for managing data placement
CN111698227B (en) Information synchronization management method, device, computer system and readable storage medium
CN113986578A (en) Message checking method and first equipment
KR102019558B1 (en) Efficient signature verification method for digital signatures using implicit certificates
CN111147477B (en) Verification method and device based on block chain network
CN114398678A (en) Registration verification method and device for preventing electronic file from being tampered, electronic equipment and medium
CN111724168A (en) Transaction verification method and device based on block chain, electronic equipment and medium

Legal Events

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