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.