IoT-based tracking and tracing platform for prepackaged food supply chain

Purpose – The purpose of this paper is to propose an effective and economical management platform to realize real-time tracking and tracing for prepackaged food supply chain based on Internet of Things (IoT) technologies, and finally ensure a benign and safe food consumption environment. Design/methodology/approach – Following service-oriented architecture, a flexible layered architecture of tracking and tracing platform for prepackaged food is developed. Besides, to reduce the implementation cost while realizing fine-grained tracking and tracing, an integrated solution of using both the QR code and radio-frequency identification (RFID) tag is proposed. Furthermore, Extensible Markup Language (XML) is adopted to facilitate the information sharing among applications and stakeholders. Findings – The validity of the platform has been evaluated through a case study. First, the proposed platform is proved highly effective on realizing prepackaged food tracking and tracing throughout its supply chain, and can benefit all the stakeholders involved. Second, the integration of the QR code and RFID technologies is proved to be economical and could well ensure the real-time data collection. Third, the XMLbased method is efficient to realize information sharing during the whole process. Originality/value – The contributions of this paper lie in three aspects. First, the technical architecture of IoT-based tracking and tracing platform is developed. It could realize fine-grained tracking and tracing and could be flexible to adapt in many other areas. Second, the solution of integrating the QR code and RFID technologies is proposed, which could greatly decrease the cost of adopting the platform. Third, this platform enables the information sharing among all the involved stakeholders, which will further facilitate their cooperation on guaranteeing the quality and safety of prepackaged food.


Introduction
Prepackaged food refers to the food that is packaged before being offered for sale.It is recognized with two important features.On one hand, its content cannot be altered without opening or changing the packaging.On the other hand, it can be directly consumed by ultimate customers.Prepackaged food plays a more and more important role in modern lives as it could bring many benefits, for example, it boasts more varieties, with longer shelf-lives, and is much more convenient for usage and storage.According to the report of "Research and Markets" (Hartman, 2015), the market of prepackaged food will bring $3.03 trillion revenue by 2020.However, with the booming of prepackaged food industry, the food safety incidents increase accordingly, which greatly decrease the confidence of consumers and even bring about severe public health impact.Therefore, to prevent these food incidents and ensure a benign food consumption environment, a lot of efforts have been made by governments and industries.For example, the Food and Environmental Hyglene Department of Hong Kong has erected regulation on the labeling of prepackaged food to provide precise and sufficient information for customers.Wuliangye Yibin Co. Ltd, one of the most famous Chinese alcoholic beverage companies, has adopted radio-frequency identification (RFID) to the packaging of its products for anti-counterfeiting.
The efforts are still far from sufficient that safety and quality problems still frequently happen, such as counterfeiting, excessive and unhealthy additives, and expired food and bad food.It is also challenging to solve these problems arising in prepackaged food industry as it involves too many companies, from raw material suppliers, producers, logistics companies, to distributers and retailers.Meanwhile, the amount of prepackaged food is tremendously huge, which posts another difficulty to control the quality.Furthermore, the packaging of the food is usually simple and cheap, which is easy to be fabricated.
Effective tracking and tracing for these prepackaged food during their whole supply chains should be an effective tool to solve these problems, and it has also been widely recognized and verified in the food industry (Heyder et al., 2012;Gandino et al., 2007;Scholten and Verdouw, 2016).With the booming of Internet of Things (IoT) technologies, many Real-Time Tracking and Tracing Systems (RT 3 Ss) for food supply chain have been developed to guarantee the safety of food (Trienekens et al., 2014).RT 3 S makes it possible to detect potential safety threats and then make rapid response to deal with safety incidents (Aung and Chang, 2014).Besides, it can also increase the confidence of customers to buy these foods (Liu and Han, 2016).
However, there are still little efforts having been made to focus on realizing fine-grained tracking and tracing for prepackaged food throughout its whole supply chain, from production, packaging, distribution, to consumption and final disposal.In view of the specific characteristics of prepackaged food and its supply chain, challenges still exist.Different from other types of food, the extremely huge quantity of prepackaged food makes it difficult to realize item-level tracking and tracing.Besides, bath code, which is widely applied in the current practices for tracking and tracing purpose, is easy to be counterfeited.Furthermore, although RFID technology could realize item-level tracking and tracing, it will cost too much considering the huge amount of prepackaged food products.To be more clearly, the following problems remain to be solved to build the RT 3 S: • How to design an economically solution to realize item-level real-time tracking and tracing?
• How to build an integrated tracking and tracing platform for prepackaged food during the whole supply chain?
• How to support the identification of the casual factors when safety incidents appear?
• How to facilitate the decision-making processes based on the mass real-time data collected?
To solve these problems, this research proposes an IoT-enabled tracking and tracing platform for prepackaged food during its whole supply chain.An integrated solution of adopting the RFID and QR code is worked out to decrease the implementation cost.Besides, the evaluation and warning service module is developed to identify the casual factors when safety incidents occur.Furthermore, the data analytics service is also proposed for extracting useful information to facilitate the management of prepackaged food supply chain.
The rest of this paper is organized as follows.Section 2 reviews related works.Section 3 presents the technical architecture of the IoT-based tracking and tracing platform.Section 4 describes its four key services.In Section 5, a case study is given to verify the effectiveness of the proposed tracking and tracing platform.Section 6 summarizes this research.

1907
IoT-based tracking and tracing platform 2. Literature review Food supply chain refers to the processes from food production, processing, distribution, to consumption and disposal.A lot of research has also been made through using various emerging technologies to guarantee the food safety and maximize the economic benefits in a specific food supply chain process.For instance, to clarify the upstream and downstream of food supply chain management activities, Thakur and Hurburgh (2009) proposed a system for bulk grain supply chain traceability.They used a relational database management system to record information (internal traceability) and Extensible Markup Language (XML) for exchange of the information (supply chain traceability) between different parties.Similarly, in order to solve a specific food quality and safety issues, Kong et al. (2013) presented the quality traceability system for bee products.To facilitate interchange of information, the TraceFood Framework was proposed based on TraceCore XML and sector-specific ontologies by Storøy et al. (2013).The TraceFood Framework consists of recommendations for "Good Traceability Practice", common principles for unique identification of food items, a generic standard for electronic information exchange (TraceCore XML), and sector-specific ontologies.Bechini and Cimino (2008) developed a prototype of traceability web information system for the food supply chain to track and trace product units and batches.
A lot of research and practices have also been made on using IoT technologies, including the adoption of QR code and RFID technologies, to achieve the food traceability and ensure the food safety in supply chain management.
The QR code becomes popular in the food supply chain due to its faster readability, larger storage capacity, and relatively reasonable expenses in real-life applications.Qiao et al. (2013) proposed a vegetable safety traceability model by integrating two-dimensional barcode technology and web service technology.In order to achieve the tracking and tracing in the farm product supply chain, Gao (2013) studied the application of the QR code technology in the farm product supply chain traceability system and the design of the QR-code-based traceable logistics information system, which applied the QR code technology in the transfer process of information in the vegetable supply chain, including planting, processing/packaging stage, and distribution/retail stage.For achieving tag generation, image acquisition and pre-processing, product inventory, and tracking, Tavares et al. (2012) designed a tracking and tracing solution in supply chains by using a quick response code.Using the QR code, Xu and Gao (2015) built a white guard traceability system for SHUNZI Vegetable Cooperatives to achieve the farm-to-table whole process recordability and traceability.
RFID is another popular Auto-ID technology that has been widely adopted.Fenu and Garau (2009) proposed an RFID-enabled architecture for gathering information throughout the entire pork supply chain.Similarly, in order to guarantee the effective response in case of any health problems, Hsu et al. (2008) proposed an RFID-enabled traceability system for live fish supply chain where the RFID tag is put on each live fish and is regarded as the mediator which links the live fish logistic center, retail restaurants, and consumers for identification.Aiming at providing full and verifiable traceability across a supply chain, Kelepouris et al. (2007) proposed an information infrastructure for RFID-enabled traceability in food supply chain.To develop an efficient tool to ensure traceability data entry based on RFID and improve the detection of fakes inside the supply chain, Azuara et al. (2012) implemented a secure traceability system with a cryptographic operator.The system could identify fakes and potential counterfeits, which could significantly reduce the cost of security management.
Although a lot of research has been done, few attention has been paid to track and trace for prepackaged food supply chain.An economical solution is still needed to realize item-level tracking and tracing in prepackaged food supply chain.

Overview of IoT-based tracking and tracing platform
Following service-oriented architecture and IoT applications in many other fields (Qiu et al., 2015;Xu, Huang and Fang, 2015;Xu, Huang, Fang and Chen, 2015;Zhong et al., 2013), the technical architecture of IoT-based tracking and tracing platform for prepackaged food is proposed, as shown in Figure 1.Basically, it consists of five layers: perception layer, data layer, service layer, application layer, and users layer.
The perception layer refers to the physical assets and corresponding smart devices.Following the concept of cloud asset (Xu, Huang and Fang, 2015;Xu, Huang, Fang and Chen, 2015), all these physical assets are attached with smart devices to become smart.Besides, considering the specific scenarios in prepackaged food supply chain and lowering the implementation cost, the integrated solution of using both the QR code and RFID tag is proposed.The QR code is attached to every prepackaged food while RFID tag is attached to different levels of package, which contains a certain amount of the prepackaged food.Smart gateway is another important component in this layer, which connects and manages a set of physical assets nearby, processes caches and exchanges real-time data and events locally and temporally, and provides support for service definition, configuration, and execution (Fang et al., 2013).
The data layer stores the data collected from the perception layer and the execution data generated from the upper layers.It contains three parts.Object data refers to the static data, such as the company information, prepackaged food information, etc. Event data are the transaction data during the supply chain.Besides, XML Schema is also stored in this layer to facilitate the data exchange among various heterogeneous systems.The adoption of XML also the information to be obtained easily, stored properly, and exchanged compatibly (Qin, 2011).
In order to provide extensive management services for stakeholders in prepackaged food supply chain while excluding the complexity of managing the underlying hardware and software for them, the service layer is proposed.It contains four well encapsulated services, namely, smart prepackaged food lifecycle management service, tracking and tracing service, evaluation and warning service, and data analytics service.The details of these services will be further discussed in Section 4.
The application layer contains applications built upon the services provided by the service layer.Three applications are designed to cover the three key stages of prepackaged food supply chain, from production, logistics, to consumption.An integrated explorer is also built for all the users in the top layer to access these applications.

Key services
4.1 Smart prepackaged food lifecycle management service Smart prepackaged food lifecycle management service aims at providing lifecycle management for smart prepackaged food, and managing the transaction relations during its supply chain.In general, it consists of three sub-systems: assembling system, disassembling system, and transaction system, as illustrated in Figure 2.
4.1.1Assembling system.Assembling system is responsible for assembling the prepackaged food with its packages and manages the relationships between prepackaged food and its packages in different levels, from small package to large package, as shown in the left part of Figure 2. First, unique regulatory codes of the QR code and RFID tags are obtained from the platform.Then, the information of prepackaged food could be decoded and stored in the QR code, which will be labeled on the prepackaged food item.After that, several prepackaged food items will be packaged into one middle-level package, with an RFID tag attached on it.The relation between these prepackaged food items and the middle-level package is thus built.The process continues from middle-level packages to higher-level packages, as shown in Figure 2. All these relations will be captured by smart devices, pre-processed by smart gateways, and then stored in the data layer.4.1.2Disassembling system.Disassembling system is responsible for the prepackaged food from higher-level packages to middle-level packages, and finally to single items, as shown in the right part of Figure 2. It is a reverse process of assembling.The relations among these packages and items will also be disbanded.Similarly, the disassembling process will also be captured by smart devices and stored in the data layer.4.1.3Transaction system.Transaction system is built for connecting the assembling system with the disassembling system, which could be a bridge between the prepackaged food producer and the downstream distributors.When the packaged food needs to be transported to the distributors, the transaction system will record the detailed information, like the delivery date, destination and the quantity of the correlated food in different package levels, etc.Once the products arrive at the destination, the disassembling process activities will be carried out by scanning the RFID labeled on the packages.Thus, transaction system clearly depicts where the products are sold, which is often concerned by the producer, and what kind of exact products the distributors get.

Tracking and tracing service
Tracking and tracing service is the key service for food producers, logistics providers, and retailers to track and trace the flow of prepackaged food during its whole supply chain.The information will also open for consumers to trace the production and logistics process of the food they purchased.
Through the implementation of this service, manufacturers can track the processing processes of their products.If manufacturers receive the notifications about the defective prepackaged food, immediate measures could be made to minimize the impact.For distributors, they could identify the defective food simultaneously, and stop the circulation of these foods.Consumers can scan the QR code by their smart phones to capture the safety information of the prepackaged food.Meanwhile, administrative authorities can send notifications about the defective prepackaged food before them threating the public health, and recall the food for disposal.

Evaluation and warning service
Evaluation and warning service provides two key functions.First, it allows prepackaged food suppliers to get feedbacks from customers, regarding the quality, content, and other subjective evaluations on the prepackaged food.This is essential for companies to continuously improve the quality of prepackaged food and the related services.Second, this service can also provide warning information for potential problems.Two strategies are provided: threshold supervision: once the quantity of the comments reaches the threshold, the warning information will be sent out with detailed information on all the involved products; and self-supervision: the warning information will be sent to consumers once producers detect some potential safety incidents in the prepackaged food.

Data analytics service
Data analytics service aims at mining useful information from historical data to provide guidance for future prepackaged food supply chain management.Basically, three analysis modules are provided in this service: (1) Regional consumption analysis: the enterprise can view the regional consumption data based on the users' IP address.For instance, once the consumer scans the QR code, the IP information will be recorded in the data layer, which is of great importance to identify the consumption characteristics and predict the potential demands in different regions.

IoT-based tracking and tracing platform
(2) Anti-counterfeiting analysis: through analyzing the scanning information sent from smart devices, anti-counterfeiting can achieved.For example, once a single code has been scanned many times in different places, it will be identified as a sign for potential counterfeit products.
(3) Quality analysis: the detailed analysis of consumer evaluation data will be conducted to find the frequently happening incidents and make necessary measures.

Case study
In this section, a case study is conducted to evaluate the effectiveness of the proposed platform, and demonstrate its working processes.

Scenario description
This case study is based on Guangxi Wuzhou Double Coins Industrial Co.Ltd (GWDCI), which is one of the largest prepackaged food producers in South China.The annual production of its representative product, tortoise jelly, has already exceeded 1,000 tons.However, with the rapid development of GWDCI, it also faces several challenges: due to the large quantity of its product, it is very difficult to control the quality through the whole supply chain; when safety incidents occur, it is difficult for GWDCI to identify the casual factors; and there lacks an effective method to get feedbacks from consumers.

Platform development and implementation
According to the architecture proposed in Section 3, the tracking and tracing platform is developed under Java Runtime Environment version 1.8.Redis is used for the cache in the platform, and MySQL is selected as the database.
In the implementation phase, the QR codes were printed on to every single product package during the packaging process, while the RFID tags are attached to middle-level packages.In this case, each middle-level package contains 24 boxes of tortoise jelly.The price of the RFID tag applied in this case is 0.66 dollar for each with an approximately 3 meters' reading/writing distance and 860-960 MHz working frequency.Meanwhile, the QR code is printed by an ink jet printer.The average cost for each QR code is around 0.0003 dollars.
The company can easily follow five simple procedures to configure the platform, as shown in Figure 3. First, the managers of companies need to define the product information in the platform.Second, the information will be checked by "Enterprise Authentication".The third step is product authentication, where companies verify their product information, such as the volume of the products and the types of products.Fourth, the platform will generate a customized product code for the food enterprise.Finally, after transmitting the customized product code to the product code machine, the packaging processes begin: • using the automatic cartooning machine to pack the prepackaged food; • printing the QR code on the package through coding machine; and • middle-level packaging through the packaging machine, and then attach RFID tags on them.
According to the steps above, the mapping relation between the single product (QR code) and middle-level package (RFID tags) is established and the platform could begin to execute to support the management processes.

5.3
The management processes 5.3.1 Product management.The needs to edit the product information into the QR code, as shown in Figure 4(a).This information includes producing place, production batch, production date, and the destinations.Then the operator scans the QR code to record the information in the system through the smart devices.
5.3.2Packaging management.Unique regulatory codes of the QR code and RFID tag are obtained from tracking and tracing platform.The information of the prepackaged food are decoded and stored in the QR code which will then be labeled on the prepackaged food itself.If there are middle-level packages such as boxes, several prepackaged food will be placed together into middle-level packages with RFID tags attached on them.This parent-child relation will then be captured by smart devices, as shown in Figure 4(b).The historical data will be analyzed in this part and represented in an easy-to-understand format, as shown in Figure 4(d).The company could easily grasp the flow of products, and the statistical information about where and who are consuming these products, as illustrated in Figure 5.This could benefit the company a lot for the optimal allocation of resources and design marketing strategies.For example, if a group of packaged food is about to expire in the A area, the enterprise could transfer them to the B area or conduct a sales promotion.
5.3.5 Consumption management.After purchase, consumers can scan the QR code on the prepackaged food to check its detailed information, as well as tracing its logistics processes, as shown in Figure 4(e).

Discussions
Through the case study, several benefits could be gained by using the proposed platform.First, it enables the company to monitor the whole process of prepackaged food supply chain.Second, the implementation cost could be greatly reduced through adopting the integrated QR/RFID solution.Assuming the volume of the products is 1,000 boxes per day, the cost of the combination method and the RFID only method is 28.02 dollars and 660 dollars, respectively (in this case, a middle-level package tied with 24 boxes of tortoise jelly).Third, it builds an effective channel for companies to get the feedback from end consumers, which could be a great help to improve the quality of the products.Fourth, it facilitates the identification of causal factors when food incidents occur.

Conclusion
Real-time tracking and tracing are of great importance to ensure the safety and quality of the prepackaged food.Based on IoT technologies, this paper proposed an integrated tracking and tracing platform for the prepackaged The contributions of this paper can be summarized as follows.First, the technical architecture of an IoT-based tracking and tracing platform is developed.It could not only realize item-level tracking and tracing for the prepackaged food, but also cover the whole process of its supply chain.Besides, the platform is flexible enough to be extended into many other areas.Second, an economical solution of integrating the QR code and RFID is proposed which could greatly reduce the implementation cost of the platform.The corresponding management service, smart prepackaged food lifecycle management service, is also proposed to support the execution of the integrated solution.Third, through adopting XML, this platform enables the information sharing among all the involved stakeholders, which will further facilitate their cooperation on guaranteeing the quality and safety of the prepackaged food.Finally, the casual factors could be identified in time when safety incidents happen, which facilitates the timely responses to avoid the impact of consumer health.
In the future, this work can be extended from the following three aspects.First, the scalability and compatibility of the proposed platform should be further evaluated in more real-life cases.Second, the data analytics tools should be further explored to support the operational optimization during prepackaged food supply chain.And third, an effective warning system should also be developed to prevent the occurrence of food incidents.
IoT-based tracking and tracing platform Figure 2. Associated relation management for tracking and tracing platform Figure 3.The implementation process of the tracking and tracing platform Figure 5. Regional consumption analysis