WO2019024631A1 - Blockchain lightweight processing method, blockchain node and storage medium - Google Patents

Blockchain lightweight processing method, blockchain node and storage medium Download PDF

Info

Publication number
WO2019024631A1
WO2019024631A1 PCT/CN2018/093377 CN2018093377W WO2019024631A1 WO 2019024631 A1 WO2019024631 A1 WO 2019024631A1 CN 2018093377 W CN2018093377 W CN 2018093377W WO 2019024631 A1 WO2019024631 A1 WO 2019024631A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
optimized
original
chain
blockchain
Prior art date
Application number
PCT/CN2018/093377
Other languages
French (fr)
Chinese (zh)
Inventor
阎军智
Original Assignee
中国移动通信有限公司研究院
中国移动通信集团有限公司
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 中国移动通信有限公司研究院, 中国移动通信集团有限公司 filed Critical 中国移动通信有限公司研究院
Publication of WO2019024631A1 publication Critical patent/WO2019024631A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0609Buyer or seller confidence or verification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • 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
    • 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/3263Cryptographic 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 certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements

Definitions

  • the present disclosure relates to the field of information technology, and in particular, to a blockchain lightweight processing method, a blockchain node, and a computer storage medium.
  • Blockchain technology is a chained data structure that combines data blocks in a chronological order in a sequential manner, and cryptographically guarantees a non-tamperable and unforgeable distributed ledger.
  • the core technology of blockchain is to use blockchain data structure to verify and store data, use distributed node consensus algorithm to generate and update data, and use cryptography to ensure data transmission and access security.
  • a big problem with blockchains is that they contain all the historical transactions. As the volume of transactions increases, the blocks in the blockchain will also increase, and the data of the entire blockchain will become larger and larger. The demand for storage and computing resources will increase.
  • the present disclosure provides a blockchain lightweight processing method, a blockchain node, and a non-volatile computer storage medium.
  • the present disclosure provides a blockchain lightweight processing method, where the method is applied to a first blockchain node and includes: generating and storing a block header according to block information of an original block to be deleted.
  • An optimized block of the block wherein the optimized block is used to form an optimized chain;
  • the block header of the optimized block includes at least: a first hash value of the parent block of the optimized block;
  • the block body of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is the first optimized block in the optimization chain,
  • the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is a non-first optimized block in the optimization chain, the new generation
  • the block header of the optimized block includes: a second hash value of the previous optimized block; and after the generating the optimized block, deleting the original block to be deleted, wherein the optimized chain includes : at least one original block and the optimized block, wherein The at least one original block
  • the method further includes: broadcasting the optimized block in a blockchain network; receiving a verification result returned by the second block chain node based on a consensus mechanism; and broadcasting the optimized block by verifying, wherein The optimized block is used for the second block chain node to replace the original block to be deleted in the blockchain.
  • deleting the original block to be deleted includes: when the verification result indicates that the optimized block passes the verification, deleting the original block to be deleted.
  • the method further includes determining whether the Mth original block meets a preset deletion condition. And generating, according to the block information of the original block to be deleted, the optimized block including the block header and the block body, including: if the Mth original block satisfies the preset deletion condition, extracting the The hash value of the block header of the Mth block constructs the block body of the optimized block.
  • deleting the original block to be deleted includes: if the currently generated optimized block is the first optimized block, deleting the M+1 original block and the All original blocks between the world blocks; or if the currently generated optimized block is not the first optimized block, delete all original blocks between the M+1th original block and the previous optimized block .
  • the determining whether the Mth original block meets the preset deletion condition includes at least one of: determining whether the generation time of the Mth original block corresponds to an optimized time point of the optimized time interval; determining the Whether the Mth original block is an original block corresponding to the optimized quantity interval, wherein if the optimized quantity interval is N, if the optimized block is the first optimized block and the Mth block is the first block When the N+1 original blocks are used, the Mth original block satisfies the preset deletion condition; if the optimized block is the xth optimized block and the Mth block is the x*N +1 original block, the Mth original block satisfies the preset deletion condition; determining whether the transaction information recorded by the Mth original block has exceeded a validity period; when the Mth original area If the transaction information recorded in the block has exceeded the validity period, the Mth original block is considered to satisfy the preset deletion condition.
  • the block body of the optimized block further includes: at least one of a random number, a time stamp, and a Merkel root of the last original block to be deleted.
  • the present disclosure provides a blockchain lightweight processing method, where the method is applied to a second blockchain node and includes: receiving an optimized block broadcasted by a first blockchain node, wherein the optimized block Used to form an optimized chain.
  • the block header of the optimized block includes: a first hash value of the parent block of the optimized block; the block body of the optimized block includes at least: the last one of the original blocks to be deleted a second hash value of the block; if the optimized block is the first optimized block in the optimization chain, the block header of the optimized block includes: a section of the creation block of the optimization chain a hash value; if the optimized block is a non-first optimized block in the optimization chain, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block Wherein the optimization chain includes: at least one original block and the optimized block, wherein the at least one original block includes at least: the creation zone; or the creation zone and remaining Original block.
  • the method further includes: determining, according to the first hash value and the second
  • the method further includes: receiving an optimized block to be verified broadcasted by the first blockchain; verifying the optimized block based on a consensus mechanism; and returning the verification result to the first blockchain node. And receiving, by the first blockchain node, an optimized block, including receiving the optimized block that is verified.
  • the present disclosure provides a blockchain node, which is a first blockchain node and includes an optimization unit and a deletion unit, and the optimization unit is configured to use the block information of the original block to be deleted. And generating, and storing, an optimized block including a block header and a block body, wherein the optimized block is used to form an optimization chain; and the block header of the optimized block includes at least: a parent block of the optimized block
  • the first hash value of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is the optimized chain
  • the first optimized block in the block, the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is a non-first in the optimization chain
  • the optimized block, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block.
  • the deleting unit is configured to delete the original block to be deleted after the generating the optimized block, where the optimization chain includes: the creation block
  • the disclosure provides a blockchain node, where the blockchain node is a second blockchain node and includes a receiving unit and a determining unit, where the receiving unit is configured to receive an optimized region broadcast by the first blockchain node a block, wherein the optimized block is used to form an optimization chain; the block header of the optimized block includes at least: a first hash value of a parent block of the optimized block; and an area of the optimized block The block includes at least: a second hash value of the last block in the original block to be deleted; and if the optimized block is the first optimized block in the optimization chain, the optimized block
  • the block header includes: a first hash value of the creation block of the optimization chain; if the optimization block is a non-first optimization block in the optimization chain, the newly generated optimization block
  • the block header includes: a second hash value of the previous optimized block.
  • a determining unit configured to determine, according to the first hash value and the second hash value carried by the optimized block, the original block chain to be deleted.
  • the present disclosure provides a blockchain node, the blockchain node comprising: a transceiver, a memory, a processor, and a computer program stored on the memory and processed by the processor; wherein the processing Connecting to the transceiver and the memory, and for controlling information exchange of the transceiver, storing information of the memory by executing the computer program, and executing a block provided by one or more of the foregoing technical solutions Chain lightweight processing method.
  • the present disclosure provides a non-volatile computer storage medium, wherein the computer storage medium stores a computer program, and after the computer program is executed by a processor, the processor can implement the foregoing first aspect or
  • the second aspect provides a blockchain lightweight processing method.
  • the blockchain lightweight processing method, the blockchain node and the computer storage medium provided by some embodiments of the present disclosure generate an optimized block of the original block in the substitute blockchain, and the optimized block and the remaining in the blockchain
  • the original block forms an optimized chain of optimization.
  • the data volume of the optimization chain is much smaller than the original transaction chain.
  • the storage optimization chain greatly saves the computing resources of storage resources and subsequent queries, and solves the related technology.
  • the problem of large resource consumption such as blockchain storage resources has the characteristics of low resource consumption.
  • 1 is a schematic structural view of an example of a blockchain
  • FIG. 2 is a schematic structural view of another example of a blockchain
  • FIG. 3 is a schematic flowchart diagram of a method for processing a blockchain lightweight according to some embodiments of the present disclosure
  • FIG. 4 is another schematic flowchart of a method for processing a blockchain lightweight according to some embodiments of the present disclosure
  • FIG. 5 is a schematic structural diagram of a transaction chain according to some embodiments of the present disclosure.
  • FIG. 6 is a schematic diagram of the comparison of the transaction chain shown in FIG. 5 and the optimized chain formed after optimization;
  • FIG. 7 is a schematic structural diagram of an optimized chain according to some embodiments of the present disclosure.
  • FIG. 8 is still another schematic flowchart of a method for processing a blockchain lightweight according to some embodiments of the present disclosure
  • FIG. 9 is a schematic structural diagram of a first blockchain node according to some embodiments of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a second blockchain node according to some embodiments of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a blockchain node according to some embodiments of the present disclosure.
  • the blockchain lightweight processing method, the blockchain node and the non-volatile computer storage medium provided by the present disclosure can at least partially solve the problem of large resource consumption such as storage resources in the blockchain technology.
  • blocks are sequentially generated in chronological order and connected into chains, and each block records transaction information generated during creation, and is obtained based on each block chain node in the blockchain network.
  • a recognized transaction of the consensus mechanism will be permanently stored in the blockchain.
  • the data structure of the block is generally divided into a block header and a block body.
  • the block header of each block contains the hash value of the previous block (ie, the parent block), thereby forming a chain from the creation block to the current block, and determining each area.
  • the block header of the latter block includes the hash value stored in the block header of the previous block.
  • the blockchain uses the Merkle tree to summarize all the transactions in a block, and the Merkle root is a summary of all transactions, any transaction information in the block. Changes will change the Merkle root.
  • the block body contains the verified transaction information generated during the block creation process. As shown in FIG.
  • the block header of the block k includes the hash value in the block header of the block k-1; and the block header of each block further includes information such as a random number, a time stamp of the generation time, and the like.
  • a block may record multiple transaction information, and the timestamp here may also be the transaction timestamp for each transaction.
  • the original block is an original block in which one or more pieces of transaction information are stored in the block body; and the optimized block is a block for generating an optimized chain in which transaction information is not stored.
  • FIG. 3 provides a blockchain lightweight processing method, which is applied to a first blockchain node and includes steps S110-S120.
  • Step S110 Generate and store an optimized block including the block header and the block body according to the block information of the original block to be deleted.
  • the optimization block is configured to form an optimization chain; the block header of the optimization block includes at least: a first hash value of a parent block of the optimized block; and a block body of the optimized block And at least comprising: a second hash value of the last block in the original block to be deleted; if the optimized block is the first optimized block in the optimization chain, the area of the optimized block
  • the block header includes: a first hash value of the creation block of the optimization chain; if the optimization block is a non-first optimized block in the optimization chain, the newly generated region of the optimized block
  • the block header includes: a second hash value of the previous optimized block.
  • Step S120 After generating the optimized block, deleting the original block to be deleted.
  • the optimization chain includes: at least one original block and the optimized block, wherein the at least one original block includes at least: the creation zone; or the creation zone and remaining originals Block.
  • the blockchain lightweight processing method provided in FIG. 3 is essentially a method for reducing the data amount of the blockchain, so that the blockchain exhibits a lightweight feature in the amount of data.
  • the blockchain node in Figure 3 can be any one of the blockchain networks, such as a billing node.
  • the first blockchain node first determines a block that can be deleted in the current blockchain.
  • the blockchain here can be a transaction chain that retains a complete block, or an optimized chain of optimization.
  • the optimized block and the block structure of the original block are consistent, and both include: a block header and a block body.
  • the block headers are hash values that include the parent block to link between the blocks by hash values.
  • the block of the optimized block does not store the transaction information, but stores the hash value of the currently deleted one block, or the hash value of the block generated by the last one of the deleted plurality of blocks. In this way, other blocks can be linked to the optimized block.
  • a hash value stored in the block body of the optimized block is also used as a hash value of the optimized block itself, and is used for linking in other blocks.
  • one or more optimization blocks may be included in one optimization chain.
  • the first optimized block is directly linked to the creation block of the trading chain.
  • the creation block is the first block of a trading chain.
  • the non-first optimized block (for example, the second optimized block) is linked to the previous optimized block. Therefore, the block header of the latter optimized block is the hash value stored in the block body including the previous optimized block.
  • the original block to be deleted can be deleted correspondingly, and the correlation of the hash values is equivalent to realizing the optimization of the blockchain, and the optimized chain is generated based on the transaction chain or generated based on the optimized chain. Optimized chain for optimization again.
  • the optimization chain stored in the first block chain node includes: a creation block and an optimization block, or includes: a creation block, an optimization block, and a remaining undeleted original block.
  • the optimization chain provided in this embodiment is a hybrid chain in which mixed blocks are linked.
  • the deletion of the original block and the introduction of the optimized block reduce the amount of data in the blockchain, thereby reducing the amount of data required for the amount of memory blocks, while optimizing the introduction of blocks, maintaining the chain of blockchains.
  • the structure is convenient for subsequent data operations based on chain structure.
  • the method further includes: step S111: broadcasting the optimized block in a blockchain network; step S112: receiving a verification result returned by the second blockchain node based on a consensus mechanism; And step S130: broadcasting the optimized block that passes verification, wherein the optimized block is used by the second block chain node to replace the original block to be deleted in the blockchain.
  • the step S120 may include step S121.
  • the step S121 may include deleting the original block to be deleted when the verification result indicates that the optimized block passes the verification.
  • the generation of the optimized block in this embodiment is also based on a consensus mechanism of the blockchain network. After the first blockchain node generates an optimized block, it can be used only to optimize the locally stored blockchain, but in this embodiment, it will not only be used to optimize the blockchain of local storage, but also used for Optimize blockchains in other blockchain nodes. In this case, the generated optimized block needs to be verified.
  • the optimized block is broadcasted to the entire blockchain network, so that the second block chain node is different from the first blockchain node.
  • the optimized block will be received.
  • the second block chain node can perform optimization of the optimized block based on the voting mode of the consensus mechanism, and form a corresponding verification result.
  • the first blockchain node receives the verification result, and the verification result can be verified by more than half of the blockchain nodes in the blockchain network, or at least a predetermined number of blockchain nodes.
  • the optimized block is authenticated, the optimized block is the verified block and can be used to replace some of the original blocks in the relevant block.
  • the first block chain node broadcasts the optimized block again.
  • the other block chain node performs optimization of the blockchain, and utilizes the optimized area.
  • the block replaces the original block to be deleted in the associated optimized block to optimize the transaction chain or re-optimize the optimized chain of optimization to reduce the amount of data in the blockchain.
  • the optimized block in this embodiment is generated based on the consensus mechanism of the blockchain network.
  • the optimized block can be used for optimization of the corresponding blockchain in the entire blockchain network, so that if the zone is All the blockchain nodes in the blockchain network receive the optimized block, and the entire network stores the optimized chain instead of the transaction chain. Obviously, for the entire blockchain network, the amount of data stored and the computing resources required to maintain the blockchain are reduced.
  • the method further includes deleting the optimized block that failed the verification when it is determined that the corresponding optimized block fails the verification based on the verification result returned by the second block chain node.
  • Figure 5 shows a transaction chain that includes all of the original blocks.
  • Figure 6 shows an alignment of an optimization chain and a transaction chain including optimized blocks.
  • the optimization chain includes: a creation block and an inter-optimized block 1 and an optimized block 2. All blocks in the trading chain are original blocks.
  • the method further includes: determining whether the Mth original block meets a preset deletion condition.
  • the step S110 may include: if the Mth original block satisfies the preset deletion condition, extract a hash value of the block header of the Mth block to construct a block body of the optimized block.
  • the step S120 may include deleting all the original blocks between the M+1th original block and the creation zone if the currently generated optimized block is the first optimized block. .
  • substantially one optimized block corresponds to one original block.
  • the current optimized block corresponds to the Mth original block
  • the two cases are treated substantially, if the currently generated optimized block is a block.
  • the block header of the optimized block stores at least a hash value of the creation block, and the block body stores at least a hash value of the Mth original block.
  • the step S120 may include deleting all the originals between the M+1 original block and the previous optimized block if the currently generated optimized block is not the first optimized block. Block.
  • the currently generated optimized block is not the first optimized block, for example, the Nth optimized block
  • the deleted original block includes: the Mth original block, the Mth original block, and the Nth -1 optimizes all original blocks between blocks. In essence, it also deletes the current Mth original block, and all the original blocks between the Mth original block and the creation block.
  • FIG. 7 is a schematic diagram of an optimization chain in which only one optimized block is generated.
  • the original block included in the optimization chain shown in FIG. 7 includes optimization blocks such as the original block n and other optimization blocks in addition to the creation block. The remaining original blocks after the block.
  • the optimization chain shown in Figure 6 is an optimized chain that includes at least two optimized blocks. It can be seen from Fig. 6 that the original block is not inserted between the two optimized blocks.
  • the method further includes: determining which original blocks are deletable blocks, that is, determining which blocks satisfy the preset deletion condition. Since the blocks including the transaction information are generated in chronological order, the attributes in terms of information utility are also related to the generation time. If a subsequent original block can be deleted, the corresponding previous original block can also be deleted. Based on this feature, the following provides several alternative ways to determine whether the Mth original block is a block that meets the preset condition.
  • the determining whether the Mth original block meets the preset deletion condition comprises: determining whether the generation time of the Mth original block is an optimized time point corresponding to the optimized time interval.
  • blockchain optimization is performed at certain optimization time intervals, for example, periodic optimization of blockchains.
  • blockchain optimization is performed for one month or one year as an optimization cycle.
  • the original block with the optimized time point corresponding to the optimization time interval may be the last original block optimized at one time. For example, if the optimization interval is 1 year, the original block that was generated 1 year ago can be deleted, and then an original block whose time point is closest to the current time point one year ago is generated, that is, the Mth Original block. And the original block generated before the block can be the original block deleted.
  • the method includes: determining whether the Mth original block is an original block corresponding to the optimized quantity interval, where, if the optimized quantity interval is N, If the optimized block is the first optimized block and the Mth block is the N+1th original block, the Mth original block satisfies the preset deletion condition; The block is the xth optimized block and the Mth block is the x*N+1th original block, and the Mth original block satisfies the preset deletion condition.
  • the blockchain is optimized once. For example, if N is equal to 10,000, then for each 10,000 original blocks, a blockchain optimization is performed to generate an optimized block, and the corresponding 10,000 original blocks are deleted to generate at least: creation The optimized chain of blocks and optimized blocks.
  • Determining whether the Mth original block satisfies the preset deletion condition comprises: determining whether the transaction information recorded by the Mth original block has exceeded a validity period; and when the transaction information recorded in the Mth original block has been If the validity period is exceeded, the Mth original block is considered to satisfy the preset deletion condition.
  • the certificate information assigned to the corresponding user is stored, and the certificate information is time-efficient.
  • the certificate information is time-efficient.
  • the certificate information stored in the block of the original block may be considered invalid.
  • the block may be deleted.
  • the information state of the original block can be considered to satisfy the preset storage condition.
  • the certificate information here may be one of the aforementioned transaction information.
  • the certificate information here may include: an authorization certificate and user information of an authorization certificate.
  • the block body of the optimized block further includes: at least one of a random number, a time stamp, and a Merkel root of the last original block to be deleted.
  • the information of the block header of the last block that can be directly deleted in step S110 is included in the block body of the optimized block.
  • FIG. 8 provides a blockchain weighting processing method applied to a second block chain node and including steps S210-S230.
  • Step S210 Receive an optimized block broadcast by the first blockchain node.
  • the optimization block is configured to form an optimization chain;
  • the block header of the optimization block includes at least: a first hash value of a parent block of the optimized block; and a block body of the optimized block And at least comprising: a second hash value of the last block in the original block to be deleted; if the optimized block is the first optimized block in the optimization chain, the area of the optimized block
  • the block header includes: a first hash value of the creation block of the optimization chain; if the optimization block is a non-first optimized block in the optimization chain, the newly generated region of the optimized block
  • the block header includes: a second hash value of the previous optimized block.
  • Step S220 Determine, according to the first hash value and the second hash value carried in the optimized block, the block to be deleted in the original blockchain.
  • Step S230 Store the optimized block and delete the block to be deleted.
  • the optimized block generated by the first blockchain can be used not only for the weight reduction processing of its own blockchain, but also for the block of other blockchain nodes. Chain optimization processing.
  • the second blockchain node may live in the first blockchain node to read the optimized block, or receive the blockchain node actively sent by the first blockchain node.
  • the block chain After receiving the optimized block, deleting the hash value stored in the block header and the block body in the optimized block, that is, the first hash value and the second hash value, deleting the block chain to be optimized Corresponding original block, by storing the optimized block, thereby forming a mixed chain including at least one original block and an optimized block (ie, the optimized chain), where at least one original block includes at least: Block.
  • the at least one original block may further include: other original blocks other than the creation block that have not been deleted.
  • the generation of optimized blocks is also based on a consensus mechanism of the blockchain network.
  • the method further includes: receiving an optimized block to be verified broadcasted by the first blockchain; verifying the optimized block based on a consensus mechanism; and returning the verification result to the first blockchain node.
  • the step S210 may include: receiving the optimized block that is verified.
  • the first block chain node will be broadcast to the second block chain node.
  • the blockchain received in step S210 must be an optimized block that passes the verification. By optimizing the broadcast of the block, this allows most of the blockchain nodes of the entire network to store the same optimized chain, or the same optimized chain that is ultimately stored, thereby reducing the blockchain of the entire blockchain network. Resource consumption such as data volume and storage resources.
  • FIG. 9 provides a blockchain node, which is a first blockchain node and includes an optimization unit 110 and a deletion unit 120.
  • the optimization unit 110 is configured to generate and store an optimized block including a block header and a block body according to the block information of the original block to be deleted, where the optimized block is used to form an optimized chain;
  • the block header of the block includes at least: a first hash value of the parent block of the optimized block;
  • the block body of the optimized block includes at least: a first block of the original block in the original block to be deleted a second hash value; if the optimized block is the first optimized block in the optimization chain, the block header of the optimized block includes: a first hash value of the creation block of the optimized chain If the optimized block is a non-first optimized block in the optimization chain, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block.
  • the deleting unit 120 is configured to delete the original block to be deleted after the generating the optimized block, where the optimization chain includes: the creation block and the optimized block and/or remaining original area The optimized chain of blocks.
  • Both the optimization unit 110 and the deletion unit 120 may correspond to a connection structure of a processor and a memory of a physical node where the blockchain node is located.
  • the memory can be used to store various information; the processor is connected to the memory based on a bus interface such as an integrated circuit bus, and the execution of the executable code by a computer program can optimize the transaction chain and generate less data. Optimization chain.
  • the processor may be a central processing unit (CPU), a microprocessor (MCU), a digital signal processor (DSP), an application processor (AP), a programmable array (PLC), or an application specific integrated circuit (ASIC).
  • CPU central processing unit
  • MCU microprocessor
  • DSP digital signal processor
  • AP application processor
  • PLC programmable array
  • ASIC application specific integrated circuit
  • the first blockchain node deletes some blocks that can be deleted in the blockchain.
  • corresponding parameter blocks are generated to form an optimized optimization chain.
  • the optimization block stores a hash value of a previous block (ie, a parent block) in the optimization chain.
  • the negative block here can be a creation block or a previous optimization block.
  • the first blockchain node further includes: a broadcasting unit, configured to broadcast the optimized block in a blockchain network; and a receiving unit, configured to receive the second blockchain node and return based on a consensus mechanism And the broadcast unit is further configured to broadcast the optimized block that is verified by using, wherein the optimized block is used by the second block chain node to replace the original block to be deleted in the blockchain .
  • the deleting unit 120 is specifically configured to: when the verification result indicates that the optimized block passes the verification, delete the original block to be deleted.
  • the broadcast unit and the receiving unit may correspond to a communication interface of a physical node where the first blockchain node is located, and the communication interface may be a network interface, for example, a cable interface, an optical cable interface, a transceiver antenna, and the like. .
  • the first blockchain node further includes: a determining unit, configured to determine whether the Mth original block meets a preset deletion condition.
  • the optimization unit 110 may be specifically configured to: if the Mth original block satisfies the preset deletion condition, extract a hash value of a block header of the Mth block to construct a block of the optimized block body.
  • the deleting unit 120 is specifically configured to: if the currently generated optimized block is the first optimized block, delete all the original blocks between the M+1 original block and the creation zone; or If the currently generated optimized block is not the first optimized block, all the original blocks between the M+1th original block and the previous optimized block are deleted.
  • the determining unit may be configured to: perform at least one of: determining whether an occurrence time of the Mth original block corresponds to an optimized time point of the optimized time interval; and determining whether the Mth original block is an optimized quantity An original block corresponding to the interval, wherein, if the optimized number interval is N, if the optimized block is the first optimized block and the Mth block is the N+1th original block, The Mth original block satisfies the preset deletion condition; if the optimized block is the xth optimized block and the Mth block is the x*N+1th original block, the The Mth original block satisfies the preset deletion condition; determining whether the transaction information recorded by the Mth original block has exceeded a validity period; when the transaction information recorded in the Mth original block has exceeded the For the validity period, the Mth original block is considered to satisfy the preset deletion condition.
  • the block body of the optimized block further includes: at least one of a random number, a time stamp, and a Merkel root of the last original block to be deleted.
  • FIG. 10 provides a block chain node, which is a second block chain node and includes a receiving unit 210, a determining unit 220, and a storage unit 230.
  • the receiving unit 210 is configured to receive an optimized block that is broadcast by the first block chain node, where the optimized block is used to form an optimized chain; the block header of the optimized block includes at least: the optimized block a first hash value of the parent block; the block body of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is The first optimized block in the optimization chain, the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is in the optimization chain The non-first optimized block, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block.
  • the determining unit 220 is configured to determine, according to the first hash value and the second hash value carried by the optimized block, the original block to be deleted.
  • the storage unit 230 is configured to store the optimized block and delete the block to be deleted.
  • the blockchain node here is a second blockchain node, and may be any one of the billing nodes in the blockchain network.
  • the receiving unit 210 corresponds to a transceiver, and can be used for information interaction between the blockchain node and other blockchain nodes.
  • the determining unit 220 herein may also correspond to a processor, and the related description of the processor herein may be referred to the description of the corresponding portion of the foregoing processor.
  • the second blockchain node may be based on the optimized block provided by the first blockchain node to delete the original block corresponding to the optimized block, optimize the locally stored blockchain, and generate a larger amount of data. Less optimization chains or re-optimizing the chain.
  • the receiving unit 210 is further configured to receive an optimized block to be verified that is broadcast by the first blockchain.
  • the second blockchain node may further include: a verification unit, configured to verify the optimized block based on a consensus mechanism; and a sending unit that returns the verification result to the first blockchain node.
  • the receiving unit 210 is specifically configured to receive the optimized block that is verified.
  • the optimized block directly received by the receiving unit 210 is an optimized area that passes verification, so that the authenticity and reliability of the blockchain optimized by the optimized block can be ensured.
  • FIG. 11 also provides a blockchain node including: a transceiver 310, a memory 320, a processor 330, and a computer stored on the memory 320 and processed by the processor 330. program.
  • the processor 330 is connected to the transceiver 310 and the memory 320, respectively, and is configured to control information exchange of the transceiver 310, information storage of the memory 320 by executing the computer program, and the foregoing Or a blockchain lightweight processing method provided by multiple technical solutions.
  • the processor 330 can implement the blockchain lightweight processing method illustrated in FIG. 3, FIG. 4, and/or FIG. 8 by execution of a computer program.
  • the blockchain node provided in this embodiment may be various blockchain nodes such as a first blockchain node, a second blockchain node, and a third blockchain node.
  • the processor 330 can be coupled to the transceiver 310 and the memory 320 via an integrated circuit (IIC) bus.
  • IIC integrated circuit
  • the transceiver 310 can include various communication interfaces to which physical nodes are connected to the network, such as cable interfaces, fiber optic cable interfaces, and transceiver antennas.
  • Some embodiments of the present disclosure also provide a computer storage medium that can be volatile or non-volatile and that stores a computer program that, when executed by a processor, is capable of
  • the blockchain lightweight processing method provided by one or more of the foregoing technical solutions is implemented, for example, the blockchain lightweight processing method shown in FIG. 3, FIG. 4, and/or FIG.
  • the computer storage medium provided by some embodiments of the present disclosure includes: a removable storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like.
  • the medium of the program code may be a non-book storage medium.
  • This example provides a way to generate an optimized chain.
  • the transaction chain is shown in Figure 7, which corresponds to the optimized chain of the transaction chain.
  • the transaction chain and optimization chain here can be collectively referred to as a blockchain. After the optimization chain is generated, the corresponding transaction chain can be deleted.
  • the transaction chain uses the associated blockchain technique to generate each original block containing the transaction information, and the original block link constitutes the transaction chain. If the historical block before a original block in the transaction chain is no longer used, or the probability of use is very small, then it can be optimized at the block chain node to form the optimization chain.
  • the optimization chain mainly stores the block part information in the storage optimization chain, and then by storing the optimization chain, all the blocks between the block and the founding block can be deleted.
  • Each block of the optimization chain corresponds to an original block in the transaction chain, and the blocks between the corresponding original block and the creation block in the transaction chain can be deleted and not stored.
  • the optimized chain block 1 corresponds to the transaction chain block M
  • the optimized chain block 2 corresponds to the transaction chain block N
  • Each block in the optimization chain is also divided into a block header and a block body, and the block header includes a hash value of the parent block header, so that the block is connected to form a chain structure, and further includes a Merkle root, a random number, and a time stamp. And other information.
  • the block body contains the hash value of the block header of the corresponding block in the transaction chain.
  • the block header hash value of the transaction chain block M is included in the block body in the optimized chain block 1
  • the block header hash value of the transaction chain block N is included in the block body in the optimized chain block 2.
  • the original block in the transaction chain corresponding to the latest optimization block of the optimization chain needs to be found, and the corresponding original block in the transaction chain and the original of the transaction chain can be deleted. All blocks between the block and the found block.
  • the optimization chain of the optimized chain node only needs to store the creation block, the optimized block, and the transaction chain after the original partition block (ie, the remaining original block), and the optimized transaction chain is still a chain structure.
  • Figure 6 is a schematic diagram of the structure of the optimized chain after optimization.
  • the latest optimized block in the optimization chain corresponds to the original block M of the transaction chain, and then the block chain node can delete all the blocks between the storage creation block and the original block M+1, and only need to be stored.
  • the block header of the original block M+1 of the transaction chain contains the block header hash value of the block M
  • the optimized block 2 also contains the block header hash value of the block M. Therefore, the optimized block 2 and the transaction chain are optimized. A chain structure can still be formed between the blocks M+1.
  • Each block in the optimization chain corresponds to an original block in the transaction chain, so all users can verify it.
  • the block header of each block in the optimization chain contains the hash value of the parent block header and contains the block header hash value of the corresponding block in the transaction chain. Therefore, after the original block corresponding to the corresponding transaction chain is deleted, the optimized optimization chain is formed together with the initial block and the optimized block. The optimized chain still has a chain structure, and all nodes can participate in the verification.
  • the latest nodes of the storage optimization chain can be restricted, that is, the history blocks that can be deleted are limited. For example, you can only delete blocks generated one year ago or blocks before the latest 10,000 blocks. Thus, if the optimization chain is forged, it is necessary to forge all the blocks in the year or the latest 10,000 blocks, which is almost impossible to complete in the blockchain technology.
  • each block in the optimization chain corresponds to an original block in the transaction chain, and the original block in the transaction chain and the block between the original block and the creation block can be deleted. storage.
  • the present disclosure provides an optimization chain: each block in the optimization chain corresponds to an original block of the transaction chain, and each block of the optimized block contains a block header hash corresponding to the transaction chain block. value.
  • the present disclosure also provides a blockchain lightweight storage method: finding the original block of the transaction chain corresponding to the latest block of the optimized chain, the original block of the transaction chain amount, and the transaction chain block and the founding area can be deleted. All blocks between blocks. In this way, the blockchain node only needs to store the creation block, the storage optimization chain, and the transaction chain after deleting some blocks, and the optimized transaction chain is still a chain structure.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed by the processor.
  • the processor executes the steps comprising the above described method embodiments.
  • the foregoing storage medium may be volatile or non-volatile, and includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), and a magnetic memory.
  • ROM read-only memory
  • RAM random access memory
  • magnetic memory A variety of media that can store program code, such as a disc or a disc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

Provided are a blockchain lightweight processing method, a blockchain node, and a computer storage medium. The blockchain lightweight processing method applied to a first blockchain node comprises: according to block information about an original block to be deleted, generating and storing an optimized block comprising a block header and a block body; and after the optimized block is generated, deleting the original block to be deleted.

Description

区块链轻量化处理方法、区块链节点及存储介质Blockchain lightweight processing method, blockchain node and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请主张在2017年8月3日在中国提交的中国专利申请号No.201710657350.9的优先权,其全部内容通过引用包含于此。Priority is claimed on Japanese Patent Application No. 201710657350.9, filed on Jan. 3,,,,,,,,
技术领域Technical field
本公开涉及信息技术领域,尤其涉及一种区块链轻量化处理方法、区块链节点及计算机存储介质。The present disclosure relates to the field of information technology, and in particular, to a blockchain lightweight processing method, a blockchain node, and a computer storage medium.
背景技术Background technique
区块链技术是一种按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学方式保证其不可篡改和不可伪造的分布式账本。区块链的核心技术是利用块链式数据结构来验证与存储数据、利用分布式节点共识算法来生成和更新数据、利用密码学的方式保证数据传输和访问的安全。Blockchain technology is a chained data structure that combines data blocks in a chronological order in a sequential manner, and cryptographically guarantees a non-tamperable and unforgeable distributed ledger. The core technology of blockchain is to use blockchain data structure to verify and store data, use distributed node consensus algorithm to generate and update data, and use cryptography to ensure data transmission and access security.
区块链的一个很大问题在于其中会包含所有的历史交易,随着交易量的增加,区块链中的区块也将不断增多,整个区块链的数据会越来越大,对节点存储和计算资源的需求会越来越高。A big problem with blockchains is that they contain all the historical transactions. As the volume of transactions increases, the blocks in the blockchain will also increase, and the data of the entire blockchain will become larger and larger. The demand for storage and computing resources will increase.
发明内容Summary of the invention
本公开提供一种区块链轻量化处理方法、区块链节点及非易失性计算机存储介质。The present disclosure provides a blockchain lightweight processing method, a blockchain node, and a non-volatile computer storage medium.
第一方面,本公开提供一种区块链轻量化处理方法,该方法应用于第一区块链节点中且包括:根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的 区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值;以及在生成所述优化区块之后,删除所述待删除的原始区块,其中,所述优化链包括:至少一个原始区块及所述优化区块,其中,所述至少一个原始区块至少包括:所述创世区块;或,所述创世区块及剩余原始区块。In a first aspect, the present disclosure provides a blockchain lightweight processing method, where the method is applied to a first blockchain node and includes: generating and storing a block header according to block information of an original block to be deleted. An optimized block of the block, wherein the optimized block is used to form an optimized chain; the block header of the optimized block includes at least: a first hash value of the parent block of the optimized block; The block body of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is the first optimized block in the optimization chain, The block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is a non-first optimized block in the optimization chain, the new generation The block header of the optimized block includes: a second hash value of the previous optimized block; and after the generating the optimized block, deleting the original block to be deleted, wherein the optimized chain includes : at least one original block and the optimized block, wherein The at least one original block includes at least: the creation zone block; or the creation zone block and the remaining original block.
其中,所述方法还包括:在区块链网络中广播所述优化区块;接收第二区块链节点基于共识机制返回的验证结果;以及广播通过验证的所述优化区块,其中,所述优化区块,用于第二区块链节点替代区块链中待删除的原始区块。The method further includes: broadcasting the optimized block in a blockchain network; receiving a verification result returned by the second block chain node based on a consensus mechanism; and broadcasting the optimized block by verifying, wherein The optimized block is used for the second block chain node to replace the original block to be deleted in the blockchain.
其中,所述在生成所述优化区块之后,删除所述待删除的原始区块,包括:当所述验证结果表明优化区块通过验证.时,删除所述待删除的原始区块。After the generating the optimized block, deleting the original block to be deleted includes: when the verification result indicates that the optimized block passes the verification, deleting the original block to be deleted.
其中,所述方法还包括判断第M个原始区块是否满足预设删除条件。所述根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块,包括:若所述第M个原始区块满足所述预设删除条件,提取所述第M个区块的区块头的的散列值构建所述优化区块的区块体。所述在生成所述优化区块之后,删除所述待删除的原始区块,包括:若当前生成的优化区块为首个优化区块,则删除第M+1个原始区块及所述创世区块之间的所有原始区块;或若当前生成的优化区块为非首个优化区块,则删除第M+1个原始区块到前一个优化区块之间的所有原始区块。The method further includes determining whether the Mth original block meets a preset deletion condition. And generating, according to the block information of the original block to be deleted, the optimized block including the block header and the block body, including: if the Mth original block satisfies the preset deletion condition, extracting the The hash value of the block header of the Mth block constructs the block body of the optimized block. After the generating the optimized block, deleting the original block to be deleted includes: if the currently generated optimized block is the first optimized block, deleting the M+1 original block and the All original blocks between the world blocks; or if the currently generated optimized block is not the first optimized block, delete all original blocks between the M+1th original block and the previous optimized block .
其中,所述判断第M个原始区块是否满足预设删除条件,包括以下至少之一:判断所述第M个原始区块的产生时间是否对应于优化时间间隔的优化时刻点;判断所述第M个原始区块是否为优化数量间隔对应的原始区块,其中,若所述优化数量间隔为N个,若所述优化区块为首个优化区块且所述第M个区块为第N+1个原始区块时,所第M个原始区块满足所述预设删除条件;若所述优化区块为第x个优化区块且所述第M个区块为第x*N+1个原始区块,则所述第M个原始区块满足所述预设删除条件;判断所述第M个原始区块记载的交易信息是否已超过有效期;当所述第M个原始区块记载的交易信息已超过了所述有效期,则认为所述第M个原始区块满足所述预设删除 条件。The determining whether the Mth original block meets the preset deletion condition includes at least one of: determining whether the generation time of the Mth original block corresponds to an optimized time point of the optimized time interval; determining the Whether the Mth original block is an original block corresponding to the optimized quantity interval, wherein if the optimized quantity interval is N, if the optimized block is the first optimized block and the Mth block is the first block When the N+1 original blocks are used, the Mth original block satisfies the preset deletion condition; if the optimized block is the xth optimized block and the Mth block is the x*N +1 original block, the Mth original block satisfies the preset deletion condition; determining whether the transaction information recorded by the Mth original block has exceeded a validity period; when the Mth original area If the transaction information recorded in the block has exceeded the validity period, the Mth original block is considered to satisfy the preset deletion condition.
其中,所述优化区块的区块体还具体包括:待删除的最后一个原始区块的随机数、时间戳及默克尔根的至少其中之一。The block body of the optimized block further includes: at least one of a random number, a time stamp, and a Merkel root of the last original block to be deleted.
第二方面,本公开提供一种区块链轻量化处理方法,该方法应用于第二区块链节点且包括:接收第一区块链节点广播的优化区块,其中,所述优化区块用于组成优化链。所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值;其中,所述优化链包括:至少一个原始区块及所述优化区块,其中,所述至少一个原始区块至少包括:所述创世区块;或,所述创世区块及剩余原始区块。该方法还包括:根据所述优化区块携带的第一散列值及第二散列值,确定出原始区块链待删除的区块;以及存储所述优化区块并删除所述待删除的区块。In a second aspect, the present disclosure provides a blockchain lightweight processing method, where the method is applied to a second blockchain node and includes: receiving an optimized block broadcasted by a first blockchain node, wherein the optimized block Used to form an optimized chain. The block header of the optimized block includes: a first hash value of the parent block of the optimized block; the block body of the optimized block includes at least: the last one of the original blocks to be deleted a second hash value of the block; if the optimized block is the first optimized block in the optimization chain, the block header of the optimized block includes: a section of the creation block of the optimization chain a hash value; if the optimized block is a non-first optimized block in the optimization chain, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block Wherein the optimization chain includes: at least one original block and the optimized block, wherein the at least one original block includes at least: the creation zone; or the creation zone and remaining Original block. The method further includes: determining, according to the first hash value and the second hash value carried by the optimized block, a block to be deleted in the original blockchain; and storing the optimized block and deleting the to-be-deleted Block.
其中,所述方法还包括:接收所述第一区块链广播的待验证的优化区块;基于共识机制验证所述优化区块;以及将所述验证结果返回给所述第一区块链节点。所述接收第一区块链节点广播的优化区块,包括接收通过验证的所述优化区块。The method further includes: receiving an optimized block to be verified broadcasted by the first blockchain; verifying the optimized block based on a consensus mechanism; and returning the verification result to the first blockchain node. And receiving, by the first blockchain node, an optimized block, including receiving the optimized block that is verified.
第三方面,本公开提供一种区块链节点,所述区块链节点为第一区块链节点且包括优化单元和删除单元,优化单元用于根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值。删除单元用于在生成所述优化区块之后,删除所述待删除的原始区块,其中,所述优化链包括:所述 创世区块及所述优化区块和/或剩余原始区块的优化链。In a third aspect, the present disclosure provides a blockchain node, which is a first blockchain node and includes an optimization unit and a deletion unit, and the optimization unit is configured to use the block information of the original block to be deleted. And generating, and storing, an optimized block including a block header and a block body, wherein the optimized block is used to form an optimization chain; and the block header of the optimized block includes at least: a parent block of the optimized block The first hash value of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is the optimized chain The first optimized block in the block, the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is a non-first in the optimization chain The optimized block, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block. The deleting unit is configured to delete the original block to be deleted after the generating the optimized block, where the optimization chain includes: the creation block and the optimized block and/or remaining original blocks Optimization chain.
第四方面,本公开提供一种区块链节点,所述区块链节点为第二区块链节点且包括接收单元和确定单元,接收单元用于接收第一区块链节点广播的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值。确定单元,用于根据所述优化区块携带的第一散列值及第二散列值,确定出原始区块链待删除的区块。In a fourth aspect, the disclosure provides a blockchain node, where the blockchain node is a second blockchain node and includes a receiving unit and a determining unit, where the receiving unit is configured to receive an optimized region broadcast by the first blockchain node a block, wherein the optimized block is used to form an optimization chain; the block header of the optimized block includes at least: a first hash value of a parent block of the optimized block; and an area of the optimized block The block includes at least: a second hash value of the last block in the original block to be deleted; and if the optimized block is the first optimized block in the optimization chain, the optimized block The block header includes: a first hash value of the creation block of the optimization chain; if the optimization block is a non-first optimization block in the optimization chain, the newly generated optimization block The block header includes: a second hash value of the previous optimized block. And a determining unit, configured to determine, according to the first hash value and the second hash value carried by the optimized block, the original block chain to be deleted.
第五方面,本公开提供一种区块链节点,该区块链节点包括:收发器、存储器、处理器及存储在所述存储器上并由所述处理器处理的计算机程序;其中所述处理器与所述收发器及所述存储器连接,并且用于通过执行所述计算机程序控制所述收发器的信息交互、所述存储器的信息存储,并执行前述一个或多个技术方案提供的区块链轻量化处理方法。In a fifth aspect, the present disclosure provides a blockchain node, the blockchain node comprising: a transceiver, a memory, a processor, and a computer program stored on the memory and processed by the processor; wherein the processing Connecting to the transceiver and the memory, and for controlling information exchange of the transceiver, storing information of the memory by executing the computer program, and executing a block provided by one or more of the foregoing technical solutions Chain lightweight processing method.
第六方面,本公开提供一种非易失性计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行后,所述处理器能够实现前述第一方面或第二方面提供的区块链轻量化处理方法。In a sixth aspect, the present disclosure provides a non-volatile computer storage medium, wherein the computer storage medium stores a computer program, and after the computer program is executed by a processor, the processor can implement the foregoing first aspect or The second aspect provides a blockchain lightweight processing method.
本公开的一些实施例提供的区块链轻量化处理方法、区块链节点及计算机存储介质,会生成替代区块链中原始区块的优化区块,该优化区块与区块链中剩余的原始区块,形成一个优化后的优化链。该优化链的数据量远远小于原始的交易链,相对于存储保留了完整原始区块的交易链,存储优化链大大的节省了存储资源和后续查询等处理的计算资源,解决了相关技术中区块链存储资源等资源消耗大的问题,具有资源消耗小的特点。The blockchain lightweight processing method, the blockchain node and the computer storage medium provided by some embodiments of the present disclosure generate an optimized block of the original block in the substitute blockchain, and the optimized block and the remaining in the blockchain The original block forms an optimized chain of optimization. The data volume of the optimization chain is much smaller than the original transaction chain. Compared with the transaction chain that retains the complete original block, the storage optimization chain greatly saves the computing resources of storage resources and subsequent queries, and solves the related technology. The problem of large resource consumption such as blockchain storage resources has the characteristics of low resource consumption.
附图说明DRAWINGS
图1为区块链的示例的结构示意图;1 is a schematic structural view of an example of a blockchain;
图2为区块链的另一示例的结构示意图;2 is a schematic structural view of another example of a blockchain;
图3为本公开的一些实施例提供的区块链轻量化处理方法的流程示意图;FIG. 3 is a schematic flowchart diagram of a method for processing a blockchain lightweight according to some embodiments of the present disclosure;
图4为本公开的一些实施例提供的区块链轻量化处理方法的另一流程示意图;4 is another schematic flowchart of a method for processing a blockchain lightweight according to some embodiments of the present disclosure;
图5为本公开的一些实施例提供的交易链的结构示意图;FIG. 5 is a schematic structural diagram of a transaction chain according to some embodiments of the present disclosure;
图6为图5所示的交易链及优化后形成的优化链的比对示意图;6 is a schematic diagram of the comparison of the transaction chain shown in FIG. 5 and the optimized chain formed after optimization;
图7为本公开的一些实施例提供的优化链的结构示意图;FIG. 7 is a schematic structural diagram of an optimized chain according to some embodiments of the present disclosure;
图8为本公开的一些实施例提供的区块链轻量化处理方法的又一流程示意图;FIG. 8 is still another schematic flowchart of a method for processing a blockchain lightweight according to some embodiments of the present disclosure;
图9为本公开的一些实施例提供的第一区块链节点的结构示意图;FIG. 9 is a schematic structural diagram of a first blockchain node according to some embodiments of the present disclosure;
图10为本公开的一些实施例提供的第二区块链节点的结构示意图;以及FIG. 10 is a schematic structural diagram of a second blockchain node according to some embodiments of the present disclosure;
图11为本公开的一些实施例提供的区块链节点的结构示意图。FIG. 11 is a schematic structural diagram of a blockchain node according to some embodiments of the present disclosure.
具体实施方式Detailed ways
以下结合说明书附图及具体实施例对本公开的技术方案做进一步的详细阐述。The technical solutions of the present disclosure are further elaborated below in conjunction with the drawings and specific embodiments.
本公开提供的区块链轻量化处理方法、区块链节点及非易失性计算机存储介质可以至少部分解决区块链技术中存储资源等资源消耗大的问题。The blockchain lightweight processing method, the blockchain node and the non-volatile computer storage medium provided by the present disclosure can at least partially solve the problem of large resource consumption such as storage resources in the blockchain technology.
以下介绍以下交易链的区块的相关信息。The following describes the information about the blocks in the following trading chains.
如图1所示,在区块链技术中,区块按时间顺序逐个先后生成并连接成链,每一个区块记录了创建期间产生的交易信息,得到区块链网络中各区块链节点基于共识机制的公认的交易将在区块链中永久存储。如图1所示,区块的数据结构一般分为区块头和区块体。As shown in FIG. 1 , in the blockchain technology, blocks are sequentially generated in chronological order and connected into chains, and each block records transaction information generated during creation, and is obtained based on each block chain node in the blockchain network. A recognized transaction of the consensus mechanism will be permanently stored in the blockchain. As shown in Figure 1, the data structure of the block is generally divided into a block header and a block body.
如图2所示,每个区块的区块头包含了前一个区块(即父区块)的散列值,从而形成从创世区块到当前区块的链条,并确定了每个区块在整个区块链中所处的位置。通常后一个区块的区块头包括前一个区块的区块头内存储的散列值。为防止区块中的交易被篡改,区块链使用了默克尔(Merkle)树来归纳一个区块中的所有交易,Merkle根则是所有交易的摘要,区块中任意一笔交易信息的改变都会改变Merkle根。区块体则包含了经过验证的、区块创建过程中产生的交易信息。如图2所示,区块k的区块头包括区块k-1的 区块头中的散列值;且每一个区块的区块头中还包含随机数、产生时间的时间戳等信息。一个区块可能记录多笔交易信息,这里的时间戳还可能是每一个交易的交易时间戳。As shown in Figure 2, the block header of each block contains the hash value of the previous block (ie, the parent block), thereby forming a chain from the creation block to the current block, and determining each area. The location of the block in the entire blockchain. Usually the block header of the latter block includes the hash value stored in the block header of the previous block. In order to prevent the transactions in the block from being tampered with, the blockchain uses the Merkle tree to summarize all the transactions in a block, and the Merkle root is a summary of all transactions, any transaction information in the block. Changes will change the Merkle root. The block body contains the verified transaction information generated during the block creation process. As shown in FIG. 2, the block header of the block k includes the hash value in the block header of the block k-1; and the block header of each block further includes information such as a random number, a time stamp of the generation time, and the like. A block may record multiple transaction information, and the timestamp here may also be the transaction timestamp for each transaction.
其中,原始区块为区块体中存储有一个或多笔交易信息的原始区块;而优化区块为不存储有交易信息的用于产生优化链的区块。The original block is an original block in which one or more pieces of transaction information are stored in the block body; and the optimized block is a block for generating an optimized chain in which transaction information is not stored.
如图3所示,图3提供区块链轻量化处理方法,该方法应用于第一区块链节点中并且包括步骤S110-S120。As shown in FIG. 3, FIG. 3 provides a blockchain lightweight processing method, which is applied to a first blockchain node and includes steps S110-S120.
步骤S110:根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块。其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值。Step S110: Generate and store an optimized block including the block header and the block body according to the block information of the original block to be deleted. The optimization block is configured to form an optimization chain; the block header of the optimization block includes at least: a first hash value of a parent block of the optimized block; and a block body of the optimized block And at least comprising: a second hash value of the last block in the original block to be deleted; if the optimized block is the first optimized block in the optimization chain, the area of the optimized block The block header includes: a first hash value of the creation block of the optimization chain; if the optimization block is a non-first optimized block in the optimization chain, the newly generated region of the optimized block The block header includes: a second hash value of the previous optimized block.
步骤S120:在生成所述优化区块之后,删除所述待删除的原始区块。其中,所述优化链包括:至少一个原始区块及所述优化区块,其中,所述至少一个原始区块至少包括:所述创世区块;或,所述创世区块及剩余原始区块。Step S120: After generating the optimized block, deleting the original block to be deleted. The optimization chain includes: at least one original block and the optimized block, wherein the at least one original block includes at least: the creation zone; or the creation zone and remaining originals Block.
图3提供的区块链轻量化处理方法,实质上是减少区块链的数据量的方法,从而使得区块链在数据量上呈现轻量的特点。The blockchain lightweight processing method provided in FIG. 3 is essentially a method for reducing the data amount of the blockchain, so that the blockchain exhibits a lightweight feature in the amount of data.
在图3中所述区块链节点可为区块链网络中的任意一个节点,例如一个记账节点。The blockchain node in Figure 3 can be any one of the blockchain networks, such as a billing node.
在本实施例中所述第一区块链节点首先会确定出可以当前区块链中可以删除的区块。这里的区块链可为保留了完整区块的交易链,或者,经过优化后的优化链。In this embodiment, the first blockchain node first determines a block that can be deleted in the current blockchain. The blockchain here can be a transaction chain that retains a complete block, or an optimized chain of optimization.
在本实施例中所述优化区块和原始区块的区块结构是一致的,都包括:区块头和区块体。区块头都是包括父区块的散列值,以通过散列值进行区块之间的链接。优化区块的区块体内不存储交易信息,而是存储当前删除一个区块的散列值,或删除的多个区块中的最后一个产生的区块的散列值。这样 的话,其他区块就可以链接到该优化区块。在本实施例中,优化区块的区块体中存储的一个散列值实质上也作为该优化区块自身的散列值,用于其他区块进行链接。In the embodiment, the optimized block and the block structure of the original block are consistent, and both include: a block header and a block body. The block headers are hash values that include the parent block to link between the blocks by hash values. The block of the optimized block does not store the transaction information, but stores the hash value of the currently deleted one block, or the hash value of the block generated by the last one of the deleted plurality of blocks. In this way, other blocks can be linked to the optimized block. In this embodiment, a hash value stored in the block body of the optimized block is also used as a hash value of the optimized block itself, and is used for linking in other blocks.
在本实施例中,一个优化链中可以包括一个或多个优化区块。第一个优化区块是直接链接到交易链的创世区块的。创世区块为一个交易链的首个区块。非首个优化区块,(例如,第二个优化区块)是链接到前一个优化区块的。故,后一个优化区块的区块头是包括前一个优化区块的区块体中存储的散列值。In this embodiment, one or more optimization blocks may be included in one optimization chain. The first optimized block is directly linked to the creation block of the trading chain. The creation block is the first block of a trading chain. The non-first optimized block (for example, the second optimized block) is linked to the previous optimized block. Therefore, the block header of the latter optimized block is the hash value stored in the block body including the previous optimized block.
在生成一个优化区块之后,可以对应的删除待删除的原始区块,而通过散列值的相互关联,相当于实现了区块链的优化,基于交易链产生了优化链或基于优化链产生了再次优化的优化链。After generating an optimized block, the original block to be deleted can be deleted correspondingly, and the correlation of the hash values is equivalent to realizing the optimization of the blockchain, and the optimized chain is generated based on the transaction chain or generated based on the optimized chain. Optimized chain for optimization again.
这样至少第一区块链节点中存储的优化链,包括:创世区块及优化区块,或者,包括:创世区块、优化区块及剩余未删除的原始区块。这样的话,本实施例中提供的优化链是一种混合区块链接而成的混合链。Thus, at least the optimization chain stored in the first block chain node includes: a creation block and an optimization block, or includes: a creation block, an optimization block, and a remaining undeleted original block. In this case, the optimization chain provided in this embodiment is a hybrid chain in which mixed blocks are linked.
总之,原始区块的删除及优化区块的引入,减少了区块链的数据量,从而减少因为存储区块量所需的数据量,同时优化区块的引入,保持了区块链的链式结构,方便后续基于链式结构的数据操作。In summary, the deletion of the original block and the introduction of the optimized block reduce the amount of data in the blockchain, thereby reducing the amount of data required for the amount of memory blocks, while optimizing the introduction of blocks, maintaining the chain of blockchains. The structure is convenient for subsequent data operations based on chain structure.
可选地,如图4所示,所述方法还包括:步骤S111:在区块链网络中广播所述优化区块;步骤S112:接收第二区块链节点基于共识机制返回的验证结果;和步骤S130:广播通过验证的所述优化区块,其中,所述优化区块,用于第二区块链节点替代区块链中待删除的原始区块。Optionally, as shown in FIG. 4, the method further includes: step S111: broadcasting the optimized block in a blockchain network; step S112: receiving a verification result returned by the second blockchain node based on a consensus mechanism; And step S130: broadcasting the optimized block that passes verification, wherein the optimized block is used by the second block chain node to replace the original block to be deleted in the blockchain.
所述步骤S120可包括步骤S121。The step S120 may include step S121.
所述步骤S121可包括:当所述验证结果表明优化区块通过验证.时,删除所述待删除的原始区块。The step S121 may include deleting the original block to be deleted when the verification result indicates that the optimized block passes the verification.
在本实施例中所述优化区块的生成,也是基于区块链网络的共识机制的。当第一区块链节点生成一个优化区块之后,可以直接仅用于优化本地存储的区块链,但是在本实施例中不仅会用于优化本地存储的区块链,而且还会用于优化其他区块链节点中的区块链。这样的话,生成的优化区块就需要进行验证。The generation of the optimized block in this embodiment is also based on a consensus mechanism of the blockchain network. After the first blockchain node generates an optimized block, it can be used only to optimize the locally stored blockchain, but in this embodiment, it will not only be used to optimize the blockchain of local storage, but also used for Optimize blockchains in other blockchain nodes. In this case, the generated optimized block needs to be verified.
在本实施例中,第一区块链节点生成优化区块之后,会向整个区块链网络广播所述优化区块,这样与所述第一区块链节点不同的第二区块链节点就会接收到所述优化区块。这样的话,第二区块链节点基于共识机制的投票方式等,可以进行优化区块的验证,并形成对应的验证结果。In this embodiment, after the first blockchain node generates the optimized block, the optimized block is broadcasted to the entire blockchain network, so that the second block chain node is different from the first blockchain node. The optimized block will be received. In this case, the second block chain node can perform optimization of the optimized block based on the voting mode of the consensus mechanism, and form a corresponding verification result.
这样后续,第一区块链节点会接收到验证结果,该验证结果可在表明区块链网络中超过半数以上的区块链节点对其验证通过,或者,至少预定个数的区块链节点认证该优化区块通过验证时,该优化区块才为通过验证的区块,才可以用于替代相关的区块中部分原始区块。In this way, the first blockchain node receives the verification result, and the verification result can be verified by more than half of the blockchain nodes in the blockchain network, or at least a predetermined number of blockchain nodes. When the optimized block is authenticated, the optimized block is the verified block and can be used to replace some of the original blocks in the relevant block.
当一个优化区块通过验证之后,第一区块链节点会再次广播该优化区块,这时其他区块链节点接收到该优化区块之后,会进行区块链的优化,利用该优化区块替代相关的优化区块中待删除的原始区块,以优化交易链或再次优化已优化过的优化链,以减少区块链的数据量。After an optimized block passes the verification, the first block chain node broadcasts the optimized block again. At this time, after receiving the optimized block, the other block chain node performs optimization of the blockchain, and utilizes the optimized area. The block replaces the original block to be deleted in the associated optimized block to optimize the transaction chain or re-optimize the optimized chain of optimization to reduce the amount of data in the blockchain.
本实施例中的优化区块是基于区块链网络的共识机制认证生成,则这样的话,该优化区块可以用于整个区块链网络中对应的区块链的优化,这样的话,若区块链网络中所有区块链节点都接收到该优化区块,则整个网络存储的都是所述优化链,而非交易链。显然这样对于整个区块链网络而言,都减少存储的数据量和维护该区块链所需的计算资源等。The optimized block in this embodiment is generated based on the consensus mechanism of the blockchain network. In this case, the optimized block can be used for optimization of the corresponding blockchain in the entire blockchain network, so that if the zone is All the blockchain nodes in the blockchain network receive the optimized block, and the entire network stores the optimized chain instead of the transaction chain. Obviously, for the entire blockchain network, the amount of data stored and the computing resources required to maintain the blockchain are reduced.
在一些实施例中,所述方法还包括:当基于第二区块链节点返回的验证结果确定出对应的优化区块未通过验证时,删除未通过验证的优化区块。In some embodiments, the method further includes deleting the optimized block that failed the verification when it is determined that the corresponding optimized block fails the verification based on the verification result returned by the second block chain node.
图5示出包括所有原始区块的交易链。Figure 5 shows a transaction chain that includes all of the original blocks.
图6示出包括优化区块的优化链和交易链的比对示意图。优化链包括:创世区块和相互链接的优化区块1和优化区块2。而交易链中所有的区块都是原始区块。Figure 6 shows an alignment of an optimization chain and a transaction chain including optimized blocks. The optimization chain includes: a creation block and an inter-optimized block 1 and an optimized block 2. All blocks in the trading chain are original blocks.
可选地,所述方法还包括:判断第M个原始区块是否满足预设删除条件。所述步骤S110可包括:若所述第M个原始区块满足所述预设删除条件,提取所述第M个区块的区块头的散列值构建所述优化区块的区块体。Optionally, the method further includes: determining whether the Mth original block meets a preset deletion condition. The step S110 may include: if the Mth original block satisfies the preset deletion condition, extract a hash value of the block header of the Mth block to construct a block body of the optimized block.
在一些实施例中,所述步骤S120可包括:若当前生成的优化区块为首个优化区块,则删除第M+1个原始区块及所述创世区块之间的所有原始区块。In some embodiments, the step S120 may include deleting all the original blocks between the M+1th original block and the creation zone if the currently generated optimized block is the first optimized block. .
在本实施例中实质上一个优化区块对应于一个原始区块,例如,当前优 化区块对应于第M个原始区块,实质区分两种情况对待,若当前生成的优化区块为区块链中的首个优化区块,创世区块为区块链中的第1个原始区块,则删除的是第2个原始区块到第M个原始区块。若M等于1万,则删除的是第2个原始区块到第1万个原始区块,取而代之的是一个优化区块。该优化区块的区块头至少存储创世区块的散列值,区块体至少存储第M个原始区块的散列值。In this embodiment, substantially one optimized block corresponds to one original block. For example, the current optimized block corresponds to the Mth original block, and the two cases are treated substantially, if the currently generated optimized block is a block. The first optimized block in the chain, the creation block is the first original block in the blockchain, and the second original block to the Mth original block are deleted. If M is equal to 10,000, the second original block is deleted to the 10,000th original block, and an optimized block is replaced. The block header of the optimized block stores at least a hash value of the creation block, and the block body stores at least a hash value of the Mth original block.
在另一些实施例中,所述步骤S120可包括:若当前生成的优化区块为非首个优化区块,则删除第M+1个原始区块到前一个优化区块之间的所有原始区块。In other embodiments, the step S120 may include deleting all the originals between the M+1 original block and the previous optimized block if the currently generated optimized block is not the first optimized block. Block.
例如,当前生成的优化区块为非首个优化区块,例如,为第N个优化区块,则删除的原始区块包括:第M个原始区块、第M个原始区块到第N-1个优化区块之间的所有原始区块。实质上,也是删除当前第M个原始区块,及第M个原始区块至创世区块之间的所有的原始区块。For example, the currently generated optimized block is not the first optimized block, for example, the Nth optimized block, and the deleted original block includes: the Mth original block, the Mth original block, and the Nth -1 optimizes all original blocks between blocks. In essence, it also deletes the current Mth original block, and all the original blocks between the Mth original block and the creation block.
图7为仅生成了一个优化区块的优化链的示意图,该图7所示的优化链中包括的原始区块除了创世区块以外,还包括原始区块n等优化区块1等优化区块以后的剩余原始区块。图6中展示的优化链为包括了至少两个优化区块的优化链。从图6可知,两个优化区块之间不会插入有原始区块。FIG. 7 is a schematic diagram of an optimization chain in which only one optimized block is generated. The original block included in the optimization chain shown in FIG. 7 includes optimization blocks such as the original block n and other optimization blocks in addition to the creation block. The remaining original blocks after the block. The optimization chain shown in Figure 6 is an optimized chain that includes at least two optimized blocks. It can be seen from Fig. 6 that the original block is not inserted between the two optimized blocks.
在本实施例中,所述方法还包括:判断哪些原始区块是可删除的区块,即判断哪些区块是满足预设删除条件。因为包括交易信息的区块是按照时间先后顺序生成的,在信息效用等方面的属性,也是与生成时间相关的。若一个在后的原始区块可以删除,则对应的在前的原始区块也可以删除。基于该特点,以下提供几种可以判断第M个原始区块是否为满足预设条件的区块的可选方式。In this embodiment, the method further includes: determining which original blocks are deletable blocks, that is, determining which blocks satisfy the preset deletion condition. Since the blocks including the transaction information are generated in chronological order, the attributes in terms of information utility are also related to the generation time. If a subsequent original block can be deleted, the corresponding previous original block can also be deleted. Based on this feature, the following provides several alternative ways to determine whether the Mth original block is a block that meets the preset condition.
可选方式一:Optional one:
所述判断第M个原始区块是否满足预设删除条件,包括:判断所述第M个原始区块的产生时间是否为优化时间间隔对应的优化时刻点。The determining whether the Mth original block meets the preset deletion condition comprises: determining whether the generation time of the Mth original block is an optimized time point corresponding to the optimized time interval.
例如,按照一定的优化时间间隔进行区块链的优化,例如,周期性的优化区块链。例如,按照一个月或一年为一个优化周期,进行区块链的优化。优化时间间隔对应的有优化时刻点的原始区块可为一次优化的最后一个原始 区块。例如,优化时间间隔为1年,则产生与1年前的原始区块都可以删除掉,则产生时刻点与一年前的当前时刻点最近的一个原始区块,即为所述第M个原始区块。且该区块之前产生的原始区块都可为删除的原始区块。For example, blockchain optimization is performed at certain optimization time intervals, for example, periodic optimization of blockchains. For example, blockchain optimization is performed for one month or one year as an optimization cycle. The original block with the optimized time point corresponding to the optimization time interval may be the last original block optimized at one time. For example, if the optimization interval is 1 year, the original block that was generated 1 year ago can be deleted, and then an original block whose time point is closest to the current time point one year ago is generated, that is, the Mth Original block. And the original block generated before the block can be the original block deleted.
可选方式二:Option 2:
所述判断第M个原始区块是否满足预设删除条件,包括:判断所述第M个原始区块是否为优化数量间隔对应的原始区块,其中,若所述优化数量间隔为N个,若所述优化区块为首个优化区块且所述第M个区块为第N+1个原始区块时,所第M个原始区块满足所述预设删除条件;若所述优化区块为第x个优化区块且所述第M个区块为第x*N+1个原始区块,则所述第M个原始区块满足所述预设删除条件。Determining whether the Mth original block satisfies the preset deletion condition, the method includes: determining whether the Mth original block is an original block corresponding to the optimized quantity interval, where, if the optimized quantity interval is N, If the optimized block is the first optimized block and the Mth block is the N+1th original block, the Mth original block satisfies the preset deletion condition; The block is the xth optimized block and the Mth block is the x*N+1th original block, and the Mth original block satisfies the preset deletion condition.
在本方式中若区块链每产生N个原始区块,则进行一次区块链的优化。例如,N等于1万,则每产生1万个原始区块,则进行一次区块链的优化,产生一个优化区块,并删除对应的1万个原始区块,以生成至少包括:创世区块及优化区块的优化链。In this mode, if each of the N original blocks is generated in the blockchain, the blockchain is optimized once. For example, if N is equal to 10,000, then for each 10,000 original blocks, a blockchain optimization is performed to generate an optimized block, and the corresponding 10,000 original blocks are deleted to generate at least: creation The optimized chain of blocks and optimized blocks.
可选方式三:Option 3:
所述判断第M个原始区块是否满足预设删除条件,包括:判断所述第M个原始区块记载的交易信息是否已超过有效期;当所述第M个原始区块记载的交易信息已超过了所述有效期,则认为所述第M个原始区块满足所述预设删除条件。Determining whether the Mth original block satisfies the preset deletion condition comprises: determining whether the transaction information recorded by the Mth original block has exceeded a validity period; and when the transaction information recorded in the Mth original block has been If the validity period is exceeded, the Mth original block is considered to satisfy the preset deletion condition.
例如,交易链中每一个原始区块的区块体中存储有分配给对应用户的证书信息,而证书信息是有一定时效性的,当该证书信息已经超过有效期,即时效性已经丧失,则可认为该原始区块的区块体内存储的证书信息已经无效,为了节省存储空间,可以删除该区块。则可认为该原始区块的信息状态满足所述预设存储条件。这里的证书信息可为前述交易信息的一种。这里的证书信息可包括:授权证书及授权证书的用户信息等。For example, in each block of the original block in the transaction chain, the certificate information assigned to the corresponding user is stored, and the certificate information is time-efficient. When the certificate information has exceeded the validity period, the immediate effect has been lost. The certificate information stored in the block of the original block may be considered invalid. To save storage space, the block may be deleted. Then, the information state of the original block can be considered to satisfy the preset storage condition. The certificate information here may be one of the aforementioned transaction information. The certificate information here may include: an authorization certificate and user information of an authorization certificate.
进一步地,所述优化区块的区块体,还具体包括:待删除的最后一个原始区块的随机数、时间戳及默克尔根的至少其中之一。在步骤S110中可以直接待删除的最后一个区块的区块头的信息包括在优化区块的区块体中。Further, the block body of the optimized block further includes: at least one of a random number, a time stamp, and a Merkel root of the last original block to be deleted. The information of the block header of the last block that can be directly deleted in step S110 is included in the block body of the optimized block.
如图8所示,图8提供区块链轻量化处理方法,该方法应用于第二区块 链节点且包括步骤S210-S230。As shown in FIG. 8, FIG. 8 provides a blockchain weighting processing method applied to a second block chain node and including steps S210-S230.
步骤S210:接收第一区块链节点广播的优化区块。其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值。Step S210: Receive an optimized block broadcast by the first blockchain node. The optimization block is configured to form an optimization chain; the block header of the optimization block includes at least: a first hash value of a parent block of the optimized block; and a block body of the optimized block And at least comprising: a second hash value of the last block in the original block to be deleted; if the optimized block is the first optimized block in the optimization chain, the area of the optimized block The block header includes: a first hash value of the creation block of the optimization chain; if the optimization block is a non-first optimized block in the optimization chain, the newly generated region of the optimized block The block header includes: a second hash value of the previous optimized block.
步骤S220:根据所述优化区块携带的第一散列值及第二散列值,确定出原始区块链待删除的区块。Step S220: Determine, according to the first hash value and the second hash value carried in the optimized block, the block to be deleted in the original blockchain.
步骤S230:存储所述优化区块并删除所述待删除的区块。Step S230: Store the optimized block and delete the block to be deleted.
本实施例提供的区块链轻量化处理方法,第一区块链生成的优化区块不仅可以用于其自身的区块链的轻量化处理,而且可以用于其他区块链节点的区块链的优化处理。In the blockchain lightweight processing method provided in this embodiment, the optimized block generated by the first blockchain can be used not only for the weight reduction processing of its own blockchain, but also for the block of other blockchain nodes. Chain optimization processing.
在本实施例中第二区块链节点可以住到到第一区块链节点中读取优化区块,或者接收第一区块链节点主动发送的区块链节点。In this embodiment, the second blockchain node may live in the first blockchain node to read the optimized block, or receive the blockchain node actively sent by the first blockchain node.
在接收到优化区块之后,根据优化区块中区块头和区块体存储的散列值,即所述第一散列值及所述第二散列值,删除待优化的区块链中的对应的原始区块,通过存储优化区块,从而形成了包括:至少一个原始区块及优化区块的混合链(即所述优化链),这里的至少一个原始区块,至少包括:传世区块。在另一些实施例中,所述至少一个原始区块,还可包括:创世区块以外其他尚未删除的原始区块。After receiving the optimized block, deleting the hash value stored in the block header and the block body in the optimized block, that is, the first hash value and the second hash value, deleting the block chain to be optimized Corresponding original block, by storing the optimized block, thereby forming a mixed chain including at least one original block and an optimized block (ie, the optimized chain), where at least one original block includes at least: Block. In other embodiments, the at least one original block may further include: other original blocks other than the creation block that have not been deleted.
在一些实施例中,为了确保区块链的真实性和可靠性,优化区块的生成也是基于区块链网络的共识机制的。所述方法还包括:接收所述第一区块链广播的待验证的优化区块;基于共识机制验证所述优化区块;以及将所述验证结果返回给所述第一区块链节点。所述步骤S210可包括:接收通过验证的所述优化区块。In some embodiments, to ensure the authenticity and reliability of the blockchain, the generation of optimized blocks is also based on a consensus mechanism of the blockchain network. The method further includes: receiving an optimized block to be verified broadcasted by the first blockchain; verifying the optimized block based on a consensus mechanism; and returning the verification result to the first blockchain node. The step S210 may include: receiving the optimized block that is verified.
例如基于共识机制中的投票方式验证过的优化区块,第一区块链节点才会广播给第二区块链节点。这样的话,步骤S210中接收的区块链一定是通过 验证的优化区块。通过优化区块的广播,这样可以使整个网络的大部分区块链节点,存储的是同一个优化链,或,最终存储的同一个优化链,从而减少整个区块链网络的区块链的数据量及存储资源等资源消耗。For example, based on the optimized block verified by the voting method in the consensus mechanism, the first block chain node will be broadcast to the second block chain node. In this case, the blockchain received in step S210 must be an optimized block that passes the verification. By optimizing the broadcast of the block, this allows most of the blockchain nodes of the entire network to store the same optimized chain, or the same optimized chain that is ultimately stored, thereby reducing the blockchain of the entire blockchain network. Resource consumption such as data volume and storage resources.
如图9所示,图9提供区块链节点,所述区块链节点为第一区块链节点且包括优化单元110和删除单元120。优化单元110用于根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值。As shown in FIG. 9, FIG. 9 provides a blockchain node, which is a first blockchain node and includes an optimization unit 110 and a deletion unit 120. The optimization unit 110 is configured to generate and store an optimized block including a block header and a block body according to the block information of the original block to be deleted, where the optimized block is used to form an optimized chain; The block header of the block includes at least: a first hash value of the parent block of the optimized block; the block body of the optimized block includes at least: a first block of the original block in the original block to be deleted a second hash value; if the optimized block is the first optimized block in the optimization chain, the block header of the optimized block includes: a first hash value of the creation block of the optimized chain If the optimized block is a non-first optimized block in the optimization chain, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block.
删除单元120用于在生成所述优化区块之后,删除所述待删除的原始区块,其中,所述优化链包括:所述创世区块及所述优化区块和/或剩余原始区块的优化链。The deleting unit 120 is configured to delete the original block to be deleted after the generating the optimized block, where the optimization chain includes: the creation block and the optimized block and/or remaining original area The optimized chain of blocks.
所述优化单元110及删除单元120都可以对应于区块链节点所在物理节点的处理器及存储器的连接结构。所述存储器可以用于进行各种信息的储存;所述处理器基于集成电路总线等总线接口与所述存储器连接,通过计算机程序等可执行代码的执行,可以优化交易链,生成数据量更少的优化链。Both the optimization unit 110 and the deletion unit 120 may correspond to a connection structure of a processor and a memory of a physical node where the blockchain node is located. The memory can be used to store various information; the processor is connected to the memory based on a bus interface such as an integrated circuit bus, and the execution of the executable code by a computer program can optimize the transaction chain and generate less data. Optimization chain.
所述处理器可为中央处理器(CPU)、微处理器(MCU)、数字信号处理器(DSP)、应用处理器(AP)、可编程阵列(PLC)或专用集成电路(ASIC)等可进行信息处理的结构。The processor may be a central processing unit (CPU), a microprocessor (MCU), a digital signal processor (DSP), an application processor (AP), a programmable array (PLC), or an application specific integrated circuit (ASIC). The structure for information processing.
本实施例中所述第一区块链节点会删除区块链中部分可以删除的区块,为了确保区块链的链式结构,会生成对应的参数区块,形成优化后的优化链。所述优化区块,存储有优化链中前一个区块(即父区块)的散列值。这里的负区块可为创世区块或前一个优化区块。In the embodiment, the first blockchain node deletes some blocks that can be deleted in the blockchain. To ensure the chain structure of the blockchain, corresponding parameter blocks are generated to form an optimized optimization chain. The optimization block stores a hash value of a previous block (ie, a parent block) in the optimization chain. The negative block here can be a creation block or a previous optimization block.
可选地,所述第一区块链节点,还包括:广播单元,用于在区块链网络中广播所述优化区块;接收单元,用于接收第二区块链节点基于共识机制返回的验证结果;和所述广播单元,还用于广播通过验证的所述优化区块,其 中,所述优化区块,用于第二区块链节点替代区块链中待删除的原始区块。Optionally, the first blockchain node further includes: a broadcasting unit, configured to broadcast the optimized block in a blockchain network; and a receiving unit, configured to receive the second blockchain node and return based on a consensus mechanism And the broadcast unit is further configured to broadcast the optimized block that is verified by using, wherein the optimized block is used by the second block chain node to replace the original block to be deleted in the blockchain .
所述删除单元120,具体用于当所述验证结果表明优化区块通过验证.时,删除所述待删除的原始区块。The deleting unit 120 is specifically configured to: when the verification result indicates that the optimized block passes the verification, delete the original block to be deleted.
在本实施例中,所述广播单元及接收单元,都可以对应于第一区块链节点所在物理节点的通信接口,该通信接口可为网络接口,例如,电缆接口、光缆接口及收发天线等。In this embodiment, the broadcast unit and the receiving unit may correspond to a communication interface of a physical node where the first blockchain node is located, and the communication interface may be a network interface, for example, a cable interface, an optical cable interface, a transceiver antenna, and the like. .
可选地,所述第一区块链节点还包括:判断单元,用于判断第M个原始区块是否满足预设删除条件。所述优化单元110,具体可用于若所述第M个原始区块满足所述预设删除条件,提取所述第M个区块的区块头的散列值构建所述优化区块的区块体。所述删除单元120,具体可用于若当前生成的优化区块为首个优化区块,则删除第M+1个原始区块及所述创世区块之间的所有原始区块;或,若当前生成的优化区块为非首个优化区块,则删除第M+1个原始区块到前一个优化区块之间的所有原始区块。Optionally, the first blockchain node further includes: a determining unit, configured to determine whether the Mth original block meets a preset deletion condition. The optimization unit 110 may be specifically configured to: if the Mth original block satisfies the preset deletion condition, extract a hash value of a block header of the Mth block to construct a block of the optimized block body. The deleting unit 120 is specifically configured to: if the currently generated optimized block is the first optimized block, delete all the original blocks between the M+1 original block and the creation zone; or If the currently generated optimized block is not the first optimized block, all the original blocks between the M+1th original block and the previous optimized block are deleted.
所述判断单元,具体可用于执行以下至少之一:判断所述第M个原始区块的产生时间是否对应于优化时间间隔的优化时刻点;判断所述第M个原始区块是否为优化数量间隔对应的原始区块,其中,若所述优化数量间隔为N个,若所述优化区块为首个优化区块且所述第M个区块为第N+1个原始区块时,所第M个原始区块满足所述预设删除条件;若所述优化区块为第x个优化区块且所述第M个区块为第x*N+1个原始区块,则所述第M个原始区块满足所述预设删除条件;判断所述第M个原始区块记载的交易信息是否已超过有效期;当所述第M个原始区块记载的交易信息已超过了所述有效期,则认为所述第M个原始区块满足所述预设删除条件。The determining unit may be configured to: perform at least one of: determining whether an occurrence time of the Mth original block corresponds to an optimized time point of the optimized time interval; and determining whether the Mth original block is an optimized quantity An original block corresponding to the interval, wherein, if the optimized number interval is N, if the optimized block is the first optimized block and the Mth block is the N+1th original block, The Mth original block satisfies the preset deletion condition; if the optimized block is the xth optimized block and the Mth block is the x*N+1th original block, the The Mth original block satisfies the preset deletion condition; determining whether the transaction information recorded by the Mth original block has exceeded a validity period; when the transaction information recorded in the Mth original block has exceeded the For the validity period, the Mth original block is considered to satisfy the preset deletion condition.
进一步地,所述优化区块的区块体,还具体包括:待删除的最后一个原始区块的随机数、时间戳及默克尔根的至少其中之一。Further, the block body of the optimized block further includes: at least one of a random number, a time stamp, and a Merkel root of the last original block to be deleted.
如图10所示,图10提供区块链节点,所述区块链节点为第二区块链节点且包括接收单元210、确定单元220和存储单元230。As shown in FIG. 10, FIG. 10 provides a block chain node, which is a second block chain node and includes a receiving unit 210, a determining unit 220, and a storage unit 230.
接收单元210,用于接收第一区块链节点广播的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的 原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值。The receiving unit 210 is configured to receive an optimized block that is broadcast by the first block chain node, where the optimized block is used to form an optimized chain; the block header of the optimized block includes at least: the optimized block a first hash value of the parent block; the block body of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is The first optimized block in the optimization chain, the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is in the optimization chain The non-first optimized block, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block.
确定单元220,用于根据所述优化区块携带的第一散列值及第二散列值,确定出原始区块链待删除的区块。The determining unit 220 is configured to determine, according to the first hash value and the second hash value carried by the optimized block, the original block to be deleted.
存储单元230,用于存储所述优化区块并删除所述待删除的区块。The storage unit 230 is configured to store the optimized block and delete the block to be deleted.
这里的区块链节点为第二区块链节点,可以为区块链网络中的任意一个记账节点。The blockchain node here is a second blockchain node, and may be any one of the billing nodes in the blockchain network.
所述接收单元210对应于收发器,可用于该区块链节点与其他区块链节点的信息交互。The receiving unit 210 corresponds to a transceiver, and can be used for information interaction between the blockchain node and other blockchain nodes.
这里的确定单元220同样可对应于处理器,这里的处理器的相关描述可以参见前述处理器对应部分的描述。The determining unit 220 herein may also correspond to a processor, and the related description of the processor herein may be referred to the description of the corresponding portion of the foregoing processor.
在本实施中所述第二区块链节点会基于第一区块链节点提供的优化区块,以删除对应与优化区块的原始区块,优化本地存储的区块链,生成数据量更少的优化链或再次优化链。In this implementation, the second blockchain node may be based on the optimized block provided by the first blockchain node to delete the original block corresponding to the optimized block, optimize the locally stored blockchain, and generate a larger amount of data. Less optimization chains or re-optimizing the chain.
所述接收单元210,还可用于接收所述第一区块链广播的待验证的优化区块。所述第二区块链节点还可包括:验证单元,用于基于共识机制验证所述优化区块;发送单元,将所述验证结果返回给所述第一区块链节点。所述接收单元210,具体用于接收通过验证的所述优化区块。The receiving unit 210 is further configured to receive an optimized block to be verified that is broadcast by the first blockchain. The second blockchain node may further include: a verification unit, configured to verify the optimized block based on a consensus mechanism; and a sending unit that returns the verification result to the first blockchain node. The receiving unit 210 is specifically configured to receive the optimized block that is verified.
在本实施例中,所述接收单元210直接接收的优化区块为通过验证的优化区,这样可以确保利用优化区块优化后的区块链的真实性和可靠性。In this embodiment, the optimized block directly received by the receiving unit 210 is an optimized area that passes verification, so that the authenticity and reliability of the blockchain optimized by the optimized block can be ensured.
如图11所示,图11还提供区块链节点,该区块链节点包括:收发器310、存储器320、处理器330及存储在所述存储器320上并由所述处理器330处理的计算机程序。As shown in FIG. 11, FIG. 11 also provides a blockchain node including: a transceiver 310, a memory 320, a processor 330, and a computer stored on the memory 320 and processed by the processor 330. program.
所述处理器330,分别与所述收发器310及所述存储器320连接并且用于通过执行所述计算机程序来控制所述收发器310的信息交互、所述存储器320的信息存储,并前述一个或多个技术方案提供的区块链轻量化处理方法。The processor 330 is connected to the transceiver 310 and the memory 320, respectively, and is configured to control information exchange of the transceiver 310, information storage of the memory 320 by executing the computer program, and the foregoing Or a blockchain lightweight processing method provided by multiple technical solutions.
例如,所述处理器330可通过计算机程序的执行,可以实现图3、图4 和/或图8所示的区块链轻量化处理方法。For example, the processor 330 can implement the blockchain lightweight processing method illustrated in FIG. 3, FIG. 4, and/or FIG. 8 by execution of a computer program.
本实施例提供的区块链节点可为第一区块链节点、第二区块链节点及第三区块链节点等各种区块链节点。The blockchain node provided in this embodiment may be various blockchain nodes such as a first blockchain node, a second blockchain node, and a third blockchain node.
所述处理器330可以通过集成电路(IIC)总线与所述收发器310及存储器320连接。The processor 330 can be coupled to the transceiver 310 and the memory 320 via an integrated circuit (IIC) bus.
所述收发器310可包括物理节点连接到网络的各种通信接口,例如,电缆接口、光缆接口及收发天线等。The transceiver 310 can include various communication interfaces to which physical nodes are connected to the network, such as cable interfaces, fiber optic cable interfaces, and transceiver antennas.
本公开的一些实施例还提供一种计算机存储介质,所述计算机存储介质可以是易失性的或非易失性的并且存储有计算机程序,所述计算机程序被处理器执行后,处理器能够实现前述一个或多个技术方案提供的区块链轻量化处理方法,例如,可实现图3、图4和/或图8所示的区块链轻量化处理方法。Some embodiments of the present disclosure also provide a computer storage medium that can be volatile or non-volatile and that stores a computer program that, when executed by a processor, is capable of The blockchain lightweight processing method provided by one or more of the foregoing technical solutions is implemented, for example, the blockchain lightweight processing method shown in FIG. 3, FIG. 4, and/or FIG.
本公开的一些实施例提供的计算机存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。可选第,所述计算机存储介质可为非书台存储介质。The computer storage medium provided by some embodiments of the present disclosure includes: a removable storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. The medium of the program code. Optionally, the computer storage medium may be a non-book storage medium.
以下提供一个具体示例:A specific example is provided below:
本示例提供一种优化链的生成方法。图7所示中展示有交易链,对应与交易链的优化链。这里的交易链和优化链都可以统称为区块链,在生成优化链之后,可以删除对应的交易链。This example provides a way to generate an optimized chain. The transaction chain is shown in Figure 7, which corresponds to the optimized chain of the transaction chain. The transaction chain and optimization chain here can be collectively referred to as a blockchain. After the optimization chain is generated, the corresponding transaction chain can be deleted.
交易链采用相关的区块链技术生成每一包含交易信息的原始区块,并由原始区块链接组成所述交易链。如果交易链中某个原始区块之前的历史区块不再使用,或者使用的几率非常小,那么可以在区块链节点进行优化,从而形成所述优化链。优化链主要是将该区块部分信息存储在存储优化链中,那么通过存储优化链,可以删除该区块与创始区块之间的所有区块。The transaction chain uses the associated blockchain technique to generate each original block containing the transaction information, and the original block link constitutes the transaction chain. If the historical block before a original block in the transaction chain is no longer used, or the probability of use is very small, then it can be optimized at the block chain node to form the optimization chain. The optimization chain mainly stores the block part information in the storage optimization chain, and then by storing the optimization chain, all the blocks between the block and the founding block can be deleted.
优化链每个区块分别对应于交易链中的一个原始区块,交易链中这些对应原始区块与创世区块之间的区块都可以删除,不予存储。例如图6中优化链区块1对应于交易链区块M,优化链区块2对应于交易链区块N,M和N的取值可根据需要设定。如果每一万个区块优化一次,那么M=10000,N=20000。Each block of the optimization chain corresponds to an original block in the transaction chain, and the blocks between the corresponding original block and the creation block in the transaction chain can be deleted and not stored. For example, in FIG. 6, the optimized chain block 1 corresponds to the transaction chain block M, and the optimized chain block 2 corresponds to the transaction chain block N, and the values of M and N can be set as needed. If every 10,000 blocks are optimized once, then M = 10000 and N = 20000.
优化链中每个区块也分为区块头和区块体,区块头包括父区块头的散列值,从而使得区块前后相连形成链式结构,此外还包含Merkle根、随机数、时间戳等信息。区块体中则包含交易链中对应区块的区块头的散列值。例如,优化链区块1中区块体中包含交易链区块M的区块头散列值,优化链区块2中区块体中包含交易链区块N的区块头散列值。Each block in the optimization chain is also divided into a block header and a block body, and the block header includes a hash value of the parent block header, so that the block is connected to form a chain structure, and further includes a Merkle root, a random number, and a time stamp. And other information. The block body contains the hash value of the block header of the corresponding block in the transaction chain. For example, the block header hash value of the transaction chain block M is included in the block body in the optimized chain block 1, and the block header hash value of the transaction chain block N is included in the block body in the optimized chain block 2.
如果需要进行删除原始区块的操作,那么首先需要找到优化链最新优化区块所对应的交易链中的原始区块,就可以删除该交易链中对应的原始区块,以及该交易链的原始区块与创始区块之间的所有区块。优化链节点的优化链仅需存储创世区块、优化区块、以及删除部原始分区块后的交易链(即剩余的原始区块),优化后的交易链依然是链式结构。If the operation of deleting the original block needs to be performed, firstly, the original block in the transaction chain corresponding to the latest optimization block of the optimization chain needs to be found, and the corresponding original block in the transaction chain and the original of the transaction chain can be deleted. All blocks between the block and the found block. The optimization chain of the optimized chain node only needs to store the creation block, the optimized block, and the transaction chain after the original partition block (ie, the remaining original block), and the optimized transaction chain is still a chain structure.
图6是优化后的优化链的结构示意图。该示例中,优化链中最新优化区块对应于交易链的原始区块M,那么区块链节点可以删除存储创世区块与原始区块M+1之间的所有区块,仅需存储创世区块、优化区块、以及交易链中的原始区块M之后的原始区块。Figure 6 is a schematic diagram of the structure of the optimized chain after optimization. In this example, the latest optimized block in the optimization chain corresponds to the original block M of the transaction chain, and then the block chain node can delete all the blocks between the storage creation block and the original block M+1, and only need to be stored. The creation block, the optimization block, and the original block after the original block M in the transaction chain.
交易链的原始区块M+1的区块头中包含区块M的区块头散列值,优化区块2中也包含区块M的区块头散列值,因此,优化区块2与交易链区块M+1之间仍然可以形成链式结构。The block header of the original block M+1 of the transaction chain contains the block header hash value of the block M, and the optimized block 2 also contains the block header hash value of the block M. Therefore, the optimized block 2 and the transaction chain are optimized. A chain structure can still be formed between the blocks M+1.
安全性:优化链中的每个区块均对应于交易链中的一个原始区块,因此所有用户均可进行验证。此外,优化链中每个区块的区块头含有父区块头的散列值,且含有交易链中相应区块的区块头散列值。因此删除创世区块与对应交易链对应的原始区块之后,与创始区块、优化区块共同形成优化后的优化链,该优化链依然具有链式结构,所有节点均可参与验证。Security: Each block in the optimization chain corresponds to an original block in the transaction chain, so all users can verify it. In addition, the block header of each block in the optimization chain contains the hash value of the parent block header and contains the block header hash value of the corresponding block in the transaction chain. Therefore, after the original block corresponding to the corresponding transaction chain is deleted, the optimized optimization chain is formed together with the initial block and the optimized block. The optimized chain still has a chain structure, and all nodes can participate in the verification.
为防止伪造优化链,可以对存储优化链的最新节点进行限制,即,对可删除的历史区块进行限定。例如,仅可以删除一年之前生成的区块或最新一万个区块之前的区块。这样,如果伪造优化链,就需要伪造一年内的所有区块或最新的一万个区块,在区块链技术中这几乎不能完成。To prevent counterfeiting of the optimized chain, the latest nodes of the storage optimization chain can be restricted, that is, the history blocks that can be deleted are limited. For example, you can only delete blocks generated one year ago or blocks before the latest 10,000 blocks. Thus, if the optimization chain is forged, it is necessary to forge all the blocks in the year or the latest 10,000 blocks, which is almost impossible to complete in the blockchain technology.
存储效率:优化链中每个区块分别对应于交易链中的一个原始区块,交易链中该原始区块及该原始区块与创世区块之间的区块都可以删除,不予存储。存储效率与m和n的取值,如果每隔10000个区块优化一次,那 么m=10000,n=20000,理论上,优化后的区块链仅需占用原来的1/10000。Storage efficiency: each block in the optimization chain corresponds to an original block in the transaction chain, and the original block in the transaction chain and the block between the original block and the creation block can be deleted. storage. The storage efficiency and the value of m and n, if optimized every 10,000 blocks, then m = 10000, n = 20000, in theory, the optimized blockchain only needs to occupy the original 1 / 10000.
总之,本公开提供了一种优化链:优化链中每个区块分别对应于交易链的一个原始区块,每个优化区块的区块体中含有对应交易链区块的区块头散列值。本公开还提供一种区块链轻量化存储方法:找到优化链最新区块所对应的交易链的原始区块,就可以删除该交易链额原始区块,以及该交易链区块与创始区块之间的所有区块。这样区块链节点仅需存储创世区块、存储优化链、以及删除部分区块后的交易链,优化后的交易链依然是链式结构。In summary, the present disclosure provides an optimization chain: each block in the optimization chain corresponds to an original block of the transaction chain, and each block of the optimized block contains a block header hash corresponding to the transaction chain block. value. The present disclosure also provides a blockchain lightweight storage method: finding the original block of the transaction chain corresponding to the latest block of the optimized chain, the original block of the transaction chain amount, and the transaction chain block and the founding area can be deleted. All blocks between blocks. In this way, the blockchain node only needs to store the creation block, the storage optimization chain, and the transaction chain after deleting some blocks, and the optimized transaction chain is still a chain structure.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本公开各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在被处理器执行时所述处理器执行包括上述方法实施例的步骤。而前述的存储介质可以是易失性的或非易失性的,且包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存 储程序代码的介质。It will be understood by those skilled in the art that all or part of the steps of implementing the foregoing method embodiments may be performed by hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed by the processor. The processor executes the steps comprising the above described method embodiments. The foregoing storage medium may be volatile or non-volatile, and includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above is only the specific embodiment of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the disclosure. It should be covered within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be determined by the scope of the claims.

Claims (11)

  1. 一种区块链轻量化处理方法,该处理方法应用于第一区块链节点中且包括:A blockchain lightweight processing method, the processing method being applied to a first blockchain node and comprising:
    根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值;以及And generating, according to the block information of the original block to be deleted, an optimized block including a block header and a block body, wherein the optimized block is used to form an optimized chain; and the block header of the optimized block is at least And including: a first hash value of the parent block of the optimized block; the block body of the optimized block at least: a second hash value of the last block in the original block to be deleted; If the optimized block is the first optimized block in the optimization chain, the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; The block is a non-first optimized block in the optimization chain, and the block header of the newly generated optimized block includes: a second hash value of the previous optimized block;
    在生成所述优化区块之后,删除所述待删除的原始区块,其中,所述优化链包括:至少一个原始区块及所述优化区块,其中,所述至少一个原始区块至少包括:所述创世区块;或,所述创世区块及剩余原始区块。Deleting the original block to be deleted after the generating the optimized block, where the optimization chain includes: at least one original block and the optimized block, wherein the at least one original block includes at least : the creation block; or the creation zone and the remaining original block.
  2. 根据权利要求1所述的方法,还包括:The method of claim 1 further comprising:
    在区块链网络中广播所述优化区块;Broadcasting the optimized block in a blockchain network;
    接收第二区块链节点基于共识机制返回的验证结果;Receiving a verification result returned by the second blockchain node based on the consensus mechanism;
    广播通过验证的所述优化区块,其中,所述优化区块,用于第二区块链节点替代区块链中待删除的原始区块;Broadcasting the optimized block by verification, wherein the optimized block is used by the second block chain node to replace the original block to be deleted in the blockchain;
    其中,所述在生成所述优化区块之后,删除所述待删除的原始区块,包括:当所述验证结果表明优化区块通过验证时,删除所述待删除的原始区块。After the generating the optimized block, deleting the original block to be deleted includes: when the verification result indicates that the optimized block passes the verification, deleting the original block to be deleted.
  3. 根据权利要求1或2所述的方法,还包括:The method of claim 1 or 2, further comprising:
    判断第M个原始区块是否满足预设删除条件;Determining whether the Mth original block satisfies a preset deletion condition;
    其中,所述根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块,包括:若所述第M个原始区块满足所述预设删除条件,则提取所述第M个区块的区块头的散列值构建所述优化区块的区块体;And generating, according to the block information of the original block to be deleted, the optimized block including the block header and the block body, including: if the Mth original block meets the preset deletion condition, Extracting a hash value of the block header of the Mth block to construct a block body of the optimized block;
    所述在生成所述优化区块之后,删除所述待删除的原始区块,包括:若当前生成的优化区块为首个优化区块,则删除第M+1个原始区块及所述创世 区块之间的所有原始区块;或若当前生成的优化区块为非首个优化区块,则删除第M+1个原始区块到前一个优化区块之间的所有原始区块。After the generating the optimized block, deleting the original block to be deleted includes: if the currently generated optimized block is the first optimized block, deleting the M+1 original block and the All original blocks between the world blocks; or if the currently generated optimized block is not the first optimized block, delete all original blocks between the M+1th original block and the previous optimized block .
  4. 根据权利要求3所述的方法,其中,所述判断第M个原始区块是否满足预设删除条件,包括以下至少之一:The method according to claim 3, wherein the determining whether the Mth original block satisfies a preset deletion condition comprises at least one of the following:
    判断所述第M个原始区块的产生时间是否对应于优化时间间隔的优化时刻点;Determining whether the generation time of the Mth original block corresponds to an optimized time point of the optimization time interval;
    判断所述第M个原始区块是否为优化数量间隔对应的原始区块,其中,若所述优化数量间隔为N个,若所述优化区块为首个优化区块且所述第M个区块为第N+1个原始区块时,所第M个原始区块满足所述预设删除条件;若所述优化区块为第x个优化区块且所述第M个区块为第x*N+1个原始区块,则所述第M个原始区块满足所述预设删除条件;以及Determining whether the Mth original block is an original block corresponding to the optimized quantity interval, wherein if the optimized quantity interval is N, if the optimized block is the first optimized block and the Mth area When the block is the N+1th original block, the Mth original block satisfies the preset deletion condition; if the optimized block is the xth optimized block and the Mth block is the first block x*N+1 original blocks, wherein the Mth original block satisfies the preset deletion condition;
    判断所述第M个原始区块记载的交易信息是否已超过有效期;当所述第M个原始区块记载的交易信息已超过了所述有效期,则认为所述第M个原始区块满足所述预设删除条件。Determining whether the transaction information recorded in the Mth original block has exceeded a validity period; and when the transaction information recorded in the Mth original block has exceeded the validity period, the Mth original block is considered to be satisfied Preset delete conditions.
  5. 根据权利要求1至4中任一项所述的方法,其中,The method according to any one of claims 1 to 4, wherein
    所述优化区块的区块体,还具体包括:待删除的最后一个原始区块的随机数、时间戳及默克尔根的至少其中之一。The block body of the optimized block further includes: at least one of a random number, a time stamp, and a Merkel root of the last original block to be deleted.
  6. 一种区块链轻量化处理方法,该处理方法应用于第二区块链节点且包括:A blockchain lightweight processing method, the processing method being applied to a second blockchain node and comprising:
    接收第一区块链节点广播的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值;其中,所述优化链包括:至少一个原始区块及所述优化区块,其中,所述至少一个原始区块至少包括:所述创世区块;或,所述创世区块及剩余原始区块;Receiving, by the first blockchain node, an optimized block, wherein the optimized block is used to form an optimized chain; the block header of the optimized block includes at least: a first block of the optimized block a hash value, where the block body of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is the first one in the optimization chain The optimized block, the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is a non-first optimization region in the optimization chain a block header, the block header of the newly generated optimized block includes: a second hash value of the previous optimized block; wherein the optimization chain includes: at least one original block and the optimized block, where The at least one original block includes at least: the creation zone block; or the creation zone block and remaining original blocks;
    根据所述优化区块携带的第一散列值及第二散列值,确定出原始区块链 待删除的区块;以及Determining, according to the first hash value and the second hash value carried by the optimized block, the original block to be deleted; and
    存储所述优化区块并删除所述待删除的区块。The optimized block is stored and the block to be deleted is deleted.
  7. 根据权利要求6所述的方法,还包括:The method of claim 6 further comprising:
    接收所述第一区块链广播的待验证的优化区块;Receiving, by the first blockchain broadcast, an optimized block to be verified;
    基于共识机制验证所述优化区块;以及Validating the optimized block based on a consensus mechanism;
    将所述验证结果返回给所述第一区块链节点;Returning the verification result to the first blockchain node;
    其中,所述接收第一区块链节点广播的优化区块,包括:接收通过验证的所述优化区块。The receiving the optimized block broadcast by the first block chain node includes: receiving the optimized block that passes the verification.
  8. 一种区块链节点,所述区块链节点为第一区块链节点且包括:A blockchain node, the blockchain node being a first blockchain node and comprising:
    优化单元,用于根据待删除的原始区块的区块信息,生成并存储包括区块头及区块体的优化区块,其中,所述优化区块,用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值;以及And an optimization unit, configured to generate and store an optimized block including a block header and a block body according to the block information of the original block to be deleted, where the optimized block is used to form an optimized chain; The block header of the block includes at least: a first hash value of the parent block of the optimized block; the block body of the optimized block includes at least: a first block of the original block in the original block to be deleted a second hash value; if the optimized block is the first optimized block in the optimization chain, the block header of the optimized block includes: a first hash value of the creation block of the optimized chain If the optimized block is a non-first optimized block in the optimization chain, the newly generated block header of the optimized block includes: a second hash value of the previous optimized block;
    删除单元,用于在生成所述优化区块之后,删除所述待删除的原始区块,其中,所述优化链包括:所述创世区块及所述优化区块和/或剩余原始区块的优化链。a deleting unit, configured to delete the original block to be deleted after generating the optimized block, where the optimization chain includes: the creation block and the optimized block and/or remaining original area The optimized chain of blocks.
  9. 一种区块链节点,所述区块链节点为第二区块链节点且包括:A blockchain node, the blockchain node being a second blockchain node and comprising:
    接收单元,用于接收第一区块链节点广播的优化区块,其中,所述优化区块用于组成优化链;所述优化区块的区块头至少包括:所述优化区块的父区块的第一散列值;所述优化区块的区块体至少包括:所述待删除的原始区块中最后一个区块的第二散列值;若所述优化区块为所述优化链中的首个优化区块,则所述优化区块的区块头包括:所述优化链的创世区块的第一散列值;若所述优化区块为所述优化链中的非首个优化区块,则新生成的所述优化区块的区块头包括:前一个优化区块的第二散列值;a receiving unit, configured to receive an optimized block broadcast by the first blockchain node, where the optimized block is used to form an optimized chain; the block header of the optimized block includes at least: a parent region of the optimized block a first hash value of the block; the block body of the optimized block includes: a second hash value of the last block in the original block to be deleted; if the optimized block is the optimized The first optimized block in the chain, the block header of the optimized block includes: a first hash value of the creation block of the optimization chain; if the optimized block is a non-in the optimization chain a first optimized block, the block header of the newly generated optimized block includes: a second hash value of the previous optimized block;
    确定单元,用于根据所述优化区块携带的第一散列值及第二散列值,确 定出原始区块链待删除的区块;以及a determining unit, configured to determine, according to the first hash value and the second hash value carried by the optimized block, a block to be deleted in the original blockchain;
    存储单元,用于存储所述优化区块并删除所述待删除的区块。And a storage unit, configured to store the optimized block and delete the block to be deleted.
  10. 一种区块链节点,包括:A blockchain node, including:
    收发器、存储器、处理器及存储在所述存储器上并由所述处理器处理的计算机程序;a transceiver, a memory, a processor, and a computer program stored on the memory and processed by the processor;
    所述处理器与所述收发器及所述存储器连接,并且用于通过执行所述计算机程序控制所述收发器的信息交互、所述存储器的信息存储,并执行权利要求1至7任一项提供的区块链轻量化处理方法。The processor is coupled to the transceiver and the memory, and configured to control information exchange of the transceiver, information storage of the memory, and execute any one of claims 1 to 7 by executing the computer program A blockchain lightweight processing method is provided.
  11. 一种非易失性计算机存储介质,包括:A non-volatile computer storage medium comprising:
    在所述非易失性计算机存储介质上存储的计算机程序,所述计算机程序计算机处理器被执行后,该计算机处理器能够实现权利要求1至7任一项提供的区块链轻量化处理方法。a computer program stored on the non-volatile computer storage medium, the computer processor capable of implementing the blockchain lightening processing method according to any one of claims 1 to 7 after the computer program computer processor is executed .
PCT/CN2018/093377 2017-08-03 2018-06-28 Blockchain lightweight processing method, blockchain node and storage medium WO2019024631A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710657350.9A CN109391643B (en) 2017-08-03 2017-08-03 Block chain lightweight processing method, block chain node and storage medium
CN201710657350.9 2017-08-03

Publications (1)

Publication Number Publication Date
WO2019024631A1 true WO2019024631A1 (en) 2019-02-07

Family

ID=65232354

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093377 WO2019024631A1 (en) 2017-08-03 2018-06-28 Blockchain lightweight processing method, blockchain node and storage medium

Country Status (2)

Country Link
CN (1) CN109391643B (en)
WO (1) WO2019024631A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11693393B2 (en) 2019-09-25 2023-07-04 Schneider Electric Industries Sas Blockchain method for controlling an industrial process

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765495A (en) * 2019-06-20 2020-02-07 中云智慧(北京)科技有限公司 Block chain structure generation and forgetting safe storage method
CN112506914B (en) * 2019-09-16 2024-02-27 西安华域网络文化发展有限公司 Block chain data management method, system, device and medium based on double-chain structure

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106157142A (en) * 2016-06-30 2016-11-23 惠众商务顾问(北京)有限公司 A kind of block chain common recognition and synchronous method, system and device
CN106415530A (en) * 2013-11-19 2017-02-15 日出科技集团有限责任公司 Block mining methods and apparatus
US20170046526A1 (en) * 2015-08-13 2017-02-16 TD Bank Group System and Method for Implementing Hybrid Public-Private Block-Chain Ledgers
CN106503574A (en) * 2016-09-13 2017-03-15 中国电子科技集团公司第三十二研究所 Block chain safe storage method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015116998A2 (en) * 2014-01-30 2015-08-06 Gary Kremen Electronic transfer and obligation enforcement system
CN106055597B (en) * 2016-05-24 2022-05-20 布比(北京)网络技术有限公司 Digital transaction system and account information query method used for same
CN106251216B (en) * 2016-07-18 2020-12-25 恒宝股份有限公司 Method and system for relieving storage pressure of node
CN106446705A (en) * 2016-08-26 2017-02-22 杨鹏 Cyclic writing method and system of data on the basis of block chain
CN106790112B (en) * 2016-12-26 2020-05-05 重庆高开清芯科技产业发展有限公司 Node operating system integrating lightweight block chains and data updating method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106415530A (en) * 2013-11-19 2017-02-15 日出科技集团有限责任公司 Block mining methods and apparatus
US20170046526A1 (en) * 2015-08-13 2017-02-16 TD Bank Group System and Method for Implementing Hybrid Public-Private Block-Chain Ledgers
CN106157142A (en) * 2016-06-30 2016-11-23 惠众商务顾问(北京)有限公司 A kind of block chain common recognition and synchronous method, system and device
CN106503574A (en) * 2016-09-13 2017-03-15 中国电子科技集团公司第三十二研究所 Block chain safe storage method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11693393B2 (en) 2019-09-25 2023-07-04 Schneider Electric Industries Sas Blockchain method for controlling an industrial process

Also Published As

Publication number Publication date
CN109391643A (en) 2019-02-26
CN109391643B (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN109391645B (en) Block chain lightweight processing method, block chain node and storage medium
US20220141018A1 (en) Method and system for an efficient consensus mechanism for permissioned blockchains using audit guarantees
US20220019503A1 (en) Method and system for desynchronization recovery for permissioned blockchains using bloom filters
CN110602148B (en) Method and device for generating state tree of block and verifying data on chain
CN107169865B (en) Asset data processing system based on block chain technology
CN109242500B (en) Block chain transaction validity verification method and device and storage medium
KR20210003234A (en) Maintaining blocks of a blockchain in a segmented blockchain network
CN111177277B (en) Data storage method, transaction storage method and device
WO2019024631A1 (en) Blockchain lightweight processing method, blockchain node and storage medium
CN112862490B (en) Output consensus method under asynchronous network
CN109493043A (en) The blocking method, apparatus of transaction record, electronic equipment and storage medium
US20210073796A1 (en) Method of selective authentication of a blockchain user with a smart contract
WO2020015668A1 (en) Block chain storage method and node of block chain
CN113157450A (en) Method and apparatus for performing blocks in a blockchain system
CN111414417B (en) Video copyright management method based on block chain
CN116582239A (en) Block chain slicing method, block chain system and cross-slice transaction processing method
CN117010889A (en) Data processing method, device, equipment, medium and product
US20220005025A1 (en) Distributed ledger management system, distributed ledger management method, and node
KR20210127231A (en) Energized Identity based blockchain
KR102582359B1 (en) Method and apparatus for generating block in blockchain system
Ramkumar A blockchain system integrity model
CN113379542B (en) Block chain transaction query method, device, medium and electronic equipment
CN116980134A (en) Block chain-based data processing method and related equipment
CN117255130A (en) Data processing method, device, equipment and medium based on block chain
CN115063133A (en) Block chain-based transfer method, device and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18840704

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 18/06/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18840704

Country of ref document: EP

Kind code of ref document: A1