Ambient Mobility I - Graphisch

Transcription

Ambient Mobility I - Graphisch
Ambient Mobility I
WS 07/08
V4: System Architectures III &
Context Awareness
Prof. Dr.-Ing. José L. Encarnação
TUD, FB20, Graphisch-Interaktive Systeme (GRIS)
Gino Brunetti
INI-GraphicsNet Stiftung
Holger Graf
Zentrum für Graphische Datenverarbeitung (ZGDV)
Ambient Mobility I
21.11.2007
1
Recapturing last lecture…
Ambient Mobility I
21.11.2007
2
Software Architectures for Ubiquitous Computing Systems
SOA
Ambient Mobility I
21.11.2007
3
Brief Review
Lessons Learned…
…What are Web Serivces ?
…What are the underlying protocols ?
…SOAP, UDDI, BPEL, WSDL…
…How do they interact ?
…What is the semantic web ?
Ambient Mobility I
21.11.2007
4
UDDI – Revised: Organisation
Public UDDI: for Internet-based Web-Services
▫ E.g. UDDI Business Registry (UBR) of multiple major
companies under coordination of IBM, Microsoft und SAP
Intra Enterprise UDDI
▫ internal Registration (Repository) within one enterprise
Inter Enterprise UDDI
▫ Web-Service-Registration, which restrict content to
services provided by collaborating business partner
Ambient Mobility I
21.11.2007
5
UDDI – Revised: Architectural View
UDDI - Universal Discovery, Description & Integration
Diverse clients to access functionalities
One or more UDDI-Implementations (or nodes), which form a
registry
Taxonomy-Server
Ambient Mobility I
21.11.2007
6
How UDDI Works…
Software companies,
standards bodies, and
developers populate the
registry with descriptions
(specifications) of types of
services
1.
4.
2.
Marketplaces, search
engines, and business
applications query the
registry to discover
services at other
companies
UDDI Registry
Implementers
populate the
registry with
descriptions of
the services
they support
Implementations
3.
5.
Service Types
UDDI Registry assigns a programmatically
unique identifier to each service and
registration
Ambient Mobility I
21.11.2007
7
Business uses this
data to facilitate
easier integration
with each other over
the Web
Today…
…What are mobile environments ?
…Quick jump into characteristics (not in detail)…
…Introduction into context aware computing…
…some architectures…
…context modelling…
…and ontologies…
…OWL.
Ambient Mobility I
21.11.2007
8
Architectures for Mobile Environments
Middleware Architectures for Mobile Systems
Ambient Mobility I
21.11.2007
9
Middleware Architectures for Mobile Environments
Vision:
wireless networking combined with small-scale wireless
devices
enable ubiquitous networking and computing
Software systems requirements:
access anywhere, anytime, while supporting natural
interaction with users
Ambient Mobility I
21.11.2007
10
Middleware Architectures for Mobile Environments
Vision:
wireless networking combined with small-scale wireless
devices
enable ubiquitous networking and computing
Software systems requirements:
access anywhere, anytime, while supporting natural
interaction with users
Ambient Mobility I
21.11.2007
11
Middleware Architectures for Mobile Environments
Current solutions to mobile/nomadic computing are based on
existing distributed systems architectures:
led to replication strategies to the mobile environment
computation and/or data are cached on mobile nodes and
later
synchronized with peer replicas when connection available
Wireless networks enable dynamically setting up temporary
networks among mobile nodes
Ambient Mobility I
21.11.2007
12
Middleware Architectures for Mobile Environments
Challenge:
ad hoc networking
▫ network paradigm for distributed systems, due to highly
dynamic topology
▫ absence of any infrastructure
Management of dynamic networks
Ambient Mobility I
21.11.2007
13
Middleware Architectures for Mobile Environments
Ad hoc networking
two different ways of configuring a mobile network:
▫ infrastructure-based
▫ ad-hoc-based
Ambient Mobility I
21.11.2007
14
Middleware Architectures for Mobile Environments
Infrastructure based
given Infrastructure by Wireless LANs (e.g., IEEE 802.11) and
global wireless networks (e.g., GSM, GPRS, UMTS).
uses fixed network access points with which mobile terminals
interact i.e., a base station forwards messages that are
sent/received by mobile terminals.
Limitation: base stations constitute bottlenecks
requires that any mobile terminal be in the communication range
of a base station
Ambient Mobility I
21.11.2007
15
Middleware Architectures for Mobile Environments
ad-hoc-based network
enables mobile terminals to cooperatively form a dynamic and
temporary network without any pre-existing infrastructure
The main issue:
▫ design of an ad hoc (network) routing protocol
▫ compute an optimal communication path between any two
mobile terminal
▫ Must minimize the number of control messages that are
exchanged among mobile terminals
- avoid network congestion
- minimize energy consumption
Two base types of ad hoc routing protocols: proactive and
Ambient Mobility I
16
reactive
21.11.2007
Middleware Architectures for Mobile Environments
ad-hoc-based network
Proactive protocols update their routing table periodically
Reactive protocols
▫ reduce the network load produced by the traffic of control messages
▫ checking the validity of, and possibly computing, the communication path
between any two mobile terminals
▫ when communication is requested
Hybrid routing protocols:
▫ combine the reactive and proactive modes
Ambient Mobility I
21.11.2007
17
Middleware Architectures for Mobile Environments
ad-hoc-based network
Rationale of hybrid protocols
▫ accurately know only the neighbors of any mobile terminal
▫ close to the terminal
▫ communicating with neighbors is less expensive
▫ neighbors are most likely to take part in the routing of the messages sent
from the terminal.
A hybrid protocol implements:
▫ a proactive protocol for communication with mobile terminals in the
neighborhood
▫ a reactive protocol for communication with other terminals
Ambient Mobility I
21.11.2007
18
Middleware Architectures for Mobile Environments
ad-hoc-based network
However, we do not consider that pure ad hoc networks will be the prominent
wireless networks.
Instead, mobile distributed systems will be deployed on hybrid networks,
combining infrastructure-based and ad hoc networks,
so as to benefit from their respective advantages.
Distributed systems over hybrid wireless networks remains an open challenge,
which requires dedicated middleware solutions for managing the network’s
dynamics and resources
Ambient Mobility I
21.11.2007
19
Mobile vs Ubiquitous Environments
Ambient Mobility I
21.11.2007
20
Context Awareness
Ambient Mobility I
21.11.2007
21
Table of Contents
Context-aware systems Basics
Context-aware systems
Definition of Context
Classification of Context
Classification of Architectures
Abstract Layer Architecture
Introduction to OWL
Modelling Context via Ontologies
Examples context-aware systems
Ambient Mobility I
21.11.2007
22
Definition of Context – Linguistic Roots
con·text (kòntêkst)
n.
1. The part of a text or statement that surrounds a particular
word or passage and determines its meaning.
2. The circumstances in which an event occurs; a setting.
[Middle English, composition, from Latin contextus, from past
participle of contexere, to join together: com-, com- + texere, to
weave; see teks- in Indo-European roots.]
Ambient Mobility I
21.11.2007
23
Definition of Context
context - the set of facts or circumstances that surround a
situation or event
Location, identities of nearby people and objects and
changes to those objects
The user’s location, the environment, the identity and the
time
The user’s emotional state, focus of attention, location and
orientation, data and time, user preferences, patterns,
calendar, team structure
The aspects of the current situation
Ambient Mobility I
21.11.2007
24
Context-aware systems
The elements of the user’s environment that the computer
knows about
Any information that can be used to characterize the
situation of entities (i.e. whether a person, place or object)
that are considered relevant to the interaction between a user
and an application, including the user and the application
themselves
Are able to adapt their operations to the current context
without explicit user intervention
Aim at increasing usability and effectiveness by taking
environmental context into account
Ambient Mobility I
21.11.2007
25
Classification of Context
External (physical)
Context that can be measured by hardware sensors
location, light, sound, movement, touch, temperature, air
pressure, etc.
Internal (logical)
Mostly specified by the user or captured monitoring the user’s
interaction
the user’s goal, tasks, work context, business processes, daily
procedures, the use’s emotional state, etc.
Ambient Mobility I
21.11.2007
26
Classification of Context (cont’d)
3 entities
Places (rooms, buildings, etc.)
People (individuals, groups)
Things (physical objects, computer components, etc.)
Attributes
Identity (each entity has an unique identifier)
Location (an entity’s position, co-location, proximity, etc.)
Status (or activity),
Time (used for timestamps to accurately define situation,
ordering events, etc.)
Ambient Mobility I
21.11.2007
27
Classification of Architectures (I)
Direct sensor access
Tightly coupled
No extensibility
Middleware
Hiding low-level sensing details
Extensible
Context server
Permit multiple clients access to remote data sources
Relieve clients of resource intensive operations
Has to consider appropriate protocols, network performance,
quality of service parameters
Ambient Mobility I
21.11.2007
28
Classification of Architectures (II)
Widgets (process-centric view)
Encapsulation
Exchangeable
Controlled by a widget manager
The tight coupled widget approach increases efficiency
Networked services (service-oriented model)
Resembles context server architecture
Not as efficient as a widget architecture due to complex
network based components
Ambient Mobility I
21.11.2007
29
Classification of Architectures (III)
Blackboard model (data-centric view)
Processes post messages to a shared media, blackboard
Simplicity of adding new context sources
Easy configuration
A centralized server
Lacks in communication efficiency
Ambient Mobility I
21.11.2007
30
Example Architectures - Context Managing Framework
Centralized Context Manager
Pros
Overcome memory and processor
constraints of small mobile devices
Cons
One single point of failure
Ambient Mobility I
21.11.2007
31
Example Architectures - (Context-awareness sub-structure)
Centralized middleware approach
Local caching on the client side
Ambient Mobility I
21.11.2007
32
Example Architectures - (Project: HYDROGEN)
Context Server
Synchronous and asynchronous methods
All inter-layer communication is based on a XML-protocol
Ambient Mobility I
21.11.2007
33
Example Architectures - (Project: HYDROGEN)
Specializing in mobile devices
Remote context and local context
Context sharing
In a peer-to-peer manner
Object oriented approach
Superclass ContextObject
Ambient Mobility I
21.11.2007
34
Abstract Layer Architecture
application
storage/management
preprocessing
raw data retrieval
sensors
Ambient Mobility I
21.11.2007
35
Abstract Layer Architecture (cont’d)
Sensors
Physical sensors
▫ sensor, camera, microphone, accelerometer, GPS,
thermometer, biosensors
Virtual sensors
▫ From software: browsing an electronic calendar, a travel
booking system, emails, mouse movements, keyboard input
Logical sensors
▫ Combination of physical and virtual sensors with additional
information from databases: analyzing logins at desktop pcs
and a database mapping fixed devices to location information
Raw data retrieval
Drivers and APIs
Query functionality (ex: getPosition())
Exchangeable
Ambient Mobility I
21.11.2007
36
Abstract Layer Architecture (cont’d)
Preprocessing
Reasoning and interpreting
Extraction and quantization operations
Aggregation or compositing
▫ Statistical methods and training phase is required
E.g. not the exact GPS position of a person, but the name of the
person
Storage/Management
Public interface to the client
Synchronous (pull/polling) and asynchronous (push/subscription)
Applications
Actual reaction on different events and context-instances is
implemented
Ambient Mobility I
21.11.2007
37
Context Modelling: Using Ontologies
Ambient Mobility I
21.11.2007
38
Context Modelling
Ambient Mobility I
21.11.2007
39
Ontologies: A short introduction
What is an ontology?
The term “ontology” originates from philosophy and refers to
the discipline that deals with existence and the things that
exist. In computer science, things that “exist” are those which
can be represented by data.
For what do we need Ontologies?
In computer science: formalization of domain knowledge,
knowledge representation and exchange
Common language area between Service Providers and
Service Requestors
in Mobility
order
to describe 40the semantic of
Ambient
I
21.11.2007
provided and requested Web Services
Ontologies: A short introduction
Quantitative Descriptions of the World
(≠ Ontologie)
Quantitative Descriptions
Measuring data:
▫ 2mm, 2.4V, between 4 and 5 feet
Objective descriptions
Major problem is error of measurement
Analysis of such data: well established discipline
(statistics)
Example:
What is average age of cancer patients?
How much time is left inbetween dignosis and treatment ?
Ambient Mobility I
21.11.2007
41
Ontologies: A short introduction
Qualitative Descriptions of the World (= Ontologie)
Qualitative Descriptions
Terms
▫ cold, colder, blueish, “not that pink”, drunken
Ambiguity
▫ Different Interpretations possible
▫ No clear borders
Analysis of qualitative descriptions relatively new
Example
Which animals are dangerous?
How does their coat look like ?
What do animals eat ?
Ambient Mobility I
21.11.2007
42
Ontologies: A short introduction
Structural Description
Databases
Ontologies
Knowledge
bases
Description of terms
Software
Agents
Analysis
Methods
Ambient Mobility I
21.11.2007
Generic
Methods
(e.g. Search)
43
Domain Example: Wine
French
Wine and
regions
Which wine
maches
sea food ?
Ontology
on Wine
and Food
Ambient Mobility I
21.11.2007
California
Wine and
regions
44
Contents of an ontology - Example
Ambient Mobility I
21.11.2007
45
Ontologies: A short introduction
Typical elements of ontologies are:
▫ Terms (concepts) and its attributes
▫ Taxonomies to categorize concepts by generalization
▫ Relations between concepts
▫ Axioms to define statements which are always true; Used
to prove the consistency of the knowledge modelled by an
ontology and to deduce further facts (reasoning).
▫ Individuals (or facts) are instances of concepts and its
relations.
Ambient Mobility I
21.11.2007
46
Ontologies: Representation Languages
Model-based representation:
UML Class diagrams
XML-based representation:
W3C standards: RDFS and OWL
Both RDFS and OWL are widely used
Tool support is available, i.e. Protégé, Racer, Jena, Sesame,
etc.
We use class diagrams and OWL
Ambient Mobility I
21.11.2007
47
Ontologies: OWL
OWL is a W3C standard
OWL is a Description Logic-based Language: provides the
basic
▫ constructs to describe ontologies
▫ Definition of concepts
▫ Relations between concepts
▫ Special relation: subclass for generalization
▫ Effectively computable
- Good optimization algorithms support inference
Ambient Mobility I
21.11.2007
48
48
OWL: Full, DL, Lite
Description Logics provides a careful balance between
expressivity and computational complexity
OWL provides sublanguages with reduced expressivity and
computational complexity
Ambient Mobility I
21.11.2007
49
Ontologies: OWL
OWL is based upon
▫ the Extensible Markup Language (XML),
▫ the Resource Description Framework (RDF) and RDF
Schema (RDF-S)
Ambient Mobility I
21.11.2007
50
OWL: Description Logics Language
Subset of First Order Logics used to describe objects in a
domain
Allows three types of objects
▫ Individuals: an object in the domain
▫ Concepts: describe general concepts of things in the domain
▫ Properties: relations between concepts
- One special relation is ISA (or subclassOf)
Ambient Mobility I
21.11.2007
51
OWL: Language Elements
Class is used to define ontology concepts.
Example: define the concepts “Person” and “University”:
<owl:Class rdf:ID=“Person“/>
<owl:Class rdf:ID=“University“/>
subClassOf allows to define specialized concepts; Can be
used to build taxonomies
Example defines the concept “Student” as a special person:
<owl:Class rdf:ID=“Student“/>
<rdfs:subClassOf rdf:resource“#Person“/>
Ambient Mobility I
21.11.2007
</owl:Class rdf:ID>
52
OWL: Types and Quantifiers on Properties
Different types of properties
▫ Transitivity, Symmetry, Function, Inverse etc…
Cardinality restrictions
▫ at-most, at-least, exactly, optionality (0 or more)
Type restrictions
▫ Identifies subclasses that have some restriction on a
property P
Ambient Mobility I
21.11.2007
53
OWL: Language Elements
DataTypeProperty is used to define attributes of concepts. The
range defined by XML Schema Types.
Example: concept “Person” has an attribute “Name” which must be a
character string;
<owl:DatatypeProperty rdf:ID=”name”>
<rdfs:domain rdf:resource=”#Person”/>
<rdfs:range rdf:resource
=“http://www.w3.org/2001/XMLSchema#string“/>
</owl:DatatypeProperty>
Ambient Mobility I
21.11.2007
54
OWL: Language Elements
ObjectProperty defines relations between concepts; (transitive,
symmetrical or functional); Two relations can be marked as inverse to
each other.
Relations can be specialized by using subPropertyOf (analog to
subClassOf for concepts).
Example: relation “studies_at” with concept “Student” as domain and
concept “University” as range. It is inverse to an other relation
“has_student”:
<owl:ObjectProperty rdf:ID=”studies_at”>
<rdfs:domain rdf:resource=”#Student”/>
<rdfs:range rdf:resource=”#University”/>
<owl:inverseOf rdf:resource = “has_student“/>
Ambient Mobility I
21.11.2007
</owl:ObjectProperty>
55
OWL: Equivalence between concepts
Equivalence of concepts
▫ Ont1:LiquidContainer sameAs ont2:Bottle
Equivalence of individuals
▫ EveningStar
sameAs MorningStar
Difference of individuals and concepts
▫ Assert values that are mutually distinct.
Ambient Mobility I
21.11.2007
56
OWL: Reasoning - Excerpt
Ambient Mobility I
21.11.2007
57
OWL: Reasoning
Example (see above)
▫ Gino Brunetti is a student a Gino Brunetti is a Person
(a student is a special person (subClassOf)).
▫ Values of attributes and relations for an individual can be
calculated if they are not explicitly given; (subPropertyOf,
inverseOf and markers for transitive or symmetrical
properties):
▫ Gino Brunetti studies at the TU Berlin a TU Berlin has a
student Gino Brunetti (inverseOf).
Ambient Mobility I
21.11.2007
58
OWL: Context Modelling and Reasoning vs Ontologies
Ontologies in relation to context modeling and reasoning:
▫ A context model is also a system of concepts (entities) and
relations, which makes an ontology a possible Context
Modeling and Reasoning mechanism
▫ An ontology is “formally defined”, which is a precondition
for a computers to interpret it, e.g. for reasoning purposes.
▫ Rules can be used to implement context reasoning.
Ambient Mobility I
21.11.2007
59
OWL: Context Modelling and Reasoning via Ontologies
Ambient Mobility I
21.11.2007
60
Context Modelling
Goals when designing a context ontology
Simplicity
Flexibility and extensibility
Genericity
Expressiveness
Context Atom Attributes
Context type
Context value
Description
Time stamp
Source
Confidence
Ambient Mobility I
21.11.2007
61
Context Models (cont’d)
Ambient Mobility I
21.11.2007
62
Context Processing
Ambient Mobility I
21.11.2007
63
Context Processing - Example
Procedures & Workflow
Implicit Context
Context management service
Ontologies
& Rules
Profiles
(user,
location,
device, …)
Reasoning
Engine
Explicit
Context
Information
Ambient Mobility I
21.11.2007
64
Context Processing - Example
Editor
Procedural Manager
Context
Processed user input
will be fed into ontology and rule
management system
Acquired as input from various
sensors and profiles
Receives queries and infers
contextual information
through:
Context management service
Ontologies
& Rules
Profiles
(user,
location,
device, …)
Reasoning
Engine
Raw
Context
Information
HW Interfaces
“context states”, user service/device
information
pre-defined situation patterns
efficient reasoning mechanism
infers situation patterns, context states,
or changes in context states,
define – or restrict – service activation
reacts to service requests
(e.g. Sensor Wrappers, …)
Sensors
User
Ambient Mobility
I
request
21.11.2007
65
Context Processing - Example
Procedural
Manager
Ontology
Context
Workflow Architect
Spatial- and Time
Services
User Console
Workflow Engine
Process
Templates
Compose
r
Ambient Mobility I
21.11.2007
66
Context Processing - Tasks of a Context Manager
Taking decisions with respect to the user context.
Taking decisions with respect to connected input and
output devices.
Taking decisions with respect to events
(e.g. using escalation plans, alternative routes)
Taking time driven decisions
(using e.g. a calendar/time notification module)
Ambient Mobility I
21.11.2007
67
Context Processing - Tasks of the Context Manager
Context: grasp of situations, properties of the time, the environment, and
things personally or role-based relevant
Context Element: single property from the user context; identified by a
key and associated with a (possibly changing) value
▫ expressed by a triple (k, t, v(k, t))
Situation: interpretation of the contextual state of the user; all possible
triples
( ki , t, v(ki , t))
▫ one contextual state at any point in time
▫ But different interpretations of the same contextual state
Profile: storage unit for a coherent collection of context elements
describing a distinct resource, location, or user; provides the
corresponding metadata
Ambient Mobility I
21.11.2007
68
Context Processing – Example: Gino meets Holger all Wednesday at a local pub
Time
event
by
the Send
calendar
23:00.
Workflow
Put intriggered
toengine
the
context
read
context
manager:
information:
User
User
isservice:
has
in
the
appointment
city
and
is at bank Info
terminal.
Composer
select
the
devices
and
the
order.
Calendar
Workflow
service
engine
give
set
a
order:
event
in
thesend
SMS
workflow
Reminder
engine:
and
23:00.
Location
at
bank
terminal
Procedural
Manager
Context
Service
Middleware
Calendar Service
Workflow Engine
Compose
r
Ambient Mobility I
21.11.2007
69
Context Processing: User Interfaces - Example
Different tools for different user groups
Tools work with the same data and rule base but create
different changes.
User Console: For users
Workflow Architect:
For system administrator and creater of workflows and
workflow templates.
Ambient Mobility I
21.11.2007
70
Editor 1: User Console – Rule Editor- Example AAL
ui User Console
For the end user and
caregiver.
User Console
Whiteware
Creating and changing
activities. (e.g. switch off
Timer
the light at 22:00)
Finding devices and
showing status of
devices. (e.g. Click on the
heater and show the
temperature)
Actor
Sensor
Creating and changing
the context. (e.g. moving
a TV from one room in an
other room)
Ambient Mobility I
21.11.2007
71
Editor 2: Workflow Architect – Example: AAL
For template and
workflow
(de-)composition
ui Workflow Architect
Workflow Architect
Actions
T ools
Creating and
changing of complex
activities
Work with no
concrete device, work
with the capabilities
of a device.
Working independent
from the ontology.
Ambient Mobility I
21.11.2007
Devices
72
Pros & cons of context-aware systems
Pros:
▫ More immediate access to relevant info
▫ “in-situ intelligence augmentation”
Cons:
▫ System makes assumptions about
- (1) what the context is
- (2) what info may be relevant
▫ Limits to how much common sense systems can have
Ambient Mobility I
21.11.2007
73
Challenges
Context is most useful in dynamic, mobile environments.
▫ But what is the relevant information in various situations?
▫ Mobility results in continuous updates of context information.
How can we efficiently manage this?
▫ How can we share context?
▫ How do we handle uncertainty of context information?
▫ How do we ensure privacy control and management of
context information?
▫ How do we reach a common understanding of implications
and semantics of (shared) context information?
▫ Resource restrictions
▫ Connectivity - devices/services
Ambient Mobility I
21.11.2007
74
74
Social Navigation
“the process of using cues from other people to help you find
information and potentially to more fully understand what it is
you have found” [Wexelblat, 1998].
History: users may interact with information and environments at
different times, but computers can record these interactions for other
users to benefit from later on.
Ambient Mobility I
21.11.2007
75
Applications
Tourist Guides & Navigation Systems
Disney World [Pascoe, 1997]
Atlanta [Abowd et a., 1997]
Exhibits [Sumi et al, 1998]
Office Awareness Systems
User Tracking [Xerox Parctab]
Tagging Systems
Fieldwork data collection [Pascoe]
Stick-e notes [Pascoe]
Ambient Mobility I
21.11.2007
76
Example: Graffiti
Text notes are attached to locations.
Users can create notes and attach them to any
campus location.
Users can read notes posted at their current
location.
Ambient Mobility I
21.11.2007
77
Graffiti: tracking use
Logging mechanism was built into
both applications for evaluation of
use.
Log when people checked for
notes
Log notes they wrote
Log where they were
Log when and where they
deleted notes
Ambient Mobility I
21.11.2007
78
Further Reading / Material
OWL specifications
W3C page on OWL
▫ http://www.w3c.org/2001/sw/WebOnt/
OWL Guide and language reference
▫ http://www.w3.org/TR/owl-guide/
▫ http://www.w3.org/TR/owl-ref/
Tutorials
▫ Costello and Jacobs’ OWL tutorial: http://www.xfront.com/owl
Ambient Mobility I
21.11.2007
79