Blockchain-Driven IoT for Food Traceability With an Integrated Consensus Mechanism

Food traceability has been one of the emerging blockchain applications in recent years, for improving the areas of anti-counterfeiting and quality assurance. Existing food traceability systems do not guarantee a high level of system reliability, scalability, and information accuracy. Moreover, the traceability process is time-consuming and complicated in modern supply chain networks. To alleviate these concerns, blockchain technology is promising to create a new ontology for supply chain traceability. However, most consensus mechanisms and data flow in blockchain are developed for cryptocurrency, not for supply chain traceability; hence, simply applying blockchain technology to food traceability is impractical. In this paper, a blockchain–IoT-based food traceability system (BIFTS) is proposed to integrate the novel deployment of blockchain, IoT technology, and fuzzy logic into a total traceability shelf life management system for managing perishable food. To address the needs for food traceability, lightweight and vaporized characteristics are deployed in the blockchain, while an integrated consensus mechanism that considers shipment transit time, stakeholder assessment, and shipment volume is developed. The data flow of blockchain is then aligned to the deployment of IoT technologies according to the level of traceable resource units. Subsequently, the decision support can be established in the food supply chain by using reliable and accurate data for shelf life adjustment, and by using fuzzy logic for quality decay evaluation.


I. INTRODUCTION
The perishable food supply chain (PFSC) is always an attractive but challenging sector in the ontology of supply chain management, for better quality assurance, efficient information exchange, and for satisfying strict handling requirements [1].In recent years, food safety issues and scandals (such as African swine fever (ASF) and hygiene breaches in UK meat plants) have been raging.Hence, end consumers have become increasingly concerned about the source of origin, shipping conditions, and quality of food.Therefore, a comprehensive, effective, and efficient food traceability system is needed in this ever-changing supply chain sector.The existing food traceability systems (or models) were formulated in the following aspects: (i) information and communication technologies, including Radio Frequency The associate editor coordinating the review of this manuscript and approving it for publication was Mu-Yen Chen.
Identification (RFID) and Near field Communication (NFC); and (ii) chemical and biological analysis, including isotope analysis and DNA barcoding [2].These were applicable tools for tracing, tracking, identifying, and monitoring the food to maintain its quality and safety through the supply chain.However, the growth of e-commerce business in perishable foodstuffs also facilitates the international trading of perishable food, and changes customer behaviour in the supply chain, adaptability, efficiency, and reliability of such existing traceability methods are insufficient to share information among the complicated supply chain network.Figure 1 shows the recent generic PFSC with six major supply chain parties along two challenges for food traceability.First, to trace and track objects in the PFSC, the adequate definition of traceable resource units (TRUs), which is used to identify and mutually understand traceable objects covering trade units, production units, and logistics units for supply chain activities, are required from raw suppliers to end consumers [3].TRUs are an essential component of food traceability for considering the mix and different packaging of food products by providing unique identities in specific food supply chains.Actual material flows in the PFSC involve a complex mixture of shippers, consignees, and TRUs, such that a traceability tree is created to visualise the whole traceability process.In addition to deploying IoT technologies for food quality assurance and operational concerns of e-commerce logistics, the entire traceability tree becomes much more complicated for locating a single piece of food and for retrieving its relevant traceability information.Thus, the entire traceability process becomes time-consuming, while the system reliability and adaptability should be further improved.Second, in modern supply chains (particularly in e-commerce businesses), customers cannot touch the items when purchasing; hence, they heavily rely on information provided by e-shops and logistics companies.However, accurate traceability information is difficult to ensure, and the decision support for food quality assurance (including shelf life and quality decay evaluations) is also lacking.Worse still, certain health problems may be caused if end customers consume poor-quality food.Blockchain is deemed feasible in the area of food traceability, because the validated data cannot be manipulated and low-cost implementation creates trust in the supply chain network.Accordingly, blockchain enables the functions of tracking food items and reliable monitoring of the volume of handling conditions throughout supply chain activities.However, the existing consensus mechanism in blockchain is developed for cryptocurrency, rather than supply chain traceability.Therefore, the mechanisms are inappropriate and insufficient to achieve consensus in the distributed supply chain network.
To overcome the above challenges, a blockchain-IoTbased food traceability system (BIFTS) is proposed in this study, to achieve the following: (i) to integrate blockchain and IoT technology for effective and efficient traceability, and (ii) to support shelf life adjustment and quality decay evaluation for improving quality assurance.For the sake of better computational load, the blockchain is modified as a lightweight blockchain to be associated with cloud computing to support IoT monitoring, and can be vaporised after the entire life cycle of traceability to release computational resources of the system.By using such a reliable data source, the decision support in food quality can be made by using fuzzy logic to determine adjustment of shelf life, rate, and order of quality decay, according to different situations for each batch of perishable foodstuffs at food processing sites.Therefore, the proposed traceability model is extended to the modern food supply chain environment, resulting in reliable and intelligent monitoring, food tracking, and quality assurance.
The remainder of this paper is organised as follows.Section II reviews work concerning traceability in PFSCs, blockchain, and IoT technology, and artificial intelligence in shelf life management, and summarises the motivation of this study.Section III describes the architecture of the proposed BIFTS.Section IV presents a case study to validate the feasibility of the proposed model.Section V discusses the results and performance evaluation of adopting the BIFTS.Finally, Section VI presents the conclusions.

II. RELATED WORK
In supply chain management, PFSC is considered complex and complicated due to its environmentally sensitive nature and the presence of shelf life [4].Supply chain interested parties and end customers pay close attention to information regarding products, shipment information, and environmental monitoring, to minimise the processing and transportation of unsafe and poor-quality products.This can reduce impact from adverse publicity, liability, and recalls.Therefore, traceability systems play a crucial role with significant values in the PFSC.To establish a food traceability system, TRUs should be well defined for building a complex traceability tree.There are three major components for system implementation: identification of TRUs, attributes of TRUs, and documentation of transformations [3].The identification of TRUs and transformations in traceability systems require further improvements.Therefore, reliability, information accuracy, and traceability efficiency can be further secured and enhanced, and decision support in PFSC can be obtained beyond monitoring and data management.To improve food traceability systems, IoT technology is deemed promising for interconnecting products, shipment journeys, order information, and environmental control [5], [6].It also enables the virtualisation of supply chains to monitor, control, and optimise business processes in real-time.With the adoption of wireless sensor network and cloud computing, food traceability can be established to provide the functions of shipment tracking, shipment planning, transport planning, and transport tracking for perishable foodstuffs.Table 1 summarises recent research conducted in the area of food traceability systems.It is found that the food traceability systems should cover a wide range of TRU levels, including trade, logistics, and production units.Recent developments in food traceability systems have focused on the adoption of blockchain and IoT technologies to improve data visibility, data security, and disclosure of sensitive information.Moreover, the purpose of food traceability is not only to monitor and trace food items along the supply chain, but also to enable the functions of quality control and assurance as pro-active food quality management.Due to the evolution of food supply chains, blockchain can be used as the foundation for improving system reliability and security.In addition, the integration of blockchain and IoT in the context of food traceability can become one of the current research directions [7]- [9].Some studies have presented various frameworks to investigate the suitability of using blockchain [10], [11].The adoption of blockchain technology, by considering decentralised data management, consensus mechanisms, and mining operations, is able to track and trace food in a farm-to-table approach with better transparency across the supply chain.The integration of blockchain and IoT has been studied scientifically in aspects of feasibility, implementation, and challenges [12]- [15].The advantages of blockchain and IoT integration can be summarised in the following seven aspects: (i) decentralisation and scalability, (ii) identity, (iii) autonomy, (iv) reliability, (v) security, (vi) market of services, and (vii) secure code deployment.However, several challenges have been revealed in blockchain-IoT integration, including storage capacity, security, data privacy, and smart contracts, all of which can probably occur in food traceability [16]- [18].Thus, the direct adoption of blockchain-IoT integration in real-world food traceability are theoretically sound, but practically doubtful.It is known that tremendous data are collected from IoT traceability systems, and the blockchain is not designed to handle and store such a large amount of data.Thus, the direct adoption of blockchain may cause poor performance in block mining and smart contract mechanisms, and some non-quantifiable clauses can damage the entire system.Moreover, there is a contradiction between decentralisation and anonymity in food traceability (due to data privacy concerns), particularly for sensitive data such as personal information.Besides, consensus mechanisms, for example proof of work (PoW) and proof of stake (PoS), require competition for computational resources and wealth in a distributed network; hence, it is difficult to maintain stability and scalability in blockchain-IoT systems for food traceability.Further, the entire life cycle of the blockchain is not clearly defined in PFSC.Therefore, in view of food traceability, the adoption of blockchain-IoT technology requires certain modifications and improvements to achieve the goals of traceability practically.For managing reliable traceability information, the decision support for customised shelf life management can be formulated to provide effective quality assurance and to mitigate supply chain risks.
In view of shelf life management, there are two main elements for controlling food quality: shelf life determination and quality decay evaluation [19], [20].Effective shelf life management plays an important role in PFSC to formulate the first-expired-first-out (FEFO) inventory management and to enhance quality assurance.Typically, food shelf life is determined by using biological and chemical analysis to generate a fixed shelf life based on various type of food [21].In addition, during the supply chain journey, quality decay is commonly modelled by using the Arrhenius equation to measure food quality kinetics.However, such generic approaches for evaluating shelf life and quality decay are time-consuming when conducting numerous experiments; thus, an intelligent system is required.Fuzzy logic has been found to be feasible for assessing shelf life and food quality, when integrated with sensory data and sensing technologies [22]- [24].The fuzziness and uncertainties of environmental excursion regarding various food items and subjective assessments of food sensory scores can be considered to strengthen the model of food quality kinetics.Therefore, the customisation of shelf life management for food products can be established by integrating sensory evaluation and handling conditions in the whole supply chain through the use of fuzzy logic.Therefore, the application of fuzzy logic can be an addition and extension to food shelf life management, to establish a dynamic and customised shelf life and quality decay model.
With the above studies, food traceability has significant value in PFSC, and requires enhancements in system reliability and information accuracy to cater for the needs of evolving supply chain activities, including e-commerce businesses.Blockchain-driven IoT has been found to be promising for improving food traceability systems.However, directly applying blockchain in IoT for traceability is impractical due to storage capacity limitations, data privacy, and consensus mechanisms.In addition, there is no clear definition of the life cycle of blockchain when applied in PFSC, and customised shelf life management by using the collected data is lacking.To fill the existing research gap, novel approaches in integrating blockchain, IoT technology, and food quality management are proposed in this paper.

III. DESIGN OF A BLOCKCHAIN-IoT-BASED FOOD TRACEABILITY SYSTEM (BIFTS)
This section presents a BIFTS to design an adaptive blockchain-IoT monitoring and data management system for food traceability, and to customise food shelf life and quality decay performance under various circumstances.Figure 2 shows the proposed modular framework of BIFTS with its three modules.First, IoT technologies are applied to develop an environmental monitoring application with multiple TRUs for upward, downward, and batch dispersion in the supply chain.Subsequently, the collected data are stored in a cloud database, whilst association keys and food life cycles are managed by using blockchain technology.Eventually, with reliable and secure data, food shelf life can be customised, and quality decay is systematically evaluated.

A. IoT MONITORING MODULE
Broadly speaking, the deployment of IoT technologies consists of three major components: the device layer, connectivity layer, and application layer, from collecting data in the ''Things'' to managing applications in designated IoT development platforms.This aims to provide food identification and environmental monitoring, along with shipment journeys and supply chain activities.The collected data are then used to evaluate food shelf life and quality decay.In the device layer, environmental sensors and relay nodes are installed to collect data on environmental conditions, while the collection timestamp is also recorded.In the connectivity layer, the data transmission between sensor nodes and relay nodes is performed by using wireless communication technologies (such as Bluetooth and Wi-Fi), while data transmission between relay nodes and designated IoT platforms is achieved by machine-to-machine (M2M) communication technologies (such as message queuing telemetry transport (MQTT)).In the application layer, IoT development platforms such as IBM Cloud, are applied to develop and manage the applications, and external systems and databases can be linked by using application programming interfaces (APIs).Further, the collected data can be structured and stored in a centralised cloud database for further querying.Moreover, the adoption strategy of IoT technologies is based on various level of TRUs, including container-, batch-, and piece-levels, as shown in Figure 3.An optimised number of sensors and relay nodes (according to a temperature and humidity mapping analysis) are applied in the containerlevel.This facilitates striking a balance between deployment costs and the effectiveness of environmental monitoring.The food items in the container-level are typically transported between suppliers, post-harvesting centres, and food processing centres, by using active cold chain packaging through international freight forwarding.For the batch-level, a sensor is attached for item palletisation to monitor each batch of food items.Then the pallet of items is normally shipped by road transportation between processing and distribution centres.This gains the benefits of flexibility and cost-effectiveness for handling the food items in shipment-lot levels.Eventually, the food items can be either sold in supermarkets or supplied to restaurants, and handled by using passive cold chain packaging.The outer packaging of food items provides quick response (QR) codes that contain food information, such as name, list of ingredients, and source of origin.In addition, information related to food quality (including shelf life and quality decay), and environmental monitoring is associated with the QR codes in the cloud-based applications.

B. BLOCKCHAIN DATA MANAGEMENT MODULE
When striking a balance between reliable data management and real-time data acquisition, typical blockchain development cannot cater for the requirements of food traceability systems.Although blockchain technology has the advantages of decentralised control, data transparency, auditability, distributed information, decentralised consensus, and high security, deploying blockchain without appropriate modifications may cause different negative effects in food traceability.On the one hand, storing all real-time data along the supply chain in the blockchain is ineffective in block creation and mining efficiency; thus, the time for adding new blocks increases exponentially.On the other hand, unlimited use of the blockchain for food supply chain activities is inefficient for traceability systems, which consume a high volume of system memory.A definite endpoint of the blockchain should be deployed in most industrial applications.Therefore, a hybrid approach in blockchain and Cloud development for lightweight and vaporised characteristics is proposed.

1) BLOCKCHAIN STRUCTURE AND SECURITY
In blockchains, the block structure contains the block index, data, timestamp, self-hash value, and previous hash value.The first block in the blockchain (called the genesis block), is not referred to in any previous blocks; hence, its previous hash value is zero, and it does not contain any data.Inside the block, the hash algorithm (which is a one-way function, such as SHA-256) is applied to perform the cryptographic encryption, to create a unique fingerprint for the data blocks.The difficulty of forging the blocks is set by the restrictions of the specific starting values in the output bytes.Therefore, the random number (nonce) is used to adjust the output hash values to meet the requirements.Table 2 shows the pseudo code of the block forging process, to demonstrate the target difficulty.uint32() are used to formulate a nonce value, and thus it is inputted in ft.Blockchain.calculate_hash()for generating the desired format of output hash value.The difficulty in the block forging process is used to control the update frequency of the entire blockchain, and to ensure complete synchronisation in the distributed network.The shorter time used for the block forging process is preferred, because the control of update frequency (by adjusting the target difficulty in the blockchain) can be more precise.

2) BLOCK CREATION WITH AN INTEGRATED CONSENSUS MECHANISM
To create blocks in the blockchain, proof of work was developed for mining blocks.However, this requires huge energy consumption and computational equipment to complete with other miners.Proof of stake is then developed to solve the above problems in cryptocurrency, by choosing the creator of the new block based on various selection criteria, such as wealth.In the scenario of food traceability, proof of supply chain share (PoSCS), which mimics PoS, is thus proposed to mint or forge blocks by validators instead of miners, where validators are the stakeholders in the food supply chain.The responsibility and share of supply chain parties is aggregated into a normalised supply chain share (S i ) to decide the creator of a new block, as in (1), where i denotes a designated supply chain party with a total number of parties N. Assuming that the whole journey of the food supply chain can be divided into m sections in total cycle time T , each section is performed by a designated party.Thus, the time used in PFSC for each party is considered in S i , where x j denotes binary variable representing j number of supply chain activities, and its corresponding required time is t j .In addition, the integrality of S i is expressed as n i=1 S i = 1.However, only considering the transit time is insufficient, as some parties may hold the goods for a long time, without extensive values being contributed to the traceability process.Therefore, the perceived values from the traceability system for supply chain stakeholders are considered, and they are analysed by the following four factors: influence factor INF, interest factor INT, devotion factor DEV, and satisfaction factor SAT [35].INF is the ability to promote the traceability systems to other stakeholders; INT is the willingness of the stakeholder to achieve benefits from traceability systems; DEV shows the extent of devoting their resources to formulate traceability systems; and SAT is the level of satisfaction after formulating the traceability systems.The weighting factor α, with a range of [0,1] between INT and DEV, is adjusted to determine the appropriate assessment strategy.Further, the score R of INF, INT, DEV and SAT is defined as [R l , R u ].The value of α represents three strategies for blockchain deployment: interest-first strategy (α = 0.8), moderate strategy (α = 0.5), and devotion-first strategy (α = 0.2).The motivation for applying the above four factors in stakeholder assessment is to improve the comprehensiveness and fairness of the proposed consensus algorithm, so that the mechanism cannot be dominated by only one factor of transit time.The integration of transit time and stakeholder assessment can more effectively describe the value and share of supply chain parties in the entire network.Therefore, the PoSCS can play a role of PoS in cryptocurrency to assign the validator to forge the new block in the blockchain objectively.
The above normalised supply chain share cannot reflect the level of active participation of stakeholders.Therefore, their shipment volume V(t), which is updated in a specific time interval t, in the complex supply chain network is considered to formulate a dynamic state in the supply chain share, as in (2).The shipment volume refers to all inbound and outbound shipments regarding upward and downward supply chain activities for a specific supply chain stakeholder, as shown in Figure 4. Consequently, the dynamic supply chain share S i (t) can be established to reflect the stakeholders' level of active participation in supply chain activities. 3

) SYSTEM FLOW IN BLOCKCHAIN
With regard to the deployment of blockchain, a hybrid approach is used to integrate IoT technologies, cloud computing, and blockchain.Further, the real-time IoT interactions are managed in a cloud database rather than storing all data in the blockchain.Subsequently, event or data payload IDs generated from IoT interactions are stored in the blockchain, for products to be associated with real-time data in the cloud database.Therefore, lightweight data blocks and efficient blockchain applications can be formulated, as shown in Figure 5, such that minimal data are operated in the blockchain to improve system adaptability and flexibility.When customers purchase perishable foodstuffs from e-commerce platforms, smart contracts are formulated to acknowledge the purchases and provide entitlement to access food traceability records.In view of the food life cycle in the supply chain, definite start and end nodes are required to specify the length and duration of the blockchain.Different from blockchain applications in cryptocurrency, it is unnecessary to carry all relevant data in the applications for food traceability, which might have a negative impact on computational efficiency.Hence, the mechanism of blockchain vaporisation is developed for achieving reliable food traceability effectively.A batch of food is supplied from farmers and processed by food processors, and thus batch ID (farm) can be assigned to the food for creating the genesis block.
Along the supply chain journey, the fluctuation of environmental conditions and activity tracking can be monitored and recorded in the cloud database and blockchain.Along the supply chain, the container ID, batch ID (finished goods), and lot ID are recorded to identify and trace the food items.
The blockchain for food traceability is then vaporised after completion of either point of sales or proof of delivery activities.The vaporised blockchains are then stored in the cloud database to release system storage space and memory.

C. FUZZY FOOD QUALITY EVALUATION MODULE
After data acquisition from blockchain-driven IoT, the information of shipment journey, activity milestones, and environmental conditions can be used to establish a dynamic food quality evaluation in PFSC.To evaluate food quality effectively, sensor data collected and managed by blockchain-IoT technologies need to be pre-processed and structured.The measurements of mean kinetic temperature (MKT) and mean kinetic relative humidity (MKRH) are applied to obtain corresponding values, to represent the effects of variations of temperature and relative humidity over time [36] Here, E a is the activation energy, R is the gas constant, B is the moisture-sensitivity, and RH c is the constant within the range of variable relative humidity.Similarly, MKRH is evaluated over a certain period of transit time, as in ( 4), where T c is the constant within the range of variable temperatures.Subsequently, MKT and MKRH can be obtained for effectively measuring the aggregated temperature and relative humidity, which simulate the effects of variable handling temperature and relative humidity. , where ϕ = ln( where ϕ = ln( To achieve dynamic food quality evaluation, MKT, MKRH, sensory score, and variation of total transit time are taken into consideration to formulate three outputs: shelf life adjustment, quality decay rate, and order of quality decay. The quality decay evaluation is then established according to Arrhenius's equation.Fuzzy control systems are promising tools for explaining the relationship between fuzzified inputs and outputs, and they outperform linear and nonlinear regression models [37].The time-quality decay and shelf life can be varied, due to specific environmental excursion requirements and sensory assessments of food products.In this scenario, the fuzziness of inputs and outputs regarding different batches of food can be effectively addressed by means of a fuzzy control system.To adopt fuzzy logic for dealing with the above considerations, membership functions of input and output parameters and fuzzy rules (in the form of IF-THEN rules) are needed.Parameters are required to be fuzzified from crisp values to fuzzy sets in fuzzy logic, such as ''low'', ''medium'' and ''high'', to express linguistic terms by membership functions.Equation (5) shows the fuzzy set F for parameter Z = {z 1 , z 2 , . . ., z p } with the corresponding belongingness µ F .Membership functions are then formulated by combing various fuzzy sets.In the proposed system, fuzzy membership functions are determined intuitively by domain experts to cater for the needs of specific application areas.On the other hand, the fuzzy rules, which show the antecedent and consequent relationship between input and output parameters, are stored in the knowledge repository for the use of an inference engine.
The entire fuzzy logic approach has three major components: fuzzification, inference engine, and de-fuzzification.
In fuzzification, the input parameters are fuzzified by their pre-defined membership functions, where crisp values are converted into fuzzy sets with specific membership values.Further, the AND method is min; OR method is max; implication method is min; and the aggregation method is max.Subsequently, the membership values are aggregated by using Mamdani-type fuzzy inference and fuzzy IF-THEN rules.
The inference process is expressed as in (6), where the OR operator is applied to establish a bounded area in the output membership functions.The reasons for selecting Mamdani-type fuzzy inference are as follows: (i) the capability of understanding linguistic variables and IF-THEN rules (for example IF A is Low, THEN B is high), and (ii) widespread acceptance and ease of deployment in industry.By considering rule r, the input parameter X is converted to corresponding membership values, and composition of input fuzzy sets can be obtained.Thus, output fuzzy sets Y are formulated and defined in output membership functions.In de-fuzzification, fuzzy sets are converted into output crisp values Y by using the centroid method with weighting ω, which evaluates the centre of gravity in the output bounded areas, as in (7).
Subsequently, shelf life adjustment can be obtained to modify the pre-determined food shelf life, based on the situations from shipment journeys.In addition, quality decay can be formulated by using the Arrhenius equation, as in (8), where a relationship is built between food quality q and transit time t at a specific temperature with a certain rate of quality decay k and order of quality decay n [14].Combing the above information, food traceability does not only provide shipment and product information to the stakeholders, but also includes temperature excursion management and shelf life monitoring.

IV. CASE STUDY
To validate the performance of proposed BIFTS, a case study was conducted in a retail e-commerce company.The entire roadmap for the implementation is proposed to address the needs of the case company.
(i) Company Background and Problems: ABC Store Ltd, the case company, was founded in 2018 to enter the retail e-commerce business, particularly for perishable food products.It actively engages in perishable food e-commerce business, including establishing an e-commerce platform, sourcing suitable food suppliers, providing e-fulfilment processes, and multi-temperature last-mile delivery.The company mainly provides business-to-customer (B2C) and customer-to-customer (C2C) services to end customers with domestic and international food supply.It has an online retail platform to sell perishable foodstuffs (including fresh fruit and meat), and to provide e-fulfilment services to end customers.On the one hand, vendors can open their own virtual store on the platform to promote and create sales of their products, whereby they ship physical stock to the e-fulfilment centre before selling.On the other hand, customers can view product information, stock levels, and comments from other customers to make a decision on whether to purchase the products.In typical e-commerce platforms, information on shipment journey and milestones can be provided to customers.However, for managing perishable food e-commerce businesses, customers are concerned with both the shipment status from the e-fulfilment centre to end customers, and with information covering the whole supply chain process, food quality, and environmental excursion management.Existing food traceability systems, when applied to the case company, have difficulty dealing with such complex mixtures of TRUs in the traceability process, and in consolidating IoT monitoring information.This leads to a long period in the traceability process.Accordingly, supply chain stakeholders and end customers may doubt the reliability and accuracy of traceability information.Furthermore, solutions for estimating food quality in a cost-effective and timesaving manner are lacking, especially with respect to covering shelf life determination and quality decay modelling.To summarise, customers are mainly concerned with the quality of received food in PFSC, and it is one of the main factors that influences a company's image and future sales performance.In other words, delivering perishable food of poor quality and with a poor service causes an increase in the rate of shipment returns, and damages the sustainability of perishable food e-commerce businesses.Therefore, the case company requires a reliable and resilient food traceability system with the functions of real-time monitoring, an efficient traceability process, and quality assurance.
To generalise observations in the industry, the following three important aspects for conducting the case study are considered: a. Importance of food traceability to identify and track food products in the food industry; b.Complexity and impracticality of existing food traceability systems; c.Discouragement of the development of perishable food e-commerce.
(ii) Implementation Roadmap of BIFTS: The proposed model (BIFTS) is implemented in the company to develop a holistic food traceability model and food quality management system by means of emerging technologies.As shown in Figure 6, the entire implementation of BIFTS is divided into four phases.IoT technologies are applied to perishable foods in a cost-effective manner, according to various types of TRUs.In return, a total environmental monitoring system is established to cover the entire supply chain.To track and trace perishable food along the supply chain, an integrated blockchain-IoT approach is applied for activity and milestone tracking.The key milestone information is linked to blockchain to achieve a lightweight and vaporised blockchain mechanism.Subsequently, the collected data are used to evaluate food quality by means of a fuzzy logic approach.Overall, a blockchain-IoT food traceability system can be established for maintaining the effectiveness of PFEC businesses.

A. IoT TECHNOLOGY DEPLOYMENT BASED ON TRUs
In the case company, five stock-keeping units (SKUs) of perishable food (including fresh meat and fruit) are selected in the pilot study, all of which are sold on e-commerce platforms.The generic supply chain structure, from raw suppliers to end customers, are summarised in Figure 7, and the food is handled at either container-, batch-, or piece-levels.First, when the food is handled at the container-level, the optimal deployment of wireless sensor networks (WSNs) in a threedimensional environment is considered and complies with certain temperature mapping requirements, such as WHO TRS961 and CFDA [38].Subsequently, the environmental monitoring and mapping systems are applied in the warehousing facilities.Further, the temperature excursion management for container-level shipments is controlled by using active containers, which provide refrigeration and air conditioning during transportation.Second, when the food is handled at batch-level between the food processing and fulfilment centres, IoT sensors (such as SensorTag CC2650) are used to collect real-time environmental conditions, such as ambient temperature and relative humidity [39].The sensors are then connected to edge routers via wireless communication technologies (such as Bluetooth and Wi-Fi) and the collected data are transmitted to IoT development platforms (e.g.IBM Cloud).At batch-level transportation, multi-temperature joint distribution is applied to set up various temperature ranges in trucks, so that full truck load in trucks and temperature excursion management can be achieved for effective shipment consolidation [40].In an e-commerce business, fulfilment centres play an important role in processing e-orders and for last-mile cold chain logistics, and all the stocks that are ready in the e-commerce platforms are kept and managed in the fulfilment centres.In addition, the fulfilment centres are responsible for performing value-added services, including labelling.The updated food labels contain information on adjusted shelf life and quality decay (but not food information).End customers can access the food traceability information, covering source of origin, shipment journeys, batch and lot numbers, and environmental monitoring, via QR codes.For the transportation in piece-level shipments, hybrid and passive cold chain packaging is applied to ensure handling requirements.This is also an efficient method of handling food with palletisation.The assignment of various types of packaging materials and eutectic plates are considered to cater for the needs of high flexibility in shipment coordination and temperature excursion management simultaneously.Overall, IoT technologies that are connected to a number of business systems (for example freight management and food information systems), are deployed in the entire life cycle of PFSC.To aggregate the above deployment scheme, the IBM Cloud is selected as the IoT development platform, due to its advantages of cost, information security, device management, and API capability.For the sensor nodes of SensorTag CC2650, the realtime data collected can be achieved using MQTT or IBM registries services, while the entire system (which includes front-and back-end developments) can be conducted in the Node-RED environment.To manage the collected data effectively, MySQL or Cloudant can be used, depending on system requirements.The system process flow between sensors and IBM Cloud is illustrated in Figure 8, where the IBM Watson IoT platform is used to manage physical devices and APIs, and Node-RED is the development tool to create the system prototype.

B. DEVELOPMENT OF INTEGRATED BLOCKCHAIN-IoT ENGINE
Although IoT technologies are deployed effectively in PFSC for improved shipment coordination and temperature excursion management, accurate data and information acquisition are needed to ensure system reliability, adaptability, and scalability.Hence, the blockchain-IoT engine is deployed throughout the entire supply chain with eight major steps, as shown in Figure 9.In the technological aspect, the genesis block is created by raw suppliers, who are the source of origin for perishable food, where unique traceability IDs are assigned to the batches of food for blockchain applications.During various supply chain activities, the IoT data are collected and managed in the centralised database and IoT development platform, such as IBM Cloud, for maintaining business confidentiality and information integrality.Blockchain acts as a sharing tool and reliable method for managing food traceability information, and caters for the needs of various stakeholders in the supply chain.To reduce the computational load and memory usage, the IoT data are managed in the cloud database, while association IDs of the data are generated for storing in the blocks at the step of block addition.The properties of blocks become block = {index, timestamp, data (associated IDs), hash,  previous_hash, Rand}, and SHA-256 is used to encrypt the blocks.The added blocks are only valid if the hash value of the block is equal to the output from decrypting the data string (which is previously encrypted by private keys) by using public keys.To validate the added blocks, the PoSCS validation process is applied to evaluate the values of supply chain share among all supply chain stakeholders, and to select one of them to forge the blocks in the blockchain.In the selected case scenario, there are six stakeholders to carry and handle the entire process of perishable food e-commerce businesses (α = 0.5).Table 3 shows an evaluation of PoSCS among the six selected stakeholders in PFSC.Stakeholder 1 (S1) is selected as an example to demonstrate the calculation steps for obtaining the standardised S 1 (t), as shown in Appendix A. The resultant S i (t) generates the weightings of stakeholders for conducting roulette wheel selection, to choose a validator for the block forging process.For defined milestones for perishable foodstuffs, block creation and validation are activated to comprehend the traceability information and the entire food life cycle.At the stage of either point of sales or proof of delivery, the blockchains for particular food products are completed.Subsequently, the entire blockchains are then vaporised to the cloud database to reduce the computational load and release application memory.All the stakeholders and end customers, who have paid for the products, are obligated to provide relevant information, and can read the traceability milestones and corresponding information via smart contracts.From the operational aspect, the first half of the blockchain (from raw suppliers to the fulfilment centres) are built by recording the batch ID (farm), container ID, batch ID (finished goods), and lot ID.When end customers purchase the food items in e-commerce platforms, the order ID is created, while the first half blockchain is replicated for creating the independent blockchain to the order.Thus, food traceability for the specific orders (from the source of origin to the end customers) can be achieved effectively and securely.

C. FORMULATION OF FUZZY FOOD QUALITY MANAGEMENT
In traditional practices, food shelf life (which is determined by food processors) assumes fixed environmental conditions and transit time on the supply chain activities between food processors and end customers.However, this cannot reflect the actual situations of food deterioration and spoilage in a fixed shelf life approach.To achieve effective food quality management, a fuzzy logic approach is deployed to determine dynamic food shelf life and quality decay for perishable foodstuffs.As mentioned in Section 3.3, the membership functions (for input and output parameters) and the fuzzy rules should be defined by domain experts in advance.Table 4 shows the fuzzy classes, types, and definitions of membership functions for inputs (MKT, MKRH, sensory score and variation of transit time) and outputs (shelf life adjustment, rate and order of quality decay), respectively.Three vertices [v 1 , v 2 , v 3 ] represent the formulation of triangular membership functions, i.e. trimf, while four vertices [v 1 , v 2 , v 3 , v 4 ] express the formulation of trapezoid membership functions, i.e. trapmf.Further, the fuzzy rules for the Mamdani-type inference engine are defined by examining the relevant cases and domain experts, and are stored in the knowledge repository for evaluating output fuzzy sets.
The five selected perishable food products are used to examine the performance of fuzzy food quality management.At the stage of distributor and e-fulfilment centre, re-labelling for QR code labels (as one of the value-added services) is conducted to ensure the appropriate information in the outer packaging.In addition, sensory scores of perishable foods are inspected by a quality control team, by assessing the external appearance, taste, odour, and texture.The fuzzy logic approach is activated when accessing the QR codes by supply chain stakeholders, particularly for end customers.The data regarding MKT, MKRH, sensory score, and variation of transit time are extracted for evaluation of the food shelf life and quality decay model.Table 5 shows the results when using a fuzzy logic approach for the five selected food products at the stage of fulfilment centres.This illustrates the effect on formulating dynamic food shelf life and quality decay model in an intelligent manner.The adjustments of food shelf life can be directly applied to the existing shelf life measurements, while rate and order of quality decay are used to formulate a suitable model to assess the kinetics of food quality changes.The changes of food quality in thermal processing are typically expressed in zero-, first-and second-order reactions.Figure 10 illustrates the results of quality decay from fuzzy food quality management for the five selected perishable foods.Under various handling and food conditions, the changes of food quality are different with respect to sensitivity and characteristics.

D. ESTABLISHMENT OF FOOD TRACEABILITY SYSTEM FOR E-COMMERCE
To integrate the aforementioned development and deployment, a technology-based food traceability system is formulated to trace and track the food products efficiently and reliably.On the one hand, the supply chain stakeholders follow the proposed IoT technology deployment strategy to manage traceability information, including product information, shipment journeys, freight details, and IoT data acquisition.The critical information regarding defined milestones in PFSC is managed in the blockchain, where ownership transfer of the products is set as the milestones that comply with the service agreement (SLA) and key performance indicator (KPI).For instance, in the case company, the supply chain activities of door-to-door shipments between food processors and distributors have the following ten milestones: pickup at shipper door, loading at origin, handover to airlines at origin, build-up at airline doors, dispatch to airside for export, flight departure, flight arrival, breakdown at airline doors, trans-shipment monitoring, and breakdown at consignee doors.At each milestone, the timestamp, environmental conditions, involved parties, and battery level (for the use of active containers) are essential information to ensure that the performance of supply chain activities meet the SLA and KPI measurements reported to dedicated competence centres.On the other hand, end customers can access traceability information through the QRcode labels printed on the food packaging.The application shows the food information, credential information, shelf life, estimated quality decay performance, and shipment journeys.Figure 11 illustrates the application of order tracking and food traceability in BIFTS.After purchasing food products in e-commerce platforms, a dedicated blockchain is established to consolidate all relevant information, by using unique event IDs from the centralised cloud database.Therefore, the holistic food traceability in PFSC is formulated by means of blockchain-IoT technologies to achieve improved reliability and efficiency.

V. RESULTS AND DISCUSSION
After implementing the BIFTS in the case company, the blockchain-IoT technologies are beneficial for food traceability, and for shaping the entire business of PFSC.To achieve blockchain-IoT food traceability, the characteristics of lightweight and vaporised blockchain have been proposed, while the collected data are applied to support the decision-making process in shelf life and quality decay evaluations.Using the advantages of blockchain technology, the proposed system provides improvements to the mutual consensus mechanism, system reliability, and traceability efficiency, which are essential for creating a positive atmosphere in perishable food e-commerce businesses.Therefore, the advantages of implementing the proposed system can be summarised as follows: (i) secure and reliable food traceability in the distributed supply chain network, (ii) lightweight and vaporised blockchain design for reducing computational load and hardware capabilities, (iii) intelligent food quality evaluation of customised shelf life and timequality decay.Subsequently, a two-fold analysis of effectiveness and performance is undertaken to verify the proposed system, as follows: (i) justification of PoSCS, (ii) efficiency of the block forging mechanism.Subsequently, managerial implications of using BIFTS is provided to illustrate the business values and insights from blockchain-IoT in supply chain management.

A. JUSTIFICATION OF POSCS
In the blockchain mechanism, there are several protocols to achieve consensus between devices or stakeholders on a distributed network, such as proof of work (PoW) and proof of stake (PoS) [12].However, the above protocols are designed mainly for initial coin offering (ICO) to be a kind of funding by using cryptocurrency.Apart from implementing blockchain in the financial industry, the extension of blockchain in supply chain management is the focus of this study, so that PoSCS is developed to fulfil the roles of PoW and PoS in the supply chain.Table 6 displays a comparison between the four consensus mechanisms and PoSCS for the five major aspects.
The typical consensus algorithms, i.e.PoW and PoS, are not appropriate for application in supply chains, because supply chain activities are difficult to measure in monetary values, and incentives for maintaining a group of miners are lacking.Further, PoW requires a high level of computational power to compete with other miners to mine the blocks, which is an inefficient way in most of the application areas.Moreover, most supply chain parties (who are not listed companies) are not willing to disclose their business assets and financial status.Hence, applying PoS in supply chains requires modifications and extensions of the consensus algorithm.Proof of importance (PoI) and proof of authority (PoA) are two emerging consensus mechanisms.PoI focuses on the importance of accounts to harvest a block, while PoA requires a strict selection process to choose the authorised validator to mine a block [41], [42].While PoI and PoA are being developed for ICO applications, their mechanisms start considering additional factors apart from wealth and capital value of the accounts.Such concepts can be further extended to develop an appropriate consensus mechanism for food traceability.Accordingly, PoSCS is developed to select validators in a probabilistic way to forge and validate the blocks in the blockchain.Its consensus algorithm considers transit time, stakeholder analysis, and shipment volume in the supply chains, instead of computational power and wealth.Therefore, the consensus mechanism in the blockchain can be practically applied in PFSC for food traceability.
On the other hand, the use of a consensus algorithm in distributed networks is required to prevent holding 51% of network tokens by a single party.In PoW, for a single party to control ≥51% of network tokens is difficult, requiring an extensive level of computational power.In PoS, PoI, and PoA, it is much more difficult to achieve, as a single party needs to have ≥51% of the total wealth in the network.To propose the new consensus algorithm, such as PoSCS in PFSC, the above consideration should be evaluated to maintain network sustainability.Accordingly, 30 stakeholders in the supply chain network are selected to conduct a comparative analysis between the following various combinations of PoSCS formulations: (i) transit time (C1), (ii) integration of transit time and stakeholder analysis (C2), and (iii) integration of transit time, stakeholder analysis and shipment volume (C3), as shown in Figure 12.Merely considering transit time in the supply chain network is not reliable for inferring the value or stake of the stakeholders.Therefore, the stakeholder analysis and shipment volume are integrated with the transit time to establish the weight measurement in PoSCS.It is found that C2 and C3 outperforms C1 in reflecting the business performance and power among their peers, and the difficulties for stakeholders of reaching 51% of total network stake is increased, as stakeholders have to obtain these high proportions in three factors of the consensus algorithm simultaneously.Further, C2 is a deterministic way of measuring the weights, which does not consider the up-todate business performance and level of active participation in the industry.Therefore, the formulation of C3 for supply chain stakeholders in using blockchain applications is more comprehensive.In addition, stakeholders who are able to obtain higher value from food traceability and have a high level of active participation in supply chain activities will have a higher standardised weight in PoSCS.

B. EFFICIENCY OF BLOCK FORGING MECHANISM
The proposed blockchain-IoT engine includes lightweight and vaporised characteristics in the blockchain, which has a positive effect on efficiency in the forging process.Regardless of the consensus algorithms, validators in blockchain need to calculate the hash values that fulfil the restrictions in the hash algorithm, by adjusting the random number in the block.Typically, each milestone of food traceability needs to collect information on the shipper, consignee, environmental conditions, battery level, and shipment status, namely {''id'':{''sid'':'''',''cid'':''''}, ''cond'':{''temp'':'''', ''humi'':'''', ''batLv'':''''}, ''status'':''''} in JSON format.In the proposed system, all the above activity tracking information is managed in a centralised cloud database, and the associated identifies, namely {''assoId'':''''}, are stored in the blockchain.The efficiency of the proposed lightweight block forging mechanism is examined by the differences of computational time and iterations through conducting experiments on 50 sets of traceability data and associated IDs, under 3 difficulty restrictions, i.e. target hash value beginning with ''0'', ''00'' and ''000''.The difficulty in blockchain is used to maintain the security and system synchronisation in the supply chain network.All the results were obtained using MATLAB 2019a, and conducted in the Windows 10 environment with an Intel Core i7-6770HQ @ 2.60 GHz and 32 GB RAM.In the block forging process, the value of forging difficulty, process delay time, and number of iterations are set for aiding and monitoring the loop progress.The execution time and number of iterations are collected to evaluate the block forging efficiency between using entire traceability data and associated IDs, referring to the pseudo-code in Table 2. Table 7 shows the results of average execution times and number of iterations from the comparative analysis under various levels of block forging difficulty.It was found that using associated IDs to replace the whole traceability data resulted in lower execution times and number of iterations (on average) for obtaining the target hash value.Thus, the computational resources for block forging can be reduced by using the associated IDs.As shown in Figures 13-15, the performances of block forging under various difficulties were obtained.Along with increasing the difficulty of the block forging process, the time and iterations spent in the process by using associated data became less than when using the whole traceability data.Therefore, the synchronisation in peer-to-peer networks can be controlled more precisely by using associated data.The validated blocks need to be   propagated to all nodes globally through the synchronisation stage, so that the time of synchronisation should be set properly to prevent information mismatch or lag in the whole distributed network.By carrying less information in the blocks, the time for forging blocks can be reduced, meaning the control of synchronisation can be enhanced.
On the other hand, the size of the blockchain (in bytes) can be decreased by reducing the number of characters stored in the blocks.In the distributed supply chain network, the number of blockchains are based on the multiple between stock keeping unit (SKU) and its quantity (Q), i.e.N blockchain = SKU × Q.The lightweight and vaporised features in the blockchain are significant for controlling the storage spaces for blockchain applications, instead of enlarging the size of blockchain applications unlimitedly.Therefore, the proposed blockchain-IoT food traceability model has been developed to cater for the requirements of real-life industrial situations in food traceability.

C. MANAGERIAL IMPLICATIONS OF BIFTS
When deploying BIFTS in PFSC, the security and comprehensiveness of food traceability information can be strengthened.Further, all related supply chain activities and milestones are managed in the blockchain for effective information retrieval.The proposed blockchain-IoT application for food traceability includes the lightweight and vaporised characteristics, to enhance system adaptability and scalability.In addition, the food quality evaluation, including shelf life adjustment and quality decay, is modelled by fuzzy logic.Therefore, shelf life and food quality monitoring can be more reliable where the actual effects from supply chain activities can be reflected.The typical blockchain is not practical in supply chain industries when used for product traceability, as it is impossible to manage a group of miners to conduct block mining activities, which are both timeconsuming and waste computational resources.Therefore, PoSCS is proposed in this study to address the above concerns in implementing blockchain in supply chain management.Without a group of miners and mining machines in supply chain stakeholders, the lightweight and vaporised features in blockchain are essential to boost the block forging process and to release idle system storage.
From the perspective of organisations in the food supply chain, effective data and information management is crucial, which can be used to understand the performance of supply chain stakeholders and customer satisfaction for formulating data-driven business strategies.IoT technologies are applied to collect and analyse data related to physical environments under defined TRUs, while blockchain technology provides the structured information management for food traceability.By integrating the above two technologies, the blockchain-IoT application is formulated to address the practical needs in food traceability for the complex supply chain network, particularly for the e-commerce business environment.Compared with the traditional cloudbased food traceability systems, the consensus mechanism and distributed network to the traceability information are improved, such that food traceability can be completed in an efficient and effective manner to track and trace its supply chain activities from the source of origin.The supply chain stakeholders can share traceability information in the peer-to-peer network, where data of environmental conditions and food sensory scores are used to establish dynamic food quality management.Thus, the business value of reliable and secure food traceability is created.Furthermore, in the perishable food e-commerce environment, end customers pay for food items without touching or viewing them physically.Therefore, the discrepancy and deterioration of food items may affect customer satisfaction, or even damage the sustainability of perishable food e-commerce businesses.To create a better atmosphere in PFSC, the proposed system enables not only holistic food traceability to supply chain stakeholders, but also dynamic food quality management to end customers.Mutual trust and customer loyalty can be improved through deployment of the proposed model, while the trades of perishable food e-commerce can be sustainably maintained to facilitate food supply chain development.

D. CHALLENGES IN APPLYING BIFTS IN THE FOOD INDUSTRY
Although the previous sections present the adoption of BIFTS in the food industry to address several practical challenges and achieve certain advantages, there are three major challenges that should be considered when being applied in the proposed system.First, human factors cannot be neglected in implementation.Because blockchain has a feature that its data cannot be manipulated or tampered with, workers in the supply chain may create fake or incorrect data for food traceability.Therefore, measures to prevent fake data creation and food authentication may be required to strengthen the practicality of BIFTS.The development of blockchain applications can only be successful if the collected data are accurate.Second, honesty, integrity, and an open-mindedness to adopt the proposed system for all supply chain stakeholders may be a concern.Moreover, because food traceability requires the capture of data from the whole supply chain process, the most powerful party in the supply chain should be identified to influence others for adoption of the proposed system.Otherwise, the adoption rate of the proposed system might be low, and the comprehensiveness of the information related to the supply chain is then broken.

VI. CONCLUSION
Food traceability has always been an important and critical function in PFSC, which provides information covering the entire food life cycle.Further, customers and supply chain stakeholders rely heavily on this information to make their decisions.Due to the rapid development of e-commerce businesses, the perishable food e-commerce sector is one of the branches that promotes and sells perishable food in the online e-commerce platforms.Unlike shopping in wet markets and supermarkets, customers in perishable food e-commerce need to pay for food items without having any food quality information (until parcels are received).Further, perishable food is highly sensitive to ambient environmental conditions; hence, food discrepancy and deterioration always occur.Therefore, using typical traceability systems that merely track and trace the information of the last mile of delivery and product master data is inefficient and unreliable.In this paper, the above problems are addressed by formulating the following: (i) an IoT technology deployment framework, (ii) a blockchain-IoT mechanism, and (iii) fuzzy food quality evaluation for food traceability throughout the entire supply chain.The IoT technologies are deployed under various TRUs to achieve cost-effectiveness and user convenience in system implementation.Subsequently, all the collected data are managed in a cloud database, while the traceability associated IDs with timestamp are forged in the blockchain for traceability purposes.To achieve consensus in the supply chain network, an index of PoSCS is proposed to evaluate the share of supply chain stakeholders by considering responsible transit time, stakeholder analysis, and active shipment volume.Moreover, lightweight and vaporised characteristics of blockchain are proposed to improve the block forging efficiency and application storage capacity.The collected data are then analysed to measure the food quality in the aspects of shelf life and quality decay, so that end customers can not only track and trace the purchased food items, but also obtain the status of food quality.Therefore, pro-active strategies to prevent quality discrepancy and serious deterioration can be established to build better management of perishable food e-commerce.Overall, the novel contributions to benefit the area of food traceability in PFSC in this paper include the following: (i) comprehensive IoT technology deployment regarding TRUs, (ii) formulation of PoSCS, (iii) lightweight and vaporised blockchain mechanism, and (iv) fuzzy food quality evaluation.The research results in this study are originated from the area of food traceability under e-commerce business environment, particularly for handling perishable food.Apart from the above, the system deployment of the integration between blockchain and IoT is beneficial to the small and medium-sized enterprises (SMEs), instead of enterprise-level application only, in the aspects of business transactions, trade and product identification.Therefore, the research results can be also practically spread to handle the products, which are environmentally-sensitive and handled with special care, under e-commerce environment, such as pharmaceuticals and luxury goods.The limitations of this work are that the proposed consensus mechanism is based on the scenario of food traceability, instead of other supply chain applications, and the consideration of food authentication is not included in the study.To improve the work further, future research may be conducted regarding the following two aspects: (i) Extension of PoSCS (Enterprise level): The use of PoSCS should not only be limited to food traceability, but also to other functionalities of supply chain management, such as quality management, risk management and e-commerce transactions.Because the proposed PoSCS defines the stakes or shares of supply chain stakeholders, the new blockchain applications can be simply developed.
(ii) Integration of flows supply chain (Supply chain level): In addition to information flow, material flow, capital flow, value flow, and risk flow should also be covered by the blockchain-IoT to create a reliable and secure supply chain in both virtual and physical worlds.Consequently, a scalable and adaptive cyber-physical system in supply chain management can ultimately be achieved.

Demonstration of Calculating Standardized S1(t):
Given that the transit time (T/T) of S1 is 820 h and the weighting factor for stakeholder analysis (α) is 0.5, the weight of S1 in T/T is calculated by dividing T/T in S1 by the total T/T for all supply chain stakeholders in the network, i.e. 820 (820 + 250 + 1100 + 210 + 650 + 80) = 0.2637, which implies the proportion of S1 when considering T/T only is 26.37%.On the other hand, the scores of stakeholder analysis for S1, namely INF, SAT, INT and DEV, are 2, 3, 5, and 5, respectively.Thus, the summarised score R of S1 is 2 × 3× [0.5 × 5+ (1 − 0.5) × 5] = 30.The weight of R in S1 is then computed by dividing the R of S1 by the sum of R for all stakeholders, i.e. 30/(30 + 6 + 9 + 20 + 30 + 30) = 0.24.In return, the S 1 in PoSCS can be evaluated by multiplying the weight in T/T and weight of R in S1, i.e. 0.2637 × 0.24 = 0.06328.The above shows the calculation of S 1 , which is a relatively stable and fixed measurement for stakeholder 1.To consider timely business performance in the measurement, the monthly shipment volumes of stakeholders are measured.Therefore, the S 1 of PoSCS is then multiplied by a factor of the monthly shipment change, i.e.V(t) V (t − 1) = 1304 2069 = 0.6303.The standardised S1(t) is then calculated as 0.06328 × 0.6303 = 0.0399.To formulate the roulette wheel selection for selecting block validators, the S 1 (t) is then standardised among all other stakeholders in the supply chain network, i.e. 0.0399/(0.0399+0.0044+0.0309+0.0094+0.0728+0.0064)= 0.2436.The overall roulette wheel selection for block validators is graphically illustrated in Figure 16.

FIGURE 4 .
FIGURE 4. Illustration of considering shipment volume for dynamic state in PoSCS.

FIGURE 5 .
FIGURE 5. Hybrid use of IoT technologies, cloud computing and blockchain.

FIGURE 7 .
FIGURE 7. Technology deployment for warehousing, transportation and food quality in PFSC.

FIGURE 8 .
FIGURE 8. Process flow between sensors and IBM Cloud.

FIGURE 11 .
FIGURE 11.User interface of order tracking and food traceability.

FIGURE 12 .
FIGURE 12. Analysis of PoSCS on network token performance.

FIGURE 16 .
FIGURE 16.Graphical illustration of roulette wheel selection for block validators.

TABLE 1 .
Summary of the current work in food traceability systems.

TABLE 2 .
Pseudo-code of block forging process.

TABLE 3 .
Evaluation of PoSCS among stakeholders.

TABLE 4 .
Membership functions for fuzzy food quality management.

TABLE 5 .
Results of fuzzy food quality management.

TABLE 6 .
Comparison of consensus mechanisms.

TABLE 7 .
Average execution times and iterations of block forging process.