Ontology-Based Context Event Representation, Reasoning, and Enhancing in Academic Environments

: An Ambient Intelligence responds to user requests based on several contexts. A relevant context is related to what has happened in the ambient; therefore, it focuses a primordial interest on events. These involve information about time, space, or people, which is signiﬁcant for modeling the context. In this paper, we propose an event-driven approach for context representation based on an ontological model. This approach is extendable and adaptable for academic domains. Moreover, the ontological model to be proposed is used in reasoning and enrichment processes with the context event information. Our event-driven approach considers ﬁve contexts as a modular perspective in the model: Person, temporal (time), physical space (location), network (resources to acquire data from the ambient), and academic events. We carried out an evaluation process for the approach based on an ontological model focused on (a) the extensibility and adaptability of use case scenarios for events in an academic environment, (b) the level of reasoning by using competence questions related to events, (c) and the consistency and coherence in the proposed model. The evaluation process shows promising results for our event-driven approach for context representation based on the ontological model.


Introduction
Any ambient intelligence is immersed with events that are connected between them and with relevant information such as time, location, and actors [1]. An academic environment is not exempt from this situation, in which events are related to academic activities. They should be structured and readable by a machine since manual handling is time consuming and tedious [2]. Their automatic management can make it possible that the academic environment offers services based on events for professors, students, and visitors, such as voice interaction, question-answering systems, and search engines [3]. Enrichment and reasoning processes with events to discover new information, are impossible to carry out without a proper structure. It is important to have a model to represent events with their contextual information: Location (where?), time (when?), person (who?), and event category (what kind of event has happened?). In this manner, the model can execute reasoning with events and allow an enrichment process from context information in academic environments [4].
Ontologies provide mechanisms to semantically structure the information. They achieve a high level of expressiveness in the concepts, allowing the addition of semantics to the domain model. Ontologies are developed on formal languages and semantics, allowing the execution of reasoning about ontological concepts in a particular domain. As a result, they are formal and machine-readable [5].
Events have contextual information, such as time, actors, and location [6]. Research about the facts that have occurred in the real world and their representation as events has gained more interest in the computer science community.

Related Work
In this section, we present the works related to event enhancing, context modeling in intelligent environments, and the use of ontologies for them.
The goal of an intelligent environment is to improve the user experiences, for which several pieces of contextual information are characterized and depicted from a domain in perspectives as follows. In [9], a formal context model based on Ontology Web Language (OWL) was proposed. The main aspects to consider were semantic context representation, context reasoning, knowledge sharing, and context classification. The authors affirm that a great benefit of the model is the ability to reason about various contexts. They consider the following modules of context in a home environment: Location (indoor and outdoor spaces), person, activity (scheduled or deduced activities), and entity (devices, networks, agents, and applications). The authors of [10] identify human behavior through an ontology that combines low-level primitives of behavior, namely activity, locations, and emotions, as context information. Meanwhile, [11] established the context knowledge as the following modules: Activity (action, event, task, process), location (buildings, indoor spaces, regions, outdoor spaces), profile (users, services, devices), environment (conditions, social, regulations), role (social roles, civilians, owners, providers), status (biological, cognitive, current, past), time (date and time zone), and agents (organisms, groups, commercial agents).
The ontology-based context modeling was validated in several environments and the definitions of context information were consolidated in [12]: Smart parking, smart city, smart home, smart business office, and smart healthcare. However, in the academic domain, the model was not validated. Ontology-based context-aware access control (OntCAAC) is a generic framework that models dynamic contexts and access control policies [13]. The aim is to use a policy model for specifying and enforcing context-aware access control. The OntCAAC provides the capability to control access for software services and resources by taking into account the context information. This ontology defines as general context the following entity classes: User, role, source, owner, relationships, place, person, and device. The authors of [14] propose an ontology-based modeling of a smart living room environment and their contextual information for enabling a common understanding of context and enhancing. Based on this concept, modeling a smart room starts by specifying the services that each piece of equipment can provide and the set of information that triggers the service. The authors of [15] present an ontology network for a mobile environment that consists of eleven modular ontologies: User, role, environment, location, time, service, provider, device, interface, source, and network. This ontology covers a wide range of concepts related to context representation. A user profile model for context-aware application personalization is explained in [16]; the authors concentrated on concepts to model a dynamic context: User time, user location, user activity, and user context. In [17], an architecture for the development of context-aware services based on ontologies is proposed, which is composed of three main elements: A meta-model of context, an ontology for the meta-model, and a reasoning engine.
Reference [18] exposes an ontology-based context model to capture general concepts about users and business. An ontology-based model and rules to classify the users context and business are presented. Their ontology describes general concepts: Space, matter, object, event, and action. The domain particularizes the vocabulary and properties related to a generic domain by specializing terms in the upper ontology. This model is composed of three sub-models: User context, business context, and information feature model. Reference [19] presents a context-aware system with context management and reasoning. A domain ontological model is presented for a smart home, which includes contexts as classes: Person, devices, space, time, environment, and activity. The corresponding reasoning is carried out with the SWRL rule. On the other hand, reference [20] affirms that the context information and context awareness are some of the drivers for the Internet-of-Things (IoT) paradigm, so they proposed a generic approach for modeling the ontology-based context in Internet-of-Things, considering the following classes: Object (devices), person (actors), CompEntity (resources), and location (places).
In [21], the authors expressed that the contexts in the smart home environment using ontologies provide healthcare services. The set of contexts are the user's health profile, environmental data (temperature and humidity), location, and devices. The variety of context information is useful for monitoring a simple health condition, but the time context is neglected. A rule-based model using ontologies for representing and reasoning on useful contextual information is described in [22], which provides appropriate services in ubiquitous healthcare systems that allow monitoring of the health of patients. The contexts represented in the ontological model are personal data, sensor data, services, and devices, leaving out the time context. The authors of [23] present a variety of health-related ontology and inference-based intelligent healthcare information services, to build context ontology for the user's environment. The authors propose a model and provide real-time intelligent healthcare service, including the following context: Health weather information, location information, health devices, and personal health information. Reference [24] investigates how to build an ontology knowledge repository to provide ubiquitous healthcare and medical recommendations. The work addresses an ontology to represent information about patients, disease, location, devices, activities, environments, and services. The main aim is to detect and avoid potentially dangerous situations.
In [25] a framework is presented that consists of an IoT infrastructure, end-users, relatives, health and care professionals, and organizations. Activities are obtained using an incremental reasoning process. The authors show that is possible to realize a context recognition over the activities and the events occurring in the home by using a population of ontology about a smart environment. In [26], an ontology model based on sensors is proposed to describe the heterogeneous web resources by importing the time and space ontology and the population of the hydrological classes, and executing reasoning rules. The authors also developed a prototype to allow end-users to model, query, and reason with the ontology model.
The authors of [27] describe an approach for processing Internet of Thing (IoT) events, which detects events by using deep convolutional neural networks to match events based on extracted features. In [28], a semantic model was proposed for event management, representing actions and events in ambient intelligence to know what actions are happening, how they are related to each other, and how computational systems should think about their meaning. An event is defined as a set of individual occurrences that cause changes in the world.
iKnow: An ontology-driven framework for semantic situation understanding in pervasive multi-sensor environments for human activity recognition [29]. Authors refer to the term "event" as low-level observation types and higher-level activities. An event can be an activity or an observation with a temporal entity, location, and agents (actors). An ontology-driven event-processing framework as part of the middleware for smart spaces is presented in [30], where an event is defined as a record of activity in a system for the processing; their events include a category and the timestamp.
In [31], middleware support is provided for flexible event representation, query, and reasoning, where an event is an action that involves actors, an instant, a goal, and a location. In [32], the event concept is introduced by using a shared ontology called SOUPA-Standard Ontology for Ubiquitous and Pervasive Applications. SOUPA is designed to model and support pervasive computing applications. This ontology is expressed using Ontology Web Language OWL and includes modular component vocabularies to represent intelligent agents with associated beliefs, desires, time, space, events, user profiles, actions, and policies for privacy. The authors of [33] present a framework for inferring semantically annotated glycemic events on the patient, which leverages data from mobile wearable sensors. The authors use a standard machine-readable data model to represent events and they include observations like temporal and location information.
In [34], the knowledge acquisition method for the construction of a semantic representation in virtual organizations is included. In [35], an event ontology is constructed concerning interesting users' visits to web sites; taxonomic and semantic relations associated with events are depicted. The authors of [36] develop an ontology to support the administrative procedures of decentralized government organizations. The entities depicted in the ontological model are organization, people, document, data. A user interface was created to query actions about government processes based on SPARQL queries. Table 1 shows a resume of findings of relevant analyzed work in terms of context information considered in each one and the application domain. With the revision of this related work, we detected that an event-driven approach is necessary based on a customized and modular ontological model for the academic context modeling, enhancing, and reasoning process.

Event-Driven Approach Based on an Ontology Model
In this section, the event-driven approach based on an ontology model is presented for context information, which includes event representation, reasoning, and event enhancing. For event representation, a modular perspective was followed with the methodology presented in [5]. The proposed modules are part of a customized ontology system for the academic domain, where five domain modules are proposed: Person, time, location, network, and event. In addition, we present how it is possible to reason with events and the enrichment process to discover new event information and return it to the proposed ontological model.

Event Basis
Events happen in any daily process. People know and perceive the world through events. They help to organize the perceived information and give a spatial and temporal order; in addition, they situate the protagonists that appear. In this way, events have been conceived as an activity that involves a change of state, a location, and temporal and causeeffect aspects [37,38]. A definition from the point of view of the knowledge representation field is presented in [39], which affirms that all events are given according to intervals and instants of time and that they involve a causality. On the other hand, according to [40], an event is an entity that can be involved in causality and that is identified by its location in a region of space-time. Finally, The authors of [6] affirm that events can be organized into five issues: Location, temporality, protagonists, causality, and intentionality.
The definitions of events presented above come from different perspectives. However, they share a common meaning, which is considered to be the concept of an event as an action or activity that is characterized by the following dimensions: Actors, location, temporality, and causality. In this paper, we adopt such definitions and we rely on the events being the core of the context information in academic environments.
According to this cognition, we obtain a formal definition of the event as follows. An event E is defined as E = (E, A, L, T), where E is the event category, A is the actor involved in the event, L is the location information, and T is the time associated with the event.
The assumption of events as a core of the academic context is part of the basis in our context modeling since they help to build a representation model for supporting the reasoning and enrichment process. Therefore, they provide the fundamental knowledge for context modeling using ontologies in the academic environment.
According to Gruber [41] "an ontology is a formal description of the concepts and the relationships between them". Thus, ontologies provide the mechanism to represent concepts formally, they are human-understandable and readable by computers. Ontology elements are concepts (classes), taxonomic relations, non-taxonomic relations (data or object with domain and range), and individuals. We propose that each component of the event becomes a context module or individual ontology. With the purpose of integrating a final customized ontology system for an academic domain, where all modules are connected.

Event Representation
A semantic representation of events is carried out with a whole ontological model. Five individual ontology modules and the integration of them are described as follows.

Person Ontology
Actors are a fundamental context of events. For the academic domain, we have depicted eight classes, which depend on the person class as a hierarchy shown in Figure 1.
The actors who participate in events are considered in the person module. This ontology considers the data and object property relations shown in Table 2, which exposes the relationships with the corresponding domain and range class or data type.

Time Ontology
The time context defines when an event has happened. For this purpose, we have developed the Time module, which considers instants and time intervals. TemporalEntity is an upper class of the taxonomy as shown in Figure 2.
To complete our time module, we defined that each interval has a beginning and end instant for expressing the starting and end time. On the other hand, an instant considers six customized data properties to represent a full calendar time: hasSecond, hasMinute, hasHour, hasDay, hasMonth and hasYear.

Location Ontology
The places where events can have occurred are related to the physical spaces for an ambient. They are necessary for the operation of the academic organization. Regarding the physical space context for events, we depicted a customized location ontology, which is shown in Figure 3.
In our customized location of events, there are two location types as follows. Indoor spaces are heavily academic context based and bounded by physical divisions; for instance, cubicles, laboratories, classrooms, or auditoriums. Outdoor spaces are open places without boundaries. Both physical spaces can be located next to each other, which made us consider an object property (isBesideOf) for this purpose. Moreover, it is possible that physical space is part of another or is contained within it, originating the isLocatedIn object property. The Location ontology has 13 data properties to compose the location context for event modeling, reasoning, and enhancing. They help us to know in detail the attributes depicted in a physical space, such as hasAirConditioner, hasArea, hasCarCapacity, hasDoorState, hasFan, hasLampsNumber, hasLevel, hasNamePhysicalSpace, hasPeopleCapacity, hasPro-jectionScreen, hasProjector, hasService, and hasWindow.

Network Ontology
The relevant context information in any academic environment is the data related to weather and comfort conditions. In the academic domain, temperature, humidity, and luminosity are relevant to offer suitable services to the user based on context. It is necessary to acquire environmental data to have physical environmental sensors. On the other hand, people arrive and leave an academic environment, and such simple events are detected with presence sensors. Both aspects are considered and depicted in our network module. Figure 4 shows network ontology as an abstraction of a real sensor network with devices, nodes, and communication technologies. It pursues two main aims: (a) To be able to detect people, if they are entering or leaving in a specific physical space; (b) to obtain simple events related to the measurements of environmental variables: Temperature, humidity, and luminosity.
Moreover, three object property relations are considered: belongsToNetwork serves to indicate the networks to which a node belongs; hasCommunicationTechnology relates devices with the corresponding communication technology; isPartOf is used to make known the ownership of a device to a particular node.

Event Ontology
The categories of customized events are modeled and depicted as a taxonomy. Figure 5 shows the class hierarchy for events that occurred in academic environments. The AcademicAdvising class considers events where one professor teaches tutoring to one or two students. This event is an opportunity to exchange information designed to help students reach their educational and career goals. AcademicCourse is used to represent a course imparted by one or two professors focused on undergraduate or postgraduate students. EnviromentalEvent refers to weather (humidity and temperature), conformity conditions (luminosity), and presence of a person, coming or going to academic physical space. DifussionEvent is used to represent academic events to diffuse culture, research, or teaching.
Regarding environmental events, a data property was represented by the value of variation in such an event. This data relation is called hasVariation, is specified only for temperature, luminosity, and humidity environmental events, and depicts floating values.
A diffusion event can be part of another event; this is due to a discussion panel, a demonstration, and a presentation that can occur within a congress, seminar, or workshop. This aspect was depicted using eventIsPartOf semantic relations at diffusion event classes.
All contexts presented above (time, location, network, and person) represent events in academic environments, which are the core of our context modeling. Therefore, there are relationships between the context modules with a specific purpose. The main aim is to integrate all modules and relate them to find a whole representation of an academic environment to allow reasoning and enhancement. The context information in the final ontology system includes some object properties between modules, which are indicated in Table 3, which shows the object property name, domain class, and range class. A brief description of its purpose is exposed below. Each object property in our integrated ontology system has an important role. So that happensIn was depicted to know where the event happened and it is useful to answer "Where did the X event happen?"; the person context is related to the events by using hasPersonInvolved relation with the purpose to answer "Who is involved in the X event?"; the people involved in events are employees (professor or administrative), students, or visitors; the time context is related to events through a semantic relation called hasTem-poralEntity suitable for knowing when an event has happened; the semantic relations isDetectedBy and happensIn have as a purpose the detection of the place where the event happened; this process was carried out with SWRL rules in order to enhance the event information; the relations nodeIsLocatedIn, hasDeviceAssigned, and isAssignedTo are static context information for indicating the place where the various devices are prostrate; finally, hasPersonDetected is a dynamic context due to its dependency on the current physical space where the person is located at a certain time.
Our ontological model was implemented using Ontology Web Language (OWL) 2.0 [42]. It consists of 6487 axioms, 91 classes, 34 object properties, 50 data properties, and 719 individuals. We obtained the characterization of an academic environment.

Event Reasoning
Ontology reasoning consists of executing a program to query logical consequences from a set of asserted facts or axioms. In order to realize the intelligent context reasoning, the final set of context modules described above were imported and integrated for modeling a customized academic environment. This ontology is composed of class hierarchies, data properties, object properties, and instances, which are useful to answer any question regarding the events that have occurred in the academic environment. The questions "what happened?", "when?", "who was involved?", and "at what time did the event occur?" can be executed in the proposed model. The context reasoning using queries over the context modules is presented as a question-answering approach, which is implemented by using SQWRL [43] over events, location, time, and person contexts. Reasoning about the location context considering the query "Where was the temperature increased?" is transformed into SQWRL and is shown as follows.
TemperatureIncrease (?event) ∧ happensIn (?event, ?space) → sqwrl:select (?space) Concerning time context reasoning, we propose "What time did Professor John Smith enter cubicle 222?" and the corresponding SQWRL query about the presence events as follows.

Event Enhancing
An enrichment process is presented to extend the information about events with an inference process and then enhance the model. Figure 6 shows how the enrichment process is performed to return the inferred information to our ontological model for academic events. The enrichment process is used for inferring the corresponding physical place where an event has happened. Event enhancing is implemented by using SWRL rules since they allow it to express the inferences in terms of OWL concepts. It generates new knowledge in the ontological model.
This process is carried out for the following purpose. If an event was detected by a node and that node is located in a certain physical place, then the event happened in that location. It is implemented with the SWRL rule, where the consequence part is inferred from the head part as follows.
AcademicEvent (?event) ∧ PhysicialSpace (?Space) ∧ Node(?node) ∧ isDetectedBy (?event, ?node) ∧ nodeIsLocatedIn (?node, ?space) → happensIn (?event,?space) The rule presented above associates the happensIn property with all OWL individuals of events that were detected by a node and assigns its name of physical spaces to those events. Therefore, it is used to discover new knowledge for academic events, which is returned to the ontological model to enrich it.

Experimental Results
We carried out an evaluation process for the ontological model focused on three approaches: (1) The extensibility and adaptation of four use case scenarios in academic environments; (2) the level of reasoning is evaluated by using competence questions related to academic events; and (3) the consistency and coherence in the customized model used for academic context modeling.

Use Case Scenarios
Four use case scenarios for events in academic environments are presented to evaluate the degree of extensibility and adaptation for our customized ontological model. A scenario for each event category is introduced. It should be noted that only the classes involved in each use case scenario are presented. The rest of the classes can be consulted in the class taxonomy previously given.

Reasoning by Competence Questions
According to Gómez Pérez [44], ontology evaluation refers to the correct representation of the content in an ontology, ensuring that its definitions are correctly implemented for answering the competence questions. Therefore, we evaluate the ontological model by using competence questions to carry out reasoning with the different context information about events: Time, location, and person. For each context module, 10 competence questions as queries were executed. First, all of them were defined in natural language, and then the corresponding SQWRL query was obtained.
As an example, we show the results of reasoning for the queries presented in Section 4.2 using the SQWRL tab with DL Drools engine in the Protégé tool. The results are shown in Figure 11, where Figure 11a shows the results for the location context, Figure 11b for the time context, and Figure 11c is related to the person context.
A total of 30 competence questions implemented in SQWRL queries were executed, with all of them showing correct and promising results. A query engine could be used to develop a natural language question-answering system for a task-based evaluation of the customized ontological model.

Consistency, Coherence, and Efficiency
The whole ontology system is correct if each context module is accurate and consistent. For this evaluation, we use the Pellet reasoning engine available in Protégé. First, we validate each module by checking consistency among defined axioms, instances, and well-defined classes. Then, to evaluate the quality of the ontology system, the following principles were considered: • Clarity. During query execution and reasoning tasks, the ontology did not produce any misinterpretation. • Coherence. After the execution of the reasoning and enrichment process, all individuals were correctly classified.
Ontology consistency checking was executed to verify that none of the class definitions or axioms had logical contradictions, as well as the individuals instantiated into the ontology. This activity consists of executing the reasoning tasks of taxonomy classification, compute types, and consistency checking. The time execution for the 30 competence questions shows an average of 2523 ms; such performance is related to the size of the input data. We run the competence questions on a server with 64 GB RAM, 3.30 GHz CPU, and 1 TB storage capacity.
The principle designs were verified with Pellet incremental reasoning. The verification of them with the corresponding evidence based on the Protégé tool . Figure 12 shows that the ontology did not produce any misinterpretations when the reasoner was active. In this figure, the whole ontology consisting of 17,255 Axioms, 91 classes, 36 object properties, 51 data properties, and 1099 individuals.
Finally, Figure 13 shows that, concerning the ontology after the execution of the reasoning and enrichment process, all inferred individuals were correctly classified. Moreover, this figure indicates that the enrichment process took 2333 milliseconds and 2954 axioms were inferred.

Final Remarks and Future Work
We presented a modular ontology system for managing the academic context to represent events and reasoning with context information, and to enhance them. Our context modeling is a customized ontology for events such as diffusion, academic advising, academic courses, and environmental events. The several contexts considered in our modeling are time, location, and person. Besides, a network ontology was implemented basically to detect people in current physical spaces. From the customized ontological model, context reasoning was exhibited by executing competence questions.
Moreover, an enrichment process was carried out to discover new knowledge for enhancing the academic events within the resulting ontological model. Finally, an evaluation process of the customized model was carried out based on (1) validating the extensibility and adaptation of four use case scenarios in academic environments; (2) the level of reasoning with context event information; (3) the consistency and coherence of the customized ontology. Our evaluation process presented promising results.
The main contributions of this paper are (a) the modular ontology system considering time, location, and person contexts to integrate a customized ontology for modeling academic events; (b) the context reasoning using, first, competence questions in natural language and then implemented in SQWRL rules; (c) the enrichment process utilized to discover new knowledge and enhance information about events; and (d) the evaluation process focused on answer competence questions, use case scenarios, and the verification of principles designs.
As future work, several events in academic environments could be characterized and added into our model, such as cultural events, security-related events, and events about user health. Moreover, it is interesting to evaluate the ease of reusing and validating our model in a health domain. Finally, further research could focus on creating an automatic intelligent academic environment to provide suitable services to users and considering several contexts.

Data Availability Statement:
The data presented in this study are available within the article.