Top Banner
Context Modeling Chris Anagnostopoulos, Athens, summer 2004
21

Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Jan 02, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context ModelingContext Modeling

Chris Anagnostopoulos, Athens, summer 2004Chris Anagnostopoulos, Athens, summer 2004

Page 2: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context is any information that can be used to characterize the situation of an entity.An entity is a person, place or object that is considered relevant to the interaction between an user and an application, including the user and applications themselves.

Context is any information that can be used to characterize the situation of an entity.An entity is a person, place or object that is considered relevant to the interaction between an user and an application, including the user and applications themselves.

Set of situations, which describe humans, applications, and environment related to specific activities.Set of situations, which describe humans, applications, and environment related to specific activities.

Any result derived from the activity of an entity, the environment into which an entity is active, the future and historical actions of an entity.

«Contextual Entity» A physical person (user), a computantional object (QoS), an application (Location Based Service), an abstract concept (movement,activity)

«Observable» Something that we are interested in retrieving its state

Any result derived from the activity of an entity, the environment into which an entity is active, the future and historical actions of an entity.

«Contextual Entity» A physical person (user), a computantional object (QoS), an application (Location Based Service), an abstract concept (movement,activity)

«Observable» Something that we are interested in retrieving its state

relations of interest entities of interest context of interestrelations of interest entities of interest context of interest

Page 3: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Contextualentity

Context0..*

Observable“trace”1..*

aggregatorelement element of interest

Relation“view interested”

participant related Element

0..* 0..*

1 n

Page 4: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context-Based Constraint Language :: Technische Universität Berlin

Entity is viewed as Element. The context of an element can be expressed as metadata. Use of context property and context value semantic.Extension of the OCL.Textual Syntax (Backus-Naur Form)::

DirectConPropValues::=ContextPropertyName [‘(’Element-Name’)’] ‘:’ContextPropertyValue {‘,’ ContextPropertyValue}

«ContextProperty» 2-tupel (cp,VVcp): cp CP is the set of contextual properties cp, VVcp set of valid values for one cp. Multiple values u1..n VVcp can be directly associated with one element e E via the dierctvalues mapping: directvaluescp: E PVVcp, {context retrieval} the subset of cp’s valid values VVcp is the power set PVVcp

e.g. UML syntax:

Textual syntax:

context retrieval:

Context-Based Constraint Language :: Technische Universität Berlin

Entity is viewed as Element. The context of an element can be expressed as metadata. Use of context property and context value semantic.Extension of the OCL.Textual Syntax (Backus-Naur Form)::

DirectConPropValues::=ContextPropertyName [‘(’Element-Name’)’] ‘:’ContextPropertyValue {‘,’ ContextPropertyValue}

«ContextProperty» 2-tupel (cp,VVcp): cp CP is the set of contextual properties cp, VVcp set of valid values for one cp. Multiple values u1..n VVcp can be directly associated with one element e E via the dierctvalues mapping: directvaluescp: E PVVcp, {context retrieval} the subset of cp’s valid values VVcp is the power set PVVcp

e.g. UML syntax:

Textual syntax:

context retrieval:

ContractManagement

Workflow:Delete,Create,Integrate

Workflow(ContractManagement):’Integrate’,’Delete’

directvaluesWorkflow(ContractManagement)={‘Integrate’,‘Delete’}

Page 5: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context-Based Constraint Language :: Technische Universität Berlin

«DerivedContextProperty » 2-tupel (dcp,VVdcp): cp CP is the set of contextual properties cp, DCP CP, dcp DCP. If the value of the derived context property dcp is associated with the element e E then the element that belongs to e derive e’s values of dcp automatically due to a belongs-to relation. This is not applicable to composite elements. One ek belongs to another el, kl, then the context property values associated with el also apply to ek:

The dcp values associated with the el are derived to ek via the belongs-to relation:

belongs ExE : (ek,el) belongs or ek belongs el

then: ek derives the values of the dcp properties of the el. The context retrieval is thenthe mapping:

derivedvaluesdcp(e) = derivedvaluesdcp(ei) directvaluesdcp(ei)when ei: e ei

Activity(person): ‘searching’,‘navigating’ Activity(device) : ‘idle’,‘downloading’lbs belongs person, lbs belongs devicederivedvaluesActivity (lbs)= {‘navigating’ , ‘downloading’}

Context-Based Constraint Language :: Technische Universität Berlin

«DerivedContextProperty » 2-tupel (dcp,VVdcp): cp CP is the set of contextual properties cp, DCP CP, dcp DCP. If the value of the derived context property dcp is associated with the element e E then the element that belongs to e derive e’s values of dcp automatically due to a belongs-to relation. This is not applicable to composite elements. One ek belongs to another el, kl, then the context property values associated with el also apply to ek:

The dcp values associated with the el are derived to ek via the belongs-to relation:

belongs ExE : (ek,el) belongs or ek belongs el

then: ek derives the values of the dcp properties of the el. The context retrieval is thenthe mapping:

derivedvaluesdcp(e) = derivedvaluesdcp(ei) directvaluesdcp(ei)when ei: e ei

Activity(person): ‘searching’,‘navigating’ Activity(device) : ‘idle’,‘downloading’lbs belongs person, lbs belongs devicederivedvaluesActivity (lbs)= {‘navigating’ , ‘downloading’}

Page 6: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context-Based Constraint Language :: Technische Universität Berlin

«Context Constraint Metamodel»

Context-Based Constraint Language :: Technische Universität Berlin

«Context Constraint Metamodel»

Constraint Element

ContextBasedConstraint

ContextCondition

ContextPropertyValue

ContextPropertyName

Indirect Association

Direct Association

0..* 0..*

0..10..1 +scopedSet +targetSet

+contextProperty

+type1 0..*

0..*

1

0..*0..*

0..*

0..*

+constraint +constraintedElement

ALL USERS WHERE ‘Role’ CONTAINS ‘Student’ MUST BE INFORMED OFALL DOCUMENTS WHERE ‘Topic’ INTERSECTS WITH ‘User.Lecturetopic’

ALL USERS WHERE ‘Role’ CONTAINS ‘Student’ MUST BE INFORMED OFALL DOCUMENTS WHERE ‘Topic’ INTERSECTS WITH ‘User.Lecturetopic’

ALL COMPONENTS WHERE ‘Personal Data’ = ‘True’MUST NOT BE ACCESIBLE TO ALL COMPONENTSWHERE ‘Operational Area’ CONTAINS ‘Cobtrolling’

ALL COMPONENTS WHERE ‘Personal Data’ = ‘True’MUST NOT BE ACCESIBLE TO ALL COMPONENTSWHERE ‘Operational Area’ CONTAINS ‘Cobtrolling’

Page 7: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context-Based Constraint Language :: Technische Universität Berlin

«Context Constraint Metamodel» CCL maps to OCL:

context component inv:if self.taggedValue->select(tv|tv.dataValue=“Controlling”)

.type->select(td|td.name=“Operational Area”) ->notEmpty() and self.dependency.role -> select(i|i.oclIsTypeOf(Interface).dependency ->select (d|d.oclIsKindOf(Abstraction) and d.stereotype.name = “realize”) .role ->select (c|c.oclIsTypeOf(Component) .taggedValue -> select (tv| tv.dataValue = “True”) .type->select (td | td.name=“Personal Data”) ->Empty()

Context-Based Constraint Language :: Technische Universität Berlin

«Context Constraint Metamodel» CCL maps to OCL:

context component inv:if self.taggedValue->select(tv|tv.dataValue=“Controlling”)

.type->select(td|td.name=“Operational Area”) ->notEmpty() and self.dependency.role -> select(i|i.oclIsTypeOf(Interface).dependency ->select (d|d.oclIsKindOf(Abstraction) and d.stereotype.name = “realize”) .role ->select (c|c.oclIsTypeOf(Component) .taggedValue -> select (tv| tv.dataValue = “True”) .type->select (td | td.name=“Personal Data”) ->Empty()

Page 8: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Theory of Contextors :: Coutaz, Rey, CLIPS-IMAG France«Context Description via Contextors» History Function

“The cognitive notion of the context emerges from the captured events in which an entity is get involved.” Instant snapshot of Observable Entities is Situation, Composition of these situations over time is Context. Users are engaged at particular Tasks. Context of sets of Users U performing tasks T at time t is the composition:

Context (U,T,t) = COMPOSITION(situation(U,T,t0),…,situation(U,T,t)), Δt = t-t0

Environemts for composition:•Physical (light conditions, noise level, temperature, spatial objects, dimensions)•Social (waiting in line, colleagues that may come in, familiy members)•System (computantional, communicational resources, PDAs, mobile phones)•User (preferences, profile, policies, constraints)

Theory of Contextors :: Coutaz, Rey, CLIPS-IMAG France«Context Description via Contextors» History Function

“The cognitive notion of the context emerges from the captured events in which an entity is get involved.” Instant snapshot of Observable Entities is Situation, Composition of these situations over time is Context. Users are engaged at particular Tasks. Context of sets of Users U performing tasks T at time t is the composition:

Context (U,T,t) = COMPOSITION(situation(U,T,t0),…,situation(U,T,t)), Δt = t-t0

Environemts for composition:•Physical (light conditions, noise level, temperature, spatial objects, dimensions)•Social (waiting in line, colleagues that may come in, familiy members)•System (computantional, communicational resources, PDAs, mobile phones)•User (preferences, profile, policies, constraints)

Contexts(U,T,t) Contextu(U,T,t)

Contextn(U,T,t)Contextg(U,T,t) Contexti(U,T,t0)=situationi(U,T,t0)Contexti(U,T,t)=situationi(U,T,t) situationi(U,T,t-Δt)ContextN(U,T,t)=situationU(U,T,t) situationS(U,T,t)

Contexti(U,T,t0)=situationi(U,T,t0)Contexti(U,T,t)=situationi(U,T,t) situationi(U,T,t-Δt)ContextN(U,T,t)=situationU(U,T,t) situationS(U,T,t)

Page 9: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Theory of Contextors :: Coutaz, Rey, CLIPS-IMAG France«Context Composition via Contextors» History FunctionTheory of Contextors :: Coutaz, Rey, CLIPS-IMAG France«Context Composition via Contextors» History Function

FunctionalCore

Data,Metadata -in Data,Metadata -out

Control-in

Control-out

Type of contextors

•Elementary (sensors)•History (buffers, notifies changes)•Threshold (meta data, conditions, constraints)•Translator (transorfm data without meaning alteration, oC-oF •Fusion (aggregates infomration)•Abstraction (higher level of information, location granularity)

Composition over data channels: Encapsulation

Type of contextors

•Elementary (sensors)•History (buffers, notifies changes)•Threshold (meta data, conditions, constraints)•Translator (transorfm data without meaning alteration, oC-oF •Fusion (aggregates infomration)•Abstraction (higher level of information, location granularity)

Composition over data channels: Encapsulation

Page 10: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Activity Centric Context :: Prekop - Burnett«Activity Context»Document based context

Context surrounds the performance of an activity (contextual entity) by an agent (contextual property). The context exists iff an activity is being performed

Classification of activities :: More generic to more specific. The performance of a broad activity assuming that the nested activities have already been performed creating a nested or cascading context.

Activity Centric Context :: Prekop - Burnett«Activity Context»Document based context

Context surrounds the performance of an activity (contextual entity) by an agent (contextual property). The context exists iff an activity is being performed

Classification of activities :: More generic to more specific. The performance of a broad activity assuming that the nested activities have already been performed creating a nested or cascading context.

GenericContext

GenericActivity

Context

performanceAgent Activity

surrounds

of

surrounds

inherited

involved in

Parent Context:organizing a workshop

Agents Involved:self

Resources:calendar, email,names,travel,rooms

Process:begin{Initial AgendaIf not Approval Agenda beginContact participantBook roomsBook travel

}end

Parent Context:organizing a workshop

Agents Involved:self

Resources:calendar, email,names,travel,rooms

Process:begin{Initial AgendaIf not Approval Agenda beginContact participantBook roomsBook travel

}end

Page 11: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context Modeling in Pervasive Computing :: Henricksen, UNI-Queensland, Australia«Classification of Context» Association oriented context

Association Classification = {Static, Dynamic {Sensed, Derived, Profiled}}Structural Association = {Simple,Composite {Collection,Alternative,Temporal}}Dependencies = associations between associations (locatedAt dependsOn locatedNear)

Context Modeling in Pervasive Computing :: Henricksen, UNI-Queensland, Australia«Classification of Context» Association oriented context

Association Classification = {Static, Dynamic {Sensed, Derived, Profiled}}Structural Association = {Simple,Composite {Collection,Alternative,Temporal}}Dependencies = associations between associations (locatedAt dependsOn locatedNear)

Person Device

Channel

Location IdentifierActivity

Name

Identifier Type

Type

engagedIn:[]o

named:so

worksWith:*o

supervisedBy:o

locatedAt:w[]

hasChannel:o*

identifiedBy:o

locatedNear:[]autohrizedUse:o*

locatedAt:w[]identifiedBy:o

hasType:s

hasType:s

requires:ao

p:Person, p.engagedIn dependsOn p.locatedAt p:Person, d:Devicep.locatedNear dependsOn d.locatedAt

s:static, o:profiled, w:sensored, *:collection, a:alternative, []:temporal s:static, o:profiled, w:sensored, *:collection, a:alternative, []:temporal

QoC:accuracy, certainty, freshness, confidence,probability, related to associations

QoC:accuracy, certainty, freshness, confidence,probability, related to associations

Page 12: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

The Context Model Description is based on semantic languages able to represent physical and logical ontologies which are interrelated.

«Ontology» Set of entities’ description which exist in a context. Example : A set of actions of mobile phone user with certain profiles.

«Ontology Web Language (W3C::OWL)»

OWL provides RDFS/OWL parsers, reasoners, containers. OWL implements thenotion of any context into a machine comprehensible scheme. (Lite,DL,Full)

* OIL (Ontology Inference Language RDF),DAML (DARPA Agent Markup Language), DAML+OIL, OWL.* UML-based Tools for DAML (Property definition enriching the MOF, a property is an attribute that does not belong to any class, a new Classifier)* Class Instance in OOP Individual and Class in OWL

The Context Model Description is based on semantic languages able to represent physical and logical ontologies which are interrelated.

«Ontology» Set of entities’ description which exist in a context. Example : A set of actions of mobile phone user with certain profiles.

«Ontology Web Language (W3C::OWL)»

OWL provides RDFS/OWL parsers, reasoners, containers. OWL implements thenotion of any context into a machine comprehensible scheme. (Lite,DL,Full)

* OIL (Ontology Inference Language RDF),DAML (DARPA Agent Markup Language), DAML+OIL, OWL.* UML-based Tools for DAML (Property definition enriching the MOF, a property is an attribute that does not belong to any class, a new Classifier)* Class Instance in OOP Individual and Class in OWL

Page 13: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

<owl:Class rdf:ID=“ContextEntity”/><owl:Class rdf:ID=“Location”> <rdfs:sudClassOf rdf:resource=“#ContextEntity”/></owl:Class><owl:ObjectProperty rdf:ID=“longitude”> <rdf:type rdf:resource=“FunctionalProperty”> <rdfs:domain rdf:resource=“Location”></owl:ObjectProperty><owl:Class rdf:ID=“IndoorSpace”> <rdfs:sudClassOf rdf:resource=“#Location”/><owl:disjoinedWith rdf:resource=“#OutdoorSpace”/></owl:Class><owl:ObjectProperty rdf:ID=“locatedIn”> <rdfs:domain rdf:resource=“#Entity”> <rdfs:range rdf:resource=“#Location”></owl:ObjectProperty>

<owl:Class rdf:ID=“ContextEntity”/><owl:Class rdf:ID=“Location”> <rdfs:sudClassOf rdf:resource=“#ContextEntity”/></owl:Class><owl:ObjectProperty rdf:ID=“longitude”> <rdf:type rdf:resource=“FunctionalProperty”> <rdfs:domain rdf:resource=“Location”></owl:ObjectProperty><owl:Class rdf:ID=“IndoorSpace”> <rdfs:sudClassOf rdf:resource=“#Location”/><owl:disjoinedWith rdf:resource=“#OutdoorSpace”/></owl:Class><owl:ObjectProperty rdf:ID=“locatedIn”> <rdfs:domain rdf:resource=“#Entity”> <rdfs:range rdf:resource=“#Location”></owl:ObjectProperty>

ContextEntity

Location

IndoorSpace

OutdoorSpace

Entity

longitude

locatedIn

Ontology ModelOntology for Location Context Model

Ontology ExampleOntology Example

Page 14: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

<owl:ObjectProperty rdf:ID="locatedIn"><rdf:type rdf:resource="&owl;TransitiveProperty" /><rdfs:domain rdf:resource="&owl;Thing" /><rdfs:range rdf:resource="#Region" /></owl:ObjectProperty>

<owl:ObjectProperty rdf:ID="locatedIn"><rdf:type rdf:resource="&owl;TransitiveProperty" /><rdfs:domain rdf:resource="&owl;Thing" /><rdfs:range rdf:resource="#Region" /></owl:ObjectProperty>

Thing RegionlocatedIn

<Region rdf:ID=“Ζωγράφου”><locatedIn rdf:resource=“#Αθήνα”/></Region>

<Region rdf:ID=“Ζωγράφου”><locatedIn rdf:resource=“#Αθήνα”/></Region>

«Transitive»

<Region rdf:ID=“Αθήνα”><locatedIn rdf:resource=“#Αττική”/></Region>

<Region rdf:ID=“Αθήνα”><locatedIn rdf:resource=“#Αττική”/></Region>

Me ΖωγράφουlocatedIn

Αθήνα ΑττικήlocatedIn

locatedIn

Inference::locatedIn

Page 15: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context Gateway :: Wang Xiaohang, UNI-Singapore«Context Ontologies» Ontology oriented Context

Graph representation with the Ontology Web Language (OWL) for modeling contextual information. Notion of Upper ontology and Domain-Specific ontology.

Context Gateway :: Wang Xiaohang, UNI-Singapore«Context Ontologies» Ontology oriented Context

Graph representation with the Ontology Web Language (OWL) for modeling contextual information. Notion of Upper ontology and Domain-Specific ontology.

ContextEntity

ComptEntity

Location Person

Activity

Service

Appl

Device

Network

Agent

Indoor

Outdoor

Deduced

Scheduled

Movie

Cooking

Party

TV

DVD

Garden

Garage

Room

Corridor

windowwindowvolumevolume

volumevolume door door

locatedInlocatedIn

locatedInlocatedIn

engagedInengagedIn

lighting lighting upper class :: owl:Class

specific class :: owl:Class

owl:Property

rdfs:subClassOfKitchen

Page 16: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context Gateway :: Wang Xiaohang, UNI-Singapore«Context Reasoning using First-Order Logic» Ontology oriented Context

Rule based context reasoning:

Inferred Situation :: «Cooking» Reasoning rule :: (?u locatedIn Kitchen) (ElectricOven locatedIn Kitchen) (ElectricOven status ON) => (?u situation COOKING)

Context Gateway :: Wang Xiaohang, UNI-Singapore«Context Reasoning using First-Order Logic» Ontology oriented Context

Rule based context reasoning:

Inferred Situation :: «Cooking» Reasoning rule :: (?u locatedIn Kitchen) (ElectricOven locatedIn Kitchen) (ElectricOven status ON) => (?u situation COOKING)

Page 17: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

OWL

CC/PP UAProf

RDF XML

Context

ProfileElement

Service

Profile as Derived ContextProfile as Derived Context

Page 18: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

<?xml version="1.0"?> <rdf:Description about="HardwarePlatform"> <prf:Defaults Vendor="Nokia“ Model="2160“ Type="PDA" ScreenSize="800x600x24“ CPU="PPC"  Keyboard="Yes" Memory="16mB"  Bluetooth="YES" Speaker="Yes" /> <prf:Modifications  Memory="32mB" /> </rdf:Description><rdf:Description about="SoftwarePlatform"> <prf:Defaults    OS="EPOC1.0"  HTMLVersion="4.0"   JScriptVersion="4.0"WAPVersion="1.0"WMLScript="1.0"/> <prf:Modifications  Sound="Off"  Images="Off" /> </rdf:Description> <rdf:Description about="EpocEmail1.0"> <prf:Defaults  HTMLVersion="4.0" /> </rdf:Description> <rdf:Description about="EpocCalendar1.0"><prf:Defaults HTMLVersion="4.0" /> </rdf:Description><rdf:Description about="UserPreferences"><prf:Defaults  Language="English"/></rdf:Description></rdf:RDF>

<?xml version="1.0"?> <rdf:Description about="HardwarePlatform"> <prf:Defaults Vendor="Nokia“ Model="2160“ Type="PDA" ScreenSize="800x600x24“ CPU="PPC"  Keyboard="Yes" Memory="16mB"  Bluetooth="YES" Speaker="Yes" /> <prf:Modifications  Memory="32mB" /> </rdf:Description><rdf:Description about="SoftwarePlatform"> <prf:Defaults    OS="EPOC1.0"  HTMLVersion="4.0"   JScriptVersion="4.0"WAPVersion="1.0"WMLScript="1.0"/> <prf:Modifications  Sound="Off"  Images="Off" /> </rdf:Description> <rdf:Description about="EpocEmail1.0"> <prf:Defaults  HTMLVersion="4.0" /> </rdf:Description> <rdf:Description about="EpocCalendar1.0"><prf:Defaults HTMLVersion="4.0" /> </rdf:Description><rdf:Description about="UserPreferences"><prf:Defaults  Language="English"/></rdf:Description></rdf:RDF> RDF: Nokia 2160RDF: Nokia 2160

Terminal ProfileTerminal Profile

Page 19: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context meta model (contextual information representation)

Context model (OWL,DAML+OIL,RDF,UML semantic) Context query (CSL,RDQL,…) Context discovery (sensor topology, sCAP, TinyOS) Context reasoning (known context generates new, AI,

pattern…) Context aggregation (interpretation, distributed

modeling) Context acquisition (high level sensing) Context quality (freshness, staleness, QoC, possibilities) Context consistency (knowledge base, inference

engines) Context sensing (wearable devices, hardware sensors) Context low-level model (contextual data

representation)

Context meta model (contextual information representation)

Context model (OWL,DAML+OIL,RDF,UML semantic) Context query (CSL,RDQL,…) Context discovery (sensor topology, sCAP, TinyOS) Context reasoning (known context generates new, AI,

pattern…) Context aggregation (interpretation, distributed

modeling) Context acquisition (high level sensing) Context quality (freshness, staleness, QoC, possibilities) Context consistency (knowledge base, inference

engines) Context sensing (wearable devices, hardware sensors) Context low-level model (contextual data

representation)

Context InitiativesContext Initiatives

Page 20: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

Context Manager ArchitectureContext Manager Architecture

Enabling Context Managment •Capture of raw data •Collation of data•Transformation into a context model •Dissemination to context consumers

Enabling Context Managment •Capture of raw data •Collation of data•Transformation into a context model •Dissemination to context consumers

Page 21: Context Modeling Chris Anagnostopoulos, Athens, summer 2004.

End of Context ModelingEnd of Context Modeling

Chris Anagnostopoulos, Athens, summer 2004Chris Anagnostopoulos, Athens, summer 2004