| Edge computing is a product of the evolution of IoT and the development of cloud computing technology,which provides users with network infrastructure such as computing,storage,and networking on the user side.Compared with the traditional cloud-based centralized IoT architecture,edge computing solves the problems of extended communication latency and high transmission traffic in the service process of cloud computing,while providing better support for low latency and high bandwidth network applications.With the increasing amount of data generated by users and devices in IoT,security and privacy issues in the edge computing environment have gradually become a focus of attention.Blockchain,a rapidly developing security technology in recent years,has been widely used in many industries such as finance and insurance.With the computing power of edge servers,blockchain platforms/applications can be deployed at the edge side to provide security services for the network edge environment.Although there are already solutions that integrate edge computing with blockchain in many IoT application scenarios,they are slightly inadequate in terms of scalability,portability and heterogeneous data processing.We propose a distributed IoT system based on blockchain and edge computing,dividing the whole IoT into three layers:device layer,edge layer and application layer,and building a trusted edge platform at the edge layer to integrate the edge computing framework and blockchain network to ensure data security at the edge side.Based on the microservice architecture,the platform is divided into three microservices:security authentication microservice,edge application microservice and API gateway microservice.Among them,the security authentication microservice connects to the blockchain network and provides services such as device registration,authentication and permission management to the whole platform;the edge application microservice connects to the edge computing platform and organizes business applications at the edge side;the API gateway is used to receive requests from terminals and users,making each request more secure.In terms of technology selection,this paper selects EdgeX Foundry edge computing platform and Hyperledger Fabric blockchain,which are excellent open source technologies in the industry.Finally,to validate the design proposed in this paper,we build a distributed IoT system and deploy the trusted edge platform on multiple hardware platforms to verify the superiority of the system designed in this paper by designing controlled experiments.Meanwhile,several key processes of the trusted platform are tested in order to verify the usability of the system.The final experimental results prove that the IoT system designed in this paper can meet the application requirements in real scenarios and can provide higher quality services at the edge side compared with the traditional IoT. |