Full text
2016 156 Roberto Yus Peirote Semantic Management of Location-Based Services in Wireless Environments Departamento Director/es Informática e Ingeniería de Sistemas Mena Nieto, Eduardo Director/es Tesis Doctoral Autor UNIVERSIDAD DE ZARAGOZA © Universidad de Zaragoza Servicio de Publicaciones ISSN 2254-7606 Repositorio de la Universidad de Zaragoza – Zaguan http://zaguan.unizar.es
Departamento Director/es Director/es Tesis Doctoral Autor UNIVERSIDAD DE ZARAGOZA © Universidad de Zaragoza Servicio de Publicaciones ISSN 2254-7606 Repositorio de la Universidad de Zaragoza – Zaguan http://zaguan.unizar.es
Departamento Director/es Roberto Yus Peirote SEMANTIC MANAGEMENT OF LOCATION-BASED SERVICES IN WIRELESS ENVIRONMENTS Director/es Informática e Ingeniería de Sistemas Mena Nieto, Eduardo Tesis Doctoral Autor 2016 UNIVERSIDAD DE ZARAGOZA © Universidad de Zaragoza Servicio de Publicaciones ISSN 2254-7606 Repositorio de la Universidad de Zaragoza – Zaguan http://zaguan.unizar.es
Departamento Director/es Director/es Tesis Doctoral Autor UNIVERSIDAD DE ZARAGOZA © Universidad de Zaragoza Servicio de Publicaciones ISSN 2254-7606 Repositorio de la Universidad de Zaragoza – Zaguan http://zaguan.unizar.es
Semantic Management of Location-Based Services in Wireless Environments Roberto Yus Peirote Departamento de Inform´atica e Ingenier´ıa de Sistemas Universidad de Zaragoza January 2016
Semantic Management of Location-Based Services in Wireless Environments Roberto Yus Peirote Supervisor Eduardo Mena University of Zaragoza, Spain Dissertation Committee Heiner Stuckenschmidt University of Mannheim, Germany Jes´us Berm´udez University of the Basque Country, Spain Sergio Ilarri University of Zaragoza, Spain Alfredo Go˜ni University of the Basque Country, Spain Thierry Delot University of Valenciennes, France International Reviewers Nalini Venkatasubramanian University of California, Irvine, USA Francesco Guerra University of Modena and Reggio Emilia, Italy Submitted in fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science and Systems Engineering with “International Doctor” Mention in the Computer Science and Systems Engineering Department, Escuela de Ingenier´ıa y Arquitectura, Universidad de Zaragoza. This work has been supported by the Spanish Government under the FPI fellowship program, ref. BES-2011-043934. January 26th, 2016.
“Do. Or do not. There is no try.” Jedi Master Yoda
8.6 Summary of the Chapter . . . . . . . . . . . . . . . . . . . . . . 166 9 Dealing with the Motivating Scenarios 169 9.1 First Scenario: SHERLOCK for Looking for Transportation . . 169 9.1.1 Knowledge for the Scenario . . . . . . . . . . . . . . . . 170 9.1.2 Steps Followed . . . . . . . . . . . . . . . . . . . . . . . 170 9.2 Second Scenario: SHERLOCK for Helping Firefighting . . . . . 174 9.2.1 Knowledge for the Scenario . . . . . . . . . . . . . . . . 175 9.2.2 Steps Followed . . . . . . . . . . . . . . . . . . . . . . . 175 9.3 Third Scenario: SHERLOCK for Handling Sport Events Broadcasting................................ 180 9.3.1 Knowledge for the Scenario . . . . . . . . . . . . . . . . 181 9.3.2 Steps Followed . . . . . . . . . . . . . . . . . . . . . . . 181 9.4 Fourth Scenario: SHERLOCK for Emergency Management . . 186 9.4.1 Knowledge for the Scenario . . . . . . . . . . . . . . . . 186 9.4.2 Steps Followed . . . . . . . . . . . . . . . . . . . . . . . 187 9.5 Other Extra Scenarios . . . . . . . . . . . . . . . . . . . . . . . 190 9.5.1 SHERLOCK for Obtaining Tourist Information . . . . . 191 9.5.2 SHERLOCK for Meeting Fellow Researchers . . . . . . 193 9.5.3 SHERLOCK for Helping Health-Care Workers . . . . . 195 9.6 Summary of the Chapter . . . . . . . . . . . . . . . . . . . . . . 200 10 Conclusions 203 10.1 SHERLOCK: Main Contributions . . . . . . . . . . . . . . . . . 203 10.2 Other Contributions . . . . . . . . . . . . . . . . . . . . . . . . 204 10.3 Research Results . . . . . . . . . . . . . . . . . . . . . . . . . . 206 10.4FutureWork ............................ 210 Relevant Publications Related to the Thesis 213 A Semantic Technologies on Mobile Devices 217 A.1 Porting Semantic Technologies to Android . . . . . . . . . . . . 218 A.2 Evaluating the Use of Semantic Web Technologies on Mobile Devices ............................... 222 A.2.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . 222 A.2.2 Comparing the Reasoners for the OWL 2 DL Profile . . 228 A.2.3 Comparing the Reasoners for the OWL 2 EL Profile . . 233 A.2.4 Other Experiments . . . . . . . . . . . . . . . . . . . . . 237 A.2.5 Analyzing the Impact of Memory . . . . . . . . . . . . . 237 A.2.6 Analyzing the Impact of the Virtual Machine . . . . . . 239
A.2.7 Discussion.......................... 241 A.3 RelatedWork............................ 245 A.3.1 Reusing and Evaluating DL Reasoners on Mobile Devices245 A.3.2 Evaluating DL Reasoners on Desktop Computers . . . . 246 B Prototypes for the Semantic Management of LBS 255 B.1 SHERLOCK Prototype . . . . . . . . . . . . . . . . . . . . . . 255 B.1.1 PCPrototype........................ 256 B.1.2 Android Prototype . . . . . . . . . . . . . . . . . . . . . 259 B.1.3 Testing the Android Prototype . . . . . . . . . . . . . . 260 B.2 DUCK: Exchange and Integration of Knowledge in Wireless Environments............................ 269 B.2.1 Architecture of DUCK . . . . . . . . . . . . . . . . . . . 269 B.2.2 Prototype of DUCK . . . . . . . . . . . . . . . . . . . . 270 B.2.3 Evaluating the Extraction of Subsumption Relations . . 273 B.3 Triveni: Shared, Semantic Context Models for Mobile Devices . 277 B.3.1 Architecture of Triveni . . . . . . . . . . . . . . . . . . . 277 B.3.2 Prototype of Triveni . . . . . . . . . . . . . . . . . . . . 279 B.3.3 Evaluating the Extraction of a Shared Context . . . . . 279 B.4 MultiCAMBA: Multi-CAMera Broadcasting Assistant . . . . . 286 B.4.1 Architecture of MultiCAMBA . . . . . . . . . . . . . . . 286 B.4.2 Prototype of MultiCAMBA . . . . . . . . . . . . . . . . 288 B.4.3 Evaluating the Processing of Multimedia Information . 293 Bibliography 315
List of Figures 1.1 Interaction of different SHERLOCK nodes. . . . . . . . . . . . 6 2.1 Example of ontology. . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 Two sample ontologies describing knowledge about universities. 15 2.3 Semantic relationships that exist among the concepts of two ontologies............................... 17 2.4 Definition of OWL 2 class expression. . . . . . . . . . . . . . . 25 2.5 Number of semantic mobile apps per year. . . . . . . . . . . . . 34 2.6 Distribution of semantic mobile apps per platform. . . . . . . . 35 2.7 Wordcloud with the semantic technologies used by the different apps.................................. 36 3.1 Different transportation options in our first motivating scenario. 38 3.2 A team of firefighters suppressing a fire in our second motivating scenario................................ 40 3.3 The rowing boat race in our third motivating scenario. . . . . . 41 3.4 The traffic accident in our fourth motivating scenario. . . . . . 42 3.5 High-level architecture of a SHERLOCK node. . . . . . . . . . 46 3.6 Agents to interact with a user and manage knowledge in SHER- LOCKdevices. ........................... 49 4.1 Different knowledge managed by a SHERLOCK device. . . . . 52 4.2 An excerpt of the context ontology. . . . . . . . . . . . . . . . . 55 4.3 An object-of-interest modeled in our system. . . . . . . . . . . 56 4.4 Modeling a camera: pan (horizontal plane) (a), and tilt (vertical plane)(b)............................... 57 4.5 Basic ontology for service modeling in SHERLOCK’s services. . 58 4.6 Example of the definition of a SHERLOCK querying service to obtaintransports. ......................... 59 vii
4.7 Two examples of the definition of external services: 1) to take pictures and 2) to obtain transports from a web service. . . . . 60 4.8 Example of the definition of a complex service with a workflow to find cameras in an area and request them to take a picture. 62 4.9 Simplified Grammar of SHERLOCK’s query language. . . . . . 73 4.10 Sample views, recreated using Google Earth, of three cameras (CAM1 (a), CAM2 (b), CAM3 (c), and CAM3 after 4 seconds panning to the right (d)) covering a rowing race. . . . . . . . . 74 5.1 Context Updater agent (CU) tasks. . . . . . . . . . . . . . . . . 76 5.2 Ontology Updater agent (OU) tasks. . . . . . . . . . . . . . . . 82 5.3 Steps involved in the management of knowledge. . . . . . . . . 83 5.4 Main steps in our approach to extract subsumption relationships from two source ontologies. . . . . . . . . . . . . . . . . . . . . 86 5.5 Subsumption degree (Y-axis) between two concepts, Cs and CS , depending on the number of roles of CS (denoted by the different curves) and their shared roles (X-axis). . . . . . . . . . . . . . . 89 5.6 Some of the subsumption degrees obtained for our running example................................ 94 6.1 User Request Manager agent (URM) tasks. . . . . . . . . . . . 100 6.2 Steps to obtain relevant services for a user. . . . . . . . . . . . 102 6.3 User Request Processor tasks. . . . . . . . . . . . . . . . . . . . 109 6.4 Flow diagram of the execution of a SHERLOCK query. . . . . 110 6.5 Sequence diagram of the execution of a service plan. . . . . . . 114 7.1 Mobile agents to process a user query and obtain results. . . . 118 7.2 User Request Processor tasks. . . . . . . . . . . . . . . . . . . . 119 7.3 Query to obtain the features of devices around a coordinate. . . 126 7.4 Example of the monitoring of a location of interest. . . . . . . . 128 7.5 Creation of Updater agents by a Tracker agent to cover a location ofinterest............................... 131 7.6 Semantic relationships exploited when extending a service. . . . 137 8.1 Real camera footage (a) and interesting and other objects in thescene(b)............................. 143 8.2 A real camera shot of a rowing boat (a) and the recreation of the view in our system with the top (red) and rear (blue) of the boat highlighted (b). . . . . . . . . . . . . . . . . . . . . . . . . 147
8.3 Computing the percentage of a target object in a shot: scene in Google Earth (a), selecting the target (b), painting the FOV (c), and covering the target completely (d). . . . . . . . . . . . . . . 149 8.4 Initial state of a target object in (x0, y0) and a camera in (xc, yc)151 8.5 tf+ ( tf− ) time to focus the target object rotating the camera to the left (right) side. . . . . . . . . . . . . . . . . . . . . . . . . . 153 8.6 Estimation of trajectories and time needed to focus a rowing boat, “Kaiku”, from another boat, “Orio”. . . . . . . . . . . . . 154 8.7 Horizontal angles involved in the computation of the similarity between two images (a) and (b). . . . . . . . . . . . . . . . . . 158 8.8 Images involved in the process of obtaining a privacy-aware picture: (a) picture of a user; (b) face identifier of the user generated by the system; (c) picture taken by a SHERLOCK user; and (d) privacy-aware picture generated by SHERLOCK. 161 8.9 Example of a context-aware privacy policy to create privacyawarepictures. ........................... 162 8.10 Handshake diagram for the creation of privacy-aware pictures. . 162 9.1 Excerpt of the ontology for the “Looking for Transportation” scenario................................ 171 9.2 Screenshots of the SHERLOCK prototype executing the first scenario................................ 172 9.3 Excerpt of the ontology for the “Helping Firefighting” scenario. 176 9.4 GUI of the PC prototype for the fire monitoring scenario. . . . 177 9.5 Deployment of the agent network in the fire monitoring scenario.178 9.6 Results shown to the user in the fire monitoring scenario with the location of the mobile agents deployed. . . . . . . . . . . . 179 9.7 Service to find cameras that could obtain a certain shot. . . . . 182 9.8 Excerpt of the ontology for the “Handling Sport Events Broadcasting”scenario........................... 183 9.9 Definition of the shot that the technical director wants to broadcast. 184 9.10 Camera view recreated in a 3D engine by the system. . . . . . 185 9.11 Some of the camera views returned to the TD. . . . . . . . . . 185 9.12 Camera feed broadcasted. . . . . . . . . . . . . . . . . . . . . . 186 9.13 Excerpt of the ontology for the “Emergency Management” scenario. 188 9.14 Emergency management scenario. . . . . . . . . . . . . . . . . . 189 9.15 Excerpt of the ontology for the “Obtaining Tourist Information” scenario................................ 192
9.16 SHERLOCK obtaining: (a) interesting touristic points and (b) information about a researcher. . . . . . . . . . . . . . . . . . . 193 9.17 Excerpt of the ontology for the “Meeting Fellow Researchers” scenario................................ 194 9.18 Excerpt of SHERLOCK’s ontology for the CHW scenario: diagnosismodule............................. 196 9.19 Excerpt of SHERLOCK’s ontology for the CHW scenario: patient context module. . . . . . . . . . . . . . . . . . . . . . . . . 197 9.20 Excerpt of SHERLOCK’s ontology for the CHW scenario: stats module. ............................... 197 A.1 Results (finished tasks/average time) for the complete OWL 2 DLontologyset. .......................... 229 A.2 Average computing time for each ontology group in the minimum set of OWL 2 DL ontologies processed by all the devices and reasoners. .............................. 232 A.3 Results (finished tasks/average time) for the complete OWL 2 ELontologyset. .......................... 234 A.4 Average computing time for each ontology group in the minimum set of OWL 2 EL ontologies processed by all the devices and reasoners. .............................. 236 A.5 Comparison of the number of finished classifications of OWL 2 DL ontologies............................... 238 A.6 Comparison of the number of finished classifications of OWL 2 EL ontologies............................... 239 A.7 Comparison of the Pellet reasoner on Android with limited and “unlimited” memory. . . . . . . . . . . . . . . . . . . . . . . . . 240 A.8 Comparison of the Pellet reasoner on the Dalvik and ART virtual machines. .............................. 241 B.1 Different modules of the SHERLOCK prototype. . . . . . . . . 256 B.2 Screenshots of the SHERLOCK prototype for PC. . . . . . . . 257 B.3 Screenshots of the simulator for the PC prototype. . . . . . . . 258 B.4 SHERLOCK app: Home interface. . . . . . . . . . . . . . . . . 261 B.5 SHERLOCK app: Settings. . . . . . . . . . . . . . . . . . . . . 262 B.6 SHERLOCK app: Map interface. . . . . . . . . . . . . . . . . . 263 B.7 SHERLOCK app: Selecting a service and its parameters. . . . 264 B.8 SHERLOCK app: Displaying results. . . . . . . . . . . . . . . . 265 B.9 SHERLOCK app: Interacting with objects. . . . . . . . . . . . 266 B.10 SHERLOCK app: Interacting with other users. . . . . . . . . . 267
B.11 SHERLOCK app: Handling multiple requests. . . . . . . . . . 268 B.12 Sequence diagram of the exchange and integration process in theDUCKprototype. ....................... 270 B.13 DUCK app: Screenshots of the prototype. . . . . . . . . . . . . 272 B.14 High-level architecture of Triveni. . . . . . . . . . . . . . . . . . 278 B.15 Triveni app: Screenshots of the prototype. . . . . . . . . . . . . 280 B.16 Motivating use case for Triveni: Users being part of a study group. 281 B.17 Precision and recall of the context obtained for a user in different scenarios before and after using the three approaches of Triveni (conservative, optimistic, and semi-optimistic). . . . . . . . . . 284 B.18 Computation time and memory usage on a Triveni node with increasing number of devices. . . . . . . . . . . . . . . . . . . . 287 B.19 Main steps followed by the MultiCAMBA prototype. . . . . . . 288 B.20 Technical architecture diagram of the MultiCAMBA prototype. 289 B.21 MultiCAMBA app: Graphical User Interface (GUI) for the TechnicalDirector.......................... 290 B.22 MultiCAMBA app: Example of low-level input form. . . . . . . 291 B.23 MultiCAMBA app: Snapshot of the Query-by-Example 3D interface. .............................. 292 B.24 Quality of the result set (i.e., cameras fulfilling the user requirements): number of cameras in the answer set (blue line) and number of wrongly chosen cameras (red dashed line). . . . . . . 296 B.25 Error in the estimated time needed for the cameras to view the target object: the error is localized at two specific time intervals (the start and the end of the race). . . . . . . . . . . . . . . . . 297 B.26 Error in the estimated percentage of the target that a camera will view in the first eight seconds. . . . . . . . . . . . . . . . . 299 B.27 Testing the system against real camera footage (the information generated by our system is on the top): in two consecutive seconds. 300 B.28 Query images used in the tests. . . . . . . . . . . . . . . . . . . 302 B.29 Set of 45 images used in the tests. . . . . . . . . . . . . . . . . 303 B.30 Number of images selected by the users as similar to each query image................................. 304 B.31 Comparing the ranking of images obtained by our system (s) and the users’ rankings ( ui ) for each query (normalized Kendall tau distance K(ui,s)). ....................... 306 B.32 Tester Disagreement and System Disagreement. . . . . . . . . . 308 B.33 Ranking obtained by the system for Query 4: before (a) and after (b) modifying the weights of the similarity formula. . . . . 309
B.34 Ranking of images obtained for a user query: before (a) and after (b) modifying the weights of the similarity formula. . . . . 310
List of Tables 2.1 Constructors and their meanings for ALC DL........... 18 2.2 Expressivity and complexity of reasoning in some important DLs. 19 2.3 Semantic Web reasoners and some of their characteristics. FRG: Fragment; APX: Approximated. . . . . . . . . . . . . . . . . . . 22 2.4 Main RDF-S constructs. . . . . . . . . . . . . . . . . . . . . . . 24 2.5 SPARQL-DL supported query patterns. . . . . . . . . . . . . . 27 2.6 Semantic mobile applications presented in the literature. . . . . 33 4.1 Information stored about the context of the device. . . . . . . . 53 4.2 Information stored about the context of the user. . . . . . . . . 54 4.3 Semantics of the introduced DL operators: Domain and Range. 66 5.1 Contextual information shared about location. . . . . . . . . . 78 7.1 Information of the different communication technologies considered by a Tracker to cover an interesting area. . . . . . . . . . . 132 9.1 Table used by a Tracker agent to dynamically maintain its networkofUpdaters......................... 179 A.1 Android support for some semantic APIs and DL reasoners. . . 249 A.2 Comparison of classification time (in seconds) for two Android devices. OOM: Out Of Memory; UDT: Unsupported Data Type.250 A.3 Comparison of classification time (in seconds) for PC and Android. UDT: Unsupported Data Type. . . . . . . . . . . . . . . 250 A.4 Errors for uncompleted tasks in the DL ontology set. . . . . . . 251 A.5 Number of times (rounded to the closest integer) of the PC version being faster than the Android ones for the small (S), medium (M), and large (L) OWL 2 DL ontology set. . . . . . . 251 A.6 Errors for uncompleted tasks in the EL ontology set. . . . . . . 252 xiii
Chapter 1. Introduction 6 Figure 1.1: Interaction of different SHERLOCK nodes. way, the knowledge about services and the world around the user. This way, the system guides the user in the process of selecting the LBS that best fits her needs; the participating devices can cooperate and exchange data and knowledge among them to relieve the user from knowing and managing such knowledge directly. This knowledge can be defined by providers of services or even extracted from ontologies in the Web using Semantic search engines (elementary, SHERLOCK can use the services of WATSON [dM11] to find ontologies in the Web). Furthermore, thanks to the use of mobile agents [LO99], it is possible to monitor devices (e.g., inside a certain geographic area), which could provide the information the user needs, wherever they are. Also, the agents help to distribute the load of the system (both the CPU power and the communication costs) wherever it is needed in the wireless environment. This way, the required processing tasks can be carried on the most appropriate device in the scenario. In summary, the main benefits offered by our system, from the user’s point of view, are: 1. It offers to the user all the available LBS which might be interesting for her at each moment given her current context. After choosing one of them, it helps the user to express her information needs by pro-actively querying the local knowledge at the user device. Therefore, it relieves
7 Chapter 1. Introduction the user from managing specific knowledge about LBS. 2. It reconciles the different views of the world and the vocabulary used to describe objects and requests. This is achieved by supporting a decentralized and dynamic discovery of new kinds of services, providers, and information about the surroundings of the user. This way, the system manages up-to-date knowledge about the LBS provided to the user. 3. It manages heterogeneous (fixed or mobile) devices that can be part of the system, each of them having different capabilities. Moreover, it adapts itself in run-time to different underlying networks, such as fixed infrastructures (e.g., such as 4/3G and wired networks) and Mobile Ad-hoc Networks (MANETs) [CCL03]. 4. It finds the information that the user needs wherever it is. A mobile agent network is deployed to obtain the information from other SHERLOCK- enabled devices. Also, different sources are considered, such as the local knowledge in the device and third-party providers. 5. It continuously carries the processing to the most appropriate nodes in order to balance the processing load and communication tasks, by using mobile agents. This is important to alleviate the limited CPU power, storage, and communication capabilities of mobile devices. The system presented is flexible enough to deal with different types of services and scenarios. In addition, new services can be added to the system by providing SHERLOCK with an ontology which models them without architectural changes. In the following sections we describe in more detail how the system manages the knowledge about services and scenarios as well as information requests by users. 1.3.1 Knowledge Management SHERLOCK-enabled devices manage knowledge modeled as OWL ontologies with the help of a Description Logics (DL) semantic reasoner running on the device. The different categories of knowledge managed by the system include: user context, device context, services, and scenarios. The knowledge management task is performed by different agents whose main goal is to keep the local knowledge on the device updated, as that will mean offering more interesting information to their users, and provide access to this information. In the following we briefly summarize the different agents in charge of this task and their goals:
Chapter 1. Introduction 8 • The Knowledge Endpoint agent provides access to the local knowledge on the device to other (local or external) agents. The access is done through queries in SHERLOCK’s query language which is based on SPARQL (with extensions to handle geospatial data and DL ontologies). • The Ontology Updater agent updates the local ontology on the device by exchanging it with other devices. To integrate the knowledge received into the local ontology, it makes use of a technique based on the extraction of subsumption relationships between concepts defined in the ontologies. • The Context Updater agent keeps the user context information updated and collects information about the context of other devices. Through the integration of the information received, it creates a shared context model used to improve the context of the user managed. A special type of knowledge managed by SHERLOCK is related to multimedia information. Users might be interested in LBS to obtain, for example, pictures of a certain location or object (e.g., pictures of the Lincoln Monument in Washington D.C.). So, SHERLOCK manages information provided by cameras attached to SHERLOCK-enabled devices by extracting high-level features of their views regarding objects in their Field-of-View and specific details such as the viewpoint of these objects or the amount of them being covered. To this end, our system relies on a 3D model of the scene generated based on information about the interesting objects and cameras in the scenario (location, direction, and approximate 3D extent). Also, the system is able to compute an objective value to compare the picture that the user wants to obtain with the shots provided by the different available cameras. Finally, when handling pictures taken by SHERLOCK-enabled devices, the system tries to preserve the privacy preferences of users in the pictures in which, for example, they would not like to appear depending on their context. 1.3.2 Request Management The knowledge that SHERLOCK-enabled devices learn from their interactions with others is used to offer interesting services to their users. First, SHERLOCK captures the user information needs by guiding her to select an appropriate LBS and then it generates a formal user request with the service selected and the user preferences. Then, it processes the generated request against different sources to obtain the actual information the user is interested in.
9 Chapter 1. Introduction Request Generation A first step in order to fulfill the user information needs is to capture those needs and formalize them into a formal request in order to avoid ambiguities. To provide SHERLOCK with enough expressivity and flexibility, we have designed a SPARQL-like query language that is used by the system making it possible to express semantic location-based queries (e.g., “Retrieve taxis around me”) and non-location based queries (e.g., “What is the age of Barack Obama?”) as part of LBS or other services, respectively. This language requires knowledge about SPARQL and SHERLOCK’s ontology, so it might be too complicated to be used by non-advanced users. Therefore, our approach helps users to define their interests, guiding them, and capturing their requests. To do so, the system relies on the User Request Manager agent (URM) to guide users when defining their information needs. The URM performs three main tasks summarized in the following: 1. The URM is in charge of obtaining the services (based on a location or not) that are relevant for a user in a particular situation. The result of this task is a list of services the user can see and select. 2. Given the service selected by the user, the URM retrieves the information needed to invoke it (its formal parameters) from the ontology, and, if needed, handles the interaction with the user required to obtain the actual values for the parameters. 3. Given the service, and a set of parameters with the selected values, the URM generates the appropriate service request/invocation. This way, the user does not have to be aware neither of the details of the query language nor the schema and available services. Request Processing The next step is to process the user request to obtain the information that the user needs. The user request might imply the processing of a location or non-location based query, the call to an external service provided by a third-party, or the execution of different actions defined as a plan. The User Request Processor agent (URP) deals with these three different types of user requests. The high-level protocol performed by the URP agent to process a request in the form of a SHERLOCK query can be summarized in the following steps:
Chapter 1. Introduction 10 1. Execute the query against the local ontology on the user device that could contain the information requested from previous interactions. 2. Evaluate the need of querying external sources: The results obtained in the previous step are analyzed to evaluate if they are good enough for the user in terms of their timestamp and the number of results. External sources include third-party repositories and other SHERLOCK devices. 3. If the query has to be posed to other SHERLOCK devices, the URP will try to query devices in the geographic area relevant for the query (if any), to maximize the chances of obtaining information interesting for the user, as follows: (a) Split the query for each non-overlapping geographic constraint in it:Tracker agents will be created to monitor the geographic area associated with each geographic constraint. Each Tracker agent will autonomously move toward the centroid of the area. For this purpose, the Tracker will discover devices around the area (if possible) or around the device it is currently residing in and will move to them. Once a Tracker discovers devices that might be able to partially (or even totally) cover the area (i.e., their communication mechanisms enable them to communicate with devices inside such an area), it creates Updater agents on them. (b) Send agents to devices in the relevant area: Each tracker agent creates Updater agents that will move to the best device to cover the relevant area considering their capabilities. These agents also continuously evaluate if the device they are residing in is the best under the given circumstances and their goals. They keep themselves in the device that maximizes the communication with others and pose the user query to these SHERLOCK devices around. (c) Each device executes the query against its local ontology and returns as answer the information fulfilling the query constraints (including geospatial and DL constraints, the latter evaluated by the DL reasoner on each device). If the device does not contain the requested information, an Updater makes use of different mechanisms to maximize the chances of obtaining results. For example, it can ask the SHERLOCK on the other device to execute the query (and therefore, create its own network of agents if needed) and even extend the query by deducing devices that would be able to produce the information requested (e.g., it can deduce that cameras could
11 Chapter 1. Introduction obtain the pictures that the user requested and execute a request to find such cameras). (d) Correlate the results obtained by each Tracker agent from the different Updater agents to detect redundant information. This step can minimize the information that will be sent back to the URP agent through the network of agents. Finally, the URP correlates the results obtained from each tracker and presents them to the user. In the case of continuous queries (i.e., queries which have to be reevaluated continuously), the URP maintains the network of agents adapting it to the current situation (e.g., the current network condition). 1.4 Structure of the Thesis This thesis has been structured into ten chapters including this one where we have summarized our motivation and contributions. In Chapter 2, we review the technological context of this work. In particular, we describe aspects related to mobile computing and knowledge management. In Chapter 3 we first present four motivating scenarios where a system like the one presented in this thesis can be helpful. Each scenario include unique challenges that have been taken into account in the proposed architecture and which make the system general enough to help in many other scenarios. Also, we describe the high-level architecture of the system, highlighting the different parts and modules that will be explained in detail in the rest of the thesis. In Chapter 4 we describe the management of knowledge done by the system. We include the management of information related to the context of the user and the services and scenarios which the system considers. We explain how the system models this knowledge and the mechanism developed to access it through a language we designed based on SPARQL. In Chapter 5 we explain how the system keeps its local knowledge updated. We describe the process of sharing information with other devices in order to help each SHERLOCK-enabled device to learn from the interaction with others. In Chapter 6 we present the process of managing user information requests. First, we explain how the system helps users to define their information needs in order to translate their needs into a formal request using SHERLOCK’s query language. Then, we explain how these requests are processed. In Chapter 7 we present the processing of SHERLOCK queries by using different sources. We focus on the deployment of a network of mobile agents
Chapter 1. Introduction 12 which are in charge of finding SHERLOCK devices which might contain the requested information. The agents execute the queries against such SHERLOCK devices. In Chapter 8 we describe the management of multimedia information in SHERLOCK. In particular we focus on the efficient management of camera views using information about the context of cameras and objects in the scenario. We explain the algorithms developed to extract high-level features of the views of such cameras and compare the result to the camera view the user needs. In Chapter 9 we explain how the developed system deals with the motivating scenarios used through the thesis. We detail the steps involved and highlight how the system would deal with other similar scenarios. Finally, in Chapter 10, we present the conclusions and main contributions of this thesis, as well as some future work and lines that have been opened. We also include two appendices where we present: 1) Our thorough analysis of the performance of Semantic Web technologies, such as semantic reasoners, on mobile devices, which is one of the foundations of the SHERLOCK architecture (Appendix A); and 2) The different prototypes developed, based in our approach for the semantic management of Location-Based Services in wireless environments, and tests (Appendix B).
Chapter 2 Technological Context In this chapter, we describe concepts and technologies related to our work in order to help understanding the rest of the thesis. First, we focus on knowledge management that is one of the pillars of SHERLOCK. We describe important concepts such as ontologies and languages used to model them, semantic reasoners to infer non-explicitly defined knowledge in these ontologies, and query languages to retrieve information from such knowledge. Second, we focus on mobile computing, which is the other pillar of SHERLOCK, describing concepts such as Location-Based Services and mobile agents. Finally, we focus on knowledge management on mobile devices and more precisely we overview how mobile applications in the literature use semantic data. 2.1 Knowledge Management In this section we present the main semantic technologies used in the thesis. First, we use ontologies to model the knowledge managed by our system and ontology alignment techniques to integrate the knowledge shared by SHERLOCK devices. We selected Description Logic (DL) [BCMNPS03] as the formalism to represent these ontologies. Also, we use semantic reasoners based on DL to infer non-explicit knowledge from the explicit facts defined. Finally, we use a query language based on SPARQL, and its GeoSPARQL and SPARQL-DL extensions to formalize user requests in the system. 2.1.1 Ontologies The term ontology was defined by Tom Gruber as “an explicit specification of a conceptualization” [Gru93]. Therefore, ontologies allow to model and capture 13
Chapter 2. Technological Context 14 the semantics of different knowledge domains, providing a means to share definitions, and reach an implicit agreement on the meaning of the published information. There exist different formalisms to define ontologies and the basic elements in them include: •Instances, which are objects of the world. •Classes, which are sets of instances usually organized in hierarchies. • Attributes, which represent relationships between classes of the domain, or between classes and a datatype value. Figure 2.1 shows a very simple example of ontology. This ontology models the class PhDStudent as a subclass or Student, having two properties dissertationTitle (which takes a string value) and hasSupervisor (which connects PhDStudent and Professor classes). According to the ontology, RobertoYus (an instance of PhDStudent) has supervisor EduardoMena (an instance of Professor) and his dissertation title is “Semantic Management of LBS in Wireless Environments”. Figure 2.1: Example of ontology. The Semantic Web [BLHL+01] was proposed to make the information on the Web readable by machines. One of the main tasks to achieve that goal is to
15 Chapter 2. Technological Context annotate the content, and ontologies have been traditionally used for it. Since then, different efforts have been made to structure the content of the Web and nowadays, thanks in part to the Linked Data [BHBL09] movement, hundreds of resources/ontologies are available 1 . As an example, Figure 2.2 shows two ontologies, O1and O2, extracted from the website of two universities. Person MsC_Student PhD_Student Professor Social_Group Forum Institution Symposium College Product Documentary Publication Reference Article Thing (a) Person Student Full_Professor Assistant_Professor Group Research_Group Meeting Organization Conference Piece_of_Work Book Report Conference_Paper Thing Movie Magazine_Paper Guidebook Instructionbook Educational_Institution School University (b) Figure 2.2: Two sample ontologies describing knowledge about universities. One of the main goals of ontologies is to provide a common model for annotating content and thus help systems to interoperate. However, interoperability problems still remain as usually terms defined in different ontologies are related according to their definitions (sometimes with a varying level of detail) but not directly linked. As an example consider the sample ontologies, O1 and O2 . The knowledge that they model is related, as both represent information about universities, but their definitions are slightly different. Thus, ontology alignment [ES+07] systems were designed to try to find semantic relationships such as, for example, synonymy, hypernymy, and hyponymy, which could relate elements from different ontologies. 1http://www.linkeddata.org
Chapter 2. Technological Context 22 Reasoner Profile Language License OWL API CB OWL 2 DL (FRG) OCaml LGPL Yes ELK OWL 2 EL (FRG) Java Apache 2.0 Yes HermiT OWL 2 DL Java LGPL Yes jcel OWL 2 EL (FRG) Java LGPL/Apache 2.0 Yes JFact OWL 2 DL Java LGPL Yes MORe OWL 2 DL Java GPL Yes Pellet OWL 2 DL Java Dual Yes TReasoner OWL 2 DL (FRG) Java GPL Yes TrOWL OWL 2 DL (APX) Java Dual Yes Table 2.3: Semantic Web reasoners and some of their characteristics. FRG: Fragment; APX: Approximated. DL Reasoners Designed for Mobile Devices Apart from the DL reasoners presented in the previous section, several DL reasoners were specifically designed to run on mobile devices. We dedicate this section to overview them in a chronological order. Pocket KRHyper 26 [SK05] was the first reasoning engine specifically designed for mobile devices. It can be seen as a version of the reasoner KRHyper [Wer03] for devices with limited resources, thus disabling some of its original capabilities (such as default negation and term indexing). It is implemented in J2ME (Java Micro Edition) and implements a hypertableau algorithm for the DL SHI . However, the reasoner suffers from scalability issues, as the authors state in [Kle06]. Later on, M¨uller et al. [MHLN06] reported the implementation of tableau algorithm for mobile devices, introducing some optimizations to reduce the memory usage such as assigning natural numbers to concept expressions to reduce comparisons to integer operations. Their system is implemented in J2ME and supports the DL ALCN with unfoldable TBoxes, but it does not have a known name and is not publicly available. mTableau [SKG09; SK08] is a modified version of Pellet 1.5 to work on mobile devices. The main idea is to introduce some novel optimization techniques, namely selective application of consistency rules, skipping disjunctions, and ranking of individuals and disjunctions leading to potential clashes. This 26http://mobilereasoner.sourceforge.net
23 Chapter 2. Technological Context reasoner is not publicly available. Delta [MHK12] is designed to be used on mobile devices, but no implementation details are given. The reasoner uses RDF to store the ABox and OWL RL to represent the TBox axioms. The main reasoning task is conjunctive query answering, which is solved by translating TBox axioms into rules to expand the RDF triple store. The reasoner uses incremental reasoning techniques to avoid recomputing all the inferences every time there is an update of the ABox facts. A preliminary evaluation is performed, obtaining sub-second query response times. This reasoner is not publicly available. Mini-ME 27 [RSSGL12] (Mini Matchmaking Engine) is a mobile reasoner implemented from scratch. The supported DL is the DL ALN , whereas the supported reasoning tasks are consistency, classification, concept satisfiability, subsumption, and other non-standard inference services (abduction, contraction, and covering). It is implemented in Java and can be run on Android devices as well as on desktop computers. Mini-ME can be accessed through the OWL API, as a OWLlink server, or using a Prot´eg´e plug-in. The authors have empirically compared the performance of Mini-ME in a mobile device and in a desktop computer. It turned out that reasoning times are roughly one order of magnitude higher in the Android device [RSSGL12]. However, it should be stressed that these results only hold for the not very expressive logic ALN , having polynomial computational complexity. The authors also performed some experiments proving that the Android version of Mini-ME outperforms an older version developed in J2ME [RSS11]. 2.1.3 Representation Languages Ontologies represent the vocabulary of some domain from a common perspective using a formal language. In the following we explain the most important languages in the Semantic Web: RDF and OWL. RDF and RDF-S Resource Description Framework (RDF) [MMM+04] is a family of World Wide Web Consortium (W3C) specifications designed to represent information about resources on the Web. The representation followed by RDF is a triple < sp o > where s is the subject, which is the resource, p is the predicate, which is an aspect or trait of the resource, and o is the object. To denote the resources in these triples, RDF statements use the uniform resource identifier (URI), or blank 27http://sisinflab.poliba.it/swottools/minime
Chapter 2. Technological Context 24 nodes. Probably the most important piece of vocabulary introduced by RDF is rdf:type which can be used to state that a resource is an instance of a class. For instance we can use the triple < RobertoY us rdf : type PhDStudent > to define that the resource RobertoYus is an instance of the class PhDStudent. RDF-S (RDF Schema) [BG04] is a “general-purpose language for representing simple RDF vocabularies on the Web”. Therefore, RDF-S allows the description of relations between RDF resources (see Table 2.4 for the main RDF-S constructs). For instance, RDF-S allows to define that PhDStudent is a subclass of Student and the different properties associated with it. Classes Properties Utility properties rdfs:Resource rdfs:domain rdfs:seeAlso rdfs:Class rdfs:range rdfs:isDefinedBy rdfs:Literal rdfs:type rdfs:Datatype rdfs:subClassOf rdfs:XMLLiteral rdfs:subPropertyOf rdfs:Property rdfs:label rdfs:comment Table 2.4: Main RDF-S constructs. Web Ontology Language (OWL) Web Ontology Language (OWL) [HKPPSR09] is a family of knowledge representation languages for describing ontologies. OWL is characterized by formal semantics and indeed, the current version of the language, OWL 2, is equivalent to the DL SROIQ(D) . OWL extends RDF-S and allows the representation of ontological knowledge missing in RDF-S such as range restrictions that apply to some classes only, classes that are disjoint (whose individuals cannot belong to them at the same time), or union of classes. Therefore, OWL allows the definition of more expressive ontologies than RDF/RDF-S. For instance, OWL 2 supports the definition of complex classes using the class expressions in Figure 2.428. In OWL 2 there are three sublanguages or profiles which can be more simply and/or efficiently implemented: 28The complete OWL 2 syntax can be found in https://www.w3.org/TR/owl2-syntax
25 Chapter 2. Technological Context ClassExpression := Class | ObjectIntersectionOf | ObjectUnionOf | ObjectComplementOf | ObjectOneOf | ObjectSomeValuesFrom | ObjectAllValuesFrom | ObjectHasValue | ObjectHasSelf | ObjectMinCardinality | ObjectMaxCardinality | ObjectExactCardinality | DataSomeValuesFrom | DataAllValuesFrom | DataHasValue | DataMinCardinality | DataMaxCardinality | DataExactCardinality Figure 2.4: Definition of OWL 2 class expression. 1. OWL 2 EL, which is a fragment that has polynomial time reasoning complexity. 2. OWL 2 QL, which is designed to enable easier access and query to data stored in databases. 3. OWL 2 RL, which is a rule subset of OWL 2. These profiles are independent of each other and the choice of a profile to model an ontology depends on its structure and reasoning tasks to consider 29 . 2.1.4 Query Languages Query languages are computer languages used to query databases and information systems. For example, SQL is the standard language used to query relational databases. In the following we introduce SPARQL, the standard query language of the Semantic Web, as well as two extensions of this language, GeoSPARQL and SPARQL-DL, used in our system to query geospatial data and OWL ontologies, respectively. SPARQL SPARQL [PS+08] (a recursive acronym for SPARQL Protocol and RDF Query Language) is an RDF query language, that is, a semantic query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. It was made a standard by the RDF Data Access Working Group (DAWG) of the World Wide Web Consortium, and is recognized as one of the key technologies of the Semantic Web. There are four different query variations in SPARQL for different purposes: 29 More information about the features of each profile can be found in https://www.w3. org/TR/owl2-profiles
Chapter 2. Technological Context 26 •SELECT, which is used to extract raw values. •CONSTRUCT, which extract results in RDF. •ASK, which obtains a true/false results for the query. • DESCRIBE, which extract an RDF graph containing information about the given resource. In the rest of this document we will use mainly SELECT queries to ask directly for facts and data. GeoSPARQL GeoSPARQL [BK11] is a standard for representation and querying of geospatial linked data for the Semantic Web from the Open Geospatial Consortium (OGC). In particular, GeoSPARQL provides for: •A small topological ontology in RDF-S/OWL for representation using: – Geography Markup Language (GML) and well-known text (WKT) literals. – Simple Features, RCC8, and DE-9IM (a.k.a. Egenhofer) topological relationship vocabularies and ontologies for qualitative reasoning. •A SPARQL query interface using: – A set of topological SPARQL extension functions for quantitative reasoning. – A set of Rule Interchange Format (RIF) Core inference rules for query transformation and interpretation. SPARQL-DL According to [SP07] “it is harder to provide a semantics for [SPARQL] under OWL-DL semantics because RDF representation mixes the syntax of the language with its assertions. The triple patterns in a query do not necessarily map to well-formed OWL-DL constructs.” Therefore, Sirin et al. defined SPARQL-DL [SP07]: “a substantial subset of SPARQL that can be covered by the standard reasoning services OWL-DL reasoners provide.” SPARQLDL uses the SPARQL syntax and is fully aligned with the OWL 2 standard. Table 2.5 shows the supported query patterns for the SPARQL-DL language.
27 Chapter 2. Technological Context Classes Properties Individuals Class(a) Property(a) Individual(a) EquivalentClass(a, b) PropertyValue(a, b, c) Type(a, b) SubClassOf(a, b) EquivalentProperty(a, b) DirectType(a, b) StrictSubClassOf(a, b) SubPropertyOf(a, b) SameAs(a, b) DirectSubClassOf(a, b) StrictSubPropertyOf(a, b) DifferentFrom(a, b) DisjointWith(a, b) DirectSubPropertyOf(a, b) ComplementOf(a, b) ObjectProperty(a) DataProperty(a) Functional(a) InverseFunctional(a) Transitive(a) Symmetric(a) Reflexive(a) Irreflexive(a) InverseFunctional(a) InverseOf(a, b) Table 2.5: SPARQL-DL supported query patterns. 2.1.5 Tools for Developing Semantic Applications Finally, we want to mention two important Semantic Web APIs we used in our prototypes to handle ontologies: Jena 30 [McB02] is an ontology API to manage OWL ontologies and RDF data in Java applications. Jena is appropriate to manage OWL 1 Full ontologies, but support for OWL 2 is not available yet. However, it is much more used for the serialization of RDF triples and the manipulation of RDF graphs. Jena can interact with semantic reasoners to discover implicit knowledge. The latest versions of Jena are split into two packages, namely jena-fuseki (with the Jena SPARQL server), and apache-jena (with APIs, SPARQL engine, RDF database, and other tools). OWL API 31 [HB11] is an ontology API to manage OWL 2 ontologies in Java 30http://jena.apache.org 31http://owlapi.sourceforge.net
Chapter 2. Technological Context 28 applications and provides a common interface to interact with DL reasoners. It can be considered as de facto standard, as the most recent versions of most of the semantics tools and reasoners use the OWL API to load and process OWL 2 ontologies. The OWL API is able to process each of the OWL 2 syntaxes defined in the W3C specification (functional, RDF/XML, OWL/XML, Manchester, and Turtle) and to identify the OWL 2 profiles (OWL 2 DL, OWL 2 EL, OWL 2 QL, and OWL 2 RL). The OWL API is less appropriate for the management of OWL 2 Full or RDF ontologies. 2.2 Mobile Computing Mobile computing implies the possibility of computers being transported around by users. Indeed, in the last few years, we have witnessed a massive spread of mobile computing which is shaping our daily lives. This has been undoubtedly helped by the pervasive connectivity that the current wireless networks provide us with and the affordable prices of current mobile devices (such as smartphones and tablets). In this section we present the main technologies related to mobile computing used in the thesis. First, as the thesis presents a system to provide Location-Based Services, we present some information about them and their building block, location-dependent queries. Then, we explain the context information, which mobile devices can infer from their equipped sensors, and used in our system to select services which might be interesting for a user. Finally, we introduce the concept of software agent focusing on mobile agents, which have been previously used for distributed and mobile computing applications. In our system, these agents are used to perform different tasks such as, for example, finding the information that the user needs wherever it is. 2.2.1 Location-Based Services In the last years the interest in mobile computing has grown due to the ever-increasing use of mobile devices and their pervasiveness. The low cost of these devices, along with the high number of sensors and communication mechanisms they are equipped with, make it possible to develop useful information systems. Using special kinds of sensors, location mechanisms enable the development of Location-Based Services (LBS) [SV04]. These services provide value added by considering the locations of the mobile users to offer customized information. For example, LBS for taxi searching [SCC10], helping firefighting [JCHWTL04], detecting nearby friends [AEMPW07], or multimedia retrieval in sport events [IMIYLM12] have been presented, among many others.
29 Chapter 2. Technological Context Location-Dependent Queries Location-dependent queries are a special type of query for which, opposed to traditional queries, their answer depend on locations of objects. Thus, the location of an object determine whether the object is part of the answer or not. For example, the query “find taxis within 2 miles” depends on the location of the user and a taxi will be retrieved if its location is less than 2 miles apart from the location of the user. Therefore, location-dependent queries are a fundamental building block of LBS which use them to obtain the information that the user needs. There exist multiple types of location-dependent queries considered in the literature (see [IMI10] for a complete classification) among which we would like to highlight: • Range queries [TWHC04], which retrieve objects in a region, which can be fixed or even move, within a range (e.g., “find museums in Zaragoza”). Range queries are called within-distance queries [TS03] when the range is a circle (e.g., “find taxis within 2 miles”). • Nearest neighbor queries (NN queries) [TPS02], which retrieve the object which is closest to a location or object (e.g., “find the closest gas station”). They are called kNN queries if more than one object must be retrieved (e.g., “find the closest five restaurants to the Lincoln Monument”). There are other possible classifications of location-dependent queries according to temporal or semantic factors, among others. From them, we want to highlight the concept of instantaneous and continuous queries for which the answer is computed only once or it is reevaluated, respectively. For example, queries which depend on the location of the user are usually treated as continuous as the user might move and the result should be updated accordingly. 2.2.2 Context-Aware Computing Current mobile devices are equipped with sensors that enable them to go beyond location awareness, the capability of determining their location. Therefore, they can determine, for example, that the user is standing up, talking, in the middle of a research meeting with her peers, in the meeting room of the building, and on a Friday at 2pm. This information is part of the context of the user and so, context awareness [SAW94] is a property of current mobile devices. Context awareness enables devices to react based on the environment and has been leveraged in many ubiquitous systems. For instance some classic
Chapter 2. Technological Context 30 examples of context-aware applications (extracted from [CK00]) are: 1) a call forwarding system that detects the location of the user and her activity to forward her calls; and 2) a shopping assistant system that displays information of items whenever the user enters a shop and recommends what to buy according to the user preferences. The concept context has many interpretations in the literature and so, there is no unified definition of it. Most of the definitions agree that context has something to do with the interactions between the users and the computing systems [CK00]. Arguably one of the most accepted definitions for context was suggested by Dey and Abowd [ADBDSS99]: “[...] any information that can be used to characterize the situation of an entity. An entity is a person, place, or object that is considered relevant to the interaction between a user and application, including the user and applications themselves.”. Dey and Abowd also decompose context into two categories: primary context pieces (i.e., identity, location, activity, and time) and secondary context pieces (context aspects that are attributes of the primary context, e.g., a user’s phone number can be obtained by using the user’s identity). Also, there are many approaches on how to infer the context of a user using context providers and synthesizers. According to Ranganathan et al. [RAMC04], acontext provider is a sensor and/or other data sources of context information. In the same way, a context synthesizer is a mechanism that gets the information obtained by context providers and deduces a higher-level notion of context (e.g., the location or activity of a user). 2.2.3 Agent Technology Agent technology has been used in the literature to develop distributed and mobile computing applications [Fer99]. In the following we give a brief explanation of software agents including mobile agents that are used in the architecture proposed in this thesis. 2.2.4 Software Agents There is no consensus in the definition of what an agent is [Nwa96]. However, we can consider that a software agent is a program that acts on behalf of a user. Among the many different properties that might be associated with agents we highlight the following (extracted from [Ila06]): •Autonomy [FG97]: ability to act without direct human intervention.
31 Chapter 2. Technological Context • Sociability [SS02]: ability to think about itself or about others (altruistic and egoistic agents). • Reactivity [GDFLP02]: ability to respond to changes in the environment. •Proactivity [RM00] or goal-directed behavior. •Temporal continuity [FG97]: persistency over long periods. • Learning/adaptivity [FG99]: ability to learn from the environment and from other agents to improve performance. •Reasoning [RNCME96]: decision-making mechanism. •Mobility [CHK97]: ability to migrate to other components. •Cooperation [Les99]: interaction with other agents to achieve a goal. •Negotiation [Smi77] (e.g., to allocate subtasks to different agents). Autonomy has been usually considered inherent to all the agents but not all of them have to provide the rest of functionalities [RT98]. Mobile Agents Agents that have the mobility property mentioned before are called mobile agents [CHK97]. Mobile agents are programs that execute in context denominated places and can autonomously travel from place to place resuming their execution there. Thanks to their mobility, mobile agents offer interesting benefits [LO99; Ila06]: 1. They encapsulate protocols. As they can move to remote computers to achieve their goals, they avoid the need for installing specialized server processes on every machine to provide access to all the required services. 2. They reduce the network load. Thus, a mobile agent can travel where the data are and access to them locally, filtering out the data that do not need to be sent over the network. 3. They overcome network latency. Thus, they can move to another computer in order to optimize the response time.
Chapter 3. Overview of the System 38 services that could satisfy her demands (Figure 3.1 shows some of the possible transportation options), but in addition to their typical characteristics (e.g., cost), they may also have other specific features (e.g., shareable, door to door, etc.). So, the user needs to ask first tourist offices or websites, or search for a mobile app about transportation in that city; she could be easily overwhelmed with information and many options, and it could be difficult for her to determine which ones are relevant according to her preferences. Figure 3.1: Different transportation options in our first motivating scenario1. So, it would be very interesting for this person to just indicate the name of the destination hotel and her preferences (for example, she could prefer to pay more to reach the hotel as soon as possible) and obtain on her smartphone the real-time location of the best possible transportation means around her. To enable this, the system would have to deal with challenges such as obtaining information about the transportation means (considering geographic information about the city) and keeping it updated, showing the results to the user, etc. The interest of a system like this is beyond doubt: currently, although many transportation services and hotels publish their information on the Web and there exist useful services such as Google Maps, a user traveling to a certain 1Photos source: https://commons.wikimedia.org/wiki/Main_Page
39 Chapter 3. Overview of the System city will probably have to deal with all the previous applications at the same time to try to arrange her trip. 3.1.2 Helping Firefighting A wildfire has broken out in a wide area of forest (see Figure 3.2); the designated coordinator person is in charge of managing all the firefighters and emergency vehicles in order to suppress the wildfire. The main task of this team coordinator is to solve the problem as quickly as possible but, at the same time, keeping the team members safe. Due to the lack of a network infrastructure (the fire could have damaged it or there could be no network coverage in that area), firefighter team members usually use walkie-talkies to describe their location and the wildfire evolution. However, it is difficult to provide an accurate oral description of the situation while fighting a wildfire (due to smoke, geographic features of the terrain, and the stressing situation). So, monitoring firefighting units in a dangerous area (and instructing them to reach a safe one), during the suppression of the wildfire, turns out to be a very challenging task for a team coordinator. Therefore, it could be interesting for a firefighting coordinator to see, on a map displayed on her tablet, the location of all the firefighting units and the evolution of the wildfire in real-time; she would also have to keep a continuous communication with all the team members to get their last smoke and heat sensor readings. Thus, she could be able to notice changes of the wildfire that could put the life of firefighters in danger. The main challenge for a system that deals with this scenario is to monitor moving team members deployed in an environment where it is not possible to rely on a fixed network infrastructure, while detecting automatically firefighting units that could be in danger. 3.1.3 Live Broadcasting of Sport Events In many scenarios, it is important to select among many cameras the one whose view is the most interesting. For example, in the live broadcasting of sport events, a Technical Director (TD) has to make quick decisions to select the camera whose video stream will be broadcasted. Nowadays, broadcasting organizations are increasing the number of cameras covering sport events (e.g., Sky TV uses 24 cameras in Premier League matches). Furthermore, the audience of the sport event could provide TDs with interesting shots too. The higher the number of cameras available, the richer the content that can be 3Photo source: https://www.flickr.com/photos/usfwshq/8597688091
Chapter 3. Overview of the System 40 Figure 3.2: A team of firefighters suppressing a fire in our second motivating scenario3. obtained, but the more complicated is for the TD to select the best one. And they must take this kind of decisions very frequently. For example, consider the TD in charge of the live broadcasting of a rowing race in San Sebastian (Spain). From the TD perspective, the scenario includes multiple cameras available for the broadcasting (in the rowing boats, in a helicopter, in the harbor, and in a nearby island). We should not forget either that many people among the crowded audience of the event are equipped with mobile devices (e.g., smartphones and tablets), in boats around the race and in the promenade (Figure 3.3 shows a picture of the scenario with the locations described before). In this context, it would be very helpful to have a system where the TD could define her interest on a certain view (e.g., a view of the front of two rowing boats) and obtain the list of cameras (including broadcaster and audience cameras) that could provide it, currently or in a matter of seconds. Thus the system would monitor cameras for the TD, automatically looking for predefined shots or even detecting certain predefined situations (overtakings or 4Photo source: https://www.flickr.com/photos/sansebastian2016/3903530582
41 Chapter 3. Overview of the System Figure 3.3: The rowing boat race in our third motivating scenario4. other incidents), whose work could be focused on selecting the best camera to broadcast from the different preselected lists of cameras selected by the system. The main challenges in this scenario are: enabling the TD to express the kind of shot she is interested in, processing the views of the multiple cameras in the scenario in real-time to find those that can provide the requested shot, and ranking the results to help the TD to select the most similar shots to her request easily. 3.1.4 Emergency Management Many well-known real emergency situations have shown that without a good coordination and information flow, the task of emergency teams is very difficult and could even become very dangerous. The bigger the scale of the emergency, the more valuable any information about the real situation; and multimedia information can become priceless in almost 100% of emergencies, especially when such data are obtained in real-time and propagated to emergency teams. In the last decade, the use of mobile information technologies in emergency management has attracted a lot of interest because of the potential value it can provide in this kind of scenarios (e.g., [Cro12; WYZ11]). For example, the use of P2P communications can help when the network infrastructure is damaged or it is just not available; thus, users in the area could provide the very valuable information that emergency teams need to optimize their work. Let us imagine that an accident has occurred in the highway (see Figure 3.4 5Photo source: http://trainingfirstaid.ca
Chapter 3. Overview of the System 42 Figure 3.4: The traffic accident in our fourth motivating scenario5. for a possible picture of the scenario). First, the people involved in the accident, or even their vehicles if equipped with sensors to detect it, need to alert emergency teams. The emergency team that received the alert needs to know the location of emergency vehicles and staff (e.g., policemen, firemen, etc.) in the surroundings that could help. In this scenario, to obtain real-time multimedia information (images/videos) of the accident area would be very useful for the emergency team to determine the severity of the accident: number and type of vehicles, condition of injured people and how many, urgency due to a fire or presence of dangerous substances, etc. Thus, they could send the most appropriate resources to the accident area. Also, such multimedia information could help emergency units on their way to the accident in order to know what they will face once there. Moreover, we could assume that users in this scenario (for example, drivers in the vicinity of the accident) would be willing to help because lives could be in danger. Notice that in addition to all the challenges commented in the previous scenarios, in this case there is a need to define complex services which require the interaction of devices. Also, the distribution of information to different devices is a challenge of this scenario (e.g., pictures of the accident to the emergency vehicles which could be on their way towards the accident area).
43 Chapter 3. Overview of the System 3.1.5 Common Challenges In the previous use cases, some common needs appear which a system to support them would face. We have grouped these challenges into two categories, challenges related to: 1) the knowledge that such a system must consider; and 2) mobile computing. Knowledge Management The following common challenges related to the management of knowledge of the specific scenario arise in the above scenarios: 1. The system must be an expert in the different kinds of elements in the scenario, their features and capabilities, and the geographic information about the scenario. So, it is the system, and not the user, who is in charge of knowing all the details about all the LBS available at each location. 2. The system must handle information about the current context of the user (e.g., her location and activity) and the context of her device (e.g., its current capabilities or the readings of its sensors). 3. A flexible user interface, able to help the user to define the kind of multimedia information (text, images, videos, etc.) she wants, is needed. Indeed, a textual description or a form might not be enough to, for example, define the picture or video to obtain. 4. Integrate results from different sources detecting which results could be more interesting for the user. For instance, which results are more updated or fulfill the user requirements, or are closer to the information that the user requested. Therefore, the system must know or learn, for example, transportation options in the foreign city of the first motivating scenario or how to help a TD in the broadcasting of the rowing race of the third motivating scenario. The third item is specially challenging for the TV broadcasting in our third motivating scenario. Of course, the coordinator in charge of the traffic accident of the fourth scenario could also be interested in specific images (e.g., showing the front of the cars involved in the accident). However, the level of detail in the definition of such interesting shots will always be higher in the case of a TD, who might have a very specific shot in her mind.
Chapter 3. Overview of the System 44 Mobile Computing The following common challenges related to the managing of the user requests arise in the above scenarios: 1. Finding devices which could provide the information that the user wants and establishing communication with them. This might imply analyzing in real-time the information retrieved and the features of the devices which could capture it. For example, this helps to discard those users/devices that could not be able to provide the requested data and to rank the results obtained according to the matching with the kind of answer wanted. 2. Tracking the location of objects of interest (the transports in the first scenario and emergency teams around the accident area in the fourth) as well as cameras (owned by the broadcaster in the third scenario and from other users in the last two scenarios). Notice that some of the cameras might be attached to moving objects (e.g., boats or people) and be controlled just manually or remotely. 3. Discovering users equipped with cameras and asking them to share recent pictures/videos already stored on their devices. Also, it could be needed to ask users to capture certain pictures or videos. In the third scenario users might need an incentive to do so and in the last scenario they might do it altruistically or forced by authorities (as lives could be in danger). Following privacy and trust policies is mandatory in this case. 4. Maintaining a continuous communication among the user of the system and the rest of the devices involved in the distributed scenario in order to provide the final user with an updated answer continuously. 5. The system must deal with the distributed nature of the environment (which is particularly challenging when it is not possible to rely on fixed infrastructures and ad hoc networks have to be considered) and deal with continuous request processing, scalability and fault tolerance, deployment of computations to specific geographic areas, etc. In the case of the ambulances in the fourth scenario, the last challenge is especially difficult as the system has to, not only obtain information but also, send it to the emergency units moving to the accident area. This would mean tracking those moving units at any time and establishing a communication to send them multimedia information while on the move.
45 Chapter 3. Overview of the System Therefore, in the rest of this thesis, we propose SHERLOCK, a system that is able to address the challenges described above by applying semantic and distributed processing techniques. The system is able to support the previous four motivating scenario as well as any similar scenario where a user is interested in obtaining information about moving objects and performing actions in highly-dynamic distributed scenarios. 3.2 Architecture SHERLOCK is based on the collaboration of devices to resolve information needs of their users. In SHERLOCK’s distributed architecture every device acts as an independent node which communicates with others to exchange information that might be interesting for its user. SHERLOCK-enabled devices use their communication mechanisms (e.g., WiFi and 3G) to create Peer-to-Peer (P2P) networks. The benefits of the communication between SHERLOCK- enabled devices are twofold, it allows devices to: 1) exchange information about services and their surroundings and thus, every devices learns from the different interactions; and 2) answer requests posed by others by using the information they store locally. To offer the previous functionalities each SHERLOCK node is composed of modules in charge of the following tasks (see Figure 3.5 for the high-level module architecture): Interaction with the user, knowledge management, and user request management. These tasks are handled by different static and mobile agents. In addition to the different agents created to address SHERLOCK goals, our architecture reuses some of the agents presented in [IMI06], to process location-dependent queries, and in [MRM04], to adapt user interfaces, extending them with semantic capabilities and with the ability to take into account the decentralized scenarios considered in SHERLOCK. For the management of the agents involved in the architecture, SHERLOCK uses a mobile agent platform [TIM07], which provides an abstraction level for the development of distributed agent-based cooperative systems 6 . In SHERLOCK mobile agents communicate to each other directly and the mobile agent platform is in charge of managing the low-level details of this communication. For instance, when there is no direct communication (due to the lack of a fixed network infrastructure, which makes an ad hoc network the only possible option), the mobile agent platform may use an underlying multi-hop ad hoc 6 In our prototype, we used a version of the mobile agent platform SPRINGS [ITM06], which offers RPC-based synchronous communications to support the cooperation among agents on the same device or on different devices, ported to Android.
Chapter 3. Overview of the System 46 Figure 3.5: High-level architecture of a SHERLOCK node. routing protocol [BTAABT11] to allow its agents to communicate with each other; for more low-level details about the communication protocol see the referenced paper. In the following sections, we introduce the main functionalities of the system with the static and mobile agents in involved in each task. 3.2.1 Interaction with the User The module to interact with the user takes care of tasks such as the generation of Graphical User Interfaces (GUIs) to obtain information from her and to show results to her. However, for this module we reuse the work in adaptive interfaces presented in [MRM04] with some minor extensions. The following agents are involved in the interaction with the user: • ADUS, which generates graphical user interfaces (GUIs), adapted to the user profile and device capabilities, by rendering a GUI description provided by incoming agents that want to interact with the user.
47 Chapter 3. Overview of the System • Alfred, which specializes on interacting with the user and stores as much information as possible about these interactions. • SHERLOCK Endpoint (SE), which provides access to SHERLOCK’s user request processing capabilities to external applications, advanced users, and other SHERLOCK devices. 3.2.2 Knowledge Management The knowledge management module of the system handles the knowledge including information about the user and the device as well as services and scenarios. This knowledge is used to: 1) offer the user services and mechanisms to express her information needs, and 2) answer the user information requests. To provide users with interesting information, each SHERLOCK device keeps this knowledge continuously updated through the interaction with other devices. We explain this module in Chapter 4. The following agents are in charge of the knowledge management task: • Knowledge Endpoint (KE), which is in charge of providing access to the knowledge stored on the device to other agents (see Section 4.2). • Context Updater (CU), which specializes on knowledge about the user and the context of her device (see Section 5.1). • Ontology Updater (OU), which shares and integrates new knowledge, obtained from other objects, into the local ontology on the user device (see Section 5.2). • Multimedia Manager (MM), which analyzes multimedia information (i.e., camera views) to obtain further information from it (see Chapter 8). 3.2.3 Request Management The request management module of the system handles the user information requests. First, it helps the user in the definition of her request by capturing her information needs. From the information captured, this module deduces the most appropriate service for her and generates a formal query expressing it. Then, it processes the request by executing the formal query against different sources including the local knowledge in the device and third-party external knowledge bases. Finally, it deploys a network of mobile agents to obtain the information requested directly from other devices, if needed. We explain
Chapter 4. Knowledge Management 54 Object class/es The object is an instance of a class which shares with other devices (e.g., person, taxi, bus, firefighter, etc.). Location The physical position of the object which comprises the GPS coordinates as well as hierarchy of places. Mobility Whether the object is a moving object or not. From an ontological point of view, a mobile object with a maximum velocity of 0 is not the same as an object that cannot move at all. Maximum speed When dealing with moving objects, the maximum velocity can be used to estimate positions and make the system more robust against communication failures for example. Direction The direction of movement of a moving object which can be used, for example, to estimate future positions. Extent The area (2D) or volume (3D) that the object occupies physically. Activity The activity that the user is performing. Secondary context Pieces of information related to the activity and location of the user. Table 4.2: Information stored about the context of the user. ontology (see Figure 4.2 2 ) although the dynamic data is stored in a database for efficiency. This way, in the case of location information the GPS coordinates of the user’s location, which are highly-dynamic, are stored in a database. Then, this information is combined with the knowledge in the ontology about buildings or cities to infer a higher-level notion of the user location such as the building the user is in. To explain the information modeled of users and other objects considered by SHERLOCK we will use as examples two elements of our third motivating scenario in Section 3.1.3: a rowing boat (see Figure 4.3), as an example of an object of interest, and a camera (see Figure 4.4), which is an important element of the system as it can capture multimedia information. Modeling Objects The location of an object is probably the most important context piece that the system has to manage as it is essential for LBS. For example, users can request information related to the location of an object such as whether the object is inside an area or not. The notion of location in our system includes both the 2 The notation employed in this document for images of ontology excerpts follows the Graffoo specification [FGPSV14] ( http://www.essepuntato.it/graffoo ): yellow boxes for classes, green boxes for datatypes, blue arrows for object properties, green arrows for data properties, and black arrows for predicates.
55 Chapter 4. Knowledge Management Figure 4.2: An excerpt of the context ontology. position of an object (i.e., its coordinates) as well as the place where the object is (i.e., its geographic area). This information can be provided, for example, by a GPS and have to to be continuously updated to obtain accurate results, as it is highly-dynamic data. The imprecision of the localization mechanism could lead to imprecise answers (e.g., in [SWW06] the authors report an accuracy of around 1 meter for some GPS receivers), but our approach is independent of the specific location mechanism used. So, it is possible to combine, if needed, several positioning mechanisms to increase the accuracy, even for indoor events (by using overhead cameras, sensors, Wi-Fi signal strength maps, etc.). An special case supported by SHERLOCK is the capability to support requests related to cameras such as whether a camera could take a picture of a certain object or not. The process to achieve this, which we will explain in
Chapter 4. Knowledge Management 56 Figure 4.3: An object-of-interest modeled in our system. Chapter 8, requires of other information of objects such as the direction of movement and the approximate volume (extent) of space that these objects occupy. Our system does not need a precise 3D mesh of these object to accomplish its main goal (as we show in our tests in Section B.4.3, where we used an approximate extent for the different types of objects-of-interest). Of course, the more precise the extent of an object-of-interest provided to the system, the more accurate the information it will obtain regarding the percentage of the object viewed by a camera. Thus, users could generate a simple 3D model for these objects or even search for similar already-generated meshes in 3D model databases (e.g., by using keywords or even real images, as studied in [ADV07; GWZTDZ11]). As the extent of objects-of-interest could change dynamically it could be interesting to request this information from other devices. However, in real life only small parts of these extents change (e.g., the rows of a rowing boat, the limbs of a person, etc.). Thus, the general accuracy of our approach to compute what are cameras viewing will not be affected significantly if non-deformable extents for objects-of-interest are used (in our tests we used fixed 3D models). Besides, the front and top vectors, which are used to represent where the front and top parts of the extent are, must be defined for this extent (e.g., in the rowing boat of Figure 4.3 the front and top vectors are [1 , 0 , 0] and [0 , 0 , 1] respectively). This way, the system is able to support requests retrieving cameras that can view specific parts of the object, for example, cameras recording the front of the rowing boat. The views supported by these vectors are: top/bottom, front/rear, left/right, or any combination of two or three elements chosen from the three previous pairs. In our system, 90-degree
57 Chapter 4. Knowledge Management angles are considered between the front and top vectors, the sides and the front, and the sides and the top. Thus, no more than three viewpoints are going to be usually selected at the same time in a query for the same object. Modeling Cameras Concerning cameras, which are special types of sensors attached to devices and which play a key role in SHERLOCK as they are providers of multimedia content (see Chapter 8), we consider that they can rotate (both vertically and horizontally) and change their location (if they are attached to moving objects). We model a camera c as shown in Figure 4.4. In the figure, we identify several elements: βh and βv are the horizontal and vertical angle of view (that define the Field of View –FOV– of the camera), respectively; α , αmax , αmin , and αspeed are the current pan (i.e., the current horizontal rotation of the camera), the maximum pan possible, the minimum pan possible, and the pan speed (degrees/second) of such a camera, respectively; finally, θ , θmax , θmin , and θspeed are the current tilt (i.e., the current vertical rotation of the camera), the maximum tilt possible, the minimum tilt possible, and the tilt speed (degrees/second), respectively 3 . Angles that represent a pan to the right ( α ) or a tilt upward ( θ ) from the corresponding vector are considered positive and those that represent a pan to the left ( α ) or a tilt downward ( θ ) are considered negative. Besides, each camera has the rest of features of a regular object (such as a unique identifier, location, etc.). βh αmax αmin α0 angle bisector of βh c (a) θmax θmin 0 βv θangle bisector of βv c (b) Figure 4.4: Modeling a camera: pan (horizontal plane) (a), and tilt (vertical plane) (b). 3In this work we do not deal with the possibility of zooming.
Chapter 4. Knowledge Management 58 4.1.2 Service and Scenario Knowledge To be aware of the available functionalities, SHERLOCK handles a structure of services which are defined extending a pre-shared ontology (see Figure 4.5). This module comprises knowledge about both the services themselves (e.g., which parameters it receives, how it is invoked, the type of the result -if any-), and the different entities needed to completely define their semantics (e.g., if we define a service to look for means of transport, in the ontology, the entity Transport should appear), which we refer to as “scenario”. Figure 4.5: Basic ontology for service modeling in SHERLOCK’s services. In our model, services are instances of the class Service in the ontology. Specializing this class Service in the ontology, the service definers (users and/or companies which want to extend SHERLOCK) can arrange services into families of services which share functionality (e.g., a concept Find Buses would be a family of services). In fact, our approach requires that service
59 Chapter 4. Knowledge Management definers select an existing family for their newly added services (or define a new one, extending the vocabulary)4. Apart from their ontological classification, services defined in SHERLOCK can further be classified attending to the way they are processed into three types of services: 1. SHERLOCK querying services: Services which provide functionality to find objects and are similar to traditional location-dependent queries. However, SHERLOCK also handles queries which are not related to any location. The system itself provides contributors with a functionality to find objects in its local ontology and even deploys a network of agents to obtain them from other devices. To define these services, contributors can model the information that the service will obtain as a result (e.g., a service to find pictures will return pictures), and its parameters (if any). As an example, Figure 4.6 shows the definition of a service of this type to obtain transports. Figure 4.6: Example of the definition of a SHERLOCK querying service to obtain transports. 4 SHERLOCK does not aim at matching directly services as in classical Semantic Web Services approaches. Our approach relies on integration of the shared schemas to discover new instances with similar functionality.
Chapter 4. Knowledge Management 60 2. External services: Services provided by a particular provider object. This kind of services includes both third party external services and services offered by other SHERLOCK-enabled devices (which might involve notifying or interacting with another user). The definition of this kind of services is extended with information about: 1) their provider (via provider property), 2) the access mechanism to be used (via call property), and 3) for those which require user’s interaction, an specification of the interface to be used5. For example, Figure 4.7 shows a service to take pictures that is provided by SHERLOCK objects equipped with cameras and the service of the Metropolitan Transportation Authority of New York which returns the location of buses through a web service. Another interesting external service that can be defined is, for example, a service to query an external knowledge base, such as DBpedia, to obtain the location of POIs in an area (the call property would include the SPARQL query and the URL of the DBpedia endpoint). Figure 4.7: Two examples of the definition of external services: 1) to take pictures and 2) to obtain transports from a web service. 3. Complex services: Services defined via a composition of services of the 5 As we will see, this specification will be used by the ADUS agent to create an user interface and interact with the user in another SHERLOCK-enabled device.
61 Chapter 4. Knowledge Management two previous types (i.e., these services use them as atomic actions). This composition is defined by a workflow specified in BPMN [Whi04], which is included in the service definition in XPDL format 6 (taking into account that the “Activities” considered in BPMN are indeed “Services” in our architecture) using the execute property. Currently, we restrict our approach to support a subset of BPMN enough to model services executing atomic services in parallel, sequence, and combinations of the previous7. For example, Figure 4.8 shows a service for the live broadcasting of a rowing race which needs to find cameras and rowing boats (two SHERLOCK query services) and then ask the cameras to take pictures of the boats (an external service provided by SHERLOCK objects with cameras). Notice that the specific services have to be defined as explained previously, and the composed service includes a reference to them in the XPDL code attached. Any service of these three kinds will be translated into user requests when a user selects them and processed later, as we will explain in Chapter 6. In particular, a SHERLOCK querying service will be translated into a query in SHERLOCK’s language, an external service into an external call, and a complex service into a workflow composed of SHERLOCK queries and/or calls. Moreover, the way that atomic requests will be finally processed is also defined by the continuous property of their associated service, which defines whether they have to be continuously evaluated. For example, a service to ask a camera to take a picture might have to be evaluated once only, whereas a service to obtain taxis near the user is expected to be continuously reevaluated to obtain updated results until the user is not interested in it anymore. Finally, to know which services are relevant to a particular user’s situation, these services are linked to the user context through a special property (interestingFor). This property has to be populated by the user or company who is modeling the service, deciding whether that particular service will be interesting for a certain context or not. In this case, the context for which the service is interesting has to be defined using its attached activity and/or location. For example, the service to find monuments in New York could be defined as interesting for contexts whose activity is “tourism” and whose location if “New York”. 6http://www.xpdl.org 7 Note that our approach only supports the usage of simple atomic services within the workflows. We do not aim at supporting any kind of service composition (e.g., workflows within workflows)
Chapter 4. Knowledge Management 62 Figure 4.8: Example of the definition of a complex service with a workflow to find cameras in an area and request them to take a picture. In the following, we detail present the agent in charge of providing access to the knowledge. The agents in charge of updating the knowledge and the local ontology will be presented in Chapter 5. 4.2 Providing Access: Knowledge Endpoint Agent The Knowledge Endpoint agent (KE from now on) processes queries against the local ontology on the device posed by other agents. The handled information includes highly-volatile data (e.g., the specific location of the user and the surrounding objects, sensor readings of the device, or even instances of current providers of each service), as well as more static information (e.g., the model of the device and its features, or definitions of services). To handle the volatile part of the knowledge, the KE agent adopts the strategy presented in [BBIM14], where static and volatile knowledge is stored in ontologies and databases, respectively, and is detected and marked at modeling time, allowing continuous DL query processing with enough expressiveness. Local agents on the device and external agents from other users pose queries, using SHERLOCK’s query language, to the KE agent. The KE agent is able
63 Chapter 4. Knowledge Management to interpret this language and obtains results taking into account the privacy preferences of the user regarding the information to be shared with others. In the following, we explain the grammar of SHERLOCK’s query language and the management of the privacy preferences of the user. 4.2.1 SHERLOCK’s Query Language The design of our system has been guided by criteria of maximizing both expressivity and flexibility of the system. Thus, in order not to be constrained to a predefined set of scenarios, with hardcoded queries and user needs, we made SHERLOCK capable of processing its own query language. We designed this query language taking as basis our previous experience in the field of location-based queries. In particular, we took as baseline the expressivity of the SQL-like query language proposed in [IBM11], which allows to write location-based queries using different location granularities. As our approach manages knowledge modeled using ontologies, we based SHERLOCK’s language on SPARQL [PS+08], a standard query language able to handle RDF data. To integrate both aspects (locations and DL semantics) in the same query language, we adopted (and adapted) the GeoSPARQL [BK11] and SPARQL-DL [SP07] extensions of SPARQL: • GeoSPARQL [BK11] is a standard for representation and querying of geospatial linked data from the Open Geospatial Consortium (OGC). • SPARQL-DL [SP07] is a subset of SPARQL extended with predicates that are fully aligned with OWL 2, and which covers the typical functions associated with OWL. Also, we included some functions to handle information provided by cameras as SHERLOCK queries can be used to obtain multimedia information too. The adoption of this query language in our system has the following benefits: • It provides part of the expressivity of SQL and complements it taking into account semantic and geographic technologies. • As mentioned before, it decouples the system from a specific scenario, increasing its flexibility. • As it is based on SPARQL, the system is able to query popular Linked Open Data SPARQL endpoints 8 and integrate the results (in RDF format) 8 There is a huge amount of information in these repositories, e.g., DBpedia [BLKABCH09] contains a great part of Wikipedia’s information semantically annotated.
Chapter 4. Knowledge Management 70 FILTER(checkKindOfView(sherlock:Kaiku, ?thing, ’front’, ?time) = true), FILTER(checkKindOfView(sherlock:Kaiku, ?thing, ’top’, ?time) = true), FILTER(checkKindOfView(sherlock:Kaiku, ?thing, ’side’, ?time) = true), ?pct=percentageObject(sherlock:Kaiku, ’any’, ?thing, ?time), }, PropertyValue(?thing, sherlock:id, ?id) ORDER BY DESC(?score) pct Now lets show the information obtained by these functions applied to the camera views shown in Figure 4.10. First, the following high-level features are extracted by the system from a camera view: • The specific objects viewed (e.g., in Figure 4.10(a), CAM1 views the rowing boats “Kaiku” –in green– and “Urdaibai” –in red–) and some information about them: – The distance to the object (e.g, in Figure 4.10(a), the distance between CAM1 and the boat “Urdaibai” is 17 meters). – The percentage of the object covered (e.g., in Figure 4.10(b), CAM2 views 22% of the boat “Kaiku”). – The percentage of the shot occupied by the object (e.g., in Figure 4.10(b), “Kaiku” fills 26% of CAM2 view). – The kind of view obtained of the object (e.g., in Figure 4.10(b), CAM2 views the front and left side of “Kaiku”). – The percentage of the viewpoint of the object covered (e.g., in Figure 4.10(b), CAM2 views 47% of the front and 29% of the left side of “Kaiku”). • The percentage of the shot occupied by objects-of-interest (e.g., in Figure 4.10(a), both rowing boats fill 6% of the view provided by CAM1). Therefore, CAM1 and CAM2 will be returned by the KE agent for the first sample query whereas CAM1,CAM2, and CAM3 will be returned for the second (as CAM1 and CAM2 are already obtaining the required view, and CAM3 will be able to do it in less than 20 seconds). 4.2.2 Context-Aware Privacy Policies The KE agent executes queries posed by other agents against the local knowledge on the device. These agents might act on behalf of other users (e.g., Updater agents – which we will explain in Section 7.3 – execute queries of a
71 Chapter 4. Knowledge Management user against other devices). In this scenario, users might have some preferences regarding which data can be shared with whom. Semantic Web technologies have been used in the literature to represent and enforce these user privacy preferences [KFJ03], also called privacy policies. In [KFJ03] the authors propose a semantic policy language to represent the user privacy policies, and a policy engine that interprets and reasons over such language. The KE agent uses this approach to preserve the privacy of its user when processing queries from others. The policy language is based on the Semantic Web Rule Language (SWRL) [HPSBTGD04] whereas the policy engine in our approach is the KE which uses the semantic reasoner to evaluate the rules when information is requested. In addition, incorporating context to these policies allows a higher degree of granularity and control in the application of the privacy preferences of the user. For instance, the following context pieces are considered in the privacy policies handled by the KE agent: • Location: In our scenario we treat location context semantically as in “at the bar”, “at the University campus” or “inside home”. For example, if a student has specified that she does not want to share her location when she is in University buildings, it is assumed that she does not want to share her location at the University library. • Activity: It can be used to add another dimension to the meaning of location. For example, a classroom used for private meetings versus public lectures. An example of policy which would be activity dependent is a user do not want certain information from her local knowledge base to be shared when in a work meeting. • Identity: The identity of certain users of groups can be used to model simple access control. For example, to specify what information on the device can be shared with strangers. • Time: While time is ingrained into other aspects of context, it allows for an all-embracing notion of privacy without worrying about the location and activity of users. Most user situations demand a combination of various types of context pieces described above. A possible example of such a scenario would be “do not allow my social network colleagues group (identity context) to obtain my (identity context) location when I’m in a party (activity context) held on a weekend (time context) at the beach house (location context)”. As proposed in [KFJ03], these rules should be encoded in SWRL and based on the
Chapter 4. Knowledge Management 72 context ontology (see Figure 4.2) 11 . For example, the previous policy would be expressed in SWRL as follows: Person(?p) ∧Colleague(?p) ∧Context(?c) ∧ hasTime(?c,?t) ∧hasDay(?t,?day) ∧WeekendDay(?day) ∧ hasLocation(?c,?loc) ∧BeachHouse(?loc) ∧ hasActivity(?c,?act) ∧Party(?act) ∧Location(?loc) →DenyAccessTo(?loc,?p) Thus, whenever an agent representing another user poses a query requesting the location of the user, the KE agent evaluates the previous rule (with the help of the reasoner) to determine if the information can be shared. 4.3 Summary of the Chapter In this chapter, we have presented the management of knowledge by SHERLOCK. First, we explained the modeling of the different categories of knowledge managed by the system: user context, device context, services, and scenarios. Then, we introduced the Knowledge Endpoint agent in charge of providing access to the local knowledge on the device to other (local or external) agents. We explained the SPARQL-like query language that we defined and which can be interpreted by the KE agent. This language, which decouples the system from specific scenarios, is based on GeoSPARQL and SPARQL-DL to handle geospatial and DL semantics, respectively. Also, we introduced the handling of user privacy policies when external agents, belonging to other devices/users, request information to the KE agent. 11It is out of the scope of this work to deal with the definition of rules by users.
73 Chapter 4. Knowledge Management General query structure Query →SELECT Projections Where Projections →Var (‘,’ Var)* Where →WHERE ‘{’ Conds ‘}’|Where OR WHERE ‘{’ Conds ‘}’ Conds →LICons? ObjectCons ProjectionsCons? Location of Interest Constraints LICons →LI ‘{’ Patterns ‘}’ Object Constraints ObjectCons →OD ‘{’ ObjectDefs ‘}’ ObjectDefs →TypeDef (‘,’ TypeDef)* TypeDef →OptionalDef |ObjectDef OptionalDef →OPTIONAL ‘(’ ObjectDef ‘)’ ObjectDef →Patterns |CASE ‘(’ Patterns ‘)’ Projection Constraints ProjectionsCons →ProjCons (‘,’ ProjCons)* ProjCons →PropertyValue( VarOrIRI ,VarOrIRI ,VarOrIRI ) Patterns Definition Patterns →Pattern (‘,’ Pattern)* Pattern →DLFunction |GeoFilter |CameraFunction /* DL-related functions */ DLFunction →SPARQLDL |DLExtension SPARQLDL →. . . /* all the SPARQL-DL predicates */ DLExtension →Domain( VarOrIRI ‘,’VarOrIRI)|Range( VarOrIRI ‘,’VarOrIRI ) /* GeoSPARQL functions */ GeoFilter →FILTER ‘(’ GeoFunction ‘)’ GeoFunction →geof:sfIntersects( Geometry ,Geometry ) |geof:sfWithin( Geometry ,Geometry ) Geometry →VarOrIRI |geof:buffer( Geometry ,Real ,Units ) /* Camera View Analysis functions */ CameraFunction →. . . /* checkKindOfView, percentageShot, . . . */ Basic grammar productions VarOrIRI →Var |IRI IRI →. . . Var →. . . . . . . . . . . . Figure 4.9: Simplified Grammar of SHERLOCK’s query language.
Chapter 4. Knowledge Management 74 (a) (b) (c) (d) Figure 4.10: Sample views, recreated using Google Earth, of three cameras (CAM1 (a), CAM2 (b), CAM3 (c), and CAM3 after 4 seconds panning to the right (d)) covering a rowing race.
Chapter 5 Knowledge Update To be able to provide its users with interesting information, each SHERLOCK device has to maintain its local knowledge updated. First, it needs to keep updated the information about the context of the device and user, as this information is used to determine whether a certain service might be interesting for her current situation. Also, as explained in the previous chapter, this information is leveraged to check her privacy preferences regarding the exchange of information with other devices. Second, it needs to keep updated the local ontology which contains information about services and the surroundings. This information is essential as, for example, a device might not have information about services in the current location. In this chapter, we present the Context Updater and Ontology Updater agents in charge of these tasks. These agents leverage the communication with other SHERLOCK devices to exchange information and learn from their interactions. In the case of the Context Updater agent it collect facts about the context of other users and their devices. The agent uses this information to improve the understanding of the context of its user (e.g., by including facts related to her current activity). In the case of the Ontology Updater agent, it exchanges ontologies modeling services and integrates them into its local knowledge by discovering subsumption relationships between their concepts. 5.1 Updating Context: Context Updater Agent As explained before, the goal of the context information managed about the user and other users around is twofold. On the one hand, SHERLOCK uses the context of a user to offer services that might be interesting for her. On the other hand, SHERLOCK uses the context of other users/devices to answer 75
Chapter 5. Knowledge Update 76 requests of the user. Also, the context information is used to specialize the privacy preferences of the user regarding her information being accessed by other devices. The Context Updater agent (CU) handles the volatile context information belonging to the device, its user, and other users/devices around. For that, the CU agent performs the following tasks (see Figure 5.1): Figure 5.1: Context Updater agent (CU) tasks. • Context Extraction. This task involves inferring a high-level notion of context, exchange this information with other devices, and integrate the information received to improve the inferences made. • Context Change Detection. Whenever the CU agent infers a new context for the user, it is in charge of detecting significant changes (in our prototype, when the user moves to a different city and/or each month). These changes of context are used to reevaluate the information (e.g., services) that might be interesting for the user by the Ontology Updater agent as we will explain in Section 5.2. In the following, we explain our approach for context extraction. 5.1.1 Context Extraction The CU agent uses context synthesizers [RAMC04] to process the low-level sensory data produced by the device to extract a higher level notion of the context of the user. These context synthesizers are external modules that take as input the raw data (e.g., produced by sensors) and return a semantic notion
77 Chapter 5. Knowledge Update of context using terms from the context ontology (see Figure 4.2). Also, context synthesizers typically compute and return a value that expresses the confidence on the information inferred being correct. For instance, the context synthesizer presented in [PWLZB07] is able to use information from the microphone on a device and user calendar and deduce that the user is in a meeting with a certain confidence. As the device might have different sensors enabled at a given time and they can be inaccurate, the CU agent uses an approach to enrich (i.e., correct and improve) the information returned by context synthesizers. This approach is based on leveraging the information about devices/users around that the CU agents exchange continuously. The context enrichment task is based on the following steps: 1. Obtain the context information from the available context synthesizers. As mentioned before, these context synthesizers return a high-level notion of context (i.e., location and activity) along with a confidence value. 2. Communicate with devices discovered in the vicinity and request their context information. In our case devices exchange the information described in Table 4.1 and Table 4.2. The KE agent returns the previous information if the privacy preferences of the user allow it. 3. Integrate the context information collected to generate a shared context model. The shared context model integrates facts about location and activity, as well as any secondary context piece related to them. 4. Verify the information integrated in order to detect and resolve inconsistencies. A device could exchange erroneous information inferred by its context synthesizers (e.g., it could exchange a wrong location if the last GPS coordinate of the device was generated an hour ago). In the following we focus on our approach to deal with the last two steps. Context Integration When mobile devices using different context providers and synthesizers exchange context information, some of which is possibly imprecise, sometimes there can be diverse information. For example, consider a scenario where multiple users (Annie, Abed, Jeff, and Pierce) are in a study room in the library of a university with their SHERLOCK-enabled devices (smartphones, tablets, and a laptop). The information that their respective devices extract about the context of their users depend on the current sensors enabled and the accuracy of the context
Chapter 5. Knowledge Update 78 synthesizing phase. Imagine that the CU agents on their devices exchange the context information of their users that they inferred. Table 5.1 shows the information that the context synthesizers in each device inferred, the confidence they computed for each inference, and the normalized confidence. For example, let’s focus on Annie’s tablet which receives information about the location such as Glendale Community College (GCC) and Study room F while her own device thinks the location is Annie’s Home. In this situation and for each piece of context, the CU agent has to determine from all the possible values which ones are most likely. For this task, it uses a simple weighted majority voting scheme which has been proven to be successful in tasks such as pattern recognition [LS97]. Identity Location Source Confidence kConfidencek Annie Annie’s Home Calendar 0.75 0.23 Abed GCC GPS and 0.8 0.25 GeoNames Jeff Study room F Foursquare 0.7 0.22 and GPS Pierce GCC IP address 0.9 0.29 Table 5.1: Contextual information shared about location. The CU agent uses the semantic reasoner and ontology to deduce if a given fact is supporting a different one. For example, Jeff’s smartphone states that its location is Study room F and so, Jeff’s device is implicitly supporting that its location is GCC as the study room is in GCC’s library. Therefore, in the example of Table 5.1 three devices support that the location is GCC (Pierce’s, Abed’s, and Jeff’s). The same situation can arise with activities, both Abed’s and Annie’s devices share that the activity performed is a Study Group and so, they support the Meeting activity shared by Jeff’s device. To do this, the CU agent first obtains all the equivalent instances for a given fact by using the owl:sameAs property. For example, for the instance GCC the instance Greendale Community College will be obtained. Then, the CU agent obtains the list of supported facts by the selected one and its equivalents. This process varies depending on the type of fact: • Location facts: The system uses the isIn property of the context ontology, that models geographic areas contained in others [BBMI13], to obtain the list of supported facts. As this property is transitive, it is possible to obtain the complete list of directly and indirectly (i.e., inferred by the
79 Chapter 5. Knowledge Update reasoner) supported facts. For example, as the following information has been modeled in the ontology < Study room F, isIn, GCC Library > and < GCC Library, isIn, GCC > , a device sharing a fact stating that the location is Study room F is implicitly supporting that the location is also GCC Library and GCC. • Activity facts: The system obtains the class(es) of each individual by using the rdf:type property. Then, for each class, the system uses the rdfs:subClassOf property to obtain directly and indirectly supported facts. For example, the fact for activity shared by Annie’s device is a Spanish Study Group which in turn is a subclass of Study Group and Meeting. Therefore, Annie’s device is implicitly supporting that the activity is also Study Group and Meeting. For each different context piece, cpx (e.g., cploc for location), a CU agent has to compute a global confidence on each of the different facts shared, fi , (e.g., GCC,Annie’s Home, and Study room F) taking into account that some of them can be supported by more than one device (e.g., GCC is supported by Pierce, Abed, and Jeff as mentioned before). First, the CU agent computes the normalized value by defining a normalized local confidence value, nci , as follows: nci=max(lci,0) Pjmax(lcj,0) (5.1) where the normalized local confidence value is positive (see column k Confidence k in Table 5.1). Then, let T be the set of normalized confidence values related to a piece of context cpi , and let S be the set of normalized confidence values that support a context value fi (e.g., location facts from Abed’s and Pierce’s devices support location as GCC). The CU agent sums up the values in S and normalize it over T, to compute the global confidence gci, as follows: gci=Pinci Pjncj ∀ci∈S, ncj∈T(5.2) After the context integration process, the CU agent will finally obtain a list of candidate context pieces with their computed confidence, GC ( cpx ). In our previous example, the final possible locations computed for the users along with their confidences are: GC(cploc) = {Annie0s Home(0.23), GCC(0.77), Study room F (0.22)}
Chapter 5. Knowledge Update 86 We propose the following steps to discover subsumption relationships along with their subsumption degree (see Figure 5.4): PhDStudent Teacher MsCStudent Student Professor O3 O1 PhDStudent Teacher O2 Student Professor MsCStudent Subsumptionxrelationshipsxdiscovered Setxofxsharedxroles ConceptsO1 ConceptsO2 RolesO1,xRolesO2 Shared Roles Extraction RolexSetxComparison pairsxofxrolesxx ExtractionxofxRoles Subsumptions DL Reasoner ComputexDynamicxThreshold FilterxRedundantxInformation Subsumption Relationships Filtering SelectxAppropiatexSubsumptions Subsumption Relationships Extraction LabelxAnalysis RolexSetxAnalysis Co-HyponymsxAnalysis . . . Ontologies Figure 5.4: Main steps in our approach to extract subsumption relationships from two source ontologies. 1. Shared roles extraction: First, the algorithm extracts RO1 = {r∈ O 1 r|CO1∈domain ( r ) } and RO2 = {r∈O 2 r|CO2∈domain ( r ) } . For that, it uses the DL reasoner to check whether the concept CO1 is a subconcept of the domain of r . Then, the set of roles of the two concepts are compared to extract the list of shared roles. Roles from different ontologies can be slightly different even when representing the same entity (e.g., the roles O1 # StudiesAt and O2 # StudentFrom ). Therefore, we should consider every possible combination of the roles of the concepts
87 Chapter 5. Knowledge Update being analyzed as shared. To decrease the number of comparisons the most probable pairs can be obtained by computing a similarity degree. In our case, as explained before, we use the technique described in [GA13] to compute a similarity degree between roles. 2. Subsumption relationships extraction: The subsumption degree among the concepts extracted from each ontology is computed by using their labels (and external sources of information), the set of similar roles from the previous step, and potential co-hyponyms (see Section 5.2.3). 3. Subsumption relationships filtering: The less probable relationships extracted are filtered out using a dynamic threshold to return a mapping file with the most probable subsumption relationships (see Section 5.2.3). In the following we detail the previous steps. Subsumption Relationships Extraction The subsumption extraction method provides a measure, subsumption degree, that indicates the confidence on the concept Cs from an ontology, being subsumed by the concept CS from a different ontology, by considering Csv CS,∀Cs∈O1, CS∈O2 . This method analyzes the ontological context of every concept (i.e., label, roles, and hierarchical relationships with other concepts) and so, it covers the major dimensions used in ontology matching according to [ES+07]: subsumptionDegree(Cs, CS) = wl∗dLabel(Cs, CS)+ wr∗dRoles(Cs, CS)+ wch ∗dCohyp(Cs, CS) (5.3) where dLabel ( Cs, CS ), dRoles ( Cs, CS ), dCohyp ( Cs, CS ) obtain the subsumption degree between the labels (Section 5.2.3), the roles (Section 5.2.3), and the co-hyponyms (Section 5.2.3) of the concepts, respectively. Also, wl , wr , and wch are some weights (relative importance) assigned to each factor with wl + wr + wch = 1. Intuitively, the relative importance of wr has to be greater than the others as it considers the semantic features associated with each concept, which differentiate them. Although, the information about co-hyponyms also contain semantic information about the concept, it cannot be used to distinguish between the given concept and their co-hyponyms.
Chapter 5. Knowledge Update 88 Label Analysis The names of the concepts can be used to obtain information about their relationships from third-party lexical databases [BBCCGMMV00; SdM08]. However, sometimes concept names could not be found in these lexical databases (e.g., in our running example the name PhDStudent does not appear in Wordnik, the resource used in our experimental evaluation) so, we also compare the two strings. Specifically, as a concept subsumed by another one should specialize it by definition, these subsumed terms sometimes contain the name of their subsumers (e.g., PhDStudent and Student,FullProfessor and Professor). In this case, we compute the similarity string metric between the names of the concepts [SSK05]. Otherwise, our approach does not compare the two strings at all, as this could lead to false positives (e.g., Universe and University look similar but there is not direct relationship between them). Finally, the information obtained from the external sources and the string comparison are weighted and added (intuitively, more importance should be given to the former as, if available, provides more information than the latter). Role Set Analysis The roles of the concepts can be used to find “hints” related to the features that every concept, Cs, subsumed by another concept, CS, presents: Statement 1 Cs must have all the roles of CS since a concept inherits all roles of its subsumer2. Statement 2 Cs should have more roles than CS (i.e., it should be more specialized). In the ideal case, both statements should be followed; however, in a real scenario different situations may happen: Statement 3 As they belong to different ontologies, it is possible that Cs does not have all the roles of CSalthough it is true that CsvCS. Statement 4 Some ontology roles are not characteristic enough to discover the semantics of a concept (i.e., the domain of such roles contains all the concepts in the ontology). So, we could even find concepts which do not have any characteristic role (all its roles are inherited from top concepts in the ontology). 2 A concept “has” a role if the concept is in the domain of such a role, according to the definition of the ontological context of a concept explained before.
89 Chapter 5. Knowledge Update Given two concepts and their set of roles (shared or not) we can define a formula that takes the previous statements into account to obtain their subsumption degree. The graphical representation of the desired subsumption degree with respect to the number of roles that the two concepts share, considering the number of roles of the subsumer concept, could be similar to the graph in Figure 5.5. 0 1 2 3 4 5 6 7 8 9 10 12 14 16 18 20 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 SharediRoles SubsumptioniDegree g 1irole 2iroles 3iroles 4iroles 5iroles 6iroles 7iroles 8iroles 9iroles 10iroles 15iroles 20 roles @irolesiofiCS Figure 5.5: Subsumption degree (Y-axis) between two concepts, Cs and CS , depending on the number of roles of CS (denoted by the different curves) and their shared roles (X-axis). The important aspect of the graph in Figure 5.5 is not the specific values shown (which simply correspond to our prototype) but that it models the following generic rules that capture the existence of subsumption relationships: Rule 1 The higher the percentage of roles of CS that Cs has, the greater the subsumption degree. According to Statement 1, a subsumed concept should inherit 100% of the roles of its subsumers, although sometimes this percentage is less (Statement 3). Consider C1 s and C2 s which share 40% and 80% of CS roles, respectively. The subsumption degree computed for C2 svCS should be greater than the degree
Chapter 5. Knowledge Update 90 computed for C1 svCS . In Figure 5.5, notice that the function is increasing for any number of roles. Rule 2 The higher the number of shared roles, the greater the subsumption degree. For example, if C1 s shares one role with C1 S (suppose that is 50% of C1 S ’s roles in this case) and C2 s shares six roles with C2 S (which is also 50%) the probability of a subsumption relationship between C2 s and C2 S should be greater than between C1 s and C1 S . I.e., according to the Duck Test: “If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.”; however, if it only swims like a duck, the probability of being a duck is lower. For example, in Figure 5.5, sharing 2/3 (two out of three) roles scores 0.52 while sharing 6/9 roles scores 0.64. In the following we present three rules that detail Rule 2 in case of Cs sharing all, none, and nof CSroles: Rule 2.1 If Cs shares all the roles of CS (the ideal case according to Statement 1), the higher the number of roles CS has, the higher the subsumption degree between them. For example, if C1 s shares one role with C1 S (that is 100% as C1 S only has one role) and C2 s shares six roles with C2 S (which is also 100% as C2 S has six roles), then the probability of a subsumption relationship between C2 s and C2 S should be greater than between C1 s and C1 S . Again, the Duck Test applies. In addition, the difference between these maximum values cannot be linear according to the number of CS roles as, for any number of roles, the subsumption degree function should score between 0 and 1 always. Hence, the subsumption degree should grow slower for a high number of shared roles as beyond a certain amount of shared roles the subsumption degree should be close to 1. In Figure 5.5, notice that beyond 7/7 the subsumption degree scores above 0.8 (we configured our prototype to return high values when sharing at least 7 roles). Rule 2.2 If Cs shares no role with CS (and this could happen according to Statement 3), the higher the number of roles CS has, the lower the subsumption degree between them. For example, if C1 s shares no role with C1 S ( C1 S has one role in this case) and C2 s shares no role with C2 S ( C2 S has six roles in this case) the probability of a subsumption relationship between C2 s and C2 S should be lower than between
91 Chapter 5. Knowledge Update C1 s and C1 S . According to what we could call the Opposite Duck Test: if it does not look like a duck, does not swim like a duck, and does not quack like a duck, then it probably is not a duck. However, if it only does not swim like a duck, the probability of being a duck is higher. Also, subsumption degrees for all these minimum values have to be lower than situations where Cs shares one or more roles with CS , which is always better than not sharing any role at all. In Figure 5.5, for example, 0/20 scores 0 and 0/1 scores 0.07; also, all these minimal values are lower than any other value when the number of shared roles is one or higher (which scores 0.08 and above). Rule 2.3 If Cs shares n of the m roles of CS (0 <n<m ), the higher the number of shared roles, the greater the subsumption degree. Intuitively, we could think that the number of non-shared roles, m−n , could “neutralize” the number of shared roles. However, according to the spirit of Rule 2, we believe that the greater number of shared roles, the more hints of Cs being subsumed by CS . We could call it the Weak Duck Test: if it looks like a duck and quacks like a duck, then it is probably a kind of duck, although we are not sure that it swims like a duck. In other words, we advocate that shared roles score more than what non-shared roles penalize the subsumption degree. So, in Figure 5.5, 1/3 scores 0.3, 4/8 scores 0.5, and 13/20 scores 0.8; i.e., the subsumption degree increases with increasing number of shared roles, even when the number of non-shared roles (2, 4, and 7, respectively) increases as well. The number of characteristic roles of Cs that are not inherited from CS (Statement 2) do not affect the graph: To determine whether Cs is subsumed by CS or not only shared roles are taken into account. For example, if the concept Person has four roles and the concept PhDStudent has these four and five extra roles, the latter would be a subconcept of Person regardless of its extra roles (the extra roles could, at most, indicate that PhDStudent might be subsumed by another concept). Also, not all the roles should have the same importance at the time of computing the subsumption degree. In general, the more concepts share the role the less important it is for extracting a subsumption relationship (Statement 4). To model these rules, and so the trend described in Figure 5.5, we used a logistic function that obtains the subsumption degree between Csand CS: dRoles(Cs, CS)=2∗1 1 + e−a∗f(Cs,CS)−0.5(5.4)
Chapter 5. Knowledge Update 92 where the function f ( Cs, CS ) computes the subsumption degree between concepts Csand CSas: f(Cs, CS) = wsh ∗sh(Cs, CS) |CS|+wdiff ∗diff(Cs, CS)−min max −min (5.5) diff(Cs, CS) = 1 α∗sh(Cs, CS)− |CS|(5.6) where Cs and CS represent their sets of roles and the two terms in Formula 5.5 are: 1) the percentage of CS ’s roles that Cs has (Rule 1), being sh ( Cs, CS ) the number of shared roles and |CS|the number CS’s roles; 2) the number of CS ’s roles that Cs has (Rule 2) with respect to the rest of the ontology, being diff ( Cs, CS ) the difference between the number of shared and non-shared roles, α is a constant that models the importance of the number of shared and non-shared roles, and max and min are the maximum and minimum number of concepts that share the same role in the source ontology and are used to normalize the term. Also, wsh and wdiff are used to adjust the importance of the shared roles and non-shared roles, respectively ( wsh should be greater according to Rule 2.3). In addition, a modifier is applied to each role when computing sh ( Cs, CS ) that reduces the subsumption degree of concepts sharing very common roles in the ontology: uniqueness(r)=1−k∗#domains #maxDomains(5.7) being r a role of the concept C ,#domains is the number of concepts in the ontology that have the role, except C and the concepts subsumed by C , and #maxDomains is the maximum number of concepts that may have r as part of their definition. For example, imagine that an ontology has only three roles r1 , r2 , and r3 which have 3, 10, and 5 concepts as their domains, respectively, then #maxDomains =MAX(3,10,5). Co-hyponyms Analysis In general, two co-hyponyms concepts, Cs and Cs0 such that (CsvCS)∧ (Cs0vCS) , will share the roles of CS (remember Statement 1) but they
93 Chapter 5. Knowledge Update could share other roles too, especially in the absence of intermediate concepts in the ontology. For example, consider a “missing concept” 3Cm such that (Cs0vCm)∧(CsvCm)∧(CmvCS) . In this scenario Cs and Cs0 will share some roles that CS does not have, the roles inherited from Cm . For example, consider O2 # Full Professor and O2 # Assistant Professor in Figure 2.2(b) where the concept Professor is missing; they share roles inherited from O2 # Person but also share roles that are common for professors. Thus, the subsumption degree of a concept Associate Professor with respect to the concept O2 # Person should be increased as it shares roles with the latter and with its potential co-hyponyms. To compute the similarity of the concept Cs and the subsumed concepts of CS , we compare the sets of roles of each subsumed concept, Ci , with the set of roles of Cs individually. This measure is calculated by computing the average between two terms: 1) the amount of roles shared by Cs and the subsumed concept Ci , with respect to the number of roles of Cs , and 2) the amount of roles shared with respect to the number of roles of Ci . Once the system has the similarity degree for each subsumed concept then it calculates the average similarity of all co-hyponyms. dCohyp(Cs, CS) = Ci X Cchilds S sh(Cs,Ci) |Cs|+sh(Cs,Ci) |Ci| 2 Cchilds S (5.8) being Cchilds S the set of subsumees of CS (i.e., the potential co-hyponyms of Cs ) and Cchilds S the number of elements in the set, Ci is the set of roles of the concept Ci and |Ci| and |Cs| are the number of roles of Ci and Cs , respectively. This measure can be interesting not only to help extracting subsumption relationships between concepts of the ontologies, but also to detect missing concepts. As commented before, a large number of shared roles between two co-hyponyms could be a hint that indicates the existence of a missing concept. For example, in the explained scenario as O1 # MsCStudent and O2 # PhDStudent share some roles that are not inherited from O2 # Student we could detect a potential missing concept (e.g., GraduateStudent ) not defined in these ontologies. 3 We consider that a concept that exists in real life but has not been defined in the ontology is a missing concept.
Chapter 5. Knowledge Update 94 Subsumption Relationships Filtering Our approach computes the subsumption degree among all the pairs of concepts from the two ontologies (see Figure 5.6 for some of the results obtained for our running example). However, there are three major groups of relationships discovered according to their subsumption degree: 1) very probable as the degree is high, 2) clearly unrelated concepts as the degree is very low, and 3) questionable relationships with a neither high nor low degree. Our approach automatically discards those values that are not probable enough by using three filters to: Relationship dLabel dHypRoles dSimCohyp Subsumption degree ... ... ... Automatic threshold for these ontologies = 0.503 O18Person O28Student 0.75 0.750 0.472 0.624 O28Person O18Professor 0.75 0.741 0.5 0.618 O18MsC_Student O28Person 0.0 0.609 0.0 0.487 O28Student O18Professor 0.0 0.635 0.0 0.508 O28Student O18Person 0.0 0.635 0.0 0.508 O18PhD_Student O28Person 0.0 0.581 0.0 0.465 O18PhD_Student O28Full_Professor 0.0 0.581 0.0 0.465 0.0 0.609 0.0 0.487 O18MsC_Student O28Assistant_Professor O18Article O28Magazine_Article 0.91 0.823 0.0 0.797 ... ... ... O28Magazine_Article O18Social_Group 0.0 0.087 0.0 0.069 Figure 5.6: Some of the subsumption degrees obtained for our running example. • Discard subsumptions under a (dynamic) threshold. The trend of the subsumption degrees computed depends on the ontology and thus, the threshold to filter out less probable relationships should be dynamic. For ontologies where most of the roles are shared by many concepts the overall confidence value can be low although, some of the extracted subsumptions can be correct. Instead of using a classifier that would require training on the domain, we propose using a clustering algorithm that automatically divides relationships into the three groups explained before. In the example of Figure 5.6, the threshold obtained by the k-means clustering algorithm in our prototype for the high-confidence cluster is 0 . 503 and so, 462 out of 560 possible subsumption relationships are filtered out (we detail the prototype and experiments performed in
95 Chapter 5. Knowledge Update Section B.2). • Select between hypernymy and hyponymy. Our approach obtains the subsumption degree for all the possible combinations of concepts and so, values for both CsvCS and CSvCs are computed. In addition, if Thing is the domain of some of the roles, all the concepts inherit them and thus, there will be always a nonzero subsumption degree among them. Selecting both relationships, even when the degree of one of them is low, will mean creating a synonymy relationship between the concepts 4 and that is out of the scope of the approach as it is not trivial and would require a further analysis. However, we do select both relationships when the degree is exactly the same. Therefore, in other situations this filter discards the relationship with the lower degree (e.g., in Figure 5.6 the filter discards O1#Person vO2#Student). • Discard redundant relationships. Some of the relationships extracted could involve the same concept Cs , for example CsvC1 S and CsvC2 S , and they could be potentially redundant if C1 SvC2 S or C2 SvC1 S . This filter selects the subsumption degree with the higher degree for a given concept from all the potentially redundant relationships discovered. For example, in Figure 5.6 O1 # Professor vO2 # Student is discarded because O1 # Professor vO2 # Person has a higher subsumption degree and O2 # Student is subconcept of O2 # Person ( O2 # Student v O2#Person). The final list of subsumption relationships discovered along with the original axioms from the source ontologies is materialized to create an integrated ontology. A challenge that should be addressed when integrating two ontologies from different sources is to create a consistent ontology as a result (i.e., an ontology which does not contain contradictory facts). Some definitions of concepts can be contradictory so we advocate inserting the subsumption axioms discovered one by one, in descending subsumption degree order, and using a DL reasoner to check the consistency of the ontology after each insertion. If the ontology is inconsistent the last inserted axiom should be removed before inserting other axioms. Also, it would be useful to remove concepts which are classified by the reasoner as unsatisfiable, which means that they are classified as equivalent to Nothing and thus cannot have instances. 4In DLs, Cs≡CS⇔(CsvCS)∧(CSvCs).
Chapter 6. Request Management 102 Figure 6.2: Steps to obtain relevant services for a user. is added to promote those services which are relevant to the current context of the user. This is done by the URM agent through the following query: SELECT ?nameService, ?property, ?context WHERE{ OD{ Type(?service, sherlock:Service),
103 Chapter 6. Request Management Algorithm 1 serviceSelection(UInput) Input: UInput is the kind of input provided by the user, if it is an entitySelection , then it includes the selected entity and information about it to further query the KE. The CU and ADUS agents are also available to the URM, to use context information as well as handle user interaction. Output: Obtains a list of services relevant for the user’s input and context. 1: serviceList ← ∅ 2: entityConstraints ← ∅ 3: ctxtOptionalConstraints ←CU.getUserCtxtConstraints() 4: if UInput.isEntitySelection() then 5: // the user can select an object or a location, first obtain locations and objects which contain the selected entity 6: entityConstraints ←KE.getConstraints(UInput.entity) 7: if UInput.entity isA object then 8: entityConstraints ←UInput.entity // the user has selected an object 9: end if 10: end if 11: // the entity constraints are mandatory (if any), while context ones are just optional 12: serviceList ← KE.queryActOntology(entityConstraints, ctxtOptionalConstraints) 13: // the list is ranked to promoting services related user’s context 14: rankAccordingContext(serviceList) 15: // ADUS shows the list of services and asks whether further services should be retrieved 16: searchSecondary ←ADUS.showServiceListQuerying(serviceList) 17: if serviceList.empty() or searchSecondary then 18: serviceList.append(KE.querySecondaryModules(entityConstraints, ctxtOptionalConstraints) 19: ADUS.showServiceList(serviceList) // ADUS shows the list of services 20: end if CASE(PropertyValue(?service, ?property, <entity_i>), SubPropertyOf(?property, sherlock:provides)), CASE(PropertyValue(?service, ?property, <entity_i>), SubPropertyOf(?property, sherlock:returns)), CASE(PropertyValue(?service, ?property, <entity_i>), SubPropertyOf(?property, sherlock:interestingFor)), OPTIONAL(PropertyValue(?service, sherlock:interestingFor, ?context), SameAs(?context,<userContext>)) }, PropertyValue(?service, sherlock:name, ?nameService) } Notice that this query is used for entities which are instances in the ontology (e.g., New York and MoMa). For entities which are concepts (e.g., museum)
Chapter 6. Request Management 104 the query would be similar but adapted using the “Range” and “Domain” functions instead of the “PropertyValue” function. The result of the previous query executed for each entity is a set of tuples containing the entity, the service related to it, and the property that links them ( < entityi, service, property > ). For example, if the selected entity was the MoMa museum, < MoMa, BuyTicketMoMa, provides > and < Museum, FindMuseums, returns > will be returned, among others. This set is ranked (i.e., services related to the selected entity go first, services related to its direct classes second, and so on) and passed to ADUS to generate an interface to show a list of services. The user will select one of the services and this information will be used in the next step. 6.1.2 Parameter Provision The result of the previous interaction with the user is the selection of a family of services (a subclass of the concept Service in the ontology) or a particular service (an instance). For example, the user could select the family of “Find Transportation” services or the specific “Find NY Transports” service (which is the service provided by the local transport office in New York). In fact, a user that wants to find transports regardless of the provider of this information would use the former whereas a user that wants the information offered by a specific provider would select the latter. In the parameter provision step, firstly the URM obtains the parameters of such selected services, if any. These parameters, which have been defined when the service was modeled, are the formal parameters that the service requires to be invoked or that can be used to restrict the information returned by the service. Thus, depending on the selected entity, the URM obtains the set of parameters to be fulfilled as follows: • Service family: The user has selected a family of services that share a set of formal parameters needed and a set of returned objects. We will denote such a family of services as SServ . The URM consults the ontology to obtain all the constraints of the type SServ vparameter :? x , which define the minimum set of parameters that such a service has to receive. The result is a set {fp1, . . . , fpn} of parameters that are applicable to that service. • Particular service: The user has selected a particular instance of service. In this case, firstly, the URM consults the service family which
105 Chapter 6. Request Management such an instance belongs to. Then, the URM obtains all the parameters that correspond to this family of services (as in the previous item) as the instance inherits them. Finally, as this service might have extra or constant value parameters, the URM extends (and overrides) the previous result set {fp1, . . . , fpn} with the parameters applicable to such a particular instance obtained by consulting the Service ontology via parameter property. This would be retrieved using the clause PropertyV alue(< serviceSelected >, parameter, ?ip). In both cases, the result is a set of parameters which have to be assigned a value to in order to be able to invoke the service or to filter its results out. The parameters that have a predefined value are not required from the user and are automatically filled for the final request. For the rest, to obtain the actual values of the parameters, the URM relies on ADUS and Alfred. Each parameter comes along with information about their expected value to be entered (e.g., a location, a boolean, or even an instance of a concept defined in the ontology). Notice that there are three types of “parameters” shown to the user: 1) parameters defined in the ontology through the parameter property; 2) location for LBS; and 3) provider in the case of services provided by several providers. A service might not have any parameter at all, although typically services will have parameters of the first type used to filter out the information returned. LBS will need, by definition, a location which might have to be requested to the user. Finally, external services (e.g., provided by SHERLOCK objects as explained in Section 4.1.2) might need the user to select the specific provider. For example, if the user selected the external service provided by SHERLOCK taxis to “pick her up”, she will have to select the specific taxi (or any or even all as explained before). 6.1.3 Service Handling With the service which the user selected (remember that the user could select a particular service or a family of services) and the values that the user introduced for the parameters associated with such service, the goal of this task is to decide how to execute it. Depending on the type of service a different process has to be followed (see Algorithm 2): Lines 3-5 If the service contains an execution plan (modeled through the execute property in the ontology as we explained in Section 4.1.2), the URM creates an User Request Processor agent (URP) to execute the plan,
Chapter 6. Request Management 106 Algorithm 2 serviceHandling({service},{< parameter, value >}) Input: {service} is a set of services selected by the user, {< parameter, value >} is a set of tuples containing a parameter and the value selected by the user. 1: for each service in {service}do 2: // the user could have selected more than one service 3: if service.execute!=null then 4: // create a new URP to execute the service plan 5: URP.execute(service.execute,{< parameter, value >}) 6: else 7: if service.call!=null then 8: // create a new URP agent to handle the call 9: URPi.call(service.call,{< parameter, value >}) 10: else 11: // the service is considered to be a search service 12: formalQuery ← GenerateFormalQuery( service , {< parameter, value >} ) 13: URP.execute(formalQuery) 14: end if 15: end if 16: end for which will in turn create a URM agent to handle each of the different services involved in such a plan. Lines 7-8 If the service is provided by a SHERLOCK controlled object (e.g., a specific taxi or camera or even an external web service) or a third party provider, there is an access mechanism defined (modeled through the call property in the ontology), then URM creates a URP to call the service. Lines 10-14 Finally, if there is neither an execution plan attached to the service nor a call mechanism defined, then the URM translates the request into a query expressed in SHERLOCK’s language and then creates a URP to execute it. The generation of a formal query for a search service with its associated parameters and values is shown in Algorithm 3: Lines 1-18 First, the URM translates the definition of target object(s), the entities that the service returns, by including: (Lines 2-9) 1) the specific target(s) of such service modeled in the local ontology, and the ontological definition of the target of such service (remember that different SHERLOCK devices could have different information in their local ontologies and thus, the ontological definition might be needed to understand the request); and
107 Chapter 6. Request Management Algorithm 3 GenerateFormalQuery(service,{< parameter, value >}) Input: service is a SHERLOCK service and {< parameter, value >} is a set of tuples containing a parameter and the value selected by the user each. Output: Generates a formal query expressing the user request in SHERLOCK’s language 1: query ←“SELECT ?resultObj” 2: // Generate the Target Object Definition part of the query 3: ODpart ←“OD {” 4: // Add the object(s) returned by the service, as defined in the ontology 5: for each target in service.{target}do 6: ODpart ←“CASE( Type(?resultObj,target)),” 7: end for 8: // Add the definition of object returned by the service 9: ODpart ← “CASE( PropertyValue(sherlock:service,sherlock:returns,?resultObj)),” 10: // Add the constraints defined by the user 11: for each < parameter, value > in {< parameter, value >}do 12: //The property that links the object to the parameter could be unknown 13: ODpart ←“OPTIONAL( PropertyValue(?resultObj,?propertyi,?parami), 14: PropertyValue(?parami,propNamei, parameter.name), 15: PropertyValue(?parami,propV aluei, value))” 16: end for 17: ODpart ←‘}” 18: //Generate the Location of Interest Definition 19: LIpart ← ∅ 20: for each loc in {< parameter, value >}do 21: LIpart ←“WHERE{LI{FILTER(geof:sfWithin(?resultObj,” 22: if loc.distance!=null then 23: // the user defined and area with a buffer 24: LIpart ←“geof:buffer(loc,loc.distance.value,loc.distance.unit)))}” 25: else 26: LIpart ←“loc))” 27: end if 28: // Include the Target Object Definition in the WHERE 29: LIpart ←“ODpart }” 30: if more locations remaining then 31: LIpart ←“, OR ” 32: end if 33: end for 34: //Include the rest of the content in the query 35: query ←LIpart
Chapter 6. Request Management 108 (Lines 10-17) 2) constraints to fulfill the parameters and values that the user selected (which are included as optional to maximize the chances of obtaining results for the user even if they do not fulfill completely her demands). Lines 19-34 Then, the URM translates the definition of the location of interest using the special location parameters included by the user, in the case of a LBS. As explained in Section 4.2.1, a WHERE clause is generated for each different location selected by the user or modeled in the service definition and the previous definition of the target objects are included in them. The next step is to process the user request which might be: 1) a SHERLOCK query, 2) a call to an external service provided by an external source, or 3) an execution plan of a composed service. We detail the processing of a user request by the User Request Processor agent in the next section. 6.2 Request Processing In this section, we detail the tasks carried out by the User Request Processor agent (URP from now on) introduced in the previous section. In particular, we explain how a URP agent deals with the three different types of user requests. As we have seen in the previous section, a URM agent creates a URP agent to delegate the management of three different types of requests (see Figure 6.3), namely: 1. Processing of a SHERLOCK query against the local knowledge on the device and external sources. 2. Invocation of external services including services provided by third party providers external to the system and SHERLOCK objects. 3. Execution of service plans composed of a workflow of atomic services. The rest of the section is dedicated to explain the processing of each of these three types of user requests. First, we will introduce the processing of SHERLOCK queries which involves the creation of a network of mobile agents which find the information wherever it is (we will detail this process in Chapter 7). Second, we will explain how SHERLOCK processes simpler requests involving the invocation of external services or execution plans.
109 Chapter 6. Request Management Figure 6.3: User Request Processor tasks. 6.2.1 Processing of SHERLOCK Queries When it comes to processing a SHERLOCK query, the URP is able to consider three different sources (i.e., the device’s local knowledge, the known third-party services, and the network of SHERLOCK devices) to maximize the chances of retrieving a valid answer. To do so, the URP follows the flow diagram shown in Figure 6.4: • Querying the Local Ontology: First, the URP executes the query against the local ontology on the device (through the Knowledge Endpoint agent) to try to answer it with the already gathered knowledge. Apart from retrieving the data that comprise the possible answer, the URP also needs to check their temporal validity as they might not be up to date. This checking is done using the timestamps associated to the data, and what is valid differs depending on the properties of queried properties and the result 2 . For example, if the result has been defined as static in the ontology (e.g., the location of the MoMa museum in New York), the gathered information is probably still valid; while if the result is more dynamic, (e.g., the position of available taxis around the user), the gathered information has to be quickly considered out of date, and therefore, not valid. 2 In our ongoing prototype, the temporal threshold is a fixed number, but more sophisticated approaches might be applied.
Chapter 6. Request Management 110 Figure 6.4: Flow diagram of the execution of a SHERLOCK query. • Querying Third-Party Sources: If the local ontology does not contain any result or the results are outdated, the URP tries to get this information from external sources. SHERLOCK’s next option is to use external thirdparty services which are capable of obtaining the requested information. Thus, the URP searches services in the local ontology which belong to the same service family and thus, return similar information (i.e., the information returned has the same type than the information returned by the family). This is done using the following query with the service selected by the user: SELECT ?service, ?provider
111 Chapter 6. Request Management WHERE{ OD{ Type(?service, <selected service>), PropertyValue(?service, provider, ?provider), Type(?provider, ThirdParty) } } Note that this step is performed only if the user selected an atomic service which involves a SHERLOCK query in the first place. If the user posed a query directly to the system, trying to find external services to fulfill the user requirements might not be trivial 3 . Therefore, in our current approach, this step is not supported for queries posed directly to SHERLOCK. If the service search is successful (i.e., SHERLOCK knows about services in the same family as the user’s selected one), the URP executes the service(s) obtained one by one until it gets results back. For that, a URM is created to handle each service. As in the previous case, the URP checks the validity of the results returned by the third party service. • Querying SHERLOCK devices: Finally, if the information could not be obtained from the local ontology nor external sources, the URP has a last mechanism to obtain results: deploying a network of mobile agents which will try to find the information from other SHERLOCK-enabled devices. For that, the URP creates helping agents which autonomously move toward the sources of information defined in the query. These agents are able to monitor an area associated with a request, if any, and find devices in it to communicate with them. Through this communication, agents execute the query against the devices’ knowledge, and can even deduce extensions of the request and ask them to execute the extended service. Querying other SHERLOCK devices is a complex task which we detail, including the creation and maintenance of the network of mobile agents, as well as the tasks performed by each agent in it, in the following chapter (see Chapter 7). In the following section, we explain how SHERLOCK queries external sources and deals with requests defined as a plan of services. 3 We do not aim at addressing the problem of service equivalence and matching, which has been thoroughly studied in the literature.
Chapter 7. Processing of SHERLOCK Queries 118 Figure 7.1: Mobile agents to process a user query and obtain results. ontology of such devices, recursively if needed (RRE agents move from there to other near devices). • Location-based queries:Tracker agents are created by a URP agent to monitor locations of interest for the query. These Trackers move toward the location of interest, jumping from device to device, and once there, they create Updater agents on devices in range with devices in the location of interest. Updater agents continuously execute the query against devices in their communication range, if needed, and obtain results that communicate to their Trackers.
119 Chapter 7. Processing of SHERLOCK Queries In the following sections we detail the tasks 1 assigned to each agent to fulfill their goals. 7.1 User Request Processor Agent: Coordinating the Network of Agents In addition to the tasks presented in the previous section, the URP agent performs the following tasks when processing a SHERLOCK query against other devices (see Figure 7.2): Figure 7.2: User Request Processor tasks. 1. Creation and Maintenance of a Helping Agent Network: As mentioned before the URP creates RRE agents for queries which are not related to a location and a more complex network of Tracker agents for locationdependent queries. 2. Results Correlation: The information returned by the helping agents has to be correlated in order to detect redundant information. 3. Movement Evaluation: The URP evaluates whether other devices in range provide better features to execute its tasks. In the following sections we details the previous tasks. 1The tasks are ordered according to their importance.
Chapter 7. Processing of SHERLOCK Queries 120 7.1.1 Creation of a Network of Helping Agents There are two types of queries processed by the URP agent: location-based queries and queries without an explicit location. In the following we explain how the network of helping agents is deployed to process each type of query. Executing queries without a location of interest In queries where there is not a explicit location of interest defined (e.g., “What is the age of Barack Obama?”) there is no evidence of which device could contain the information that the user needs. Therefore, we advocate to ask devices in range. So, the URP creates RRE agents in devices in range with the user’s device to execute the query against their ontologies: 1. The URP accesses the local knowledge about devices around maintained by the CU agent. In a greedy fashion, the URP agent creates an RRE agent on each of these devices and assigns them a deadline to obtain the results. Notice that, the URP limits the number of active agents it can handle to avoid creating a very extended network of RRE agents. 2. Once the RRE agents are created on the devices around the URP, they execute the query against their local ontologies by communicating with their local KE agents. Then, each RRE agent returns the results obtained to its URP by the given deadline (we will explain how the deadlines are assigned in the following section). 3. Finally, if the results obtained by the network of RRE agents are not enough, the URP can ask RRE agents to move to other devices. For this, the URP obtains the list of devices in range with the devices considered previously. Then, the URP asks each RRE to move to a discovered device and creates new RRE agents if there are more new devices discovered than existing RRE agents (taking into account the limit mentioned before). Executing location-dependent queries As location-dependent queries are related to a target location, it would be more probable that devices nearby such a target location have the requested information. Therefore, the URP executes the query against devices near such location with the help of Tracker agents which will monitor the location(s) of interest defined in the LI (Location of Interest definition) part(s) of the query. Therefore, the first step is to obtain information about the coordinates of such a location of interest so Trackers could be sent there (see Algorithm 4), if possible.
121 Chapter 7. Processing of SHERLOCK Queries A location-dependent query might contain more than one location of interest as explained in Section 4.2.1. Therefore, for each WHERE and for each LI clause the URP obtains its coordinates so a Tracker agent can be sent there for its monitoring. The URP obtains this information as follows: • Executing a query against the local ontology which could contain the information (Lines 4–6 in Algorithm 4). • If the local ontology does not contain the information, creating a URM agent to obtain the information from other sources (Lines 7–11 in Algorithm 4). • If neither the local ontology nor other sources contain the information, processing the query as non location-dependent (Lines 12–15 in Algorithm 4). Algorithm 4 Algorithm followed by a URP agent to create Trackers to monitor the location(s) of interest of a query. Input: QueryArea is the query to process. 1: // A query can have more than one location of interest 2: for each W HERE in QueryArea do 3: for each LI in W HERE do 4: // Execute a query against the local ontology to find its coordinates 5: QueryLIi=extractQueryLI(QueryArea,LIi) 6: coordinates = KE.obtainCoordinates(QueryLIi) 7: if coordinates==null then 8: // The coordinates are not in the local ontology 9: // Create a URM to find the coordinates in other sources 10: coordinates=URMi.executeQuery(QueryLIi) 11: end if 12: if coordinates==null then 13: // The URM could not find the coordinates 14: // Process the query as a non location-based query 15: createRREs(QueryLIi) 16: else 17: // The coordinates could be found 18: // Create Tracker to monitor the area 19: createTracker(coordinates,QueryLIi) 20: end if 21: end for 22: end for
Chapter 7. Processing of SHERLOCK Queries 122 First, to obtain the coordinates of a location of interest from the local ontology the URP executes a query against the local knowledge through the KE agent. If no coordinates are obtained for the location of interest from the local ontology, the URP tries to obtain them from other sources. For this task, SHERLOCK uses itself so the URP creates a new URM agent in charge of processing the previous request against other devices. After this step it could happen that the coordinates are not yet found after trying other external sources, then the last option of the URP is to execute the query as if it was a non location-dependent query using RRE agents as explained before. This could mean that no results for the query might be found as it less probable that devices around the URP would have the requested information. Nevertheless, queries are reevaluated continuously, until the user cancels them, which means that in a next iteration the URP might obtain the coordinates from one of the sources. In this case, a Tracker will be sent to the location and the RRE agents will be destroyed. If the coordinates of the location of interest are found, then the URP creates a Tracker to monitor such location and provides it with the coordinates, as well as the query to execute against devices in such location. It might happen that the coordinates of the location of interest are outdated (e.g., if the area changes if it is associated to a moving object). Again, as queries are reevaluated continuously, if a new location is found by the URP in a iteration of the execution, it communicates the new location to the Tracker so it can change its destination. In addition, a Tracker might find the interesting information near to the last known coordinates of the location of interest. 7.1.2 Maintenance of the Network of Helping Agents The URP agent uses the autosynchronization technique explained in [IMI08] for establishing deadlines for its helping agents (RREs or Trackers). This technique enables agents to assign deadlines to their helping agents which, in the case of continuous queries that have to be reevaluated, are dynamically adapted to the current situation by taking into account the delays experienced by their cooperative agents and the environmental delays (e.g., network delays). The autosynchronization technique ensures that the agents will return information at the frequency requested and in situations where this is not possible due to challenging environmental conditions, the technique offers several approaches to deal with it regarding the status of the agents. The details of this process can be found at [IMI08]. Also, when creating a helping agent, a time to live is assigned to ensure that in the case of losing the connection with it for a long
123 Chapter 7. Processing of SHERLOCK Queries time the agent will destroy itself. When managing a network of agents to process a location-based query, it might happen that a Tracker could be overwhelmed trying to fulfill its task. This can happen in scenarios where the location of interest to cover is too large or heavily populated with SHERLOCK devices. Therefore, such a Tracker agent might not be enough to correlate the information obtained by its helping agents and start missing deadlines assigned by the URP agent. In these situations, if the URP detects that a Tracker is overwhelmed (e.g., if the Tracker is not achieving its assigned deadlines), it will create a new Tracker to help it and divide the area into two parts. The URP will modify the target destination of the existing Tracker (a centroid of one of the new subareas). Also, the URP can destroy Trackers if they are not needed anymore (e.g., if they are obtaining only redundant information). 7.1.3 Results Correlation The URP correlates the results obtained by its helping agents as they might obtain the same information from different devices. In the correlation process, the URP detects this redundant information obtained by more than one helping agent and discards the information that might be outdated using the timestamp associated with it. We consider that devices share real information about objects and therefore, in the case of receiving the information about the same object, all the information obtained is valid although some (or even all) could be outdated due to the dynamically changing scenario. Also, in the correlation process an agent can discard information retrieved by its helping agents according to its similarity with the expected result. For example, if the user wants to get a limited set of results (e.g., five pictures which fulfill certain parameters) the URP can filter out these results that are more similar to the expected result before sending them back to its URM agent. 7.1.4 Movement Evaluation As all the mobile agents in SHERLOCK, a URP agent locates itself in the best device possible to perform its goals, among the different possibilities in range. For that, it considers other devices as possible execution places following Algorithm 5: 1. The URP obtains the list of devices that can be communicated by the device it is residing in. This is done by executing a query against the local ontology of the devices (lines 2–3 in Algorithm 5).
Chapter 7. Processing of SHERLOCK Queries 124 Algorithm 5 Algorithm to evaluate if moving to other device is needed Input: TargetLocation is the target location and currentDevice is the device where the agent is executing currently. 1: while alive do 2: // obtain the list of devices in communication with the host 3: devicesComm ←KEcurrentdevice.obtainDevicesAround(TargetArea) 4: candidateMovement=currentDevice 5: candidateDestDegree=computeDestDegree(currentDevice) 6: for each device in {devicesComm}do 7: // check if moving to the device is interesting 8: destDegree ←computeDestDegree(device) 9: if destDegree > candidateDestDegree then 10: candidateDestDegree=destDegree 11: candidateMovement=device 12: end if 13: end for 14: // move if needed 15: if candidateMovement!=currentDevice then 16: move(candidateMovement) 17: end if 18: end while 2. For each device the URP computes a “destination degree” which models the appropriateness of the device for the URP goals (lines 4–13 in Algorithm 5). 3. If any device is more appropriate than the device where the URP is currently residing in, it moves there (lines 14–17 in Algorithm 5). If the communication with that device is not possible then the next most interesting device will be considered (in the worst scenario the URP will not move to any device in this iteration but this process is performed continuously). Regarding the method to compute the destination degree, the URP considers the following parameters of the device: 1. Current available resources of the device: Powerful devices are preferred for most of the tasks (such as correlation of results) but the current load (e.g., in terms of available CPU, memory, and battery) is an important factor to take into account. As the capabilities of a device (e.g., processor load, remaining battery time, communication range, etc.) will
125 Chapter 7. Processing of SHERLOCK Queries be considered when choosing a destination, fixed devices with wired communication will be preferred if available. 2. Agent-specific goals: In the case of the URP it has to maintain itself as close to the device that posed the query as possible to communicate it the results obtained. The movement formula in our prototype obtains a value that models the appropriateness “destination degree” of a device by taking into account these two parameters and assigning them a weight (relative importance attached): Dest(d) = wc∗Destfeatures(d) + wg∗Destgoals(d) (7.1) where Destfeatures ( d ) represents the first parameter and takes into account the current features of the device as follows: Destfeatures(d) = wperf ∗dperf +wCP U ∗dCP U +wmem ∗dmem +wbattery ∗dbattery where dperf represents the performance of the device according to a benchmark (such as, for example, Antutu or Passmark), dCP U represent the load of the processor(s), dmem the available memory in MB, and dbattery the remaining battery as a measure of time left. Also, each factor has a weight, wperf , wCP U , wmem , and wbattery (with wperf + wCP U + wmem + wbattery = 1), which can be modified depending on the situation (e.g., if the agent needs more CPU for a complex operation). Notice that in the case of missing information about a parameter (e.g., available CPU) the device could obtain a score lower than other devices. Regarding Destgoals ( d ), which represents the second parameter of Formula 7.1, the URP agent computes this factor using the distance (in our prototype the euclidean distance) to the location of the user device: wdist (1 − distance ( userDev, locd )) 2 . Notice that other parameters could be also considered such as the speed and direction of the device. They would have to be included in the formula which can also be replaced by more sophisticated approaches to evaluate the best destination. The important aspect is that the system is independent of the movement formula. To obtain the information about devices which can be considered by the previous formula the URP executes a query against the local ontology of the 2 The distance function returns a value between 0 an 1, being 1 the exact target location and 0 a location farther than a threshold.
Chapter 7. Processing of SHERLOCK Queries 126 device in which it resides at the moment (see Figure 7.3). Remember that the Context Updater (CU) agent on the device is in charge of updating this information in the local ontology by querying devices around continuously (see Section 5.1). The URP agent considers as possible execution places devices around the device it is residing in and around the device that posed the query. Also, a range is used to limit the number of results of the query and this value is increased automatically if no results are obtained. SELECT ?name, ?IP, ?lat, ?lon, ?CPU, ?memory, ?battery WHERE{ LI{ FILTER(geof:sfWithin(?thing, geof:buffer(<UserDeviceCoordinates>, 300, ‘‘m’’) }, OD{ Type(?device, sherlock:SHERLOCKdevice) }, PropertyValue(?device, geo:lat, ?lat), PropertyValue(?device, geo:lon, ?lon), PropertyValue(?device, sherlock:name, ?name), PropertyValue(?device, sherlock:IP, ?IP), PropertyValue(?device, sherlock:Available_CPU, ?CPU), PropertyValue(?device, sherlock:Available_Memory, ?memory), PropertyValue(?device, sherlock:Available_Battery, ?battery) } Figure 7.3: Query to obtain the features of devices around a coordinate. 7.2 Tracker Agent: Monitoring a Location of Interest A Tracker agent is in charge of monitoring a location of interest. This means trying to find as many devices as possible inside it (ideally all the devices inside) and executing the user query against their local ontologies. To achieve this goal, and similarly to the URP agent, a Tracker performs the following tasks: 1. Movement Evaluation: The Tracker agent has to move itself near to the location of interest assigned by the URP. 2. Helping Agent Network Creation and Maintenance: In the case of the Tracker it creates a network of Updater agents which will communicate with devices inside the location of interest and execute the query.
127 Chapter 7. Processing of SHERLOCK Queries 3. Results Correlation: The information returned by the Updater agents is correlated by the Tracker in order to reduce the information sent to its URP. 7.2.1 Movement Evaluation First, the Tracker moves toward the location assigned using the same approach presented for the URP agent (see Algorithm 5). However, the Tracker agent considers as possible execution places devices around the location of interest instead of around the device that posed the query. Therefore, it specializes the movement formula presented before (Formula 7.1) by taking into account two elements: 1) the distance to the centroid of the area to cover, and 2) the communication with its helping agents, as follows: Destgoal(d) = wdist∗(1−distance(target, locd))+wcomm∗(1−Xdelay(Updateri)) where target are the coordinates of the centroid of the location to monitor, delay models the communication delay with a helping agent, and wdist and wcomm are the weights assigned for each factor ( wdist + wcomm = 1). When the Tracker is created the location to monitor is the location of interest and thus target is the location of its centroid. However, whenever the Tracker agent creates Updater agents and they start communicating with devices in the location of interest, target becomes the centroid of the “uncovered area” which is the part of the location of interest that the current Updater agents cannot cover because of the communication range of the devices they are residing in. Thus, the Tracker will try to remain as close as possible to its helping agents while trying to be close to the uncovered area. Notice that, the devices considered as possible execution places could be connected through ad hoc MANETs (e.g., devices around its location) or even wider area networks (e.g., imagine an Tracker interested in moving to another city, the local ontology might contain information about SHERLOCK-enabled devices available there). 7.2.2 Creation of the Network of Updater Agents The Tracker agent has to find and communicate with as many devices in the location of interest as possible to increase the changes of returning a complete answer to the URP (and thus to the user). For this, the Tracker finds devices inside the location whose communication mechanisms enable them to communicate with as many devices as possible. A network of Updater agents
Appendix A. Semantic Technologies on Mobile Devices 230 First of all, analyzing the results in terms of finished tasks, we can observe that, as expected, the reasoners on PC finished more tasks than on Android due to the more powerful hardware. Only HermiT and Pellet finished a similar number of tasks on the desktop computer and on Android devices when checking the consistency (181 vs 180 and 177 vs 175-176). Moreover, the reasoners on A1 finished more tasks than the same reasoners running on A2 for most of the tests. There are only two situations where both devices finished the same number of tasks: computing the classification with JFact (117 out of 182 tasks on both devices), and checking the consistency with HermiT (180 out of 182 tasks on both devices). Although the number of finished tasks on the desktop computer and on the mobile devices are different, both Android devices follow the PC trend for the classification task: TrOWL is the reasoner that finished a higher number of tasks, followed by Hermit,Pellet, and JFact. For the consistency checking, the PC trend is not followed by the Android devices: on the Android devices both HermiT and Pellet finished more tasks than TrOWL while TrOWL was the reasoner that finished more tasks on PC. Analyzing the results of TrOWL for the consistency checking on A1, we noticed that the timeout period elapsed for 13 tasks, while it never elapsed for any task on PC. Also, 7 large ontologies that were processed by TrOWL on PC threw out of memory errors on the smartphone. Table A.4 shows the number of tasks that could not been finished by the reasoners on each device and by each reasoner. We classify the reasons for not finishing as elapsed time out (“T/O” column in the table), and others (“Other” column). Notice that, as PC had enough memory to perform the reasoning, the errors on the “Other” column for PC are mostly due to unsupported data types. On the Android devices, the same errors always occur and some additional problems appear: usually, out of memory issues when processing large ontologies. Notice also that, in some situations, timeout problems on PC are translated into out of memory problems on Android devices. This happens because the timeout of PC was set to 5 minutes while on Android it was set to 25 minutes. Therefore, for some complicated tasks the reasoner run out of memory before the timeout elapsed (for example, HermiT in the consistency checking). We would like to highlight that, although the results obtained for this test (Figure A.1) enable us to compare the reasoners in terms of number of finished tasks, one should be cautious when comparing their processing times. The most difficult ontologies (i.e., the most expressive or large ones) require more time to be classified and so, completing more tasks could imply increasing the average time per finished problem. For example, notice that HermiT running
231 Appendix A. Semantic Technologies on Mobile Devices on A1 completes 151 classification tasks with an average time per task of 113.7s while the same reasoner running on A2 completes 141 tasks with an average time of 58.8s (the average time increases about 50 seconds because of these 10 more challenging tasks). Therefore, we performed the following test to be able to compare the processing time of the reasoners. Comparing the Processing Time To fairly compare the reasoners regarding the average processing time needed per ontology, we selected the minimum set of DL ontologies that all the devices and all the reasoners were able to process. We also split the ontologies with respect to their number of axioms into three subsets (small, medium, and large) obtaining a minimum DL set of 93 ontologies for the classification task (29 small, 62 medium, and 2 large ontologies), and 124 ontologies for the ontology consistency checking task (37 small, 81 medium, and 6 large ontologies). Comparing Trends Figure A.2(a) and Figure A.2(b) show the results obtained for the reasoners computing the classification and consistency, respectively, on the three devices with the minimum set of DL ontologies. First of all, as in our previous test, the mobile devices follow the PC general trend. There are two exceptions: on the one hand, TrOWL was slightly faster on PC for the classification of the medium set of ontologies than for the large one (about 0.2s), but on the mobile devices it was slightly slower (around 3s on the A1 device); on the other hand, HermiT was slightly faster on PC for checking the consistency of the small set than for the medium one (around 0.02s), but, on the mobile devices, it was slightly slower (around 0.7s on the A1 device). However, in the case of the classification in HermiT, the difference between the small and medium sets is also small but the trend on the desktop computer and the mobile devices is similar. Comparing Performance Table A.5 shows the difference on the performance of the desktop computer, the smartphone, and the tablet in terms of the number of times of PC being faster than the Android devices. In general, PC outperformed A1 and A2 for all the reasoners. The greatest differences happen in the large ontology set, where, for example, the desktop computer is almost 110 times faster than A1 when checking consistency using TrOWL, and almost 200 times faster than A2 when computing classification with HermiT. However, the consistency checking of the small set of ontologies in the PC
Appendix A. Semantic Technologies on Mobile Devices 232 (a) (b) Figure A.2: Average computing time for each ontology group in the minimum set of OWL 2 DL ontologies processed by all the devices and reasoners. was “only” 2 times faster than A1 for JFact (from 0.16s to 0.31s) and Pellet (from 0.24s to 0.37s). TrOWL was the fastest reasoner in both devices for the classification of all the ontology sets, but it uses approximate reasoning in OWL 2 DL. Note also that the difference between the different reasoners is smaller on PC than on
233 Appendix A. Semantic Technologies on Mobile Devices mobile devices, for both reasoning tasks. In the mobile devices, the order of the reasoners according to their reasoning times is usually the same as in the desktop computer, although this is not always the case due to the variance of the results obtained for each test repetition. A.2.3 Comparing the Reasoners for the OWL 2 EL Profile In this section, we detail the results of our performance experiments for the OWL 2 EL profile. For the OWL 2 EL ontology set (with 193 ontologies), we tested the following reasoners: ELK 0.4.0,HermiT 1.3.8,jcel 0.19.1, JFact 0.9.1,Pellet 2.3.1, and TrOWL 1.4. Comparing the Number of Finished Tasks The results for the classification task for the desktop computer (PC), the Galaxy Nexus (A1), and the Galaxy Tab 2 (A2) are shown in Figure A.3(a), Figure A.3(c), and Figure A.3(e), respectively; for the consistency checking results for PC, A1, and A2 see Figure A.3(b), Figure A.3(d), and Figure A.3(f). As above mentioned for the DL ontology set, we can observe that the reasoners on PC finished more tasks than on Android. However, the difference on the number of finished tasks is smaller than for the DL ontology set. On the one hand, in the DL ontology set, the difference of finished tasks on PC and A1 is: 16 (for classification) and 25 (for consistency checking) for JFact; 19 and 20 for TrOWL; 13 and 1 for HermiT; and 12 and 1 for Pellet. On the other hand, in the EL ontology set the difference of finished tasks on PC and A1 is: 12 and 10 for JFact; 2 and 2 for TrOWL; 4 and 4 for jcel; 4 and 1 for HermiT; 4 and 1 for Pellet; and 1 and 0 for ELK. This can be explained because of the difference of expressivity of the two ontology sets. As the EL profile is less expressive, performing reasoning tasks within this profile is less costly. Therefore, more tasks can be finished on the mobile devices. Also, in general, A1 finished more tasks than A2. There are only two situations where both devices finished the same number of tasks: first, ELK finished 190 out of 193 classifications on both devices; and second, HermiT finished 192 out of 193 consistency checkings on both devices. Table A.6 shows the results for the analysis of the tasks that were not finished. As for the DL ontology set, the errors of the “Other” column for the PC are mostly due to unsupported datatypes or ontologies that could not be processed by the reasoner. On the Android devices, the increment on the number of “Other” errors is due to out of memory errors. Notice also that
Appendix A. Semantic Technologies on Mobile Devices 234 (a) (b) (c) (d) (e) (f) Figure A.3: Results (finished tasks/average time) for the complete OWL 2 EL ontology set.
235 Appendix A. Semantic Technologies on Mobile Devices the number of “Other” errors for the consistency checking is zero in HermiT, Pellet, and ELK, for the three tested devices. Comparing the Processing Time As we did for the DL ontology set, we selected the minimum set of EL ontologies that all the devices and all the reasoners were able to process to be able to fairly compare the performance of the reasoners regarding the average processing time per ontology. We also split the ontologies with respect to their number of axioms (small, medium, and large) obtaining a minimum EL set of 152 ontologies for classification (62 small, 67 medium, and 23 large ontologies) and 166 ontologies for consistency checking (65 small, 72 medium, and 29 large ontologies). Comparing Trends Figure A.4(a) and Figure A.4(b) show the results obtained for classification and consistency, respectively. Notice that both mobile devices follow the general trend obtained for the PC. For all the reasoners and devices, the average time for the small set is smaller than the time for the medium one, which in turn is smaller than for the large set. There are two situations that should require further explanation: first, HermiT was faster on A2 than on A1 for the classification of the small and medium sets of ontologies; and second, Pellet was as fast on A2 for the classification of the small set as for the medium one (while it was faster on the PC and A1). Analyzing the results per ontology of these ontology sets, we observed that there were some ontologies where the variance of the measured times for the three repetitions of each test was high, which led to these situations. Comparing Performance Table A.7 shows the difference of performance between the PC and the two mobile devices in terms of number of times of the PC executions being faster than the Android ones. As in the DL ontology set, in general, the desktop computer outperformed the mobile devices for all the reasoners. The greatest differences are again achieved on the large and medium ontology sets. For example, for the classification of these sets using HermiT, PC is almost 70 times faster than A1, and almost 150 times faster than A2. In general, the differences between PC and the mobile devices are smaller for consistency checking. Notice that there is a situation where the Android devices were faster than the desktop computer: in the consistency checking with ELK, PC was 0.8 (from 0.26s to 0.21s) and 0.6 (from 0.26s to 0.15s) times “faster” than A1 and A2 devices, respectively (these values are coherent with the observed variance).
Appendix A. Semantic Technologies on Mobile Devices 236 As it happens in the DL ontology set, the difference between the different reasoners on PC is smaller than on the mobile devices. Furthermore, the order of the reasoners according to their reasoning times is usually the same as in the desktop computer. (a) (b) Figure A.4: Average computing time for each ontology group in the minimum set of OWL 2 EL ontologies processed by all the devices and reasoners.
237 Appendix A. Semantic Technologies on Mobile Devices A.2.4 Other Experiments In this section we summarize some additional experiments measuring other interesting features of the mobile devices, namely the impact of the memory and the virtual machine. A.2.5 Analyzing the Impact of Memory After comparing the results obtained for PC and Android, we wanted to check how the limitation of memory that Android imposes on applications and its management by the OS affects the results. Our goal was to check whether the processing time would be affected if the maximum memory for the application was limited. Firstly, we restricted the maximum memory for the desktop computer to 256 MB RAM (the maximum size that Android assigns to the applications in our test devices) and computed the classification of the DL and the EL ontology sets. We observed that there are significant differences on the number of finished tasks but not on the reasoning time. Figures A.5 and A.6 compare the number of finished classifications in PC, PC with the memory limitation (denoted PCmem), and A1 for the small (S), medium (M), and large (L) OWL 2 DL ontology set. In particular, we represent the differences between the number of finished tasks in the devices: PC vs. PCmem, PC vs. A1, and PCmem vs. A1. We can see that the number of finished tasks over small ontologies is the same in all the cases. For medium ontologies, PC and PCmem only differ in one OWL 2 DL ontology, although A1 does not finish 14 OWL 2 DL and 5 OWL 2 EL ontologies. The only OWL 2 DL reasoner that does not finish a smaller number of tasks on A1 is TrOWL, which computes approximated reasoning in this profile. In large ontologies, the number of unfinished tasks on PCmem and A1 is significant: more than 10% in the EL ontology set and more than 50% in the DL ontology set. Overall, the number of finished tasks in PCmem and A1 is comparable: 586 vs 572 OWL 2 DL ontologies, and 1099 vs 1095 OWL 2 EL ontologies. Note that some tasks finished on A1 but not on PCmem. After investigating the role of memory on the desktop computer, we also limited the memory on the Android devices. To do that, we restricted the maximum memory heap for the application to the “standard memory heap” by setting the variable android:largeHeap=‘‘false’’ . In particular, we restricted the memory to 96 MB. Since the experiments on Android devices are more costly, we restricted to the classification (the most challenging task)
Appendix A. Semantic Technologies on Mobile Devices 238 of the DL ontology set using Pellet and the Galaxy Nexus smartphone (A1, as it was the fastest device). For this experiment, we did not want to consider TrOWL (it only offers approximate reasoning in the DL ontology set) and JFact (because of the smaller number of finished classifications on A1); between HermiT and Pellet we chose the latter one to decrease the total computation time because, as shown in Figure A.2 (a), it was usually faster. Figure A.5: Comparison of the number of finished classifications of OWL 2 DL ontologies. The first aspect to highlight from the results is that, as it happened when limiting the memory on Android, limiting the memory decreased the number of finished tasks. The reasoner finished 143 tasks before and 135 after the memory limitation. These 8 tasks that could not be finished by the “limited version” include 2 medium and 6 large ontologies. Figure A.7 shows the comparison of the time needed for every ontology that the reasoner was able to classify in the two tests. In the graph, we plot the processing times difference as a percentage of the time required by the non-limited version (y-axis) and the time needed by the non-limited version in seconds (x-axis). The first thing we can highlight is that there are some negative values which mean that the limited version was faster than the non-limited version. This can be explained because measuring time consumption of the same application on the same device can
239 Appendix A. Semantic Technologies on Mobile Devices Figure A.6: Comparison of the number of finished classifications of OWL 2 EL ontologies. have a small variance due to the management of the running applications done by the OS. Moreover, for ontologies that can be classified quickly (under 5s), the difference is around 40%, and reaches even 60% in some cases. In these cases, the ontologies require around 1s to be classified, so the actual difference in seconds is around 0.5s. Regarding the values obtained, notice that the difference between the two versions for those ontologies that need 15s or more to be classified is less than 2%. This includes ontologies that needed 80s-250s, where the difference is less than 1s. Therefore, the main conclusion of this test is that limiting the memory on the devices do not significantly modifies the time consumption, but it does affect the number of accomplished tasks. A.2.6 Analyzing the Impact of the Virtual Machine Very recently, as of November 2014, Google released the new Android 5.0 version that includes a new runtime environment called Android Runtime (ART) to replace the Dalvik virtual machine. While the previous virtual machine Dalvik uses just-in-time compilation every time an application is launched, ART uses a more sophisticated ahead-of-time compilation that can be performed just once during the installation of the application. This way,
Appendix A. Semantic Technologies on Mobile Devices 246 investigated [SK08; SKG09]. The modification of Pellet reasoner included some new optimization techniques and was called mTableau. The authors did some experiments on a desktop computer, proving that the optimization is useful to reduce the response time in situations of limited memory. They also performed some experiments (4 consistency tests over 2 ontologies) in a PDA showing that the reasoning times are acceptable. However, their approach is more oriented to proving the usefulness of the optimizations rather than performing a comparison between the performance of the reasoner in mobile and desktop devices. Finally, there are three recent works that consider the use of reasoners on mobile devices complementing our work. Regarding battery consumption, [PM14] analyzes the performance per watt of Jena, Pellet, and HermiT over two ontologies. The authors found a nearly linear relationship between energy consumption and processing time, and studied the effects of some smartphone features (WiFi, 3G, and 4G radios) on battery consumption. More recently, [VNP15] studies the battery consumption on Android 5.x (API 21) of Pellet, Hermit, and Androjena, performing four different reasoning tasks over some datasets generated using the LUBM benchmark generator [GPH05]. Their software-based approach could be used to extend our study on the performance of DL reasoners on current and future versions of Android. Finally, [WHAA14] presents a benchmark framework for mobile semantic reasoners allowing them to be deployed on different platforms such as Android or iOS. So far, the authors have only considered 4 reasoners (AndroJena, Nools, RDFQuery, and RDFStore-JS), since their work is more focused on generability and extensibility, making it easier to add new mobile platforms and reasoners. A.3.2 Evaluating DL Reasoners on Desktop Computers The developers of some reasoners have performed evaluations of their systems with the main objective of showing that their new tools outperformed existing ones. There are also several (more or less) independent experimental comparisons in the literature that we will overview here. In [Pan05], FaCT++, Pellet 1.1.0, and Racer 1.8.0 reasoners were compared for the classification of 135 OWL ontologies, with FaCT++ being slightly preferable (faster and more robust). Then, in [GTH06], FaCT++ 1.1.3, Pellet 1.3, and RacerPro 1.8.1, were compared along with KAON2 for the classification of 172 ontologies, without a clear winner due to the considerable difference of performance across ontologies. HermiT, KAON2, Pellet, RacerPro, Sesame, and SwiftOWLIM reasoners were compared for classification and conjunctive
247 Appendix A. Semantic Technologies on Mobile Devices query answering over 3303 ontologies in [BHJV08]. The authors concluded that SwiftOWLIM may be preferable in low expressive languages, RacerPro can be recommended in expressive ontologies with small ABoxes, and KAON2 is the best alternative in the other cases. The reasoners CB, CEL, DB, FaCT++, and HermiT were evaluated for the classification of 4 ELH ontologies [DK09]. CB is the best option, although the results are focused on evaluating the new technique of computing classification using an SQL system. Dentler et al. [DCTK11] evaluated 8 reasoners (CB build 6, CEL 0.4.0, FaCT++ 1.5.0, HermiT 1.3.0, Pellet 2.2.2, RacerPro 2.0 preview, Snorocket 1.3.2, and TrOWL 0.5.1) over 3 OWL 2 EL ontologies for 4 reasoning tasks (classification, concept satisfiability, TBox consistency, and subsumption). As usual, there is not a clear winner. Besides, the authors also performed a very detailed comparison of other features of the reasoners. Another experiment measures the classification time of 358 real-world ontologies for 4 reasoners (FaCT++, HermiT, Pellet, and TrOWL) [KLK12]. The best reasoner depends on the criteria: Fact++ has the lowest median, HermiT has the lowest mean, TrOWL has the lowest number of errors, and Pellet has the lowest number of errors among the complete reasoners. Since DLs usually have a good performance in practice but high worst-case complexities, [GMPS13] investigates how often reasoning with existing ontologies requires an unreasonable time. The authors consider 4 reasoners (FaCT++ 1.6.1, HermiT 1.3.6, JFact 1.0, and Pellet 2.3.0) and 1071 ontologies, showing that most of the times there is some reasoner giving a quick response time, with Pellet being the most robust one. Hence, most of the existing ontologies on the Web are not inherently intractable but just hard for some particular DL reasoners. Finally, it is worth to mention that the OWL Reasoner Evaluation Workshop (ORE) series organize DL reasoner competitions. The 2012 competition 31 considered 143 ontologies and 5 reasoning tasks (classification, consistency, concept satisfiability, entailment, and instance retrieval) for 4 reasoners (FaCT++, HermiT, jcel, and WSReasoner). The 2013 competition [GBJRMPGK13] considered 204 ontologies classified in 3 profiles (OWL 2 DL, OWL 2 EL, and OWL 2 RL) and 3 reasoning tasks (classification, consistency, and concept satisfiability) for 14 reasoners (BaseVISor, Chainsaw, ELepHant, ELK, FaCT++, HermiT, jcel, JFact, Konclude, MORe, SnoRocket, Treasoner, TrOWL, and WSClassifier). The competition organizers gave priority to robustness of the systems rather than the reasoning times alone. The latest editions held at 2014 [BGJRMPS13] and 2015 [DGGHJMPSS15] considered more than 16500 unique ontologies divided in 2 profiles (OWL 2 DL, and OWL 2 EL), and 3 rea- 31http://www.cs.ox.ac.uk/isg/conferences/ORE2012/evaluation/index.html
Appendix A. Semantic Technologies on Mobile Devices 248 soning tasks (classification, consistency checking, and realisation). The number of ontologies used out from the ontology set depended on the profile and the reasoning task, ranging from 200 ontologies used for realization in DL profile to 300 ontologies used for classification in EL profile. The participants in the 2014 edition were Chainsaw, ELepHant, ELK, FaCT++, HermiT, jcel, JFact, Konclude, MORe, Treasoner, and TrOWL (11 reasoners), and the participants in the 2015 edition were Chainsaw, ELepHant, ELK, FaCT++, HermiT, jcel, JFact, Konclude, MORe, PAGOdA, Pellet, Racer, and TrOWL (13 reasoners). In all the competitions, the best reasoner depends on the reasoning task and the expressivity of the ontology.
249 Appendix A. Semantic Technologies on Mobile Devices Software Version Originally compatible Currently compatible Jena 2.12.0 ×X OWL API 3.4.10 X X CB build 6 ×X∗ CEL 1.0 × × Chainsaw 1.0 × × ConDOR revision 13 × × ELepHant 0.4.0 × × ELK 0.4.0 ×X∗ FaCT++ 1.6.3 × × fuzzyDL build 60 × × HermiT 1.3.8 ×X∗ jcel 0.19.1 X X JFact 0.9.1 X X KAON2 unknown × × Konclude 0.6.0 × × MORe 0.1.5 ×X∗ Pellet 2.3.1 ×X∗ Racer 2.0 × × TReasoner revision 22 X X TrOWL 1.4 X X WSClassifier revision 1 × × ∗: It has been ported by us. Table A.1: Android support for some semantic APIs and DL reasoners.
Appendix A. Semantic Technologies on Mobile Devices 250 HermiT JFact Pellet DBpedia A1 5.13 UDT 63.15 A3 8.87 UDT 115.30 GO A1 487.98 435.60 83.97 A3 OOM OOM OOM NCI A1 2020.48 OOM OOM A3 OOM OOM OOM Pizza A1 10.43 3.42 20.77 A3 14.88 4.90 33.22 Wine A1 361.38 1609.32 131.80 A3 511.97 2196.05 194.12 Table A.2: Comparison of classification time (in seconds) for two Android devices. OOM: Out Of Memory; UDT: Unsupported Data Type. CB ELK DBpedia PC UDT 0.5 A1 UDT 19.7 GO PC 0.6 1.4 A1 8.6 30.6 NCI PC 2.6 2.5 A1 35.4 200.7 Table A.3: Comparison of classification time (in seconds) for PC and Android. UDT: Unsupported Data Type.
251 Appendix A. Semantic Technologies on Mobile Devices Reasoner Classification Consistency T/O Other T/O Other HermiT(PC) 13 (7.1%) 5 (2.7%) 1 (0.6%) 0 (0%) HermiT(A1) 20 (11%) 11 (6%) 0 (0%) 2 (1.1%) HermiT(A2) 28 (15.4%) 13 (7.1%) 0 (0%) 2 (1.1%) JFact(PC) 18 (9.9%) 31 (17%) 8 (4.4%) 18 (9.9%) JFact(A1) 26 (14.3%) 39 (21.4%) 18 (9.9%) 33 (18.1%) JFact(A2) 23 (12.6%) 42 (23.1%) 24 (13.2%) 31 (17%) Pellet(PC) 20 (11%) 7 (3.9%) 5 (2.7%) 0 (0%) Pellet(A1) 26 (14.3%) 13 (7.1%) 6 (3.3%) 0 (0%) Pellet(A2) 33 (18.1%) 12 (6.6%) 7 (4%) 0 (0%) TrOWL(PC) 1 (0.6%) 1 (0.6%) 0 (0%) 0 (0%) TrOWL(A1) 9 (5%) 12 (6.6%) 13 (7.1%) 7 (3.9%) TrOWL(A2) 18 (9.9%) 6 (3.3%) 18 (9.9%) 6 (3.3%) Table A.4: Errors for uncompleted tasks in the DL ontology set. Classification Consistency S M L S M L HermiT A1 44 28 52 7 5 22 A2 44 36 193 8 5 54 JFact A1 25 51 41 2 5 24 A2 40 57 71 3 7 59 Pellet A1 14 15 34 2 6 76 A2 21 46 38 2 14 123 TrOWL A1 9 33 16 15 29 109 A2 9 96 35 18 90 142 Table A.5: Number of times (rounded to the closest integer) of the PC version being faster than the Android ones for the small (S), medium (M), and large (L) OWL 2 DL ontology set.
Appendix A. Semantic Technologies on Mobile Devices 252 Reasoner Classification (193) Consistency (193) T/O Other T/O Other ELK(PC) 2 (1%) 0 0 0 ELK(A1) 1 (0.5%) 2 (1%) 0 0 ELK(A2) 2 (1%) 1 (0.5%) 1 (0.5%) 0 HermiT(PC) 3 (1.6%) 0 0 0 HermiT(A1) 7 (3.6%) 0 1 (0.5%) 0 HermiT(A2) 10 (5.2%) 0 1 (0.5%) 0 jcel(PC) 1 (0.54%) 13 (6.7%) 0 13 (6.7%) jcel(A1) 0 18 (9.3%) 5 (2.6%) 12 (6.2%) jcel(A2) 7 (3.6%) 12 (6.2%) 7 (3.6%) 13 (6.7%) JFact(PC) 6 (3.1%) 2 (1%) 3 (1.6%) 1 (0.5%) JFact(A1) 12 (6.2%) 8 (4.1%) 8 (4.1%) 6 (3.1%) JFact(A2) 10 (5.2%) 12 (6.2%) 9 (4.7%) 7 (3.6%) Pellet(PC) 3 (1.6%) 4 (2.1%) 0 0 Pellet(A1) 6 (3.1%) 5 (2.6%) 1 (0.5%) 0 Pellet(A2) 10 (5.2%) 5 (2.6%) 3 (1.6%) 0 TrOWL(PC) 2 (1%) 0 1 (0.5%) 0 TrOWL(A1) 2 (1%) 2 (1%) 2 (1%) 1 (0.5%) TrOWL(A2) 5 (2.6%) 1 (0.5%) 4 (2.1%) 1 (0.5%) Table A.6: Errors for uncompleted tasks in the EL ontology set.
253 Appendix A. Semantic Technologies on Mobile Devices Classification Consistency S M L S M L ELK A1 2 6 15 1 4 13 A2 1 7 23 1 4 21 HermiT A1 51 69 60 3 9 20 A2 14 47 148 3 9 33 jcel A1 3 12 33 7 20 54 A2 7 17 49 6 18 71 JFact A1 11 60 62 1 4 9 A2 12 64 92 1 5 20 Pellet A1 3 9 27 1 5 21 A2 31 16 36 1 5 37 TrOWL A1 8 27 20 8 28 24 A2 7 58 29 8 59 62 Table A.7: Number of times (rounded to the closest integer) of the PC version being faster than the Android ones for the small (S), medium (M), and large (L) OWL 2 EL ontology set.
Appendix A. Semantic Technologies on Mobile Devices 254
Appendix B Prototypes for the Semantic Management of LBS In this chapter we present the prototype of the SHERLOCK system for the semantic management of Location-Based Services in wireless environments. We show a SHERLOCK prototype which obtains knowledge from other devices and guides the user in the selection of an interesting LBS (as explained in Chapter 4) and then processes it (as explained in Chapter 6). Then we present the modules developed to address different challenges such as knowledge update and camera views processing (see Figure B.1). Firstly, we present the DUCK module to exchange ontologies and integrate them by discovering subsumption relationships between their concepts (as explained in Section 5.2). Secondly, we present the Triveni module which exchanges context information about the user and the device with other SHERLOCK devices and generates a shared context model to improve the locally inferred user context (as explained in Section 5.1). Finally, we present the MultiCAMBA module which obtains high-level features of the views of cameras, using the local knowledge on the device, and computes the similarity of such views with the shot in a user request. B.1 SHERLOCK Prototype We have developed a SHERLOCK prototype to test the underlying ideas of the system. Firstly, we developed a preliminary prototype of the system for PCs. This was motivated because both the mobile agent platform and the semantic reasoner we were planning to use in our system were not available 255
Appendix B. Prototypes for the Semantic Management of LBS 262 (a) (b) Figure B.5: SHERLOCK app: Settings. tion to generate an information request: 1) Tapping on a location on the map, 2) tapping on an object, and 3) using SHERLOCK’s search bar. For example, to initiate a request for information we can tap on a location of the map for at least one second (see Figure B.6(b)). Then SHERLOCK reasons what services could be interesting for us using its knowledge, our context information, and the selected location. After tapping on the map, SHERLOCK finds several interesting services related to that location and our context and shows them to us (see Figure B.7(a)). In this case, it shows two services: A service with tourist information and a service to find transports. If we tap on the “Transport service” SHERLOCK starts the LBS to find transports in the area. Some LBS could have been defined in the ontology as parameterizable. This means that they need some
263 Appendix B. Prototypes for the Semantic Management of LBS (a) (b) Figure B.6: SHERLOCK app: Map interface. information about the user to impose constraints on the results to obtain (notice that some of this information is directly inferred by SHERLOCK). With this information SHERLOCK is able to reason what are the most appropriate providers for the service selected according to our needs. In our example, SHERLOCK asks the user about some information for the Transport service (see Figure B.7(b)). The user can select also which of these parameters are mandatory. A mandatory parameter means that it is important for the user that this condition is satisfied by the result. For example, the user could select that it is mandatory that the transport is “door to door” and then SHERLOCK will provide her with a more accurate response. After filling in the values we continue by tapping the “GO” button that launches the user request to obtain transports that match our preferences.
Appendix B. Prototypes for the Semantic Management of LBS 264 (a) (b) Figure B.7: SHERLOCK app: Selecting a service and its parameters. Every user request may return results which will be showed on the map as objects whose location will be updated in real-time (in the case of continuous requests like the one selected). In our current case, we can see several objects moving around our map (see Figure B.1.3) that represent the different transports nearby (taxis, shuttles, and buses). These objects have been generated by the simulator included in the SHERLOCK Android app. The simulator creates different objects and move them around so they can be part of results for user requests in our prototype. The current prototype gets information from other devices within our same network (in this version the same WiFi network) but also can connect to third-party external services if the source and communication method has been defined in its local ontology. This is is the case now, so we can also see objects representing bus stops whose info
265 Appendix B. Prototypes for the Semantic Management of LBS have been retrieved from a local transport info web service that SHERLOCK knows (as someone has shared with it this knowledge). Last, notice that each result has a green circle attached, this means that this is a provider which best matches our search criteria. For other providers that could be interesting but do not match all our preferences SHERLOCK uses red circles. Figure B.8: SHERLOCK app: Displaying results. At SHERLOCK you can interact with every object you watch on the screen by tapping on it getting information related to that object. When the user taps on an object, SHERLOCK reasons what kind of services are related to this specific object and could be interesting for the user. It is a similar process to tapping on a point on the map. For example, we tap on a bus stop (see Figure B.9(a)) and SHERLOCK obtains that the service that provides information about the buses that arrive to the stop is interesting (“Bus Stop Info Service”). Also, we change our profile to researcher and tap on the object representing us on the map. Then, SHERLOCK offers us a new service to
Appendix B. Prototypes for the Semantic Management of LBS 266 “Search Researchers”. We select this service and stop the simulator so only other real devices that belong to researchers will be part of the answer. (a) (b) Figure B.9: SHERLOCK app: Interacting with objects. At the moment, this is the only SHERLOCK device in the network so we do not obtain results for the executed service. Then, we connect another SHERLOCK device to the same network and set its profile to researcher. After that, we return to the device where we executed the service to find researchers and we can see the location of the second device on the map (see Figure B.10(a)). A researcher is also an object so we can tap on it to see a list of available services related to him (see Figure B.10(b)). In this case the “Send email service” has been defined in the local ontology on the device and it is retrieved by SHERLOCK. SHERLOCK is able to process several request at the same time even if they
267 Appendix B. Prototypes for the Semantic Management of LBS (a) (b) Figure B.10: SHERLOCK app: Interacting with other users. are continuous requests. Notice that every new request is represented by a transparent black circle at the right top corner of the screen (see Figure B.11(a) where three requests are being processes at the same time). Requests are represented by: a color and an icon according to the kind of request, and a number that shows the amount of results currently returned (for requests which are performed continuously the number of results may change over time). We can access the request dialog, which enables to manage each of the requests, by tapping on any of the request circles or the right icon on the application bar. The request dialog (see Figure B.11(b)) enables us to interact with our current request. The available options (from left to right) are: • Highlight the results: All the objects returned as a result of this request will be highlighted on the map.
Appendix B. Prototypes for the Semantic Management of LBS 268 (a) (b) Figure B.11: SHERLOCK app: Handling multiple requests. •Pause/resume: The results will stop being updated. •Delete: Stops processing the request. •Edit: Enables us to edit the parameters of the request. With this test we have shown how the system would behave when used by a user on her smartphone. We have focused on the interaction with the system, the selection of services, and provision of parameters. Also, we showed how other real devices (in this case a tablet with the same prototype installed) can be part of the results returned to the user. In the next sections we will explain other standalone systems and prototypes developed to test our contributions to the problems tackled in the SHERLOCK architecture.
269 Appendix B. Prototypes for the Semantic Management of LBS B.2 DUCK: Exchange and Integration of Knowledge in Wireless Environments In this section we present the prototype of the SHERLOCK module in charge of the integration of shared ontologies in mobile scenarios. The prototype, which we have called DUCK (Deduction of Undefined Correlations in Knowledge) implements the mechanisms presented in this thesis to enable mobile devices to exchange knowledge and discover subsumption relationships between concepts from their local ontologies and the ontologies received. B.2.1 Architecture of DUCK The DUCK prototype enables two smartphones to exchange their local ontologies, discover subsumption relationships between their concepts, and generate an integrated ontology with the information discovered. In the prototype we implemented a simple exchange and integration procedure that assigns the extraction of subsumption relationships and alignment of the ontologies to the most powerful device (see Figure B.12). As commented in Chapter 10, we are planning to implement and test other more sophisticated procedures in the future. Thus, the current prototype performs the following steps: 1. Device discovery: A mobile device uses its communication mechanism (e.g., WiFi, Bluetooth, etc.) in order to discover other devices willing to exchange knowledge. 2. Communication establishment: The discovered devices establish a communication channel between them and each one sends information about their features (i.e., processor and its current load, memory and battery available) to the other one. 3. Device information comparison: The features from each device are compared in order to decide which one should perform the integration. 4. Knowledge exchange: Each device sends its active ontology to the other. 5. Integration process: One of the devices performs the integration and shares the result with the other. Notice that we implemented a recovery mechanism in case the connection between the devices stops before the integrated result can be shared. So, the less powerful device, which is waiting to receive the integrated ontology, sets
Appendix B. Prototypes for the Semantic Management of LBS 270 Device 1 Device 2 save integrated ontology send results {ontology,axioms} save integrated ontology select best device wait for results or timeout {results} COMMUNICATION integrate ontolgies select best device ideal scenario error scenario save integrated ontology save integrated ontology wait for results TimeOut {results} integrate ontologies send results {ontology,axioms} integrate ontologies Figure B.12: Sequence diagram of the exchange and integration process in the DUCK prototype. a timeout. In case that the connection is disconnected or the device which is performing the integration process takes too long to transfer the results, the device which is waiting will begin to integrate the ontologies after the timeout. Also, the steps for the integration process of the prototype are the ones shown in Figure 5.4. B.2.2 Prototype of DUCK We developed two applications to implement the DUCK prototype: 1. An Android app to implement the sharing of ontologies among devices and the integration of the information through the discovery of subsumption relationships.
271 Appendix B. Prototypes for the Semantic Management of LBS 2. A PC Java implementation of our subsumption relationships discovering technique. We developed the PC application as we planned to perform experiments with ontologies from standard datasets used in ontology alignment which would require too much processing time on mobile devices due to their limited capabilities. In both prototypes we used the semantic DL reasoner Pellet [SPCGKK07] for the extraction of the implicit roles of each concept and the technique presented by Gracia et al. [GA13] to obtain a similarity measure among the roles. Also, we used Wordnik 4 , an on-line dictionary and language resource based on several sources (among them, WordNet [Mil95]), for the label analysis. Regarding the weights used in the different formulas of our approach (see Section 5.2.3), we assigned a higher value to: the role set analysis ( wl = 0 . 15, wr = 0 . 8, and wch = 0 . 05, Formula 5.3); the information extracted from Wordnik (0 . 75); and to the roles shared with respect to the non-shared ( wsh = 0 . 9 and wdiff = 0 . 1, Formula 5.5). Also, we assigned a = 1 . 5 to model the slope of the logistic function of Formula 5.4. For the filtering of the subsumption relationships discovered we used the simple unsupervised k-means algorithm [Mac67] and a conservative approach to promote precision over recall (medium and low subsumption degree clusters are discarded). Nevertheless, these specific values, that were obtained after performing some initial tests, have been used to implement our generic rules to capture the existence of a subsumption relationship. Therefore, these weights and even the formulas could be modified, respecting the essence of the rules, for other ontology sets or scenarios. On the one hand, the PC application gets the two source ontologies as a command line parameter and writes a file with the subsumption relationships discovered and their subsumption degree. This applications is not meant to be used by users and it has been developed to enable us to perform scripted tests with different ontologies in an easy way. On the other hand, the Android app enables a user to select some options through a user-friendly Graphical User Interface “GUI” that is also used to show the results to the user (see Figure B.13). The GUI is composed of three views: 1. Main menu: Shows some parameters which can be adjusted by the user such as: • A drop-down list that contains the ontologies on the device among 4https://www.wordnik.com
Appendix B. Prototypes for the Semantic Management of LBS 278 1. Obtains the context information from the available Context Synthesizer(s) using the Context Manager module. 2. Communicates with devices discovered in the vicinity using the Communication module and shares context information with them. 3. Integrates the context information collected to generate the shared context model using the Integration module. 4. Verifies the information integrated in order to detect and resolve inconsistencies by the Inconsistency Resolving module. ContextGManager MobileGDevice SecondaryGContext Reasoner Communication Integration InconsistencyGResolving ContextGReconciliation GGPrimaryGContext ContextGProvider(s) Context Enrichment Layer Application Layer Context Generation Layer ContextGAcquisition Ontology ContexualGGroupGManager ContextGSynthesizer(s) Application(s) Figure B.14: High-level architecture of Triveni.
279 Appendix B. Prototypes for the Semantic Management of LBS Triveni uses Semantic Web technologies (specifically ontologies and a semantic DL reasoner) for context modeling. This way, Triveni is able to detect inconsistent information and infer not explicitly defined facts by using the reasoner, a program that infers logical consequences from a set of asserted facts or axioms [DCTK11]. B.3.2 Prototype of Triveni To test our approach we developed a prototype of the system 11 as an Android app where users can enrich their context information with the information of other users nearby by using Bluetooth communications. For managing the ontology, used in the enrichment process, on the device, we used the OWL API and the HermiT semantic DL reasoner. To simulate context scenarios we have used a Graphical User Interface (GUI) that enables us to select the current context of the device which mimics context synthesizers used to obtain high-level context of each mobile device (see some screenshots of the GUI in Figure B.15). This enables us to easily recreate different situations some of which involve conflicting information being shared. This GUI also enables us to modify the confidence in the correctness of the context information shared. Additionally, to test the scalability of our approach, we also developed a web service REST API to simulate multiple mobile devices sharing their context. B.3.3 Evaluating the Extraction of a Shared Context We tested our approach to extract a shared context model by using the Triveni prototype presented before. Experimental Setup For our experiments we recreated a scenario involving a study group in a room where there are four people, but only three of them are being part of the meeting (see Figure B.16). Notice that these mobile devices are equipped with different number of sensors and the information that users provide about their schedule is also different and in varying detail. In our specific scenario, Annie’s and Abed’s calendar entries give information about meeting scheduled for that day (e.g., duration, topic, participants, etc.) and Jeff’s smartphone just used Foursquare to check in Study room F. With the information available on their devices, traditional context generation systems will create different high-level 11 See http://sid.cps.unizar.es/ContextEnrichment for more information about the prototype and tests.
Appendix B. Prototypes for the Semantic Management of LBS 280 (a) (b) (c) (d) Figure B.15: Triveni app: Screenshots of the prototype.
281 Appendix B. Prototypes for the Semantic Management of LBS context information for each device (see Figure B.16 where the current context of each user is shown in blue boxes). Notice that some of the contexts obtained by the devices are wrong. For example, Annie disabled the location gathering mechanism of her tablet, while at home, to save battery and so, her device thinks that the location is still “home”. Summarizing, the devices have some information about the context but most of them are not as rich in detail as it would be desired. Figure B.16: Motivating use case for Triveni: Users being part of a study group. As in the use case, we use four real smart phones to replicate the study room scenario: two Google Nexus 5 (Quad core, 2260 MHz, 2048MB RAM, Android 4.4), one Google Nexus 4 (Quad core, 1500 MHz, 2048MB RAM, Android 4.4), and one Samsung Galaxy SIII (Quad core, 1500 MHz, 2048MB RAM, Android 4.3). We considered the following primary and secondary context pieces for this scenario: •location = {Greendale, GCC, Study room F, Home} •temperature of location = {25◦C,28◦C}
Appendix B. Prototypes for the Semantic Management of LBS 282 •light of location = {lights on} •activity = {Study group, Meeting, Reading} •topic of activity = {Spanish} •duration of activity = {1h,2h} For the purpose of this experiment, we have focused on Annie’s device (in our tests, a Nexus 5) and generated every possible scenario for it by selecting either one or none of the values from each of primary and secondary context information (giving us a total of 720 scenarios). In 528 such scenarios generated, the context of the device included at least one incorrect piece of context (e.g., the location is set to “Home”); while in 191 other scenarios, which are correct, had at least one missing context piece (e.g., the location is “Greendale” and it should be “Study room F”); the remaining scenario has the most enriched context with no incorrect or missing pieces (i.e., study group of Spanish with a duration of one hour at the Study Room F at 25 ◦ C and with the lights on). For other three devices we randomly selected the context pieces that will be shared so as to minimize the redundancy in context scenarios. In addition, we also assigned a random confidence to each one of the context pieces shared. Measuring Precision and Recall For our experiment we have modeled the output of Triveni as a binary classification problem with correct and incorrect context pieces considered positive and negative. On the one hand, true positives are positive pieces which are included as part of the output of Triveni and false positives refer to negative pieces being included in final context. On the other hand, true negatives correspond to negative pieces correctly ignored by Triveni and false negatives refer to positive pieces incorrectly ignored by our system. Based on these definitions and the context scenarios mentioned before we computed the precision and recall of the context obtained by Triveni for the user by taking into account the three different approaches for integration explained in Section 5.1.1: conservative, optimistic, and semi-optimistic. Figure B.17 shows the results obtained for the experiments which also includes the precision and recall based on the context synthesizer and before Triveni generated the enriched context. As expected the percentage of context scenarios with high precision is greater in a conservative approach than in an optimistic one (e.g., the precision was higher than 0.9 in 60% of the scenarios for the conservative approach and in 21% for the optimistic). This is because
283 Appendix B. Prototypes for the Semantic Management of LBS the conservative approach only selects the most correct piece of context during integration. On the other hand, the recall is higher for optimistic approach as it considers all non-conflicting context pieces while enriching the context (e.g., the recall was higher than 0.9 in 0% of the scenarios for the conservative approach and in 25% for the optimistic). In the semi-optimistic method, we experimented with several different thresholds and finally we selected 0.15 which improves the precision of the optimistic approach in exchange of a slight decrease on the recall. While in 16% of the scenarios the semi-optimistic approach introduced some incorrect information (e.g., incorrectly added that the duration of the study group was two hours), overall it enriched the context of the user in 97% of the scenarios and corrected the context in 77%. As an example of the experiments performed we show here three scenarios of context creation, enrichment, and correction. In the context creation step, we selected one of the scenarios where Annie’s device was devoid of any context information and after receiving same primary context pieces with different confidence values from other devices it learns about the context (see Test1 in Table B.2). For an example of context enrichment scenario, all the devices had some information about the location and activity but with different confidence scores (see Test2 in Table B.2). In this case, Annie’s location and activity were enriched. For the context correction step, conflicting information was shared (see Test3 in Table B.2). The test device started with an incorrect location “Home” and an incorrect activity “reading”. After integrating the context from other devices, an inconsistency was detected and “Home” was removed. Notice that the activity “reading” is not inconsistent with “meeting” or “studyGroup” but the confidence obtained was lower than the threshold of the semi-optimistic integration and thus removed. Measuring the Performance Finally we ran some experiments that would allow us to test the scalability of our approach for context enrichment with respect to the execution time and memory consumption (two important parameters for mobile devices). For this experiment we used the four real mobile devices and the web service to simulate the presence of other devices sharing their context. We increased the number of simulated devices up to 512 and for each one of them we randomly generated four context pieces that they will share. Measuring computation time on Android presents some problems due to the variance of the time obtained due to the management of apps performed by the operative system. So, we ran every test five times and computed the average time and memory.
Appendix B. Prototypes for the Semantic Management of LBS 284 (a) (b) Figure B.17: Precision and recall of the context obtained for a user in different scenarios before and after using the three approaches of Triveni (conservative, optimistic, and semi-optimistic).
285 Appendix B. Prototypes for the Semantic Management of LBS Device Test1 Location Activity Nexus 5 GCC(0.5) studyGroup(0.6) Nexus 4 GCC(0.3) studyGroup(0.7) Galaxy S3 GCC(0.6) studyGroup(0.7) Nexus 5(start) - - Nexus 5(end) GCC(1) studyGroup(1) Device Test2 Location Activity Nexus 5 GCC(0.8) studyGroup(0.8) Nexus 4 Greendale(0.7) studyGroup(0.7) Galaxy S3 StudyRoomF(0.7) meeting(0.4) Nexus 5(start) GCC(0.5) meeting(0.6) Nexus 5(end) Greendale(1), GCC(0.74), meeting(1) StudyRoomF(0.26) studyGroup(0.6) Device Test3 Location Activity Nexus 5 GCC(0.8) meeting(0.9) Nexus 4 Greendale(0.7) studyGroup(0.7) Galaxy S3 StudyRoomF(0.7) meeting(0.7) Nexus 5(start) Home(0.9) reading(0.4) Nexus 5(end) Greendale(1), GCC(0.48) meeting(0.85), studyGroup(0.26) Table B.2: Results for the tests performed: context creation with consistent information (Test1), context enrichment with consistent information (Test2), context correction with inconsistent information (Test3). We show in Figure B.18 the results obtained for the computation time when increasing the number of devices (notice that the time axis follows a logarithmic scale). The graph shows the average of the computation time of the four smartphones. The standard deviation was situated under 10% up to 16 devices (less than 0.1 seconds), and under 20% for the rest (with the increase of the simulated devices the Nexus 5 over performed the other smartphones). We send small strings of information from one device to another using Bluetooth and did not observe any relevant communication delays. Therefore we have not included communication time in the graph as we believe that the delays in short range Bluetooth communication (around 10 meters) would be insignificant. In addition, while our system continuously enriches the context of a device, the
Appendix B. Prototypes for the Semantic Management of LBS 286 set up of the Bluetooth network will be usually performed just once for most of the scenarios. We wish to highlight that the computation time remained around 1.5 seconds when 32 devices where used. Given the restrictions of Bluetooth communications (a device can communicate up to seven active devices), 32 devices is probably enough for most scenarios. These results also show that the system could enrich the context of users continuously every second in highly dynamic situations. Regarding the memory usage (see Figure B.18), it is maintained in the range of 10MB to 20MB. This includes the memory allocated for the ontology and the semantic reasoner. Taking into account that current mobile devices have at least 1GB of RAM (current Android versions usually provide apps with a maximum heap size of 256MB), our approach does not overload the device even in extreme situations. To summarize, Triveni maintains computation time and memory usage on a mobile device within a practically acceptable rate even when the ontology and the reasoner runs on the device. B.4 MultiCAMBA: Multi-CAMera Broadcasting Assistant In this section we present the prototype developed to evaluate the SHERLOCK module in charge of managing camera views. The prototype, called Multi- CAMBA (Multi-CAMera Broadcasting Assistant), enables the user to define the camera view she is interested in and it checks the views of the different cameras available to obtain those that can fulfill her requirements. B.4.1 Architecture of MultiCAMBA Figure B.19 shows the high-level architecture of the MultiCAMBA prototype. The prototype is based on the following steps: 1. 3D model management. The 3D model of the scenario is an essential part of our system as it stores the information about the different objects and cameras in the scenario. The system maintains this 3D model updated in parallel to the processing of user queries. 2. Obtaining the user requirements. The requirements of the user are captured through an easy-to-use interface. The prototype provides three mechanisms for that: a) the TD uses the 3D interface to define the scene she is interested in, b) the TD selects from lists the target object/s that
287 Appendix B. Prototypes for the Semantic Management of LBS (a) (b) Figure B.18: Computation time and memory usage on a Triveni node with increasing number of devices.
Appendix B. Prototypes for the Semantic Management of LBS 294 before, these boats move according to the real GPS location data captured during the race celebrated in San Sebastian in September 2010. 2. There are three other cameras: one on top of the island, one on the promenade, and one on a sailing boat near the rowing boats. The cameras are set with horizontal focus βh = 70 ◦ , vertical focus βv = 45 ◦ , pan range ±130◦, tilt range ±90◦, and pan and tilt speed 5.5 degrees/second. 3. The tests were performed in an Intel Core i5-480M with graphics card NVIDIA Geforce GT 540M. For the experimental evaluation we will consider this simulated scenario and one of the most interesting queries for the TD. In our sample scenario, the TD may want to know, during the whole event, which cameras are viewing each of the rowing boats, as she could need a shot of a certain boat at anytime. In fact, during the broadcasting of any event, the TD would be interested on the cameras that are viewing the main agents (e.g., for a soccer match it is interesting to know the cameras that are viewing each of the star players). So, as a representative query in the context of our experiment we will continuously process the following one: “Cameras that can view at least 70% of the Kaiku boat” Evaluating the Quality of the Result Set In this first experiment, we want to evaluate whether the cameras provided by the system as an answer are good candidates to provide the views required by the TD (see Figure B.24). We represent the number of cameras in the answer (vertical axis) along the event duration (horizontal axis). The blue line shows the number of cameras provided by the system (some of them currently fulfilling the requirements of the user and the others estimated by the system to be able to do it in the near future) and the red dashed line shows the number of wrongly chosen cameras. We consider a camera as wrongly chosen when the system makes an estimation error greater than 25 seconds in the estimated time to wait until the camera could provided the view required. For example, at the beginning the system estimates that the camera on board the farthest boat (that has two boats between it and the target and does not currently view the target) will cover 77% of “Kaiku” in 10 seconds, but when those 10 seconds have passed the camera is only able to view 21% because then the occlusion of “Kaiku” is greater than estimated. This occlusion remains for 30 seconds, and so the system makes a mistake considering this camera as part of the answer. These kinds of errors only happen when the target is occluded due to
295 Appendix B. Prototypes for the Semantic Management of LBS variations in the speed and direction of the objects that make the system fail in the estimation of the future scene. Again, around time 17:30, where the boats are in the final sprint, the system estimates the time needed to view the target and shows the cameras in the answer, but some of them overtake “Kaiku” and thus they are not able to view it for the rest of the race (due to their rotation limits). However, thanks to the continuous query processing, estimation errors due to unexpected changes in the trajectories are quickly corrected. For the test, the cameras are rotated automatically in order to track “Kaiku” according to the results provided by the system. The maximum number of cameras that can be part of the answer is six (because the camera of “Kaiku” cannot view itself due to the physical rotation limits), and the system shows in the answer at least three cameras during the most critical time intervals, that is, when the boats are at the turning point (which is a key moment during the race) around time instant 10:30 and when the other boats are overtaking “Kaiku” around time instant 17:00-20:00. Even though the system must perform its calculations every second, the results are quite satisfactory for the total period of twenty minutes, and the errors are corrected quickly enough to avoid a negative impact on the decisions of the TD. Notice that, in our scenario, for the most part of the race a good number of cameras fulfill the TD requirements, as they are rotated automatically following the system commands. In this case, the system succeeds in discarding the irrelevant cameras at each moment and in ranking the most interesting cameras first.
Appendix B. Prototypes for the Semantic Management of LBS 296 Figure B.24: Quality of the result set (i.e., cameras fulfilling the user requirements): number of cameras in the answer set (blue line) and number of wrongly chosen cameras (red dashed line).
297 Appendix B. Prototypes for the Semantic Management of LBS Testing the Precision of the Estimated Time to View The goal of this test is to evaluate the error in the time estimation, measured in seconds between the estimated time and the actual time when the camera views the target. In Figure B.25, we show the sum of the time errors for all the cameras at every time instant. Notice that there are positive and negative values, that represent when the time estimated by the system is greater than the actual value (positive) or when it is smaller (negative). We have decided to make this distinction because a negative error could make the TD to keep an eye on a camera that actually will need more time than expected to view the target, which may be an important problem. On the other hand, a positive error (if it is not too big) means that a camera viewed the target earlier than expected, and so the negative impact of selecting that camera is minimized. Anyway, notice that the sum of all the errors ranges only between − 5 and +3 seconds, which is very small for the sum of the errors of all the cameras. Figure B.25: Error in the estimated time needed for the cameras to view the target object: the error is localized at two specific time intervals (the start and the end of the race). The errors are localized within two specific time intervals. The first errors occur at the start of the race, when all the cameras are pointing at the same direction as the front vector of their rowing boats. In this scenario there are not big changes on the objects’ altitude (only slight changes caused by waves), so in order to test the pan and tilt estimation we have set initially all the
Appendix B. Prototypes for the Semantic Management of LBS 298 cameras pointing upwards at the start (maximum tilt). Thus, as the test starts, the cameras have to pan and tilt to view “Kaiku” and the system has to estimate the time needed to do it. As at the starting point the system has not enough information to precisely estimate the speeds of the boats, it makes some little mistakes that, overall, do not exceed 3 seconds. Thus, this error is small enough to provide the TD with accurate information. Around time 17:30 the end of the race is near and there are big variations in the speed and distance between the boats (as the rowers are making their last efforts) and some boat is even overtaken. The system estimates here that the time needed to view “Kaiku” is smaller than the actual time needed, as the boats increase their speed in a final attempt to win the race. This test shows that the errors concerning the estimated time to view the target are small. Besides, those errors are localized in two narrow time intervals and they are quickly fixed (in the test, in ten seconds at most), since the corresponding location-dependent query is continuously processed. Testing the Precision of the Estimated Percentage Viewed We also tested the precision of the estimated percentage of the target viewed by the cameras. Due to the specific features of the scenario, a camera views a percentage below 100% when the target is partially occluded by another boat (the target usually remains inside the FOV of the cameras). As explained before, the system is able to compute the percentage of “Kaiku” that a camera will cover when it is able to view it. For the camera closest to “Kaiku” (that has no other boat between them), the errors in the estimation of the percentage only occur when there is an error in the estimation of the time needed to view it. We have considered these errors in Figure B.25. We show in Figure B.26 an example for a camera that has two boats between it and the target (and thus occlusions are possible) and focusing on a short time interval (the first 8 seconds) where some errors occur. The system starts estimating that the camera will view a smaller percentage than what it will really view, and as the time goes by the error in this estimation decreases. Testing the System Against Real Camera Footage We have also tested the system against real camera footage. Specifically, we have used the video produced by the Spanish broadcaster EiTB for the rowing race celebrated in September 2010. The goal of this test was to compare the results offered by our system with the real event to check the behavior of our proposal. Figure B.27 shows an extract of two seconds of a camera
299 Appendix B. Prototypes for the Semantic Management of LBS Figure B.26: Error in the estimated percentage of the target that a camera will view in the first eight seconds. covering the end of the race (the real images are shown on the bottom of each frame) compared with the information generated and exploited by the query processing in our system (shown at the top of each frame). Notice that the extents of the rowing boats are represented in green by the system, for an easy comparison with the real footage. At the beginning of this live footage, the “Urdaibai” boat has just crossed the finish line (it is the only boat we see in the first frame in Figure B.27(a)); it is followed by “Kaiku”, that enters the FOV of the camera 1 second later, being completely captured by the camera exactly at time instant 2.08 seconds (Figure B.27(b)). At the time instant when the live footage begins, our system estimates that the camera will obtain a full view of the “Kaiku” boat in 1.85 seconds. Notice that the error committed is not very significant: the TD will be alerted just 0.23 seconds before the desired situation is captured by the real camera. This small error is caused by the slight inaccuracy of the GPS data transmitted by the boats and the fact that the location of the real camera was estimated (the TV broadcaster did not provide us with this information). However, the results obtained by the system would have been good enough to help the TD to select this camera to view the “Kaiku” boat. Evaluation of the Ranking Presented to the User The purpose of this experiment is to evaluate the ranked answer provided by the system for a given query image instead of the description of a scene like in the previous tests. The ranking criteria are very important because, due to
Appendix B. Prototypes for the Semantic Management of LBS 300 (a) (b) Figure B.27: Testing the system against real camera footage (the information generated by our system is on the top): in two consecutive seconds. the need of selecting the next camera to broadcast as quickly as possible, the TD will consider only the first positions in the ranking. In [SB05] the authors emphasized that “image retrieval is only meaningful
301 Appendix B. Prototypes for the Semantic Management of LBS in its service to people, performance characterization must be grounded in human evaluation”. However, evaluating an image retrieval system is a difficult task [Tho10] and testing it with real users is time-consuming (so, in many approaches tests are performed with a limited number of participants [ABP02; BP97]). Moreover, in our case finding real TDs with experience in the live broadcasting of sport events able to take part in our experiments was not possible, although it would have been very interesting. So, for our test, 10 users familiarized with the use of 3D interfaces were recruited and we used four query images that could be interesting for a TD (see Figure B.28). The users were presented with 45 images given in arbitrary order (see Figure B.29) and the four queries, and their goal was to select the images that they considered similar to each query and then to rank the selected images according to their similarity. To accomplish this task, the users were allowed to choose the order in which they wanted to answer the queries and modify their previous answers whenever necessary. We have selected these 45 images as they show different numbers of objects in different configurations. The number is high enough to obtain at least five similar images per query image and at the same time is low enough for the users to be able to check all the images correctly (the higher the number of images available, the higher the difficulty to keep the concentration of the user to verify them all carefully, as the amount of information that can be kept in the working memory of humans is considered to be limited [Mil56]).
Appendix B. Prototypes for the Semantic Management of LBS 302 (a) (b) (c) (d) Figure B.28: Query images used in the tests.
303 Appendix B. Prototypes for the Semantic Management of LBS Figure B.29: Set of 45 images used in the tests.
Appendix B. Prototypes for the Semantic Management of LBS 310 Position 1 S=0.72 Position 2 S=0.67 Position 3 S=0.63 Position 4 S=0.63 Position 5 S=0.61 Query Image (a) Position 1 S=0.75 Position 2 S=0.73 Position 3 S=0.59 Position 4 S=0.58 Position 5 S=0.52 Query Image (b) Figure B.34: Ranking of images obtained for a user query: before (a) and after (b) modifying the weights of the similarity formula. possible to fine-tune the weights according to the preferences of the user. Some complementary works have proposed to automatically infer suitable preference weights based on past user’s interactions with the system [RHOM98].
We shall overcome.
Appendix B. Prototypes for the Semantic Management of LBS 314
Bibliography [AAA13] Samina Raza Abidi, Syed Sibte Raza Abidi, and A Abusharek. “A Semantic Web based mobile framework for designing personalized patient self-management interventions”. In: 1st Conference on Mobile and Information Technologies in Medicine. 2013. [ABP02] J¨urgen Assfalg, Alberto Del Bimbo, and Pietro Pala. “Three-Dimensional Interfaces for Querying by Example in Content-Based Image Retrieval”. In: IEEE Transactions on Visualization and Computer Graphics 8.4 (2002), pp. 305–318. [ADBDSS99] Gregory D. Abowd, Anind K. Dey, Peter J. Brown, Nigel Davies, Mark Smith, and Pete Steggles. “Towards a Better Understanding of Context and Context- Awareness”. In: 1st International Symposium on Handheld and Ubiquitous Computing (HUC 1999). 1999, pp. 304–307. [ADV07] Tarik Filali Ansary, Mohamed Daoudi, and Jean-Phillipe Vandeborre. “A Bayesian 3-D Search Engine Using Adaptive Views Clustering”. In: IEEE Transactions on Multimedia 9.1 (2007), pp. 78–88. [AEJJIM13] Raeda F AbuAlRub, Fadi El-Jardali, Diana Jamal, Abdulkareem S Iblasi, and Susan F Murray. “The challenges of working in underserved areas: a qualitative exploratory study of views of policy makers and professionals”. In: International Journal of Nursing Studies 50.1 (2013), pp. 73–82. 315
Bibliography 316 [AEMPW07] Arnon Amir, Alon Efrat, Jussi Myllymaki, Lingeshwaran Palaniappan, and Kevin Wampler. “Buddy tracking – efficient proximity detection among mobile friends”. In: Pervasive and Mobile Computing 3.5 (2007), pp. 489– 511. [AKK06] Yasuo Ariki, Shintaro Kubota, and Masahito Kumano. “Automatic Production System of Soccer Sports Video by Digital Camera Work Based on Situation Recognition”. In: 8th IEEE International Symposium on Multimedia (ISM 2006). IEEE Computer Society, 2006, pp. 851–860. [ARCGHJR13] Ana Armas-Romero, Bernardo Cuenca-Grau, Ian Horrocks, and Ernesto Jim´enez-Ruiz. “MORe: a Modular OWL Reasoner for Ontology Classification”. In: 2nd International Workshop on OWL Reasoner Evaluation (ORE 2013). Vol. 1015. Ulm, Germany: CEUR-WS, 2013, pp. 61–67. [AWH10] Chris J. van Aart, Bob J. Wielinga, and Willem Robert van Hage. “Mobile Cultural Heritage Guide: Location- Aware Semantic Search”. In: 17th International Conference on Knowledge Engineering and Management by the Masses (EKAW 2010). 2010, pp. 257–271. [BB09] Christian Becker and Christian Bizer. “Exploring the Geospatial Semantic Web with DBpedia Mobile”. In: Journal of Web Semantics 7.4 (2009), pp. 278–286. [BBCCGMMV00] Domenico Beneventano, Sonia Bergamaschi, Silvana Castano, Alberto Corni, R Guidetti, G Malvezzi, Michele Melchiori, and Maurizio Vincini. “Information integration: the MOMIS project demonstration”. In: 26th International Conference on Very Large Data Bases (VLDB 2000). 2000, pp. 611–614. [BBHINRR10] Claudio Bettini, Oliver Brdiczka, Karen Henricksen, Jadwiga Indulska, Daniela Nicklas, Anand Ranganathan, and Daniele Riboni. “A Survey of Context Modelling and Reasoning Techniques”. In: Pervasive and Mobile Computing 6.2 (2010), pp. 161–180.
317 Bibliography [BBIM14] Carlos Bobed, Fernando Bobillo, Sergio Ilarri, and Eduardo Mena. “Answering Continuous Description Logic Queries: Managing Static and Volatile Knowledge in Ontologies”. In: International Journal on Semantic Web and Information Systems 10.3 (2014), pp. 1–44. [BBMI13] Jorge Bernad, Carlos Bobed, Eduardo Mena, and Sergio Ilarri. “A Formalization for Semantic Location Granules”. In: International Journal of Geographical Information Science 27.6 (2013), pp. 1090–1108. [BBYEM14] Carlos Bobed, Fernando Bobillo, Roberto Yus, Guillermo Esteban, and Eduardo Mena. “Android Went Semantic: Time for Evaluation”. In: 3rd International Workshop on OWL Reasoner Evaluation (ORE 2014). Vol. 1207. CEUR-WS, 2014, pp. 23–29. [BCMNPS03] Franz Baader, Diego Calvanese, Deborah McGuinness, Daniele Nardi, and Peter Patel-Schneider. The Description Logic Handbook. Theory, Implementation and Applications. Cambridge University Press, 2003. [BDR07] Matthias Baldauf, Schahram Dustdar, and Florian Rosenberg. “A Survey on Context-Aware Systems”. In: International Journal of Ad Hoc and Ubiquitous Computing 2.4 (2007), pp. 263–277. [BG04] Dan Brickley and Ramanathan V Guha. RDF vocabulary description language 1.0: RDF schema. 2004. [BGJRMPS13] Samantha Bail, Birte Glimm, Ernesto Jim´enez-Ruiz, Nicolas Matentzoglu, Bijan Parsia, and Andreas Steigmiller. “Summary ORE 2014 Competition”. In: 3rd International Workshop on OWL Reasoner Evaluation (ORE 2014). Vol. 1207. Vienna, Austria: CEUR-WS, 2013, pp. IV–VII. [BHBL09] Christian Bizer, Tom Heath, and Tim Berners-Lee. “Linked Data-the story so far”. In: International Journal on Semantic Web and Information Systems 5.3 (2009), pp. 1–22.
Bibliography 318 [BHJV08] Jrgen Bock, Peter Haase, Qiu Ji, and Raphael Volz. “Benchmarking OWL Reasoners”. In: International Workshop on Advancing Reasoning on the Web: Scalability and Commonsense (ARea 2008). 2008. [Bia98] Michael H. Bianchi. “AutoAuditorium: A Fully Automatic, Multi-Camera System to Televise Auditorium Presentations”. In: 1998 Joint DARPA/NIST Smart Spaces Technology Workshop. 1998. [BJKS06] Rimantas Benetis, Christian S. Jensen, Gytis Karˆciauskas, and Simonas ˆ Saltenis. “Nearest and reverse nearest neighbor queries for moving objects”. In: The VLDB Journal 15.3 (2006), pp. 229–249. [BK11] Robert Battle and Dave Kolas. “GeoSPARQL: enabling a geospatial Semantic Web”. In: Semantic Web Journal 3.4 (2011), pp. 355–370. [BKOK04] Noboru Babaguchi, Yoshihiko Kawai, Takehiro Ogura, and Tadahiro Kitahashi. “Personalized abstraction of broadcasted American football video by highlight selection”. In: IEEE Transactions on Multimedia 6.4 (2004), pp. 575–586. [BKOTV11] Barry Bishop, Atanas Kiryakov, Damyan Ognyanoff, Zdravko Tashev, and Ruslan Velkov. “OWLIM: A family of scalable semantic repositories”. In: Semantic Web Journal 2 (1 2011), pp. 33–42. [BLHL+01] Tim Berners-Lee, James Hendler, Ora Lassila, et al. “The Semantic Web”. In: Scientific American 284.5 (2001), pp. 28–37. [BLKABCH09] Christian Bizer, Jens Lehmann, Georgi Kobilarov, Sren Auer, Christian Becker, Richard Cyganiak, and Sebastian Hellmann. “DBpedia - A crystallization point for the Web of Data”. In: Web Semantics: Science, Services and Agents on the World Wide Web 7.3 (2009), pp. 154–165. [BLS06] F. Baader, C. Lutz, and B. Suntisrivaraporn. “CEL - A Polynomial-time Reasoner for Life Science Ontologies”. In: 3rd International Joint Conference on Automated
319 Bibliography Reasoning (IJCAR 2006). Vol. 4130. Springer, 2006, pp. 287–291. [BMJ07] Ronald Beaubrun, Bernard Moulin, and Nafaa Jabeur. “An architecture for delivering location-based services”. In: International Journal of Computer Science and Network Security 7.7 (2007), pp. 160–166. [BP97] Alberto Del Bimbo and Pietro Pala. “Visual Image Retrieval by Elastic Matching of User Sketches”. In: IEEE Transactions on Pattern Analysis and Machine Intelligence 19.2 (1997), pp. 121–132. [BS16] Fernando Bobillo and Umberto Straccia. “The fuzzy ontology reasonerfuzzyDL”. In: Knowledge-Based Systems 95 (2016), pp. 12 –34. [BSS10] Max Braun, Ansgar Scherp, and Steffen Staab. “Collaborative Semantic Points of Interests”. In: 7th Extended Semantic Web Conference (ESWC 2010). 2010, pp. 365– 369. [BTAABT11] Azzedine Boukerche, Begumhan Turgut, Nevin Aydin, Mohammad Z. Ahmad, Ladislau B¨ol¨oni, and Damla Turgut. “Routing protocols in ad hoc networks: A survey”. In: Computer Networks 55.13 (2011), pp. 3032– 3080. [Bur10] Ed Burnette. Hello, Android: Introducing Google’s Mobile Development Platform. The Pragmatic Programmers, LLC., 2010. [BYBIBMTLG15] Carlos Bobed, Roberto Yus, Fernando Bobillo, Sergio Ilarri, Jorge Bernad, Eduardo Mena, Raquel Trillo- Lado, and Angel Luis Garrido. “Chapter 4: Emerging Semantic-Based Applications”. In: Semantic Web: Implications for Technologies and Business Practices. Ed. by Michael Workman. Springer International Publishing, 2015, pp. 39–83. [BYBM15] Carlos Bobed, Roberto Yus, Fernando Bobillo, and Eduardo Mena. “Semantic Reasoning on Mobile Devices: Do Androids Dream of Efficient Reasoners?” In: Journal of Web Semantics 35 (2015), pp. 167–183.
Bibliography 326 Workshop on Description Logics (DL 2013). Vol. 1014. CEUR-WS, 2013, pp. 197–208. [GPH05] Yuanbo Guo, Zhengxiang Pan, and Jeff Heflin. “LUBM: A benchmark for OWL knowledge base systems”. In: Journal of Web Semantics 3.2–3 (2005), pp. 158–182. [GPZ04] Tao Gu, H.K. Pung, and Da Qing Zhang. “A middleware for building context-aware mobile services”. In: IEEE 59th Vehicular Technology Conference (VTC 2004). Vol. 5. 2004, pp. 2656–2660. [Gru93] Thomas R. Gruber. “A translation approach to portable ontology specifications”. In: Knowledge Acquisition 5.2 (1993), pp. 199–220. [Gru95] Thomas R. Gruber. “Toward Principles for the Design of Ontologies Used for Knowledge Sharing”. In: International Journal of Human-Computer Studies 43.5-6 (1995), pp. 907–928. [GTH06] Tom Gardiner, Dmitry Tsarkov, and Ian Horrocks. “Framework for an automated comparison of description logic reasoners”. In: 5th International Semantic Web Conference (ISWC 2006). Vol. 4273. Springer, 2006, pp. 654–667. [GWPZ04] Tao Gu, Xiao Hang Wang, Hung Keng Pung, and Da Qing Zhang. “An ontology-based context model in intelligent environments”. In: Communication Networks and Distributed Systems Modeling and Simulation Conference (CNDS 2004). 2004. [GWZTDZ11] Yue Gao, Meng Wang, Zheng-Jun Zha, Qi Tian, Qionghai Dai, and Naiyao Zhang. “Less is More: Efficient 3-D Object Retrieval With Query View Selection”. In: IEEE Transactions on Multimedia 13.5 (2011), pp. 1007–1018. [HB11] Matthew Horridge and Sean Bechhofer. “The OWL API: A Java API for OWL Ontologies”. In: Semantic Web Journal 2.1 (2011), pp. 11–21. [HHMW12] Volker Haarslev, Kay Hidde, Ralf M¨oller, and Michael Wessel. “The RacerPro Knowledge Representation and Reasoning System”. In: Semantic Web Journal 3 (3 2012), 267–277.
327 Bibliography [HKPPSR09] Pascal Hitzler, Markus Kr¨otzsch, Bijan Parsia, Peter F Patel-Schneider, and Sebastian Rudolph. “OWL 2 web ontology language primer”. In: W3C recommendation 27.1 (2009), p. 123. [HM12] Abdeltawab M. Hendawi and Mohamed F. Mokbel. “Predictive spatio-temporal queries: a comprehensive survey and future directions”. In: 1st ACM SIGSPATIAL International Workshop on Mobile Geographic Information Systems (MobiGIS 2012). 2012, pp. 97– 104. [HMFC14] Elena Hervalejo, Miguel A. Mart´ınez-Prieto, Javier D. Fern´andez, and ´ Oscar Corcho. “HDTourist: Exploring Urban Data on Android”. In: 13th International Semantic Web Conference (ISWC 2014). 2014, pp. 65– 68. [Hor98] Ian Horrocks. “Using an Expressive Description Logic: FaCT or Fiction?” In: 6th International Conference on the Principles of Knowledge Representation and Reasoning (KR 1998). Trento, Italy: Morgan Kaufmann Publishers, 1998, pp. 636–647. [HPSBTGD04] Ian Horrocks, Peter F. Patel-Schneider, Harold Boley, Said Tabet, Benjamin Grosof, and Mike Dean. SWRL: A Semantic Web Rule Language Combining OWL and RuleML. W3C Member Submission. World Wide Web Consortium, 2004. [HSS13] Benjamin Henne, Christian Szongott, and Matthew Smith. “SnapMe if You Can: Privacy Threats of Other Peoples’ Geo-tagged Media and What We Can Do About It”. In: 6th ACM Conference on Security and Privacy in Wireless and Mobile Networks (WiSec 2013). Budapest, Hungary: ACM, 2013, pp. 95–106. [HWG07] Rachel Heck, Michael Wallick, and Michael Gleicher. “Virtual Videography”. In: ACM Transactions on Multimedia Computing, Communications, and Applications 3.1 (2007).
Bibliography 328 [HXL05] Haibo Hu, Jianliang Xu, and Dik Lun Lee. “A generic framework for monitoring continuous spatial queries over moving objects”. In: ACM SIGMOD International Conference on Management of Data (SIGMOD 2005). ACM, 2005, pp. 479–490. [IBM11] Sergio Ilarri, Carlos Bobed, and Eduardo Mena. “An approach to process continuous location-dependent queries on moving objects with support for location granules”. In: Journal of Systems and Software 84.8 (2011), pp. 1327– 1350. [Ila06] Sergio Ilarri. “LOQOMOTION: Processing of Continuous Location-Dependent Queries in Mobile Environments”. PhD thesis. University of Zaragoza, 2006, p. 247. [IlMS11] Sergio Ilarri, Arantza lllarramendi, Eduardo Mena, and Amit Sheth. “Semantics in Location-Based Services – Guest Editors’ Introduction for Special Issue”. In: IEEE Internet Computing 15.6 (2011), pp. 10–14. [IMI06] Sergio Ilarri, Eduardo Mena, and Arantza Illarramendi. “Location-dependent queries in mobile contexts: distributed processing using mobile agents”. In: IEEE Transactions on Mobile Computing 5.8 (2006), pp. 1029– 1043. [IMI08] Sergio Ilarri, Eduardo Mena, and Arantza Illarramendi. “Using Cooperative Mobile Agents to Monitor Distributed and Dynamic Environments”. In: Information Sciences: an International Journal 178.9 (2008), pp. 2105–2127. [IMI10] Sergio Ilarri, Eduardo Mena, and Arantza Illarramendi. “Location-dependent Query Processing: Where We Are and Where We Are Heading”. In: ACM Computing Surveys 42.3 (2010), 12:1–12:73. [IMIYLM12] Sergio Ilarri, Eduardo Mena, Arantza Illarramendi, Roberto Yus, Maider Laka, and Gorka Marcos. “A Friendly Location-Aware System to Facilitate the Work of Technical Directors When Broadcasting Sport Events”. In: Mobile Information Systems 8.1 (2012), pp. 17–43.
329 Bibliography [Ind] Ministry of Health & Family Welfare of the Government of India. Accredited Social Health Activist (ASHA) Manual. URL: http://nrhm.gov.in/communitisation/ asha/asha-manual.html. [ITM06] Sergio Ilarri, Raquel Trillo, and Eduardo Mena. “SPRINGS: A Scalable Platform for Highly Mobile Agents in Distributed Computing Environments”. In: IEEE International Symposium on a World of Wireless, Mobile and Multimedia Networks (WoWMoM 2012). IEEE Computer Society, 2006, pp. 633–637. [JCHWTL04] Xiaodong Jiang, Nicholas Y. Chen, Jason I. Hong, Kevin Wang, Leila Takayama, and James A. Landay. “Siren: Context-aware Computing for Firefighting”. In: 2nd International Conference on Pervasive Computing (PERVASIVE 2004). Springer, 2004, pp. 87–105. [JMSK10] Yves R Jean-Mary, E Patrick Shironoshita, and Mansur R Kabuka. “ASMOV: Results for OAEI 2010”. In: 5th International Workshop on Ontology Matching (OM 2010). 2010. [JT05] James Jayaputera and David Taniar. “Data retrieval for location-dependent queries in a multi-cell wireless environment”. In: Mobile Information Systems 1.2 (2005), pp. 91–108. [Kaz09] Yevgeny Kazakov. “Consequence-driven reasoning for Horn SHIQ ontologies”. In: 21st International Joint Conference on Artificial intelligence (IJCAI 2009). 2009, pp. 2040–2045. [KD12] Jacek Kopeck´y and John Domingue. “ParkJam: Crowdsourcing Parking Availability Information with Linked Data”. In: 9th Extended Semantic Web Conference (ESWC 2012). 2012, pp. 381–386. [KDNCB13] Vikas Kumar, Vishal Dave, Rohan Nagrani, Sanjay Chaudhary, and Minal Bhise. “Crop cultivation information system on mobile devices”. In: IEEE Global Humanitarian Technology Conference: South Asia Satellite (GHTC-SAS 2013). 2013, pp. 196–202.
Bibliography 330 [KDSW15] Katharina Krombholz, Adrian Dabrowski, Matthew Smith, and Edgar Weippl. “Financial Cryptography and Data Security: FC 2015 International Workshops, BITCOIN, WAHC, and Wearable”. In: ed. by Michael Brenner, Nicolas Christin, Benjamin Johnson, and Kurt Rohloff. Berlin, Heidelberg: Springer Berlin Heidelberg, 2015. Chap. Ok Glass, Leave Me Alone: Towards a Systematization of Privacy Enhancing Technologies for Wearable Computing, pp. 274–280. [Ken38] M. G. Kendall. “A New Measure of Rank Correlation”. In: Biometrika 30.1/2 (1938), pp. 81–93. [KFJ03] Lalana Kagal, Tim Finin, and Anupam Joshi. “A Policy Based Approach to Security for the Semantic Web”. In: 2nd International Semantic Web Conference (ISWC 2003). 2003, pp. 402–418. [KK13] Yevgeny Kazakov and Pavel Klinov. “Experimenting with ELK Reasoner on Android”. In: 2nd International Workshop on OWL Reasoner Evaluation (ORE 2013). Vol. 1015. CEUR-WS. 2013, pp. 68–74. [KKS14] Yevgeny Kazakov, Markus Kr¨otzsch, and Frantiˇsek Simanˇc´ık. “The Incredible ELK”. In: Journal of Automated Reasoning 53 (1 2014), pp. 1–61. [Kle06] Thomas Kleemann. “Towards Mobile Reasoning”. In: 2006 International Workshop on Description Logics (DL 2006). 2006. [KLK12] Yong-Bin Kang, Yuan-Fang Li, and Shonali Krishnaswamy. “A Rigorous Characterization of Classification Performance - A Tale of Four Reasoners”. In: 1st International Workshop on OWL Reasoner Evaluation (ORE 2012). Vol. 858. CEUR-WS. 2012. [KLXWL05] Dazhou Kang, Jianjiang Lu, Baowen Xu, Peng Wang, and Yanhui Li. “A Framework of Checking Subsumption Relations Between Composite Concepts in Different Ontologies”. In: Knowledge-Based Intelligent Information and Engineering Systems. Vol. 3681. Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2005.
331 Bibliography [Kol11] Maheshkumar H. Kolekar. “Bayesian belief network based broadcast sports video indexing”. In: Multimedia Tools and Applications 54.1 (2011), pp. 27–54. [KWM11] Jennifer R. Kwapisz, Gary M. Weiss, and Samuel A. Moore. “Activity Recognition Using Cell Phone Accelerometers”. In: ACM SIGKDD Explorations Newsletter 12.2 (2011), pp. 74–82. [KZ08] Wei-Shinn Ku and Roger Zimmermann. “Nearest neighbor queries with peer-to-peer data sharing in mobile environments”. In: Pervasive and Mobile Computing 4.5 (2008), pp. 775–788. [LB10] M. Lawley and C. Bousquet. “Fast classification in Prot´eg´e: Snorocket as an OWL 2 EL reasoner”. In: Australasian Ontology Workshop 2010 (AOW 2010). 2010, pp. 45–50. [Les99] Victor R. Lesser. “Cooperative Multiagent Systems: A Personal View of the State of the Art”. In: IEEE Transactions on Knowledge and Data Engineering 11.1 (1999), pp. 133–142. [LIS01] B. Li and M. Ibrahim Sezan. “Event detection and summarization in sports video”. In: IEEE Workshop on Content-Based Access of Image and Video Libraries (CBAIVL 2001). 2001, pp. 132–138. [LJMKHS12] Youngki Lee, Younghyun Ju, Chulhong Min, Seungwoo Kang, Inseok Hwang, and Junehwa Song. “CoMon: cooperative ambience monitoring platform with continuity and benefit awareness”. In: 10th Int. Conf. on Mobile systems, applications, and services (MobiSys 2012). 2012. [LKFWB02] Qiong Liu, Don Kimber, Jonathan Foote, Lynn Wilcox, and John Boreczky. “FlySPEC: a multi-user video camera system with hybrid human and automatic control”. In: 10th ACM International Conference on Multimedia (MULTIMEDIA 2002). ACM Press, 2002, pp. 484–492.
Bibliography 332 [LMLPCC10] N.D. Lane, E. Miluzzo, Hong Lu, D. Peebles, T. Choudhury, and A.T. Campbell. “A survey of mobile phone sensing”. In: IEEE Communications Magazine 48.9 (2010), pp. 140–150. [LMZBWPY07] Jing Lu, Li Ma, Lei Zhang, Jean-S´ebastien Brunner, Chen Wang, Yue Pan, and Yong Yu. “SOR: A Practical System for Ontology Storage, Reasoning and Search”. In: 33rd International Conference on Very Large Data Bases (VLDB 2007). ACM, 2007, pp. 1402–1405. [LO99] Danny B. Lange and Mitsuru Oshima. “Seven good reasons for mobile agents”. In: Communications of the ACM 42 (3 1999), pp. 88–89. [LPQPH11] Danh Le-Phuoc, Hoan Nguyen Mau Quoc, Josiane Xavier Parreira, and Manfred Hauswirth. “The linked sensor middleware–connecting the real world and the semantic web”. In: 10th International Semantic Web Conference (ISWC 2011). 2011. [LS97] Louisa Lam and Ching Y. Suen. “Application of Majority Voting to Pattern Recognition: An Analysis of Its Behavior and Performance”. In: IEEE Transactions on Systems, Man, and Cybernetics, Part A: Systems and Humans 27.5 (1997), pp. 553–568. [Mac67] James MacQueen. “Some methods for classification and analysis of multivariate observations”. In: 15th Berkeley Symposium on Mathematical Statistics and Probability. 281-297. 1967. [MBK06] Christopher J. Matheus, Kenneth Baclawski, and Mieczyslaw M. Kokar. “BaseVISor: A Triples-Based Inference Engine Outfitted to Process RuleML and R-Entailment Rules”. In: 2nd International Conference on Rules and Rule Markup Languages for the Semantic Web (RuleML 2006). 2006, pp. 67–74. [McB02] Brian McBride. “Jena: A Semantic Web Toolkit”. In: IEEE Internet Computing 6.6 (2002), pp. 55–59. [Men12] Julian Mendez. “jcel: A Modular Rule-based Reasoner”. In: 1st International Workshop on OWL Reasoner Evaluation (ORE 2012). Vol. 858. CEUR-WS. 2012.
333 Bibliography [MGK14] Tam´as Matuszka, Gergo Gombos, and Attila Kiss. “mSWB: Towards a Mobile Semantic Web Browser”. In: 11th International Conference on Mobile Web Information Systems (MobiWIS 2014). 2014, pp. 165–175. [MHK12] Boris Motik, Ian Horrocks, and Su Myeon Kim. “Deltareasoner: A Semantic Web reasoner for an intelligent mobile platform”. In: 21st World Wide Web Conference (WWW 2012). 2012, pp. 63–72. [MHLN06] Felix M¨uller, Michael Hanselmann, Thorsten Liebig, and Olaf Noppens. “A Tableaux-based Mobile DL Reasoner - An Experience Report”. In: 19th International Workshop on Description Logics (DL 2006). Vol. 189. CEUR-WS. 2006. [Mil56] George A. Miller. “The magical number seven, plus or minus two: Some limits on our capacity for processing information”. In: Psychological Review 63.2 (1956), 81– 97. [Mil95] George A. Miller. “WordNet: A Lexical Database for English”. In: Communications ACM 38.11 (1995), pp. 39– 41. [MK14] Tam´as Matuszka and Attila Kiss. “Alive Cemeteries with Augmented Reality and Semantic Web Technologies”. In: International Journal of Computer, Information Science and Engineering 8 (2014), pp. 32–36. [MMM+04] Frank Manola, Eric Miller, Brian McBride, et al. “RDF primer”. In: W3C recommendation 10.1-107 (2004), p. 6. [MN07] Frank McCown and Michael L. Nelson. “Agreeing to disagree: Search engines and their public interfaces”. In: 7th ACM/IEEE-CS Joint Conference on Digital Libraries (JCDL 2007). ACM, 2007, pp. 309–318. [MRM04] Nikola Mitrovic, Jose-Alberto Royo, and Eduardo Mena. “ADUS: Indirect Generation of User interfaces on Wireless Devices”. In: 7th International Workshop Mobility on Databases and Distributed Systems (MDDS 2004). IEEE Computer Society, 2004, pp. 662–666.
Bibliography 334 [MS02] Alexander Maedche and Steffen Staab. “Measuring Similarity Between Ontologies”. In: 13th International Conference on Knowledge Engineering and Knowledge Management (EKAW 2002). 2002. [MS05] B. Motik and R. Studer. “KAON2–A Scalable Reasoning Tool for the Semantic Web”. In: 2nd European Semantic Web Conference (ESWC 2005). 2005. [NBWMPW14] Hai H. Nguyen, David E. Beel, Gemma Webster, Chris Mellish, Jeff Z. Pan, and Claire Wallace. “CURIOS Mobile: Linked Data Exploitation for Tourist Mobile Apps in Rural Areas”. In: 4th Joint International Conference on Semantic Technology (JIST 2014). 2014, pp. 129– 145. [NTB09] Naoko Nitta, Yoshimasa Takahashi, and Noboru Babaguchi. “Automatic personalized video abstraction for sports videos using metadata”. In: Multimedia Tools and Applications 41.1 (2009), pp. 1–25. [Nwa96] Hyacinth S Nwana. “Software agents: An overview”. In: The knowledge engineering review 11.03 (1996), pp. 205– 244. [OKCM12] Hyeong-Seok Oh, Beom-Jun Kim, Hyung-Kyu Choi, and Soo-Mook Moon. “Evaluation of Android Dalvik virtual machine”. In: 10th International Workshop on Java Technologies for Real-time and Embedded Systems (JTRES 2012). 2012. [ONMRS12] Vito Claudio Ostuni, Tommaso Di Noia, Roberto Mirizzi, Davide Romito, and Eugenio Di Sciascio. “Cinemappy: a Context-aware Mobile App for Movie Recommendations boosted by DBpedia”. In: International Workshop on Semantic Technologies meet Recommender Systems & Big Data. 2012, pp. 37–48. [Pan05] Zhengxiang Pan. “Benchmarking DL Reasoners Using Realistic Ontologies”. In: Workshop on OWL: Experiences and Directions (OWLED 2005). Vol. 188. CEURWS, 2005.
335 Bibliography [PLMC09] Han-Saem Park, Soojung Lim, Jun-Ki Min, and Sung- Bae Cho. “Optimal View Selection and Event Retrieval in Multi-Camera Office Environment”. In: Multisensor Fusion and Integration for Intelligent Systems. Lecture Notes in Electrical Engineering 35 (2009). Ed. by Hernsoo Hahn, Hanseok Ko, and Sukhan Lee, pp. 45–53. [PM09] Evan W Patton and Deborah L McGuinness. “The mobile wine agent: Pairing wine with the social Semantic Web”. In: 2nd Workshop on Social Data on the Web (SDoW 2009). 2009. [PM14] Evan M. Patton and Deborah L. McGuinness. “A Power Consumption Benchmark for Reasoners on Mobile Devices”. In: 13th International Semantic Web Conference (ISWC 2014). Vol. 8796. Lecture Notes in Computer Science. Springer, 2014, pp. 409–424. [PPRH10] Danh Le Phuoc, Josiane Xavier Parreira, Vinny Reynolds, and Manfred Hauswirth. “RDF On the Go: RDF Storage and Query Processor for Mobile Devices”. In: 9th International Semantic Web Conference (ISWC 2010). 2010. [PS+08] Eric Prud’hommeaux, Andy Seaborne, et al. “SPARQL query language for RDF”. In: W3C recommendation 15 (2008). [PWLZB07] Amir Padovitz, Seng Wai Loke, Arkady Zaslavsky, and Bernard Burg. “Verification of uncertain context based on a theory of context spaces”. In: International Journal of Pervasive Computing and Communications 3.1 (2007), pp. 30–56. [PYDFMJ14] Primal Pappachan, Roberto Yus, Prajit Kumar Das, Tim Finin, Eduardo Mena, and Anupam Joshi. “A Semantic Context-Aware Privacy Model for FaceBlock”. In: 2nd International Workshop on Society, Privacy and the Semantic Web - Policy and Technology (PrivOn 2014), co-located with the 13th International Semantic Web Conference (ISWC 2014). Vol. 1316. CEUR-WS, 2014.
Bibliography 342 [Tho10] Bart Thomee. “A picture is worth a thousand words – Content-based image retrieval techniques”. PhD thesis. Leiden University (Germany), 2010. [TIM07] Raquel Trillo, Sergio Ilarri, and Eduardo Mena. “Comparison and Performance Evaluation of Mobile Agent Platforms”. In: 3rd International Conference on Autonomic and Autonomous Systems (ICAS 2007). IEEE Computer Society, 2007. [TJV13] Bjørnar Tessem, Bjarte Johansen, and Csaba Veres. “Mobile Location-Driven Associative Search in DBpedia with Tag Clouds”. In: 9th International Conference on Semantic Systems (I-SEMANTICS 2013). 2013, pp. 6– 10. [TKS12] Gerald T¨opper, Magnus Knuth, and Harald Sack. “DB- pedia Ontology Enrichment for Inconsistency Detection”. In: 8th International Conference on Semantic Systems (I-SEMANTICS 2012). 2012, pp. 33–40. [TP12] Dmitry Tsarkov and Ignazio Palmisano. “Chainsaw: a Metareasoner for Large Ontologies”. In: 1st International Workshop on OWL Reasoner Evaluation (ORE 2012). Vol. 858. CEUR-WS. 2012. [TPIBM11] Raquel Trillo, Laura Po, Sergio Ilarri, Sonia Bergamaschi, and Eduardo Mena. “Using Semantic Techniques to Access Web Data”. In: Information Systems. Special Issue on Semantic Integration of Data, Multimedia, and Services 36.2 (2011), pp. 117–133. [TPR10] Edward Thomas, Jeff Z. Pan, and Yuan Ren. “TrOWL: Tractable OWL 2 Reasoning Infrastructure”. In: 7th Extended Semantic Web Conference (ESWC 2010). 2010, pp. 431–435. [TPRT11] R´emi Tournaire, Jean-Marc Petit, Marie-Christine Rousset, and Alexandre Termier. “Discovery of Probabilistic Mappings between Taxonomies: Principles and Experiments”. In: Journal of Data Semantics 15 (2011), pp. 66–101.
343 Bibliography [TPS02] Yufei Tao, Dimitris Papadias, and Qiongmao Shen. “Continuous Nearest Neighbor Search”. In: 28th International Conference on Very Large Data Bases. VLDB 2002. Hong Kong, China: VLDB Endowment, 2002, pp. 287–298. [TS03] Goce Trajcevski and Peter Scheuermann. “Triggers and continuous queries in moving objects databases”. In: 14th International Workshop on Database and Expert Systems Applications. 2003, pp. 905–910. [TWHC04] Goce Trajcevski, Ouri Wolfson, Klaus Hinrichs, and Sam Chamberlain. “Managing Uncertainty in Moving Objects Databases”. In: ACM Transactions on Database Systems 29.3 (2004), pp. 463–507. [VDV14] Silviu Vert, Bogdan Dragulescu, and Radu Vasiu. “LOD4AR: Exploring Linked Open Data with a Mobile Augmented Reality Web Application”. In: 13th International Semantic Web Conference (ISWC 2014). 2014, pp. 185– 188. [VNP15] Edgaras Valincius, Hai H. Nguyen, and Jeff Z. Pan. “A Power Consumption Benchmark Framework for Ontology Reasoning on Android Devices”. In: 4th International Workshop on OWL Reasoner Evaluation (ORE). 2015, pp. 80–86. [WCT10] William Van Woensel, Sven Casteleyn, and Olga De Troyer. “Applying Semantic Web Technology in a Mobile Setting: The Person Matcher”. In: 10th International Conference on Web Engineering (ICWE 2010). 2010, pp. 506–509. [Wer03] Christph Wernhard. System Description: KRHyper. Tech. rep. Fachberichte Informatik 14-2003, Universit¨at Koblenz- Landau, 2003. [WHAA14] William Van Woensel, Newres Al Haider, Ahmad Ahmad, and Syed S. R. Abidi. “A Cross-Platform Benchmark Framework for Mobile Semantic Web Reasoning Engines”. In: 13th International Semantic Web Conference (ISWC 2014). Vol. 8796. Lecture Notes in Computer Science. Springer, 2014, pp. 389–408.
Bibliography 344 [Whi04] Stephen A White. “Introduction to BPMN”. In: IBM Cooperation 2 (2004). [WRSOS05] Max L. Wilson, Alistair Russell, Daniel A. Smith, Alisdair Owens, and Monica M. C. Schraefel. “mSpace Mobile: A mobile application for the Semantic Web”. In: 2nd International Workshop on Interaction Design and the Semantic Web. 2005. [WXCLT08] Jinjun Wang, Changsheng Xu, Engsiong Chng, Hanqing Lu, and Qi Tian. “Automatic composition of broadcast sports video”. In: Multimedia Systems 14.4 (2008), pp. 179–193. [WYZ11] Anna Wu, Xin Yan, and Xiaolong (Luke) Zhang. “Geotagged Mobile Photo Sharing in Collaborative Emergency Management”. In: 2011 Visual Information Communication - International Symposium (VINCI 2011). 2011, 7:1–7:8. [WZL13] Waskitho Wibisono, Arkady Zaslavsky, and Sea Ling. “Situation-awareness and reasoning using uncertain context in mobile peer-to-peer environments”. In: International Journal of Pervasive Computing and Communications 9.1 (2013), pp. 52–71. [XCDS02] Lexing Xie, Shih-Fu Chang, A. Divakaran, and Huifang Sun. “Structure analysis of soccer video with hidden Markov models”. In: 2002 IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP 2002). Vol. 4. 2002, pp. IV–4096–IV–4099. [XWLZ08] Changsheng Xu, Jinjun Wang, Hanqing Lu, and Yifan Zhang. “A Novel Framework for Semantic Annotation and Personalized Retrieval of Sports Video”. In: IEEE Transactions on Multimedia 10.3 (2008), pp. 421–436. [XZZRLH08] Changsheng Xu, Yi-Fan Zhang, Guangyu Zhu, Yong Rui, Hanqing Lu, and Qingming Huang. “Using Webcast Text for Semantic Event Detection in Broadcast Sports Video”. In: IEEE Transactions on Multimedia 10.7 (2008), pp. 1342–1355.
345 Bibliography [YAMII11] Roberto Yus, David Anton, Eduardo Mena, Sergio Ilarri, and Arantza Illarramendi. “MultiCAMBA: A System to Assist in the Broadcasting of Sport Events”. In: 8th International Conference on Mobile and Ubiquitous Systems: Computing, Networking and Services (MobiQ- uitous 2011). Vol. 104. Lecture Notes of the Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering (LNICST). Springer, 2011, pp. 238–242. [YBBM15] Roberto Yus, Fernando Bobillo, Carlos Bobed, and Eduardo Mena. “The OWL Reasoner Evaluation Goes Mobile”. In: 4th International Workshop on OWL Reasoner Evaluation (ORE 2015). Vol. 1387. CEUR-WS, 2015, pp. 38–45. [YBEBM13] Roberto Yus, Carlos Bobed, Guillermo Esteban, Fernando Bobillo, and Eduardo Mena. “Android goes Semantic: DL Reasoners on Smartphones”. In: 2nd International Workshop on OWL Reasoner Evaluation (ORE 2013). Vol. 1015. CEUR-WS, 2013, pp. 46–52. [YCPSA11] Zhixian Yan, Dipanjan Chakraborty, Christine Parent, Stefano Spaccapietra, and Karl Aberer. “SeMiTri: a framework for semantic annotation of heterogeneous trajectories”. In: 14th International Conference on Extending Database Technology (EDBT 2011). ACM, 2011, pp. 259–270. [YIM15] Roberto Yus, Sergio Ilarri, and Eduardo Mena. “Realtime Selection of Video Streams for Live TV Broadcasting Based on Query-by-Example Using a 3D Model”. In: Multimedia Tools and Applications 74.8 (2015), pp. 2659–2685. [YM15a] Roberto Yus and Eduardo Mena. “Continuous Processing of Real-Time Multimedia Requests Using Semantic Techniques”. In: 13th International Conference on Advances in Mobile Computing and Multimedia (MoMM 2015). ACM, 2015, pp. 216–220. [YM15b] Roberto Yus and Eduardo Mena. “Cooperative Network of Mobile Agents to Remotely Process User Information
Bibliography 346 Requests”. In: 2015 IEEE/WIC/ACM International Conference on Web Intelligence (WI 2015). IEEE, 2015, pp. 227–228. [YM15c] Roberto Yus and Eduardo Mena. “Emergency Management Using SHERLOCK”. In: 13th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys 2015). ACM, 2015, pp. 495–495. [YM15d] Roberto Yus and Eduardo Mena. “Mobile Endpoints: Accessing Dynamic Information from Mobile Devices”. In: 14th International Semantic Web Conference (ISWC 2015). Vol. 1486. CEUR-WS, 2015, p. 4. [YMBII11] Roberto Yus, Eduardo Mena, Jorge Bernad, Sergio Ilarri, and Arantza Illarramendi. “Location-Aware System Based on a Dynamic 3D Model to Help in Live Broadcasting of Sport Events”. In: 19th ACM International Conference on Multimedia (ACMMM 2011). ACM, 2011, pp. 1005–1008. [YMII13] Roberto Yus, Eduardo Mena, Sergio Ilarri, and Arantza Illarramendi. “SHERLOCK: A System for Location- Based Services in Wireless Environments Using Semantics”. In: 22nd International World Wide Web Conference (WWW 2013). ACM, 2013, pp. 301–304. [YMII14] Roberto Yus, Eduardo Mena, Sergio Ilarri, and Arantza Illarramendi. “SHERLOCK: Semantic Management of Location-Based Services in Wireless Environments”. In: Pervasive and Mobile Computing 15 (2014), pp. 87–99. [YMIIB15] Roberto Yus, Eduardo Mena, Sergio Ilarri, Arantza Illarramendi, and Jorge Bernad. “MultiCAMBA: A System for Selecting Camera Views in Live Broadcasting of Sport Events Using a Dynamic 3D Model”. In: Multimedia Tools and Applications 74.11 (2015), pp. 4059– 4090. [YMSB15] Roberto Yus, Eduardo Mena, and Enrique Solano-Bes. “Generic Rules for the Discovery of Subsumption Relationships based on Ontological Contexts”. In: 2015 IEEE/WIC/ACM International Conference on Web Intelligence (WI 2015). IEEE, 2015, pp. 309–312.
347 Bibliography [YP15] Roberto Yus and Primal Pappachan. “Are Apps Going Semantic? A Systematic Review of Semantic Mobile Applications”. In: 1st International Workshop on Mobile Deployment of Semantic Technologies (MoDeST 2015), co-located with the 14th International Semantic Web Conference (ISWC 2015), Bethlehem, PA (USA). Vol. 1506. CEUR-WS, 2015, pp. 2–13. [YPDFJM14] Roberto Yus, Primal Pappachan, Prajit Kumar Das, Tim Finin, Anupam Joshi, and Eduardo Mena. “Semantics for Privacy and Shared Context”. In: 2nd International Workshop on Society, Privacy and the Semantic Web - Policy and Technology (PrivOn 2014), co-located with the 13th International Semantic Web Conference (ISWC 2014). Vol. 1316. CEUR-WS, 2014. [YPDMJF14] Roberto Yus, Primal Pappachan, Prajit Kumar Das, Eduardo Mena, Anupam Joshi, and Tim Finin. “Face- Block: Privacy-Aware Pictures for Google Glass”. In: 12th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys 2014). 2014, pp. 366–366. [YYY13] Yakup Yildirim, Adnan Yazici, and Turgay Yilmaz. “Automatic Semantic Content Extraction in Videos Using a Fuzzy Ontology and Rule-Based Model”. In: IEEE Transactions on Knowledge and Data Engineering 25.1 (2013), pp. 47–61. [ZHXXGY07] Guangyu Zhu, Qingming Huang, Changsheng Xu, Liyuan Xing, Wen Gao, and Hongxun Yao. “Human Behavior Analysis for Highlight Ranking in Broadcast Racket Sports Video”. In: IEEE Transactions on Multimedia 9.6 (2007), pp. 1167–1182. [ZL01] Baihua Zheng and Dik Lun Lee. “Semantic Caching in Location-Dependent Query Processing”. In: 7th International Symposium on Advances in Spatial and Temporal Databases (SSTD 2001). Springer, 2001, pp. 97–116. [ZRCH08] Cha Zhang, Yong Rui, Jim Crawford, and Li-Wei He. “An Automated End-to-end Lecture Capture and Broadcasting System”. In: ACM Transactions on Multime-
Bibliography 348 dia Computing, Communications, and Applications 4.1 (2008), 6:1–6:23. [And] Android goes semantic! http: // sid. cps. unizar. es/ AndroidSemantic . [Dat] Data Never Sleeps. https: // www. domo. com/ blog/ 2014/ 04/ data-never-sleeps-2-0/ .