Abstract: Blockchain technology possesses the characteristics of decentralization and immutability, making it widely applicable in various fields. However, existing blockchain systems display weak performance in terms of data management, typically only supporting hash-based transaction querying. Current research on query methods usually involves synchronizing data with external databases, using external query engines, or building indexes to improve query performance. In index-based research methods, most blockchain systems build indexes within blocks to enhance query efficiency, but this does not reduce the time overhead of traversing all blocks. Additionally, most indexes only support a specific query type. In this paper, we propose a highly efficient indexing structure that divides data querying into two steps: first, obtaining potential blocks from the index structure that may contain the desired data, and then searching for the specific data records within those blocks. The indexes are further divided into numerical indexes and character indexes based on the attributes being indexed. We describe the construction and use of these two index structures for efficient data querying. As invalid blocks are filtered out, system query efficiency is greatly improved. The numerical index structure further supports range queries and top-k queries on this attribute, enhancing query capabilities. We also conduct experiments to verify the performance of our indexing structure. Results demonstrate that compared with baselines, our proposed index structure improves query performance, and offers a diverse range of query types.
Loading