Skip to main content
Have a personal or library account? Click to login
Revolutionizing Tunisian Agricultural Traceability with Blockchain: Exploring Aries and Ethereum Solutions Cover

Revolutionizing Tunisian Agricultural Traceability with Blockchain: Exploring Aries and Ethereum Solutions

Open Access
|Feb 2025

Full Article

1
Introduction
1.1
Context and Motivation

Global climate change (e.g., drought, extreme weather conditions, forest fires, seasonal temperatures), the impact of political unrest (e.g., reduced fertilizer exports), and supply chain disruptions affect food production. It is estimated that by 2050, food demand will increase by 70% while the world population will reach nearly 9.1 billion [1]. These changes require optimal use and conservation of existing resources. To this end, the protection of plants from diseases is of paramount importance. This is one of the main factors that contribute to reducing waste in agricultural production[2]. Although popular and easy, traditional methods of detecting disease through observations with the naked eye are insufficient to determine disease[3]. Generally, it takes time, effort, experience, and knowledge of plant diseases. In addition, large numbers of workers and material costs may be required on large farms [4], [5]. Expert identification of plant diseases involves several methods related to leaf shape, tree trunk, and fruit shape [6]. In addition, possible diseases may be manifested by changes in leaf or fruit color or the appearance of spots [7]. Thus, leaf images usually carry significant clues about the disease status of the tree. Therefore, it is possible to use these images to determine the type of disease and treat the plant before the appearance of irreversible damage or yield loss [8].

Artificial intelligence is used in various fields and applications. AI has applications in various fields, such as industry[9] (including Industry 4.0, automotive and home automation), Finance [10] (anti-fraud, trading and financial consulting), Sport [11] (data analysis and player performance) and medicine [12] (diagnosis, manipulation, and data processing support). AI has also proven useful in making difficult tasks easier in fields such as metallurgy, mechanics, and agriculture. Leveraging innovative technologies addresses these challenges effectively. AI boosts disease detection and management efficiency and accuracy. Blockchain technology began with securing cryptocurrency transactions. Now, experts are exploring its ability to improve agricultural supply chain transparency and trust. The Hyperledger Aries blockchain technology and AI come together. They create a system ensuring complete traceability of data points. From detection to analysis, every step is traceable. This system ensures the transparency and immutability of information, while AI, integrated into the detection process, accurately distinguishes infected sheets from healthy ones. Additionally, the integration of blockchain technology with unmanned aerial vehicles in smart cities, as discussed by Shah et al. (2024), highlights the transformative potential of blockchain across various sectors, including agriculture, to enhance instant data collection and analysis and secure data storage [13]. This multidisciplinary approach, combining blockchain and AI, provides a robust solution for sustainable agriculture, enabling rapid and targeted responses to disease threats while ensuring data integrity.

By leveraging AI algorithms and neural networks, deep learning has enabled the analysis of large amounts of agricultural data collected from images or sensors, such as soil temperature and humidity, among others. These sophisticated analyses extract valuable information, enabling farmers to make data-driven decisions to optimize crop yields, detect plant diseases, and manage resources more efficiently. In the context of our work, the use of deep learning in agriculture aligns with our goal of improving the efficiency and traceability of agricultural data, demonstrating the immense potential of AI in this area.

Plant diseases, if misidentified or ignored, can significantly reduce production levels and harvest quality, hence in this work we presented a solution that combines learning-based image processing deep, Hyperledger Aries blockchain technology and the Internet of Things (IoT) to achieve smarter control and traceability of agricultural data, which in turn will allow rapid control thus leading to more sustainable and secure agriculture.

1.2
Context and Motivation

Our approach introduces several essential aspects and innovative elements to the agricultural sector:

  • Implementation of Blockchain Solutions: We utilize the Ethereum blockchain for its transparency and data immutability. Hyperledger Aries adds a layer of security. This dual-blockchain approach ensures the integrity of agricultural data.

  • AI-Driven Disease Detection: Artificial intelligence is essential for detecting plant diseases. It analyzes images and sensor data to pinpoint infections early. This technology enables rapid and accurate diagnosis.

  • IoT for Real-Time Monitoring: The Internet of Things devices capture information about soil conditions, moisture levels, and more. They allow for the continuous monitoring of agricultural environments. This ensures timely intervention.

  • Comprehensive Data Traceability: Each stage, from identifying diseases to managing crops, is logged onto the blockchain, ensuring a transparent and tamper-proof record available to all stakeholders.

  • User-Friendly Applications: We develop web and mobile applications that offer easy access to agricultural data. These platforms are designed for farmers, distributors, and experts. They make complex data understandable and actionable.

  • Proactive Agriculture Management: Our system does not just react to problems. It anticipates them through real-time data analysis. This leads to smarter, more sustainable farming practices.

  • Transparent Supply Chains: By documenting each step in the supply chain, we build trust among producers, distributors, and consumers. This transparency ensures the quality and origin of agricultural products.

  • Collaborative Ecosystem: Our approach fosters collaboration between various agriculture stakeholders. It bridges the gap between technology and traditional farming, paving the way for innovative agricultural practices.

These elements combine to redefine agricultural traceability. They create a system that is not only more efficient and secure but also more aligned with the needs of a rapidly changing world. Our vision aims to transform the agricultural sector into a more sustainable and productive industry.

1.3
Structure of the Article

This article is structured into four sections:

  • Related Works: In this part, we describe the literature of smart agriculture not only in the deep learning field but also in blockchain.

  • Proposed Approach: In this section, we describe the proposed approach for the AI & Blockchain hybrid platform.

  • Results: In the third part, we highlight the various results using both AI and the different Blockchains implemented, namely Ethereum and Hyperledger Fabric.

  • Conclusion & Perspectives: This section comprises the summary of the paper as well as the prospects of this work.

2
Related Works

This section presents a detailed review of current research and advancements in applying artificial intelligence to smart agriculture, along with the integration of blockchain technology to enhance the traceability of agricultural practices.

2.1
Smart agriculture and deep learning

Artificial Intelligence is becoming increasingly versatile in the creation of intelligent and practical applications with significant benefits. In particular, recent progress in deep learning has enabled the development of sophisticated models for image classification and analysis [14], [15]. Convolutional neural networks (CNN), a subset of deep learning algorithms, are particularly effective in identifying features within images without requiring explicit feature extraction or complex image processing techniques[16].

Deep learning has been applied in various fields, including agriculture, where its advanced image processing capabilities have proven highly beneficial. Convolutional Neural Networks (CNNs) are widely used in agricultural research, particularly for plant and crop classification. These applications play a significant role in yield prediction, pest control, disaster monitoring, and automated harvesting. Identifying plant diseases manually is a time-consuming task, but artificial intelligence advancements and image processing techniques now allow for efficient disease detection. Typically, plant disease detection models rely on leaf shape recognition and image classification[17]. In this regard, the Berkeley Vision team developed a deep learning-based framework for plant disease detection. This model can recognize 13 different plant diseases and distinguish plant leaves from their background [18]. Another study demonstrated that a deep learning model could achieve 95.8% accuracy in plant disease detection after 100 training iterations, with further training increasing accuracy to 96.3%, surpassing manual disease detection [19]. Image recognition techniques are used to analyze various plant characteristics, making CNNs highly effective for weed detection and plant classification [20].

In 2017, a new method combining CNN learning and the K-means clustering algorithm was introduced to identify and classify weeds, improving identification accuracy to 92.89% [21]. Additionally, AlexNet, a pre-trained CNN architecture, is commonly used for plant classification. Research conducted at the Technical University of Istanbul showed that CNNs outperform other machine learning algorithms based on handcrafted features in distinguishing plant phenological stages [18]. Furthermore, Dubey and Jalal [21] integrated image processing and artificial intelligence techniques to classify fruit images into four categories (spotted, rotten, scab, and healthy), achieving 93% accuracy. K-means clustering was used for image segmentation, extracting four key features: the global color histogram, color consistency vector, local binary pattern (LBP), and full local binary pattern. Classification was performed using a multi-class support vector machine (SVM). In a follow-up study, the same set of features improved accuracy to 95.94%. Other studies have focused on fruit quality assessment using CNN models, such as classifying apples into high, medium, or low quality based on image analysis [22]. Similarly, Esgario et al. [23] developed a CNN-based approach for classifying and quantifying biotic stress in coffee leaves. Their model diagnosed and measured the severity of four coffee diseases, employing various data augmentation techniques to enhance diagnostic accuracy.

A deep learning algorithm for cassava disease detection based on image analysis was proposed in [24]. The authors applied transfer learning using a pre-trained CNN model to develop a linear classifier, an SVM, and a K-nearest neighbor (KNN) classifier trained on a dataset of cassava disease images collected in the field. Their best model achieved an average accuracy of 93% across three diseases and two pest types. A similar approach has also been explored for cassava disease detection and diagnosis [25]. Tomato cultivation has garnered significant research interest, leading to multiple techniques for diagnosing tomato plant diseases [26], [27], [28]. A diagnostic approach for maize leaf diseases was proposed in [29], utilizing a dataset captured with a smartphone camera to train a custom CNN model. High accuracy was achieved despite the limited number of test images. Similar CNN-based approaches, whether trained from scratch or using transfer learning, have been proposed for classifying diseases in apples [30], [31], grape leaves [32], and potato plants [33].

2.2
Blockchain

Blockchain is a technology that allows the storage and transmission of information in a transparent, secure, and confidential way. It is a database that contains a history of all the exchanges made between different users. It is secured, distributed, and shared by different users without intermediaries, which gives access to each to check the validity of the chain [34].

The blockchain adopts reliable and confidential transactions and can be used in:

  • Transmission of securities (currency, funds, stock exchange products, etc.) [35]

  • Supply chain to ensure product traceability [36]

  • Protection of confidential information (e-voting, e-health, certificates, etc.)[37], [38].

The characteristics of blockchain technology are:

  • Disintermediation: The first feature of blockchain is to give users the confidence to make transactions without being followed by an intermediary. The blockchain allows everyone to control their transactions and verify them [39].

  • Transparency: If a file is saved on the blockchain, it cannot be modified. Each user can download the blockchain and check its reliability at any time. This is why blockchain is characterized by transparency. Current and past transactions are visible to all blockchain users. It also allows you to track monetary transactions and amounts [34].

  • Independence: All the nodes of the blockchain system can access, update, transmit, and store data in a secure way [39].

  • Security: In blockchain, all blocks are replicated across network nodes rather than individual servers. This decentralized architecture serves as a structural defense against the risks of data theft. Blockchain technology ensures the security of recorded information. These records are considered immutable: once stored, they are retained forever and cannot be easily changed [34]. To overcome security challenges, various blockchain-related solutions have been proposed in the literature [40], [41]. These solutions discuss the importance of security and privacy in healthcare systems and present the benefits and challenges of using blockchain as a solution for healthcare systems. Farooq et al. [42] illustrate the need to protect data privacy in IoT-enabled healthcare systems. Kumar et al. [43] proposed a method of secure data sharing by combining the allowed blockchain technology and smart contracts with deep learning techniques. Turjman et al. [44] presented the impact of blockchain integration in the medical field to address many issues, such as security, confidentiality, and ownership of medical data. Sengupta et al. [45] discussed the benefits of smart contracts to protect private information and different methods to better decode blockchain technology.

There are many types of blockchains, for example:

  • Public Blockchain: The public blockchain is the historical blockchain. It is a blockchain to which anyone in the world can read and send transactions. Such transactions are supposed to be included in the registry, at least when they obey blockchain rules. It is a decentralized network that works like a peer-to-peer network in the sense that there is a transfer between two users without the presence of an intermediary, such as the Bitcoin blockchain [46].

  • Private Blockchain: They operate on a fully controlled network where block validation is done by known validators. There is a kind of centralized control that decides who has the right to participate or not in block validation, and the number of block validators is much lower than that of a public blockchain, so no one can participate without having received prior authorization [47].

  • Consortium Blockchain: Consortium blockchains are semi-decentralized. They are not controlled by a single entity but rather are governed by a group of individuals or entities from different sectors following public blockchains that are decentralized and without authorization[48].

Blockchain has become ubiquitous in various sectors such as education, agriculture and health. The use of Blockchain in the financial field has become very useful, which leads to the emergence of a new type of inclusive entrepreneurship. [49].

In addition, blockchain technology offers great potential for a range of activities in the manufacturing industry. To understand the relevance of blockchain in the industry, especially in Industry 4.0. In [50], Attran et al. proposed an approach that highlights the potential of blockchain in the industrial sector, and they found that it is essential to use data extracted from sensors for blockchain-protected applications. Technology with the Internet of Things.

For Industry 4.0, blockchain [51] can do the following:

  • Ensures the tradability of products and materials throughout the supply chain.

  • Improve data security.

  • Decentralize the management of digital identities.

  • Automate processes with smart contracts.

2.3
Using Blockchain in Intelligent Agriculture

Blockchain technology offers solutions to several problems in smart agriculture, making farming more modern and less expensive. Among other benefits, it simplifies agricultural supply chains, improves food security, and enhances market transparency.

Table 1 illustrates how researchers implemented these benefits.

Table 1.

Blockchain applications in smart and sustainable agriculture

Blockchain use casesDescriptionCategoryPlatform
Distribution of egg [52]Followed by the distribution of eggs from farms to consumers.TraceabilityHyperledger Sawtooth
Brazilian grain export [53]Assist the producer in Brazil to track grain for global exporters.TraceabilityHyperledger Fabric
Agri Block IoT [54]Data traceability through IoT sensorsTraceabilityEthereum
Intelligent greenhouse [41]Greenhouse control and plant growth monitoring via user-friendly interfacesTraceabilityEthereum
Smart watering system [42]Integration of a fuzzy logic decision system with blockchain storage for privacy.Smart farmingCustomized (Java)
Our approachTraceability of agricultural dataSmart farmingHyperledger Aries And Ethereum

Various researchers have utilized blockchain for traceability, showing its potential in creating a secure, transparent agricultural ecosystem.

Each of these references illustrates the cross-sector applicability of blockchain and AI technologies. They highlight the importance of security, data management, and efficient data search. These are critical components in advancing smart agriculture and ensuring the sustainability of agricultural practices.

2.4
Research Gap and Vision

Existing literature explores artificial intelligence, blockchain, and the Internet of Things in agriculture. Yet, few studies integrate these technologies comprehensively for disease detection and data traceability. The majority focus on isolated applications. They lack a holistic approach that combines AI’s analytical power with blockchain’s security and IoT’s real-time monitoring.

Current systems generally do not provide end-to-end traceability. They do not cover the agricultural life cycle from disease detection to crop management and distribution. Solutions that provide seamless integration are needed. These solutions should ensure data integrity, transparency, and accessibility throughout the supply chain.

In addition, the potential of AI in predictive analytics in agriculture has not been fully utilized. Many systems focus on immediate disease detection. They ignore the predictive capabilities that can prevent outbreaks. Real-time monitoring through IoT is also not fully utilized for proactive agricultural management.

User interfaces for agricultural technology often lack intuitiveness. They do not cater to the varied tech-savviness of users. This creates a barrier to adoption. Stakeholders find it challenging to access and interpret the data they need for informed decision-making.

Artificial intelligence has an impact not only in the agricultural sector but also in all areas of Industry 4.0. For example, road safety is a major issue in modern life, where the integration of artificial intelligence allows the development of autonomous vehicles and driver assistance systems, which makes this approach more promising to reduce accidents and maintain driver safety. In [55], an integrated system based on low-level lightweight algorithms using two types of data: radar signals and camera images to identify and classify obstacles on the road.

The limitation of this research lies in the lack of an integrated, user-friendly system. Such a system should leverage AI, blockchain, and IoT. It should address the entire agricultural value chain. This includes disease prediction, real-time monitoring, traceability, and information security. Our vision seeks to address these limitations by providing a comprehensive solution that enhances agricultural productivity and sustainability.

Our vision of agricultural data traceability relies on a combination of Ethereum blockchain power, Hyperledger Aries, and security combined with the intelligence of emerging technologies like artificial intelligence and the Internet of Things. By joining forces, we are creating an infrastructure that transcends the traditional limitations of data collection in the agricultural sector, more specifically in the detection of agricultural diseases. By putting blockchain at the core of our solution, every stage of the agricultural life cycle is recorded in an immutable and accessible way through detection, irrigation history, order management, etc. Artificial Intelligence and the IoT add a proactive dimension and enable real-time analysis of agricultural conditions. The resulting web and mobile applications provide agricultural stakeholders with a user-friendly interface to explore and deeply understand the data. This approach redefines agricultural traceability by creating a transparent bridge between producers, distributors, consumers, and the agricultural expert.

3
Proposed approach

Plant diseases are a major issue in agriculture, affecting both crop quality and yields. Their effects range from mild symptoms to extensive damage to entire agricultural areas, with significant costs and financial consequences for agricultural economies, particularly in developing countries that are dependent on one or more crops. To minimize losses, we have developed a mobile application in Flutter integrating artificial intelligence to detect agricultural diseases. We also explored the use of blockchain, adopting Hyperledger Aries to ensure traceability of detections after experimenting with Ethereum to better compare their differences.

3.1
Architecture of the blockchain Hyperledger Aries

Hyperledger Aries is a project within the Hyperledger Foundation that aims to provide a decentralized infrastructure to manage identities and interactions between digital entities. It serves as the basis for providing decentralized identity management (SSI) solutions and facilitates the exchange of secure information between different parties while emphasizing the users’ privacy and sovereignty over their data [56].

The overall architecture of Hyperledger Aries can be presented in more detail by highlighting the main components that interact to enable the decentralized management of identities and secure interactions. The following is a detailed introduction to the Hyperledger Aries architecture, as shown in Figure 1:

Aries Agents:

  • Agent Controller: Responsible for managing and coordinating the activities of the autonomous agent.

  • Agent Storage: Stores the information required by the agent, including private keys, public keys, and Decentralized Identifiers.

Protocols and APIs:

  • Standardized Protocols: Aries defines standardized protocols for different interactions, such as the presentation of credentials, verification of authenticity, etc.

  • API: Facilitates interaction between agents and protocol implementation.

Decentralized Communication Protocol (DidComm):

  • DidComm Protocol: Ensures secure decentralized communication between agents using encrypted and decentralized messages.

Decentralized Identity Management (SSI):

  • Hyperledger Indy Integration: Enables integration with Hyperledger Indy for features specific to decentralized identity management, including the creation of decentralized identities.

Decentralized Key Storage (Wallets):

  • Wallets: Securely store private keys, DIDs, and other identity information.

Interoperability with Blockchains (Ledgers):

  • Ledger Integration: Aries can interact with different distributed ledgers for transaction recording and validation.

Shared Cryptographic Libraries (Hyperledger Ursa):

  • Ursa Integration: Uses shared security components from Hyperledger Ursa for cryptographic operations.

Configuration and Options:

  • Configuration Settings: Allows customization of implementation and environment-specific settings.

Figure 1.

Hyperledger Aries Global Architecture

In our proposed approach, the Hyperledger Aries blockchain is important for agricultural data traceability, offering a decentralized and secure infrastructure. Here are some key aspects of his role in this context:

  • Decentralized Identity Management (SSI): Aries allows the creation of autonomous agents to represent different entities in the agricultural sector, such as farmers, agricultural experts, suppliers, distributors, etc. Each entity can securely manage its own identity, thus facilitating the traceability of actions and data.

  • DidComm (Distributed Identity Communications): Using DidComm as a decentralized communication protocol, Aries ensures secure data exchanges between players in the agricultural sector. This is particularly useful for transmitting information on agricultural products throughout the supply chain.

  • Standardized protocols for traceability: Aries defines standardized protocols for different interactions, promoting interoperability between the different systems involved in agricultural traceability. These protocols cover aspects such as product origin, agricultural practices, certifications, etc.

  • User control over data: Aries emphasizes user sovereignty over their data. In the agricultural context, this means that farmers and other stakeholders have full control over the information they share, thereby building confidence in the supply chain.

  • Traceability throughout the supply chain: Through decentralized identity management and the use of DidComm, Aries facilitates the traceability of agricultural products from their origin to the end consumer. This makes it possible to follow the production, distribution, and storage steps seamlessly.

  • Data security and immutability: Using blockchain technology, Aries ensures data security and immutability. Once recorded on the blockchain, information related to agricultural traceability becomes resistant to falsification, thus strengthening the reliability of the data.

Hyperledger Aries is an important technology for agricultural data traceability, it represents a decentralized, secure, and transparent solution that builds trust throughout the agricultural supply chain.

3.2
Proposed system

A major challenge in modern agriculture is the rapid spread of plant diseases, which can devastate entire plantations and severely affect farmers’ economic stability. The approach proposed in this study aims to address this problem by allowing early and accurate detection of plant diseases or infections, as shown in Figure 2. This early intervention allows farmers to take rapid action. To prevent further spread and reduce crop losses. In addition, by leveraging Ethereum’s blockchain technology alongside Hyperledger Aries, the results of disease analyses can be recorded securely and transparently. This ensures data integrity, simplifies audits, and provides a reliable traceability system for agricultural practices.

Figure 2.

Proposed Architecture

3.3
CNN Model Architecture

Deep learning is a subset of machine learning algorithms characterized by sequential layers, where each layer utilizes the output of the previous one as its input. The learning process can be supervised, unsupervised, or semi-supervised. According to LeCun et al., deep learning is a representation learning approach [57]. These algorithms optimize data representation, making it more efficient for various tasks. Unlike traditional methods, deep learning eliminates the need to separate feature extraction from classification, as the model automatically extracts relevant features during training. It is widely applied in research fields such as image processing, image restoration, speech recognition, natural language processing, and bioinformatics. Convolutional Neural Networks (CNNs) excel at identifying and classifying objects with minimal preprocessing. Due to their multi-layered structure, they effectively analyze visual data and extract essential features. A CNN is composed of four primary layers: convolutional, pooling, activation function, and fully connected layers [58]. Figure 3 illustrates the general architecture of a CNN.

Figure 3.

CNN Model Architecture

3.3.1.
Convolutional Stage

The convolutional layer is the main component of a CNN, giving its name to the network. This layer performs a series of mathematical operations to extract characteristic maps from the input image [58]. A filter is applied to reduce the size of the image by moving systematically from the upper left corner, step by step. At each position, the pixel values of the image are multiplied by the corresponding filter values, and the results are added together. This process generates a smaller output matrix derived from the original image. Figure 4 illustrates the convolution operation using a 5×5 input image and a 3×3 filter.

Figure 4.

Filtering a 5×5 Image Using a 3×3 Convolution Kernel.

3.3.2.
Pooling layer

Pooling layers are typically placed after convolutional layers and are used to reduce the dimensionality of feature maps while retaining basic information. This process reduces computational complexity and avoids over-adjustment. Although filters of different sizes can be applied, a 2×2 filter is usually used. This layer can use different pooling techniques, such as maximum pooling and average pooling. Max pooling consists of selecting the highest value in a defined region and transferring it to a new matrix. Figure 5 illustrates an example of pooling operations.

Figure 5.

Max pooling operation using 2×2 filters.

3.3.3.
Nonlinear Activation layer

In artificial neural networks, the activation function establishes a non-linear relationship between the input and output layers, influencing network performance. This function allows the network to learn complex models. There are various activation functions, including linear tangent, sigmoid, and hyperbolic. However, in convolutional neural networks (NNC), the most used activation function is the rectified linear unit (ReLU). ReLU works by converting all negative values to zero while keeping the positive values unchanged, which improves model drive efficiency and speed.

fx=0,ifx<0x,else f\left( x \right) = \left\{ {\matrix{{0,if} \hfill & {x < 0} \hfill \cr {x,} \hfill & {else} \hfill \cr } } \right.
3.3.4.
Final Classification layer

After completing the convolution, pooling, and activation processes, the final matrix is passed to the fully connected layer. This layer is responsible for performing recognition and classification tasks.

4
Experimental Results

This section is dedicated to the presentations of screenshots summarizing the development of the Android app, the smart system, and the Hyperledger Aries blockchain.

4.1
Development of the application

Initially, we designed an Android application that allows the expert farmer to operate in a dedicated interface. Through this application, the farmer can capture an image of a plant leaf to detect potential agricultural diseases. After taking the photo, the farmer simply presses the “Analyze” button to get the diagnostic results generated by an intelligent system integrated into the application. A dialog box appears, displaying the analysis results, as shown in Figure 6.

Figure 6.

Results of the analysis.

4.2
Intelligent System Performance Assessment (CNN)

To develop our intelligent model relying on a convolutional neural framework (CNN) for identifying plant diseases, the following steps were undertaken.:

  • Data collection: In the first place, we gathered a dataset comprising visuals of both diseased and healthy foliage. This step is essential for training our model to identify the unique features of each category.

  • Data Preprocessing: Images must be processed for high quality. This requires dimensional adjustment, normalization of pixel values, and other transformations to ensure consistency across the data set, as shown in Figure 7.

    Figure 7.

    Data preprocessing

  • CNN model construction: The structure of the CNN model is designed to automatically extract essential features from images. This process typically includes convolutional layers, sub-sampling layers, and fully connected layers, as shown in Figure 8.

    Figure 8.

    Construction of CNN model.

  • Model training: We used the dataset to train our model. The training process consists of adjusting the weights of the model according to the characteristics learned from the training images, as in Figure 9.

    Figure 9.

    Model training.

  • Model validation: After training, the model was used on a specific data set to assess its performance and ensure that it generalizes well to the data it did not see during training, as in Figure 10.

    Figure 10.

    Validation of the model.

  • Final evaluation: Our model gives satisfactory performance on the validation data set; it will be evaluated on an independent test set to evaluate its performance, and it gives us curves that achieve 100% accuracy on the training set, indicating high learning ability and good adaptation to training data as shown in Figure 11.

    Figure 11.

    Final evaluation

4.3
Creating agents with Hyperledger Aries and Docker

As part of our project to improve communication and traceability of agricultural data, we deployed agents based on Hyperledger Aries, which is a decentralized and secure solution, using docker to ensure portability and isolation of environments. We will give an overview of the stages of the creation of agricultural agents and agricultural experts.

First, we started by downloading the necessary docker images, especially the Aries Cloud Agent (ACA-Py) image from the Hyperledger Docker Hub. This image provides us with a ready-made environment to deploy our agents.

Second, we created specific configuration files for each agent: the farmer and the agricultural expert. These files detail critical parameters such as agent keys, endpoints, and other role-specific configurations. Thirdly, the agents were deployed in separate docker containers, thus ensuring the isolation of environments. The ports have been correctly mapped to ensure smooth communication, as shown in Figure 12.

Figure 12.

Agent creation.

After the creation of the agents, we ensured the exchange of messages between the two agents. The agricultural agent generated an invitation to the agricultural expert, as shown in Figure 13.

Figure 13.

Invitation creates.

After the creation of the invitations, a connection was established between the agent Agricultural Expert and the agent farmer. Indeed, the farmer uses the invitation created to establish a connection with the agent agricultural expert as in Figure 14.

Figure 14.

Invitation created from Farmer Agent to Agricultural Expert Agent

The Agricultural Expert Officer will receive the invitation from the Agricultural Officer and then accept it to establish a connection. Once the connection is established, the farmer sends a message to the Agricultural Expert Officer indicating that he wants agricultural recommendations.

The Agricultural Expert Officer received a message from the Agricultural Officer, as shown in Figure 15.

Figure 15.

Acceptance of the invitation.

Once the connection is established, agents can exchange messages using the Aries APIs. These messages are decentralized, secure, and promote transparent communication between agricultural stakeholders, as shown in Figure 16.

Figure 16.

Message exchanges.

5
Discussion

In our first paper, we proposed a smart mobile application designed to detect agricultural diseases and securely record detection results using Ethereum blockchain technology. This innovation represented a major step forward in addressing crop disease management challenges and ensuring the traceability of agricultural data.

Now, we’ve explored another type of private blockchain, Hyperledger Aries. This approach aims to reduce the transmission of agricultural diseases and their serious impact on farmers and the agricultural sector, which has been the main driver of our work. Leveraging the Ethereum blockchain has provided a reliable method to monitor and track information related to plant health, disease, and agricultural activities, allowing early identification of problems and rapid interventions. Given the potential of Hyperledger Aries, we conducted a comparative analysis between the two blockchain technologies, as illustrated in Table 2.

Table 2.

Comparative Analysis of Ethereum Blockchain and Hyperledger Aries

FeatureEthereumHyperledger Aries
Blockchain TypePublic blockchainPermissioned blockchain framework
Main PurposeSupports smart contracts and decentralized applications (DApps)Designed for decentralized identity systems and secure data exchanges between decentralized entities
Smart Contract LanguageSolidity (primarily)Not specific; depends on the specific application framework
ArchitectureBased on Proof of Work (PoW) blockchain with migration plans to Ethereum 2.0 Proof of Stake (PoS)Modular and extensible framework for developing decentralized autonomous agents (DID) and secure message exchanges
Consensus MechanismPoW, PoS planned in Ethereum 2.0Depends on the underlying ledger (including PoW, PoS)
FlexibilityDesigned for generic decentralized applicationsFocused on flexibility for decentralized identity systems and secure data exchanges
Confidentiality-tyPublic transactions by defaultAbility for private and selective transactions, emphasizing confidentiality and authorization
GovernanceThe decentralized community decides on updates.Modular governance structure, allowing customization for each specific implementation
Typical Use CaseDecentralized applications, smart contractsDecentralized identity systems, secure data exchanges between decentralized parties
6
Conclusion

The combination of blockchain and IoT technologies can enable the creation of a secure and dependable system [59], self-organized, transparent, and environmentally friendly smart agriculture ecosystem that involves all stakeholders, even if they do not trust each other.

Our innovative approach aims to detect agricultural diseases and track agricultural data via an intelligent mobile app and the integration of blockchain technologies Ethereum and Hyperledger Aries, which represents an important step in the management of the main challenges facing the agricultural sector, like the transmission of diseases among plants.

Using Ethereum blockchain provides unparalleled transparency and data immutability, ensuring the reliability of stored detection analysis results. This feature builds trust between stakeholders, whether they are farmers, agricultural experts, or other actors involved in the agricultural chain. The specific contribution of Hyperledger Aries is to ensure the confidentiality of data throughout the exchange process between the different participants. DidComm technology enables secure and decentralized communications, creating a trusted ecosystem where sensitive information remains under the exclusive control of authorized parties. The synergies between Ethereum and Hyperledger Aries also facilitate the traceability of agricultural data. Every step, from disease detection to analysis and recording of results, is recorded immutably on the blockchain. This traceability not only improves data quality but also helps all relevant stakeholders make informed decisions.

DOI: https://doi.org/10.2478/ias-2025-0003 | Journal eISSN: 1554-1029 | Journal ISSN: 1554-1010
Language: English
Page range: 38 - 57
Published on: Feb 28, 2025
In partnership with: Paradigm Publishing Services
Publication frequency: 6 issues per year

© 2025 Amira Talha, Tarek Frikha, Jalel Ktari, Habib Hamam, published by Cerebration Science Publishing Co., Limited
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License.