Blockchain Data Traversal Indexing Reducing I/O Operations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current blockchain systems face inefficiencies in traversing key-value pairs due to the need for multiple I/O operations, especially when using tree data structures like Merkle Patricia Trees, which can require up to (d−1)×n operations to access n key-value pairs.
Innovation Solution
A method and device for data traversal that index key-value pairs to generate an index associating keys with an identifier, allowing for efficient retrieval of values based on the index, reducing the number of I/O operations and enabling local maintenance of index records within the blockchain system.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If key-value pairs are recorded in a tree data structure (e.g., Merkle Patricia Tree) to ensure data integrity and enable efficient individual lookups, then data security and individual access efficiency are improved, but the number of I/O operations required to traverse multiple key-value pairs increases significantly
Solution Approach 1:
The patent segments the index into multiple levels (e.g., root level, intermediate levels, leaf levels), where each level contains a subset of the key-value pairs. This segmentation allows the system to traverse only the necessary segments to access specific data, rather than traversing the entire tree structure, thereby reducing I/O operations while maintaining data integrity through the hierarchical organization.
Solution Approach 2:
The patent introduces a new dimensional organization by creating an index structure that maps keys to their locations in the blockchain data. This index adds a new dimension (the index layer) above the traditional tree structure, enabling direct access to key-value pairs without traversing the entire tree, thus improving traversal efficiency while preserving the underlying data integrity mechanisms.
2Reliability
If modified keys (hash values) are used to record key-value pairs for security reasons, then data security is improved, but the ability to efficiently traverse and retrieve key-value pairs deteriorates
Solution Approach 1:
The patent introduces an index as an intermediary structure that bridges the gap between the original keys and the modified hash keys stored in the blockchain. The index maintains the mapping between original keys and their hashed counterparts, allowing efficient retrieval by original key while preserving security through the use of hashed storage. This intermediary layer enables easy traversal without compromising data security.
3Productivity
If an index structure is introduced to improve data traversal efficiency, then traversal speed is improved, but device complexity increases
Solution Approach 1:
The patent applies preliminary action by building and maintaining the index structure in advance, during the data insertion phase. The index is constructed as key-value pairs are added to the blockchain, so that when traversal is needed, the index is already ready and optimized. This preliminary preparation reduces the complexity of real-time traversal operations, as the heavy lifting of organizing data is done upfront.
Data Source
AI summary
Disclosed herein are methods, devices, and apparatuses, including computer programs stored on computer-readable media, for data traversal. One of the methods includes: obtaining one or more key-value pairs from a program for use on a blockchain; indexing one or more keys of the one or more key-value pairs to generate an index, the index associating the one or more keys with an identifier of the program; and retrieving at least one value in the one or more key-value pairs based on the index.


