# Lowering knowledge : Making constrained devices semantically interoperable

Nicolas Seydoux, Khalil Drira, Nathalie Jane Hernandez, Thierry Monteil

► To cite this version:

Nicolas Seydoux, Khalil Drira, Nathalie Jane Hernandez, Thierry Monteil. Lowering knowledge: Making constrained devices semantically interoperable. International Semantic Web Conference (ISWC 2016), Oct 2016, Kobe, Japan. CEUR-WS, 2016, ISWC 2016 Posters & Demonstrations Track. hal-01467868

HAL Id: hal-01467868

https://hal.science/hal-01467868

Submitted on 14 Feb 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# LOWERING KNOWLEDGE:
MAKING CONSTRAINED DEVICES SEMANTICALLY INTEROPERABLE

Nicolas Seydoux<fnref n="1" />,<fnref n="2" />, Khalil Drira<fnref n="2" />, Nathalie Hernandez<fnref n="1" />, Thierry Monteil<fnref n="2" />

<figure><img src="image_1.png" /></figure>

<footnote n="1">¹ IRIT, Maison de la recherche, Univ. Toulouse Jean Jaurès, 5 allées Antonio Machado, F-31000 Toulouse
{nseydoux, hernande}@irit.fr</footnote>

<footnote n="2">² LAAS-CNRS, Univ. de Toulouse, CNRS, INSA, Toulouse, France, {nseydoux, khalil, monteil}@laas.fr</footnote>
# Lowering knowledge : Making constrained devices semantically interoperable

Nicolas Seydoux<fnref n="1" />,<fnref n="2" />,<fnref n="3" />, Khalil Drira<fnref n="2" />,<fnref n="3" />, Nathalie Hernandez<fnref n="1" />, Thierry Monteil<fnref n="2" />,<fnref n="3" />

**Abstract.** Semantic interoperability is an issue in heterogeneous IoT systems. The limited processing power and memory storage of constrained IoT nodes prevents them from handling enriched data. This paper proposes a method to lower complex knowledge representations into simpler structured data, based on the reuse of lifting mappings from data schemas to semantic models.

## 1 Interoperability in the IoT

The Internet of Things (IoT) is in rapid expansion and deploying at a global scale: projections predict up to 50 billion devices connected in the next ten years [3]. Domains impacted by the IoT are very diverse: agriculture, domotics, e-health, smart cities and manufacturing... The diversity of these domains implies a diversity of data models, leading to a lack of semantic interoperability. To overcome the gap between ad-hoc data models, shared machine-understandable knowledge representation is needed. The wide adoption of ontologies such as W3C's SSN<fnref n="4" /> and the emergence of initiatives such as LOV4IoT, introduced in [4], show the potential of semantic web technologies for the IoT.

However, knowledge expressed in the W3C formalisms (RDF, OWL...) are heavier to process and exchange than ad-hoc models. This is antithetic with the deployment of very constrained devices that have a low processing power and a restricted bandwidth. The most constrained nodes of the IoT are sensors, which convert physical world signals into virtual measures, and actuators, which transform virtual commands into physical world effects (light, temperature, motor...). These nodes cannot produce or consume enriched data, so making the system semantically enabled requires a transformation from data to knowledge (data enrichment, for sensor observations) and from knowledge to data (knowledge lowering, for actuator commands).

In the remainder of this paper, after introducing **mapping-based data enrichment** methods, we propose a lowering method to capture rich knowledge into simpler data formats so that they can be processed by constrained devices.

<footnote n="1">¹ IRIT Maison de la Recherche, Univ. Toulouse Jean Jaurès, 5 allées Antonio Machado, F-31000 Toulouse
{nseydoux,hernande}@irit.fr</footnote>

<footnote n="2">² CNRS, LAAS, 7 avenue du Colonel Roche, F-31400 Toulouse, France
{nseydoux,khalil,monteil}@laas.fr</footnote>

<footnote n="3">³ Univ de Toulouse, INSA, LAAS, F-31400, Toulouse, France</footnote>

<footnote n="4">⁴ http://purl.oclc.org/NET/ssnx/ssn</footnote>
This method is based on the **reuse of existing mappings** used for generating
enriched data instead of dedicated ones, thereby reducing the cost of lowering.
A qualitative evaluation of our approach is then provided.

## 2 Enrichment and lowering: data management in the IoT

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Illustration of data enrichment and lowering</figcaption></figure>

Figure 1 gives an overview of data management issues in the IoT by a use case: data measured by a temperature sensor is displayed by an application using a different data format, and it is also used to control a fan. By definition, IoT nodes produce and consume structured data (raw data value on fig. 1). [7] and [2] exploit the **implicit semantics** encoded in the **syntactic data model** by aligning it to ontologies using semantic annotations. Data lifting (**enrichment** on fig. 1) can thus be done by mapping the schema to an ontology rather than the data itself. To reduce the payload when transferring data, the schema can be accessed and manipulated only when necessary. On the other hand, existing approaches for data **lowering** (from a semantic representation to a syntactic one) rely on dedicated mappings, as in [5] or [1]. To bring interoperability to lower nodes, [6] proposes an ontology-driven **data transformation** approach, i.e. the presentation of a piece of data in a different target format (also illustrated on fig. 1). We propose to use schema mappings to ontologies initially meant for data enrichment for knowledge lowering.

Shared schemas are syntactic interoperability providers. Many standards, especially for the IoT, normalize schemas: oneM2M<fnref n="5" /> with the SDT (Smart Device Template)AllSeen-AllJoyn<fnref n="6" />, or OCF<fnref n="7" /> with OIC<fnref n="8" />. Therefore, using schema mappings for enrichment or lowering is suitable for an IoT system, as it limits bandwidth consumption when exchanging data, integrates constrained devices, and brings semantic interoperability. However, manually aligning a schema to an ontology is a **time consuming process**, and it has to be done for both enrichment and lowering. Our hypothesis is that if a schema only aligned for upstream

<footnote n="5">⁵ http://onem2m.org/</footnote>

<footnote n="6">⁶ https://allseenalliance.org/</footnote>

<footnote n="7">⁷ http://openconnectivity.org</footnote>

<footnote n="8">⁸ http://openconnectivity.org</footnote>
enrichment meets a set of requirements, the mappings can be used for knowledge lowering as well, cutting by half the work required to make constrained devices semantically enabled.

## 3 A pivot-tree based approach to mapping reversal-based knowledge lowering

Our approach to schema alignment reversing is divided into two steps: transformation of an RDF graph into an abstract pivot tree, and serialization of this pivot tree into a concrete syntax. The pivot tree is a **language-agnostic** representation of the final tree (either XML, JSON or an URI for REST interfaces) with no concrete syntax. The pivot tree associates the knowledge expressed in the RDF graph (with its explicit semantics) to the tree-like structure of the targeted schema, so that its semantics is no longer implicit. Algorithm 1 shows the creation process of the abstract tree from the annotated schema and the target ontology.

<caption>**Algorithm 1 Abstract tree creation**</caption>

1: **procedure** `BUILDABSTRACTTREE`(*Schema* `$s`, *Graph* `$g`, *Resource* `$individual`) 	 *match* is a function that finds the schema element corresponding to the root individual
2: &nbsp;&nbsp;&nbsp;&nbsp;`$schemaRoot` ← `match`($s`, `$individual`)
3: &nbsp;&nbsp;&nbsp;&nbsp;`build` constructs an abstract node from an `rdf` node and a matching schema node
4: &nbsp;&nbsp;&nbsp;&nbsp;`$abstractRoot` ← `build`(`$schemaRoot`, `$individual`)
5: &nbsp;&nbsp;&nbsp;&nbsp;**for** `$property` **in** `$graph.triples`(`$individual`, `$property`, `$object`) **do**
6: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**if** `$schemaRoot.hasAnnotatedDescendant`(`$property`) **then**
7: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**if** `$property` **is** `ObjectProperty` **then**
8: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`$abstractNode` ← `buildAbstractTree`(`$schemaRoot`, `$g`, `$object`)
9: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`$abstractRoot.buildObjProp`($s`, `$g`, `$property`, `$abstractNode`)
10: &nbsp;&nbsp;&nbsp;&nbsp;**if** `$property` **is** `DataProperty` **then**
11: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`$abstractRoot.buildDataProp`($s`, `$g`, `$property`, `$object`)

This approach makes assumptions: the knowledge and the schema must meet some requirements. The target format must be a tree-like structure aligned to semantic resources, schema root(s) must be mapped to classes and meaningful inclusions in the schema must be mapped to relationships. There should be no ambiguity in the mapping: when transforming the RDF graph into the abstract tree, every relation from a node in the graph should be associated to one relation from the corresponding node in the schema.

## 4 Preliminary results

To evaluate our solution, we measured the compliance of existing schemas with our requirements, and conducted a qualitative comparison with existing works (cf. fig. 1). Different sources of data schemes were used to assess the hypothesis for a reversible mapping : schemes provided as part of standards specifications (AllJoyn), and a sample of schemes from an online API repository<fnref n="9" />. Overall,

<footnote n="9">⁹ http://www.programmableweb.com</footnote>
these schemes met our requirements, or needed minimum backward-compatible transformation (such as the semantic annotation for enrichment).

<table><caption>**Table 1.** Qualitative comparison of approaches</caption><thead><tr><th></th><th>Supported scenario</th><th>Code base</th><th>Execution time</th><th>Generation required</th><th>Supports inference</th><th>Flexible</th><th>Schema type applicability</th><th>Mapping required</th></tr></thead><tbody><tr><td>Direct schema transformation</td><td>Transformation</td><td>Small</td><td>Fast</td><td>No</td><td>No</td><td>No</td><td>Any to any</td><td>None</td></tr><tr><td>Schema transformation generation [6]</td><td>Transformation</td><td>Large</td><td>Fast</td><td>Yes</td><td>No</td><td>Partially</td><td>Annotated schema</td><td>Two-way</td></tr><tr><td>Two-way mapping [1]</td><td>Transformation and lowering</td><td>Large</td><td>Slow</td><td>No</td><td>Yes</td><td>Yes</td><td>Annotated schema</td><td>Two-way</td></tr><tr><td>Mapping reversal (our approach)</td><td>Transformation and lowering</td><td>Large</td><td>Slow</td><td>No</td><td>Yes</td><td>Yes</td><td>Restricted annotated schema</td><td>One way</td></tr></tbody></table>

Despite their runtime efficiency, transformation-only methods are not suitable because raw data is not enriched and cannot be reasoned upon. Our approach covers less schema than the two-way mapping approach because of the hypothesis that must be validated by the schema, but it is suitable for the schema at stake in the IoT as they are standardized, and requires less mapping work than any other approach.

## 5 Conclusion and perspectives

To bring semantic interoperability to constrained devices, data enrichment and knowledge lowering are required. We propose in this paper a knowledge lowering technique that reuses schema mappings dedicated to data enrichment in order to reduce the cost of integrating constrained devices in an IoT network. Future work will include a more complete evaluation, as well as an integration of this approach to an autonomic agent for the control of a connected apartment.

## References

1. Bischof, S., Decker, S., Krennwallner, T., Lopes, N., Polleres, A.: Mapping between RDF and XML with XSPARQL. Journal on Data Semantics 1(3), 147–185 (2012)

2. Ferdinand, M., Zirpins, C., Trastour, D.: Lifting XML Schema to OWL. Web Engineering (3140), 354–358 (2004)

3. Ganz, F., Puschmann, D., Barnaghi, P., Carrez, F.: A Practical Evaluation of Information Processing and Abstraction Techniques for the Internet of Things. IEEE Internet of Things Journal 2(4), 340–354 (2015)

4. Gyrard, A., Serrano, M., Atemezing, G.A.: Semantic web methodologies, best practices and ontology engineering applied to Internet of Things. In: 2015 IEEE 2nd World Forum on Internet of Things (WF-IoT). pp. 412–417. IEEE (2015)

5. Kopecký, J., Vitvar, T., Bournez, C., Farrell, J.: SAWSDL: Semantic Annotations for WSDL and XML Schema. IEEE Internet Computing 11(6), 60–67 (2007)

6. Köpke, J., Eder, J.: Semantic annotation of XML-schema for document transformations. On the Move to Meaningful Internet Systems: OTM 2010 Workshops 6428 LNCS, 219–228 (2010)

7. Sheth, A., Henson, C., Sahoo, S.S.: Semantic Sensor Web. In: IEEE Internet Computing. vol. 12, pp. 78–83 (2008)