Food security is closely related to the national economy and people’s livelihood,and traceability is an important means to ensure food safety.Blockchain technology has been widely used in applications such as evidence preservation,commodity traceability,and collaborative sharing due to its characteristics of immutability,consensus among participants,and end-to-end traceability.The unique properties and advantages of blockchain technology are highly compatible with the pain points of the food supply chain traceability scenario.Therefore,building a food supply chain traceability system based on blockchain has become a mainstream choice.However,there are still some problems with current blockchain-based traceability systems:(1)the reliability of the data source;while blockchain can ensure the authenticity and reliability of the data on the chain,it cannot solve the problem of data forgery at the source.(2)It is difficult to achieve complete mapping and linking of the traceability information throughout the entire supply chain.The information recording standards of different links in the supply chain are not uniform,making it difficult to unify and form a complete traceability chain.(3)There is a problem of cross-organizational collaboration,as traceability processes involve multiple parties,industries,and entities,and the business logic is complex,leading to high costs and low efficiency.(4)The need to protect the privacy of enterprise commercial data conflicts with the requirement for traceability information to be publicly available.This article proposes and implements a food supply chain traceability system based on the integration of blockchain and the Internet of Things(Io T),called the Blockchain and Io Tbased Food Supply Chain Traceability System(BIFTS),which has the following innovations:(1)It proposes a solution that combines blockchain and Io T,using Io T data as the data source for blockchain traceability information.It designs a prophetic mechanism to ensure the security and reliability of the Io T data when it is uploaded to the blockchain.(2)It designs and implements a traceability architecture that integrates multiple chains,based on the characteristics of multiple links and entities involved in the food supply chain.It uses consortium chains to record the flow of information between enterprises and private chains to record the flow of information within enterprises.It designs the mapping relationship of traceability IDs,and records the entire chain’s flow process through multi-chain "relay," realizing on-chain traceability of the entire food supply chain.(3)It designs and implements a lightweight consortium chain and private chain crosschain access protocol based on a notary mechanism,using a Transport Layer Security(TLS)certificate and identity certificate dual verification scheme,to ensure the secure and reliable flow of traceability information among different blockchain networks and entities.This article builds BIFTS based on Hyperledger Fabric and Ethereum private chains.BIFTS can support businesses between food supply chain enterprises,traceability collaboration and information sharing among various supervisory departments,and support consumers to initiate traceability queries of food products.The system uses information collected and transmitted from Io T as the data source for blockchain information,reducing human interference and ensuring the authenticity and reliability of the entire traceability chain.It designs prophetic mechanisms and cross-chain access control schemes and adopts a layered system architecture and modular design to decouple the various levels while achieving efficient management.Through such a design,the entire food supply chain can be truly trusted and traced.Finally,BIFTS is built and tested,and the experimental results show that BIFTS can achieve a maximum TPS of over 1000 in stress testing,and a rich query TPS of over 200 using traceability IDs.The average delay in information upload testing is stable at 0.2-0.3seconds.Compared with existing traceability systems,BIFTS has higher reliability and better performance. |