With the growth of Internet of Vehicles(Io V)technology,secure and trustworthy data sharing has become a crucial area of research.Blockchain technology,with its decentralized,tamper-proof,and anonymous features,provides a means for nodes to achieve consensus in non-trusted environments.Integrating blockchain into the Io V system is a promising solution for credible and secure data sharing in Io V.However,traditional blockchain consensus mechanisms face challenges such as high equipment requirements,low throughput,and high confirmation latency,which cannot meet the diverse requirements of various Io V scenarios.Optimizing blockchain consensus algorithms to meet the requirements of different scenarios in Io V is of great significance.Thus,this thesis focuses on the data sharing scenario in Io V and investigates blockchain consensus algorithms for different data sharing scenarios in Io V to meet the requirements of vehicle data sharing.Emergency services such as urban road safety warning require intensive data sharing,which poses a challenge for traditional blockchain consensus algorithms that do not differentiate transaction types and cannot meet the waiting delay requirements of latencysensitive emergency transactions.To overcome this challenge,we propose a dual-chain vehicular network data sharing architecture and design a dual-chain consensus algorithm for emergency transaction sharing.The dual-chain consensus algorithm classifies transaction types and assigns transactions to blockchains that run different consensus algorithms.For emergency transactions with strict delay requirements,we design a lightweight consensus algorithm based on urgency proof to give them priority.For non-emergency services with relaxed delay constraints,we design a practical Byzantine fault-tolerant consensus algorithm that integrates with the urgency proof process to conceal the voting process and achieve parallel block generation of the dual-chain.Moreover,we design a subjective logic reputation model based on social relations to manage blockchain consensus nodes and reduce the scale and delay of blockchain consensus.Simulation results demonstrate that the dual-chain consensus algorithm can effectively decrease the waiting delay of emergency transactions and accelerate block confirmation.Roadside units are essential for consensus processes in traditional vehicular network blockchains,which leads to high deployment costs and limited application scope of blockchains.Moreover,the mobility of vehicle blockchains without roadside unit assistance causes performance deterioration of traditional blockchains.To tackle this problem,we propose a sharding blockchain-based vehicle data sharing architecture,and create vehicle sharding based on communication relay hop limit to minimize communication distance.For data sharing within shards,we propose a quality-based Byzantine fault-tolerant algorithm(Quality based Byzantine Fault Tolerant,QBFT),which estimates communication quality to choose the optimal master node to enhance system performance,and combines normal consensus process and view switching process to achieve system zerocost switching when master node departs.For data sharing across shards,we propose a transaction block-based directed acyclic graph(Transaction Block based Directed Acyclic Graph,TBDAG)cross-domain transaction processing mechanism to expedite block confirmation.Security and liveness analysis verifies the security and liveness of the proposed consensus algorithm.Finally,simulation results indicate that sharding consensus algorithm has high system throughput and low consensus communication complexity,and can ensure fast confirmation of transactions. |