1 Introduction

A recommender system [1] in smart cities [2, 3] aims to propose a relevant service to a given user at a given instant, according to her profile, geolocation and surrounding environment. The real challenge here is to bring the services of a city closer to its citizens. The service in this context can be information about an event, a product to buy, a movie to watch, a web page to consult or a place to see, even a road to avoid. In order to be able to provide accurate personalized recommendations, the RS should be aware to the user’s context, it should be Context-Aware Recommender System (CARS) [4]. The context includes information about profile, preferences, mobilities, location of a user, even her emotions [5], and information about the surrounding environment (e.g., weather condition) in which the user evolves. Consequently, the context modeling [6] becomes crucial for developing CARSs.

While a lack of context models is found in the literature of recommender systems, several ones have been proposed in pervasive computing field. However, most of them are dedicated for closed spaces and should be reviewed to be more suitable for CARSs in open intelligent environments such as smart cities.

By exploring the most popular context models of pervasive computing [7,8,9], this paper aims to propose a generic context model for representing context information taking into account the user’s mobility information within a smart city. This model is based on ontologies by benefiting from their semantic expressiveness and reasoning capabilities which together enhance the prediction and accuracy to provide services recommendations.

Also, by using the ontologies for modeling, this context model can fulfill to some requirements such as genericity and flexibility as mentioned in [10].

After this introduction, some theoretical background regarding the scope of the paper are given in Sect. 2. Section 3 presents the proposed ontology-based context model for mobile user in a smart city that is instantiated for a tourism example, and related works are discussed in Sect. 4. Finally, Sect. 5 concludes this paper and indicates some future works.

2 Fundamental Concepts

In order to be familiar with the concepts used in the present work, this section gives a theoretical background regarding the scope of the paper.

2.1 Context and Context-Awareness

Context. The context designates all information elements that can influence the understanding of a particular situation. Despite its wide use in different research areas namely in Ubiquitous/Pervasive Computing, Ambient Intelligence and Intelligent Environments, we find a variety of its definition in the literature [11] that does not reach to a consensus among them [7]. However, we highlight that the definition proposed in [12] is the most acknowledged one, considering it as “any information that can be used to characterize the situation of an entity”, where “an entity can be a person, place, or object that is considered relevant to the interaction between a user and an application, including the user and application themselves”. The authors give a general definition that can be used in a wide range of context-aware applications. To refine their definition, they identify four categories of context that they feel are more practically important than others. These are location, identity (user), activity (state) and time [13].

In our scope of context-aware recommender systems, we believe that this definition is quite sufficient to identify the context change about a user and her various mobilities in a smart city compared to the application that remains unchangeable in most cases. For instance, imagine that a tourist takes the tramway (activity) to reach a tourist place (location), and that the trip will take a duration of 15 min (time). The recommender system in this case may suggest watching a video according to the user’s preferences or about this touristic place (identity, location) whose duration is slightly less than 15 min.

Context-Awareness. The characteristic “context-aware” is generally used to describe any type of system that benefits from using context [7]. Nowadays, computing applications operate in a variety of new settings; for example, embedded in cars or wearable devices. They use information about their context to respond and adapt to changes in the computing environment. These kind of applications are, in short, increasingly context-aware (sometimes called “smart” or “intelligent”) like as Google Now applications (https://www.google.co.uk/landing/now/).

In the literature, there have been numerous attempts to define context-awareness. In [13], the authors also defined a system as context-aware if “it uses context to provide relevant information and/or services to the user, where relevancy depends on the user’s task”. In our previous example (Subsect. 2.1), the RS will be aware on the context information about user’s preferences to recommend her a suitable set of videos.

2.2 Smart City

Owing to the fast and continual development of new technologies (e.g., Internet of Things) and infrastructures (e.g., smart administration, smart mobility, smart economy, ...) that have been (and/or will be) applied under the smart city concept, it is difficult to precise a unified definition of a smart city. Recent few years witnessed several evolutionist descriptions about smart cities according to these developed technologies/infrastructures. In [2], “a Smart City can be viewed as an urban innovation and transformation that aims to harness physical infrastructures, Information and Communication Technologies (ICT), knowledge resources, and social infrastructures for economic regeneration, social cohesion, better city administration, and infrastructure management”. The authors in [3] present the Smart City of today as “a city planning/urban development methodology heavily relying on ICT to gather necessary input and make optimal engineering and planning decisions”.

Briefly, a smart city is a city that uses information and communication technologies (ICT) to improve the quality of urban services or reduce its costs.

The most distinguishing feature of the smart city concept is the welfare of city residents whom are not taking any active role in the development and daily management of the city and remain passive [3]. The main goal of smart cities is the transformation of life and work of city inhabitants for the best and make them (life and work) easier.

In this perspective, context-aware recommender systems find their place in the smart city as intelligent applications to facilitate the professional and social lives of the user.

2.3 Context-Aware Recommender System

Recommender systems research [1] typically explores and develops techniques and applications for recommending various products or services or other items to individual users based on the knowledge of users’ tastes and preferences as well as users’ past activities (such as previous purchases).

Context-aware recommender systems (CARS) [4, 5] are an important subclass of recommender systems that take into account the context in which an item (e.g., service) will be consumed or experienced. In context-aware recommendation research, a number of contextual features have been identified as important in different recommendation applications [5]: such as companion in the movie and tourism domains, time and mood in the music domain, and weather or season in the travel domain. The context allow CARS to be more accurate in providing recommendations services using the prediction task into a multidimensional rating function — R: Users × Items × Contexts → Ratings [4].

For example, a traditional RS can give us a list of recommended movies to watch without taking into account any appropriate place/day or hour, but CARS can give this list if time and location permit it (e.g., at cinema/weekend or during a trip in train). Here, the context suggests the best time/location to watch the preferred movies.

3 Context Modeling for User-Centered Smart Cities

The context model is a centerpiece for the design of a context-aware recommender systems in mobile and intelligent environments [14]. In the literature of context modeling [8, 9], we find many modeling techniques of context (key-value, graphical, object-oriented, logic-based, ontology-based) [7], although all techniques have their strong points and drawbacks, ontologies are the most widely adopted approaches [8]. They [15] (i) represent an extensible large-scale formalism to model the context in which it is possible to add context elements (concepts, relationship, axioms, ...), delete or modify others in a flexible way, (ii) offer more expressiveness and semantic richness to describe complex context information with a consensual conceptualization, (iii) are fitted with inference capabilities enabling reasoning about the modeled context information in order to deduce other ones, (iv) make the possibility to share and/or reuse context among different information sources in intelligent environment, and (v) have fairly sophisticated tools available.

Once the context is modeled, it is possible to reason about the currently captured/sensed contextual information and to deduce other new knowledge. The reasoning techniques can be divided into [16]: supervised learning, unsupervised learning, rules, fuzzy logic, ontological, probabilistic. For this paper, we will based on ontologies for context modeling and SWRL rules for ontological reasoning.

3.1 Context Modeling Requirements for Intelligent Environments

In pervasive computing, several context models have been proposed. Nevertheless, most of them can not be more suitable for the CARS development, especially, in smart cities. The latter are fitted abundantly by renew and smart technologies/infrastructures that enabling profound changes in the user’s social life mode. For CARS in a smart city, the resident has not almost any role and remains a passive actor in the whole smart city process which allows her to receive pushed services recommendation.

In order to propose a generic context model, the authors in [10] specify some requirements that can be adopted for this work as follow:

  • be sufficiently general to be used by different user centered mobile applications in smart cities (such as, recommender systems).

  • be sufficiently specific to cover the main contextual entities proposed in the state of the art of context-aware mobile applications (such as, context-aware recommender systems).

  • be sufficiently flexible to allow an extension and to take into account new entities specific to a given application domain in smart cities.

Also, we can specify the context more precisely in particular for recommendation services in smart cities. Therefore, the two following remarks are considered in our context model:

  1. 1.

    The user should not need to interact explicitly with the application to receive recommendations. Pushed recommendations could be very relevant for mobile users and the system could decide to recommend a user a given service because of her current context.

  2. 2.

    The notion of context is defined in a very general manner and would benefit from being more precise. We argue that profile, Activity and the environment are three main entities of the context that should be precised, specifically for context-aware recommender systems.

3.2 Ontology-Based Context Model

Considering the previous requirements, Fig. 1 depicts our ontology-based context model represented with Ontology Definition Meta-model (ODM) specification [17] (for Model-Driven Engineering purpose).

Extending two works [14, 15], it is structured on three sub-ontologies at three different abstraction levels: generic, domain and application ontologies. They cover four main context dimensions that we believe contribute to develop context-aware recommender systems:

  • User (on which the CARS is centered): A person that has a profile and preferences. A user evolves in an environment, and her state can be mobile or static. The profile and preferences are strongly attached to the user and contains the information that describes her. For example, the goal of a tourist searching for a restaurant is to have dinner. A profile/preferences in this case can give information concerning the tourist’s culinary preferences or whereabouts.

  • MobileDevice: It is the mobile computing system used by the user to invoke or receive services, and to capture contextual information from the environment. The device can obtain information concerning its type (e.g., tablet, laptop, smart-phone), the application, and the network.

  • Activity: The activity in which the user is involved may be a key to decide which service is relevant to her. It can be of professional, social or leisure type (e.g., working, meeting, visiting, playing, and so on.). However, recognizing users’ activities is still a tough task.

  • Environment: It contains all the information that describes the surroundings of the user and its device, and that can be relevant for the recommender application. It includes different categories of information such as: spatial context information (e.g., Location, city, destination, speed), temporal context information (e.g., Time, date, season), Climatic context information (e.g., Temperature, type of weather).

The relationships between the User Entity and the others are respectively: usesDevice, involvedIn and evolvedIn. The dimensions are regrouped in the Generic ontology as top level abstraction entities.

The Domain ontology, on the other hand, allows covering all main contextual entities proposed in the literature of context modeling [7,8,9], and the Application ontology is to specify the context for a confined application space.

For a Tourism example, this Application ontology contains a set of specific context classes such as TouristProfile and TouristPreferences for the User entity (i.e., the tourist), and TouristLocation as well as the TouristPlace related to the Environment entity. In practice, a CARS can recommend to a tourist to visit a place that it is closer to her location and according to his preferences.

In this proposed context model, the ontological attributes (OWLDataTypeProperty) is responsible to contain context information and can be modeled using also the OUP (Ontology UML Profile) notation proposed with ODM specification [17].

Fig. 1.
figure 1

An ontology-based Context Model

The Domain and Application ontologies are sufficiently flexible to enable storing all context entities involved in a contextual situation and adding each new entity that could be introduced as context information. In addition, other context information can be derived by using reasoning capabilities of ontologies to complete describing contextual situations.

3.3 Context Reasoning with SWRL

The context sources allowing individualizing described ontologies can be provided in two different ways: sensing or inferring methods. Sensing is used directly for basic and low-level context; whereas, inferring is used to provide a high-level context from low-level one using rule-based inference languages [8].

Semantic Web Rule Language (SWRL) [18] allows to express reasoning rules that can be executed through a rule-based engine such as Java Expert System Shell (JESS).

As an example, if the “Language” of a tourist is only “Arabic” (as low-level context information sensed from her profile), we can infer that “Arab Countries” (as high-level context information) is among her “Favorite tourist places”, that is a useful information for Tourism Recommender Systems. This is expressed by the next SWRL rule: Tourist(?t) and hasLanguage(?t, “Arabic”) implies hasFavoriteTouristPlaces(?t, “ArabCountries”).

In the literature, the low-level and high-level context are also called atomic and composite context, respectively. The relationship between them can be represented by the UML composite design pattern (see Fig. 2), in which, high-level context can be compose from others context information (whether low or high levels context).

Thereby, the low-level context can be provided by both types of context sources (Local or Remote). The first is for local provisioning of context information that is available at client (MobileDevice) or server (Recommender Application) sides. For example, the location of a tourist is captured in LocationTourist, which is used to locate the tourist. The second source type is for extra context information that can be captured by a third-party (e.g., a Web service to provide the weather forecast for a tourist place to visit, ...).

Fig. 2.
figure 2

Low and high levels context

4 Related Work

To the our best knowledge and except [14] which proposed a generic context model, there have not ontology-based context models for context-aware recommender systems (CARS), In contrast, several ones have been proposed in pervasive computing [7,8,9]. Nevertheless, most of them can not represent all context information available in a smart city and needed for its processes. In this paper, we present the most popular of these models by showing the pros and cons of each one of them regarding our scope of CARS in smart cities.

Chen et al. have developed CoBra-Ont [19], an OWL ontology which is a collection of ontologies for describing places, agents, events and their associated properties in an home area intelligent environments. This work is registered in their Context Broker Architecture (CoBrA) that provides knowledge sharing, context reasoning, and privacy protection supports for pervasive context-aware systems.

Based on the previous ontology, the same authors are presented another context ontology in [20]. The ontology of Standard Ontology for Ubiquitous and Pervasive Applications (SOUPA) provides knowledge sharing, reasoning on context and interoperability in a pervasive and ubiquitous environment. SOUPA deals with more areas of pervasive computing than CoBra-Ont and map many of its concepts to concepts of existing common ontologies like friend-of-friend (FOAF)Footnote 1 ontology to enable interoperability by using ontology mapping constructs OWL standard (owl: equivalentClass and owl: equivalentProperty). It is constituted of two sets of ontologies called SOUPA-Core and SOUPA-Extensions. SOUPA-Core defines a generic vocabulary which is universal for different pervasive computing applications (e.g., person, agent, policy, time, space), while SOUPA-Extensions define additional ontologies to support specific kind of applications and provide examples for extending future ontologies (e.g., home, office, attraction).

The CONtext ONtology (CONON) [21] is a context OWL ontology for modeling context in pervasive computing environment and supporting logic based context reasoning. Wang et al. have proposed an upper context ontology that captures general concepts about basic context such as location, activity, person or computational entity, and a domain specific ontologies for detaining these general concepts and their features in each sub-domain covered in a hierarchical manner. Also and based on this context ontology, the authors have studied the use of logic reasoning to check the consistency of context information, and to reason over low-level, explicit context to derive high-level, implicit context. The notions of upper ontology and domain-specific ontologies are discusses in similar work [22] for presenting Service-Oriented Context-Aware Middleware (SOCAM).

In their project called Context-Driven Adaptation of Mobile Services (CoDAMoS)Footnote 2 and suiting some requirements of mobile computing, Preunveneers et al., have presented an adaptable and extensible context ontology for creating context-aware computing infrastructures, ranging from small embedded devices to high-end service platforms [23]. It is defined around four modeling entities Users, Environment, Platforms and Services. This ontology has been designed with the aim of solving many challenges, such as application adaptation, automatic code generation, code mobility, and generation of device-specific user interfaces for allow interoperability in an Ambient Intelligence environment.

Strang et al. [24] describe a context modeling approach using ontologies as a formal foundation. They introduce their Aspect-Scale-Context (ASC) model and show how it is related to other models. A Context Ontology Language (CoOL) is derived from the model, which is used to enable context-awareness and contextual interoperability during service discovery and execution in a distributed architecture.

All proposed context models are specific for closed environment (e.g., a smart home), and can not be applied for wide intelligent spaces. While ours is extensible to new appeared context information in opened environments such as smart cities.

5 Conclusion and Future Work

In this paper, we have proposed an extensible context model based on ontologies and benefiting from their expressiveness and reasoning capabilities. It combine three levels of ontologies, Generic, Domain ontologies for popular and shared concepts used by context-aware applications developers and Application ontology for a specific description of context (e.g., Tourism domain) in wide space such as smart city.

In near future, we aim to extend much more our context model in order to be sufficiently generic and can be reused to build several context-aware recommendation systems for the different smart city applications, and to implement it taking into account how to create new context information attributes at run-time and integrate them to this ontological model in order to capture any new context entities could be appeared over time. Once, this is achieved, the design and the development of context-aware recommender system (CARS) can be undertook.