| Nowadays,due to the development of information technology,traveling by car has become an important part of people’s daily life.Due to the continuous growth of the urban population and the rapid development of the urban scale,the number of car ownership is also growing rapidly.In order to make full use of the functions of vehicles and surrounding base stations,and provide more services such as shared data for the main body participating in the traffic,road condition information sharing systems have emerged in recent years.Blockchain is a tamper-proof,traceable,and highly secure decentralized storage structure that can provide safe and credible sharing services for road condition information sharing systems.However,at this stage,there is a problem that the traditional consensus algorithm cannot support large-scale node consensus due to too many nodes in the road condition information sharing combined with the blockchain.At the same time,because there is no reasonable income distribution method after users share data,many users have a low sense of participation.First of all,in view of the fact that the current consensus algorithm cannot be applied to large-scale node consensus scenarios,this thesis proposes a Double-Layer PBFT consensus algorithm based on trust selection,which improves the flexibility and reliability of the traditional PBFT consensus algorithm through hierarchical grouping and priority reputation selection of master nodes.Scalability and reduced communication complexity.This algorithm makes the blockchain platform more suitable for large-scale IoT environments.Aiming at the problem of insufficient motivation for user participation,an incentive mechanism based on user attributes is proposed.The revenue functions of OBU nodes and RSU nodes are modeled according to their attributes.Finally,the determined incentive mechanism is written in the smart contract,which is called and executed by the OBU node as the client after each consensus ends and the data is successfully uploaded to the chain.Improved user engagement and platform stability.Secondly,this thesis builds a blockchain-based road condition information sharing system based on the Hyperledger Fabric platform on the basis of combining the above two mechanisms.The business requirements analysis and functional requirements analysis of the system are carried out,the system architecture,main process modules and role subjects are designed,and the design process of key modules and the details of specific code calls in the implementation process are introduced in detail.After the module analysis,the system is realized and the frontend function is tested,and each function module of the front-end is shown in detail.Combining the above-mentioned DT-PBFT consensus algorithm and incentive mechanism ensures the scalability and stability of the road condition information sharing system.Finally,it shows that the system can provide good information sharing service and is feasible.Finally,the traffic information sharing system in this thesis is built based on the Hyperledger Fabric platform.The requirements of the system are analyzed,and each functional module is realized.Through the functional test of the system,it finally shows that the system is feasible.To sum up,this thesis proposes a Double-Layer PBFT consensus algorithm based on trust selection is suitable for large-scale Internet of Things scenarios,and proposes an incentive mechanism for calculating rewards for data consensus on-chain.Finally,the above two mechanisms are applied to the system,and a road condition information sharing system based on blockchain is designed and implemented. |