Dynamic Ontology Enrichment and Reasoningin AmI Environments Aitor Almeida 1 Iker Larizgoitia 1 Diego Lopez-de-Ipiña 2 Xabier Laiseca 1 Ander Barbier 2 Unai Aguilera 1 Pablo Orduña 1 Abstract. Context in an environment usually suffers from sudden changes; people and devices move from one place to another, previously unknown objects appear and existing ones disappear. AmI-enhanced environments must be flexible enough to adapt and respond to these changes. This work describes a semantic infrastructure which manages context, reasons over it and, more significantly, it is capable of dynamically enriching the ontology that models context. 1 INTRODUCTION The management of environment and user context is one of the key aspects of Ambient Intelligence (AmI). Without context knowledge, an intelligent environment cannot adapt itself to user needs. This explains why management of context should be one of the main activities in any Ambient Intelligence system. Smartlab is a semantic middleware platform that aims to facilitate this task while making explicit the previously hidden context. Semantic technologies are used to represent context and to infer from it reactions to be taken. The use of a context ontology allows Smartlab to integrate information coming from heterogeneous sources and to share it easily. The most remarkable feature of the SmartLab middleware is its ability to dynamically extent the context ontology with new context-modelling concepts and rules provided by non- previously available devices within an environment. Dynamic discovery and installation of previously non-available semantic devices is automatically performed by this middleware. Furthermore, its context ontology is enriched taking into account the semantic knowledge and behavioural information in the form of rules provided by these newly discovered devices, which were not taken into account in the design phase. The following sections describe the context managing and semantic reasoning mechanisms used by this middleware. In section 2 previous work on semantic context management is discussed. Section 3 explains the system architecture and the dynamic context enrichment mechanisms it offers. Section 4 describes the Smartlab Context Ontology created to model the context. In section 5 the semantic reasoning capabilities of this middleware over the context are explained. Finally in section 6 conclusions are given and possible future work is suggested. 2 RELATED WORK In recent years some projects [1][2][3] have created ontologies that model the context. SOUPA [4] is a set of ontologies oriented to ubiquitous and pervasive applications used by the COBRA project[1]. It is composed by two sub-sets SOUPA Core and SOUPA Extensions. The SOUPA Core defines the elements that are present in any ubiquitous application while SOUPA Extensions gives support to more specific applications. CONON [5] is used by the SOCAM [2] project to model the context of pervasive computing applications. It is also divided in to sets, one with the general information shared between all the applications and the other one domain specific. CODONT [6] is used by the CODAMOS [3] project and its main aim is to create an adaptable and flexible infrastructure for AmI applications. These three ontologies have in common some similar elements (see Table 1) like information about location, time, people/users, actions/activities and devices. There are also some elements unique for each system, like the information about the environmental conditions, events, policies and services. Table 1. Context modeling ontologies SOUPA CONON CODONT Similar elements Person, Agent, BDI, Policy, Event, Action, Time, Space Location, Person, Activity, Computing, Entity User, Service Platform, Location, Time, Environmental condition While all these ontologies are easily extensible, this process takes place offline. In Smartlab this extension of the ontology is done dynamically, on the fly, when a new device is discovered in the environment. The device is able to add new concepts to the ontology creating new classes that are able to model new context information. This new concepts are checked before adding them to the ontology. Moreover new domain rules are also added to the system with the new devices, adapting the system reactions to the new knowledge. This mechanism enables the system to be more flexible and adaptable. wOther frameworks [7] have also used ontologies to describe networked sensor and actuators. But while they use OWL-S to describe the capabilities of the devices the Smartlab approach describe the context captured by the devices, emphasizing the “What, When and Where” and not the “How”. Another distinguishing feature of Smartlab is the decoupling of the devices from the context managing service. This is achieved with the use of OSGi [8] and an event-based architecture. Events generated in the ontology are translated to OSGi events and propagated to the devices. Other frameworks have also used events to decouple services. For example agents in the Open Agent Architecture (OAA) [9] are structured around the propagation of and reaction to events. OAA also minimizes the effort required for the aggregation of new agents to the system via “facilitator agents” which use metadata to match the requests from different agents. Although this type of coordinator may exist in Smartlab their presence is not mandatory, each service knows how to react to the context changes represented in the events 1 Tecnológico Fundación Deusto, 2 Universidad de Deusto, Spain. E- mail: 1 {aalmeida, uaguiler, ilarizgo, xlaiseca, orduna}@tecnologico.deusto.es, 2 {dipina, barbier}@eside.deusto.es