SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000Sapana Sha
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfSumit Kumar yadav
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINsankalpkumarsahoo174
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptxRajatChauhan518211
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPirithiRaju
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 

Dernier (20)

9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdf
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 

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