Implementation of a food traceability system utilizing the Internet of Things and blockchain technology to enhance safety measures within the food supply chain

. Food safety is a global concern, and a reliable Food Traceability System (FTS) is essential to address this issue. This paper introduces a novel FTS, FTS-IoT-BT, which uses IoT and Blockchain Technology to enhance safety protocols in the Food Supply Chain (FSC). The framework aims to document the condition of food items, verify data reliability, and restrict access to unsafe food. The FTS-IoT-BT provides a comprehensive overview of the highest and lowest durations associated with different operations, with a superior throughput of 96.7% when using ten IoT devices..


Introduction
Recently, there has been a notable increase in the frequency of food safety events, which has presented a significant risk to public health and has led to a gradual erosion of public confidence in the regional food industry [1].Nevertheless, in light of the swift progression of society, individuals are increasingly inclined toward the pursuit of expeditious financial gains.In search of increased profitability, numerous food companies disregard the wellbeing and safety of consumers.Nevertheless, it deceives consumers by presenting itself as an excellent, nutrient-rich, healthy food product, thereby ignoring the concept of integrity.Food quality is a matter of concern not only for consumers but also for other stakeholders.Food manufacturers also have a vested interest in understanding the distribution process of food and obtaining relevant information about it.
By employing the FTS, one can access a comprehensive range of information about food, spanning from its origin in production to its ultimate consumption [2].This system serves to guarantee the safety and dependability of food products.Furthermore, there is a keen interest among food producers to acquire knowledge regarding the dynamics of the food movement and its associated intricacies.When considering the choice of FTS, it is essential to consider their significant economic value and the crucial interests and requirements of the intended users.Individuals regard food as the utmost priority, and consumers have consistently embraced this preference.After identifying food quality and safety concerns, traceability can be employed to promptly determine the source of the issue and the specific responsible party, facilitating the recall of contaminated food.
Although the National Food Security Oversight Department places significant emphasis on the prevention and management of food quality and safety, overseeing and tracing food safety has become challenging due to the involvement of numerous stakeholders within the FSC [3].On the one hand, integrating cutting-edge technologies and management methods seeks to reestablish consumers' confidence in the food industry and fulfill their demands for comprehensive food information monitoring and management.On the other hand, this integration also aims to enhance the regulatory authorities' supervision capabilities and efficiency in overseeing relevant processes.The application of FTS is of utmost importance to enable the comprehensive tracking of food-related information throughout the entirety of the food production and distribution process.
Once food quality and safety issues are identified, traceability can quickly identify the supply chain point and the responsible party.This allows timely recall of quality-affected food products.This method has also been shown to ensure food safety [4].Unfortunately, food traceability in my country started late.Traceability data is highly centralized in the FTS.The primary FSC entities control and manage data exclusively.Thus, this arrangement raises data safety and reliability concerns.In addition, the FSC has an information imbalance among central entities.This unequal access to information makes it difficult to determine if data was intentionally tampered with during distribution.Innovative technologies and supervisory methods are being used to improve regulatory oversight.FTS must be used throughout the process to track food data [5].The client feedback method and regulatory agency food safety process are lacking.
Academics consider BT a major research area.In FTS, distributed ledger technology is efficient, cheap, secure, reliable, and trustworthy [6].Despite its resilience, BT lacks scalability.The BT can be inefficient and complicated.Data uniqueness has long been BT's main drawback.It benefits the FSC, financial systems, and others.Scalability is BT's biggest drawback, but not insurmountable.The blockchain is vulnerable.BT still struggles with scalability.BT items' immutability and permanence are limited and may change.Previous studies show it has technical advantages over degrees [7].The BT securely distributes and stores data.Malicious information tampering requires compromising over 52% of the BT nodes.This task is impractical for BT with many nodes.Thus, data integrity and security must be ensured to ensure reliability.BT protects personal data and helps organizations generate and exchange economic value at lower scales.
Implementing an FTS emerges as a prominent solution in light of the dynamic nature of the global FSC [18].This initiative utilizes the combined capabilities of the IoT and BT to enhance safety measures across the complex food production, distribution, and consumption network.In light of the increasing concerns surrounding food safety and authenticity, this initiative aims to establish a comprehensive and transparent FTS.By leveraging IoT devices to capture real-time data and employing BT for secure and decentralized record-keeping, the system offers unprecedented transparency into the FTS.This introduction establishes the context for examining the significant impact of advanced technologies on transforming food traceability.These technologies provide improved safety measures and cultivate consumer confidence in the reliability of the worldwide food distribution network [8].

Related works
The contemporary FSC encounters increasing difficulties, encompassing foodborne diseases and deceptive behaviors, demanding inventive approaches to guarantee safety and transparency.This literature review examines the utilization of an FTS that capitalizes on the collaborative benefits of the IoT and BT.The increasing consumer consciousness regarding the source and safety of food products is driving the adoption of advanced technologies that can potentiallytransform the food industry significantly.
The authors, Iftekhar and Cui (2021), put forward a proposition for creating an FTS based on BT.This system aims to guarantee food safety and safeguard consumers' well-being, particularly by addressing the potential hazards linked to the COVID-19 pandemic [9].BT is employed to establish an unalterable and easily observable record of the FSC.The system's output offers immediate traceability, presenting result values that showcase improved consumer safety and establishing supply chains free from COVID-19 contamination.The methodology described in reference [10] focuses on implementing a blockchain-based IoT system designed to ensure traceability in the food industry.This system incorporates a consensus mechanism that is seamlessly integrated within its framework.The implementation process entails incorporating IoT devices to gather realtime data.This integration is facilitated by utilizing BT, which guarantees the security and transparency of maintaining records.
The methodology proposed in reference [11] entails the development of an FTS-FSC utilizing BT.The implementation process involves the incorporation of BT to establish a traceability framework that is both secure and transparent.The resultant outcome is a conceptual framework for establishing traceability mechanisms within the intricate network of the FSC.The outcome of this endeavor encompasses enhanced levels of transparency and traceability.The advantages of this approach include improved security and increased trust.However, it is important to consider potential disadvantages, such as the requirement for widespread industry adoption of standardized practices.
The authors in reference [12] concentrate on developing an FTS by utilizing the IoT and big data.Integrating IoT devices and big data analytics facilitates a comprehensive traceability system.The resulting product is a traceability system designed to protect and ensure the well-being of the general population.The outcome values exhibit enhanced traceability and insights derived from data analysis.One of the notable benefits of this approach is the ability to conduct real-time monitoring and leverage data analytics.Feng H. et al. utilized BT to augment traceability within the agri-food sector.BT integrates to establish a traceability system that ensures both transparency and immutability [13].The output encompasses an analysis of various development methodologies, the advantages derived, and the obstacles encountered when implementing BT in agri-food traceability.The outcome values emphasize a heightened level of transparency and trust.
The methodology described in reference [14] centers on creating an FTS for agricultural products in Thailand, employing BT and the IoT.The implementation process involves the integration of BT with IoT devices to establish a comprehensive system for traceability.The resulting product is a traceability system specifically designed for the agricultural sector in Thailand.The outcome values exhibit enhanced levels of transparency and traceability.There are several advantages associated with this approach, including the improvement of product authenticity and the enhancement of consumer confidence.One possible drawback could be the requirement for extensive adoption within the industry.
The methodology described in reference [15] utilizes the integration of BT and IoT to establish a secure and unalterable data infrastructure that guarantees the availability of information about food safety.The output encompasses the provision of data availability that is resistant to tampering.The outcome values demonstrate enhanced data integrity and security.In their study, Balamurugan, S., Ayyasamy, A., and Joseph, K. S. (2021) employed traceability techniques driven by IoT blockchain to enhance safety measures within the FSC.The integration of IoT devices and BT is employed to improve the level of traceability [16].The resulting outcomes encompass enhanced safety protocols implemented The conducted literature survey uncovers a highly compelling and significant landscape that emerges from the convergence of the IoT and BT in implementing FTS.Integrating these technologies exhibits significant potential in augmenting safety protocols within the FSC.The studies that have been reviewed collectively emphasize the benefits of acquiring data in realtime, maintaining secure and transparent records, and implementing traceability frameworks that are resistant to tampering.The predominant outcomes that arise from efforts to enhance transparency, foster consumer trust, and address the risks associated with food safety issues and fraud are improved.

Implementation of an FTS utilizing the IoT and BT to enhance safety measures in FSC 3.1 System model
The integration of BT into IoT data has the potential to greatly simplify the organization of diverse and indeterminate devices and methods, encompassing transactions and interactions among these devices.Cryptographically-based IoT devices can function as intelligent agents within a blockchain network, facilitating automated and secure transactions.Given the limited resources within IoT networks and the inherent limitations of BT, every participant must maintain a precise replica of the blockchain to uphold its integrity and coherence.Driven by these conflicts, Fig. 1 illustrates the architecture of the IoT-based BT, which enhances the blockchain by serving as a hyperlink for storing data about all transactions within the IoT network.The projected architecture of the IoT comprises three distinct layers: local IoT, Blockchain network, and server.A contemporary BT communication system has been developed to transfer blocks within a hierarchical structure, specifically addressing security concerns within IoT networks.The primary objective of the BT is to securely facilitate the movement of nodes and effectively manage their extensive computational resources while ensuring the secure management of existing blocks within individual IoT networks.The overview of a conventional food processing system elucidates the fundamental techniques employed.The initial phase involves cultivating and harvesting primary food resources within a centralized facility, which serves as a hub for a wide array of food suppliers operating both domestically and internationally.Subsequently, the producers dispatch the shipments to central locations and wholesalers.Upon closer examination, it can be determined that the local distributor possesses a variety of wholesale and retail establishments that effectively cater to customers' demands.The food processing scenario is depicted in the Fig. 2.

Fig. 2.The food processing scenario
Faked food products can be brought into the market through multiple channels that food retailers and distributors commonly utilize.Wholesalers have the potential to acquire counterfeit food products from unlicensed vendors at a low cost, which can lead to various complications such as compromised product quality, misleading advertising, or the potential for becoming a commodity reseller or a wholesale distributor (see Fig. 2).The counterfeit food industry thrives at the detriment of consumer well-being.At the same time, the regulatory system inadequately addresses the challenges posed by this illegitimate market.The assessment of counterfeit food business speculation yields substantial profits, serving as a significant incentive for fraudulent activities.Furthermore, the absence of a reliable and comprehensive monitoring system contributes to the sustenance of this illicit industry.One significant issue pertains to the retailer's selling expired food to consumers without adequate information.Although the government has tried to implement preventive measures and monitor this activity, none of the proposed solutions have demonstrated effectiveness thus far.The issue of affordable food trade and distribution in wholesale and retail establishments is of considerable importance as it hinders consumers from accessing unjust or hazardous food products.
The proposed system will incorporate a singular QR code to facilitate the identification of food production and labeling across all retail containers, subsets, and containers, encompassing various categories such as fruits, vegetables, and packaged recipes.The proposed system will encompass the following components.The QR code contains information regarding the specific category of food items, the names and licenses of the producers, and the date of production, which are essential pieces of information to consider in an academic context.
The package contains information regarding its manufacturing details, expiration date, batch number, and other relevant information.The proposed system relies on QR coding as its primary component to prevent the infiltration of counterfeit food products into the FSC.The shipment of food products occurs at various points of dispersion but only after the nutritional content has been tested for validity.The implementation involved the utilization of anFTS-IoT-BT framework, as illustrated in Fig. 3.

Fig. 3.FTS-IoT-BT framework
This system incorporated a five-step approach to mitigate the occurrence and introduction of counterfeit goods into the market.
Step 1: Let us consider a scenario where a food processing unit log indicates the production of 70 containers of food items in a single batch.Given that each container is manufactured within a uniform production group, it is possible to identify them using a shared batch number.Additionally, each cap is designated with a specific numerical value representing the number of barrels.Similarly, each casket would possess distinctively , 050 (2024) BIO Web of Conferences MSNBAS2023 https://doi.org/10.1051/bioconf/2024820501616 82 labeled sub-packets, and so forth.The knowledge mentioned above is stored within the archive via a BT network.
Step 2: In step 2, the identical packaging products transport 70 containers to its affiliated material management entity.During this process phase, the logistic associate will assess the authenticity of the caps and subsequently approve the batch if they are deemed genuine.The present transfer will now proceed to revisit this matter.The blockchain database is a distributed ledger technology that enables the secure and transparent storage and management of digital records.As additional logistics team members are incorporated, an identical procedure of scrutinizing the ledger during every transaction has been implemented.This action would guarantee coherence in the entire flow of goods and services within a FSC.
Step 3: In step 3, once the validity of the shipment has been established, the food distribution will be received by the key distributors from the logistic associates.Certain key merchants are acquiring a growing number of food packages.Each subsequent transfer will also modify the handout.This movement represents the equal allocation of protective food volumes throughout the supply chain network.
Step 4: In Step 4, the primary distributors will distribute goods locally.The distributors allocate a suitable quantity of food items.The proposed measure will encompass the entirety of the market and its associated distribution channels.The details mentioned above are documented within the database constructed upon the blockchain.
Step 5: In Step 5, the customer procures the requisite items from a food retailer situated at the lower end of the supply chain.Additionally, the customer verifies the authenticity and integrity of the food packages by utilizing the QR code.In the absence of confirmed reliability, customers will decline to purchase food.The approach would be updated in the marketing strategy until consumers purchase the product.The food sold is currently completing its life cycle within the FSC.

Results and discussion
In this study, a series of experiments were conducted and subsequently analyzed, encompassing 50 iterations for each cryptographic foundation.The execution time in milliseconds, including the highest, lowest, and mean values, was measured for 50 iterations.The observed results are presented in Fig. 4. Several operations are executed denoted by the symbols ", , , ,  " representing the duration needed for a "bilinear connecting," a "flexible exponential growth," a "rectangular curve point (scalar) multiplication," a "elliptic curve point addition," and a "symmetric key encryption/decryption" respectively.IoT-BT provides a comprehensive overview of the highest and lowest durations (in milliseconds) associated with different operations.It is worth noting that the operation labeled"" demonstrates the longest duration of 7.21 milliseconds and the shortest duration of 3.76 milliseconds.This observation implies that the computational load associated with this specific operation is relatively higher.
On the other hand, the execution times of operations such as ", " ", " ", "  "" are considerably lower, ranging from 0.219 ms to 0.001 ms.This suggests that these tasks are processed efficiently and quickly.The values collectively serve as indicators of the system's performance, wherein the preference is given to lower execution times due to their advantageous nature in real-time applications.The execution times of FTS-IoT-BT offer valuable insights into the system's efficiency, enabling the development of optimization strategies for time-sensitive processes.
The present study assesses the proposed scheme and visually presents the throughput across different nodes for implementing IoT in agriculture.The evaluation specifically focuses on the deployment of various nodes for monitoring purposes.The graphical representation is depicted in Fig. 5.  [14], [15], and [16] demonstrate a consistent upward trend in throughput as the quantity of IoT devices escalates, culminating in peak values of 86%, 88%, and 90.2%, correspondingly.It is worth mentioning that the FTS-IoT-BT, as proposed, outperforms the systems mentioned in the literature by achieving a superior throughput in all tested scenarios.Specifically, it reaches a peak of 96.7% when employing ten IoT devices.The statement above implies that the proposed FTS-IoT-BT system exhibits enhanced efficacy and scalability, enabling it to support more IoT devices without compromising throughput.The values presented in the table highlight the system's capacity to effectively manage higher device workloads, which is a critical factor for applications operating in dynamic and data-intensive settings.The FTS-IoT-BT solution is proposed as a reliable and effective approach to address the increasing demands on throughput performance in IoT deployments [17].

Conclusion
This paper presents a new type of FTS, known as FTS-IoT-BT, that utilizes the Internet of Things (IoT) and Blockchain Technology (BT).The main aim of this framework is to enhance safety protocols within the FSC.This paper presents a counterargument to the belief that resolving safety, quality, and traceability concerns in food products can be efficiently achieved by adopting robust electronic food networks that depend on BT and the IoT.The annual impact of counterfeit food products on individuals is substantial in distribution and utilization.The current state of food items is recorded at specific time and location intervals to validate the credibility of data sources by employing IoT devices.The framework recognizes that Blockchain supplier ledger technology enables the transfer and storage of information at different points within the FSC, guaranteeing the accessibility, traceability, and reliability of the data.The prompt detection and subsequent implementation of access limitations to hazardous food will be readily observable at any specific location within the network.The FTS-IoT-BT comprehensively analyzes the

,Fig. 4 .
Fig. 4.Execution time for 50 iterations using FTS-IoT-BT Fig.4depicts the execution time for 50 iterations using FTS-IoT-BT.Fig.4comprehensively analyzes the system's performance across various operations.The FTS-IoT-BT provides a comprehensive overview of the highest and lowest durations (in milliseconds) associated with different operations.It is worth noting that the operation labeled"" demonstrates the longest duration of 7.21 milliseconds and the shortest duration of 3.76 milliseconds.This observation implies that the computational load associated with this specific operation is relatively higher.On the other hand, the execution times of operations such as ", " ", " ", "  "" are considerably lower, ranging from 0.219 ms to 0.001 ms.This suggests that these tasks are processed efficiently and quickly.The values collectively serve as indicators of the system's performance, wherein the preference is given to lower execution times due to their advantageous nature in real-time applications.The execution times of FTS-IoT-BT offer valuable insights into the system's efficiency, enabling the development of optimization strategies for time-sensitive processes.The present study assesses the proposed scheme and visually presents the throughput across different nodes for implementing IoT in agriculture.The evaluation specifically focuses on the deployment of various nodes for monitoring purposes.The graphical representation is depicted in Fig.5.

,Fig. 5 .
Fig. 5.Comparison of throughput (%) for varying number of IoT devices Fig. 5 compares throughput (%) for varying numbers of IoT devices.The cited sources[14],[15], and[16] demonstrate a consistent upward trend in throughput as the quantity of IoT devices escalates, culminating in peak values of 86%, 88%, and 90.2%, correspondingly.It is worth mentioning that the FTS-IoT-BT, as proposed, outperforms the systems mentioned in the literature by achieving a superior throughput in all tested scenarios.Specifically, it reaches a peak of 96.7% when employing ten IoT devices.The statement above implies that the proposed FTS-IoT-BT system exhibits enhanced efficacy and scalability, enabling it to support more IoT devices without compromising throughput.The values presented in the table highlight the system's capacity to effectively manage higher device workloads, which is a critical factor for applications operating in dynamic and data-intensive settings.The FTS-IoT-BT solution is proposed as a reliable and effective approach to address the increasing demands on throughput performance in IoT deployments[17].