Method, apparatus, and computer program product for managing application system
US-2020117367-A1 · Apr 16, 2020 · US
US10853341B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-10853341-B2 |
| Application number | US-202016790599-A |
| Country | US |
| Kind code | B2 |
| Filing date | Feb 13, 2020 |
| Priority date | Jun 28, 2019 |
| Publication date | Dec 1, 2020 |
| Grant date | Dec 1, 2020 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
Disclosed herein are methods, systems, and apparatus, including computer programs encoded on computer storage media, for blockchain-based hierarchical data storage. One of the methods includes determining, based on a blockchain stored in a database that includes multiple levels of storage, a level of storage of the multiple levels of storage that meets a data migration condition as a target level of storage, wherein state data of the blockchain are stored as state Merkle trees in data worksheets of the multiple levels of storage, generating, for the target level of storage, an empty data worksheet in response to determining that the target level of storage meets the data migration condition, and storing at least a portion of a state Merkle tree corresponding to a newly created block of the blockchain to the empty data worksheet.
Opening claim text (preview).
What is claimed: 1. A blockchain-based hierarchical storage method comprising: determining, based on a blockchain stored in a database that includes multiple levels of storage, a level of storage of the multiple levels of storage that meets a data migration condition as a target level of storage, wherein state data of the blockchain are stored as state Merkle trees in data worksheets of the multiple levels of storage; generating, for the target level of storage, an empty data worksheet in response to determining that the target level of storage meets the data migration condition; storing at least a portion of a first state Merkle tree corresponding to a newly created block of the blockchain to the empty data worksheet; migrating a second state Merkle tree corresponding to a target block stored in a data worksheet to the empty data worksheet, wherein the target block has a largest block number among block numbers of blocks corresponding to the state Merkle trees stored in the target level of storage; and after migrating the second state Merkle tree corresponding to the target block, migrating the state Merkle trees stored in the data worksheet to a lower level of storage than the target level of storage, wherein the lower level of storage has lower storage cost. 2. The method according to claim 1 , further comprising: after migrating the second state Merkle tree corresponding to the target block to the empty data worksheet, renaming the data worksheet as a historical data worksheet. 3. The method according to claim 2 , further comprising: after renaming the data worksheet as the historical data worksheet and migrating the state Merkle trees stored in the historical data worksheet to the lower level of storage, deleting the historical data worksheet. 4. The method according to claim 1 , wherein a remainder of the first state Merkle tree corresponding to the newly created block other than at least the portion of the first state Merkle tree is stored in the empty data worksheet if not all the first state Merkle tree is stored in the empty data worksheet. 5. The method according to claim 4 , further comprising: receiving a search request for a data node of the first state Merkle tree after the empty data worksheet is generated; determining whether all the first state Merkle tree is stored in the empty data worksheet; searching the empty data worksheet in response to determining that all the first state Merkle tree is stored in the empty data worksheet; and searching the empty data worksheet and the data worksheet in response to determining that not all the first state Merkle tree is stored in the empty data worksheet. 6. The method according to claim 1 , wherein the first state Merkle tree corresponding to the newly added block comprises a latest block appended to the blockchain and historical blocks migrated from higher level of storage that has higher storage cost. 7. The method according to claim 1 , wherein the database is a key-value database, data nodes included in the state Merkle state tree are stored as key-value pairs (KVPs), keys of the KVPs are hash values of corresponding values of the KVPs, and the values of the KVPs are data content of the corresponding data nodes. 8. The method according to claim 1 , wherein the first state Merkle tree or the second state Merkle tree has a tree structure constructed based on a Merkle tree and a prefix tree. 9. The method according to claim 8 , wherein the first state Merkle tree or the second state Merkle tree is a Merkle Patricia tree (MPT). 10. The method according to claim 1 , wherein the database is a LevelDB database. 11. The method according to claim 10 , wherein the database is a RocksDB database. 12. The method according to claim 1 , wherein the storage media with lower storage cost has lower read-write performance. 13. A computer-implemented system, comprising: one or more computers, and one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform operations comprising: determining, based on a blockchain stored in a database that includes multiple levels of storage, a level of storage of the multiple levels of storage that meets a data migration condition as a target level of storage, wherein state data of the blockchain are stored as state Merkle trees in data worksheets of the multiple levels of storage; generating, for the target level of storage, an empty data worksheet in response to determining that the target level of storage meets the data migration condition; storing at least a portion of a first state Merkle tree corresponding to a newly created block of the blockchain to the empty data worksheet; migrating a second state Merkle tree corresponding to a target block stored in a data worksheet to the empty data worksheet, wherein the target block has a largest block number among block numbers of blocks corresponding to the state Merkle trees stored in the target level of storage; and after migrating the second state Merkle tree corresponding to the target block, migrating the state Merkle trees stored in the data worksheet to a lower level of storage than the target level of storage, wherein the lower level of storage has lower storage cost. 14. The computer-implemented system according to claim 13 , further comprising: after migrating the second state Merkle tree corresponding to the target block to the empty data worksheet, renaming the data worksheet as a historical data worksheet. 15. The computer-implemented system according to claim 14 , further comprising: after renaming the data worksheet as the historical data worksheet and migrating the state Merkle trees stored in the historical data worksheet to the lower level of storage, deleting the historical data worksheet. 16. The computer-implemented system according to claim 13 , wherein a remainder of the first state Merkle tree corresponding to the newly created block other than at least the portion of the first state Merkle tree is stored in the empty data worksheet if not all the first state Merkle tree is stored in the empty data worksheet. 17. The computer-implemented system according to claim 16 , further comprising: receiving a search request for a data node of the first state Merkle tree after the empty data worksheet is generated; determining whether all the first state Merkle tree is stored in the empty data worksheet; searching the empty data worksheet in response to determining that all the first state Merkle tree is stored in the empty data worksheet; and searching the empty data worksheet and the data worksheet in response to determining that not all the first state Merkle tree is stored in the empty data worksheet. 18. The computer-implemented system according to claim 13 , wherein the first state Merkle tree corresponding to the newly added block comprises a latest block appended to the blockchain and historical blocks migrated from higher level of storage that has higher storage cost. 19. The computer-implemented system according to claim 13 , wherein the database is a key-value database, data nodes included in the state Merkle state tree are stored as key-value pairs (KVPs), keys of the KVPs are hash values of corresponding values of the KVPs, and the values of the KVPs are data content of the corresponding data nodes. 20. A non-transitory, computer-readable medium storing one or mo
using hash chains, e.g. blockchains or hash trees · CPC title
Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor · CPC title
involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD · CPC title
Trees, e.g. B+trees · CPC title
Peer-to-peer [P2P] networks · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.