[关键词]
[摘要]
区块链具有去中心化、不可篡改和可追溯等特性,可应用于金融、物流等诸多行业.由于所有交易数据按照交易时间顺序存储在各个区块,相同类型的交易数据通常会散布在诸多区块之中,降低了面向历史区块的追溯查询的处理效率.索引构建和物化视图是提升查询性能的两种典型方法,但当待处理数据分布于多个区块时,使用索引无法改善I/O访问效率,而物化视图可有效应对这个问题.然而,由于区块链系统的特点明显区别于关系数据库,传统的面向关系数据库的物化视图技术无法被直接应用到区块链之中.鉴于此,首次提出一种面向区块链的高效物化视图机制,具有如下特征:(1)将视图维护操作与共识过程同时执行,降低该操作对系统性能的影响;(2)使用字典树加快以区块为单位的多物化视图维护进程;(3)以默克尔验证的方式确保物化结果不被恶意篡改,进而确保查询结果可信.所提出的物化视图维护机制已经被集成到一个区块链系统中,并通过实验来验证该机制的高效性.
[Key word]
[Abstract]
The blockchain system is favored by many fields, such as finance and logistics due to several unique properties, including decentralized architecture, data immutability and data traceability. Transactions belonging to the same type are commonly distributed in massive blocks because all transactions are stored in chronological order of transaction committing, which lowers the efficiency to process tracing queries where a huge number of historical blocks are involved. Although indexing and materialized view are two typical ways to boost query performance, indexing cannot lower the I/O cost if the data to be processed are widely distributed in the system. Fortunately, materialized view suits for this scenario well. Furthermore, as traditional materialized view technologies for RDBMS cannot be directly adopted to blockchain due to significant difference between them, a set of materialized view mechanisms is firstly proposed for blockchain with the following properties:(1) To lower the impact to the system, the view maintenance operation is executed in parallel with consensus process; (2) Trie-Tree is used to speed up multi-materialized view maintenance process in blocks; (3) the query results is guaranteed credible by ensuring the materialized results not falsified with Merkle verification. After integrating the proposed materialized view maintenance mechanism into a blockchain system, experimental results show that the proposed method is convenient and efficient.
[中图分类号]
[基金项目]
国家自然科学基金(U1811264,U1911203,61972152,61532021)