enabling knowledge-based complex event processing20 event-query pre-processing •the complex query...

26
AG Corporate Semantic Web Freie Universität Berlin http://www.inf.fu-berlin.de/groups/ag-csw/ Enabling Knowledge-Based Complex Event Processing Kia Teymourian Research Assistant at Free University Berlin http://www.teymourian.de VLDB 2011, Ph.D Workshop 29 Aug - Sep 3, 2011, Seattle

Upload: others

Post on 24-Jun-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

AG Corporate Semantic WebFreie Universität Berlin

http://www.inf.fu-berlin.de/groups/ag-csw/

Enabling Knowledge-Based Complex Event Processing

Kia TeymourianResearch Assistant at Free University Berlin

http://www.teymourian.de VLDB 2011, Ph.D Workshop

29 Aug - Sep 3, 2011, Seattle

Page 2: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

2

Outline

• Complex Event Processing (CEP)

• Why Semantics + CEP?

• Semantic CEP (SCEP)• Knowledge Representation for Events & Event Patterns • Real-Time Semantic Event Processing

Page 3: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

3

Events

• Anything that happens, or is contemplated as happening

• A Notification is a message that contains information about an event that has occurred.

• Content-based data and filter model:• Tuples• Structured records • Name/value pair (n, v) with name n and value v

• Samples:• {(type, StockQuote), (name, “Siemens”), (price,45)}

Page 4: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

4

Big Picture of Complex Event processing

Event

Producer

Event

Consumer

Event

Processing

Generate & publish

Consume and react on raw/complex

eventsperform operations on events

Page 5: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

5

CEP vs. Databases

?

Database

Database Queries

Query Processor

Incoming Events

Time

??

?

?

Processing moment of events

Futurepast

Event

Subscriptions

Page 6: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

6

Event Processing Methods

• Syntactic processing of low-level events

• Real-time processing

State Machines Petri Nets

Page 7: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

7

Keep the event data moving!

AG Corporate Semantic Webhttp://www.inf.fu-berlin.de/groups/ag-csw/

Event notifications in real time

Event Stream

Alarms, Actions

Storage

Permanent storage

Optional Query over the historical data of Events

Optional storage

Main memory

Event EngineLoad the event data very short time in main memory

Page 8: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

8

My Research Challenge

Semantic Complex Event Processing

(SCEP)

Page 9: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

9

Research Challenges

Three Main research questions:

1) Can we represent events and event patterns based on ontological background knowledge and use it for CEP?

- Relation to other non-event concepts, e.g. Situations, Actions, Actors, Processes, …

2) Is it enough to use Datalog as processing semantic?

3) Is it possible to process the events in timely manner and do inferencing on a background knowledge?

Page 10: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

10

Example – Semantic Event Processing

AG Corporate Semantic Webhttp://www.inf.fu-berlin.de/groups/ag-csw/

Event Stream {(Name, “OPEL”)(Preis, 45)(Volumen, 2000)}

{(Name, “SAP”)(Preis, 65)(Volumen, 1000)}

Query:Buy stocks of companies, who have in Europe production facilities andproduce products from iron andmore than 10,000 employees andare at the moment in reconstruction phase andtheir price/volume increased stable in the past 5 minutes.

{(OPEL, is_a, automobil_company),(automobil_company, build, Cars),

(Cars, are_build_from, Iron),(OPEL, hat_production_facilities_in, Germany),

(Germany, is_in, Europe)(OPEL, is_a, Major_corporation),

(Major_corporation, have, over_10,000_employees),(OPEL, is_in, reconstruction_phase)}

Knowledge Base

Page 11: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

11

Knowledge-based Event Processing

Knowledge Base

Events

Event Stream

ComplexEvents

Event Processing

Knowledge Base in OWL / Description Logic

T-BoxA-BoxA-Box Update

Stream

Page 12: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

12

Representation of Events and Event

Patterns

Page 13: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

13

Event Query Representation

• SQL – Like:• Esper , Event Processing Language http://esper.codehaus.org/ • XchangeEQ , (LMU, Munich) • Cayuga Event Language (CEL), Cornel University

• Declarate Language • Prolog• Drools Fusion , http://www.jboss.org/drools/drools-fusion.html • Rule Core, XML-based rule language http://rulecore.com • ETALIS http://code.google.com/p/etalis/ using Prolog• Prova http://www.prova.ws Prolog + Java + MAS

Page 14: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

14

Example: A Semantic Query Language

@prefix fin:<http://csw.fu-berlin.de/fin#>.

ACTION{ buy(?S1); }

STREAM{ e1:($S1, $P1, $V1), e2:($S2, $P2, $V2)

}WHERE{ (?X1, fin:company, $S1), (?X2, fin:company, $S2), (?X1, fin:produce, ?Z), (?Z, fin:buildfrom, mtr:metal), (?X1, fin:facilitiesin, geo:Europe), (?X1, fin:employees, 12,000), (?X1, fin:is_in, fin:reconstruction), (?X2, fin:oilconsume, 2.000.000),

}ON{ e2 AFTER e1 , ($P1 * $V1 >= 20000)}WITHIN{ 10 min }

Page 15: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

15

Complex Events vs. Situations

• What is a complex event?• An event that is an abstraction of other events called its

members (EPTS Glossary)• What is a Situation?

• Is the same as complex event? Or is the result of Complex Event.

• Situation calculus, Event calclus?

e1 e2

e3

e4e5

Time

S1CE1

CE2

Page 16: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

16

Event Processing Methods

Page 17: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

17

Semantic CEP Requirments

• General CEP Requirements:• Timely Processing (real time, near real time)• Scalability

• High throughput of events• Number of Processing Rules

• Special SCEP Requirements:• Scalability

• Size of background knowledge• Level of reasoning on KB• Frequency of KB updates

Page 18: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

18

Processing Methods

1)Storage-based2)Central rule engine3)Semantic Enrichment of Event Stream (SEES)4)Event Query Pre-Processing (EQPP)

Page 19: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

19

Semantic Enrichment of Event Stream

e1

Event Stream

e2e1

Knowledge Base

Derived Events

e1e2e1 e1e2e1

e3e2e1 e4e3Semantic Enrichment

Raw Events

Complex Events

Final Processing

Page 20: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

20

Event-Query Pre-Processing

• The complex query is pre-processed and rewritten in several simple queries.

• Simple query is a query which can be processed without the external KB

• New simple queries can be generated using the knowledge base.

Q ∪ KB q1 , q2 , q3, q4, ... →

• Simple queries can be in conjunction and disjunction

• Queries are processed by several Event Processing Agents

• Results are jointed together by EPAs

Page 21: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

21

Event Query Pre-Processing

Knowledge Base

Rewrite

Simple Queries

e1e2e1 q3q2q1

Event QueryPre-Processing

e1Event Stream

e2e1Raw Events

QComplex Query

Complex Events

Final Processingdistributed on a network of processing Agents

Event Processing Network

Page 22: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

22

Comparison of Methods

DB-Based Rule Engine SEES EQPP

Performance low high limited high

Scalability limited limited limited high

Elasticity no no high high

Reasoning on KB No/limited No/limited high high

Page 23: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

23

Future Work

• Representation of Event Patterns/event query

• Algorithms for rewriting complex event query

• Prove of concept implementation

• Evaluation

Page 24: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

24

Excluded, but related Subjects

• Noisy event stream

• Uncertain events stream

• Event pattern mining

Page 25: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

25

Thank You!

Please give me feedback!

I am here in Seattle until Sunday ...

Page 26: Enabling Knowledge-Based Complex Event Processing20 Event-Query Pre-Processing •The complex query is pre-processed and rewritten in several simple queries. •Simple query is a query

Thank you!http://www.corporate-semantic-web.de

AG Corporate Semantic WebFreie Universität Berlin

http://www.inf.fu-berlin.de/groups/ag-csw/