Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Data storage method and device

A data storage and data technology, applied in the computer field, can solve problems such as not supporting concurrent operations, unable to satisfy blockchain systems, etc., and achieve the effect of realizing concurrent operations and improving update speed

Active Publication Date: 2022-04-08
ZHONGAN INFORMATION TECH SERVICES CO LTD
View PDF25 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the current method of storing the state data of the blockchain does not support concurrent operations, and cannot satisfy the blockchain system with a large number of requests.

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
  • Data storage method and device
  • Data storage method and device
  • Data storage method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] Example 1: No data to be stored.

[0038] First, initialize the Merkle red-black tree. At this time, there is only one root node and two empty child nodes, and there is no specific key-value data. Secondly, since there is no specific stored data at this time, the operation of storing data in the database will not be performed.

Embodiment 2

[0039] Embodiment 2: When there is no data to be stored, data is inserted and stored.

[0040] combine image 3 Embodiment 2 is described, wherein, image 3 It is a schematic diagram corresponding to inserting data in a state of no data according to an embodiment of the present invention.

[0041] As can be seen from Example 1, in the state of no data to be stored, the initialized Merkle red-black tree has only one root node and two empty child nodes, and its Merkle root is the hash value hash(nil ).

[0042] Suppose the key-value pair to be inserted is K1:V1. At this time, the key-value pair storage corresponding to node N1 is changed to K1:V1, and the corresponding hash information H N1 Can be represented by expression (4):

[0043] h N1 =hash(K1:V1+hash(nil)+hash(nil)) (4)

[0044] Based on hash information H N1 , the node data D1 at this time can be obtained as key-value pair data K1:V1 and hash values ​​of two empty child nodes. Correspondingly, the hash informati...

Embodiment 3

[0045] Embodiment 3: On the basis of existing stored data, data is inserted again and stored.

[0046] Figure 4a , 4b According to the embodiment of the present invention in image 3 Schematic diagram of inserting data in the red-black tree structure, assuming a newly inserted key-value pair K2:V2.

[0047] Such as Figure 4a As shown, when K2

[0048] Such as Figure 4b As shown, when K1

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 data storage method, comprising: determining the position of a first node in a tree representation for characterizing a storage architecture based on key-value information of data to be stored, where the first node corresponds to the data to be stored; The hash information and key value information of the child nodes of the node are used to determine the hash information of the first node, and the storage index of the data to be stored is determined based on the hash information of the first node; Hash information of the node in the tree representation that is related to the first node hash is updated based on the hash information of the first node.

Description

technical field [0001] The invention belongs to the field of computers, and in particular relates to a data storage method and device that can be applied in a block chain. Background technique [0002] Blockchain technology is based on a decentralized peer-to-peer network, combining cryptography and distributed consensus technologies to create a secure distributed system. [0003] Blockchain storage can be simply divided into block data and state data. Generally speaking, block data includes the storage of the blockchain itself, including block header information and block packaged transaction data; state data is a description of the state of the blockchain ledger, and is generally stored in the form of key-value pairs. There is a relationship between block data and state data as follows: transaction data in block data is a record of changes to state data, and state data is the result of block data execution. [0004] However, the current method of storing the state data o...

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 Patents(China)
IPC IPC(8): G06F16/22G06Q20/38
CPCG06F16/2246G06F16/2255G06Q20/3829
Inventor 杜君君
Owner ZHONGAN INFORMATION TECH SERVICES CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products