| With the continuous development of computers and various network technologies,electronic transactions on the Internet are becoming more and more universal.Compared with traditional paper documents,electronic transaction records have the advantage of low storage cost,easy to store,and easy to share.But electronic transaction information is easily to lose,tampered with,and forged during use.To address this issue,a blockchain electronic trading system is designed using the blockchain's features such as non-tampering property,unforgeability and anonymity to ensure the security of electronic transactions.However,the query efficiency of the blockchain electronic trading system is inefficient,which cannot meet the requirements of query.The research finds that there are two main points affecting the query efficiency of the blockchain electronic trading system.First,the blockchain structure is a single-linked list structure.When querying historical transaction information,it is necessary to traverse the entire linked list,which leads to the time of querying historical transaction information is long.Second,with the expansion of the blockchain electronic trading system,the number of accounts is increasing day by day,which reduces the speed of querying the account information in the transaction.In this dissertation,based on the above two problems,the research on query optimization technology of blockchain electronic trading is carried out.Firstly,an index-based blockchain electronic transaction query scheme is designed for the problem of low efficiency of querying historical transaction information in the blockchain electronic trading system.The transaction order number and the block number are indexed,and the index-based block structure is designed.The historical transaction information query algorithm based on the index block structure is proposed,and the historical transaction information is indirectly queried through the index.Second,in the process of electronic trading in blockchain,it is difficult to find the efficiency of the accounts of both parties.This dissertation designs a blockchain electronic transaction querying scheme based on account grouping.This scheme improves the storage structure of the account by grouping the accounts in the blockchain electronic transaction,and proposes a group-based account query algorithm to improve the efficiency of the account of both parties to the transaction is queried,thereby it can increase the transaction speed of the blockchain system.Through a large number of test experiments,the feasibility and efficiency of the proposed scheme are verified. |