In today’s rapidly evolving landscape, the convergence of Blockchain and AI technologies has emerged as a ground-breaking solution to revolutionize traditional processes and industries, such as agriculture [1], Internet of Things (IoT), e-health [2], voting systems [3], energy, supply chain, public services financial services, smart city, and higher education [4]. At the forefront of this innovation, our research serves to harness the transformative potential of Blockchain and AI in redefining water meter reading practices.
Water, as a finite and indispensable resource, stands at the heart of global sustainability efforts, necessitating meticulous management practices to guarantee its availability and accessibility for future generations. However, traditional water meter monitoring approaches, typically reliant on manual inspections conducted at periodic intervals, have revealed inherent inefficiencies and vulnerabilities to inaccuracies. These methods often entail time-consuming processes prone to human error, leading to discrepancies in water consumption data and hindering effective resource management strategies. In light of these challenges, our research endeavors embark on a pioneering journey to revolutionize water meter reading practices through the introduction of a state-of-the-art Android application. This application, meticulously crafted and infused with cutting-edge Blockchain and AI capabilities, represents a paradigm shift in the realm of water resource management. By harnessing the power of advanced technologies, our solution aims to transcend the limitations of conventional meter reading methodologies, offering unprecedented accuracy, efficiency, and reliability in data collection and analysis. The integration of UAVs in smart cities presents a case study in utilizing advanced technologies for improved efficiency and data management, as evidenced by Shah et al. (2024), who explored the role of drones in enhancing smart city operations through blockchain technology [5]. Mazhar et al. (2023) examine cybersecurity in smart grids, offering insights into using blockchain and machine learning for enhanced security, reinforcing the relevance of these technologies in addressing contemporary challenges [6]. Khan et al. (2022) detail the application of blockchain and machine learning in healthcare management, providing a framework that can be adapted to water meter reading to ensure secure and efficient data handling [7].
Central to our innovative approach lies the seamless integration of blockchain technology, with a particular focus on leveraging the Ethereum network, into the water meter reading process. This integration represents a pivotal step forward in ensuring the security and reliability of water consumption data, addressing longstanding concerns surrounding data integrity and trustworthiness. The Ethereum blockchain, renowned for its robustness and versatility, serves as the backbone of our solution, providing a decentralized and immutable ledger for storing water consumption data. Through the utilization of smart contracts and programmable self-executing agreements deployed on the Ethereum network, each meter reading is recorded as a distinct transaction. These transactions, cryptographically secured and timestamped, serve as irrefutable proof of the authenticity and integrity of the data, rendering it immune to tampering or manipulation. By embracing this decentralized approach to data management, our solution not only enhances the security of water consumption data but also fosters unparalleled transparency and traceability. Stakeholders, including water management authorities, consumers, and regulatory bodies, can access real-time updates on water usage patterns and trends, empowering informed decision-making and facilitating proactive resource management strategies. Furthermore, the immutable nature of the blockchain ensures that historical data remains intact and verifiable, enabling retrospective analysis and auditing of water consumption trends. This transparency not only instills confidence among stakeholders but also serves as a catalyst for accountability and responsible resource stewardship.
Moreover, our Android application stands out for its advanced real-time data storage and synchronization functionalities, powered by Firebase, a robust and scalable cloud-based platform. This integration brings about a host of benefits, empowering users with instantaneous access to their water consumption information anytime, anywhere. By leveraging Firebase’s cloud infrastructure, our application ensures seamless synchronization of data across multiple devices and platforms, facilitating informed decision-making and enhancing the overall user experience.
One of the key advantages of Firebase is its ability to provide reliable and secure real-time data storage, allowing users to access up-to-date consumption information with minimal latency. This realtime aspect is particularly crucial in the context of water meter reading, where timely access to data can enable proactive management of water usage and detection of anomalies. Furthermore, Firebase offers robust synchronization capabilities, ensuring that data changes made on one device are automatically propagated to other devices in real-time, ensuring consistency and accuracy across all user interfaces, regardless of the device being used. In summary, the integration of Firebase into our Android application elevates its capabilities to new heights, enabling real-time data storage, synchronization, and a seamless user experience. By harnessing the power of Firebase, we aim to empower users with the tools and insights needed to make informed decisions about their water consumption, ultimately contributing to more efficient and sustainable water management practices.
In addition to technological advancements, our research places a strong emphasis on empirical validation and practical implementation. Through rigorous testing and validation processes, we provide empirical evidence of the tangible impact of Blockchain and AI technologies in enhancing trust, accuracy, and transparency in water management.
As we embark on this transformative journey, our ultimate goal is to redefine the paradigm of water resource management, catalyzing sustainable practices and ensuring the equitable distribution of this vital resource for generations to come. By embracing innovation and collaboration, we envision a future where water meter reading transcends its conventional constraints, becoming a cornerstone of responsible resource stewardship and environmental conservation.
Blockchain originated as the underlying technology for Bitcoin, the first cryptocurrency, introduced in 2008 by an anonymous person or group known as Satoshi Nakamoto. Initially conceived as a distributed ledger system solely for managing Bitcoin transactions, blockchain has since undergone significant evolution. Today, it stands as a multifaceted technology acclaimed for its capacity to support diverse, decentralized applications beyond digital currency [8,9].
The versatility of blockchain has spurred the emergence of innovative business models, enabling enterprises to reimagine traditional processes and compete more effectively in the digital era. By leveraging blockchain technology, businesses can streamline operations, enhance transparency, and foster trust among stakeholders. Furthermore, blockchain facilitates the creation of decentralized networks wherein participants can interact directly, bypassing intermediaries and reducing transaction costs [10,11].
Numerous blockchain frameworks have surfaced to cater to diverse use cases and requirements, each offering distinct features and functionalities. Notable blockchain platforms include Omni, Ripple, MultiChain, Open Chain, Hyperledger [12], and each has its unique strengths and applications. These platforms collectively furnish developers and enterprises with a rich ecosystem of tools and resources to innovate and deploy blockchain solutions across various domains, ranging from supply chain management and identity verification to decentralized finance and digital voting systems [3].
In summary, blockchain has transcended its origins as a cryptocurrency framework to emerge as a transformative technology underpinning decentralized applications across industries. Its decentralized nature, coupled with robust security features and diverse ecosystem of platforms, positions blockchain as a cornerstone of the digital economy, offering unparalleled opportunities for innovation and disruption.
The integration of blockchain technology and AI into water meter reading represents a significant advancement in the field of resource management. This novel approach not only streamlines the process but also introduces a level of precision, efficiency, and security previously unattainable with traditional methodologies. The key aspects and innovative elements of this research are highlighted as follows:
- -
Blockchain Technology: Utilizing the Ethereum blockchain as a backbone for our system introduces an immutable, decentralized ledger for recording water meter readings. This ensures the integrity and transparency of data, making it resistant to tampering and fraud. The employment of smart contracts automates transactions and enforces the rules of data recording and sharing without the need for intermediaries, enhancing trust among stakeholders.
- -
AI for Meter Reading: By incorporating AI, specifically the YOLOv8 algorithm, into our application, we significantly improve the accuracy and efficiency of water meter reading processes. This AI-driven approach automates the detection and recording of meter readings, reducing human error and operational costs associated with manual readings.
- -
Android Application Integration: The development of a dedicated Android application for water meter reading democratizes access to technology, allowing users to easily submit meter readings directly from their smartphones. This application, integrated with Firebase for real-time data storage and synchronization, offers a user-friendly interface and seamless experience for managing water consumption data.
- -
Empirical Validation and Practical Implementation: Our research does not stop at theoretical development; it extends into practical application and testing. Through rigorous validation processes, we provide empirical evidence of the effectiveness of integrating Blockchain and AI technologies in enhancing the trust, accuracy, and transparency of water meter readings.
- -
Sustainability and Resource Management: Beyond technological innovation, this project underscores the importance of sustainable water management practices. By providing accurate, real-time insights into water usage, our system enables better decision-making for both consumers and water management authorities, promoting conservation and efficient use of this vital resource.
- -
Scalability and Future Expansion: The architecture of our system is designed with scalability in mind, allowing for future expansion to include other utility readings such as electricity and gas. This opens avenues for a comprehensive utility management system that leverages Blockchain and AI for enhanced efficiency and reliability across multiple sectors.
This article is systematically organized into six main sections to provide a comprehensive exploration of integrating blockchain technology and AI into water meter reading processes. Following this introduction, Section 2, the Literature Review, delves into the current state of research, examining existing studies on the use of Blockchain and AI across various domains, including water management. It identifies the advancements made and pinpoints the research gap that our study aims to fill. Section 3, Methods, outlines the technical and methodological approach adopted in developing the blockchain-based water meter reading system, detailing the application architecture, AI integration for meter detection, and the utilization of the Ethereum blockchain for data security. Section 4, Results, presents the outcomes of our implementation, including the performance of the AI detection system, user interface feedback, and the efficacy of blockchain integration. Section 5, the discussion, interprets the results, discusses the implications of our findings, and explores potential avenues for future research and development. Finally, the conclusion summarizes the key findings of our study, reflecting on the significance of integrating Blockchain and AI in enhancing water meter reading processes and suggesting directions for subsequent research endeavors. Through this structured layout, the article aims to provide a clear and thorough understanding of the innovative application of Blockchain and AI in water resource management.
This section provides an in-depth bibliographic study about using blockchain technology and AI in the latest technological advances in water metering.
In the dynamic landscape of modern applications, blockchain technology emerges as a disruptive force, revolutionizing industries and transforming traditional processes. Initially developed to support cryptocurrencies such as Bitcoin, blockchain now offers endless possibilities beyond digital finance. It provides a decentralized and immutable ledger, enabling transparent and secure transaction tracking. Building upon this principle, numerous initiatives are emerging, seeking to apply this technology to various domains, including water resource management. The authors of [13] have developed a taxonomy that integrates technical and applicative aspects to assist researchers in creating blockchain-based multimedia copyright protection systems while also exploring various technical issues and suggesting directions for future research.
Researchers in [14] have examined the applications of blockchain in IoT systems. They have devised a blockchain taxonomy for these applications, considering the most essential aspects, and have explored the latest advancements and solutions in the IoT context.
In [15], a comprehensive overview of blockchain applications, architectures, methods, and research topics in Industry 4.0 is provided. A blockchain reference architecture for smart manufacturing is presented, prompting considerations for the potential use of blockchain for Smart Factories and Smart Supply Chains.
In a recent publication [16], an evaluation of blockchain applications in smart grids was conducted, focusing on cybersecurity and energy privacy aspects. The authors have detailed how Big Data and blockchain can contribute to addressing major security challenges in smart grid contexts, and have highlighted various designs, experiments, and operational products.
On the other hand, the work presented in [17] focuses on the potential applications of blockchain in future transportation systems, combining connected and autonomous vehicles.
Another study [18] offers a comprehensive overview of the role of blockchain technology in addressing issues related to supply chain and logistics. This research demonstrates that blockchain can transform these domains into secure, flexible, reliable, and transparent operations. A hypothetical application example is presented to highlight the benefits of blockchain in terms of traceability and origin of crucial products.
The adoption of innovative technologies, such as blockchain, is becoming increasingly important to accurately and efficiently monitor water consumption. Several initiatives have emerged intending to develop effective solutions and integrate blockchain to better manage this essential resource.
In a recent study [19], researchers combined AI, decision support systems, and blockchain technology. In [20], the authors demonstrated that human intervention remains essential to collect data from traditional mechanical water sensors, but this approach remains expensive and prone to errors and corruption. However, in [21] and [22], the use of increasingly affordable connected devices is explored as an alternative.
Another proposal [23] is to assign a limited water usage quota to each customer, managed by smart contracts on a blockchain. The valves and pumps of the water distribution system operate via this blockchain. Other research [24] has focused on irrigation techniques powered by green energy sources, such as solar energy. A cryptocurrency called Soar Coin facilitates the exchange of energy and water between different farms, including the complexities associated with traditional devices.
Drawing from recent research [25–26], it becomes apparent that numerous solutions could be devised to enhance water management, particularly in nations reliant on centralized databases and traditional mechanical water metering systems.
In [27], Kim and Ju-Yeong explore a methodology leveraging a deep learning model for vehicle type recognition. They introduce Faster RCNN (Region-based Convolutional Neural Network), YOLO (You Only Look Once), and SSD (Single Shot multibox Detector), all capable of real-time processing with relatively high precision. Using a dedicated vehicle dataset, each algorithm is trained and evaluated to identify the most optimized solution for vehicle type recognition. While Faster RCNN demonstrates limitations in FPS due to CNN usage, SSD, although speedy, sacrifices accuracy with mobile-v1 implementation. Conversely, Yolov4 emerges as the standout performer, achieving an impressive 93% accuracy in vehicle model identification.
In [28], Melek conducts a comparative study of various object detection algorithms for product identification on market shelves. The examined algorithms include RCNN, SPPNet, Fast RCNN, Faster RCNN, and YOLO, assessed using the Pascal VOC dataset. Among these, YOLOv2 emerges as a top-performing algorithm in terms of both accuracy and processing speed for this application.
Liu, Liu, and Ke [29] evaluate Fast RCNN, Faster RCNN, YOLO, and SSD for meter detection. Faster RCNN exhibits superior performance, albeit at the expense of speed. Conversely, YOLO emerges as the fastest option in this context.
Several versions of YOLO have been released with improvements and updates over time, and for this, there are several studies concerning the difference between some versions of YOLO such as in [30], Li et al. compare YOLOv6 with other state-of-the-art YOLO family detectors, including YOLOv5, PPYOLOE [31], YOLOX [32], and YOLOv7 [33]. Note that they tested the speed performance of all official models on the same Tesla T4 GPU with TensorRT. Compared with YOLOv5-N/YOLOv7-Tiny, YOLOv6-N has the best speed performance in terms of throughput and latency. In [34], object detection applications are implemented by training the YOLOv2 and YOLOv3 algorithms in the Google Collaboratory Cloud service. YOLOv2 performed better in 5 out of 9 categories, while YOLOv3 performed better at recognizing small objects. The best result of YOLOv2 was obtained in airplane class with an F1 score of 99%, while the best result of YOLOv3 was obtained in pool class with 83%. YOLOv2 can detect objects in a photo in 43 seconds on average, and YOLOv3 achieves superior time performance by detecting objects in 2.5 seconds on average.
Counter detection is the process of locating and identifying counters in an image or video, which can be achieved through computer vision and machine learning technologies. Images undergo analysis using object detection algorithms to identify regions containing counters. Several studies have explored the detection of various meter types.
In [35], Hong et al. propose a fully automatic water meter reading system based on CNN. The system includes water meter detection, rotation correction, placement, a regression-based digital display with spatial layout guidance, and a pointer during playback. Numerous experiments have demonstrated that the orientation module effectively enhances the accuracy of digital frame and pointer detection, while the spatial guidance module improves the accuracy of digital photo frame reading. In conclusion, their method successfully achieves high precision, automatic meter readings even in challenging environments.
Martinelli et al. [36] introduce a method for automatically reading the digits of a dial counter. Their approach aims to localize the dial counter from an image, detect the digits, and classify them. Deep learning techniques, particularly the YOLOv5s model, are employed for digit localization and recognition.
In [37], authors. develop an AI model based on deep OCR for detecting and extracting water meter numbers. Their model, integrated into an Android mobile application, captures the instrument’s image using the operator’s smartphone camera. The application enables detection, extraction, monthly consumption calculation for each meter, and recording of relevant information such as meter number and location. The object detection model of the tiny YOLOv4 achieves a 98% accuracy rate, optimizing the system’s speed and efficiency.
Salomon et al. [38] address questions and challenges related to automatic reading of dial meters, highlighting many open challenges in this area. Considering the difficult image scenes in most cases, Faster RCNN and YOLO deep networks have shown promising results. They also propose a new loss function to reduce absolute errors, particularly on the leftmost dial.
Anis et al. [39] propose a framework for digital electric meter reading recognition. Their system, which normalizes the input image and converts it to a YCbCr image, achieved a 96.30% detection rate for meter reading regions and a 94.10% accurate recognition rate under different environmental conditions.
Koščević et al. [40] present a novel method for reading residential electricity meters using deep learning algorithms, utilizing the Faster RCNN method.
Laroca et al. [41] propose a two-step approach for de-detection using a YOLO v1 object detector and evaluated three different CNN-based methods, achieving impressive results on their proposed dataset and evaluating the speed/accuracy trade-off of each model.
Shu et al. [42] propose an automatic wattmeter reading system but encountered recognition errors due to dirty spots in the digital field and large tilts in the digital field, limiting their method’s effectiveness.
Tsai et al. [43] introduce an effective digit detection method for power hour meters, incorporating a new and improved Otsu thresholding method, labeling of connected components, noise removal, and digit recognition. Experimental results demonstrate the method’s effectiveness in detecting electric energy meter digits even in non-uniform lighting environments.
Despite extensive research on the integration of Blockchain and AI across various sectors, a specific exploration into their combined application for optimizing water meter reading processes remains limited. Studies have primarily focused on blockchain’s role in enhancing security and AI’s capability to improve detection accuracy in smart cities, smart grids, and healthcare. However, the application of these technologies to water meter reading, a critical component of urban water management, has not been adequately addressed. Existing literature highlights advancements in UAV deployment for smart city management, cybersecurity in smart grids, and ledger management in healthcare but lacks a comprehensive approach to leveraging Blockchain and AI for water meter data integrity and efficiency. Furthermore, while the potential of blockchain to secure data and of AI to accurately detect meter readings is recognized, their synergistic potential in creating a robust, efficient, and transparent system for water meter readings is yet to be fully explored. This gap signifies an opportunity for research aimed at developing a unified framework that integrates Blockchain and AI to revolutionize water meter reading, ensuring data security, accuracy, and operational efficiency.
As mentioned earlier, in our endeavor to redefine water resource management in the digital era, our research explores an innovative and integrated approach: the development of an intelligent water meter detection system utilizing blockchain technology.
This section is dedicated to providing a comprehensive review of our proposed approach, which includes an intricate overall architecture, application design and functionality, integration of AI for detection, and implementation of blockchain to ensure security and transparency.
The application follows an architecture based on the MVCS (Model-View-Controller-Service) model, which extends the classic MVC (Model-View-Controller) architecture by introducing an additional layer called “Service” (Figure 1).

MVCS architecture
In this architecture, the “Model” represents both the application data and the business logic. It manages access to data, manipulations of it, as well as operations that can be performed on this data. The model remains unaware of the user interface details or how the data is presented. The “View” is responsible for the user interface, displaying data from the model, and managing user interactions. However, the view does not directly modify the data. Instead, it communicates with the “Controller” to reflect necessary changes in the model. The “Controller” serves as an intermediary between the view and the model. It receives user inputs from the View and performs appropriate actions based on those inputs. The Controller then updates the model accordingly and notifies the View of the changes needed to update the user interface and for the extra layer, the “Service.” This layer handles complex operations, network calls, interactions with external services, or other tasks not directly related to the Model or Controller.
This approach helps maintain the lightweight nature of the Controller and ensures better separation of concerns.
As part of our application, we identify two key actors: the owner, whether a citizen or a company owning water meters, who is responsible for managing these meters, and the employee of the water meter company. Each of these actors plays an essential role in the water meter management process, and our application aims to simplify and improve their interaction within this system. The use case diagram shown in Figure 2 illustrates the different actions and interactions possible within our application, highlighting essential user roles, including registration, login, and counter-detection, to provide a complete overview of its operation.

Use case diagram.
In our endeavor, we present a meticulously crafted Android application designed with security at its core. Our focus extends beyond mere functionality. We delve into the intricate layers of Android development, harnessing the full potential of Android Studio. As seasoned developers, we attest to the indispensable nature of Android Studio, an Integrated Development Environment (IDE) that seamlessly integrates a plethora of robust features within an intuitive user interface.
Our work with Android Studio was marked by its instrumental role in shaping the user experience of our application. Through its comprehensive toolkit, we meticulously sculpted an interface that seamlessly merges aesthetics with functionality.
The built-in Android Emulator emerged as a pivotal tool, facilitating exhaustive testing across an array of virtual devices. This rigorous testing regimen ensured that our application delivers optimal performance across diverse screen sizes and Android versions.
Central to our application’s functionality lies its intuitive user interface, meticulously crafted to enable effortless navigation through the application’s features. Whether inputting water meter readings or perusing historical data, our interface prioritizes user-friendliness and accessibility.
Beneath the surface, our application operates on a robust foundation provided by Firebase, a platform chosen for its reliability and security. Leveraging Firebase’s real-time database capabilities, we ensure that user data remains synchronized in real-time, delivering a seamless and responsive user experience. Additionally, Firebase’s authentication services fortify our application’s security framework, enabling secure user sign-in and seamless data management.
In essence, our work embodies a fusion of cutting-edge technology and meticulous craftsmanship, culminating in an Android application that not only meets but also exceeds user expectations. Through the synergy of Android Studio, Firebase, AI, and blockchain, we have created a secure, intuitive, and feature-rich solution poised to revolutionize water meter management.
Within our application framework, we have harnessed the power of AI to revolutionize data recognition, particularly in the domain of water meter value detection. This integration is pivotal for automating what was once a manual and error-prone task.
When a user engages with our application by capturing an image of their water meter, the selected AI algorithm springs into action. Through a complex process of image analysis, the algorithm meticulously examines the visual data, discerning the intricate details of the water meter and extracting the relevant numerical values (Figure 3).

Water meter detection process
This integration of AI technology fundamentally transforms the user experience by delivering unparalleled speed, accuracy, and convenience in meter value detection. By automating this previously labor-intensive process, we eliminate the potential for human error and significantly enhance overall efficiency.
Furthermore, this AI-driven approach improves user experience and lays the groundwork for future advancements. As we refine our algorithms and explore new techniques, we remain committed to pushing the boundaries of innovation in data recognition within our application.
At the core of our AI integration lies the utilization of cutting-edge computer vision techniques, and that is why, when selecting the algorithm for our project, we carefully considered different options to meet our specific needs.
There are several versions of YOLO that have been released with improvements and updates over time. Here are the different versions of YOLO with their publication dates:
YOLOv1: published in 2016.
YOLOv2: released in 2017.
YOLOv3: released in 2018.
YOLOv4: released in 2020.
Official versions of YOLO currently stop at YOLOv4, released in 2020.
However, there are modified and improved versions of YOLO created by other researchers and developers. These versions are not official versions of YOLO, for example:
YOLOv5: released in 2020
YOLOv6: published in Sep 2022 by Li et al. [30]
YOLOv7: published in August 2022 by Wang, Bochkovskiy, and Liao [33]
YOLOv8: released in January 2023 [44]
It is important to note that not all modded and unofficial versions of YOLO are necessarily better than the official versions. The performance of different YOLO models may vary depending on specific datasets and tasks.
In (Figure 4) we can see a performance graph compared between some versions of the YOLO model.

Performance graph of some versions of the YOLO [44]
YOLOv8 demonstrates improved performance in object detection compared to its predecessors. Improvements in this release result in improved accuracy and efficiency, enhancing its usefulness in practical applications requiring real-time object detection.
One of YOLOv8’s key features is its ability to outperform its predecessors in terms of accuracy and efficiency. The increased accuracy likely results from updates in neural network architecture, hyperparameter optimization, or the introduction of new training techniques.
The combination of these accuracy and efficiency improvements makes YOLOv8 an ideal choice for our real-time object detection application. It can provide results that are more reliable while meeting the speed requirements needed for practical applications. This improved performance helps strengthen YOLOv8’s position as a leading solution in the computer vision space, offering significant advantages over its predecessors:
High detection accuracy: YOLO 8 is renowned for its ability to detect objects accurately and quickly.
Real-time processing: For our project, it is essential to provide results in real-time.
Active community and available resources: YOLO 8 is a well-established algorithm with an active developer community. This means that we have access to a large number of resources, updates and support libraries, making it easier to implement and continue development of our application.
Scalability: YOLO 8 is a constantly evolving algorithm, with new and improved versions released regularly. This gives us the opportunity to incorporate future improvements to maintain the relevance of our solution.
To integrate blockchain technology, we harnessed the capabilities and adaptability of the Ethereum blockchain platform. Ethereum stands out as an open-source, public blockchain tailored for decentralized applications (DApps). A defining aspect of Ethereum is its support for executing smart contracts, which served as a cornerstone in our initiative.
Smart contracts, as self-executing agreements with pre-established rules and conditions, facilitated the creation of a transparent and tamper-proof system for managing water meter readings. Through seamless integration of the Ethereum blockchain into our application’s architecture, we introduced a decentralized and secure layer that significantly enhances the overall user experience.
For experimentation purposes, we explored various approaches to blockchain management, including intelligent systems and multi-agent systems, applied across different domains, notably within Industry 4.0. To facilitate local development and testing, we established a private blockchain network utilizing tools like Ganache and Truffle. Particularly, Ganache emerged as a valuable asset, simulating a local blockchain environment and offering a rapid and convenient means to develop and test smart contracts on the Ethereum blockchain, all without incurring actual gas costs. This facilitated the creation of a controlled and risk-free environment conducive to testing our application’s functionality.
These interfaces are the gateway to the user experience (Figure 5). When starting the application, the first interface that appears is the authentication screen, which takes us to the home page.

Example of some main interface of our application
When a citizen selects the “Counters” icon, the list of their counters is displayed, and the owner can administer them by adding new counters or deleting them.
To access a meter’s history, the user can simply click on the meter, which will open a detailed list of its history.
When the employee wants to add a new reading by clicking on the “+” button, the application offers the choice between taking an instant photo and selecting an image from its gallery. Once the image is sent to the application, our YOLOv8 model analyses the image and returns the corresponding value, along with a confirmation message for saving the value. (Figure 6)

Example of water meter detection process to extract value
Before delving into the detailed explanation of our AI integration, it is crucial to highlight the foundational training process behind our model, particularly focusing on our utilization of YOLOv8.
This training process was meticulously refined to ensure optimal generalization and robust detection capabilities, as evidenced by the results depicted in Figure 7:
Precision: The model exhibits an impressive accuracy rate of 96.9%, indicating its exceptional ability to make precise detections.
Recall: With a recall rate of 95.27%, the model demonstrates its capability to detect a significant percentage of water meter values present in the dataset.
mAP50(B): This metric depicts a gradual improvement over epochs, culminating in an impressive score of 97.74%, underscoring the model’s robustness in detecting objects with high confidence levels.
mAP50-95(B): The model achieves a commendable performance, with a score of 55.39%, indicating its reliability in detecting objects across a varied range of confidence levels.

Performance measurements of our detection system
These metrics serve as a testament to the effectiveness and reliability of our model, ensuring that it delivers accurate and consistent detections across diverse scenarios and confidence levels.
The integration of the Ethereum blockchain into our project represents an essential milestone for the implementation of decentralized functionalities and the security of transactions. At the heart of this integration are smart contracts, autonomous programs running on the Ethereum blockchain, which enable automation and trust in operations. Once the smart contract code is complete, we proceed to compile it using Truffle using the ‘truffle compile’ command. This operation allows us to first obtain the ABI (Application Binary Interface - Contract Interface). It is an interface that specifies how the functions of a smart contract can be called from outside, thereby defining how data is encoded and structured to interact with the contract. Second, the addresses of the state variables. These are the members of the Reading structure. They retain their value between function calls and may be accessible to other parts of the contract or, in certain circumstances, to other contracts, depending on their visibility specification.
In Figure 8, we presented the structure of the smart contract and the data-saving function in the blockchain.

The smart contract
Each reading is represented by a data structure called “Reading”, including information such as:
SerialNumber: which corresponds to the serial number of the water meter.
MeterValue: representing the current value of the water meter.
DetectionDate: indicating the date the reading was added.
DetectorId: identifier of the user adding the reading, allowing you to check whether this user is the owner of the meter or an authorized employee.
Readings are stored in a private mapping. This is a data structure that associates a serial number with a Reading structure. This allows readings to be stored and retrieved quickly using the serial number as a key.
The saveReading function allows you to add new readings by specifying the associated details. It uses mapping to store the reading associated with the serial number provided.
Following the implementation of our smart contract, a transaction is initiated to confirm the creation of our contract, as illustrated in (Figure 9). Upon successful creation, the smart contract address is generated, identified as “0x9A653f2be53f21B7cb1e98E3dEc1756DE6f5F671”. This address holds significant importance as it serves as a pivotal element enabling various functionalities such as interaction, data retrieval, verification processes, communication, and ensuring security measures when engaging with smart contracts.

Smart contract creation
After deploying our smart contract and integrating it with our blockchain address, seamless interaction with the application becomes possible. Each new dataset submitted through the application is securely stored on the blockchain for immutability and transparency. Figure 10 depicts an illustrative instance of such data transmission, accompanied by the transaction ID “TX 0x5d5dcd025fa72e1120bfd7d23e494e9ba45a8fbc43ceb38e4ff126eaf5d6c231”.

Transaction insert in the Blockchain
This transaction includes essential inputs such as SerialNumber: 0537460C36, MeterValue: 45483, DetectionDate: 2024-02-04, and DetectorId: 04646434. These inputs are crucial for recording and validating information on the blockchain, bolstering the system’s reliability and integrity.
Following the completion of transaction preparation, a block is generated, ready to be appended to the blockchain. Upon verification through the Proof of Work (PoW) consensus mechanism, the block is successfully integrated into the Ethereum blockchain. This process is exemplified in Figure 11, where the newly created block, identified as “block 23,” is timestamped at 2024-04-21 10:58:52. This timestamp signifies the exact moment when the block is officially added to the blockchain, contributing to the chronological and immutable record of transactions.

Block added in the blockchain
As in Figure 12, when a reading is successfully saved, an event named “ReadingSaved” is emitted. Events notify blockchain application clients of significant changes on the chain.

Events of a smart contract
Each event, as depicted in Figure 12, and transaction event, as illustrated in Figure 13, associated with a particular smart contract, is systematically recorded and stored within the contract itself. This means that every interaction or occurrence involving the smart contract, whether it is a transaction or an event triggered by specific conditions, is logged and preserved within the smart contract’s internal structure. This inherent capability ensures that all actions and events related to the contract are securely captured and accessible for reference or verification purposes, fostering transparency and accountability within the blockchain ecosystem.

Transactions of a smart contract
Our investigation into combining blockchain technology, particularly Ethereum, with the YoloV8 algorithm for water meter reading showcases promising outcomes. However, this exploration opens up several discussions around scalability, technological refinement, and broader application possibilities. Addressing scalability emerges as a critical challenge for the adoption of this system at a larger scale. The system’s capacity to manage an increasing number of transactions and data points is crucial for its utility and acceptance in the market.
Future research directions point toward the refinement of algorithms and network infrastructures to tackle these scalability issues. Additionally, the potential for expanding the system to include other types of utility readings, such as electricity and gas, presents an opportunity for a more integrated approach to utility management. Such expansion could significantly contribute to resource conservation and promote sustainable living practices.
Moreover, exploring alternative blockchain frameworks, like Hyperledger, could offer insights into achieving scalability while ensuring robust security measures. The discussion also extends to potential integration with emerging technologies, such as the Aries Blockchain framework, to enhance system security and scalability further.
The project’s integration of the YoloV8 algorithm with Ethereum blockchain technology signifies a notable advancement in water resource management. By automating the water meter reading process, the system ensures the accuracy, efficiency, and security of data collection. This not only simplifies administrative tasks but also upholds the integrity and confidentiality of water usage information, thereby enhancing operational efficiency and fostering transparency and accountability within water utility operations.
Future prospects for this project are vast. Integration with technologies like the Aries Blockchain framework could further enhance security and scalability. Aries offers a decentralized architecture for secure data exchange, increasing confidence in data management and system reliability. The application could also include readings for electricity and gas meters, expanding its utility. Incorporating advanced detection algorithms into a blockchain platform will streamline utility management, improve data accuracy, and support resource conservation.
Success depends on overcoming scalability challenges. As the need for efficient meter reading solutions grows, the system must manage more transactions and data. Exploring blockchain frameworks like Hyperledger may help address scalability while ensuring security.
Thus, this project represents a comprehensive strategy for updating public service delivery. It brings efficiency, transparency, and adaptability to new technologies. Through innovation and collaboration, sustainable and resilient water resource management practices can align with environmental and societal goals.