引用本文:张佩云,刘颖,陈子寒.中继链分片环境中两阶段自适应交易分配模型.软件学报,2026,37(8):3337-3369
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 721次   下载 729 本文二维码信息
码上扫一扫!
分享到: 微信 更多
中继链分片环境中两阶段自适应交易分配模型
张佩云1,2, 刘颖1,3, 陈子寒1,2
1.数字取证教育部工程研究中心 (南京信息工程大学), 江苏 南京 210044;2.南京信息工程大学 计算机学院、网络空间安全学院, 江苏 南京 210044;3.南京信息工程大学 软件学院, 江苏 南京 210044
摘要:
区块链技术的广泛应用推动了多链应用的发展, 通过跨链技术可以解决不同区块链之间信息隔离的问题. 然而, 当区块链之间存在大量并发交易时, 现有跨链技术不能并行处理跨链交易, 带来可扩展性低的问题, 区块链分片技术可以有效解决该问题. 目前, 不完善的交易分配方法和跨分片交易导致分片技术对可扩展性的提升受限. 因此, 提出面向中继链分片环境的两阶段自适应交易分配模型, 该模型在第1阶段得到交易分配方案, 以减少跨分片交易并保证分片负载与分片性能相匹配; 在第2阶段, 对中继链收集节点转发后处于不稳定队列中的交易进行微调, 以解决负载激增导致的交易处理延迟增加问题. 在第1阶段, 设计一种交易分配预测方法, 该方法利用平行链历史跨链交易信息对交易大小和数量进行预测, 根据预测结果与分片的交易吞吐量计算负载值, 同时, 基于交易依赖性设计跨分片交易分配方法, 结合负载值和该方法得到交易分配方案; 在第2阶段, 中继链根据交易分配方案和跨分片交易分配方法将交易转发至对应分片进行处理, 在此过程中用户可能短时间内生成大量交易导致分片负载与分片性能不匹配. 因此, 针对交易队列中等待的交易提出一种交易队列稳定性分析方法, 该方法通过交易队列的长度变化分析交易队列稳定性并对不稳定交易队列中的交易进行分片间动态微调. 通过交易分配预测方法和交易队列稳定性分析方法进行自适应交易分配, 减少交易等待处理的时间并提高中继链的交易吞吐量. 实验结果表明, 所提模型可以并行处理大量并发跨链交易并对交易分配方法进行完善, 相较于对比方法显著提高交易吞吐量, 降低交易的处理延迟.
关键词:  区块链  中继链  分片  自适应交易分配  交易分配预测
DOI:10.13328/j.cnki.jos.007497
分类号:TP393
基金项目:国家自然科学基金(61872006)
Two-phase Adaptive Transaction Allocation Model for Relay Chain Sharding Environment
ZHANG Pei-Yun1,2, LIU Ying1,3, CHEN Zi-Han1,2
1.Engineering Research Center of Digital Forensics (Nanjing University of Information Science and Technology), Ministry of Education, Nanjing 210044, China;2.School of Computer Science, School of Cyberspace Security, Nanjing University of Information Science and Technology, Nanjing 210044, China;3.School of Software, Nanjing University of Information Science and Technology, Nanjing 210044, China
Abstract:
The widespread adoption of blockchain technology has driven the development of multi-chain applications, creating a need for cross-chain technology to address information isolation across different blockchains. However, when a large number of transactions occur concurrently across blockchains, existing cross-chain technologies are unable to process them in parallel, resulting in low scalability. Blockchain sharding offers a potential solution, but its impact on scalability is limited by inefficient transaction allocation and cross-chain transaction methods. Therefore, this study proposes a two-phase adaptive transaction allocation model for a relay chain sharding environment. In the first phase, the model generates an allocation scheme to reduce cross-shard transactions and balance shard load with performance. In the second phase, it fine-tunes transactions in unstable queues after allocation to mitigate delays caused by load surges. In the first stage, this study also includes a transaction allocation prediction method that leverages historical cross-chain data to forecast transaction size and volume, calculating load based on these predictions and transaction throughput. An inter-shard allocation method further refines transaction distribution. In the second stage, the relay chain directs transactions to specific shards based on the allocation scheme, adapting dynamically if load surges lead to a mismatch between shard load and performance. A stability analysis method assesses transaction queue changes, allowing for fine-tuning across shards to reduce waiting times and increase throughput. Experimental results show that this model significantly improves transaction throughput and reduces processing delays compared to existing methods.
Key words:  blockchain  relay chain  sharding  adaptive transaction allocation  transaction allocation prediction