https://doi.org/10.31449/inf.v46i5.3627 Informatica 46 (2022) 39–48 39 An Ontology – based Contextual Approach for Cross-domain Applications in Internet of Things Sihem Benkhaled 1 , Mounir Hemam 1 , Meriem Djezzar 2,3 and Moufida Maimour 4 E-mail: benkhaled.sihem@univ-khenchela.dz, hemam.mounir@univ-khenchela.dz, meriem.djezzar@univ- khenchela.dz, moufida.maimour@univ-lorraine.fr 1 University Abbes Laghrour - Khenchela, ICOSI Laboratory, BP 1252 El Houria, 40004, Algeria 2 University Abbes Laghrour - Khenchela, Algeria 3 LIRE Laboratory, Constantine 2 - Abdelhamid Mehri -University, Constantine, Algeria 4 University of Lorraine, CNRS, CRAN F-54000 Nancy, France Keywords: Internet of Things, semantic interoperability, cross-domain applications, ontologies, generic ontology Received: July 3, 2021 The Internet of Things is an ecosystem which enables objects and devices, such as sensors or actuators, to communicate and exchange information with each other without human intervention. One of the main challenges in the Internet of Things is the lack of semantic interoperability. Devices cannot understand the meaning of raw data, due to the diversity and heterogeneity in data formats from different sources. In order to deal with semantic interoperability, ontologies are the one way to integrate semantics to raw data. They describe an IoT system and represent the data in a standardized way. The IoT devices provide a great deal of IoT data, mainly used for specific IoT applications such as smart home, smart farming, smart cities or healthcare. Therefore, existing applications became isolated in vertical silos, each one of them use independently their own model (i.e. ontology), which makes this ontologies also limited to a specific domain. Our approach has the goal of breaking down these vertical silos and achieves a semantic interoperability across IoT domains in cross-domain applications. In this paper, we propose a development of a single cross-domain ontology named CDOnto. The latter is considered to be a generic across different IoT domains, which can be extended by domain-specific ontologies. The proposed ontological model follows a contextual approach to organize and distinguish the combined domains (i.e. contexts) representations. In addition, the ontology allows reasoning across overlapping IoT domains and infers a complementary and new knowledge required in cross-domain applications. Povzetek: Predlagamo semantični ontološki model za doseganje semantične interoperabilnosti v kontekstu interneta stvari (IoT). 1 Introduction Text The Internet of Things (IoT) is an ecosystem that enables objects or devices such as sensors and actuators to communicate and exchange information data without human intervention. Today, the world is witnessing an increasing use of IoT based devices which collect a huge data, which make the IoT enjoying a tremendous interest from both academia and industry. This data collected is very diverse and heterogeneous as it is obtained from different sources used in various domains. Semantic interoperability is one of the major challenges in the Internet of Things. Whereas, heterogeneity in terms of technologies, communication protocols, vocabularies, and different data formats makes interoperability difficult, because sensor data from the sensor alone may not provide the necessary information to understand the meaning of the raw data. In order to deal with the semantic interoperability, the ontologies are the one way to integrate semantics to raw data to become more understandable by the IoT devices. They allow representing the data in the standardized way and providing a machine-understandable description of entities, relationships, and individuals, in order to exchange meaningful data in a given domain [15]. The IoT devices provide a great deal of IoT data, mainly used for specific IoT applications such as smart home, smart farming, smart cities or healthcare. The IoT applications became isolated in vertical silos, each one of theme uses independently its own model (i.e. ontology). Therefore, the existing ontologies are independent and limited to a specific domain. In IoT, there is a need to combine applicative domains and exploit the complementarily of knowledge in different domains, in order to infer a new and useful knowledge, which used to create a cross-domain applications and breaking down the vertical silos. For example by combining weather forecast, smart home and healthcare data, we can create promising IoT cross-domain application that allows monitoring both indoor and outdoor daily activities of elderly people. 40 Informatica 46 (2022) 39–48 S. Benkhaled et al. In IoT cross-domain applications, combining collected domains data from heterogeneous sources is challenging, since we lose the implicit information on the meaning of these data with respect to the domain (i.e. context) where it used [20]. For example, as long as the sensor does not provide any additional information useful to know the domain of the data, the same reasoning cannot be applied to a temperature measurement when it concerns the human body or an external environment; the former may allow the inference of a possible disease (e.g., fever), whereas the latter enables to deduce weather conditions (e.g., cold). There is a need to provide semantic interoperability across IoT domains data, for that it is proposed to combine the domain-specific ontologies. This combination allows to easing reasoning across overlapping domains and deduces a complementary and new knowledge [19]. Nevertheless, some of the existing IoT ontologies used by most applications promise semantic interoperability, but: (i) the domain separation and the heterogeneity in term of vocabularies make it domain specific and difficult to be applied across domains; (ii) Many ontologies do not follow the semantic web best practices making it hard to be reused and combined by the alignment techniques to form a comprehensive and complete ontology. In order to address the above- mentioned limitations, which hinder semantic interoperability across IoT domains, a comprehensive ontology must be created. The Designing and developing of such comprehensive ontology, which can be used across domains is a complex and ambiguous task. Where, cross- domain IoT require generic and common data representation to ensure cross-domain interoperability between domains and require traversing across different specific domains, by extendibility with domain-specific ontologies or concepts. Ideally, IoT ontology must describe common concepts providing a horizontal silo, while domain- specific concepts constitute vertical silos [3]. These needs can be highly context dependent, and the services that need to be executed may vary depending on the situation at hand or a domain (i.e. context) in which it is used. A prerequisite to context reasoning is context modeling, i.e., the creation of relationships between concepts [1]. Therefore, there is a need to explicitly describe and distinguish the meaning of the data provided by the IoT devices according to the context in which it is used [20]. In this paper, we provide semantic ontological model, with the goal to achieve semantic interoperability across IoT domains, by breaking down the vertical silos and encourage the creation of cross-domain applications. We have proposed a single comprehensive ontology named CDOnto, it is considered to be a generic across different IoT domains, which can be extended by domain-specific concepts. Our proposed model follows a contextual approach to distinguish the different domains (i.e. contexts). In addition, it allows reasoning across overlapping domains and infers a complementary and new knowledge required in cross-domain applications. Furthermore, we are not motivated by creating new concepts in the new ontology and overload the IoT domain, but integrating different required ontologies (i.e. the needed concepts), which are borrowed from existing ones. Our proposed ontology serves as the glue to interconnect data from different IoT domains. It gather under a common umbrella all data about devices and their measurements, and it is built upon and extends the existing efforts in modeling and standardizing the IoT domain concepts and aims to capture most of the important relationships among those concepts. The rest of the paper is structured as follows. Section 2 presents a thorough state of the art and provides the necessary background regarding IoT-related ontologies. Section 3 introduces the CDOnto ontology that we propose. This section presents also the necessary new formalism adapted to represent our ontology and presents an illustration, by taking a smart home for elderly as a case study. Section 4 presents the codification of our ontology using an extended language from OWL. In Section 5 we discuss our work by presenting a comparative study with the related works. Section 6 concludes and presents some open issues that will be addressed in the future. 2 Background and related works Many approaches are available in the literature to allow for meaningful communication between various IoT devices. This is achieved through the use of ontologies that help adding the semantic annotation of raw sensor data in order to provide interoperability and device abstraction. We present in this section some existing ontologies that combine IoT data from several domains to ease the development of cross-domain applications and explain the limitations related to the data combination. There are different ontologies that have been made available since that many specially deal with IoT sensors and other domains. 2.1 Ontologies Ontology describes a specific situation in an IoT domain. Several domain ontologies were proposed each of which describes a distinct domain. Although, we cannot list all the existing ontologies, we can mention the Smart Appliances REFerence (SAREF) Ontology [8] in the domain of smart appliances that aims to reuse and align concepts and relationships in existing appliance-based ontologies. An extension of SAREF called SAREF4EE [9] has been proposed to support interoperability of EEBus and Energy@Home standards. Along similar lines, Dey and Dasgupta [10] propose an extension of OntoSensor ontology in the energy domain to include the spatial and temporal concepts of sensor data. In [13], Huang et al. pay attention to risk recognition in smart home by An Ontology – based Contextual Approach for Cross-domain Applications ... Informatica 46 (2022) 39–48 41 proposing an ontology that describes context, person activities, risk and service. Woznowski et al. [22] have proposed an ontology to semantically label the activities of daily living (ADL) for the smart-homes domain such as cooking food, brushing teeth, etc.. Their ontology is based on dynamic segmentation of sensor data for variable time windows to identify simple user activities. These simple activities are then used to infer more complex activities. In [14], Lee et al. have proposed a University Activity Ontology (UAO), in order to identify activities in a university. The proposed UAO caters to activities specific to a university campus, for example, attending a lecture or having lunch in the cafeteria. We recognize that some of the relevant existing ontologies used by most IoT applications promise interoperability. Indeed, these existing ontologies are independent and limited to a specific domain, but numerous domains knowledge could be combined to exploit the complementary knowledge between the existing domains, in order to infer new and useful knowledge [20]. Domain separation makes disjoint ontologies difficult to be applied in a cross-domain. These ontologies are often restricted to certain domain, where no existing ontology is complete enough to document all concepts required in IoT to semantically annotate every IoT application or applications multi-domains. Moreover, there are no IoT ontologies that explicitly consider many domains in the same model [1]. 2.2 Combination of IoT data To combine and interconnect cross-domain IoT Data, it is essential to combine these domain ontologies to ease reasoning across domain while being context-aware. This is done in order to deduce complementary knowledge according to different contexts [1]. The alignment becomes a fundamental task to form cross domain ontologies [26]. The alignment is the process of determining correspondences between concepts in ontologies, this set of correspondences relations is called an alignment. It is based on the existing links between two or more concepts in different ontologies. Once alignment is completed, different applications will be able to exchange information meaningfully [2]. The lack of good practice in ontology development and the poverty of ontology tools make them heterogeneous and difficult to combine by alignment methods [11]. However, it is necessary to explicitly define contextual information as the contexts inferred from sensor data can vary largely depending on the domain. The prerequisite for contextual inference is context modeling which implies establishing relationships between concepts and a clear description of the different contexts [19]. 2.3 Context awareness In real (natural) life, humans are able to understand the context of data and measurements of objects. However, in IoT, interconnected objects make it possible to receive and send data without human intervention. In addition, the sensors alone do not provide the necessary information related to the context or to the situation of the data captured, and it is not possible to review with these data of the same type in the same way, for example: the temperatures can be for the body as can be of environment. So, we need more details to be added to the data, so that the objects can better understand the situation in which they are operating and then be able to react ideally. The context in IoT is very important, because it can vary according to the IoT domain (weather forecasting, healthcare, environment, etc). In order to achieve contextual inference, the context must be modeled correctly, that is, an ontological representation with relationships between concepts and a clear description of the different contexts must be established. In the literature, several works were interested in the integration of context notion in ontologies. However, the definition of context notion differs from a work to another. For instance, in [1] and [21], the context corresponds to time and location where decisions on activities are based on the time and location of the captured data. In [12, 25], the context corresponds to a point of view interested in a subset of object properties. However, some properties of an object are assumed to be consensual i.e. these properties are seen in all the contexts. In Bouquet et al., the context corresponds to a situation with specific characteristics, i.e. party's subjective view of a domain. In their work they proposed to distinguish global and local contexts as novel notions, where the local contexts share some elements in a global context. 2.4 Limitations To improve the effectiveness of cross-domain applications, priority should be given to the design of their ontologies. Thus, there is a real need to provide a new approach for designing horizontal ontologies to be used in cross-domain applications. One solution consists in applying alignment and fusion methods to the different ontologies [2] but the problem is that these ontologies are very heterogeneous in terms of used formats and terminologies. In addition, the ontologies developer often does not follow the Semantic Web best practices. These incompatibilities issues of the existing domains ontologies make their reuse very hard and applying alignment and merging methods to IoT ontologies very difficult. There is a lack of best practices in reusing, extracting and combining ontologies, because no ontology matching tools are adapted to IoT ontologies maintenance and do not reference concrete tools to encourage the automatic reuse of the domain knowledge already designed. In addition, for the context-awareness properties such as (rdfs:label, rdfs:comment), do not provide any information about the domain itself. 42 Informatica 46 (2022) 39–48 S. Benkhaled et al. In our paper, we consider both the definition of [12] and [6], with some adjustments adapt to an IoT ecosystem. In our proposal, we have developed a multi- contexts ontology, by considering a context as an IoT domain. A specific context (i.e. specific domain) is described by a local representation and shares common ontological elements in a global level. The local representations (i.e. contexts) are also linked by bridge rules or context mappings. 2.5 Multi-contexts in ontologies and stamping mechanism A domain-specific ontology represents concepts which belong to an IoT domain, such as healthcare or smart building. Each domain ontology typically models domain-specific definitions of terms. For example, the concept "temperature" has many different meanings according to different domains. There is a need to provide new approaches for designing horizontal ontologies for cross-domain applications, which can describe several domains. To describe several domains in a single ontology, we have to use contextual or multi- context ontology notion. A contextual ontology characterizes a concept by a set of properties that vary according to context. It needs certain useful properties that a pure shared approach cannot provide. A context is seen as a local representation in relation to others to integrate the different contexts in a single ontology [26]. In each context, the classes are organized in a hierarchy of specialization and interconnected via mapping links. Between classes belonging to different contexts, there are links, called bridges. A contextual ontology requires a stamping mechanism to distinguish to which context each elements belongs. Several approaches have been developed to represent multiple contexts in a single ontology, namely, the MVP model [18], C-OWL language [7], and Borgida's model [5] have represented the multi-viewpoints by using disjoint ontologies linked by bridge rules or context mappings where each ontology represents a particular context. In order to avoid the problem of ontology matching, Benslimane et al. [4] proposed an approach that allows integrating the different viewpoints in the same ontology. In this approach, the authors have introduces the multiple viewpoints in the definition of the concepts. 3 Our proposed approach In a cross-domain IoT application, the combination of data from different domains provides that we call domain data; each of them depends to a domain (i.e. context) where it uses. Thus, the same reasoning cannot be applied to domain data. In order to deal with a semantic interoperability across this domain data, the ontologies are the one way to integrate additional semantics to raw data, which clarify in addition to the meaning, the domain which belongs to. Existing IoT ontologies are domain-specific that cannot be applied across domains; annotate data in a specific domain. Cross-domain IoT needs a comprehensive model that considered being a generic across different IoT domains, which can be extended by domain-specific ontologies. Defining a comprehensive and complete ontology for cross-domain IoT system may be challenging. Although there are more than 200 domain-specific ontologies available [3], but, due to a lack of ontologies best practices and the methods or tools for combining ontologies in efficient manner to cover various domains [5]. For the existing ontologies, there are certain concepts peculiar to the IoT domain-specific applications, while some concepts used are common to all the IoT applications. An ideal IoT ontology should describe all concepts common to every IoT applications (i.e. horizontal silo) and concepts that are specific to domain applications (i.e. vertical silos). Hence, as a step towards developing a comprehensive IoT ontology for cross-domain applications, we have to use a concept of modular ontology and a contextual approach. These two approaches are the required to the horizontal silos in the IoT. To solve the limitations started above, in this section, we propose to develop an ontology that we call CDOnto. The latter shares common (i.e. global) concepts and relations to make them homogeneous and complementary. The proposed model follows a contextual approach to organize and distinguish the combined domains (i.e. contexts) representations. 3.1 Cross-Domain Ontology (CDOnto) Below, we outline the details of our ontological knowledge model. The proposed model is based on multi-representations notion and stamping mechanism. To develop our ontology, we followed a contextual approach. In an IoT cross-domain application, there are certain concepts peculiar to an IoT domain-specific application, while some concepts used are common to all the IoT applications. So, IoT ontology should describe the core concepts common to all IoT applications (i.e. horizontal silo) and extended by concepts that are specific to particular domain of applications (i.e. vertical silos). To do so, our ontology is characterized by two hierarchical levels as shown by Figure 1. Our Cross- Domain Ontology is described in terms of its several modules representing different domains. In addition, the various representations of each domain shared at a global level common ontological elements and bridges. These later establish communications between IoT domains. An Ontology – based Contextual Approach for Cross-domain Applications ... Informatica 46 (2022) 39–48 43 To achieve our goal, we represent each involved domain which considered as a context with a local representation Cxt i. Then, the different local representations are connected by intermediate links as mappings between local representations (i.e. bridge rules). In what follows, we explain the different notions introduced in our ontological model, such as global and local concepts, global and local roles, stamps and bridge rules. We use Description Logics (DLs) language to formalize our ontology model [17]. We begin by briefly explaining the used notations such as global and local concepts, roles linking different concepts, in same or different domains, the bridge rules and stamps. 3.2 Formalism For our requirements of IoT cross-domain ontology modelization, we present in this section several definitions and notions. These latter are introducing in DL as following: Definition 1 A context representation is a sub-ontology that describes a domain of interest such as healthcare, weather forecasting, etc. It is defined as a 3-tuple Cxt i= (CL i, RL i, AL i) where CL i, RL i and Al i are the set of local concepts, local roles and local individuals, respectively. The expression Cxt i:C refers to the entity C as local concept, is related to the context Cxt i. A local role Cxt i:R(C, D) is a relationship between two local concepts C and D defined in the same context Cxt. To allow different representations of different contexts in a single ontology, we have used a stamping mechanism. Stamps is particularly interested in multiple representations of data, it is used to enable manipulations of data elements from different contexts. In our approach, stamps or labels permit each ontological element (i.e. concepts, roles, individuals) to be known which context related or belongs to. Example: Health:Temp means a concept “Temp” defined in health context. Definition 2 A Cross-Domain Ontology is an ontology that provides description of concepts from several domains (contexts). It is defined as a 4-tuple CDOnto= (CG, RG, Cxt, M) where: CG is the set of global concepts; RG is the set of global roles ; Cxt is the set of contexts (domains) ; M is the set of mappings (bridge rules). A Global Concept is a concept that is defined for all IoT application domains. This is the case for instance; of concepts related to the IoT networks or the concepts with can be extended according to a specific domain. That is, ”Sensors”, ”Actuators”, ”Place”, ”FeaturesOfinterests” and ”Actor” are examples of global concepts used by all IoT domains. A Global Role de noted R(C, D) is a relationship between two global concepts .Local representations of different contexts could be connected or linking through intermediate links allowing for communication among various con-texts. This communication, called bridge rule, allows representing links between local concepts of different context (i.e. domain). Bridge Rules describes a rule between one or more source concepts and a target concept of different concepts, three types of links are distinguished: Equivalence Bridge, Inclusion Bridge and global relationship. A bridge rule is a statement of one of the four following forms: Equivalent bridge expresses the link between two local concepts. It is used for concepts having the same meaning but used in two different contexts: 𝐶𝑥𝑡 𝑖 : 𝐶 1 ≡ ↔ 𝐶𝑥𝑡 𝑗 : 𝐶 2 Means that the individual of the two local concepts C 1 and C 2 under the different contexts Cxt i and Cxt j, respectively, are equal. Inclusion Bridge is a subsumption link between two local concepts used in two different contexts. It expresses a link between two local concepts where the meaning of the first concept (i.e. source concept) according to a context implies that of the second one (i.e. target concept). 𝐶𝑥𝑡 𝑖 : 𝐶 1  → 𝐶𝑥𝑡 𝑗 : 𝐶 2 Means that an individual which is an instance of the source conceptC1under the context Cxt i is also an instance of the target concept C 2 under the context Cxt j. Global relations denoted R(Cxt i:C, Cxt j:D) is a relationship between local concepts from different contexts. Subsumption relationships used to explicitly express a partial ordering relation according to the following form: 𝐶𝑥𝑡 𝑖 : 𝐶 1  𝐶 WhereC 1 is the more general local concept defined in the context Cxt i and C is global concept name. Multi-Instantiation is a mechanism that allows an individual to belong to more than one local concept according to different domains (i.e. contexts). Figure 1: The cross-domain ontological model. Global concepts Domain 2 Domain 1 Domain n Bridge rules ..... Global level Local level Global level 44 Informatica 46 (2022) 39–48 S. Benkhaled et al. 3.3 Use case: smart home for elderly We illustrate our CDOnto ontology represented in LD through a use case of smart home for elderly. Figure 2 shows the ontology's composed modules the relationships between them. In this ontology three domains are considered and represented: Smart home, Healthcare and Weather forecasting, denoted respectively by: Cxt 1, Cxt 2 and Cxt 3, see Table 1. 4 Implementation In the previous section, we presented our comprehensive ontology CDOnto, which can be used in a cross-domain IoT system by combining several overloading domains that considered as contexts. Our ontology model makes use of a novel methodology following a contextual approach. Usually, the ontology is expressed using DL syntax and the OWL language. But, as from section 3 dealing with cross-domain ontology is more complex and requires some additional functionality that cannot be modeled using the OWL-DL language; it is insufficient to describe our cross-domain ontology. In this section we have shown how the syntax and the semantics of the OWL-DL can be extended to deal with some problems that couldn't otherwise be dealt with, according to the extended DL defined in subsection 3.1. In particular, we need to extend the OWL language to adapt it to our ontological model, by adding new constructs required to describe different contextual representations and the overlapping relationships between them. The new constructs are described in Table 2. The extended language named IoT-OWL that we proposed as an extension of the OWL-DL support the same set of OWL-DL language constructs (OWL:Class, Figure 2: Smart home for elderly illustrative scenario. Global Concepts FeatureOfInterest, Actor Defines a global concepts which are specified by local concepts, according to different context as following: Cxt 1:Smarthome ⊆ FeatureOfInterest Cxt 2:Healthcare ⊆ FeatureOfInterest Cxt 3Weather ⊆ FeatureOfInterest Cxt 1:Person ⊆ Actor Cxt 2:Patient ⊆ Actor Global Roles ControlledBy (Actuation, Actuators), ActOn (Actuators, State) Local Concepts Cxt 1: Activity, Cxt 2: Disease, Cxt 3: WeatherState BridgeRules 𝐶𝑥𝑡 3: 𝐼𝑛𝑑𝑜𝑜𝑟 ≡ ↔ 𝐶𝑥𝑡 1: ℎ𝑜𝑚𝑒 Expresses that the two local concepts, defined in two different contexts are equivalent. Indeed, the indoor place is a home. 𝐶𝑥𝑡 2: 𝑃𝑎𝑡𝑖𝑒𝑛𝑡  → 𝐶𝑥𝑡 1: 𝑃𝑒𝑟𝑠𝑜𝑛 Expresses that a patient is a person. Global Relations LivesIn (Cxt 2: Patient,Cxt 1:Home) Subsumption relationship 𝐶𝑥𝑡 2: 𝑃𝑎𝑡𝑖𝑒𝑛𝑡  𝐴𝑐𝑡𝑜𝑟 Expresses link between the local concepts Patient defined in the contextCxt 2and the global concept Actor. Multi-instantiation Cxt 1:Person(Sihem), Cxt 2:Patient (Sihem) Says that the individual Sihem is an instance of Person inCxt 1 and is an instance of Patient inCxt 2. Table 1: Example of a cross-domain ontology modeling. User (patient) Representation Smart Home Representation Controlled LivesIn Uses Uses Devices Representation Healthcare Representation Weather Representation Monitored Uses New constructors Uses Context Used to define a context GlobalClass contextLocalClass Used to define a global or local GlobalProperty LocalProperty Used to define a global or a local property UnderContext OnContext Used to specify the context of the local ontological elements class and property, respectively InclusionBridge EquivalenceBridge Used to state a bridge rule between local classes defined in different contexts Table 2: New constructs supports by IoT-OWL language. An Ontology – based Contextual Approach for Cross-domain Applications ... Informatica 46 (2022) 39–48 45 rdfs:subClassOf, etc). In addition, it allow context notion on OWL ontology. The OWL language is extended with respect to its syntax and semantics to meet the contextualized ontology requirement. Note that, the aforementioned IoT-OWL constructs are all specializations of their OWL counterparts. Figure 3 shows top Level of our ontological model that represents a meta-ontology by showing the subclass relationships between the main elements of our language IoT-OWL and OWL.This meta-ontology describes special concepts that will be instantiated to define a global concepts which are used in all domains, and also local concepts which are specific to an IoT domain. For example, the concept "GlobalClass" and the property "LocalClass" have been created to express that a concept is used as global (i.e. horizontal silo) used by all IoT domains and as local (i.e. vertical silos) used by a specific IoT domain, respectively. "GlobalClass" and "LocalClass" are meta-ontology classes to be instantiated by global or local concepts respectively. The new constructors supported by IoT-OWL from OWL-DL in are formalized in a meta-ontology (i.e. upper ontology) for building cross-domain ontology by taking into account different IoT contexts. Figure 3 shows the subclass relationships between modeling constructs of a novel language IoT-OWL and OWL-DL, specific constructs are added and adapted from the existing one. We used Protégé, open source software, to create our cross-domain IoT ontology. Firstly, we developed a meta-ontology that describes the main components of knowledge to be considered in our cross-domain ontology, which can be extended with specific information about the domain of application in its second level. Then we have to import into the OWL editor Protégé an OWL file containing the IoT-OWL classes, subclasses, and properties. After importing the IoT-OWL definitions, the next step is to construct domain-specific concepts, using the IoT- OWL definitions to represent global/local concepts and relationships. The relationships in our ontology allow describing the mapping between the different local representations. We give an example in the case of devices that provide services according to two IoT domain systems such as healthcare and smart home environment. So the system should propose daily activities which will be carried out in a given moment, as services by taking into account the health state of the person in the house. Now, we specify each class of our ontology. After all the key classes have been defined, within the ontology, specific object and data properties are defined in these classes. 4.1 Definition of Classes and Properties Figure 4 presents an example of the hierarchical view of the classes of our ontology, their object properties and data type properties displayed in Protégé. Based on OWL grammar rule, the basic meta-classes LocalClass and GlobalClass are modeled as being subclasses of the owl metaclass: Class, Domains as being a subClass of owl: Thing and the others (i.e. ClassOfUnderContext, ClassOfonContext) as being subtype of the owl meta-property: ObjectProperty. By using the "individuals" attribute, we define for local and global classes as instances of LocalClass and GlobalClass, and express the concept that a "Concept1" is an instance of LocalClass. Figure 3: Top level of cross-domain ontology. Figure 4: Cross-domain ontology Classes and ObjectProperties hierarchies. Rdfs : Ressource Rdfs : Class Rdfs : Contexts Rdfs : Property Owl : Class Iotowl: GlobalClass Iotowl:LocalClass Generaly link Iotowl:InclusionBridge EquivalentBridge Iotowl:OnContext Iotowl:UnderContext Iotowl:BelongsToContext Stampings elements Links between local representations 46 Informatica 46 (2022) 39–48 S. Benkhaled et al. 4.2 Processing and reasoning Many types of contextual information cannot be easily inferred. For our requirements, SWRL rules applied to our cross-domain ontology can deal with such complex contexts. The main purpose of context reasoning is to check the consistency of the contexts as well as deducing high-level implicit context from low-level explicit contexts. IoT applications aim at reasoning on heterogeneous semantic measurements, example: suggest food according to health state and season. This example shows that three sensor networks related to three domains have been merged: healthcare, weather forecasting and smart home. The proposed system aims to detect events that influence patients. Practically, these rules detect whether an adverse event occurs and may predict the potential risk when the measurements coming from the connected objects exceed the safety concern thresholds. As an example our approach deduces from the health domain and the temperature measurement that the IoT data corresponds to a BodyTemperature. Another rule deduces that if the BodyTemperature is higher than 38 °C and the person is located in the bedroom then it corresponds to Flu. The Flu concept is described as a Disease in health ontology. SWRL rules are given formal style where the antecedent of a conditional and concluding its consequent is a validating form of a statement. These reasoning rules were formulated in the Semantic Web Rule Language (SWRL) to express all required statements. We used protégé editor and the reasoner Jess to check the performance and inconsistencies of the proposed ontology. In our cross-domain ontology, the SWRLTab semantic web rule language is a plug-in in of Protégé that edits the rules. This plugins allows users to enter the rules for any sort of ontology-based system. We give a few simple examples of rules. To suggests activities according to the weather forecasting: Rule1: Observation (?obs1) ^ measured (?obs1, ?temp) ^ measured (?obs1, ?hum) ^ humidity (?hum) ^ UnderContext (?hum, smarthome) ^ UnderContext (?temp, healthcare) ^ hasvalue (?v2) ^ swrlb:greaterthan (v2, 38) WindowActuator (?wa) ^ HasState (?wa, ’CLOSE’). If patient has high body temperature and the environment has high humidity then the window must be closed. Rule2: Observation (?obs1) ^ measured (?obs1, ?temp )^ temperature (?temp) UnderContext (?temp, healthcare) ^ hasvalue (?v1) ^ ?swrlb:greaterthan (?v1 ,38) ^ Patient (?p1) ^ Bed (?b) stayIn (?p1, ?b1) ^ Diseases (?Flu) Has (?p1, ?Flu) ^ screenFridge (?sf) ^ display (?sf, ”you can have some lemon and honey”). Home remedy such as lemon and honey are recommended for the Flu disease. 5 Discussion The Table 3 contains the existing ontologies, which work on reuse existing domain ontologies by combining them for IoT cross-domain in order to enhance semantic interoperability between heterogeneous IoT systems. Ontologies Descriptions Multi-domains (Cross-domain) Modular Scalable reusable Cross-domain reasoning SAREF [8] Smart Appliance REFerence ontology, exists in the domain of smart appliances and aims to reuse concepts and relationships in existing appliance-based ontologies. N Y N Y N FIESTA- IoT [23] Unified ontology, is a combination of existing reference ontologies in a single one, aims to provide federation and interoperability to the IoT device and sensor data. N N N N N M3 [24] Machine-to-Machine Measurement is a comprehensive ontology proposed as an extension to W3C’s SSN ontology to support the description of sensors observations, phenomena, their units and domains. Y N N N Y (Each context separately, Linked Open Rule) Our Ontology (CDOnto) Cross-Domain Ontology is a generic ontology Y Y Y Y Y (separately contexts and cross-domain) Table 3: Comparison the existing ontologies in related works (Y= Yes, N= No). An Ontology – based Contextual Approach for Cross-domain Applications ... Informatica 46 (2022) 39–48 47 Through the later, a comprehensive study between theses ontologies was made according to a set of criteria such as multi-domain, modularity, scalability, reusability and reasoning.Our ontology is better in such criteria, for example SAREF ontology is limited to domains including smart appliances, energy, building management systems. In addition, since the concept of location used by them is limited to ‘Zones’ (HVAC Zones, rooms, floors) inside the buildings, it can’t be extended or scalable to other applications areas, because they do not cover the entire range of sensor available in the Market. Moreover, FIESTA-IoT has the same problem of SAREF, despite it is a unified ontology, by combination of existing reference ontologies in a single one, but the non- modularity make it difficult to be scalable. M3 has combined several domain-specific ontologies in a single ontology, it reuse existing ones instead of proposing new concepts. But, it has non-modular structure that is an important criterion, which makes it a heavy and complex ontology. Our ontological model is based on contextualization and hierarchical division. In this approach we have reused some concepts from existing reference IoT ontologies; such as SSN and IoT-O, as part of the “Global representation” in upper level as generic representation. Then global concepts are extended by new domain-specific concepts that are defined in lower level as local representations. The hierarchical division of our ontology makes it more modular and enhances the readability. In addition, it improves the scope of reusability and scalability of the proposed ontology. Also, it plays a significant role in term reasoning on sensor data, to infer high level knowledge unlike aforementioned ontologies. Wherever, we can do simple or complex reasoning, either on each local representation separately or across different domains described by different local representations. In addition, it allows for reasoning using bridge rules to infer cross-domain information. 6 Conclusion In this paper, we are interested to the semantic interoperability across domains in IoT applications. To deal with this issue, we have proposed a comprehensive ontological model which describes an IoT system by considering several domains in single cross-domain ontology. This ontology is considered as a generic which can be extended by domain-specific concepts. The motivation to build such generic ontology comes from: (i) not overload the IoT with a new ontology but integrating various existing required ontologies i.e. the needed concepts, into a single and holistic one. (ii) Reusing as much possible concepts from existing IoT ontologies. To build our ontology, we have followed a contextual approach to organize and distinguish the combined domains representations, it consists of define various local representations in a local level, which cover specific IoT domains as contexts, such as smart home, weather and healthcare. Then, the local representations used in this ontology share common elements in a global level. In this approach, the ontological model is not automatically extendable or scalable, and it has not adopted an optimal method of reuse. As part of future works is to improve our ontological model, we plan to consider the local representations as independent ontologies, which are imported and integrated entirely. Whereas, in order to overcome the complexity and biggest of the ontology, we can add or remove it in the real time need of an application. This issue can be dealt with and solved by the notion of "ontology clustering", to only use the domain ontology that are interested in. To implement this process, a solution could be to enable/disable an ontological module. References [1] Almeida, A., Lo´pez-de Ipin˜a, D., (2012). Assessing ambiguity of context data in intelligent environments: Towards a more reliable context managing system. Sensors 12, 4934–4951. https://doi.org/10.3390/s120404934 [2] Ardjani, F., (2015). Ontology-alignment techniques: Survey and analysis. International Journal of Modern Education and Computer Science 11, 67–78. DOI:10.5815/ijmecs.2015.11.08 [3] Bajaj, G., Agarwal, R., Singh, P., Georgantas, N., Issarny, V., (2017). A study of existing ontologies in the iot-domain. arXiv preprint arXiv:1707.00112 . [4] Benslimane, D., Arara, A., Falquet, G., Maamar, Z., Thiran, P., Gargouri, F., (2006). Contextual ontologies, in: International Conference on Advances in Information Systems, Springer. pp. 168–176. https://doi.org/10.1007/11890393_18 [5] Borgida, A., Serafini, L., (2003). Distributed description logics: Assimilating information from peer sources, in: Journal on data semantics I. Springer, pp. 153–184. DOI: https://doi.org/10.1007/978-3-540-39733-5_7 [6] Bouquet, P., Giunchiglia, F., Van Harmelen, F., Serafini, L., Stuckenschmidt, H., (2003). C-owl: Contextualizing ontologies, in: International Semantic Web Conference, Springer. pp. 164–179. https://doi.org/10.1007/978-3-540-39718-2_11 [7] Bouquet, P., Giunchiglia, F., Van Harmelen, F., Serafini, L., Stuckenschmidt, H., (2004). Contextualizing ontologies. Journal of Web Semantics 1, 325–343. https://doi.org/10.1007/978-3-540-39718-2_11 [8] Daniele, L., den Hartog, F., Roes, J., (2015). Created in close interaction with the industry: the smart appliances reference (saref) ontology, in: International Workshop Formal Ontologies Meet Industries, Springer. pp. 100–112. DOI:10.1007/978-3-319-21545-7_9 48 Informatica 46 (2022) 39–48 S. Benkhaled et al. [9] Daniele, L., Solanki, M., den Hartog, F., Roes, J., (2016). Interoperability for smart appliances in the iot world, in: International Semantic Web Conference, Springer. pp. 21–29. https://doi.org/10.1007/978-3-319-46547-0_3 [10] Dey, S., Dasgupta, R., (2014). Sensor knowledge representation with spatiotemporal annotation: An energy sensor ontology use case, in: IEEE International Conference on Pervasive Computing and Communication Workshops, IEEE. pp. 455– 459. https://doi.org/10.1109/percomw.2014.6815249 [11] Gyrard, A., (2013). A machine-to-machine architecture to merge semantic sensor measurements, in: Proceedings of the 22nd International Conference on World Wide Web, pp. 371–376. https://doi.org/10.1145/2487788.2487945 [12] Hemam, M., (2018). An extension of the ontology web language with multi-viewpoints and probabilistic reasoning. International Journal of Advanced Intelligence Paradigms 10, 247–265. https://doi.org/10.1504/ijaip.2018.090789 [13] Huang, X., Yi, J., Zhu, X., Chen, S., (2016). A semantic approach with decision support for safety service in smart home management. Sensors 16. URL: https://www.mdpi.com/1424-8220/16/8/1224. [14] Lee, K., Lee, J., Kwan, M.P., (2017). Location-based service using ontology-based semantic queries: A study with a focus on indoor activities in a university context. Computers, Environment and Urban Systems 62, 41–52. https://doi.org/10.1016/j.compenvurbsys.2016.10.00 9 [15] Mishra, S., Jain, S., (2020). Ontologies as a semantic model in IoT. International Journal of Computers and Applications 42, 233–243. https://doi.org/10.1080/1206212X.2018.1504461 [16] Okeyo, G., Chen, L., Wang, H., Sterritt, R., (2014). Dynamic sensor data segmentation for real-time knowledge-driven activity recognition. Pervasive and Mobile Computing 10, 155–172. https://doi.org/10.1016/j.pmcj.2012.11.004 [17] Ozaki, A., (2020). Learning description logic ontologies: Five approaches. Where do they stand ? KI-Ku¨nstliche Intelligenz 34, 317–327. https://doi.org/10.1007/s13218-020-00656-9 [18] Seydoux, N., Drira, K., Hernandez, N., Monteil, T., (2016). Iot-o, core-domain iot ontology to represent connected devices networks, in: European Knowledge Acquisition Workshop, Springer. pp. 561–576. https://doi.org/10.1007/978-3-319-49004-5_36 [19] Sudhana, K.M., Raj, V.C., Suresh, R., (2013). An ontology-based framework for context-aware adaptive e-learning system, in: International Conference on Computer Communication and Informatics, IEEE. pp. 1–6. DOI:10.1109/ICCCI.2013.6466162 [20] Venkatesh, J., Chan, C., Akyurek, A.S., Rosing, T.S., (2016). A modular approach to context-aware iot applications, in: IEEE First International Conference on Internet-of-Things Design and Implementation (IoTDI), IEEE. pp. 235–240. DOI:10.1109/IoTDI.2015.13 [21] Wang, X., Ji, Q., (2012). Learning dynamic bayesian network discriminatively for human activity recognition, in: Proceedings of the 21st International Conference on Pattern Recognition (ICPR2012), IEEE. pp. 3553–3556. [22] Woznowski, P.R., Tonkin, E.L., Flach, P.A., (2018). Activities of daily living ontology for ubiquitous systems: Development and evaluation. Sensors 18, 2361. https://doi.org/10.3390/s18072361 [23] Agarwal, D. G. Fernandez, T. Elsaleh, A. Gyrard, J. Lanza, L. Sandrez, N. Georgantas, V. Issarny, (2016). Unified IoT Ontology to Enable Interoperability and Federation of Testbeds, in: 3rd IEEE World Forum on Internet of Things, pp. 70-75. https://doi.org/10.1109/wf-iot.2016.7845470 [24] Gyrard, A., Datta, S.R., Bonnet, C., Baudaoud, K., (2014). Standardizing Generic Cross-Domain Applications in Internet of Things, in: Globecom Workshops, IEEE, pp. 589-594. https://doi.org/10.1109/glocomw.2014.7063496 [25] Hemam, M., Djezzar M. and Boufaida, Z. (2017). Multi-viewpoint Ontological Representation of Composite Concepts: Description Logics Based Approach. Int. Journal of Intelligent Information and Database Systems, Inderscience Publishers Ltd. Vol. 10, N° 1/2, pp. 51–68. https://doi.org/10.1007/978-3-642-33609-6_10 https://doi.org/10.31449/inf.v45i7.3669 [26] Djakhdjakha L., Hemam M., Boufaida Z. (2012). Multi-viewpoints ontology alignment based on description logics. In: Benlamri R. (eds) Networked Digital Technologies. NDT 2012. Communications in Computer and Information Science, vol 294. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30567-2_10