Semantic Matching for Stream Reasoning
Total Page:16
File Type:pdf, Size:1020Kb
Institutionen f¨orDatavetenskap Department of Computer and Information Science Master's thesis Semantic Matching for Stream Reasoning by Zlatan Dragisic LIU-IDA/LITH-EX-A{11/041{SE 2011-10-03 ' $ & Link¨opingsuniversitet Link¨opingsuniversitet % SE-581 83 Link¨oping, Sweden 581 83 Link¨oping Institutionen f¨orDatavetenskap Department of Computer and Information Science Master's thesis Semantic Matching for Stream Reasoning by Zlatan Dragisic LIU-IDA/LITH-EX-A{11/041{SE 2011-10-03 Supervisor: Fredrik Heintz Department of Computer and Information Science KPLAB - Knowledge Processing Lab Examiner: Fredrik Heintz Department of Computer and Information Science KPLAB - Knowledge Processing Lab På svenska Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under en längre tid från publiceringsdatum under förutsättning att inga extra- ordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ick- ekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsmannens litterära eller konst- närliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se för- lagets hemsida http://www.ep.liu.se/ In English The publishers will keep this document online on the Internet - or its possible replacement - for a considerable time from the date of publication barring excep- tional circumstances. The online availability of the document implies a permanent permission for anyone to read, to download, to print out single copies for your own use and to use it unchanged for any non-commercial research and educational purpose. Sub- sequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional on the consent of the copyright owner. The pub- lisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be men- tioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its WWW home page: http://www.ep.liu.se/ © Zlatan Dragisic Abstract Autonomous system needs to do a great deal of reasoning during execu- tion in order to provide timely reactions to changes in their environment. Data needed for this reasoning process is often provided through a number of sensors. One approach for this kind of reasoning is evaluation of tem- poral logical formulas through progression. To evaluate these formulas it is necessary to provide relevant data for each symbol in a formula. Map- ping relevant data to symbols in a formula could be done manually, however as systems become more complex it is harder for a designer to explicitly state and maintain this mapping. Therefore, automatic support for map- ping data from sensors to symbols would make system more flexible and easier to maintain. DyKnow is a knowledge processing middleware which provides the sup- port for processing data on different levels of abstractions. The output from the processing components in DyKnow is in the form of streams of informa- tion. In the case of DyKnow, reasoning over incrementally available data is done by progressing metric temporal logical formulas. A logical formula contains a number of symbols whose values over time must be collected and synchronized in order to determine the truth value of the formula. Mapping symbols in formula to relevant streams is done manually in DyKnow. The purpose of this matching is for each variable to find one or more streams whose content matches the intended meaning of the variable. This thesis analyses and provides a solution to the process of semantic matching. The analysis is mostly focused on how the existing semantic technologies such as ontologies can be used in this process. The thesis also analyses how this process can be used for matching symbols in a formula to content of streams on distributed and heterogeneous platforms. Finally, the thesis presents an implementation in the Robot Operating System (ROS). The implementation is tested in two case studies which cover a scenario where there is only a single platform in a system and a scenario where there are multiple distributed heterogeneous platforms in a system. The conclusions are that the semantic matching represents an impor- tant step towards fully automatized semantic-based stream reasoning. Our solution also shows that semantic technologies are suitable for establishing machine-readable domain models. The use of these technologies made the iii iv semantic matching domain and platform independent as all domain and platform specific knowledge is specified in ontologies. Moreover, seman- tic technologies provide support for integration of data from heterogeneous sources which makes it possible for platforms to use streams from distributed sources. Contents List of Figures vii List of Tables ix 1 Introduction 1 1.1 Background . .1 1.2 Goal . .2 1.3 Thesis outline . .3 2 DyKnow 5 2.1 Overview . .5 2.2 Basic Concepts . .6 2.3 Architecture in ROS . .8 2.3.1 ROS . .8 2.3.2 ROS implementation . .9 2.4 DyKnow Federations . 11 2.4.1 Components . 12 2.5 Summary . 12 3 Semantic Technologies 15 3.1 Semantic Web . 15 3.2 RDF/RDFS . 16 3.2.1 Syntax . 17 3.3 Ontologies . 19 3.3.1 OWL . 20 3.3.2 Semantic mappings . 24 3.4 Summary . 27 4 Analysis 29 4.1 Semantic stream representation . 29 4.2 Matching symbols to topics . 34 4.3 Integrating data from multiple platforms . 39 4.4 Design . 40 4.5 Related work . 42 v vi CONTENTS 5 Implementation 47 5.1 Introduction . 47 5.2 Proposed solution . 47 5.3 Design . 48 5.4 Matching a formula to topics . 51 5.5 Multiple Platform Scenario . 53 5.6 Integration . 55 5.7 Summary . 57 6 Case studies 59 6.1 Single platform scenario . 59 6.2 Multiple platform scenario . 64 6.3 Discussion . 71 7 Performance evaluation 73 7.1 Test cases . 73 7.2 Test setup . 74 7.3 Results . 75 7.4 Conclusion . 83 8 Conclusion 85 8.1 Summary . 85 8.2 Future work . 86 Bibliography 89 A Acronyms 93 B Ontologies 95 B.1 RDF/XML representation of the ontology for platform 1 . 95 B.2 RDF/XML representation of the ontology for platform 2 . 101 B.3 RDF/XML representation of the ontology for platform 3 . 103 C Topic Specifications 107 C.1 XML representation of topic specifications for platform 1 . 107 C.2 XML representation of topic specifications for platform 2 . 108 C.3 XML representation of topic specifications for platform 3 . 108 List of Figures 2.1 An example of a ROS computation graph. .9 2.2 DyKnow architecture in ROS. 10 2.3 An overview of the components of a DyKnow federation [17]. 11 3.1 Visualization of the ontology for the single platform scenario. 22 3.2 Visualization of the ontology of platform 2. 23 3.3 Visualization of the ontology of platform 3. 24 4.1 Process of semantic matching. 34 4.2 DyKnow architecture in ROS. 41 5.1 Components in ROS implementation of DyKnow. 48 5.2 Multiple Platform scenario - example. 54 6.1 Visualization of the ontology for the single platform scenario. 60 6.2 Visualization of the ontology for platform 2. 65 6.3 Visualization of the ontology for platform 3. 65 7.1 Varying number of concepts. 76 7.2 Varying number of irrelevant individuals. 77 7.3 Varying number of relevant individuals. 78 7.4 Varying number of irrelevant topic specifications. 79 7.5 Varying number of relevant topic specifications. 80 7.6 Varying number of features in the formula. 81 7.7 Comparing quantified and non-quantified versions of a formula. 82 vii viii LIST OF FIGURES List of Tables 6.1 Unary relations and argument types. 60 6.2 Binary relations and argument types. 61 6.3 Ternary relation and argument types. 61 6.4 Unary relations and argument types for platform 2. 65 6.5 Unary relations and argument types for platform 3. 66 6.6 Binary relations and argument types for platform 3. 66 7.1 Varying number of concepts. 75 7.2 Varying number of irrelevant individuals. 76 7.3 Varying number of relevant individuals. 77 7.4 Varying number of irrelevant topic specifications. 78 7.5 Varying number of relevant topic specifications. 79 7.6 Varying number of features in a formula. 80 7.7 Comparing quantified and non-quantified versions of a formula. 82 ix x LIST OF TABLES Listings 3.1 Bridge rule in XML. 25 3.2 Bridge rules in XML. 26 4.1 A topic specifying the features Altitude and Speed for the sort UAV. 31 4.2 Formal grammar for SSLT .................... 31 4.3 Topic specifications in SSLT ................... 32 4.4 Topic specifications in SSLT ................... 33 4.5 DTD for the SSLT XML syntax. 35 4.6 Topic specifications in SSLT ................... 36 5.1 Possible topics for feature Behind[car1, car2]. 52 5.2 CreateGroundingService service and relevant messages. 55 5.3 State Processor service and relevant messages. 56 6.1 Topic specifications in SSLT ..................