Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Block chain data storage method and device, equipment and medium

A data storage and blockchain technology, applied in the field of blockchain technology, can solve problems such as affecting local data and poor performance, and achieve the effect of saving storage space

Active Publication Date: 2020-06-26
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF16 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, for the local data of the node, the transaction request rollback of the wrong branch will greatly affect the local data
Existing local data storage technologies do not perform well when dealing with forks

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Block chain data storage method and device, equipment and medium
  • Block chain data storage method and device, equipment and medium
  • Block chain data storage method and device, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0068] Figure 1A It is a flowchart of a blockchain data storage method provided by Embodiment 1 of the present invention. The method of this embodiment is applicable to the case where blockchain nodes store data locally. During the operation of the blockchain, many transaction requests that perform various functions will be initiated; the transaction requests are executed by nodes to form transaction data, which are packaged into blocks, and the blocks are connected in sequence, thus forming a blockchain. Blocks are recorded by all nodes in the blockchain network, thus preventing tampering.

[0069] In addition to storing transaction data in the blockchain, nodes generally store it locally, for example, to provide users with richer and more flexible data query services. Local data is the data generated according to the transaction request in the block and its execution result.

[0070] Based on different actual data access requirements, the local data storage methods adopte...

Embodiment 2

[0093] Figure 2A It is a flow chart of a blockchain data storage method provided in Embodiment 2 of this application. This embodiment specifically introduces the processing method when the blockchain is synchronized based on the aforementioned storage scheme.

[0094] In the blockchain network, due to various reasons, other nodes will synchronize the synchronization block to the local node. The synchronization block is a block that does not exist in the local node or an existing block. It may be a block or a block. May be multiple blocks of a branch.

[0095] Such as Figure 2A As shown, the method of the present embodiment includes:

[0096] S210. In the process of executing each transaction request of the current block, update the world tree of the local data according to the write data in the execution result of the transaction request to generate new data points and a new world tree root, wherein the new The data point is an entity data point or a patch data point of ...

Embodiment 3

[0110] Figure 3A It is a flow chart of a blockchain data storage method provided in Embodiment 3 of this application. This embodiment specifically introduces the processing method when the blockchain is forked based on the foregoing storage scheme.

[0111] The so-called blockchain bifurcation is due to network communication, node failure and other reasons, which cause one or some nodes to generate different data from other nodes when processing blocks. But this inconsistency will not be discovered immediately, so new blocks continue to be generated on the basis of inconsistent blocks. Such as Figure 3B As shown, starting from block r[i-1], different nodes generate different blockchains, that is, a fork occurs. Until a fork is discovered based on the fork mechanism in the blockchain, the correct branch and the wrong branch will be determined at this time, for example, the long chain is the correct fork. Then, the node with the wrong branch will cancel the block of the wr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a block chain data storage method and device, equipment and a medium, and relates to the technical field of block chains. The method comprises the steps of updating a world tree of local data according to write data in a transaction request execution result in a process of executing each transaction request of a current block to generate a new data point and a new world tree root, the new data point being an entity data point or a patch data point of an existing entity data point; storing the new world tree root corresponding to the current block; and if it is determined that the existing block becomes the current snapshot block meeting the snapshot condition, updating a world tree of the current snapshot block into a snapshot world tree according to a transaction request between the previous snapshot block and the current snapshot block, the data point of the snapshot world tree being an entity data point. According to the technical scheme of the embodiment ofthe invention, a hybrid storage mode of the snapshot world tree and various state world trees is combined, and the processing time performance and the space performance of storage are both considered.

Description

technical field [0001] The embodiment of the present application relates to the field of computer technology, and specifically to blockchain technology. Background technique [0002] The blockchain system is a decentralized storage system. Each distributed node needs to process transaction requests and store data. In order to make querying data more convenient, nodes will store locally the data affected by transaction requests processed on the blockchain. As new transaction requests appear in the blockchain, the local data is constantly updated. [0003] In the blockchain, there will also be a fork phenomenon, that is, different nodes start from a certain block, and the subsequent blocks generated are inconsistent, that is, a fork is formed; the fork may continue for several blocks. The blockchain system will have a corresponding mechanism to solve the fork problem, that is, to regularly check whether there is a fork. If there is a fork, it will be determined according to...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/27G06F16/22G06F16/23
CPCG06F16/27G06F16/2246G06F16/23H04L9/3239G06F2201/84G06F11/1446G06F11/1474H04L9/50Y02D10/00G06F16/128G06F16/2379
Inventor 肖伟
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products