OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

24
Event-Driven Rule-Based Reasoning using EYE Ben De Meester Dörthe Arndt, Pieter Bonte, Jabran Bhatti, Wim Dereuddre, Ruben Verborgh, Femke Ongenae, Filip De Turck, Erik Mannens, and Rik Van de Walle University Ghent – iMinds – Multimedia Lab [email protected] | @Ben__DM http://ceur-ws.org/Vol-1488/paper-08.pdf OrdRing2015@ISWC | October 11 th 2015 | Bethlehem, PA

Transcript of OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Page 1: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Event-Driven Rule-Based Reasoning using EYE

Ben De MeesterDörthe Arndt, Pieter Bonte, Jabran Bhatti,

Wim Dereuddre, Ruben Verborgh, Femke Ongenae, Filip De Turck, Erik Mannens, and Rik Van de Walle

University Ghent – iMinds – Multimedia [email protected] | @Ben__DM

http://ceur-ws.org/Vol-1488/paper-08.pdf

OrdRing2015@ISWC | October 11th 2015 | Bethlehem, PA

Page 2: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

We present

A nurse call system via reasoning.

Why via (rule) reasoning?

How is it done?

Where are we now?

Page 3: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

eHealth Scenario1. Call launched – select nurse + update call2. Call Redirect – select different nurse3. Call Temp. Accept – Update Call Status4. Corridor – Location update5. Patient location – update location, turn on lights and update nurse6. Presence on – update call, turn on lights & update nurse status7. Presence off – update call, turn off lights & update nurse status7. Presence off – update call, turn off lights & update nurse status8. Corridor – update location, turn off lights & update nurse status

Page 4: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

A Nurse call system

Hospital, finding the most suitable nurse.

Most suitable?Trust relationshipCompetencesLocationStatus

ACCIOHealthcare ontology (DL)

Page 5: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

How complex?

Assigning the ‘correct’ nurse can be complex

Page 6: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

This complex

Page 7: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Filters in sequenceCorrect competences

Decisions in sequenceBeing closer and with a patient is more important than being far away and free

ConfigurabilityEvery hospital is different

So, you want to assign a nurse?

Page 8: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Needs

Event-basedNurses move, calls get made, …

StatefulKeep current states of the nurses

Scalable1 – 50 wards

ExpressiveDL-ontology + complex decision trees

Page 9: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Reasoning techniques

OWL DL-reasoning + SPARQLCon: Bad performance (e.g., location calculation for SPARQL)

Stream reasoningCon: not enough expressitivity

OWL-RL + rule reasoningCon: Not DL (but not necessary for this use case)Pro: easy mapping from decision treesPro: all rules are executed at oncePro: one system for everything

Page 10: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

N3

{ this } => { that }

Turtle superset

Very expressivethat can be rulesbuilt-ins (e.g. time predicates)Datalog is not expressive enoughForward and backward reasoning

Page 11: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

EYE Reasoner

Performant

PrologEYE supports all built-in Prolog predicates

Rule reasoning

File-based

Page 12: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Use case analysis

Small portion dynamic dataSplit up static from dynamic

State changes can introduce conflictProgrammatic update

Page 13: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Split up dynamic data

StaticHospital layout (rooms, wards, logistics)OntologiesRules

DynamicNurse’s stateNurse’s locationActive calls

Static Dynamic

Page 14: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Programmatic update

Nurse Erik goes from the hallway to room 1event::nurseErik accio:location :room1

knowledge base:nurseErik accio:location :hallway

Erik cannot be in two places at the same timeTimestamps are expensive

Fixed set of predicates

Page 15: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Architecture

Initializer

Decider

PostUpdater

PreUpdater

EventHandler

Page 16: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Architecture

Initializer (0)

(1) (6)

(2)

(3)

(4)

(5)

Decider

PostUpdater

PreUpdater

EventHandler

Page 17: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Performance improvements for EYE?

Preload the static data

Room location is known before, and doesn’t change

Nurse competences don’t change very day

Multiple parallel reasoning instances

Page 18: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Performance?

0 5 10 15 20 25 30 35 40 45 500

1000200030004000500060007000

Splitting / 1 EYE Splitting / 4 EYEsNo splitting / 1 EYE No splitting / 4 EYEs

#wards

Exec

ution

Tim

e (m

s)

Page 19: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Preloading improves IO

Preloading / 1 EYE

No preloading / 1 EYE

Preloading / 4 EYEs

No preloading / 4 EYEs

0

500

1000

1500

2000

2500

reasoning reasoningIO

Reas

onin

g tim

e (m

s), 5

0 w

ards

Page 20: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

More consistent reasoning time with multiple parallel instances

0 15 15 40 50 50 65 65 65 900

5

10

15

20

25

30

1 EYE 4 EYEs

Time incoming event (s)

Exec

ution

Tim

e (s

)

Page 21: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Performance?

0 5 10 15 20 25 30 35 40 45 500

1000200030004000500060007000

Preloading / 1 EYE Preloading / 4 EYEsNo preloading / 1 EYE No preloading / 4 EYEs

#wards

Exec

ution

Tim

e (m

s)

Page 22: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Future performance?

0 5 10 15 20 25 30 35 40 45 500

100200300400500600700800900

Preloading / 4 EYEs

#wards

Reas

onin

g Ti

me

(ms)

Page 23: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

Conclusions

Expressiveness comes at a cost…

But current system works for the current use case.

File-based reasoning is a bottleneck.next: in-memory reasoning

Page 24: OrdRing2015 - Event-Driven Rule-based Reasoning using EYE

http://ceur-ws.org/Vol-1488/paper-08.pdf

Our project

ORCA

Our pilot project partners: