1. Introduction
The food industry plays a significant role in the local, regional, and global food supply chain. Food has long been regarded as a strategic product in terms of national economy, stability, and sovereignty, with particular emphasis on international market presence and competitiveness. Moreover, the rapid growth of the human population, coupled with limited resources available, has intensified the need for sustainable food production. Consumers have also become increasingly interested in not only the quality and health benefits of food commodities but also their “history” [
1]. As such, modern consumers are much more likely to raise the question of origin, cultivation, breeding circumstances, and various ethical considerations associated with food items.
To meet these multi-faceted demands, technological innovation is crucial for companies aiming to improve their production processes and organizational frameworks. This involves integrating automation, information, and communication technologies across production and commercialization activities. Digital technologies, non-exhaustively including the Global Positioning System (GPS), yield monitoring, geographic information systems (GIS), and early remote sensing, were introduced roughly three decades ago as the foundation of precision agriculture (PA). These tools were applied to address two major challenges in modern agriculture: increasing production quantity by optimizing resources and meeting production standards by balancing quality requirements with minimal environmental impact [
1]. These technologies have significantly evolved over time to advanced solutions such as global navigation satellite systems (GNSSs), cloud computing, big data analytics, robotics and automation, high-throughput remote sensing, artificial intelligence (AI), and the widespread application of the Internet of Things (IoT) for communication and data management. Nowadays, PA is a highly researched and continuously evolving field, driven by farmers’ need to optimize resource use more and more efficiently to account for the increasing demands. Implementing these systems could theoretically enable the agricultural sector to achieve sustainable crop production and environmental preservation, supporting global food security and maintaining ecological balance [
2,
3]. Refs. [
1,
4]. Modern PA management systems are seldom implemented on small, low-mechanization farms, which represent a significant share of global agricultural production, especially in regions facing high levels of food insecurity [
5]. As with other farming technologies, PA benefits both adopters and society as a whole, but those unable or ineligible to adopt—currently the majority of farmers worldwide—are often left at a disadvantage.
Precision food production extends beyond the agricultural sector. In recent years, greater emphasis has been placed on improving efficiency and quality in the food industry as well, often by applying newly available digital tools. With the emergence of widespread digitalization and Industry 4.0, new opportunities and information have entered the food industry. These advancements go beyond modern, capacity-enhancing hardware and also prompt a shift in mindsets [
6]. The term “Industry 4.0” refers to innovative production processes that are partially or fully automated with devices autonomously communicating across supply chain activities. It is fundamentally centered around the intelligent integration of machines, electrical systems, and cutting-edge information technology, facilitating process optimization and enhancing the productivity of value-creating chains [
6,
7]. Digitalization also involves collecting and processing data from production and preparing decisions based on these data, forming the basis of data-driven decision making [
8]. While some food industry facilities are already managing their production in this way, in many cases, similarly to the agricultural sector, this shift to data-driven management systems is progressing more slowly. This disparity in digitalization levels depends on the food industry sub-sector, facility size, and the type and quality of the commodities produced [
9].
Not only is the adoption slow for both the agricultural and food industries, but there is also a lack of proper communication and synchronization between the two segments, leading to production inconsistencies in the form of frequent material shortages or excesses [
10]. To promote high productivity, quality, consistency, and transparency in the food supply chain, it is of utmost importance for the agri-food industry to grade and track agricultural raw materials, food-processing steps, food logistics, and trade all the way to the consumer.
Agricultural and food product markets are marked by significant information asymmetries, as producers, processors, and retailers typically have far more knowledge about the quality of their products than consumers do [
11]. This lack of transparency has led to a shortage of authentic information on the market and has promoted economically motivated fraud and deception, putting various supply chain actors, particularly consumers, at risk [
12,
13]. To combat this, among various other regulations, the farm-to-fork approach, established in Regulation (EC) 178/2002 and now a cornerstone of European food law, mandates the “traceability of food [...] at all stages of production, processing, and distribution” [
14]. Principally, tracing capability enables identification of the origin of any product at any stage within the value chain, allowing for backward tracing to determine the initial source and forward tracing to identify the final destination. Tracking capability, on the other hand, allows for the identification of a product’s exact location at any given time. Together, these capabilities form the core functions of a “tracking and tracing system” [
15,
16,
17,
18,
19].
In food safety and quality assurance, tracking and tracing capabilities play a crucial role in identifying and addressing sources of contamination or quality deficiencies by enabling backward tracing from defective product batches. A tracking and tracing system generally involves data acquisition and storing techniques, communication solutions, and preferably a certification or credibility system to ensure data authenticity. The literature offers numerous technical descriptions of traceability systems, providing a comprehensive overview of general technical solutions [
20], discussing specific technologies like radio frequency identification (RFID) [
21], or addressing particular challenges, such as tag readability in extreme conditions like chilled, hot, or humid environments [
22]. It can be observed that most modern systems leverage some form of non-contact detection solution with radio-wave-based communication between read/write units and data carrier labels being the most widespread [
23]. According to the frequency range covered and the communication protocol, today’s practice uses two main systems: simple RFID devices, primarily for contactless reading of stored information; and communication systems for creating interactive, local area networks (LANs). RFID technologies use radio waves to identify and track objects, comprising a reader and tags, where the tags hold distinctive information that the reader can access without requiring physical contact [
24]. RFID tags can perform various functions outside of simple tracking purposes, including the use of sensors that measure one or more parameters or factors. The use of these more advanced tags is advantageous in the food industry, as they do not only identify the product or batch of products but also log important environmental parameters, such as the temperature and humidity differences during storage [
25,
26,
27,
28].
Despite the technical advantages of RFID, quick response (QR) codes and barcodes remain cost-effective and accessible alternatives for widespread use in many applications. QR codes and barcodes are inexpensive to produce and can be directly printed on product labels or packaging, whereas RFID technology requires specialized tags embedded with microchips, significantly increasing production costs [
29]. Additionally, QR codes and barcodes offer greater accessibility, since they can be read using standard barcode scanners or even smartphones, making them easily adaptable for both consumer-facing and inventory management purposes [
30,
31]. When comparing their reliability to that of RFID, these identifiers have certain trade-offs and benefits. The most obvious challenge is the line-of-sight requirement, which can limit positioning and general product handling, while reading in “bulk” might also become more difficult. RFID, on the other hand, might face signal overlap issues, while any interference from metallic surfaces or dense liquids could severely hinder the readability of radio waves [
32].
Additional wireless communication solutions, mainly used in LANs and cloud-based IoT systems, include Bluetooth, wireless fidelity (Wi-Fi), Zigbee, and near-field communication (NFC), all with different bandwidths, data rates, proximity requirements, and built-in security features [
33]. The term IoT was initially introduced to describe uniquely identifiable, interoperable connected objects using RFID technology. Over time, its scope expanded to include additional technologies such as sensors, actuators, GPS, and mobile devices [
34,
35].
IoT has been the target of numerous research articles recently assessing its applicability in the agri-food sector, generally pointing out high potential in increasing productibility, reducing waste, and improving food safety and its still comparably low adoption rate in the industry [
36,
37,
38,
39]. Collected data naturally need a server environment for storage and access, which, in the simplest case (e.g., for LANs), can be the microcontroller controlling the IoT sensors and collecting data, making the results available (e.g., via Wi-Fi connection) for LAN-connected devices via routers based on IP addresses. However, if the data are to be made visible to authorized users from anywhere in the world, the use of a public internet hosting server and domain or—as a general solution—IoT data platforms or cloud-based services could be required (e.g., Amazon Web Services (AWS), Microsoft Azure, or MQ Telemetry Transport (MQTT)) [
40]. Cloud solutions, either private or public, are becoming more widely applied due to the necessity of reliably and securely sharing large amounts of diverse data inside and across companies. Cloud computing has become a buzzword in the IT world, defined as: “a new style of computing in which dynamically scalable and often virtualized resources are provided as a service over the Internet” [
41]. This service has become a key driver of digital transformation in manufacturing enterprises, where two-thirds of surveyed manufacturing companies have adopted cloud technology and tailored it to meet their specific needs [
42]. In agriculture, however, the adoption rate, much like with other digital tools, is low [
43], partly due to lack of infrastructure to provide this service for many small producers [
44] but also to a lack of understanding of how a system like this could improve production [
41].
While advanced communication, data storage, and computation solutions are generally underutilized in the agri-food sector, sensor technologies have seen an overall better adoption rate. Sensor technology refers to the development and use of devices that detect physical, chemical, or biological changes in the environment or materials and convert these changes into (electrical) signals that can be measured, analyzed, and acted upon. Sensors can measure various parameters, such as temperature, pressure, light, motion, humidity, and chemical composition, often using advanced materials and electronics to enhance sensitivity and accuracy [
45]. Agri-food applications of sensor technologies non-exhaustively include soil quality monitoring for optimal irrigation and fertilization [
46]; gas sensing in greenhouses [
47]; biosensors to detect contaminants [
48]; proximity sensors for automated planting and harvesting [
49]; and, most commonly, temperature and humidity sensors to monitor environmental conditions during storage and transport [
50]. Imaging techniques, commonly referred to as machine/computer vision systems, have also seen several applications via the use of RGB and thermal cameras and X-ray sensors, most notably in the automatization of grading and pre-grading workloads [
47,
50].
While the most applied sensor technologies in IoT systems focus on environmental and surface monitoring, optical sensors open up the possibility of simultaneous multi-parameter assessments in food commodities, including the measurement of composition on the macro and micro level. Near-infrared spectroscopy (NIRS) is a widely used and rapidly advancing optical technique for evaluating food commodities due to its speed, non-destructive nature, and adaptability across various industrial applications [
51,
52,
53]. NIR instruments function based on the Beer–Lambert law, measuring absorption intensities as NIR light interacts with a sample, whose data are then processed and correlated with physical or chemical properties through chemometric techniques. NIR spectrometers are no longer confined to laboratory benchtop setups, as recent advancements have led to the development of portable and handheld NIR spectrometers, expanding their applications and accessibility beyond traditional laboratory-based quality assessments. Miniaturized vibrational spectroscopy devices facilitate on-site, real-time assessment of food quality and production processes in the food industry. They have been utilized for applications such as authenticating food products [
54], monitoring quality changes over time [
55,
56], and differentiating food commodities by geographical origin [
57]. These capabilities underscore the industrial value of affordable, compact spectroscopic tools, whose developments are further facilitated by the simultaneous advances in learning algorithms necessary to derive information from spectroscopic data. The application of the technique in IoT systems to monitor agricultural product quality has already been reported multiple times [
58,
59], whose use cases are predicted to multiply in the coming years [
60]. NIRS might provide a low-cost, versatile, and easy-to-use quality control solution for small producers in the future to rectify technological discrepancies along the vertical direction.
Once the right digital tools are present to build a highly automatized, data-driven production chain with multiple entities, the question of data credibility remains to be solved. The biggest challenge of agri-food supply chains is the involvement of numerous, diverse organizations—often unfamiliar with one another, distrusting, and frequently changing in composition—as well as a variety of different data sources [
61]. These data need to be collected, connected, and aggregated according to a unifying principle so that they remain credible from their origin all the way through the supply chain, ending with the consumer. The issue of profit-motivated data manipulation is well-known in the food industry, where terms like “local” or “organic” are sometimes deceptively used—a practice driven by business interests and often justified through data manipulation [
62,
63,
64,
65]. Blockchain (BC) technologies may offer a potential solution to these issues, as they are trust-proof systems enabling verifiable interactions between non-trusting parties without requiring a central authority [
66]. These systems provide cryptographically secure and immutable records of transactions and related metadata (such as origin, contracts, process steps, environmental conditions, microbial or nutritional data) that span entire supply chains [
67]. BC is a type of distributed ledger technology (DLT), a software system based on a shared database accessible to all participants. Unlike centralized systems, distributed ledgers do not rely on data stored in a single location (e.g., a server) controlled by a single entity, instead every participant maintains an identical copy of the ledger. Any data change is synchronized across all copies, allowing BC to function as a trusted third party [
68]. In a BC system, transactions between participants are permanently recorded and encrypted in units called blocks, while the computers processing the blockchain are referred to as nodes. Adding transactions involves a process called mining, which solves complex computational problems to securely add new records to the blockchain [
68,
69]. Modifying a block requires consensus from all participants, making unauthorized changes virtually impossible.
The most relevant recent articles discussing BC-based systems for food tracing include the work of Tanwar et al. (2022) [
70], where the authors proposed an InterPlanetary File System (IPFS)-based BC architecture to improve the operation of a food supply chain. The authors also evaluated the architecture by comparing various performance metrics, such as scalability and average latency, to other previously applied systems. Another example is the work of Baralla et al. (2019) [
71], where a Hyperledger Sawtooth platform was selected to provide a decentralized tracing scenario due to its modularity and emphasis on sensorial traceability, enabling an optimal balance between data authorization and public visibility. The authors found the greatest strength of the system to be the complete elimination of centralization, which fosters trust among supply chain participants. Furthermore, Conti (2022) [
72] proposes an NFC-based system for extra virgin olive oil tracing, incorporating only low-cost digital tools. The work details a system that uses smartphones with NFC capabilities at every stage of production, while creating bidirectional communication between consumers and producers. While there are additional studies available on the potential benefits of BC technologies for the agri-food industry [
66,
70,
73,
74], there are also numerous industrial applications that are already in place or under development. For example, Barilla employs blockchain to verify the origin and quality of Italian fresh basil used in its pesto products, strengthening consumer confidence. Similarly, Carrefour allows consumers to access detailed product information by scanning QR codes on labels, such as those on organic chickens or Sicilian oranges; while Nestlé has also adopted this technology to track the export flows of its Perugina Baci chocolates, helping mitigate the risks of counterfeiting [
75].
While all of these individual systems have been extensively studied in both academic and industrial contexts, to the best of the authors’ knowledge, there are no available records of combining tracking sensors and identifiers, a cloud-based IoT network, and advanced imaging and optical analytical techniques into a single track and tracing system verified by BC technology. Therefore, this study aims to fill this gap by developing the framework of a system capable of leveraging the benefits of all these components and showcasing its potential application in a model agri-food supply chain scenario.
2. Materials and Methods
Apart from the developed blockchain solution, the connecting methods and instrumentation were selected to follow standard protocols that are widely available commercially or open source for easier reproducibility.
2.1. Model Scenario: Demonstration of the Sweet Potato Supply Chain in Hungary
Due to the supply chain’s relative simplicity and its current emerging relevance in the Hungarian agri-food industry, the model product was the certified Hungarian sweet potato (Ipomoea batatas), registered as “Ásotthalmi-12”. Note that there may be a variance in the supply chain based on the exact entities involved—the current model demonstrates a case that is most representative of the actual system, with some of its steps simplified to fit into the scope of the present study. The complexity of this model comes from the aggregation steps and thereby the creation of parent–child connections. These can happen prior to each transaction step by mixing multiple batches together, where the “child” batch must be traceable back to the “parent” batches. The most relevant steps in the supply chain were identified with expansibility to other similar agri-food products in mind.
The supply chain was assessed from the point of propagation material production up until retail distribution, as summarized in
Figure 1. Primarily, the measured data consist of environmental humidity and temperature values during storage, transportation, and planting/harvesting steps. Confirming these conditions is crucial for optimal quality and shelf life. Meanwhile, manual data provision includes variety certification, delivery notes, and the recording of numerous farming characteristics regulated by the Ministry of Agriculture and audited by the National Food Chain Safety Office (according to the 4/2004. (I. 13.) FVM regulation of the Hungarian Ministry of Agriculture). These characteristics are narrowed down to field size and constitution, pesticide, and fertilizer data for the present demonstration. All of these recordings (including the ones outside of the scope of current study) are summarized in a farming diary that must be made readily available for each batch of sweet potatoes produced. The provision of this data is solely the responsibility of the producer.
The chain starts with the purchase of the certified propagation material, which is transported by the distributor. Prior to planting, the soil is prepared by irrigation and the use of polymer-based (physical) insecticide, and a stable environmental temperature of at least 15 °C is verified. Certification of variety and a delivery letter, including quantity, packaging, and transport details are included with the order. Planting is performed manually. During growth, optimal soil moisture content must be provided either via drip irrigation or the use of microsprinklers. This means saturation in the first 3 days, ~50% moisture content in the next 10 days, followed by a gradual decrease over 25 days to 30% moisture content, which is then raised back to 50% for two months. After that, irrigation is no longer required until harvest.
Tubers are harvested roughly 4 months after planting, with timing largely affected by the number of warm/hot days during the summer period and the first frost in autumn. Due to the tubers’ tendency to spread from the stem and a general susceptibility to physical damage, harvesting is performed by manual labor. After the soil is physically removed, tubers are collected and moved in shallow, perforated crates, avoiding multi-layer stacking.
During the grading process, irregularly shaped, heavily damaged, and undersized tubers (<50 g, <2 cm in diameter, and 4 cm in length) are separated as by-products, while marketable pieces are prepared for heat treatment. During heat treatment, tubers are stored in a well-ventilated and temperature-elevated room for roughly one week to facilitate skin curing and starch–sugar conversion. With proper heat treatment and environmental conditions, tubers can be stored for up to 8 months.
Palletizing is the first step where disaggregation or aggregation of different batches can happen. This is also the step where quality parameters are assessed, including starch and sugar (Brix) content. Tubers are transported in open-top, perforated crates for direct distribution or to a reseller/retail either by the producer or a transport company. A certificate of analysis accompanies the goods and the delivery note is provided at the time of transaction. The produce is sold to consumers in the same crates they were delivered in, while maintaining optimal environmental conditions [
76,
77,
78].
In summary, digital tools are used very limitedly in the current supply chain. Environmental conditions are measured, but not actively logged, physical identifiers are limited to batch labels, tracking data are unavailable, most of the soil and tuber quality parameters are assessed by external laboratories, while farming diary information is manually provided.
Figure 1 shows the extended supply chain with the proposed digital technologies to be used at each step. The technologies are discussed in detail in the following sub-sections. All the systems are connected to the same IoT network, with a mobile application front-end facing all entities who interact with the system, ensuring authorization (with varying levels of access) and facilitating data upload/query. “IoT” in
Figure 1 refers to any communication between system components, e.g., environmental data storage on the server, queries using the application, etc. Primarily, RFID is applied for environmental temperature and humidity logging, paired with GPS coordinates (where applicable) for tracking. NIRS is used for on-site soil characterization (pH, moisture) and the non-destructive quality assessment of tubers prior to transaction steps. “BC” denotes steps where a blockchain hash (digitalized fingerprint—“OnXiD”) is generated and saved together with the metadata in the developed blockchain-based system (DaTaOnX and ChainOnX). It is applied when a document or certificate is formed by aggregating previously gathered data and evaluations. The first hash is generated based on batch number when the producer obtains the propagation material. The first QR code is applied once the tubers are harvested and placed in crates prior to heat treatment storage. This is the step where the farming diary is filled and attached to the batch (QR), creating a new hash in the BC system. The farming diary template is generated by the system with already pre-filled information based on the recorded RFID and NIRS data. A computer vision system creates a semi-automatic grading process where each tuber is evaluated based on morphology and predicted mass. Inadequate samples are separated, while morphological and mass data are stored and summarized for the batch. At the palletization step, the ordered items receive a new QR code that inherits the history of all the batches that are packed together for the order, creating parent–child connections. This step repeats whenever a new pallet is formed along the chain. The last transaction step involves selling the product to consumers in containers marked with the final QR code. Consumer-level access grants a simplified certificate with a compliance list, indicating adherence to quality parameters and origin. An authority-level account gives access to all certificates and metadata linked to the QR code throughout the chain.
2.2. Radio Frequency Identification as the Applied Tracing and Environmental Data-Collecting Solution
The RFID tag used is the CAEN RT0013 Dual Frequency Rain/NFC Data Logger Tag (CAEN RFID, Viareggio, Italy), which is an optional tag that is suitable to address the issue discussed in this article. This tool is a semi-passive card format tag, meaning that it has a battery to power the sensors and has an operational lifetime of approximately one year under continuous use. It operates within a temperature range of −30 °C to +70 °C and 0–100% humidity and is capable of storing up to 4096 measurements. The reading distance for NFC/HF is approximately 5 cm, whereas RAIN/UHF technology can extend up to 5 m in free air [
79]. The tag is also easily attachable to the open-top crates commonly used for sweet potato handling.
One of the applied readers is the CAEN R1250IEB-TILE-Compact UHF RFID desktop reader (CAEN RFID, Viareggio, Italy) with an internal antenna intended for utilization in a RAIN RFID system. The device can detect and read tags from distances ranging from short to medium, approximately 0–0.2 m. The device’s compact size and USB cable connection facilitate portability, rendering it suitable for integration into desktop processes, such as tag-programming stations. The second reader is the Turck TN-UHF-Q300-EU-CDS UHF Reader (Turck Group, Mülheim-Halver, Germany). It features an integrated web server reader parameter and a web-based UHF RFID test program. The device operates within the standard frequency band in Europe and can be readily programmed with CODESYS V3 (by IEC 61131-3).
The RFID tags are programmed directly in hexadecimal numbering which displays the data in their original, untranslated hexadecimal form. It is common practice for manufacturers to provide various read/write programs or programming environments for the antennas such as CAEN RT0013-qLog-Humidity-Demo-Software_1_0_0 and Codesys.
The following steps are taken for the application and operation of the tag:
The RFID tag is placed in the reader field, which is a radio frequency field.
The tag is then excited by a signal transmitted at the appropriate frequency.
The tag then transmits its identification code, which is known as the EPC.
The reader then transmits the data to the computer.
Regarding the data, the user provides instructions to the reader via the computer.
The reader then transmits the command or data to the tag.
Depending on the function of the tag and the command issued, the tag is activated [
80].
The present study proposes a self-developed programming environment in Visual Basic within Microsoft Visual Studio to program the RFID tags. The Microsoft Visual Studio development environment uses a visual, object-based programming language that facilitates the creation of applications through a Windows-based graphical interface. However, the event-handling procedure for controls (e.g., buttons, text boxes, etc.) must be scripted in Visual Basic, employing the code editor interface that has been designed for this purpose [
81].
The program provides several options for programming the tags, and the user is first given the EPC of the tag detected within the antenna’s read area. Once the EPC is read, the tag becomes programmable as communication between the tag and the antenna is established. Commands that are frequently used, such as retrieving available tags, start and stop logging, and reset command execution, can be performed by dedicated buttons. The reader power can also be adjusted if required. The user can immediately view the information stored in the tag memory when reading a tag. In addition to the above-mentioned functionality, the interface facilitates the configuration of the current time and, if required, measurement time intervals. Furthermore, an alarm threshold can be set to detect temperature and humidity value deviations beyond critical limits, thus facilitating the identification of the stage at which such deviations occur during the process.
For the Turck reader, the CODESYS V3.5.18.30 programming interface is utilized. The system is compatible with programmable logic controllers (PLCs), allowing the environment to be controlled based on sensor data from the tags. In addition, the storage conditions can be monitored and logged continuously. Since the readers must also communicate with other users and servers, they must include a network interface and a controller.
Figure 2 shows the physical components of an RFID reader.
Both reader/software solutions allow the user to save the logged data in .txt or .xlsx format for further processing. RFID tags are used during transportation and storage, with readings taken at each stage to record temperature, humidity, and position for each batch of sweet potatoes. These data are then linked to the batch via the unique physical identifier. For a single batch of sweet potatoes, three tags are used. These tags are attached to open-top crates evenly spread in the transport and storage environment. Measurement data are stored as averages with standard deviations.
2.3. Near-Infrared Spectroscopy as the Applied Quality Assessment Technique
Spectral data of soil and sweet potato samples are acquired by the NIR-S-G1 (InnoSpectra Co., Hsinchu, Taiwan), a handheld device using a DLP micromirror array and an InGaAs detector to capture reflectance spectra in the 900–1700 nm range with a resolution of 3 nm. The device is easy to use with added Bluetooth functionality, making it convenient to transfer measurement results to a cloud-based application.
A reference database for relevant quality parameters (sugar, starch, moisture, pH) is built using standard wet chemistry methods. Carbohydrate compounds are characterized by a Hewlett Packard HP-1100 series (Palo Alto, CA, USA) high-performance liquid chromatograph (HPLC) coupled with an evaporative light scattering detector (ELSD), as the most widely applied method to analyze sugar and starch in horticultural produce [
82,
83,
84]. Soil moisture content is measured using the standard gravimetric method described by Reynolds [
85]. Soil pH is measured using a dual pH/conductivity meter (Mettler Toledo SevenMulti, Columbus, OH, USA) in 0.01 M calcium chloride solution to mimic the salt concentration found in many fertile soils [
86].
An initial spectral library is set up by measuring 200 sweet potato tubers with 3 repeated measurements taken at both ends and the middle of each sample and 3 consecutive scans in each position, resulting in a database of 1800 recorded spectra. Due to the placement of the light source–detector pair of the NIR-S-G1 instrument supporting contact measurements [
87,
88], all spectra are collected without the use of an intermediate surface (e.g., cuvette). Both temperature and humidity levels are monitored during spectral acquisition using a Voltcraft DL-121TH multi-data logger (Conrad Electronic, Berlin, Germany) to account for any significant variation in environmental conditions.
Predictive models are primarily built using partial least squares regression (PLSR) proposing a mostly linear correlation between spectral and reference data. PLSR is a widely used technique that combines elements of principal component analysis and multiple regression. It predicts or investigates a set of dependent variables by utilizing a group of independent variables or predictors [
89]. Support vector regression (SVR) is also utilized to account for potential non-linear patterns in the data by applying additional kernel functions (radial and polynomial) [
90]. All models are cross-validated using a leave-three-consecutives-out approach, while test set validation is also conducted with 20% of the data representatively selected as a validation group. Various spectral pre-treatments are also combined to highlight important variance and to account for the proposed baseline shifts and slope discrepancies caused by physical sample parameters and spectral noise. These mathematical corrections include Savitzky–Golay (SG) filtering with a second order polynomial and 21 smoothing points, standard normal variate (SNV), multiplicative scatter correction (MSC), detrending (deTr), and first (FD) and second (SD) derivatives. Models are evaluated based on error plots, model performance metrics, and the analysis of regression vectors [
91]. Model building and extraction are performed in R-project (v. 4.3.0, 2023, the R Foundation for Statistical Computing, Vienna, Austria; using R packages aquap2 [
92] and plumber). Finalized models are saved in .rds format, built into a REST API, and containerized as a Dockerfile for further use. To store and leverage models for predictions, Microsoft Azure (Microsoft Corporation, (Redmond, WA, USA)) is used. Inside Azure, a Web App service is built using Azure Container Registry to accommodate the Docker images containing the models. The API Endpoint is tested with an independent dataset, while Azure Monitor is utilized to track the performance and usage of the Web App resource.
Once the model is finalized and the NIRS device is built into the IoT system, measurement results are automatically uploaded to a MySQL database with accompanying identifiers.
2.4. Computer Vision System for Grading Based on Size and Shape
The computer vision (CV) system consists of a DFK 33UX273 color camera (Imaging Source LLC, Charlotte, NC, USA) with C-mount lens and LED illumination with 3000 K. The spatial resolution of 0.113 mm/pixel was adjusted. Images are captured on a blue background and tubers are segmented with the threshold of the blue–red color edge. The region of interest (ROI) is identified according to the segmented tuber pixels. The morphology is described with the aspect ratio calculated as length to width ratio [
93], and the circularity calculated as the area to perimeter ratio. The shape factors in combination with the segmented area are used in multivariate regression to estimate the mass of each tuber. As a result, image processing provides size (area, mm
2), aspect ratio, circularity, and estimated mass (g) data about each sample. Saved pictures are processed using Scilab (version 2024.1.0, Dassault Systèmes, Vélizy-Villacoublay, France). All measurement results are automatically uploaded to the MySQL database with accompanying identifiers through the applied IoT system.
2.5. Printed QR Code as the Main Physical Identifier Used in the System
For the physical identifier, GS1 standards are implemented to ensure compliance with global identification and traceability requirements, enhancing interoperability and accuracy across systems. GS1 is a global organization that develops and maintains standards for business communication, focusing on improving supply chain efficiency and transparency.
Each batch is tagged with a printed GS1-128 barcode containing a Global Trade Item Number (GTIN), the date of packaging, and the lot information for identification. GTINs are unique, worldwide identifiers used for product identification through barcodes. Each GTIN consists of 14 digits, divided into four parts: 1. an Indicator Digit, 2. the GS1 Company Prefix, 3. an Item Reference Number, and 4. a Check Digit. In GS1-128, the date identification number can be several different types of date specified with a prefix in brackets called application identifiers (AIs). An AI specifies the meaning of the data after the identifier in a barcode and how it is intended to be used. The GS1 types of dates are production date (11), due date for amount on payment slip (12), packaging date (13), best before date (15), sell by date (16), expiration date (17). Production date and packaging date can be used in the sweet potato supply chain. The last part of the GS1-128 barcode is the lot information marked as application identifiers (10). The format of the lot identifier is “an..20” allowing an alphanumeric data string up to 20 characters in length [
94].
GS1 Digital Link Syntax is embedded into the applied QR codes, allowing dual functionality: they serve as product identifiers (e.g., GTINs, expiration dates, batch numbers) while also linking to digital information. Using branded internet domains in QR codes reinforces consumer trust and confidence in the content being accessed, as the URL appears authentic and directly connected to the brand [
95,
96].
Due to these benefits, the present study only applies GS1 standard-based QR codes as physical identifiers. New QR codes are only placed by the producer, while subsequent participants (resellers) may update the code if batch aggregation is necessary (palletizing). QR codes are placed on the side of open-top crates containing the produce. These crates and their content remain unchanged unless aggregation is unavoidable.
2.6. The Cloud-Based IoT Communication System Used
Due to the operating characteristics, availability of interfacing documentation and microcontrollers, and affordability, Bluetooth and Wi-Fi technologies were chosen to make up the bulk of the communication system. For the physical realization of the IoT elements, Arduino WiFi (Arduino R4 (Somerville, MA, USA)) and ESP32 (ESP32-WROOM-32S (Espressif Systems, Shanghai, China)) microcontrollers are used in the pilot project.
As the simplest configuration and software solution for non-contact extraction of the actual measured results of an IoT module, the host server feature of the microcontroller can be used. An IoT module consists of a sensor and a connected ESP32 board with a battery supply. The “sensor” in this case refers to the entirety of the local data-gathering solution, e.g., the combination of the RFID tag, the reader, and the middleware for the RFID solution, as indicated in
Figure 2. The ESP32 controls the sensor via an I2C interface link. The ESP32 establishes a Wi-Fi connection to the available Wi-Fi router (based on identification parameters), which assigns it a local area network IP address (e.g., 192.168.1.10 in this case). The microcontroller creates an HTML-based virtual interface where the measurement results from the sensors, obtained via the I2C interface, are entered. The ESP32 requires a file system (data storage) to store the measured values (e.g., temperature and humidity) and the HTML file containing graphical elements for display. This setup enables on-demand access and visual evaluation of the measured data from any connected IoT module based on its IP address. The cloud-based data storage solution that accepts sensor data from the ESP32 module is built using Microsoft Azure (Microsoft Corporation, Redmond, WA, USA). The Azure Database for MySQL serves as the central storage solution for structured data. Data are sent to the Azure-hosted endpoint via PHP requests as summarized in
Figure 3.
2.7. DaTaOnX and ChainOnX as the Developed Blockchain Solution for Validation Processes
Due to the protection of business know-how, we will present only the key elements of the developed concept without detailing the technological specifics.
The BC solution presented in the article is based on the Hyperledger Fabric Enterprise-permissioned blockchain, managed by the Linux Foundation, a technology also referred to as “decentralized trust” [
97]. This technology allows all participants authorized by the collaborating parties to take part in blockchain-based authentication. This allows the stakeholders within a supply chain (or selected participants) to collectively ensure authentication without the absolute need to involve a “single source of truth” (an organization authorized or designated by law) as the certifying entity. This creates an opportunity for the participants of a supply chain (or selected entities among them) to ensure the authenticity of the data generated within the supply chain themselves. The present system, however, also involves a regulatory authority overseeing the supply chain (National Food Chain Safety Office, Hungary).
Blockchain-based data authentication is provided by the OnXID-based data authentication solution of the DaTaOnX system [
98]. This system authenticates data, documents, and files from various sources by generating unique hash values (known as OnXIDs) for them and storing these, along with associated metadata, in the DaTaOnX blockchain system, without the storage of actual raw data. During authentication, the data or document typically remains within the IT system where it was created. As a result, other participants in the supply chain cannot access it until a necessary interaction between participants (e.g., the transfer of goods) involves sharing the digital data or document with the relevant partner. The authenticity of any data or document can be verified by any participant in the supply chain who receives it (via the API interface) and holds the necessary permissions within the DaTaOnX system to perform the verification. The organization that produces and authenticates the data determines who can verify their authenticity. It also enables the intentional publication of specific information (e.g., origin details), allowing all customers and consumers to verify its authenticity. The system supports multiple authentication channels simultaneously, allowing producers involved in multiple supply chains, producing various commodities, to authenticate data for specific products intended for specific supply chains without exposing them to participants in other supply chains.
OnX identifiers (OnXIDs) are generated from raw data sources and their associated events and are stored in the DaTaOnX blockchain database. Their content is pre-defined to ensure interoperability but can include customizable sections tailored to specific use cases. OnXID generators are currently developed as open-source software code with public documentation, freely available for use and integration into users’ internal systems and solutions in the future. Communication between OnXID generators and the DaTaOnX system is successful only if the relevant OnXID generator sends the appropriate user and security credentials to the central system. An OnXID is composed of a unique hash value characterizing the data and the following fundamental information associated with the data’s origin:
Unique identifier of the data owner.
Timestamp of data creation.
Timestamp of OnXID generation.
Unique identifier of the device/software/person recording the data.
Data-recording location (GPS coordinates).
Data accuracy rating.
Data Trust Reach (DTR) indicator.
License classification.
Business classification.
DaTaOnX channel identifier.
The core of the OnXID is the hash generated from the data, specifically using the SHA-256 algorithm [
99]. This 256-bit identifier is defined by strong collision-resistance properties, making it almost impossible to find two inputs that result in the same hash output, while a single bit change in the input results in significant changes in the hash value. The uniqueness of the OnXID is further reinforced by metadata describing the data stored in the blockchain, enabling the unique hash creation for discrete values (e.g., measurement results). Supplementary identifiers are also linked to the OnXID identifier generated for the data and are stored separately and independently. As a result, during the verification of data authenticity or immutability, the verifying user can only access and handle those aspects of the data for which the data owner has granted specific rights. Supplementary identifiers used in the present pilot are the OnXTRACK, responsible for logging changes to the original data (e.g., version updates) and the verification of their authenticity, and the OnXSC, a “smart contract” that describes and integrates the connections within a supply chain.
The farther and later the OnXID is generated from the data’s point of origin, the greater the likelihood of data modification or manipulation. To address this, a Data Trust Reach (DTR) indicator has been introduced and integrated into the OnXID. This metric indicates both the physical and the time distance of data authentication from where and when the data were created. Its values are as follows:
OnXID generation occurred within the data-generating device.
OnXID generation occurred when the data entered the first communication channel.
OnXID generation occurred within a data integrator device/solution.
OnXID generation occurred before the data were first stored.
OnXID generation occurred using an external solution based on data authenticated at the time of its first storage (e.g., digital signature).
OnXID generation occurred using an external solution for data authenticated over 2+ years ago (e.g., digital signature).
OnXID generation occurred retrospectively for data in a database unchanged for 2+ years.
OnXID generation occurred retrospectively for data in a database unchanged for 1+ years.
OnXID generation occurred retrospectively for data already stored but unchanged for 1+ years.
The dataset is not authenticated.
For points 7–9, the immutability of the dataset must be verified through data backups and comparisons. The current system, by default, embeds the OnXID generator code snippet directly into the firmware of IoT modules. As a result, data originating from these IoT devices achieve the highest possible authenticity score, rated 1.0. In the case of continuously recorded data (temperature, humidity) the system does not authenticate each measurement individually. In this case, data are accumulated in the IoT module and aggregated at the end of the supply chain step. Data packages are then sent to the generator for authentication. This ensures efficient and secure data validation while maintaining the reliability of the system.
OnXID and its supplementary identifiers are stored in the DaTaOnX blockchain system in an immutable manner. This is based on a consensus mechanism, which not only chains the data together but also requires storage on a minimum of three independent blockchain validator node servers. To ensure this, DaTaOnX utilizes a multi-channel validator node server system, allowing participants to form or join validator groups composed of entities they know and trust. These groups can include collaborating companies, regulatory authorities, or government entities that the users of the specific authentication channel collectively trust. When generating an OnXID, the channel identifier needs to be given that will designate it to the blockchain authentication channel where it will be stored.
The verification of data authenticity or immutability is based on generating a new OnXID from the data received by the user through standard channels (interface, data transmission, email, etc.). During this process, the user employs the same OnXID generator as the one used by the data producer during the original data’s authentication. If the data are unchanged, the verification OnXID will match the one stored in the DaTaOnX blockchain repository. If the system finds the user-submitted verification OnXID in the blockchain repository—and the consensus mechanism within the authentication channel also confirms its immutability—the system validates the data. The BC-based system and its connections to the IoT module (RFID) are summarized in
Figure 4.
The DaTaOnX data management system is designed with high levels of security by implementing closed, encrypted data processing and incorporating security mechanisms based on vulnerability assessments, making it resistant to external attacks and unauthorized access. The system is planned to be publicly available as a service, with guaranteed uptime and a scalable infrastructure that enables continuous and reliable operation, even under high data processing demands. Due to the use of flexible APIs and interfaces that comply with industry standards, the integration of the platform with other systems should be easy to achieve, which ensures seamless data exchange and compatibility with various enterprise and supply chain solutions.
3. Results
As mentioned in
Section 2.1, the system detailed in the present study is designed to be a solution that can be easily implemented for most agri-food products. The interactions in the system can be divided into three main categories depending on the goal of a certain actor–information interaction:
Measurements and data provision steps to ensure quality requirements are met.
Data certification steps to ensure information credibility.
Tracing interactions to ensure identification of goods.
The main difference between how value chains are built for a particular product is which actor carries out certain steps and how the overall data and time efficiency is achieved. For example, applying multiple QR codes on one container can lead to confusion and a disruption in the traceability chain if not handled appropriately, and the protocol of information flow is overcomplicated. Therefore, a principle of parsimony is applied to minimize uncertainties, leading to the use of appropriate instruments, data formats, sampling plans, and so on. Also, the interactions are considered for different actor arrangements, such as individual information management (no direct interaction between stakeholders), joint information management (two or more stakeholders interacting directly), or external information management (an external third party, such as legislators or data repository providers, supply or draw information or other resources for data management purposes). The model system is designed to cater for all possible combinations of different actors’ interactions and the above-mentioned three steps.
3.1. The ChainOnX Solution for Sweet Potato Supply Chain Tracking and Tracing
The developed BC-based track and tracing system, named ChainOnX, is summarized in
Figure 5, with the individual sub-systems specified in the following sub-sections. The system builds upon the DaTaOnX solution, as described in the
Section 2.
The essence of the ChainOnX system lies in linking the previously described OnXID authentication data to a unique or uniform identifier for bulk products (sweet potato batch) originating from a single location or producer. This ensures that all data and documents generated at each stage of the product’s journey are connected through an identifier (LinXID) in the blockchain repository. For traceability within the system, instead of storing the complete dataset (e.g., a full GPS tracking dataset) in the blockchain, an accumulated attribute identifier (AcAtXID) is securely stored, which verifies compliance with specific rules derived from cumulative background data. Cumulative background data include data types that are measured at multiple stages:
GPS coordinates for the harvesting and storage locations, which verifies the region of origin.
Environmental humidity and temperature measurement values, which verify the proper handling of the batch.
NIRS measurement values (pH, moisture, sugar, starch), which verify the quality of the produce and proper cultivation conditions.
Attribute values stored within the AcAtXID are defined using Smart Attribute Definitions (SADs) recorded in blockchain smart contracts (as part of OnXSC), ensuring immutability and transparency. Changes to attribute definitions or values require consensus among supply chain participants, including the regulating party, ensuring transparency for all members of the system, including the consumers. If source data are unavailable due to technical reasons, authorized users (e.g., inspectors) defined in the SAD can assign values manually. These manual entries are recorded and distinguished in the blockchain, linking the input to the individual responsible for accountability. This hybrid approach ensures flexibility for producers without adequate data sources (e.g., not having access to one or more IoT modules) while maintaining integrity. All data provided by actors and IoT modules go through the same IoT system, except for the authority, who has access to the smart contracts of the BC system. This way only the authority has the right to change the system requirements.
The system allows for unlimited data and data sources to be associated with a product. Compliance certifications are also immutably recorded with the approval of supply chain participants. These certifications can either be automatically generated based on AcAtXID or manually provisioned through verified personnel. If a document is uploaded manually (e.g., as a PDF), its authenticity is verified using the DaTaOnX system’s OnXID-based hash + metadata authentication. This ensures that every participant in the supply chain can validate the document’s originality. Manual provision is mandatory for the first certification ensuring propagation material quality, as that is the first hash in the BC system without cumulative background data. This approach ensures both flexibility and rigorous traceability, adapting to the technical capabilities of producers while preserving the integrity of the track and tracing system.
The blockchain smart contract also defines the data requirements for participants, including the conditions the produce must meet during its cultivation, storage, transportation, and certification (quality control) processes. A smart contract is a self-executing digital “contract” stored in the blockchain that can only be modified by authorized supply chain participants, more specifically, the regulatory authority (National Food Chain Safety Office in the present case). “Self-executing” means that the system ensures that certifications cannot be attached to a given batch unless the required data are complete and comply with the pre-defined standards and structure. It also means that, upon meeting the conditions stored within the smart contract, the system automatically executes compliance confirmation, reducing the risk of human error.
Since a mass-produced product, like sweet potato, is not sold as a whole but in smaller packages, it is important that the tracking data associated with it can also be inherited by the identifiers of the new products. This is implemented using a specific identifier (SubXiD), which connects the total quantity produced or harvested in a specific area to its smaller packages, ensuring that the data of the original batch are inherited. If the subsequent stages of tracing only require aggregated or attribute-level data to be shared (final hash at the distribution stage), the smaller quantities are only linked with AcAtXID identifiers. These identifiers do not carry all detailed data but provide the ability to trace back to the underlying records, ensuring flexibility and efficiency in data management.
3.2. Demonstration of the Application Back-End (Data Model)
Figure 6 illustrates the data model, which shows the linkages between events, actors, and products across the database tables. Actors are identified by an ID number which links them with objects, while their natural name and additional description are also recorded. If an actor is located on a site, the site ID is adjusted as well. Events are recorded in a separate table, capturing production events on sites, as well as quality assurance events (measurements). All measurements are saved in binary format, compatible with the respective devices, and include a checksum to ensure data integrity within the system. The product unit is split into two tables in the database since units are reorganized along the chain. Each unit may have parents (in batch, on site, during logistics) and child units as well, creating a hierarchical relationship. This relationship helps with QA data assignment to all units in a container and improves traceability. The container relationship is time-bound, therefore the timeline of each product unit can be produced to be reconstructed. Measurements are conducted at the container level, with the container treated as a unified entity. All events associated with the container are automatically inherited by its subordinate (child) elements. This hierarchical structure eliminates the need to individually link every measurement to each individual unit (e.g., every box).
3.3. Communication of the System Components and Users
Figure 7 illustrates the core trust model of the system, outlining the main responsibilities of system users. The root trusted accreditation organization (TAO) assigns the sub-TAO to audit the track and tracing system. Outside of the regular audits of individual participants, the main responsibility of the sub-TAO is the creation and maintenance of the smart contract that is the base of the BC system and defines the responsibilities of each participant. It also serves as a template for which data and in what way need to be supplied by participants, while serving as an automation tool, ensuring that only the right data format is accepted by the system as compliant. The sub-TAO also has the right to verify system identifiers, such as the OnXID.
The main responsibility of the trusted issuers (producer, reseller/retailer, and optionally the transporter) is the provision of data in the required format. This includes manual data provision (mostly for the farming diary and certain certificates), NIRS and CV measurements, and the monitoring of the passively generated measurements of the IoT system. They are also required in the collective verification of OnXIDs.
Figure 8 shows possible interaction schemes of the different entities along the value chain, with diverse interaction–actor combinations. In general, trusted issuers are primarily responsible for data provision and authentication with the “Inspector” being a specially appointed user among these entities with distinct authorization for validated manual data input. The producer is the only actor with permission to generate and assign new QR codes, with subsequent resellers having only the option to update these codes. Trusted issuers collectively take part in OnXID verification. Consumers have read-only access to the summarized attributes of the distributed (final) products, the QR codes of which are no longer further updated. The “Admin” is an actor with the sole responsibility of maintaining the system on a technical (physical) level, which includes scheduled server maintenances, the registration and monitoring of IoT devices, and the setup of authorization levels. The “Authority” actor’s primary interaction is the creation and update of the smart contracts defining system requirements for other entities. This actor also has the right to query all OnXIDs and associated metadata created in the system that belong to a specific batch.
3.4. Demonstration of the Application Front-End
In the case of DaTaOnX, a REST API interface enables the blockchain-based OnXiD authentication to be integrated into the IoT system. The front-end involves a web-based interface that differs based on the level of access, reachable via personal computers and smartphones alike. Smartphone access is also granted via scanning the QR code attached to the product. Consumers can access the interface without specific authorization by scanning the final QR code. Consumer-level access only gives an easy-to-follow summary of compliance regarding the most important parameters, including:
Food safety and expiry date check. Clicking the icon also provides details of the producer.
Origin (country/region) with a map view. Variety confirmation.
Compliance with the standard macronutrient profile of sweet potatoes. Clicking the icon gives an average macronutrient profile.
Additive/allergen status. Green = safe, yellow = caution, red = prohibited.
Additional optional certifications, including BIO/sustainability/Fair Trade. Clicking the icon reveals the certifying authority.
This approach ensures that the interface remains user-friendly while providing essential, actionable information, increasing consumer trust. An example of the consumer front-end is shown in
Figure 9D. Trusted issuers, following authorization, have access to IoT modules that are linked to them in the system via an IP address. This way, real-time measurement data can be accessed for monitoring and anomaly detection purposes (
Figure 9A–C). The authority can also readily access this information alongside stored identifiers and metadata.
4. Discussion
The results presented in the study demonstrate that advanced digital solutions could enhance food traceability by improving quality assessment, tracking capabilities, transparency, and real-time monitoring throughout the supply chain. It was also observed that several affordable tools are available to build such systems that could help with automation and the reduction of human error, alongside the obvious benefits of increased trust between participants. This trust naturally involves consumers, as the most important actors of the system, by reducing the risk of deception and safeguarding human health. While challenges such implementation costs and regulatory compliance remain, the potential benefits underscore the importance of continued investment in these technologies to meet evolving consumer demands for safety, transparency, and quality assurance in food products.
Baralla et al. (2019) [
71] similarly presented a track and trace agri-food system using Hyperledger Sawtooth, an open-source blockchain-as-a-service platform. The authors found the primary advantage of the system to lie in eliminating centralization, which enhances trust among supply chain participants. On the other hand, a notable drawback was identified as the low maturity of the Sawtooth platform, resulting in limited resources and applications. The article, while sharing valuable findings, only focuses on the blockchain system, without addressing its connections to additional digital tools. The Hyperledger Fabric architecture presented in this article is more favorable for identity protection and management, while also having better scalability, which could be necessary for more complex supply chains. Tanwar et al. (2022) [
70] also proposed an IPFS-based blockchain solution for food industry track and tracing. The developed system was tested and even compared to other “conventional” blockchain solutions, showing a favorable performance in scalability and latency. The authors, however, do not discuss exactly to what systems the comparisons were made, while, once again, the development only focused on the BC system without discussing any of the connecting parts. As the article also included a review of the current state of BC systems in the agri-food industry, the authors identified the main challenges of widespread application, namely: privacy, scalability, security, smart contracts, lack of standardization and regulations, data storage capacity and costs, and throughput.
The system discussed in the present article tries to solve many of the above-mentioned challenges, with a heavy focus on proper identity management and scalability warranted by the Hyperledger Fabric architecture. The system also uses and tests smart contract methods, which are identified as necessary as a route forward to secure automation [
100,
101]. For the reduction of data load, the system only stores metadata and the corresponding unique identifiers, such as the accumulated attribute identifiers for cumulative background data. These identifiers do not contain all the detailed data themselves but enable tracing back to the associated underlying records as an efficient solution whenever the subsequent stages of tracing only require aggregated or attribute-level data to be shared. The present study also tries to discuss multiple parts of the whole picture, including the proposed data-generating and management tools that are an essential part of any BC-based track and tracing system. There are still a number of limitations to the current study. First and foremost, standardization remains the main challenge, despite the efforts to develop a flexible system. For that to improve, numerous pilot tests should be conducted for various agri-food commodities with actual industrial partner involvement. This is also essential to measure the exact impact of such a system on supply chains and to identify any defects or anomalies during its use.
Looking ahead, further advancements in technology integration are essential for enhancing food traceability systems. The convergence of AI with existing technologies like IoT and blockchain could provide even more robust solutions for predicting trends and improving decision-making processes within the supply chain. Smartphones could evolve beyond basic system interactions to become reliable tools for data authentication and input. For DaTaOnX, a user interface is currently under development that will also be accessible on mobile devices, allowing users to authenticate data, photos (including verification of where they were taken), documents, and more via an AI-based machine vision solution. Furthermore, optical analytical techniques are seeing an increased trend towards miniaturization, which does not stop at the level of palm-sized spectrometers. There are already numerous studies assessing the feasibility of integrating NIRS devices into smartphones [
102,
103,
104,
105] as an affordable and readily available quality assessment tool that could eventually allow consumers to validate product quality themselves.
The developed system could also potentially be integrated with agricultural machinery, which generates a significant portion of raw data related to food production. Today, every modern agricultural machinery, such as harvesters, sprayers, monitoring drones, etc., is equipped with a GPS tracking device, which provides precise information about their operations including when and where they were used. Most modern machinery uses the ISOBUS protocol as a standardized solution to control its operations, allowing operators to input and output additional data. By authenticating these data, it becomes clear what specific tasks (e.g., spraying) were performed by the machinery on a given plot. Using LinXiD, these data can be connected with spraying and farming diary records to provide detailed information on how the crop was produced. Since harvesting and transportation machines are also equipped with GPS devices, authenticating their data and linking them to the verified production data of the crops grown on a given plot ensure traceability of the batches delivered to storage. This could also serve as an additional trust factor in the bioeconomy.
The boundaries of a specific plot and the crops produced on it must be recorded in the farming diary. In the future, the reliability of this process could be enhanced by implementing authenticated queries to agricultural parceling systems (like the Hungarian MePAR) for accurate mapping and verification of plot data.
As has been demonstrated, throughout the production process, several key data sources were identified that are currently issued or accepted as authentic only in document format, including origin/type and organic certifications. Without an electronic authentication system, these documents are currently at high risk of being tampered with. The currently developed DoqTRUST file authentication module of the ChainOnX system allows the document—once authenticated—to be shared through traditional channels (e.g., email), and its OnXiD identifier can be referenced in subsequent processes. A digital signature ensures the document’s connection to a specific individual or organization, while the OnXiD identifier integrates it into supply chain operations and traceability. For physically signed documents to be used authentically in the supply chain, however, validation of their presumed authenticity can be achieved using a machine-vision-based solution, for example. In this approach, only pre-trained formats (e.g., those issued by the official authority) are uploaded to the system. The system analyzes the document’s format, other identifiers (e.g., stamps), and the presence of a signature to validate its authenticity. While this method does not provide legal guarantees, it significantly enhances the credibility of paper-based documents in digital applications.
All of these solutions could be applied individually or as an integrated system to improve the general low levels of digitalization of the agri-food industry. The current lack of consumer trust in food commodities, the increasing pressure of global population, and the necessity to improve the connections between agriculture and the food industry all stress the urgency of developing industrially applicable and affordable track and tracing solutions. The current study proposes the combination of several systems that have already proven their benefits in industrial settings individually. The authors believe that the present demonstration could serve as a basis for much needed additional research to further solidify the optimal framework of such a system. The extension of the system cross-border with the collaboration of multiple countries could also significantly improve the transparency of supply chains, paving the way for a future of entirely fair and authentic markets.