Service Identifier Data Indexing for Blockchain Query Efficiency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current querying in blockchain-type ledgers is serial and inefficient, making it difficult to retrieve data records with the same service identifier, especially when they are distributed across multiple data blocks, which hinders user experience and query efficiency.
Innovation Solution
A service identifier-based data indexing method is introduced, where a mapping relationship between service identifiers, service labels, and location information is established and stored in an index, allowing for efficient location and retrieval of data records by using a primary key-based index, which includes block height and positional offset within the blockchain-type ledger.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If data records are stored in a distributed manner across multiple data blocks in a blockchain-type ledger, then data storage capacity and distribution are improved, but query efficiency deteriorates due to serial querying requirements
Solution Approach 1:
The patent applies preliminary action by creating an index structure before query operations. The index stores service identifiers and their corresponding location information (data block numbers and positions) in advance, enabling direct access to data records without serial traversal through all data blocks during query operations.
Solution Approach 2:
The patent introduces an index as an intermediary between the query operation and the distributed data blocks. This index structure acts as a mediator that translates service identifier queries into direct location access, eliminating the need for serial searching across multiple data blocks while maintaining the distributed storage architecture.
2Device complexity
If serial querying is used in a blockchain-type ledger, then implementation simplicity is maintained, but query time increases significantly when retrieving distributed data records
Solution Approach 1:
The index is built in advance during data insertion operations, storing the mapping between service identifiers and their physical locations in the blockchain ledger. This preliminary organization of data location information enables direct access during queries, reducing query time from linear traversal to constant-time lookup.
3Productivity
If an index structure is introduced to improve query efficiency, then query speed is improved, but system complexity increases
Solution Approach 1:
The patent segments the system into two distinct components: the distributed blockchain ledger for data storage and a separate index structure for query optimization. This segmentation allows the index to be maintained independently, simplifying the overall system architecture while improving query performance through dedicated indexing mechanisms.
Data Source
AI summary
Implementations of this specification provide service identifier-based data indexing. An example method performed by a data indexing apparatus of a centralized database service provider that stores data by using a blockchain-type ledger includes obtaining a service identifier and a service label of a data record, the service identifier uniquely identifying a service attribute of the data record, and the service label representing a type of the data record; determining location information of the data record in the blockchain-type ledger, the location information including a block height of a data block that includes the data record, and a positional offset of the data record in the data block that includes the data record; establishing a mapping relationship among the service identifier, the service label, and the location information; and writing the mapping relationship into an index for which a primary key is the service identifier.


