An Engine for Ontology-Based Stream Processing Theory and - - PowerPoint PPT Presentation

an engine for ontology based stream processing
SMART_READER_LITE
LIVE PREVIEW

An Engine for Ontology-Based Stream Processing Theory and - - PowerPoint PPT Presentation

An Engine for Ontology-Based Stream Processing Theory and Implementation Christian Neuenstadt 6. Februar 2018 Lbeck Motivation STARQL Transformation Evaluation Motivation - Use Case C. Neuenstadt An Engine for Ontology-Based Stream


slide-1
SLIDE 1

An Engine for Ontology-Based Stream Processing

Theory and Implementation Christian Neuenstadt

  • 6. Februar 2018

Lübeck

slide-2
SLIDE 2

Motivation STARQL Transformation Evaluation

Motivation - Use Case

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 2/ 30

slide-3
SLIDE 3

Motivation STARQL Transformation Evaluation

Query Answering

SPARQL

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 3/ 30

slide-4
SLIDE 4

Motivation STARQL Transformation Evaluation

Query Transformation

From SPARQL to SQL

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 4/ 30

slide-5
SLIDE 5

Motivation STARQL Transformation Evaluation

Query Transformation

From SPARQL to SQL

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 5/ 30

slide-6
SLIDE 6

Motivation STARQL Transformation Evaluation

Query Transformation

From SPARQL to SQL

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 6/ 30

slide-7
SLIDE 7

Transformation of Temporal Queries

Ontology-Based Stream Processing

slide-8
SLIDE 8

Motivation STARQL Transformation Evaluation

The Idea of STARQL

[S]treaming and [T]emporal ontology [A]ccess with a [R]easoning-based [Q]uery [L]anguage

  • We have developed a new query language for ontology-based streams

1) Uses temporal operators on state sequences 2) Adopts current ontology standards 3) Evaluates multiple streams

  • We have implemented a query transformation strategy
  • We execute transformed STARQL queries in modern database environments
  • DBMS for historic data
  • DSMS for live streams
  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 8/ 30

slide-9
SLIDE 9

Motivation STARQL Transformation Evaluation

A static graph pattern

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 9/ 30

slide-10
SLIDE 10

Motivation STARQL Transformation Evaluation

A temporal graph pattern

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 10/ 30

slide-11
SLIDE 11

Motivation STARQL Transformation Evaluation

Graph pattern and streaming data

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 11/ 30

slide-12
SLIDE 12

Motivation STARQL Transformation Evaluation

Graph pattern and streaming data

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 12/ 30

slide-13
SLIDE 13

Motivation STARQL Transformation Evaluation

Graph pattern and streaming data

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 13/ 30

slide-14
SLIDE 14

Motivation STARQL Transformation Evaluation

Graph pattern and streaming data

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 14/ 30

slide-15
SLIDE 15

Motivation STARQL Transformation Evaluation

From temporal graphs to temporal states

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 15/ 30

slide-16
SLIDE 16

Motivation STARQL Transformation Evaluation

From temporal graphs to temporal states

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 16/ 30

slide-17
SLIDE 17

Motivation STARQL Transformation Evaluation

A window operator

SMsmt[NOW − 3s, NOW] → 1s

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 17/ 30

slide-18
SLIDE 18

Motivation STARQL Transformation Evaluation

A window operator

SMsmt[NOW − 3s, NOW] → 1s

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 18/ 30

slide-19
SLIDE 19

Motivation STARQL Transformation Evaluation

A window operator

SMsmt[NOW − 3s, NOW] → 1s

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 19/ 30

slide-20
SLIDE 20

Motivation STARQL Transformation Evaluation

STARQL Example 1 - Threshold

∃i, x(R1(x, i) ∧ x > 93)

Example

1

SELECT ?x

2

FROM S_Msmt [NOW-3s, NOW]-> 1s

3

WHERE { :tempSensor :mountedAt :GasTurbine }

4

HAVING EXISTS ?i IN (GRAPH ?i { :tempSensor :hasVal ?x }

5

AND ?x > 93)

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 20/ 30

slide-21
SLIDE 21

Motivation STARQL Transformation Evaluation

STARQL Example 2 - Monotonic Increase

∀i, j, x, y(R1(sens, x, i) ∧ R2(sens, y, j) ∧ i < j → x ≤ y))

Example

1

CONSTRUCT GRAPH NOW {:tempSensor rdf:type MonInc }

2

FROM S_Msmt [NOW-3s, NOW]-> 1s

3

WHERE { :tempSensor :mountedAt :GasTurbine }

4

HAVING FORALL ?i, ?j, ?x, ?y IN (

5

IF GRAPH ?i { :tempSensor :hasVal ?x }

6

AND GRAPH ?j { :tempSensor :hasVal ?y }

7

AND ?i < ?j

8

THEN ?x <= ?y )

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 21/ 30

slide-22
SLIDE 22

Motivation STARQL Transformation Evaluation

Transformation of temporal Graph Patterns with STARQL

Static mapping example ?sens :type :Sensor ← SELECT SensorName AS ?sens FROM Sensors (1) Time based mapping example GRAPH i { ?sens hasVal ?y } ← SELECT sId as ?sens, val as ?y FROM Slice(Measurement,i,r,sl,st). (2) i: index of the specifjc temporal state r: range of the window operator sl: slide parameter of the window operator st: sequencing strategy of the sequence generator

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 22/ 30

slide-23
SLIDE 23

Schematic Transformation of STARQL queries

slide-24
SLIDE 24

Motivation STARQL Transformation Evaluation

Comparison of implemented backend examples

PostgreSQL PipelineDB Exareme Spark Live Streams No Yes Yes Yes Static Data Yes Yes Yes Yes Historic Streams Yes No Yes Yes API JDBC JDBC REST API REST API / built in “Semantic access to streaming and static data at Siemens” Journal of Web Semantics 2017 “Towards Analytics Aware Ontology Based Access to Static and Streaming Data” ISWC 2016 “OBDA for Temporal Querying and Streams” HiDeSt@KI 2015 “A Stream-Temporal Query Language for Ontology Based Data Access” DL 2014 / KI 2014

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 24/ 30

slide-25
SLIDE 25

Motivation STARQL Transformation Evaluation

Comparison of implemented backend examples

PostgreSQL PipelineDB Exareme Spark Live Streams No Yes Yes Yes Static Data Yes Yes Yes Yes Historic Streams Yes No Yes Yes API JDBC JDBC REST API REST API / built in

“Semantic access to streaming and static data at Siemens” Journal of Web Semantics 2017 “Towards Analytics Aware Ontology Based Access to Static and Streaming Data” ISWC 2016 “OBDA for Temporal Querying and Streams” HiDeSt@KI 2015 “A Stream-Temporal Query Language for Ontology Based Data Access” DL 2014 / KI 2014

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 25/ 30

slide-26
SLIDE 26

Motivation STARQL Transformation Evaluation

Comparison of implemented backend examples

PostgreSQL PipelineDB Exareme Spark Live Streams No Yes Yes Yes Static Data Yes Yes Yes Yes Historic Streams Yes No Yes Yes API JDBC JDBC REST API REST API / built in “Semantic access to streaming and static data at Siemens” Journal of Web Semantics 2017 “Towards Analytics Aware Ontology Based Access to Static and Streaming Data” ISWC 2016 “OBDA for Temporal Querying and Streams” HiDeSt@KI 2015 “A Stream-Temporal Query Language for Ontology Based Data Access” DL 2014 / KI 2014

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 26/ 30

slide-27
SLIDE 27

Motivation STARQL Transformation Evaluation

Comparison of implemented backend examples

PostgreSQL PipelineDB Exareme Spark Live Streams No Yes Yes Yes Static Data Yes Yes Yes Yes Historic Streams Yes No Yes Yes API JDBC JDBC REST API REST API / built in “Semantic access to streaming and static data at Siemens” Journal of Web Semantics 2017 “Towards Analytics Aware Ontology Based Access to Static and Streaming Data” ISWC 2016 “OBDA for Temporal Querying and Streams” HiDeSt@KI 2015 “A Stream-Temporal Query Language for Ontology Based Data Access” DL 2014 / KI 2014

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 27/ 30

slide-28
SLIDE 28

Motivation STARQL Transformation Evaluation

Experimental Evaluation

Prototypical Implementation

Experiment 1: PostgreSQL / Spark (Historic Data)

  • Threshold and MonInc query executed on difgerent data volumns
  • Time scales for larger dataset with INTRAstate comparison
  • But INTERstate comparisons are expensive!!

Experiment 2: Multi Core Evaluation

  • Prototypical implementation per window execution based on pl/pgSQL
  • Reduces data set per execution dramatically for interstate queries
  • Scales by number of cores
  • Overhead for each window execution is not applicable to Spark
  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 28/ 30

slide-29
SLIDE 29

Motivation STARQL Transformation Evaluation

Related Work

SRBenchmark Evaluation Language SPARQLStream C-SPARQL CQELS STARQL Supported queries 17 17 11 11 Missing functionalities of STARQL are: ASK queries(1) and Property Paths(6) Overall comparison Query Language:

  • All other three languages handle incoming triples as one graph per window.
  • Only C-SPARQL accesses timestamps or temporal ordering directly

Transformation:

  • Only SPARQLstream and STARQL can be transformed to relational algebra
  • C-SPARQL / CQELS use their own execution environment
  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 29/ 30

slide-30
SLIDE 30

Motivation STARQL Transformation Evaluation

Summary/Outlook

  • We have shown how we can query intra/inter state-based temporal sequences

with temporal analytics in a new query language with syntax and semantics.

  • We defjned a new extended query transformation strategy that allows for an

execution on relational DB and streaming systems.

  • We executed the transformed queries on large volumns of batch and streamed

data successfully and showed their scalability regarding distributed window execution.

  • Future extensions:

1) Extend temporal operators and aggregation functions 2) Optimize window execution on backend systems 3) Extend ontology language

  • C. Neuenstadt

An Engine for Ontology-Based Stream Processing 30/ 30