| Blockchain,as a distributed digital ledger featuring tamper resistance and privacy protection,can provide reliable security solutions to domains such as industrial internet and vehicle-to-everything networks.However,when applied in an environment with various connected devices,resource distribution is imbalanced because of significant resource disparities in computing power,storage capacity,and communication between devices.Consequently,blockchain consensus and storage mechanisms cannot allocate consensus and storage tasks as per node resource differentiation,resulting in low efficiency for consensus and storage within the blockchain system.This paper focuses on investigating the consensus and storage mechanisms of a blockchain system to address this challenge,and the main work is as follows:(1)A Byzantine fault tolerance algorithm based on consensus performance evaluation(CPE–BFT)is proposed to resolve the low consensus efficiency of a blockchain system because of imbalanced resource distribution.The CPE–BFT algorithm evaluated the consensus performance of all nodes within a blockchain system using the technique for order preference by similarity to an ideal solution method.Furthermore,a weighted random probabilistic algorithm was chosen based on this evaluation to elect a high-performance node committee to lead all nodes toward a consensus,thereby enhancing the overall consensus efficiency of the blockchain system.The experimental results show that the CPE–BFT algorithm can effectively accelerate the achievement of transactional consensus in a blockchain system operating under an imbalanced resource distribution.Thus,the consensus efficiency of blockchain is significantly improved.(2)A tree-based blockchain storage algorithm(TBSA)is developed to solve the low storage efficiency of a blockchain system because of imbalanced resource distribution.TBSA utilized a tree-based node storage model to establish storage correlations among different nodes in a blockchain system and optimized the equal and independent storage mode between nodes.On this basis,the erasure coding technology refined the granularity of ledger data storage.Additionally,all the nodes were reorganized using a weight-based consistent hashing algorithm to store ledger data and thus the disk utilization of the system was enhanced for higher storage efficiency.The experimental results show that the TBSA algorithm can effectively improve the disk utilization of a blockchain system under imbalanced resource distribution to achieve higher storage efficiency. |