Presentation is loading. Please wait.

Presentation is loading. Please wait.

An infrastructure for context-awareness based on first order logic Ubiquitous Software Lab Oh Min Kyoung 2006-06-02.

Similar presentations


Presentation on theme: "An infrastructure for context-awareness based on first order logic Ubiquitous Software Lab Oh Min Kyoung 2006-06-02."— Presentation transcript:

1 An infrastructure for context-awareness based on first order logic Ubiquitous Software Lab Oh Min Kyoung 2006-06-02

2 Contents Context Model Protocols for obtaining context Context infrastructure Specify application

3 Context Model The basic structure - Context Predicate Operations on contexts What is the context of a smart space?

4 Context Model – Context Predicate Context Predicate First-order predicate Name of predicate is the type of context → Simple & uniform context representation Context-Type(,, ) Location(chris, entering, room3231) Temperature(room3231, “=“, 98F) Sister(venus, serena) StockQuote(msft, “>”, $60) PrinterStatus(srgalw1 printer queue, is, empty) Time(New York, “<“, 12:00 01/01/01)

5 Context Model – Context Predicate Structure of predicate : using ontology DAML+OIL Argument values are constrained by context type → type checking Location  1 st argument : “person” or “object”  2 nd argument : “entering” or “leaving” or “in”  3 rd argument : “location” No restriction on the types of argument values → argument can be complex structure 3 rd argument of Location  String representing the room  Complex structure containing x,y,z coordinates of the person

6 Context Model - Operations Boolean operations → construct complex context expressions Conjunction Location(Manuel, Entering, Room 3221) ∧ SocialActivity(Room 3221, Meeting) Disjunction EnvironmentLighting(Room 3234, Off) ∨ EnvironmentLighting(Room 3234, Dim) Negation NOT Location(Manuel, In, Room 3221) Quantifier Existential Quantifier (i.e. “there exists”) ∃ Location y Location(Chris, In y) Universal Quantifier (i.e. “for all”) ∀ People x Location(x, In, Room 3231)

7 Context Model - Operations Quantifier Evaluation Domain define : set of values (& sets is finite) → Evaluation of expressions with quantifier will always terminate Location set : all valid locations in our system  Room 3221, hallway … Stock set : all stock that system is interested in  IBM, MSFT, SUNW … Arguments can be function ∃ Person s Location(s, Entering, currentRoom()) Deriving new contexts from other contexts Sound(Room 3234, “>”, 40dB) ∧ Lighting(Room 3234, Stroboscopic) ∧ #People(Room 3234, “>”, 6) => SocialActivity(Room 3234, Party)

8 Context Model – Aggregate context Aggregate context of smart space → predicate expression set that are true in the smart space Context Provider Smart space has various sensors These sensors provide contextual information generate first order expressions that are true at that point of time are called Context Provider

9 Context Model – Aggregate context Set of true context expressions in a smart room at some point in time Location Context Provider Location(Manuel, In, Room 2401) Location(Chris, In, Room 2401) Location(Roy, Entering, Room 2401) RoomEnvironment Context Provider Temperature(Room 2401, =, 68) Lighting(Room 2401, Is, Dim) Applications Context Provider Application(PowerPoint, Is, Running) Application(MP3 Player, Is, Running) Activity Context Provider (deduction) Social Activity(Room 2401, Lecture)

10 Protocols Query-Answer protocol Subscribe-Notify protocol

11 Protocols for obtaining context Protocols Applications can use to obtain interesting context Using XML Query-Answer protocol To obtain and understand current context Similar to Prolog query Location(X, In, room 3231) Subscribe-Notify protocol To perform certain actions when context changes Using CORBA event mechanism Context Provider sends context event in its own event channel Context Consumers can listen on there channels

12 Context infrastructure Context Provider Context Consumer Context Provider Lookup Service Context History Context Synthesisers Rule-based synthesisers Synthesisers that learn

13 Context infrastructure

14 Context Provider Represent using a context expression Send context events on an event channel Provide query interface (Prolog syntax) Evaluation of queries is semi-decidable & safe Use XSB reasoning engine for evaluating Prolog queries Context Consumers (or Context-Aware Applications) Consume various types of contexts Adapt their behaviour depending on the current context

15 Context infrastructure Context Provider Lookup Service Search for different context providers Providers advertise context expressions it provides Consumers query context expression it needs Context history It is possible to store all context events using persistent event channels in a database along with a timestamp We use past context information to learn rules about user and application behaviour through data mining

16 Context infrastructure Context Synthesisers Infer higher-level contexts based on simpler contexts Context Provider & Context Consumer process  Get source context  Sort them  generate new context approach Using rules Using machine learning

17 Context infrastructure Rule-based synthesisers Have pre-defined rules for deducing higher-level context If multiple rules are active at the same time, resolve conflict using priority-based mechanism In such case, may deduce the wrong context No flexible & can’t adapt to changing circumstances Synthesisers that learn Use Na Bayes algorithm for predicting user mood  Train the learner using past context  ask user mood periodically  Find features  Predict the mood

18 Specify application Specifying context-sensitive behaviour for applications Optimizing context expression evaluation Initializing and updating the poset Resolving conflicts

19 Specify application Specifying context-sensitive behaviour for applications Make a configuration file Specify a certain method to be called at a certain context Each context is associated with a priority level Implements the methods

20 Specify application Optimizing context expression evaluation All rules have to be re-evaluated whenever context changes → O(n) time, inefficient Thus, develop mechanism to reduce evaluations whenever context changes Organize poset(partially ordered set) data structure If there are Exp1, Exp2 and Exp1 => Exp2, then Exp1 node is a child of Exp2 node If any node is false, then its descendents will also be false Traverse top-down Poset extends vertically allows greater optimization Poset extends horizontally allows less optimization

21 Specify application Initializing and updating the poset Initializing When application starts up, it queries Context Providers  get the initial set of true context expressions  traverse the poset  set some nodes to true  Invoke the methods associated with these true nodes Updating Application listen to the event channels When it receives any context update event, then it updates its poset And the application executes the methods of those nodes that just became true

22 Specify application Resolving conflicts Since multiple nodes can become true at the same time, there may be conflicts in actions Handle these conflict using priority-based mechanism Higher priority win If it’s same, randomly choose

23 Example : jukebox application


Download ppt "An infrastructure for context-awareness based on first order logic Ubiquitous Software Lab Oh Min Kyoung 2006-06-02."

Similar presentations


Ads by Google