SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
RSP-QL*: Querying Data-Level Annotations in
RDF Streams
Robin Keskisärkkä
April 17, 2019
Department of Computer and Information Science
Linköping University
Background
Semantic Web
• Linked Data
• Builds upon standardized web technologies including, e.g., RDF,
SPARQL, and OWL
• RDF Stream Processing
• A growing interest in processing streaming RDF data
• RSP W3C Community Group
1
RDF and SPARQL
Resource Description Framework (RDF)
An RDF triple is a tuple ⟨s, p, o⟩ ∈ (I ∪ B) × I × (I ∪ B ∪ L), where I
(IRIs), B (blank nodes), and L (literals) are pairwise disjoint sets. An
RDF graph is a set of RDF triples.
2
RDF: Example
<Jack> a <Person> .
<Jack> <knows> <Joe> .
<Joe> a <Person> .
<Joe> <knows> <jane> .
<Jane> a <Person> .
<Jack> <hasIncome> "High" .
<Jane> <hasIncome> "High" .
3
RDF: Named Graphs
A named RDF graph is a pair (n, G), where n is the graph name and G
is an RDF graph. An RDF dataset consists of a default graph and one
or more named graphs: D = {G0, (n1, G1), (n2, G2), ..., (ni, Gi)}
4
SPARQL
• SPARQL 1.1 is the standard query language for querying RDF data
• Provides an SQL-like syntax
• Based on basic graph patterns (BGPs), which are similar to
Turtle statements, but where the resources can be replaced by
variables. The pattern is then matched against the RDF graphs.
5
SPARQL: Example
PREFIX : <http://example.org#>
SELECT ?person
FROM <http://my/base/data>
FROM NAMED <http://my/namedgraph/>
WHERE {
?person a :Person .
GRAPH <http://my/namedgraph/> {
?person :knows :Jack .
}
}
6
RDF Stream Processing (RSP)
• Growing interest in processing and querying streaming RDF data
• Several RSP models have been proposed over the last decade
• CQELS
• C-SPARQL
• SPARQLstream
• ...
• Temporal windows over streams
• RSP-QL represents a community effort towards a
standardization of RDF stream semantics and the query model
and syntax1
1https://w3id.org/rsp
7
Statement-Level Metadata in RDF
Statement-Level Metadata in RDF
• We often need to attach some metadata to our data to capture
aspects such as:
• uncertainty, probability, errors, distribution parameters,
provenance information, descriptions, classifications, temporal
information, ...
• This can be managed on the statement level in RDF, but not in a
straightforward way
• For streaming scenarios, the representation needs to be efficient
8
Approaches
• Reification
• Singleton properties
• Named graphs
• Ontologies
9
Reification: RDF and SPARQL
_:s rdf:type rdf:Statement ;
rdf:subject :bob ;
rdf:predicate foaf:age ;
rdf:object 23 .
_:s dc:creator :crawler1 ;
dc:source <http://wiki/text.html> .
SELECT ?person ?age ?src
WHERE {
?person foaf:age ?age .
?s rdf:type rdf:Statement ;
rdf:subject ?person ;
rdf:predicate foaf:age ;
rdf:object ?age ;
dc:source ?src .
}
10
An alternative approach: RDF* and SPARQL*
An RDF* triple is recursively defined as follows:
• any RDF triple is an RDF* triple, and;
• a triple with an RDF* triple in the subject or object position is an
RDF* triple.
A BGP* extends the notion of BGPs by adding the possibility to
recursively nest triple patterns in the subject or object position.
11
An alternative approach: RDF* and SPARQL*
<<:bob foaf:age 23>> dc:creator :crawler1 ;
dc:source <http://wiki/text.html> .
SELECT ?person ?age ?src
WHERE {
<<?person foaf:age ?age>> dc:source ?src .
}
12
Property Graphs
http://tinkerpop.apache.org/docs/current/reference/
13
RDF* Streams and RSP-QL*
RDF* Streams
A timestamped RDF* graph TG∗
is an RDF* dataset that contains:
(i) exactly one named graph ⟨n, G∗
⟩, and
(ii) at least one regular RDF triple ⟨n, p, t⟩ in the default graph, where
p is a timestamp predicate and t is a timestamp.
14
RDF* Stream: Example of an element in a stream
_:g1 {
<<:bob foaf:age 23>> dc:creator :crawler1 ;
dc:source <http://wiki/text.html> .
} .
_:g1 prov:generatedAtTime "2019−04−17T09:10:01Z"^^xsd:dateTime .
15
RDF* Streams
An RDF* stream is defined as a potentially unbounded sequence of
timestamped RDF* graphs, which are ordered based on an
associated timestamp in non-decreasing time order.
S = ((t1, TG∗
1 ), (t2, TG∗
2 ), (t3, TG∗
3 ), ...), such that ti ≤ ti+1.
16
Windows over stream
A time-based window W is a function that returns a contiguous set
of temporal RDF* graphs from an RDF* stream S in a time interval
(l, u] such that: W(S, l, u) = {TG∗
| (t, TG∗
) ∈ S ∧ t ∈ (l, u]}.
A time-varying dataset TVD is a function that takes as input an RDF*
stream S, a window width α, a slide parameter β, a start time t0, for
and a time instant t, and returns a set of time-based window
TVD(S, l, u) such that u = max(t0 + α + β × n) < t | n ∈ N and
l = u − α.
17
Core Fragment of the Semantics of RSP-QL*
RSP-QL* patterns are defined recursively as follows2
):
1. Any BGP* is an RSP-QL* pattern.
2. If n ∈ (V ∪ I) and P is a RSP-QL* pattern, then (GRAPH n P) is an
RSP-QL* pattern.
3. If n ∈ (V ∪ I) and P is a RSP-QL* pattern, then (WINDOW n P) is
an RSP-QL* pattern.
4. If P1 and P2 are RSP-QL* pattern, then the expressions (P1 AND
P2), (P1 OPT P2), and (P1 UNION P2) are RSP-QL* patterns.
5. If P is a BGP* and R is an RSP-QL* built-in condition, then the
expression (P FILTER R) is a RSP-QL* pattern.
6. If tp is a triple* pattern and ?v is a variable, then (tp AS ?v) is an
RSP-QL* pattern.
2Pérez, J., Arenas, M. & Gutierrez, C. (2009). Semantics and Complexity of SPARQL. ACM
Trans. Database Syst., 34, 16:1–16:45. doi: 10.1145/1567274.1567278
18
Semantics of RSP-QL*
For every window w, we write D(w) to denote the dataset that is the
merge of all timestamped graphs in the window:
D(w) = (G, (n1, G1), ..., (ni, Gi)), assuming
w = {(G1, (n1, G′
1)), ..., (Gi, (ni, G′
i))} and G =
∪
(Gdef,(u,G′))∈w Gdef
19
Semantics of RSP-QL*
The evaluation of a pattern P over the dataset D and a set of named
windows W = {(u1, w1), ..., (un, wn))}, denoted by P D,W
G , can now be
defined as follows:
• If P is (WINDOW u P’) and (u, w) ∈ W, then
P D,W
G = P′ D′
,∅
G′ where D′
= D(w) and G′
is the default graph of
D′
• If P is (WINDOW ?x P’), then
P D,W
G =
∪
(u,w)∈W WINDOW u P’ D,W
G
20
RSP-QL*: Example
REGISTER STREAM <http://my/trusted/temp−stream>
SELECT ?room ?temp ?time ?src
FROM <http://my/base/data>
FROM NAMED WINDOW :w ON <http://temp−stream> [RANGE PT30S STEP PT5S]
WHERE {
?src a :ValidatedSource .
WINDOW :w {
GRAPH ?g {
<<:bob foaf:age ?age>> dc:source ?src .
}
?g prov:generatedAtTime ?time .
}
}
21
Summary
• Provides an efficient and easy-to-read alternative for
statement-level metadata
• Leverage the concepts introduced in RDF* and SPARQL* for
RSP-QL
• The semantics of RSP-QL can be extended to support RSP-QL* in
a straightforward way
22
Future Work
• Provide additional functionality on top of the RDF* model
(e.g., define operators for combining values under a specific
uncertainty model)
• Prototype based on RSP-QL* semantics
• Evaluation of performance
23

Mais conteúdo relacionado

Mais procurados

On the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingOn the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingPlanetData Network of Excellence
 
LarKC Tutorial at ISWC 2009 - Data Model
LarKC Tutorial at ISWC 2009 - Data ModelLarKC Tutorial at ISWC 2009 - Data Model
LarKC Tutorial at ISWC 2009 - Data ModelLarKC
 
CEDAR & PRELIDA Preservation of Linked Socio-Historical Data
CEDAR & PRELIDA Preservation of Linked Socio-Historical DataCEDAR & PRELIDA Preservation of Linked Socio-Historical Data
CEDAR & PRELIDA Preservation of Linked Socio-Historical DataPRELIDA Project
 
EKAW - Triple Pattern Fragments
EKAW - Triple Pattern FragmentsEKAW - Triple Pattern Fragments
EKAW - Triple Pattern FragmentsRuben Taelman
 
LDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data PlatformsLDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data PlatformsMohammad Noorani Bakerally
 
Datomic rtree-pres
Datomic rtree-presDatomic rtree-pres
Datomic rtree-presjsofra
 
Interactive Knowledge Discovery over Web of Data.
Interactive Knowledge Discovery over Web of Data.Interactive Knowledge Discovery over Web of Data.
Interactive Knowledge Discovery over Web of Data.Mehwish Alam
 
A Hierarchical approach towards Efficient and Expressive Stream Reasoning
A Hierarchical approach towards Efficient and Expressive Stream ReasoningA Hierarchical approach towards Efficient and Expressive Stream Reasoning
A Hierarchical approach towards Efficient and Expressive Stream ReasoningRiccardo Tommasini
 
Navigating and Exploring RDF Data using Formal Concept Analysis
Navigating and Exploring RDF Data using Formal Concept AnalysisNavigating and Exploring RDF Data using Formal Concept Analysis
Navigating and Exploring RDF Data using Formal Concept AnalysisMehwish Alam
 
Framester: A Wide Coverage Linguistic Linked Data Hub
Framester: A Wide Coverage Linguistic Linked Data HubFramester: A Wide Coverage Linguistic Linked Data Hub
Framester: A Wide Coverage Linguistic Linked Data HubMehwish Alam
 
R user-group-2011-09
R user-group-2011-09R user-group-2011-09
R user-group-2011-09Ted Dunning
 
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic RepresentationGetty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic RepresentationVladimir Alexiev, PhD, PMP
 
Heaven: A Framework for Systematic Comparative Research Approach for RSP Engines
Heaven: A Framework for Systematic Comparative Research Approach for RSP EnginesHeaven: A Framework for Systematic Comparative Research Approach for RSP Engines
Heaven: A Framework for Systematic Comparative Research Approach for RSP EnginesRiccardo Tommasini
 
ECO_TEXT_CLUSTERING
ECO_TEXT_CLUSTERINGECO_TEXT_CLUSTERING
ECO_TEXT_CLUSTERINGGeorge Simov
 
Incremental Export of Relational Database Contents into RDF Graphs
Incremental Export of Relational Database Contents into RDF GraphsIncremental Export of Relational Database Contents into RDF Graphs
Incremental Export of Relational Database Contents into RDF GraphsNikolaos Konstantinou
 
Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​
Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​
Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​Walaa Eldin Moustafa
 
R programming language: conceptual overview
R programming language: conceptual overviewR programming language: conceptual overview
R programming language: conceptual overviewMaxim Litvak
 
R Spatial Analysis using SP
R Spatial Analysis using SPR Spatial Analysis using SP
R Spatial Analysis using SPtjagger
 
Query Reranking As A Service
Query Reranking As A ServiceQuery Reranking As A Service
Query Reranking As A ServiceAbolfazl Asudeh
 

Mais procurados (20)

On the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingOn the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream Processing
 
LarKC Tutorial at ISWC 2009 - Data Model
LarKC Tutorial at ISWC 2009 - Data ModelLarKC Tutorial at ISWC 2009 - Data Model
LarKC Tutorial at ISWC 2009 - Data Model
 
CEDAR & PRELIDA Preservation of Linked Socio-Historical Data
CEDAR & PRELIDA Preservation of Linked Socio-Historical DataCEDAR & PRELIDA Preservation of Linked Socio-Historical Data
CEDAR & PRELIDA Preservation of Linked Socio-Historical Data
 
EKAW - Triple Pattern Fragments
EKAW - Triple Pattern FragmentsEKAW - Triple Pattern Fragments
EKAW - Triple Pattern Fragments
 
LDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data PlatformsLDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data Platforms
 
Datomic rtree-pres
Datomic rtree-presDatomic rtree-pres
Datomic rtree-pres
 
Interactive Knowledge Discovery over Web of Data.
Interactive Knowledge Discovery over Web of Data.Interactive Knowledge Discovery over Web of Data.
Interactive Knowledge Discovery over Web of Data.
 
A Hierarchical approach towards Efficient and Expressive Stream Reasoning
A Hierarchical approach towards Efficient and Expressive Stream ReasoningA Hierarchical approach towards Efficient and Expressive Stream Reasoning
A Hierarchical approach towards Efficient and Expressive Stream Reasoning
 
Navigating and Exploring RDF Data using Formal Concept Analysis
Navigating and Exploring RDF Data using Formal Concept AnalysisNavigating and Exploring RDF Data using Formal Concept Analysis
Navigating and Exploring RDF Data using Formal Concept Analysis
 
Framester: A Wide Coverage Linguistic Linked Data Hub
Framester: A Wide Coverage Linguistic Linked Data HubFramester: A Wide Coverage Linguistic Linked Data Hub
Framester: A Wide Coverage Linguistic Linked Data Hub
 
R user-group-2011-09
R user-group-2011-09R user-group-2011-09
R user-group-2011-09
 
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic RepresentationGetty Vocabulary Program LOD: Ontologies and Semantic Representation
Getty Vocabulary Program LOD: Ontologies and Semantic Representation
 
Heaven: A Framework for Systematic Comparative Research Approach for RSP Engines
Heaven: A Framework for Systematic Comparative Research Approach for RSP EnginesHeaven: A Framework for Systematic Comparative Research Approach for RSP Engines
Heaven: A Framework for Systematic Comparative Research Approach for RSP Engines
 
ECO_TEXT_CLUSTERING
ECO_TEXT_CLUSTERINGECO_TEXT_CLUSTERING
ECO_TEXT_CLUSTERING
 
Incremental Export of Relational Database Contents into RDF Graphs
Incremental Export of Relational Database Contents into RDF GraphsIncremental Export of Relational Database Contents into RDF Graphs
Incremental Export of Relational Database Contents into RDF Graphs
 
Efficient RDF Interchange (ERI) Format for RDF Data Streams
Efficient RDF Interchange (ERI) Format for RDF Data StreamsEfficient RDF Interchange (ERI) Format for RDF Data Streams
Efficient RDF Interchange (ERI) Format for RDF Data Streams
 
Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​
Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​
Coral & Transport UDFs: Building Blocks of a Postmodern Data Warehouse​
 
R programming language: conceptual overview
R programming language: conceptual overviewR programming language: conceptual overview
R programming language: conceptual overview
 
R Spatial Analysis using SP
R Spatial Analysis using SPR Spatial Analysis using SP
R Spatial Analysis using SP
 
Query Reranking As A Service
Query Reranking As A ServiceQuery Reranking As A Service
Query Reranking As A Service
 

Semelhante a RSP-QL*: Querying Data-Level Annotations in RDF Streams

RDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as KnowledgeRDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as KnowledgeNational Institute of Informatics
 
RDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as KnowledgeRDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as KnowledgeRathachai Chawuthai
 
Linked Data Notifications for RDF Streams
Linked Data Notifications for RDF StreamsLinked Data Notifications for RDF Streams
Linked Data Notifications for RDF StreamsJean-Paul Calbimonte
 
Inductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDFInductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDFJose Emilio Labra Gayo
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2Dimitris Kontokostas
 
Validating and Describing Linked Data Portals using RDF Shape Expressions
Validating and Describing Linked Data Portals using RDF Shape ExpressionsValidating and Describing Linked Data Portals using RDF Shape Expressions
Validating and Describing Linked Data Portals using RDF Shape ExpressionsJose Emilio Labra Gayo
 
Data translation with SPARQL 1.1
Data translation with SPARQL 1.1Data translation with SPARQL 1.1
Data translation with SPARQL 1.1andreas_schultz
 
Towards efficient processing of RDF data streams
Towards efficient processing of RDF data streamsTowards efficient processing of RDF data streams
Towards efficient processing of RDF data streamsAlejandro Llaves
 
Towards efficient processing of RDF data streams
Towards efficient processing of RDF data streamsTowards efficient processing of RDF data streams
Towards efficient processing of RDF data streamsAlejandro Llaves
 
RDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsRDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsJean-Paul Calbimonte
 
Extending lifespan with Hadoop and R
Extending lifespan with Hadoop and RExtending lifespan with Hadoop and R
Extending lifespan with Hadoop and RRadek Maciaszek
 
Transient and persistent RDF views over relational databases in the context o...
Transient and persistent RDF views over relational databases in the context o...Transient and persistent RDF views over relational databases in the context o...
Transient and persistent RDF views over relational databases in the context o...Nikolaos Konstantinou
 
Rdf data-model-and-storage
Rdf data-model-and-storageRdf data-model-and-storage
Rdf data-model-and-storage灿辉 葛
 
A Generic Language for Integrated RDF Mappings of Heterogeneous Data
A Generic Language for Integrated RDF Mappings of Heterogeneous DataA Generic Language for Integrated RDF Mappings of Heterogeneous Data
A Generic Language for Integrated RDF Mappings of Heterogeneous Dataandimou
 
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLModeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLKostis Kyzirakos
 
final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)Ankit Rathi
 
Rdf conjunctive query selectivity estimation
Rdf conjunctive query selectivity estimationRdf conjunctive query selectivity estimation
Rdf conjunctive query selectivity estimationINRIA-OAK
 
Stream processing: The Matrix Revolutions
Stream processing: The Matrix RevolutionsStream processing: The Matrix Revolutions
Stream processing: The Matrix RevolutionsRomanaPernischov
 

Semelhante a RSP-QL*: Querying Data-Level Annotations in RDF Streams (20)

RDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as KnowledgeRDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
 
RDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as KnowledgeRDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
RDF4U: RDF Graph Visualization by Interpreting Linked Data as Knowledge
 
Linked Data Notifications for RDF Streams
Linked Data Notifications for RDF StreamsLinked Data Notifications for RDF Streams
Linked Data Notifications for RDF Streams
 
Inductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDFInductive Triple Graphs: A purely functional approach to represent RDF
Inductive Triple Graphs: A purely functional approach to represent RDF
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
 
Validating and Describing Linked Data Portals using RDF Shape Expressions
Validating and Describing Linked Data Portals using RDF Shape ExpressionsValidating and Describing Linked Data Portals using RDF Shape Expressions
Validating and Describing Linked Data Portals using RDF Shape Expressions
 
Data translation with SPARQL 1.1
Data translation with SPARQL 1.1Data translation with SPARQL 1.1
Data translation with SPARQL 1.1
 
Towards efficient processing of RDF data streams
Towards efficient processing of RDF data streamsTowards efficient processing of RDF data streams
Towards efficient processing of RDF data streams
 
Towards efficient processing of RDF data streams
Towards efficient processing of RDF data streamsTowards efficient processing of RDF data streams
Towards efficient processing of RDF data streams
 
RDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsRDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of Semantics
 
Extending lifespan with Hadoop and R
Extending lifespan with Hadoop and RExtending lifespan with Hadoop and R
Extending lifespan with Hadoop and R
 
Optimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdfOptimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdf
 
Transient and persistent RDF views over relational databases in the context o...
Transient and persistent RDF views over relational databases in the context o...Transient and persistent RDF views over relational databases in the context o...
Transient and persistent RDF views over relational databases in the context o...
 
Rdf data-model-and-storage
Rdf data-model-and-storageRdf data-model-and-storage
Rdf data-model-and-storage
 
A Generic Language for Integrated RDF Mappings of Heterogeneous Data
A Generic Language for Integrated RDF Mappings of Heterogeneous DataA Generic Language for Integrated RDF Mappings of Heterogeneous Data
A Generic Language for Integrated RDF Mappings of Heterogeneous Data
 
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQLModeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
Modeling and Querying Metadata in the Semantic Sensor Web: stRDF and stSPARQL
 
Relational Databases_RDF Graphs_and_Constraints.pdf
Relational Databases_RDF Graphs_and_Constraints.pdfRelational Databases_RDF Graphs_and_Constraints.pdf
Relational Databases_RDF Graphs_and_Constraints.pdf
 
final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)
 
Rdf conjunctive query selectivity estimation
Rdf conjunctive query selectivity estimationRdf conjunctive query selectivity estimation
Rdf conjunctive query selectivity estimation
 
Stream processing: The Matrix Revolutions
Stream processing: The Matrix RevolutionsStream processing: The Matrix Revolutions
Stream processing: The Matrix Revolutions
 

Último

User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
Pests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPirithiRaju
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naJASISJULIANOELYNV
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPirithiRaju
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxJorenAcuavera1
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologycaarthichand2003
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 
Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)itwameryclare
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensorsonawaneprad
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationColumbia Weather Systems
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Último (20)

User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)
 
Pests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdfPests of Bengal gram_Identification_Dr.UPR.pdf
Pests of Bengal gram_Identification_Dr.UPR.pdf
 
FREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by naFREE NURSING BUNDLE FOR NURSES.PDF by na
FREE NURSING BUNDLE FOR NURSES.PDF by na
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
 
Topic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptxTopic 9- General Principles of International Law.pptx
Topic 9- General Principles of International Law.pptx
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
Davis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technologyDavis plaque method.pptx recombinant DNA technology
Davis plaque method.pptx recombinant DNA technology
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 
Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensor
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdf
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 

RSP-QL*: Querying Data-Level Annotations in RDF Streams

  • 1. RSP-QL*: Querying Data-Level Annotations in RDF Streams Robin Keskisärkkä April 17, 2019 Department of Computer and Information Science Linköping University
  • 3. Semantic Web • Linked Data • Builds upon standardized web technologies including, e.g., RDF, SPARQL, and OWL • RDF Stream Processing • A growing interest in processing streaming RDF data • RSP W3C Community Group 1
  • 5. Resource Description Framework (RDF) An RDF triple is a tuple ⟨s, p, o⟩ ∈ (I ∪ B) × I × (I ∪ B ∪ L), where I (IRIs), B (blank nodes), and L (literals) are pairwise disjoint sets. An RDF graph is a set of RDF triples. 2
  • 6. RDF: Example <Jack> a <Person> . <Jack> <knows> <Joe> . <Joe> a <Person> . <Joe> <knows> <jane> . <Jane> a <Person> . <Jack> <hasIncome> "High" . <Jane> <hasIncome> "High" . 3
  • 7. RDF: Named Graphs A named RDF graph is a pair (n, G), where n is the graph name and G is an RDF graph. An RDF dataset consists of a default graph and one or more named graphs: D = {G0, (n1, G1), (n2, G2), ..., (ni, Gi)} 4
  • 8. SPARQL • SPARQL 1.1 is the standard query language for querying RDF data • Provides an SQL-like syntax • Based on basic graph patterns (BGPs), which are similar to Turtle statements, but where the resources can be replaced by variables. The pattern is then matched against the RDF graphs. 5
  • 9. SPARQL: Example PREFIX : <http://example.org#> SELECT ?person FROM <http://my/base/data> FROM NAMED <http://my/namedgraph/> WHERE { ?person a :Person . GRAPH <http://my/namedgraph/> { ?person :knows :Jack . } } 6
  • 10. RDF Stream Processing (RSP) • Growing interest in processing and querying streaming RDF data • Several RSP models have been proposed over the last decade • CQELS • C-SPARQL • SPARQLstream • ... • Temporal windows over streams • RSP-QL represents a community effort towards a standardization of RDF stream semantics and the query model and syntax1 1https://w3id.org/rsp 7
  • 12. Statement-Level Metadata in RDF • We often need to attach some metadata to our data to capture aspects such as: • uncertainty, probability, errors, distribution parameters, provenance information, descriptions, classifications, temporal information, ... • This can be managed on the statement level in RDF, but not in a straightforward way • For streaming scenarios, the representation needs to be efficient 8
  • 13. Approaches • Reification • Singleton properties • Named graphs • Ontologies 9
  • 14. Reification: RDF and SPARQL _:s rdf:type rdf:Statement ; rdf:subject :bob ; rdf:predicate foaf:age ; rdf:object 23 . _:s dc:creator :crawler1 ; dc:source <http://wiki/text.html> . SELECT ?person ?age ?src WHERE { ?person foaf:age ?age . ?s rdf:type rdf:Statement ; rdf:subject ?person ; rdf:predicate foaf:age ; rdf:object ?age ; dc:source ?src . } 10
  • 15. An alternative approach: RDF* and SPARQL* An RDF* triple is recursively defined as follows: • any RDF triple is an RDF* triple, and; • a triple with an RDF* triple in the subject or object position is an RDF* triple. A BGP* extends the notion of BGPs by adding the possibility to recursively nest triple patterns in the subject or object position. 11
  • 16. An alternative approach: RDF* and SPARQL* <<:bob foaf:age 23>> dc:creator :crawler1 ; dc:source <http://wiki/text.html> . SELECT ?person ?age ?src WHERE { <<?person foaf:age ?age>> dc:source ?src . } 12
  • 18. RDF* Streams and RSP-QL*
  • 19. RDF* Streams A timestamped RDF* graph TG∗ is an RDF* dataset that contains: (i) exactly one named graph ⟨n, G∗ ⟩, and (ii) at least one regular RDF triple ⟨n, p, t⟩ in the default graph, where p is a timestamp predicate and t is a timestamp. 14
  • 20. RDF* Stream: Example of an element in a stream _:g1 { <<:bob foaf:age 23>> dc:creator :crawler1 ; dc:source <http://wiki/text.html> . } . _:g1 prov:generatedAtTime "2019−04−17T09:10:01Z"^^xsd:dateTime . 15
  • 21. RDF* Streams An RDF* stream is defined as a potentially unbounded sequence of timestamped RDF* graphs, which are ordered based on an associated timestamp in non-decreasing time order. S = ((t1, TG∗ 1 ), (t2, TG∗ 2 ), (t3, TG∗ 3 ), ...), such that ti ≤ ti+1. 16
  • 22. Windows over stream A time-based window W is a function that returns a contiguous set of temporal RDF* graphs from an RDF* stream S in a time interval (l, u] such that: W(S, l, u) = {TG∗ | (t, TG∗ ) ∈ S ∧ t ∈ (l, u]}. A time-varying dataset TVD is a function that takes as input an RDF* stream S, a window width α, a slide parameter β, a start time t0, for and a time instant t, and returns a set of time-based window TVD(S, l, u) such that u = max(t0 + α + β × n) < t | n ∈ N and l = u − α. 17
  • 23. Core Fragment of the Semantics of RSP-QL* RSP-QL* patterns are defined recursively as follows2 ): 1. Any BGP* is an RSP-QL* pattern. 2. If n ∈ (V ∪ I) and P is a RSP-QL* pattern, then (GRAPH n P) is an RSP-QL* pattern. 3. If n ∈ (V ∪ I) and P is a RSP-QL* pattern, then (WINDOW n P) is an RSP-QL* pattern. 4. If P1 and P2 are RSP-QL* pattern, then the expressions (P1 AND P2), (P1 OPT P2), and (P1 UNION P2) are RSP-QL* patterns. 5. If P is a BGP* and R is an RSP-QL* built-in condition, then the expression (P FILTER R) is a RSP-QL* pattern. 6. If tp is a triple* pattern and ?v is a variable, then (tp AS ?v) is an RSP-QL* pattern. 2Pérez, J., Arenas, M. & Gutierrez, C. (2009). Semantics and Complexity of SPARQL. ACM Trans. Database Syst., 34, 16:1–16:45. doi: 10.1145/1567274.1567278 18
  • 24. Semantics of RSP-QL* For every window w, we write D(w) to denote the dataset that is the merge of all timestamped graphs in the window: D(w) = (G, (n1, G1), ..., (ni, Gi)), assuming w = {(G1, (n1, G′ 1)), ..., (Gi, (ni, G′ i))} and G = ∪ (Gdef,(u,G′))∈w Gdef 19
  • 25. Semantics of RSP-QL* The evaluation of a pattern P over the dataset D and a set of named windows W = {(u1, w1), ..., (un, wn))}, denoted by P D,W G , can now be defined as follows: • If P is (WINDOW u P’) and (u, w) ∈ W, then P D,W G = P′ D′ ,∅ G′ where D′ = D(w) and G′ is the default graph of D′ • If P is (WINDOW ?x P’), then P D,W G = ∪ (u,w)∈W WINDOW u P’ D,W G 20
  • 26. RSP-QL*: Example REGISTER STREAM <http://my/trusted/temp−stream> SELECT ?room ?temp ?time ?src FROM <http://my/base/data> FROM NAMED WINDOW :w ON <http://temp−stream> [RANGE PT30S STEP PT5S] WHERE { ?src a :ValidatedSource . WINDOW :w { GRAPH ?g { <<:bob foaf:age ?age>> dc:source ?src . } ?g prov:generatedAtTime ?time . } } 21
  • 27. Summary • Provides an efficient and easy-to-read alternative for statement-level metadata • Leverage the concepts introduced in RDF* and SPARQL* for RSP-QL • The semantics of RSP-QL can be extended to support RSP-QL* in a straightforward way 22
  • 28. Future Work • Provide additional functionality on top of the RDF* model (e.g., define operators for combining values under a specific uncertainty model) • Prototype based on RSP-QL* semantics • Evaluation of performance 23