Introduction

Recently, the rising concerns in food safety and supply chain resiliencehave been accelerating and posing numerous challenges to the food industry1. Outbreaks of foodborne diseases are on the rise and affecting the health and development of people worldwide. A recent research revealed that over 250 foodborne diseases are caused by consuming contaminated food2,3. These diseases contribute to the universal burden of illness and fatality considerably. Food and Agricultural Organization (FAO) estimated that 1.6 billion tons of edible foodstuff (i.e., around 30 to 40% of total food production) is lost or wasted before it reaches the market each year4. This leads to substantial social, environmental, economic, and health impacts5. In an even broader sense, such squandering decreases the availability of food products in the market. Consequently, it leads to an increase in prices, particularly in developing nations where users cannot manage to pay for such upsurges. According to the World Economic Forum, the global agricultural industry needs to double the food supply to feed 9.7 billion people in 20506. Hence, the huge food lossand waste is a regrettably serious concern.Food safety guarantees the appropriate processing and storage of food, hence averting foodborne diseases7. Though several high-income nations recognized the necessity of computing the national burden of food waste/foodborne diseases, few others still dearth of public commitment, and financial and technical facilities to compute this overhead; obstacles that can be amplified in the face of post-pandemic requirements8. Unfortunately, food waste and foodborne diseases will never be eliminated. But, they can be abridged by tracking the food networks continuously.

Fresh produce can degrade or become perishable at any phase of the chain, either physically, chemically, or biologically. Food pathogens (e.g., parasites, bacteria, viruses, etc.) cause food poisoning that can lead to death. These challenges enable companies to develop better traceabilitysystems (TS) and enhanced quality controls in PFSC. Perishable goods (e.g., dairy products, groceries, vegetables, fruits, eggs, breads, meat and seafood, etc.) have a shorter shelf life after harvesting or production. The delay before they become inedible or unmarketable hinges on the quality of the produce itself and environmental conditions. Recent studies emphasize that perishable products are shipped through refrigerated or reefer containers9,10. During transportation, there may arise problems associated with perishable products with disclosure to environmental parameters including humidity, temperature, light exposure, and shock absorption. Therefore, a distributed, secure, and transparent TSis essential to collect and record all the information about the food items throughout their consignment path from farming to table delivery11.

Cyberattacks in supply chain networks are a worrying trend for the food industry. The threats exploit susceptibilities in the communication systems of suppliers, distributors, and other service providers. The most common cyber threats in the PFSC network include tampering at food processing plants, breaches at packaging centers, and threats that disturb supply chains and endanger food safety. It can cause compromised food safety, interrupted supply chains, public health risks, loss of consumer trust, and substantial legal and commercial consequences for affected companies.For example, in May 2021, the cyberattack on JBS (i.e., theworld’s largest meat processing company) forced the shutdown of 13 slaughterhouses in the Australia and USA. This event has brought substantial troubles to the food network, increased wholesale meat prices, and discrepancies in supply and demand12. This attack reveals the inevitability of sensing and addressing susceptibilities in the PFSC for defending the food organization from cyberattacks. If suppliers, distributors, or logistics and fulfillment providers in a PFSC are targeted, it may cause food scarcities, delays in product delivery, or even forged goods. The probable long-term extrapolations of supply chain interference resulted in cyberattacks in the PFSC. It may fetch not only risks related to food safety but also loss of customer reliance.This can cause a radical reduction in opportunities and customers for business. For example, in January 2021, a ransomware attack against a USA farm led to a momentary closure of all their farming activities, causing losses of around $9 million13.

Secured tracking of the current location and real-time status of consignments in the PFSC supports companies in reducing food loss and ensuring the quality of the perishable freights that are delivered to consumers. A typical PFSC includes six key components (i.e., farming, post-harvesting, food processing, distribution, retail, and client) as illustrated in Fig. 1. Based on their anticipated utilization, the perishable products are stored and processed under diverse environmental factors, through different phases of the entire network. For example, after completing harvesting operations, the vegetables and fruits are conveyed to a warehouse of processing centers where they are threshed, cleaned, dried, cut, or treated chemically. Then, those products are sent to the quality assurance division to be tested against defined standards and check their quality. Next, they are packed with the appropriate packaging technology according to the shipping period, shelf life, and the environmental condition of the warehouse. The products are then conveyed to their endpoints or sold in retail stores according to consumer needs. Perishable items are essential to be warehoused in a particular controlled environment to guarantee good quality foodstuffs. Early identification of quality deterioration of freights can trigger the controlling units to regulate the environmental parameters to avert further deterioration and food losses. Thus, effective monitoring, feedback control, and TSare required to guarantee the quality of perishable items across the entire supply chain.

Fig. 1
figure 1

Perishable food supply chain.

When distributing perishable freights, all of the issues usually related to the retail supply chain network are magnified. At the same time, PFSC entails followingchallenges14:

  • Guaranteeing food safety and quality: Fresh products are vulnerable to quality deterioration and have a limited shelf life (most have a shelf life of 2–6 days)and vulnerability to quality deterioration during storage15. Hence, they need to be shipped and stored under a controlled environment and handled with care to guarantee that they stay fresh and edible.

  • Guaranteeing timely delivery: Perishable products need to be supplied rapidly and effectively to guarantee their quality when they reach the consumer. This can be a serious problem during times of bad climate or when there are shipping delays.

  • Complex inventory management: For shipping and selling perishable goods, inventory control is still more perplexing. Since foodstuffs have a shorter shelf life and must be replenished both more often and in a more controlled way.

  • Multi-factor in-transit condition tracking - A perishable good can be ruined in numerous ways. For example, fruits and vegetables must be stored in a particular range of temperature and humidity. To meet this demand, the food industry needs efficient TSs that observe the status when goods are in the move and stock. The requirement of multi-factor measurements makes this demand one of the serious problems of traceability for perishable delivery.

  • Managing the demand and supply: The demand for fresh goods cannot be predictable, which can make it challenging to manage the supply chain. Since supplying foodstuffs is a factor of produce, weather, season, etc., it is particularly difficult in peak times such as festivals, when demand is generally very high.

  • Supporting sustainability: The production and shipping of perishable goods can hurt the environment. This problem needs to be addressed effectively when considering sustainability in PFSC.

  • Cyberattack landscape: The food industry now encounters a large number of cyberattacks including ransomware and malware threats, social engineering and phishing methods, and other threats that use susceptibilities in the communication systemsof stakeholders in PFSC.

Since both retailers and consumers have worried about the source of goods, transportation environment, and quality, an end-to-end, active, and effective TS is required in this dynamic PFSC industry. To meet these requirements, several researchers have focused on the overall design of the supply chains to address resilience and sustainability issues in PFSC16. Today numerous cutting-edge technologies including Artificial intelligence (AI), Machine learning (ML), BCT, IoT, Cloud computing, etc. have been assimilated into the PFSC to trace products, increase chain performance, and handle supply chain-related intricacies17. These technologies are employed for various chain operations, including farming, harvesting, processing, wrapping, shipping, and inventory control. They are applied mainly to accelerate chain operations, fulfill the ever-increasing global food demand, and trace food sources to measure safety and quality features. Adopting these modern technologies in the perishable food networks increases the visibility, safety, and quality of food.

An effective system is indispensable to trace and collect the current status of the food products throughout the path of consignment. The conventionalTSemploysinformation and communication technologies, and biological and chemical analysisto trace, identify, and monitor the food products18. An effective PFSC management can raise revenue and cash flow in the food industry.Food processing organizations have shown keen interest in using IoT to facilitate their device identification for monitoring. PFSC administrators have used smart sensors in both the environment in which they are stored and shipped to measure the status of the foodstuffs and how it is delivered to the consumer. Conversely, constructing dependable smart devices in PFSC management is confronted by numerous performance problems and cyberattacks. Hence, food processing organizations need to protect their chain and keep their useful data against cyberattacks.At the same time, creating a sustainable supply chain in pharmaceutical companies is crucial for reducing the environmental and social impacts associated with drug production and distribution. Sustainable PSC management involves various strategies and practices to minimize waste, energy consumption, and greenhouse gas emissions while ensuring the availability of safe and effective medicines19,20. Therefore, a protected business model is required for dealing with and retrieving data from sensor networks without any breaches to data processed by those devices. The notion of CoT technology is a noteworthy contribution towards digital transformation in the PFSC. It fetches numerous potential benefits to improve the scalability, speed, and traceability of PFSC, avoiding fake products, managing distribution, and inventory control.

In this research, we explain how CoT makes business dealings more secure, transparent, and tamperproof, which can have a massive effect on the enactment of the PFSC. More precisely, this research aims to solve following research questions (i) How to develop an economically feasible solution to achieve item-level real-time tracking?; (ii) How to design a combined track and trace system for perishable food stuffs in the entire chain?; (iii) How to assess the perishability of the item?; and (iv) How to enable the decision-making processes according to the gathered data? We develop CoT-TTS to overcome the deficiencies of existing traceability methods such as the weak security mechanism, the easy-tampered data, and the incompetent centralized database. By exploiting a distributed network topology, smart contract platform, peer-to-peer communication, and pioneering sensing and computing techniques, the proposed TS can pay the way to trace perishable items in the food supply chain effectively. The key contributions of the research are three-fold:

  1. 1.

    We integrate IoT with BCT technology to build effective TS for the PFSC network.

  2. 2.

    We propose a CoT-TTS which employs an IoT network for monitoring environmental data, BCT for data management, and ANFIS for food quality assessment to alleviate vital hitches in conventional PFSC networks.

  3. 3.

    The performance of the proposed CoT-TTS is evaluated through a case study using an EOSIO platform. This study considers the depth, breadth, access, and precision of the transactions as performance metrics.

Technologies integrated into CoT

The integration of AI, BCT, IoT, cloud computing, and big data analytics indicates a significant fulcrum that offers a concrete input to the irrevocable move from Industry 4.0 to Society 5.0. The perception of leveraging the convergence of BCT and IoT is a vital contributor to creating a digital transformation in various platforms. This enables companies to underpin dealings among their core allies, mainly with existing users, and to lure new customers. Additionally, it is employed to handle intrinsic problems related to privacy, security, and interoperability of linked objects and to build efficient applications in the food supply chains. CoT enables organizations for diverse transactional settings21. It can make indisputable records that can be communicated and impact the perishable products in PFSC22. It permits enterprises to trace their goods in a protected way and to enhance their authorization and authentication process. The net result would be a notable improvement in the performance of PFSC.

Internet of Things

At present, IoT is a cornerstone in the digital transformation realized by Industry 4.0 as it can bring substantial revolutions and transformation across numerous application platforms23. It is a network of web-enabled physical entities (e.g., processors, sensors, communication hardware, etc.), Radio Frequency Identification (RFID) tags, quick response (QR) codes, barcodes, etc. Originally, the IoT network was not performing big data processing and analysis. Currently, the devices in IoT networks are interacting and processing massive volumes of data. This connected technology exhibits long-range of applications such as farming, smart homes, healthcare, driverless cars, smart cities, connected factories, consumer applications, hospitality, supply chain, smart grids, remote asset monitoring and control, etc24. Organizations gather data and analyze it to make decisions or adjustments to their business strategies.Although the impact of IoT on the industry is still to be completely explored, the improvements of IoT have significantly enabled the digital transformation of our society which makes real-time monitoring applications so powerful25,26. The amalgamation of IoT in the food supply chain can fortify themselves well to cope with the issues related to product quality and wastage. Various sensing devices in the PFSC can measure the temperature, moisture, light exposure, and food quality during transit. The application of IoT technology facilitates real-time monitoring by measuring temperature, interior lighting, moisture, shocks or vibration in the truck, power supply, and battery levels. If optimum environmental parameters are not maintained properly, suitable actions need to be taken by chain managers. Furthermore, if there is any vehicle breakdown during transportation, apt action, and solutions can be implemented to ensure the goods are not squandered during shipment and the delay for vehicle rescue. The information engendered from the maneuvers and sensing elements within the containers can deliver environmental parameters for satisfying food safety and quality standards and finding out the source of the problems.

IoT expedients achieve end-to-end visibility by providing real-time information in various stages of the entire network. Geo-locations can be gained from the farmhouse through the food suppliers, distributors, and traders to maintain the interest of the key stakeholders within the food network. The sensing elements can also direct alerts to the supervisors about any disruption of the cold chain or injury to the container closures. Some perishable items need shipping containers to be pre-cooled to a fixed temperature. The managers can monitor the temperature and pre-cool it by themselves on an examination with IoT maneuvers to extend the shelf life of food products. With numerous potentials, the incorporation of IoT in the PFSC can decrease food loss and costs with a controlled way to effectively monitor perishable items. Furthermore, IoT automation helps companies utilize data analytical approaches. Such companies aim to reduce the wastage rate with high-quality maintenance and complete visibility of the products. These companies focus on plummeting loss or mismanagement of products during transportation, evading failures or latencies using enhanced shelf-life measures, and benchmarking the performance of devices in PFSC.

Blockchain technology

BCT came into the spotlight as a cryptographically secured and decentralized record containing transactional data and Bitcoin (i.e., cryptocurrency) in 200827. Recently, more than its prominent application of cryptocurrency, BCT has drawn more attention from numerous communities and industries such as healthcare28, financial activities29, supply chain30, governmental services31, and defense32to transform transactions, contracts, and ledgers. Based on Gartner’s prediction, the global economy improved by BCT will be about $176 billion by 2025. The same research predicted that the global economy will increase to above $3.1 trillion by 203033. BCT contains dispersed records for storing time-stamped contracts amongst numerous nodes in a public or private peer-to-peer (P2P) network. It is deemed as a growing list of ledgers, called “blocks” (also called “nodes”), which are connected strongly using cryptographic sealing. All the nodes in the chain contain a hash code of the previous node, a timestamp, and a set of certified transactions. The primary node is known as a genesis block which has no preceding nodes. The transactions in BCT are immutable and cannot be changed after they are legally ratified by a consensus-based process and stored in the record. The updates are immediately distributed across the chain. The transparent and disseminated nature of BCT allows customers to store and monitortransactions effectively. Furthermore, BCT is a trustless computing platform where the authority of the transaction is a guaranteed without any third-party approval34. Figure 2 illustrates the general architecture of BCT. The nodes comprise a header and a body. The header includes six fields including version, preceding hash value, Merkel Root, difficulty target, nonce, and timestamp.

Fig. 2
figure 2

The overall architecture of a node8.

The body of the node comprises recognized and authorized dealings. A counter is employed to count all the dealings. The status of the node designates who transmitted which data to whom at a certain period. An approved transaction between two peers only occurs when it is included in a node then it is approved and connected to the chain. Therefore, the record must be accessible visibly. The operating principle of BCT when a user transfers transactions (e.g. Bitcoin) to another user is demonstrated in Fig. 3. The main properties that make BCT superior as compared to any other federated databases are as follows: (i) in BCT, the data transmissions are accomplished and authenticated through distributed ledgers. All users can cooperate on all features for proving and linking nodes in the chain; (ii) it is impossible to drop or roll back a recorded data transmission. Conversely, unlawful data transmissions are recognized immediately; (iii) the customer uses a virtual identity code to cooperate with the BCT. The procedure of implementing virtual credentials does not disclose the actual customer identity; and (iv) this property denotes the protected link between each node and the preceding one.

Fig. 3
figure 3

Operating principle of BCT.

Chain of things technology

This work proposes a cohesive CoT-TTSby grasping the full potential of the BCT and IoT technologies. There are several significant advantages in implementing CoT in a PFSC, including: (i) it provides robust guarantee of the origin and custody of goods in the chain, which sequentially underpins brand name; (ii) it provides near real-time solution for monitoring goods in the chain, providing a more practical method regarding quality, safety, and recalls while curtailing food spoilage simultaneously; (iii) it replaces manual documentation methods by digital transformation and develops a dependable data communication among various stakeholders; (iv) it provides an immutable ledger for each transaction, events, or even data gathered by IoT devices. It guarantees that data cannot be interfered with or altered; and (v) it adds better transparency into the PFSC to enable companies to increase the performance of their logistics system and revenue. The encryption methods used in BCT preserve customerinformation confidential. The vital relations between IoT and BCT are expected to be influenced by several attributes: (i) decentralized network - BCT performs a key role in solving security and privacy problems.All the participants in the network have a replica of the transaction as a distributed record. If a record is corrupted or modified in any way, it will be banned by most of the stakeholders in the network. (ii) P2P network – BCT enables the stakeholders to perform data transmissions without using a central server; (iii) payment system - BCT is known for payment processes through cryptocurrency that remove the necessity to trust any third party (e.g., bank); and (iv) traceability - BCTis used to achieve traceability of products and validation of the identities. Thus, CoT improves the real-time performance of transactions and secures payment processes. In the near future, CoT can be unswervingly connected to a bank account through Bitcoins to make effective and secure dealings, while related methods may be used in the PFSC management system.

CoT-based perishable food traceability system

In this work, we propose a CoT-TTS to achieve seamless monitoring and effective data management for perishable food products. This system can extend the shelf life and quality of food under different conditions. Figure 4 displays the intended framework with its three units. To realize end-to-end visibility in PFSC, foodstuffs are assembled as batches (also called logistics units) and are equipped with IoT sensors. These units are allocated with unique identifiers (IDs). These units undergo different processes including mixing, segmenting, packaging, etc. Food processing companies employ these batch IDs to log the details of transformations by stating the inputs and outcomes of a particular process, the inherent attributes of products (colour, size, shape, etc.), and concomitant metadata (e.g. timestamp, place of processing, environmental conditions) at data gathering points (i.e., critical traceability points). The entire or a portion of the logged data in each processing company is then transmitted to the subsequent linkage in the PFSC whereas the data related to transactions and shelf life management are handled by BCT. This develops a data path that allows to trace the goods transportation within a company and along the PFSC. Finally, this model uses ANFIS for food quality assessment of perishable products handled by the PFSC.

Fig. 4
figure 4

The proposed CoT-TTS for perishable products.

Monitoring module

The environmental monitoring module employs an appropriate IoT network. This module performs different processes from sensing data using ‘’smart sensors” to implementing applications in selected IoT platforms. The gathered information is then applied to assess the shelf life and quality deterioration of goods. The selected IoT network contains a layered architecture with three layers such as edge, networking, and application layers. The edge layer consists of appropriate sensing elements and relay nodes. The sensors are used to observe environmental status and relay nodes are used to transmit this information with the timestamp to the designated platform for further processing. The networking layer enables effective communication between sensors and relay nodes through any wireless communication systems (e.g., Infrared communication, Wi-Fi, Bluetooth, etc.). The streamlined and automatic data communication between relay nodes and selected IoT networks is realized by any Machine-to-Machine (M2M) communication system (e.g., Constrained Application Protocol (CoAP), Message Queuing Telemetry Transport (MQTT), etc.). The application layer is responsible to create and implement applications in IoT development platforms through any Application Programming Interfaces (APIs) (e.g., IBM Watson message gateway, Rest API, WebSocket, etc.), databases, and peripheral systems. Besides, the measured data can be organized and logged in federated cloud platforms (e.g., Google Cloud, IBM Cloud, Amazon Web Services, Microsoft Azure, etc.) for future processing.

The implementation of IoT devices is based on different levels of logistic units, such as container-, batch -, and item-levels, as illustrated in Fig. 5. An optimum number of sensing and relay nodes (based on lighting, humidity, and temperature measurements) are employed in the container-level logistic units. This enables a tradeoff between installation expenses and the efficiency of IoT devices. The perishable goods at the container level are usually conveyed from farming sites to post-harvesting and processing centers using active containers through global freight forwarders. These packaging are fortified with complete temperature, moisture, lighting, and vibration controlling units that vigorously preserve the desired environmental conditions. In batch-level logistic units, a sensing device is equipped for containerization to observe the status of each consignment. Then, the products are typically transported from food processing centers to distribution sites by road. This fetches the reimbursements of tractability and lucrativeness for managing the goods in consignment-lot levels. Finally, the goods can be either supplied to restaurants or sold in hypermarkets and managed through passive containerization. The external wrapping of perishable goods offers QR codes that comprise information related to perishable goods, including the name of the goods, brand, origin of goods, and list of ingredients. Additionally, statistics about the quality of goods (with shelf life and quality deterioration), and environmental status are handled by the cloud-based applications.

Fig. 5
figure 5

CoT technology espousal for different logistic units.

Data management module

While finding the right tradeoff between real-time data procurement and dependable data processing, conventional BCT models cannot meet the demands of TSfor perishable goods. Though BCT has the benefits of decentralized structure, distributed control, auditability, end-to-end visibility, and enhanced security, implementing BCT without suitable adaptations may lead to adverse impacts on the performance of TSof perishable goods. On the one hand, managing huge data in the BCT-based PFSC is unproductive with respect to block formation and mining performance; therefore, the overhead for including new nodes in the chain rises exponentially. However, unconstrained utilization of the BCT for PFSC operations is ineffective, which needs a large volume of storage devices. A particular endpoint (gateway) of the BCT should be implemented which defines APIs for applications to write or read data on the BCT network. Consequently, a hybrid method is proposed with lightweight features by applying CoT and Cloud computing technologies. In the proposed BCT, each node contains the index, data, timestamp, self-hash code, and preceding hash value as discussed in Sect. 2.2. In each node, the hash algorithm is used to achieve the cryptographic encoding and generate a distinctive ID for the nodes. The level of complexity of counterfeiting the nodes is established by the limitations of the particular initial values in the output hash code. Hence, the nonce is employed to regulate the output bytes to satisfy the demands.

Algorithm 1

presents the pseudo-code for the node counterfeiting procedure, to reveal the level of complexity. The unsigned integer variable uint32() is employed to define a nonce value, and consequently, it is entered into the function ft.Blockchain.calculate_hash() for producing the anticipated output byte. The level of complexity in the node counterfeiting procedure is employed to regulate the appraisal frequency of the whole blockchain and to provide perfect harmonization in the decentralized system. The reduced time for node forging is selected, since the governance of appraisal frequency (by changing the level of complexity in the BCT) can be more accurate. The proof of work (PoW) consensus technique resolves a computationally hard mathematical problem to generate new nodes in the chain. This is called the ‘mining’ process, and the blocks in the chain that are involved in mining are called ‘miners’. The miners wrap a set of data transmissions into a group and attempt to mine. For this mining operation, a perplexing puzzle has to be resolved. This trick is known as the PoW problem which has to be resolved to demonstrate that the miner has carried out some task in determining the key to the problem and therefore the mined node must be valid. The solution to the problem needs to be a lower number than the hash value of the node for it to be recognized, called the ‘target hash’. Conversely, this consumes higher energy and demands high-performance computing devices for performing mining operations.

Algorithm 1: Node counterfeiting with a selected level of complexity

\(\:\text{f}\text{u}\text{n}\text{c}\text{t}\text{i}\text{o}\text{n}\:[i,\:t]\:=\text{f}\text{o}\text{r}\text{g}\text{e}\text{t}(index,\:p\_hash,\:timestamp,\:data\))

Initialize the difficulty \(\:{N}_{zero}\), process latency \(\:{\:t}_{lat}\), and iterations \(\:i\leftarrow\:1;\)

Initialize the timer \(\:{t}_{ic}\);

for (\(\:index\) = 0 to 232) do

 

\(\:nonce=unit32\)(\(\:index\));

 

[\(\:hash,unit8\_sha256\)] = ft.Blockchain.calculate hash\(\:(index,\:p\_hash,\:timestamp,\:nonce,\:data\));

 

if first \(\:{N}_{zero}=0\)&&\(\:unit8\_sha256=0\) then

  

break;

 

Endif

 

Stop the procedure with \(\:{\:t}_{lat}\);

 

\(\:i\leftarrow\:i+1\);

end for

\(\:t\leftarrow\:\) end of the timer \(\:{t}_{oc}\)

end function

A Proof of Stake (PoS) consensus mechanism is then established to authenticate Bitcoin dealings. With this mechanism, the proprietors of Bitcoin can stake their currencies, which provides them access to verify the new nodes and include them in the blockchain. In the case of perishable good TS, proof of supply chain share (PoSCS), which imitates proof of stake, is developed to forge or mint nodes by stakeholders rather than miners in the PFSC. The responsibility of PoSCS stakeholders is gathered into a standardized PoSCS (\(\:{P}_{i}\)) to decide the owner of a new node as shown in Eq. (1).

$$\:{P}_{i}=\frac{1}{\left|T\right|}\sum\:_{j=1}^{k}{x}_{ij}{t}_{j}\frac{\{{F}_{i}^{imp}\times\:{F}_{i}^{sat}\times\:\left[\beta\:{F}_{i}^{will}+\left(1-\beta\:\right){F}_{i}^{ded}\right]\}}{{\varDelta\:R}^{3}}$$
(1)

where \(\:i\) represents a selected stakeholder and \(\:N\) is the total number of stakeholders. In this work, we divide the product path in the network into \(\:k\) segments with a total cycle time\(\:\:T\). Every segment is carried out by a selected participant. Hence, the time consumption of each stakeholder in PFSC \(\:{(P}_{i})\) is taken into account. The term \(\:{x}_{j}\)is a binary variable signifying \(\:j\) number of network operations and its equivalent time consumption is\(\:{t}_{j}\). Also, the consensus of \(\:{P}_{i}\) is defined as\(\:\sum\:_{i=0}^{n}{P}_{i}=1\). But, only considering the transportation time is inadequate, as some stakeholders may keep the products for a long time, without large values being generated for the TS. Hence, the observed values from the TS for stakeholders are considered, and they are evaluated by the following four parameters: impact factor\(\:\:\left({F}^{imp}\right)\), willingness factor\(\:\:\left({F}^{will}\right)\), dedication factor\(\:\:\left({F}^{ded}\right)\), and satisfaction factor (\(\:{F}^{sat})\). The parameter \(\:{F}^{imp}\) represents the capacity to encourage the TSs to other participants; \(\:{F}^{will}\) is the readiness of the parties to leverage the potential of TSs; \(\:{F}^{ded}\) signifies the scope of giving their means to design track and trace systems; and \(\:{F}^{sat}\) is the level of satisfaction after designing the track and trace systems. The weighting factor α, with a range of \(\:[0,\:1]\) between \(\:{F}^{will}\)and\(\:{F}^{dev}\), is attuned to find out the suitable assessment mechanism. The score \(\:S\) of\(\:{\:F}^{imp}\), \(\:{F}^{will}\), \(\:{F}^{ded}\)and \(\:{F}^{sat}\) is described as \(\:[{S}_{1},{S}_{2}]\). The value of \(\:\gamma\:\:\)defines three policies for CoT utilization: dedication-first strategy\(\:\:(\gamma\:=0.2)\), reasonable strategy\(\:\:(\gamma\:=0.5)\), and willingness-first strategy\(\:\:(\gamma\:=0.8)\). The inspiration for using the above four parameters in participant evaluation is to increase the generality and objectivity of the intended consensus mechanism, hence, the policy cannot be controlled by only one parameter of shipment time. The combination of shipment period and participant evaluation can more efficiently define the value and stake of network participants in the whole system. Therefore, the PoSCS can perform the role of PoS in the blockchain to allocate the validator to copy the new node in the BCT accurately.

The above standardized supply chain share cannot describe the degree of contribution of participants. Hence, their transit volume\(\:\:\vartheta\:\left(t\right)\), which is informed in a particular period\(\:\:t\), in the complicated PFSC model is deemed to define a dynamic condition in the supply chain share, as in Eq. (2).

$$\:\widehat{{P}_{i}\left(t\right)}={P}_{i}\left(t-1\right)\times\:\frac{\vartheta\:\left(t\right)}{\vartheta\:(t-1)}$$
(2)

The transit volume represents all incoming and outgoing deliveries for a particular participant. Therefore, the dynamic supply chain share \(\:\widehat{{P}_{i}\left(t\right)}\) can be developed to define the degree of contribution of the participant in supply chain operations. In the implementation of CoT technology, a cohesive methodology is employed to assimilate CoT with cloud computing technology. Besides, the real-time IoT transactions are controlled and stored in a cloud instead of logging all data in the BCT. Then, consignment or event IDs created from transactions are logged in the blocks, for perishable items to be related to real-time information in the database. Thus, lightweight data blocks and effective BCT implementation can be stated, such that nominal data are processed in the BCT to increase network flexibility and adaptability. When consumers purchase food items from e-commerce platforms, smart transactions are framed to recognize the procurements and offer the privilege of accessing track and trace data. From the perspective of the product life cycle in the PFSC, certain start and end nodes are essential to define the span and duration of the blockchain.

In contrast to BCT applications in Bitcoin, it is pointless to store all the data in the food traceability applications, which might hurt processing performance. Then, the BCT evaporation mechanism is used to realize dependable TS efficiently. A batch of food is transported from growers and treated by food processing centers, and therefore batch ID can be allocated to each perishable food product for generating the initial node. In the PFSC network, the variation of climatic conditions and event tracking can be observed and stored in the archive as well as BCT blocks. Besides the supply chain, the container ID, batch ID (processed items), and lot ID are stored to find and track the perishable products. The traceability information stored in the blocks is then evaporated after completing the point of sales or proof of delivery events. The evaporated information may be recorded in the cloud storage to release system memory.

Technology integration

To monitor and manage a CoT-based network, we need a smart framework for sensing environmental conditions and managing data communications between devices. The CoT-based PFSC framework should be flexible enough to achieve a monitoring pattern and transactions. Besides, it provides a scalable and efficient solution for traceability applications of foodstuffs. BCT provides a decentralized and secured approach to exchange data while enabling the verification of dependable dealings among participants. The benefits of using BCT to protect IoT communications are providing reliance, minimizing cost, and quick transactions. The standards and structures employed in a CoT-based PFSC management can increase data integrity and improve contextual processes. Furthermore, it addresses the problem related to perishable product traceability. The notion of the intended framework with perishable products and IoT maneuvers is illustrated in Fig. 6. The devices are equipped with sensors and have links to the BCT over the internet. This facilitates remote controlling, monitoring, and management of the PFSC elements to supply food items to the customers.

Fig. 6
figure 6

Monitoring module in CoT-TTS.

The intended monitoring module in CoT-TTS includes (i) a logistic unit with sensors; (ii) a distributed application (Dapp) to read the transactional data; (iii) a record pool engine that gathers and processes the measured data using IoT devices; (iv) the flexible node cluster that computes massive logs to organize and index it into equivalent databases. The records are disseminated and documented as replicas; and (v) a visualization tool that receives the transactions planned by node cluster and provides useful information about the BCT and nodes. Applying the CoT as a design base for managing and tracking transactions provides (i) more control over the performance and throughput of the PFSC; (ii) transparent and complete visibility; and (iii) a tracking process to trigger each node and also offers a common communication system. In this CoT platform, it is essential to select the suitable design pattern in which the dealings happen. The transaction may befall in two ways: (i) interaction among IoT entities, and (ii) communication between the BCT network and IoT entities. To facilitate communication between two entities, the BCT only stores data securely. In this configuration, a BCT is employed to support security and trust in PFSC. Few data bytes are logged in the blocks while the dealings occur outside the chain. This configuration is beneficial in scenarios where the IoT transactions are scheduled with reduced delay. Figure 7 demonstrates how two IoT trucks are communicating using a central hub which supports the entities to log data in the BCT.

Fig. 7
figure 7

Design pattern for communication among IoT devices.

To support interaction between IoT devices and the BCT network, all the transactional records are disseminated using the BCT network. In this configuration, BCT not only offers a data storage mechanism but also monitors and manages business dealings. This design guarantees that all transactions are traceable and protected. Furthermore, it increases the autonomy of nodes so that they can interact unswervingly with the BCT network. It is very effective when different IoT entities interconnect using diverse domains. However, assimilating big data streams and transactions using a BCT network will fetch issues related to performance and delay. Therefore, scalability is one of the vital problems of CoT-TTS in PFSC. Figure 8 demonstrates the interaction between diverse IoT entities with the BCT network.

Fig. 8
figure 8

Design pattern for communication between IoT devices and BCT network.

Food quality assessment module

This research uses ANFIS to predict the quality and shelf life of perishable products during transportation and storage. ANFIS is a multilayer artificial neural network that combines the concepts of both fuzzy logic and neural networks to define the correlations between input and output parameters. The proposed CoT-TTS model evaluates the quality and shelf life of products based on the IoT sensors. The data collected from the environmental sensors were stored in blocks for the pre-processing and creation database. The temperature, moisture, lighting, and vibration measurements were used to show their impacts over time. In this research, the measured parameters from the sensory system (temperature, humidity, lighting, and vibration) were employed as inputs and the quality of perishable food items is considered as the output of ANFIS. In the present work, the first-order Sugeno model with Fuzzy IF-THEN rules is used. These rules are derived from the work proposed by Chellappan and Natarajan35.

The rules are shown below:

$$\:Rule\:1:\:if\:{x}_{1}={K}_{1}\:and\:{x}_{2}={L}_{1}\:and\:{x}_{3}={M}_{1}$$
$$\:\:\:\:\:\:\:\:\:\:\:\:Then\:{f}_{1}={q}_{1}{x}_{1}+{s}_{1}{x}_{2}+{t}_{1}{x}_{3}+{r}_{1}$$
$$\:Rule\:2:\:if\:{x}_{1}={K}_{2}\:and\:{x}_{2}={L}_{2}\:and\:{x}_{3}={M}_{2}$$
$$\:\:\:\:\:\:\:\:\:\:\:\:Then\:{f}_{2}={q}_{2}{x}_{1}+{s}_{2}{x}_{2}+{t}_{2}{x}_{3}+{r}_{2}$$
$$\:Rule\:3:\:if\:{x}_{1}={K}_{3}\:and\:{x}_{2}={L}_{3}\:and\:{x}_{3}={M}_{3}$$

Then\(\:{f}_{3}={q}_{3}{x}_{1}+{s}_{3}{x}_{2}+{t}_{3}{x}_{3}+{r}_{3}\)

where \(\:{K}_{1}\), \(\:{K}_{2}\), \(\:{K}_{3}\),\(\:{L}_{1}\), \(\:{L}_{2}\), \(\:{L}_{3}\)and \(\:{M}_{1}\), \(\:{M}_{2}\), \(\:{M}_{3}\)are the membership functions for inputs \(\:{x}_{1}\), \(\:{x}_{2},\) and \(\:{x}_{3}\)while \(\:{q}_{1}\), \(\:{q}_{2}\), \(\:{q}_{3}\), \(\:{s}_{1}\), \(\:{s}_{2}\), \(\:{s}_{3}\), \(\:{r}_{1},\:{r}_{2}\), and \(\:{r}_{3}\)are the linear variables in the consequent part of the ANFIS model. These parameters are updated during the training process.

The structural design of ANFIS contains six layers to optimize the fuzzy inference system:

  1. 1.

    Input layer: For all the nodes in this layer, the linguistic label is measured by the equivalent membership functions (MFs), as given in Eq. (3).

$$\:\left\{\begin{array}{c}{\sigma\:}_{1,i}={\mu\:}_{{K}_{i}}\left({x}_{1}\right)\:\:\:\:\:\:\:i=\text{1,2},3\\\:{\sigma\:}_{1,i}={\mu\:}_{{L}_{i-3}}\left({x}_{2}\right)\:\:\:\:\:\:\:i=\text{4,5},6\\\:{\sigma\:}_{1,i}{=\mu\:}_{{M}_{i-6}}\left({x}_{3}\right)\:\:\:\:\:\:\:i=\text{7,8},9\end{array}\right.$$
(3)
  1. 2.

    Fuzzification layer: In this layer, neurons execute the fuzzification process for the given inputs. All the nodes in this layer are fixed with an MF. Constraints of MFs are called antecedent or premise variables. The degree of MFs is denoted by\(\:{\mu\:}_{{K}_{i}}\), \(\:{\mu\:}_{{L}_{i}}\), and \(\:{\mu\:}_{{M}_{i}}\)for the fuzzy sets\(\:{K}_{i}\),\(\:{\:L}_{i}\), and \(\:{M}_{i}\) correspondingly. In this layer, each node computes the firing strength \(\:{(\phi\:}_{i})\) of the rule using a simple multiplier using Eq. (4).

$$\:{\sigma\:}_{2,i}={\phi\:}_{i}={\mu\:}_{{K}_{i}}\left({x}_{1}\right)\times\:{\mu\:}_{{L}_{i}}\left({x}_{2}\right)\times\:{\mu\:}_{{M}_{i}}\left({x}_{3}\right)\:\:\:i=\text{1,2},3$$
(4)
  1. 3.

    Normalization layer: Each node in this layer is nonadaptive and relates to a fuzzy rule. This layer computes the proportion of the one normalized power to the sum of all rules’ normalized powers. The output of the normalization layer is computed as the standardization of the weights \(\:{\phi\:}_{i}\) from the preceding layer as given in Eq. (5).

$$\:{\sigma\:}_{3,i}=\stackrel{-}{{\phi\:}_{i}}=\frac{{\phi\:}_{i}}{{\phi\:}_{1}+{\phi\:}_{2}+{\phi\:}_{3}}\:\:\:\:\:\:\:\:\:\:\:\:\:i=1,\:2$$
(5)
  1. 4.

    Defuzzification layer: Each node in this layer is fixed and they calculate the outcomes using Eq. (6).

$$\:{\sigma\:}_{4,i}=\stackrel{-}{{\phi\:}_{i}}{f}_{i}=\stackrel{-}{{\phi\:}_{i}}\left({q}_{i}{x}_{1}+{s}_{i}{x}_{2}+{t}_{i}{x}_{3}+{r}_{i}\right)\:\:i=\text{1,2}$$
(6)
  1. 5.

    Aggregation layer: The node in this layer is fixed and calculates the results as the summation of all inward signals (refer to Fig. 4). The outcome can be defined using Eq. (7).

$$\:{\sigma\:}_{5,i}=\sum\:_{i=1}\stackrel{-}{{\phi\:}_{i}}{f}_{i}=\frac{\sum\:_{i}{\phi\:}_{i}{f}_{i}}{\sum\:_{i}{\phi\:}_{i}}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:i=\text{1,2},3$$
(7)
  1. 6.

    Output layer: The outcome\(\:\:\left({f}_{out}\right)\) of an ANFIS configuration is computed using Eq. (8).

$$\:{f}_{out}=\stackrel{-}{{\phi\:}_{1}}{f}_{1}+\stackrel{-}{{\phi\:}_{2}}{f}_{2}+\stackrel{-}{{\phi\:}_{3}}{f}_{3}$$
(8)

Implementation using the EOSIO platform

To evaluate the effectiveness of the intended CoT-TTS model, a case study was carried out in a seafood company. Seafoods are extremely perishable products and their quality decades very quickly. This PFSC for supplying seafood is lengthy and multifaceted, and its elements are hard to manage and monitor. Harvesting and selling zones are also extensively separated. In this work, we use a truck and a warehouse with MOKO’s G-Series tracker. This tracker contains motion sensors, light sensors, temperature and humidity sensors, and Global Navigation Satellite System (GNSS) tracking to ensure that critical assets are always secure while in transit and storage. These devices can be configured locally via a USB port and remotely through a command from the server. The effectiveness of these sensors are not validated in this work.The GNSS tracking facility provides positioning, navigation, and timing (PNT) services on a global or regional basis. The default configuration is to obtain location information every hour and report it to the platform. When GNSS positioning fails, the base station or WiFi Positioning will be started as an auxiliary. If the device doesn’t detect the network, it will store the data, and the device is in a sleep state till it is reconnected to the internet.The complete implemented details of the CoT-TTS in PFSC are discussed below.

Contextual information about the company

The proposed CoT-TS model is implemented in Sai Sea Food Company, Nagapattinam, Tamilnadu, India. This seafood-selling company was established in 2016 to offer premium fresh fish and other seafood products. It is dynamically involved in the seafood business such as fishing, processing, distribution, and marketing. The company has an online marketing platform to vend seafood and to deliver e-fulfillment activities (i.e., handling users’ inquiries, packaging, sending orders, managing inventory, etc.) to integrate shopping carts and e-commerce markets for users. They transfer seafood to the e-fulfillment center before retailing. The users can view seafood details, stock levels, and ratings from other users to decide on whether to buy the foodstuffs. In archetypal online shopping platforms, data on consignment and mileposts can be given to users. For effective PFSC management, stakeholders are focused on both the consignment condition from the e-fulfillment center to customers, and with data about the entire network activities, food quality, and environmental management.

Existing TSs, when employed in a fish company, experience challenges in handling such heterogeneous assortments of logistic units in the track and trace process, and in integrating data from IoT monitoring units. Hence, the TS will take more time to trace a particular item. Consequently, the participants and end users may distrust the accuracy and reliability of traceability data. Moreover, methods for updating product quality in a lucrative and quick manner are missing, particularly regarding shelf life computation and quality deterioration. Also, users are mostly focused on the quality of purchased foodstuffs, and it is the most important aspect that affects the reputation and performance of imminent deals of a company. More precisely, supplying foodstuffs with deprived quality leads to a rise in the recall rate of delivered goods, and harms the sustainability of the food industry. Hence, the fish company demands a resilient and reliable TS with real-time monitoring as well as quality assurance modules.

EOSIO platform for implementation

We implement our CoT-TTS model through the Electro-Optical System (EOS/EOSIO) platform. It is a public, open-source BCT that enables entrepreneurs and developers to create, implement, and run high-performance BCT applications. It is intended to enable the function of inter-scale decentralized application (Dapp). It utilizes a strength programming language (e.g., Java, C++, Python, etc.) for creating smart contracts. The core features including account creation, consensus, token economics, fee schedules, block owner registration, multi-sig, voting, etc., are applied within the contracts and implemented on the EOS/EOSIO network. This platform enables users to update smart contracts to customize control rules and resource allocation. A Web Assembly virtual machine (WASM) supports to implement the smart contracts in this platform. In this research, the experiments are conducted on an Intel Core i7-4790 CPU with 3.6 GHz, 16GB RAM, and 128 GB NVMe SSD. We use Docker and EOS Studio to implement the intended CoT-TTS. Docker creates a platform to run the application and EOS Studio enables a development environment to implement the TS. Furthermore, these tools are used to build and deploy smart contracts on local nodes and verify applications in this platform. Figure 9 shows a screenshot of creating a smart contract in the EOSIO platform.

Fig. 9
figure 9

Contract creation in EOSIO.

The local node supports both single- and multiple-node implementation and is also useful in the contract creation phase. Furthermore, the EOS Studio is employed as a transaction supervisor as well as a system administrator, permitting customers to communicate with developed contracts and realize the resource exploitation measures. This platform employs Delegated-Proof-of-Stake (DPoS) as the consensus protocol. In this protocol, producers/validators are liable for creating blocks that are used by several participants.

Figure 10 shows the instructions employed in the EOSIO platform to implement and verify a transaction. Cleos is the command-line tool that operates on each node in EOSIO. It is employed to connect with NodeOs. The NodeOs tool is used to manage contracts, authenticate transactions, create blocks with authorized businesses, and ratify nodes before they are logged on a block. The –url designates the http/https URL where nodeOs is operating. The push command is employed to store transactions in the block. The smart contract activities in the admin account are addstorage, addharvest, addsupplier, and additem. Also, producer1@active signifies that the active customer has the required authorization key.

Fig. 10
figure 10

EOSIO input command for data entry.

The EOSIO platform offers a distinctive layer of validation and verification for customers. It is a very secure platform since validation and verification are not required to be executed separately. Besides, it provides a multi-index table to achieve traceability. Figure 11 shows a multi-index table for the function of the deployed data. An experiment was carried out to prove the automatic upstreaming of environmental parameters (i.e., temperature, humidity, lighting, and vibration) gathered from sensors and access to the information recorded in the blocks. We use an API defined by the sensor manufacturer to realize this automatic upstreaming of the measured data to the blocks.

Fig. 11
figure 11

EOSIO harvest data multi-index table.

The automatic upstreaming of the measured parameters excluded the chance of data meddling in the manual uploading process. The parameters may change continuously. However, it is not required to send all the measured data to the blockchain. Besides, sending all the data causes a considerable waste of memory space and a low storage efficiency. Therefore, at each stage, the frequency of measured data upstreaming was different. For instance, the frequency was three times a week for the farming stage and once every day for the shipping stage. Thus, not only can data validation and verification be guaranteed but also memory can be saved considerably. The user can access the rudimentary information and environmental conditions of goods by entering the traceability code on the query page. The data about the supply chain stages of goods can be retrieved by entering the traceability code. The place-of-origin data are obtained from the database whereas the environmental parameters are drawn from the BCT platform. Figure 12 displays the temperature data acquired from the blockchain.

Fig. 12
figure 12

Temperature data.

Results and discussion

The effectiveness of the proposed CoT-TTS is evaluated in terms of breadth, depth, access, and precision of transactions. Breadth is the volume of data stored. Depth defines the ability of how far traceability is possible. Access signifies how rapidly data can be distributed to stakeholders of the PFSC. Precision describes the level of confidence to recognize a specific logistic unit. Each metric has a direct impact on the data volume that the model can log and process. At the same time, it has an indirect effect on the goals of the traceability model. Breadth is the number of transactions verified by the system. The assessment is carried out by writing a program that inevitably creates transactions. The execution of the program instigates with entering data, branch count, and initial ID that will be incremented by one for the subsequent data point. If the number of transactions is minimum (up to 50 transactions) the model achieves 100% breadth value. The breadth value decreases when the number of transactions created is increased. For example, when the number of transactions is 1000, the model achieves 10% of the breadth value as shown in Fig. 13. This is because the server capacity is restricted in managing a large volume of transactions.

Fig. 13
figure 13

Breadth of CoT-TTS.

Depth defines how far nodes establish the PFSC from upstream to downstream. The PFSC management needs the system to be able to log the details about product transport and change from upstream to downstream. This is realized by mapping Source_ID to the transactional data. The depth value is also restricted by server capacity with respect to the number of transactions as shown in Fig. 14. If the number of transactions is minimum (up to 100 transactions) the model achieves 100% depth value. The depth value decreases when the number of transactions created is increased. For example, when the number of transactions is 1000, the model achieves 15% of the depth value.

Fig. 14
figure 14

Depth of CoT-TTS.

Precision represents how the TScan detect the movements and features of a certain foodstuff accurately. Our proposed CoT-TTS can satisfy the precision requirements providing the data entered is effectively logged in the blockchain including ingredients data. The precision aspect of empirical outcomes reveals that the system can accurately identify product variations in the raw material. Our TSachieves 100% precision. Access denotes how rapidly data can be disseminated to stakeholders of the PFSC. Access time is defined as the time taken by the system to store the transaction in the blockchain successfully and the time taken to access the data. The mean time to log data (i.e., submit time) to the blockchain is 247ms whereas the mean time to get the data is 652ms. The access time depends on the depth of the data. Figure 15 maps submission time to the number of transactions created.

Fig. 15
figure 15

Access of CoT-TTS.

Conclusion

Fresh products are vulnerable to quality deterioration and have a limited shelf life. Secured tracking of the current location and real-time status of consignments in the PFSC supports companies in reducing food loss and ensuring the quality of the perishable freights that are delivered to consumers. In this context, this research proposes a CoT-TTS which employs a set of IoT devices for monitoring the environmental condition, a BCT network for secured data management, and ANFIS for food quality assessment. The proposed system is appropriate for multi-stage chain traceability and shelf life management to alleviate several vital hitches in conventional PFSC networks for supplying perishable foodstuffs. The performance of the proposed CoT-TTS is evaluated through a case study using an EOSIO platform. The effectiveness of the proposed TS is evaluated in terms of depth, breadth, access, and precision of the transactions. The extensive experimental results prove the superiority of the proposed TS. Hence, this research is of significant value to both researchers and practitioners for applying CoT-TTS in their PFSC to track perishable goods. The participants of PFSC can transfer more reliable data related to traceability and food quality after applying this CoT in their PFSC. The proposed CoT-TTS takes advantage of tamper-proof, transparent, and undeniable transactions as well as distributed monitoring and tracing operations. When implementing our CoT-TTS in EOSIO platform, we face scalability issues, causing delays and increased transaction costs. Implementing blockchain technology requires a significant initial investment in infrastructure and training (e.g. truck with MOKO’s G-Series tracker). The regulatory landscape surrounding blockchain technology is continually evolving. Stakeholders of PSC must stay updated to ensure compliance with changing regulations. We aim to solve these issues in our future work.