Skip to main content

Tesis Juan Alberto Llopis

· 19 min reading time

Tesis Juan Alberto

Discovery Service Federation in the Web of Things

Juan Alberto Llopis

Directores: Luis Iribarne y Javier Criado

PID2021-124124OB-I00, HERMES: Un marco formal basado en la Web de las Cosas y computación Edge para la definición, el descubrimiento y el procesamiento de datos de componentes ciberfísicos

[ Descargar tesis ] [ TESEO ] [ WoTtrader ]


ABSTRACT

The evolution of Internet of Things (IoT) devices has led to an increase in the number of devices that interact to solve or assist in tasks. Devices are increasingly present in everyday life, such as smartwatches, vehicles, traffic lights, and refrigerators, which are among the many IoT devices. All the mechanical elements used to facilitate different tasks are provided with intelligent capabilities. However, each device is from a different manufacturer, and as a result, even if two devices perform the same function, such as two light bulbs, they may have problems interconnecting.

Consequently, the ongoing evolution in the behaviour and utilisation of Internet of Things (IoT) devices has introduced new characteristics, thereby remodelling the requirements of the systems and environments that depend on them. One significant development is the emergence of mobility. IoT devices have transitioned from being stationary components, such as temperature sensors or automated city barriers, to mobile entities that navigate their environments, including smartwatches, smartphones, connected vehicles, and electric scooters.

Additionally, the nature of user-device interaction has become more diverse. This now includes indirect interactions, such as a traffic light adapting its state in response to a detected large vehicle, as well as direct interactions like voice commands or gesture recognition. Devices are also increasingly capable of inter-domain communication, enabling them to collaborate in solving more complex tasks or managing distributed infrastructures. For instance, on a Smart Campus, each building may manage its own data independently, but when a user queries information covering multiple buildings, the system can aggregate and present unified results.

The rapid proliferation of IoT devices across various sectors, including smart cities, healthcare, and industry, necessitates the development of scalable and effective mechanisms for their discovery and management.

To solve the interconnection capability between IoT devices from different manufacturers and facilitate device discovery, the W3C proposed the Web of Things (WoT) recommendation. WoT is a software abstraction layer based on web technologies that facilitates interaction with IoT devices. The Web of Things (WoT) enables interaction among heterogeneous devices by introducing a standardised format for describing device information, known as the Thing Description (TD). This structured representation outlines a device’s properties and behaviour uniformly, regardless of the manufacturer, thereby promoting interoperability and easing system integration. The WoT specification also provides guidelines for device discovery and management, outlining how services should be defined and stored within directories. These directories support syntactic access via JSONPath queries and semantic access using SPARQL. Furthermore, the specification allows directories themselves to be represented as Things using TDs, which enables the discovery of other directories and supports federated device discovery across systems. This unifies the discovery process, regardless of the source, under a consistent model.

When a directory is unable to satisfy a user’s query, it can delegate the request to another directory to continue the discovery process. Despite these improvements in the way IoT devices are managed and discovered through WoT standards, significant challenges remain in identifying and working effectively with the growing variety of IoT devices. For instance, one of the current challenges in the IoT field is the increasing volume of data generated and processed by devices. As these devices become more sophisticated, they are deployed in a wider range of environments to tackle more complex tasks. Consequently, the demand for storage capacity and processing power also rises, requiring the development of more advanced systems and techniques.

Traditional Information Retrieval (IR) methods have been effective in supporting device discovery, such as verifying the existence of a device or querying the data it produces. However, these methods are becoming insufficient in addressing emerging use cases. For instance, users may attempt to access device information through alternative forms of interaction, such as natural language speech or gestural input, rather than conventional computer-based queries. Therefore, it is necessary to extend discovery services to support multiple capabilities, thereby assisting in the discovery process. These capabilities must evolve to meet the demands of managing and discovering IoT devices, with discovery mechanisms designed to incorporate new faceted capabilities to address future requirements incrementally. Adopting a faceted approach in the proposed solution supports a more flexible, scalable, and extensible architecture for the discovery model.

When referring to the capabilities of a discovery service, we mean distinct features that are sufficiently complex to be developed independently, yet contribute directly to the core function of discovering IoT devices. Traditionally, discovery services are built with minimal functionality, and such capabilities are implemented as separate, standalone systems that operate independently of the discovery mechanism. However, as IoT devices evolve, there is a growing need for discovery services to incorporate these advanced capabilities directly into their core architecture, thereby supporting complex search and discovery tasks effectively.

For example, integrating Artificial Intelligence (AI) and federation mechanisms into the discovery service enables the processing of natural language queries and the discovery of devices across large-scale, distributed environments. This is especially important in scenarios where users interact through voice commands, and the system must return relevant devices spread across multiple subsystems. This dissertation proposes a federated discovery model architecture based on WoT and embedded in a trading service, WoTtrader. The discovery model includes four key capabilities in a faceted way:

(1) Proactive discovery. Proactive discovery enables the discovery service to adapt to dynamic IoT environments. In traditional discovery services, the service calls the discovery service to register; this is known as a push model. The capability of proactive discovery is based on the fact that it is the discovery service that searches for and registers available services within its range. This type of discovery is known as the pull model and enables the discovery service to adapt to environments where devices frequently change between available and unreachable states.

(2) Recommender system. The W3C discovery service recommendation for WoT includes support for syntactic queries using JSONPath and XPath and semantic queries using SPARQL. However, there is no proposal for natural language query processing. The capability of the recommender system is an AI model that supports the discovery service, allowing it to process natural language queries. Once the query is processed, it returns an ordered list of recommended devices. In addition, along with this capability, we propose the use of a quality of service metamodel that facilitates the recommendation of devices based on metrics such as the frequency of device access or the last time the device was available.

(3) Federated discovery. IoT systems concern not only a single location; for example, a smart campus is a combination of buildings that may be located in different parts of the city. Therefore, discovery services must be able to communicate with each other to discover devices deployed in different locations. The W3C Discovery Service Recommendation briefly proposes a federation of discovery services based on SPARQL. However, that proposal would not allow federations with hops over more than one distance or syntactic discovery service federations. The federated discovery capability proposes the possibility of federating queries between discovery services using any supported query type, i.e., syntactic, semantic, and natural language queries. Additionally, it enables the integration of third-party discovery services that adhere to the W3C recommendation and utilise AI techniques to enhance the performance of the delegation process between nodes.

(4) Query expansion. Queries are based on user requests to the system for device discovery. However, in natural language queries, the request may be constructed incorrectly or may be missing essential information. The query expansion capability enhances the system's functionality by allowing it to modify, represent, or augment user queries with additional information. Therefore, in the case that the user’s query does not yield any results, the query can be adapted to try to find a result that resolves the user’s request.

In addition to these four main capabilities, WoTtrader enables automatic adaptation of IoT devices to WoT. When performing proactive discovery, IoT devices operating under the MQTT protocol are searched for. If IoT devices using MQTT are identified, their functionality is enhanced by creating an associated TD, enabling them to interact with other WoT devices. Finally, WoTtrader supports graph-based queries by implementing GraphQL to construct custom queries. The WoTtrader capabilities can be integrated within the discovery service or deployed as external support services. A trading service coordinates these capabilities, which include the discovery service, support services, and their interactions with external agents. This structure simplifies the deployment of nodes with various capabilities and enables the addition of new capabilities as needed by the deployed node.

Three of the four main capabilities described are implemented: capabilities (1), (2), and (3). These three capabilities have been implemented in a trading service whose performance has been validated and evaluated against the discovery services of the W3C recommendation, WoTHive, and TinyIoT. The validation shows that WoTtrader offers moderate response times while providing the highest accuracy when searching for devices deployed across different nodes.

Furthermore, the performance of natural language search versus syntactic search has been evaluated to validate the use of AI in recommending IoT devices. The evaluation results show that the use of AI in device discovery yields better results when queries with synonyms or words not recognised by the system are entered.

Finally, the performance of centralised versus distributed federations of discovery services has been evaluated, as well as the use of distributed AI models at the edge versus centralised in the cloud. The objective was to evaluate the operation of the federation, prove that it is capable of operating in both distributed and centralised environments, and compare its performance in these two approaches.

Objectives and contribution

The development of WoTtrader is conditioned by a series of objectives, as described below. The text outlines the contributions made in this thesis to achieve each objective.

Objective #1: Analyse and experiment with protocols and ontologies for the identification and classification of services. Contribution: An adaptation capability has been proposed for identifying IoT devices under the MQTT communication protocol and its adaptation to the HTTP communication protocol by constructing a compatible Thing Description. Therefore, IoT devices operating with MQTT are adapted to the WoT. Regarding ontologies and service classification, a metamodel based on data quality has been proposed. The proposed metamodel extends the Thing Description model by providing information about the device's security, location, usage, and state. These metrics give a score used to evaluate the device's quality.

Objective #2: Experiment with service identification using other discovery services and provide a solution for communication between discovery services. Contribution: WoTtrader is an implementation that includes and orchestrates the proposed discovery services model along with the capabilities that support it. WoTtrader enables communication and integration of third-party discovery services into its federation, allowing syntactic, semantic, and natural language queries to be delegated. Discovery Service Federation in the Web of Things. Additionally, third-party discovery services that integrate with the federation and utilise SPARQL can benefit from WoTtrader’s multi-level federation capability. The WoTtrader implementation and integration have been validated for performance and functionality, alongside third-party discovery services.

Objective #3: Propose a discovery service federated system and study the compatibility rate in the discovery of services. Contribution: First, a discovery service federation model was proposed to allow queries to be delegated between different WoT discovery services. Subsequently, two discovery service federation solutions were implemented. The first solution compared the performance of a centralised versus a distributed federation. The second solution compared the performance of natural language search in federations using a distributed AI model structure in the edge versus a centralised structure in the cloud.

Objective #4: Provide a directory solution and define the configuration generation system from the discovered services. Contribution: As a first directory proposal, a discovery service based on the W3C recommendation with the ability to discover devices proactively was proposed [Llopis et al., 2022b]. This proposal was extended by proposing a faceted discovery model that integrates several capabilities to provide additional functionalities covering the objective of a directory for device discovery. Regarding the generation of configurations, a simulation system based on Digital Twins was proposed to configure virtual scenarios for testing devices and collecting data on their operation. This simulated system allowed connection and synchronisation with real systems.

Objective #5: Integrate concepts of recommender systems and discovery services. Contribution: To address this objective, two AI models for matching natural language sentences with IoT devices have been proposed. A first approach enabled the obtaining of lists of recommended devices by training AI models with a small amount of training data. The objective was to demonstrate that the Transformer model is effective in natural language processing for device search. The second approach was based on obtaining lists of recommended devices, using larger datasets, and comparing performance against syntactic search.

Objective #6: Study topics such as query mutation, data quality, ontologies, interoperability, and security. Contribution: The study of query mutation has been performed together with the proposal of the discovery service architecture model, where one of the capabilities is the query expansion, which, among the techniques, includes query mutation, that is, the modification of the query in case the user’s query does not return any result. The study of data quality, the use of ontologies, interoperability, and security has been carried out by the metamodel proposal, which extends the Thing Description to measure the quality of devices, taking into account factors such as security, device usage, and localisation. The path taken to achieve the goals above, along with the contributions made during this process, has led to the main contribution of this dissertation: A discovery service federation in the Web of Things that can integrate with other discovery services, extend the W3C recommendation, and adapt to the continuous change of IoT devices.

Background and future lines

The development of this doctoral thesis is part of four research projects of the Applied Computing Group 1. The first project, TIN2017-83964-R, funded by the EU ERDF and the Spanish Ministry of Economy, Industry and Competitiveness (MINECO), is titled “CoSmart: Study of a holistic approach for the interoperability and coexistence of dynamic systems: Implication in Smart Cities models”. This project proposes the development of a comprehensive reference framework for managing the coexistence of dynamic computer systems and their application to IoT-based dynamic systems in smart city ecosystems. It addresses challenges such as interoperability, integration, and scalability through hybrid techniques like model transformation, machine learning, and natural user interaction. The first discovery service model proposed in this thesis was developed as part of this project, along with a system for adapting IoT devices to WoT technology, which is one of the objectives for identifying and searching for IoT devices.

The second project, CEIJ-C01.2, coordinated by UAL-UCA universities and funded by the CEIMAR consortium, is titled “WoTport: Discovering the Web of Things towards SmartPort”. The primary objective of this project is to develop a discovery service for software components within the Web of Things, specifically targeting applications in smart port ecosystems. It aims to support the reuse of valuable information across applications and to build an open, public community where developers or automated systems can identify WoT components relevant to Smart Port solutions. The discovery service is a fundamental part of this project, primarily due to its federation function and integration with third-party discovery services. The API of the discovery service is publicly deployed, and its documentation can be consulted through an OpenAPI service 2.

The third project, PY20 00809, funded by the Andalusian Research, Development and Innovation Plan of the Andalusian Knowledge System of the Andalusian Regional Government, is titled “UrbanITA: A reference model of open IoT services aimed at energy efficiency strategies in intelligent public buildings”. The project proposes to design a reference model that supports the integration of energy management services, leveraging software platforms that facilitate interoperability and the integration of the Internet of Things (IoT) and the Web of Things (WoT). As a result of this project, a series of devices were deployed in one of the university’s buildings to collect information about temperature, humidity, and CO2 in the building’s offices. Additionally, a weather station was deployed to compare the outside temperature with the temperature inside each office. For each of these devices, a Thing Description was designed and integrated into the discovery service for use in system validation. In addition, the offices were used as virtual scenarios in the creation of a system based on Digital Twins for the simulation and synchronisation of WoT scenarios. Finally, WoTtrader enables interoperability between IoT and WoT devices through the adaptation capability, as well as interaction with various devices through the discovery service.

Finally, the fourth project, PID2021-124124OB-I00, funded by the Spanish Government MCIN/AEI/10.13039/501100011033, the Andalusian Government, and the “ERDF A way of making Europe”, is titled “HERMES: A formal framework based on the Web of Things and Edge Computing for the definition, discovery, and data processing of cyberphysical components”. This project aims to develop a discovery and recommendation framework for cyber-physical components in Smart Cities, particularly within the Web of Things (WoT) and Internet of Things (IoT) paradigms. The proposal emphasises the use of formal models and ontologies to classify and locate components based on user requirements, including spatial and semantic data. The discovery service, in conjunction with the AI-based recommender system, is a crucial component of this project's objective. The recommender system utilises a metamodel that, following the FAIR principles (findability, accessibility, interoperability, and reusability of research data), represents the quality of the devices and assigns a confidence value, thereby supporting the elaboration of the ranking of recommended devices.

The four projects generated a list of tools, repositories, and datasets essential for developing this thesis.

(a) WoT Lab. A web portal has been generated based on a laboratory scenario where users can discover and interact with real laboratory devices represented.

(b) Simulation repository. A repository of virtual scenario simulation information and its synchronisation with real scenarios using Digital Twins4.

(c) Discovery service federation repository. A repository containing the dataset and deployment for the first discovery service federation approach, comparing performance in centralised versus distributed architectures.

(d) Recommender system for the discovery service federations repository. A repository containing a dataset and deployment of a federated discovery service using natural language search, comparing a distributed AI system on the edge with a centralised AI system in the cloud6.

(e) WoTtrader repository. A repository with the WoTtrader trading service deployment. It includes the dataset used for comparison against the two W3C WoT discovery services, TinyIoT and WoTHive7.

(f) Thing Description generator repository. A system for generating Thing Descriptions based on data augmentation techniques. It generates scenarios with several locations and populates each location with a list of Thing Descriptions.

This research has also been developed under the University Teacher Training Program (FPU) of the Spanish Ministry of Science and Innovation, FPU19/00727. During the grant period, research activities related to the projects mentioned above and additional tasks have been developed, which contributed to the development of this thesis. This thesis was created within the Computer Science Doctoral Program RD99/11 at the University of Almeria (Spain).

Based on the objectives and previous contributions, several future directions are available, including the implementation of query expansion in service discovery. Query expansion is proposed in the model, but not implemented in the discovery service. Also, metadata mapping to discovery services to facilitate query delegation is proposed as a future line of work. If the federation knows the content of each node, it does not need to go through all nodes to find the device. On the other hand, several query delegation algorithms have been proposed, but their performance has not been compared with that of other existing algorithms in the literature. It would be interesting to compare the algorithms that delegate queries most efficiently. Finally, a federation of discovery services is proposed; however, the ability to delegate queries between federations has not been studied, nor has the security of access to each node and between federations been examined.

WoTtrader

A federated discovery model architecture based on WoT that enables intelligent device discovery through AI-powered capabilities and distributed federation mechanisms.

WoTtrader site: https://acg.ual.es/repo/wottrader/

Publications

J.A. Llopis, A.J. Fernández-García, J. Criado, L. Iribarne, A. Corral (2024). A data model for enabling deep learning practices on discovery services of cyber-physical systems. Software: Practice & Experience, 54(8):1447-1469, 2024, Wiley. ISSN: 0038-0644. http://doi.org/10.1002/spe.3325

J.A. Llopis, A.J. Fernández-García, J. Criado, L. Iribarne, R. Ayala, J.Z. Wang (2023). A deep learning model for natural language querying in Cyber–Physical Systems. Internet of Things, Volume 24, December 2023, 100922, Elsevier. ISSN: 2543-1536. https://doi.org/10.1016/j.iot.2023.100922

J.A. Llopis, M. Mena, J. Criado, L. Iribarne, A. Corral (2023). A faceted discovery model architecture for Cyber-Physical Systems in the Web of Things. Computer Science and Information Systems, Volume 20, Issue 4, Pages: 1639-1659, 2023. ISSN: 1820-0214. https://doi.org/10.2298/CSIS230328049L

J.A. Llopis, L. Iribarne, J. Criado, A.J. Fernández-García, Richard Chbeir (2024). Federated Discovery on the Web of Things. 16th International Conference on Management of Digital EcoSystems (MEDES 2024), 18-20 November 2024, Napoli (Italy).

J.A. Llopis, P. Muñoz, J. Criado, J. Troya, L. Iribarne, A. Vallecillo (2023). Modeling and Synchronizing Digital Twin Environments. Annual Modeling and Simulation Conference (ANNSIM), Mohawk College, Ontario, Canada, May 23 - 26, 2023. ISBN: 978-1-71-387328-0. https://ieeexplore.ieee.org/document/10155223/

J.A. Llopis, M. Mena, J. Criado, L. Iribarne, A. Corral (2022). Towards a Discovery Model for the Web of Things. 14th International Conference on Management of Digital EcoSystems (MEDES 2022), 9-21 October 2022, Venice (Italy). https://doi.org/10.1145/3508397.3564827

J.A. Llopis Expósito, AJ. Fernández-García, J. Criado, L. Iribarne (2022). Matching user queries in natural language with Cyber-Physical Systems using deep learning through a Transformer approach. 16th International Conference on INnovations in Intelligent SysTems and Applications (INISTA), 8-10 August, Anglet, France. https://doi.org/10.1109/INISTA55318.2022.9894230

J. Criado, J. Boubeta-Puig, M. Mena, J.A. Llopis, G. Ortiz, L. Iribarne (2020). Towards the Integration of Web of Things Applications based on Service Discovery. 1st International Workshop on Web of Things for Humans (WOT4H), June 9 - 12, 2020. Helsinki, Finland. LNCS 12451, pp. 24–29, 2020, Springer. ISBN: 978-3-030-65664-5. https://doi.org/10.1007/978-3-030-65665-2_3