400 likes | 559 Views
Lecture07 Context Awareness and Mobile Middleware 第 7 讲 情景感知与移动中间件. §7.1 Concept and Applications §7.2 Context Sensing, Modeling and Reasoning §7.3 Mobile Middleware. Why Context Aware?. Create applications that work seamlessly in human environments Understanding of context.
E N D
Lecture07 Context Awareness and Mobile Middleware第7讲 情景感知与移动中间件 §7.1 Concept and Applications §7.2 Context Sensing, Modeling and Reasoning §7.3 Mobile Middleware
Why Context Aware? • Create applications that work seamlessly in human environments • Understanding of context How do we effectively infer characteristics of situations and usefully supplement them with technology?
What is Context? • By example • Location, time, identities of nearby users … • By synonym • Situation, environment, circumstance • By dictionary [WordNet] • The set of facts or circumstances that surround a situation or event
Context Definition • Computing context: • network connectivity, communication cost, communication bandwidth, nearby resource • User context: • user profile, location, social situation • Physical context: • lighting, noise, traffic condition, temperature • Time Context: • time of a day, week, month, season of a year
Operational Definition of Context “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 a user and an application, including the user and the application themselves.” [Dey and Abowd, 2000] Observations • From point of view of developer
Context-Aware Applications • “A system is context-aware if it uses context to provide relevant information and/or services to the user, where relevancy depends on the user’s task.” • Active vs. Passive • Active Context Awareness: • “an application automatically adapts to discovered context by changing the application’s behavior” • Passive context awareness: • “an application presents the new or updated context to an interested user or makes the context persistent for the user to retrieve later”
CA Applications • Proximate selection: • user interface where nearby objects are emphasized/made easier to choose • Automatic contextual reconfiguration: • a process of adding/removing components or changing relationships between components based on context change • Contextual information and commands: • produce different results according to the context in which they are issued • Context-triggered actions: • rules to specify how the system should adapt
Mobisaic Web Browser • Extend browsers to refer to dynamic contextual information • Dynamic URLs with contextual/environment variables • Variables get bound to current context when the URL is referenced • Also support active documents • As the context changes, the document is automatically updated • What types of context can be useful here? • Active or passive?
Shopping Assistant • Scenario: you are at home depot trying to figure out what you need to finish your basement • Shopping assistant can • Tell you what parts you need • Where to find them relative to your location in the store • What is on sale • Do comparative pricing • Use your previous profile information to customize shopping and delivery • What context? Active/passive?
CyberGuide • Characteristic • From Georgia Tech • Provide information services to a tourist • Direction • Background information • Travel diary (automatically recorded) • Indoor and Outdoor Version • Indoor • Using IR (infrared) • Outdoor • Using GPS Figure : Outdoor Cyberguide Screenshot, etc.
§7.2 Context Sensing, Modeling and Reasoning • How to get context information? • How to model and represent the information collected? • How to obtain high level information from raw/low level information?
Sensing Location Information • Outdoor • GPS • Alternatives? • Indoor ? • Need to build our own location tracking system • difficult problem • Use ideas similar to GPS: compute distances from known locations that send beacons
Sensing Other Contexts • Time? • Physical sensors possible • Light, acceleration, tilt, sound, temperature, pressure, proximity of humans • Nearby objects? • If system keeps track of location of objects, query to a database • Bandwidth? • Orientation? • Orientation sensor based on two mercury switches • Directional antennas/directional transmitters?
Context Modeling and Reasoning • Context Modeling • To define and evaluate context information • Context Reasoning, to • derive new context facts from existing context facts and/or • reason about high-level context abstractions that model real world situations.
Key-value and Markup Modeling • Early approaches • Key-value models • List of attributes and their values • Markup models • Use a variety of markup languages including XML
Domain-focused Modeling • To model context for specific domains • E.g. context-aware browsing • Using tuples to represent context • Who, What, Where, When • With interface to store and query such tuples
Object-role based Modeling and Reasoning • Context Modeling Language (CML) • Developed for modeling of databases • It can • capture the different classes and sources of context • specifically, static, sensed, derived, and user-supplied (''profiled'') information; • capture imperfect information using quality metadata and the concept of ''alternatives'' for capturing conflicting assertions (such as conflicting location reports from multiple sensors; • capture dependencies between context fact types; and • capture histories for certain fact types and constraints on those histories.
Query using a Three-valued Logic • '' Fitzwilliam Darcy located at Kitchen''
Spatial Modeling and Reasoning • Space is an (maybe the most) important context • Predefined (static) vs. obtained from positioning sys. • Two kinds of coordinate sys. • Geometric coordinates • E.g. latitude, longitude, and elevation above sea level • Support range query, distance query • Symbolic coordinates • Represented by an identifier, e.g. a room number • No spatial relation offered • Explicit relation information should be provided additionally to support range/distance query
Ontology-based Modeling and Reasoning • Context is a kind of knowledge • Can be represented and handled by knowledge framework • Ontology: 本体,物体的本质、抽象 • OWL(Web Ontology Language) • W3C开发的一种网络本体语言,用于对本体进行语义描述。 • Context modeling using OWL • classes, individuals, characteristics of individuals (data type properties), and relations between individuals (object properties)
Ontology-based Modeling and Reasoning • For example, given two atomic classes Person and Female, the class Male can be defined as: • For example, BusinessMeeting can be defined as:
High-level Context Abstractions • Low-level context • Information from physical sensors • Meaningless, trivial, vulnerable to changes, uncertian • High-level context: situational context, situation
Other Issues • Hybrid models • Uncertainty • Security • Privacy
§7.3 Mobile Middleware • What’s Middleware? • Widely used and popular term • Fuzzy term • One definition • “A set of service elements above the operating system and the communications stack” • Second definition • “Software that provides a programming model above the basic building blocks of processes and message passing”
Why Middleware • Application development is complex and time-consuming • Should every developer code their own protocols for directories, transactions, ..? • How to cope with heterogeneous environments? • Networks, operating systems, hardware, programming languages • Middleware is needed • To cut down development time • Rapid application development • Simplify the development of applications • Support heterogeneous environments and mask differences in OS/languages/hardware
Middleware Categories • Transactional Middleware • Offers a tuple abstraction (SQL) • Distributed transaction processing (DTP protocol) • Message-Oriented Middleware (MOM) • Offers a mailbox abstraction • Asynchronous messages • Procedural (RPC) • Offers a procedure abstraction • Synchronous client/server interaction • Object and Component-oriented Middleware • Offers an object abstraction • (A)synchronous client/server interaction • Event Based Middleware • Trading, brokering • Device Control
Requirements for Middleware • Distributed transparency • Scalability • Openness • Heterogeneity • Reliability • Resource sharing • Security
Mobile Middleware • Necessity • Diversity of mobile device • Diversity of mobile OS • Diversity of communication standards • Constraints of mobile resources • Diversity/Dependency on environments/contexts • Additional requirement • Light weight • Asynchrony • Self-adaptation • Visibility (to some extent) • Coordination support • Component support
Key Technologies in Mobile Middleware • Service discovery • To find the service required with respect to mobility, context • Service advertising + service discovering • SLP, UPnP, Jini, etc. • Disconnection support • Replication and cache • Context awareness • Sensing and reasoning • Self-adaptation • Adapting behavior/configuration of app. • Based on context changes • At different levels
Mobile Agent based Middleware • Agents can be defined to be autonomous, problem-solving computational entities capable of effective operation in dynamic and open environments • Additional characteristics • Reactivity for reacting to the change of environment • Veracity for prohibiting wrong information
Agents for context-awareness • Agent-based management of context information • Context-awareness via learning, inferencing and cooperation • Providing context information • Support autonomous service via complex sensing information
Case Studies • SOMA • Mobile agent based • Using Java • Mobility support: user mobility, device mobility • CARISMA • For context-awareness • Based on reflection technique • PDAgent • Agent based • To execute tasks on behalf of users
A Summary • Concepts • Context • Context model • Middleware • Different context models • Key-value and Markup • Domain specific • Object-role based: CML • Spatial • Ontology based • Mobile middleware • Purpose • Requirement
Homework Questions 1. Self-adaptation to context changes can be realized in different levels, in terms of system architecture. Please tell and discuss such levels. 2. Can context-awareness be done at a set of nodes cooperatively? What’s the key issue then, compared with that at a single node?