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
Example Embodiment
[0026] Example one
[0027] Figure 1A This is a flowchart of a blockchain data storage method provided in the first embodiment of the present invention. This embodiment is suitable for LSM-Tree-based database storage engines, such as LevelDB storage engines or RocksDB storage engines, to perform blockchain data In order to facilitate the description of the storage situation, the following takes the LevelDB storage engine as an example. The solution of the embodiment of the present invention is applied to nodes in a 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 software and / or hardware, and can be integrated In the computing device that carries the blockchain network node. 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 ...
Example Embodiment
[0041] Example two
[0042] figure 2 This is a flowchart of a blockchain data storage method provided in the second embodiment of the present invention. This embodiment is further optimized on the basis of the above-mentioned embodiment. See figure 2 , The method specifically includes:
[0043] S210: If it is detected that the transaction data stored in the memory of the local node meets the disk writing condition, generate an SST file to be written; or, in response to a reconstruction operation on the pre-stored SST file, generate the SST file to be written.
[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 writing the same transaction request data. Disk write conditions refer to the preset conditions for transaction data in the memory to reach the disk storage threshold; the storage threshold is preset and can be modi...
Example Embodiment
[0058] Example three
[0059] image 3 This is a flowchart of a blockchain data storage method provided in the third embodiment of the present invention. On the basis of the foregoing embodiment, this embodiment further compares the number of the SST disk storage file to be written and the current SST file storage The number of directory paths and the number of directories to be written into the SST file are explained. 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, the number of new current directory paths is determined according to the number of current directory paths and the number of expanded directory paths.
[0061] Among them, 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 expanded directory paths is M, then t...
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.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap