Block-chain data storage method, device, equipment and medium
A data storage and blockchain technology, applied in the blockchain field, can solve the problems of different operation data storage states, the inability to guarantee the atomicity of blockchain transaction writing, and the inability to achieve dynamic expansion, etc., to ensure atomicity Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0027] Figure 1A It is a flow chart of a blockchain data storage method provided by Embodiment 1 of the present invention. This embodiment is applicable to a storage engine of a LSM-Tree-based database, such as a LevelDB storage engine or a RocksDB storage engine, to store blockchain data For the storage situation, in order to facilitate the description, the LevelDB storage engine will be used as an example to illustrate. The solution of the embodiment of the present invention is applied to the nodes in the blockchain network. The method can be executed by the blockchain data storage device provided by the embodiment of the present invention. The device can be implemented in the form of software and / or hardware, and can be integrated In computing devices that host blockchain network nodes. see Figure 1A , the method specifically includes:
[0028] S110. Determine the directory number of the SST file to be written according to the number of the SST file to be written and the...
Embodiment 2
[0042] figure 2 It is a flow chart of a blockchain data storage method provided by Embodiment 2 of the present invention. This embodiment is further optimized on the basis of the foregoing embodiments. see figure 2 , the method specifically includes:
[0043] S210, if it is detected that the transaction data stored in the internal memory of the local node satisfies the writing condition, generate an SST file to be written; or, generate an SST file to be written in response to a reconstruction operation on a pre-stored SST file.
[0044] Among them, the transaction data stored in the memory is formed by packing each group of transaction data associated with the same transaction request into the same batch, so as to ensure the atomicity of data writing in the same transaction request. Disk write condition refers to the pre-set condition that the transaction data in the memory reaches the storage threshold for writing to the disk; the storage threshold is preset and can be mo...
Embodiment 3
[0059] image 3 It is a flow chart of a blockchain data storage method provided by Embodiment 3 of the present invention. On the basis of the above embodiments, this embodiment further analyzes the number of storage files to be written to the SST disk and the current value of the SST file that can be stored. The number of directory paths, which determines the number of the directory to be written into the SST file for explanation. see image 3 , the method specifically includes:
[0060] S310, if it is detected that the directory path that can store the SST file is expanded, then determine a new number of current directory paths according to the number of current directory paths and the number of expanded directory paths.
[0061] Wherein, the expansion of the directory path refers to the increase of the directory path that can be used to store the SST file in the local node. Specifically, if the number of current directory paths is N, and the number of directory paths to b...
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