LarKC Tutorial at ISWC 2009 - Urban Computing

827 views

Published on

The aim of the EU FP 7 Large-Scale Integrating Project LarKC is to develop the Large Knowledge Collider (LarKC, for short, pronounced “lark”), a platform for massive distributed incomplete reasoning that will remove the scalability barriers of currently existing reasoning systems for the Semantic Web. The LarKC platform is available at larkc.sourceforge.net. This talk, is part of a tutorial for early users of the LarKC platform, and describes a particular use case aimed at Urban Computing.

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
827
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
26
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Service-Finder
  • LarKC Tutorial at ISWC 2009 - Urban Computing

    1. 1. Understanding and Manipulating the Urban Computing workflows http://wiki.larkc.eu/UrbanComputing/ Daniele Dell’Aglio Emanuele Della Valle [email_address] [email_address] Joint work with: CEFRIEL: I. Celino, D.Dell’Aglio SALTLUX: K. Kim, S. Park VUA: Z. Huang SIEMENS: V.Tresp, Y. Huang, F. Steinke H. Werner
    2. 2. Context – Urban Computing [source IEEE Pervasive Computing,July-September 2007 (Vol. 6, No. 3) ] Terra Cognita Workshop, 26-10-2009 The integration of computing, sensing, and actuation technologies into everyday urban settings and lifestyles.
    3. 3. Context – Urban Data Availability <ul><li>Some years ago, due to the lack of data, Urban Computing looked like a Sci-Fi idea. </li></ul><ul><li>Nowadays, a large amount of the required information can be made available on the Internet at almost no cost. We are running a survey [1,2] and we have collected more than 50 sources of data: </li></ul><ul><ul><li>maps (Google,Yahoo!, Wikimapia, OpenStreetMap ), </li></ul></ul><ul><ul><li>events scheduled (Eventful, Upcoming…), </li></ul></ul><ul><ul><li>voluntarily-provided users location (Google Latitude), </li></ul></ul><ul><ul><li>multimedia data with information about location (Flickr…) </li></ul></ul><ul><ul><li>relevant places (schools, bus stops, airports...) </li></ul></ul><ul><ul><li>traffic information (accidents, problems of public transportation...) </li></ul></ul><ul><ul><li>city life (job ads, pollution, health care...) </li></ul></ul><ul><li>[1] http://wiki.larkc.eu/UrbanComputing/ShowUsABetterWay </li></ul><ul><li>[2] http://wiki.larkc.eu/UrbanComputing/OtherDataSources </li></ul>2nd Early Adopters Workshop, 25-10-2009
    4. 4. Sample Usage Scenario: Alpha Urban LarKC <ul><li>A user is in a (potentially unknown) city and would like to organize a day/night by visiting some places, meeting his friends, attending a music concert, etc. </li></ul><ul><li>He therefore needs to: </li></ul><ul><ul><li>Find interesting destinations </li></ul></ul><ul><ul><ul><li>Monuments or relevant places opened at the right time </li></ul></ul></ul><ul><ul><ul><li>People he knows who happen to be in the same city </li></ul></ul></ul><ul><ul><ul><li>Music or cultural events scheduled for that day </li></ul></ul></ul><ul><ul><li>Understand the most suitable way to reach them </li></ul></ul><ul><ul><ul><li>Shortest path or “sightseeing” path </li></ul></ul></ul><ul><ul><ul><li>Most suitable combination of transportation means (car, parking, subway, pedestrian) </li></ul></ul></ul><ul><li>To solve the problem today, the user would have to use multiple applications , manually check his requirements, manually passing intermediate results from a service to another one </li></ul>2nd Early Adopters Workshop, 25-10-2009
    5. 5. Alpha Urban LarKC challenges <ul><li>Integration of multiple distributed data sources </li></ul><ul><li>Overcoming data and system heterogeneity </li></ul><ul><li>Selection of the relevant subset of data to be processed (problem of scale ) </li></ul><ul><li>Dealing with real-time requirements </li></ul><ul><li>(Potentially) profilation and personalization of the service based on user preferences </li></ul><ul><li>… </li></ul>2nd Early Adopters Workshop, 25-10-2009
    6. 6. Alpha Urban LarKC at a glace Data Request Web Retrieved Data PROBLEM : Which Milano monuments or events can I quickly get to from here? Streets Monuments Events Data & Tools PLATFORM SPARQL query SPARQL result Live Demo of the client application: http://seip.cefriel.it/alpha-Urban-LarKC/ A demonstration video: http://seip.cefriel.it/alpha-Urban-LarKC/alpha-Urban-LarKC-demo.htm 2nd Early Adopters Workshop, 25-10-2009
    7. 7. Alpha Urban LarKC workflows <ul><li>The Alpha Urban LarKC is composed by 3 different workflows: </li></ul><ul><ul><li>monument destination selection workflow </li></ul></ul><ul><ul><li>event destination selection workflow </li></ul></ul><ul><ul><li>path finding workflow </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009 Data Request Web Retrieved Data PLATFORM SPARQL query SPARQL result Streets Events
    8. 8. Monument Destination Selection Worflow <ul><li>To select monuments in Milano: </li></ul><ul><ul><li>a Transformer analyzes the query to get the triple patterns to be passed to the Identifier </li></ul></ul><ul><ul><li>the Identifier queries Sindice to get relevant RDF documents </li></ul></ul><ul><ul><li>a Selector filters the documents to extract information about relevant monuments and </li></ul></ul><ul><ul><li>a Reasoner answers the query </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009
    9. 9. Alpha Urban LarKC workflows <ul><li>The alpha Urban LarKC is composed by 3 different workflows: </li></ul><ul><ul><li>monument destination selection workflow </li></ul></ul><ul><ul><li>event destination selection workflow </li></ul></ul><ul><ul><li>path finding workflow </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009 Data Request Web Retrieved Data PLATFORM SPARQL query SPARQL result Streets Events
    10. 10. Events retrieval <ul><li>Actually in the Web a big amount of information related to events of every kind is available: </li></ul><ul><ul><li>Music </li></ul></ul><ul><ul><li>Sport </li></ul></ul><ul><ul><li>Education </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><li>There are several Web 2.0 sites where communities contribute inserting and managing event notifications </li></ul><ul><li>In addition, these sites offer REST/SOAP services allowing interaction with applications and services </li></ul><ul><li>We tried to integrate these data sources in the Alpha Urban LarKC </li></ul>2nd Early Adopters Workshop, 25-10-2009
    11. 11. Events representation <ul><li>Every site uses a custom model to represent the events (usually described in the API documentation) and offers the information in XML and JSON formats </li></ul><ul><li>On the other side, the Semantic Web community has developed several vocabularies useful to represent events descriptions in RDF: </li></ul><ul><ul><li>RDF Calendar – an RDF representation of iCalendar </li></ul></ul><ul><ul><li>Talis Address schema – to represent information about locations (country, cities, postal codes...) </li></ul></ul><ul><ul><li>Geo – a vocabulary to express geo-location coordinates </li></ul></ul><ul><ul><li>SKOS – to represent the events categories </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009
    12. 12. Query: SPARQL query to get the events <ul><li>Using the vocabularies described above it’s possible to write a query to retrieve events. </li></ul><ul><ul><li>SELECT ?e ?s ?summary ?cat ?desc ?l ?lab ?lat ?lng </li></ul></ul><ul><ul><li>WHERE{ </li></ul></ul><ul><ul><li>?e rdf:type rdfcal:Vevent. ?e rdfcal:summary ?summary. ?e rdfcal:description ?desc. ?e skos:subject ?cat. ?e geo:location ?l. ?l addr:localityName “Washington&quot;. </li></ul></ul><ul><ul><li>?l rdfs:label ?lab. ?l geo:lat ?lat. ?l geo:long ?lng. ?e rdfcal:dtstart ?s . FILTER( </li></ul></ul><ul><ul><li>?s > xsd:dateTime(&quot;2009-10-25T00:00:00Z&quot;) && </li></ul></ul><ul><ul><li>?s < xsd:dateTime(&quot;2009-10-25T23:59:59Z&quot;)). </li></ul></ul><ul><ul><li>} </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009
    13. 13. Event Selection Workflow <ul><li>In order to retrieve events in LarKC we developed a workflow composed by: </li></ul><ul><ul><li>a query Transformer processes the input SPARQL query and extracts location and time information </li></ul></ul><ul><ul><li>an Identifier queries Eventful to get a list of events and passes the references to </li></ul></ul><ul><ul><li>a Transformer, which translates the REST service XML response in RDF </li></ul></ul><ul><ul><li>a Selector passes on all the triples to </li></ul></ul><ul><ul><li>a Reasoner, which answers the query </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009
    14. 14. SparqlToCityQuery Transformer (1/2) <ul><li>The query Transformer processes the input SPARQL query to extract the location and time information. </li></ul><ul><li>The time information (red part) is a temporal range and it is simply extracted from the FILTER constraints </li></ul><ul><li>Regarding the location information (blue part), in the query only the name of the city (and optionally the name of the country) is available. </li></ul><ul><ul><li>Using only the name some events could not be retrieved (“Milano” vs “Milan”). </li></ul></ul><ul><ul><li>It will be possible to obtain more complete and precise responses if city coordinates are used </li></ul></ul><ul><ul><li>To get the coordinates of a city the plug-in interacts with GeoNames Web service </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009 <ul><ul><li>Query: </li></ul></ul><ul><ul><li>... </li></ul></ul><ul><ul><li>?e geo:location ?l. ?l rdfs:label ?lab. ?l geo:lat ?lat. ?l geo:long ?lng. ?l addr:localityName “Washington D.C.&quot;. </li></ul></ul><ul><ul><li>?e rdfcal:dtstart ?s . FILTER(?s > xsd:dateTime(&quot;2009-10-25T00:00:00Z&quot;) && ?s < xsd:dateTime(&quot;2009-10-25T23:59:59Z&quot;)). </li></ul></ul><ul><ul><li>... </li></ul></ul>
    15. 15. SparqlToCityQuery Transformer (2/2) <ul><li>CODE INSPECTION </li></ul><ul><li>eu.larkc.plugin.transform.urbancomputing.ubl.SparqlToCityQueryTransformer (from row 120) </li></ul>2nd Early Adopters Workshop, 25-10-2009
    16. 16. Event Identifier (1/2) <ul><li>The Identifier receives the location and time information from the Transformer. </li></ul><ul><li>It uses this information to preparare an invokation for the Eventful REST service and to get the list of the events </li></ul><ul><li>Starting from this list, the plug-in build a set of XMLDocument objects containing: </li></ul><ul><ul><li>the link of the XML describing the event </li></ul></ul><ul><ul><li>a pointer to a XSLT file to perform the translation in RDF/XML </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009
    17. 17. Event Identifier (2/2) <ul><li>CODE INSPECTION </li></ul><ul><li>eu.larkc.plugin.identify.urbancomputing.ubl.EventIdentifier </li></ul><ul><li>(from row 95) </li></ul>2nd Early Adopters Workshop, 25-10-2009
    18. 18. XML2RDF Tranformer (1/2) <ul><li>The InformationSet Transformer receives a couple: <XML, XSLT> (contained in a XMLDocument object) </li></ul><ul><li>It loads the XML file from Eventful and the XSL file and it performs the XSLT transformation </li></ul><ul><li>The result is an RDF graph containing the event description </li></ul><ul><li>If two or more events are retrieved by the Event Identifier, the LarKC platform will invoke the XML2RDF Transformer several times (one for each XML document) </li></ul>2nd Early Adopters Workshop, 25-10-2009
    19. 19. XML2RDF Tranformer (2/2) <ul><li>CODE INSPECTION </li></ul><ul><li>eu.larkc.plugin.transform.urbancomputing.ubl.XML2RDFTransformer </li></ul><ul><li>(from row 73) </li></ul>2nd Early Adopters Workshop, 25-10-2009
    20. 20. Alpha Urban LarKC workflows <ul><li>The alpha Urban LarKC is composed by 3 different workflows: </li></ul><ul><ul><li>monument destination selection workflow </li></ul></ul><ul><ul><li>event destination selection workflow </li></ul></ul><ul><ul><li>path finding workflow </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009 Data Request Web Retrieved Data PLATFORM SPARQL query SPARQL result Streets Events
    21. 21. Input data: Street Topology in RDF <ul><li>Classes: </li></ul><ul><li>Node </li></ul><ul><li>Link </li></ul><ul><li>Properties (domain / range): </li></ul><ul><li>from (Link / Node) </li></ul><ul><li>to (Link / Node) </li></ul><ul><li>lat (Node / xsd:Float) </li></ul><ul><li>long (Node / xsd:Float) </li></ul><ul><li>linkWeight (Link / xsd:Float) </li></ul>A type Node. B type Node. D type Node. A lat 9.456. A long 45.123. l1 type Link. l1 from A. l1 to B. l1 linkWeight 3. l2 type Link. l2 from B. l2 to D. l2 linkWeight 5. Node definitions Link definitions l1 l3 l2 l4 l7 l8 l5 l6 A B C D E F 3m 2m 3m 5m 4m 6m 4m 4m 2nd Early Adopters Workshop, 25-10-2009 9.456 A B l1 l2 D 3 5 from from to to linkWeight linkWeight 45.123 lat long
    22. 22. Output data: path definition in RDF <ul><li>Classes: </li></ul><ul><li>Node </li></ul><ul><li>Link </li></ul><ul><li>Path </li></ul><ul><li>Properties (domain / range): </li></ul><ul><li>from (Link / Node) </li></ul><ul><li>to (Link / Node) </li></ul><ul><li>lat (Node / xsd:Float) </li></ul><ul><li>long (Node / xsd:Float) </li></ul><ul><li>linkWeight (Link / xsd:Float) </li></ul><ul><li>contain (Path / Link) </li></ul><ul><li>pathWeight (Path / xsd:Float) </li></ul><ul><li>pathFrom (Path / Node) </li></ul><ul><li>pathTo (Path / Node) </li></ul>The new schema: A B l1 l2 D 3 5 from from to to linkWeight linkWeight p 8 pathWeight pathFrom pathTo contain contain 9.456 45.123 lat long 2nd Early Adopters Workshop, 25-10-2009
    23. 23. Query: SPARQL query to get the path <ul><li>Having introduced the notion of Path and counting on a reasoner that can generate paths, the query can be expressed in plain SPARQL </li></ul><ul><ul><li>SELECT ?p ?w ?n1 ?l ?n2 </li></ul></ul><ul><ul><li>WHERE{ </li></ul></ul><ul><ul><li>?p rdf:type Path. </li></ul></ul><ul><ul><li>?p pathFrom <startingNode>. </li></ul></ul><ul><ul><li>?p pathTo <endingNode>. </li></ul></ul><ul><ul><li>?p contain ?l. </li></ul></ul><ul><ul><li>?l from ?n1. </li></ul></ul><ul><ul><li>?l to ?n2. </li></ul></ul><ul><ul><li>?p pathWeight ?w </li></ul></ul><ul><ul><li>} ORDER BY ?w </li></ul></ul><ul><li>Note : this is a simplification, the query should request also the coordinates of each node </li></ul>2nd Early Adopters Workshop, 25-10-2009
    24. 24. Alpha Urban LarKC Path Finding Workflow 1 <ul><li>Decider  AlphaUrbanLarkcDecider </li></ul><ul><li>Identifier  RemoteGraphLoaderIdentifier </li></ul><ul><li>Selecter  GrowingDatasetSelecter </li></ul><ul><li>Reasoner  OpResPathFinderReasoner </li></ul>2nd Early Adopters Workshop, 25-10-2009 Decider SPARQL Result SPARQL Query Local Plug-in Manager Identifier Plug-in API Local Plug-in Manager Selector Plug-in API Local Plug-in Manager Reasoner Plug-in API
    25. 25. Identifier strategy <ul><li>Selection of the whole graph (in this case the one of the Milano centre area) </li></ul><ul><li>Implemented in RemoteGraphLoaderIdentifier </li></ul>2nd Early Adopters Workshop, 25-10-2009
    26. 26. OpResPathFinder Reasoner (1/2) <ul><li>In order to process the most desirable path we choose to follow a Operational Research approach </li></ul><ul><ul><li>the Milano graph described in RDF is converted in a suitable form </li></ul></ul><ul><ul><li>Dijkstra’s algorithm is applied to find a path between the start and the goal node </li></ul></ul>2nd Early Adopters Workshop, 25-10-2009
    27. 27. OpResPathFinder Reasoner (2/2) <ul><li>CODE INSPECTION </li></ul><ul><li>eu.larkc.plugin.reason.urbancomputing.ubl. OpResPathFinderReasoner </li></ul><ul><li>(from row 85) </li></ul>2nd Early Adopters Workshop, 25-10-2009
    28. 28. Much more to come! Keep an eye on http://wiki.larkc.eu/UrbanComputing 2nd Early Adopters Workshop, 25-10-2009

    ×