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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com