PhD Thesis - Dr. Amir Padovitz

Page 1

Context Management and Reasoning about Situations in Pervasive Computing

by Amir Padovitz

Caulfield School of Information Technology Monash University, Australia

Thesis submitted as part of the degree of Doctor of Philosophy in Computer Science April 2006


Declaration I declare that the thesis contains no material that has been accepted for the award of any degree or diploma in any university and that, to the best of my knowledge, the thesis contains no material previously published or written by any other person except where due reference is made in the text.

Signed

Date

Caulfield School of Information Technology Monash University Caulfield East, Vic. 3145 Australia

ii


Dedication

iii


Acknowledgements

iv


Outcomes/Publications Excerpts from theoretical and practical contributions of this dissertation have been published (or accepted for publication) in sixteen peer-reviewed international journals, conferences and workshops, and another two submissions are currently under review. Additionally, outcomes of this work (including live demonstration and commercial extensions) have been presented as the main topic in one seminar and two joint HewlettPackard – Monash workshops.

List of publications 1. Padovitz A., Zaslavsky A., Loke S. W., Tosic M., Agent Communication Using PublishSubscribe Genre: Architecture, Mobility, Scalability and Applications, In the Journal: Annals of Mathematics, Computing and Tele-informatics (AMCT), Vol. 1, No 2, pp. 35-50, ISSN: 1109-9305, 2004. 2. Padovitz A., Loke S. W., Zaslavsky A., Burg B., Verification of Uncertain Context Based on a Theory of Context Spaces, International Journal of Pervasive Computing and Communications (JPCC), Troubador Publishing, to appear, 2006. 3. Padovitz A., Zaslavsky A., Loke S. W., Recognizing and Describing Situations in SensorBased Context-Aware Applications, submitted to ACM Transactions on Information Systems (TOIS), (under review). 4. Padovitz A., Loke S. W., Zaslavsky A., Multiple Agent Perspectives in Reasoning about Situations for Context-Aware Pervasive Computing Systems, submitted to IEEE Transactions on System, Man and Cybernetics (SMC), (under review). 5. Padovitz A., Zaslavsky A., Loke S. W., A Unifying Model for Representing and Reasoning About Context under Uncertainty, 11th International Conference on Information Processing and Management of Uncertainty in Knowledge-Based Systems (IPMU), July 2006, Paris, France. 6. Padovitz A., Zaslavsky A., Loke S. W., Merging Context Perspectives: An Approach to Adaptive Agent Reasoning in Pervasive Computing Systems, WiP Session at 4th IEEE International Conference on Pervasive Computing and Communication (PerCom), Pisa, Italy, March 2006. 7. Padovitz A., Loke S. W., Zaslavsky A., Burg B. and Bartolini C., An approach to Data Fusion for Context Awareness, in 5th International Conference on Modelling and Using Context (CONTEXT), Paris, France, 2005, Lecture Notes in Artificial Intelligence (LNAI) 3554, pp. 353 – 367. 8. Ajenstat J., Padovitz A., Zaslavsky A., Loke S. W. Modelling and adapting to Context changes: The case of stock market decisions making, Workshop on Contextual Modelling and

v


Decision Support, at 5th International Conference on Modelling and Using Context (CONTEXT), Paris, France, 2005. 9. Padovitz A., Zaslavsky A., Loke S. W., Burg B., Maintaining Continuous Dependability in Sensor-Based Context Aware Pervasive Computing Systems, 38th Hawaii International Conference on System Sciences (HICSS-38), Big Island, Hawaii, 2005. 10. Padovitz A., Bartolini C., Zaslavsky A., Loke S. W., Extending Context Spaces Approach to Management by Business Objectives, at 12th HP OpenView University Association Workshop (HPOVU), Porto, Portugal, 2005. 11. Page J., Padovitz A., and Gaber M. M., Mobility in Agents, a Stumbling or a Building Block?, 2nd International Conference on Intelligent Computing and Information Systems (ICICIS’05), Cairo, Egypt, 2005. 12. Padovitz A., Loke S. W., Zaslavsky A., Towards a Theory of Context Spaces, Workshop on Context Modelling and Reasoning, at 2nd IEEE International Conference on Pervasive Computing and Communication (PerCom), Orlando, Florida, March 2004, IEEE Computer Society, USA, pp. 38 - 42 (ISBN: 0769521061). 13. Padovitz A., Loke S. W., Zaslavsky A., Burg B., Towards a General Approach for Reasoning about Context, Situations and Uncertainty in Ubiquitous Sensing: Putting Geometrical Intuitions to Work, 2nd International Symposium on Ubiquitous Computing Systems (UCS), Tokyo, Japan, 2004. 14. Padovitz A., Loke S. W., Zaslavsky A., On Uncertainty in Context-Aware Computing: Appealing to High-Level and Same-Level Context for Low-Level Context Verification, in International Workshop on Ubiquitous Computing, 6th International Conference on Enterprise Information Systems (ICEIS), 2004, INSTICC Press, Portugal, pp. 62 – 72 (ISBN: 9728865066). 15. Padovitz A., Zaslavsky A., Loke S. W., Burg B., Stability in Context-Aware Pervasive Systems: A State-Space Modelling Approach, in 1st International Workshop on Ubiquitous Computing, at 6th International Conference on Enterprise Information Systems (ICEIS), 2004, Porto, Portugal, 2004, INSTICC Press, Portugal, pp. 129 – 138 (ISBN: 9728865066). 16. Padovitz A., Zaslavsky, A., Loke, S.W. Awareness and Agility for Autonomic Distributed Systems: Platform-Independent Publish-Subscribe Event-Based Communication with Mobile Agents, in International Workshop on Autonomic Computing Systems, at 14th International Conference on Database and Expert Systems Applications (DEXA), Prague, Czech Republic, 2003, pp. 669 - 673, IEEE Computer Society. 17. Padovitz, A., Loke, S.W., Zaslavsky, A. Using Publish-Subscribe Event Based Systems for Mobile Agents Communication, in Conference on MultiAgent System Technologies (MATES), Erfurt, Germany, 2003, pp. 180 - 191, Lecture Notes in Artificial Intelligence (LNAI) 2831 (ISBN 3-540-20124-6). 18. Loke S.W., Padovitz A., Zaslavsky A., Context-Based Addressing: the Concept and an Implementation for Large-Scale Mobile Agent Systems Using Publish-Subscribe Event Notification, 4th IFIP International Conference on Distributed Applications and Interoperable Systems (DAIS), Paris, France, pp. 274 - 284, Lecture Notes in Computer Science (LNCS) 2893 (ISBN 3-540-20529-2)

vi


Abstract Context-awareness enables applications to become aware of useful circumstances in the environment. In the context of pervasive computing systems, context-awareness enables applications to respond, possibly intelligently, to sensory originated information. Awareness of context, and in the broader perspective also awareness of situations, have been recognized as a key in adapting to changes in context by applications operating in multi-sensor pervasive computing systems. This thesis addresses four key challenges in context-aware computing in pervasive environments, namely: (1) modelling and representing context in a unifying and general way, (2) reasoning about context under uncertainty, (3) managing context to promote proactive behaviour of applications in open pervasive computing environments, and (4) building an extensible reasoning-capable context framework. Underpinning this dissertation is the development of a novel theoretical approach to model context and situations. The proposed model (titled Context Spaces) uses spatial metaphors and insights from the state-space model to describe context and situations in multi-dimensional space. The model facilitates: (1) unifying context representation, (2) designing operations for manipulating and utilizing context, and (3) developing novel approaches to reasoning about context. Built on the proposed model, we develop a Context Spaces Algebra, comprising operations dealing with concepts such as intersection of situations, or composing the perspectives of different entities over the object of reasoning. We show that these and other operations are useful in enhancing reasoning about context and promoting proactive management of context. Based on the Context Spaces model, we develop practical solutions for challenges in context-aware pervasive systems in the form of algorithms, methodologies, architecture and implementation. We propose innovative reasoning approaches, including: (1) A heuristically-based sensor data fusion algorithm, specifically developed for reasoning about context. The algorithm incorporates reasoning considerations concerning context in pervasive computing environments, such as the relative- values, importance and uncertainties of sensed information, and is evaluated with cases using real sensors as well as with elaborate simulations. (2) An approach to compute the confidence in the validity vii


of logical expressions describing situations under uncertainty. Our proposed approach enables an evaluation and comparison between mutually exclusive expressions, which under uncertainty might appear as being valid concurrently. (3) Three verification techniques for resolution of conflicts and information discrepancies. The verification techniques deal with issues such as inaccuracies and unreliability of sensors, conflicts in sensed data, ambiguities and contradictions in inferred context. (4) An algorithm to estimate changes in situations based only on recent sensory originated information, and an approach to improve context models at run-time by incorporating evolutionary optimization. The proposed approaches for reasoning and managing context are implemented in a framework for context-aware computing, designed with a focus on reasoning under uncertainty and addressing issues of scalability, communication and usability. A contextoriented reasoning engine based on the proposed context model, algorithmic contributions and Context Spaces Algebra, is developed as part of the framework. We propose, develop and investigate an architectural approach to deploy mobile agents in the pervasive system, which become context-aware by utilizing functionality of the framework. Implementation and evaluation of a solution to an existing problem of mobile agent communication is presented, enabling new forms of messaging between mobile computing entities such as messaging based on the context of mobile entities. We present a broad range of case studies and applications that use the Context Spaces model and developed algorithms, including smart spaces cases, unifying messaging, IT management and financial portfolio management. The diverse types of applications using Context Spaces reflect the general nature of the model and its value for developing fitting solutions to challenges related to context-awareness.

viii


Table of Contents 1 Introduction 1.1 Introduction 1.2 Research Objectives and Scope of Thesis 1.3 Organization of Dissertation

1 1 2 4

2 Modelling, Reasoning and Designing Context-Aware Pervasive Computing Systems 2.1 Reasoning and Modelling Context 2.1.1 Sensor data fusion and classification models 2.1.2 Logic based reasoning, models and ontology 2.1.3 Formats and structured data models 2.2 Analysis and Evaluation 2.2.1 Reasoning under uncertainty 2.2.2 General modelling, reusing and easy prototyping 2.2.3 Context management 2.2.4 A need for richer theoretical foundations 2.3 Design and Architectures 2.4 Summary and Conclusion

9 10 13 17 24 26 27 29 31 33 36 44

3 A Theory of Context Spaces 3.1 A Theoretical Approach of Context Spaces 3.1.1 Principles 3.1.2 Characteristics of the Na誰ve Context Spaces model (NCS) 3.2 Extending the NCS Model 3.2.1 Individual significance and contribution of attributes 3.2.2 Inaccuracies of sensors 3.2.3 Characteristics of context attributes 3.2.4 Completeness of containment 3.3 Applying Well-Known Reasoning 3.3.1 Bayesian integration 3.3.2 Dempster-Shafer integration 3.4 Qualitative Evaluation of Integration Approaches 3.5 Summary and Conclusion

47 47 49 53 56 58 62 66 68 70 70 74 76 82

4 Context Spaces Algebra and Logic Based Reasoning 4.1 Algebra for the NCS Model 4.1.1 Relationships between situation spaces 4.1.2 Combinations of situation spaces 4.2 Operations for the Extended Model 4.2.1 Composing situation spaces in the general case 4.2.2 Composing different situations 4.2.3 Reconciling different perspectives 4.2.4 Composing and partitioning with a global model 4.2.5 Negation of situations 4.3 Evaluating Complex Situation Expressions

ix

84 84 85 88 92 93 98 100 101 103 106


4.3.1 Reasoning about complex situation expressions 4.3.2 A strategy for reasoning about complex situation expressions 4.3.3 Comparing between complex situation expressions 4.4 Summary

106 104 106 107

5 Design and Implementation of ECORA Framework 5.1 Introduction 5.2 A Framework for Context-Aware Computing 5.2.1 Overview 5.2.2 Packages 5.2.3 The client perspective – computing transparency 5.2.2 The reasoning engine – inference and state analysis 5.2.3 The COR-DB service – scalable data management 5.3 Using the Framework with Mobile Agents 5.3.1 Agent communication and Publish Subscribe model 5.3.2 Integrating mobile agents with Publish-Subscribe 5.4 Summary and Conclusion

130 130 138 139 142 144 149 151 152 156 158 165

6 Evaluation and Validation of Context Spaces Based Reasoning 6.1 Introduction 6.2 Reasoning about situations under uncertainty 6.2.1 Performance of algorithm in simulation 6.2.2 Performance of algorithm in a real-life case 6.2.3 Benefits of incorporating the model’s heuristics 6.2.4 Optimising reasoning by learning the model’s parameters 6.3 Applying Context Algebra and Logic in Reasoning 6.3.1 Reasoning about complex situation expressions 6.3.2 Merging and partitioning situation spaces 6.3.3 Adaptive reasoning and agent mobility 6.4 Summary

167 167 168 170 173 177 179 183 184 186 189 203

7 Advanced Extensions to Context Spaces 7.1 Verification of Uncertain Context 7.1.1 Verification based on a state-space difference measure 7.1.2 Verification based on situations natural flow 7.1.3 Verification based on context abstraction levels 7.1.4 Validation of the verification techniques 7.2 Stability in Context 7.2.1 A methodology for maintaining stability 7.2.2 Estimation procedure for Transition Areas 7.2.3 Estimating δt – state trajectory distance 7.2.4 Implementation and validation 7.3 Summary

109 109 111 115 118

8 Case studies and Applications of the Context Spaces Approach 8.1 A Unified Messaging Application 8.2 Management by Business Objectives 8.2.1 Business awareness through Context Spaces 8.2.2 Incident prioritization with Context Spaces approach 8.3 Stock Market Analysis and Option Trading

205 206 210 212 214 216

x

120 121 123 124 127 128


8.3.1 Use case application 8.4 Summary and Conclusion

218 221

9 Conclusion 9.1 Research Summary and Contribution 9.2 Future Work

223 223 226

References

228

Appendices and Exhibits

246

Glossary

248

xi


List of Figures 1.1 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.1 3.2 3.3 3.4 3.5 3.6 3.7 4.1 4.2 4.3 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6.14 6.15 6.16

Different aspects of the Context Spaces approach Classification of situations by clustering Cues and fusing data from multiple sensors CONON ontology and user defined rules Graphical representation of CML context model CSCP: XML serialization syntax of RDF Illustration of strengths, weaknesses and goals of context models A conceptual layered approach for context modelling and reasoning The Context-Situation Pyramid A visualization of a situation space and context state Changes in context with Context Spaces approach Relationship between situation spaces Examples of contribution functions Estimating containment in a region of acceptable values Different approaches to model information Relationships between situation spaces Intersection between situation spaces Visualization of situation spaces and their intersection Normalization in the state-space difference measure Situation inference problem and natural flow relationships Context-state trajectory and its relationship with situation spaces Relating other events to contradicting events using situation spaces An illustration of the concept of transition areas Context attribute and corresponding boundary areas δt estimation Illustrating required sensitivity δt for temperature readings Identifying irregular behaviour Four functional tiers in framework architecture

High level deployment architecture diagram High-level functionality description by class packages Routing requests by service type Client program using the framework proxy object Sharing context models Sharing context models, class diagram and involved design patterns Reasoning engine (CORE) activity Handling high loads and quality of data Architecture integrating context-aware mobile agents into framework The problem of publish-subscribe communication with mobile agents Communication between agents of different toolkits Effect of bandwidth and duration of stay over messages loss Aggregated lost messages in a high bandwidth experimental run Effect of duration of stay with different migration delays guarantee message delivery for stateless event-based communication

xii

8 18 20 25 27 30 39 41 46 49 50 54 59 63 77 86 89 90 114 117 118 120 123 123 126 127 128 129 142 143 144 146 147 149 150 151 153 156 160 163 164 164 164 165


6.17 6.18 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 7.13a 7.13b 7.14a 7.14b 7.15 7.16 7.17 7.18 7.19 7.20 7.21 7.22 7.23 7.24a 7.24b 7.25 7.26 7.27 7.28 7.29 7.30 8.1 8.2 8.3 8.4 8.5 8.6

Interaction between agents, MobileConsumer and RouterProxy Groups of agents relate to specific proxies via the proxy directory Effect of asymmetric attributes Effect of sensors values Effect of sensors inaccuracies Deployment snapshot of experiment components Sources of information and functional activity of the fusion Experimental run Berkeley Motes and Ekahau Positioning Engine General design of weight learning approach Inferences of situations with different weight combinations Support levels for ‘User Presenting’ for different weight settings Differences between support levels results of two data fusion and modelling approaches ConSpaF, notebook ON during meeting DS, notebook ON during meeting ConSpaF, PDA taken away during meeting DS, PDA taken away during meeting Evaluating complex situation expressions under uncertainty Demonstrating reasoning about a single situation space Reasoning with different models Comparing results of merging models Lack of information weakens reasoning Splitting the model strengthens reasoning Reasoning agent proactively migrates to gain additional viewpoints Effect of splitting and merging models Results of an experimental run with added uncertainty A meeting User working in office Example logical filtering scenarios Filtering errors vs. sensor reading errors Implementation, functional analysis and sensors simulation Typical experimental run Unpredictable normal abrupt changes Switched filter and unpredictable changes GUI of the reasoning engine server for the UMA case GUI of CORE-Light reasoning applied to MBO Context Spaces approach applied to incident prioritization ELN‘s price and volume graph representations An illustration of the concept of transition areas for ELN Derivative and filter based context aware system

xiii

166 166 173 173 174 175 176 177 178 179 181 181 182 183 184 184 184 184 187 187 189 189 189 189 191 191 194 194 194 198 198 200 202 203 204 211 215 217 220 221 222


List of Tables 3.1 3.2 3.3 3.4 4.1 4.2 4.3 4.4 4.5 4.6 5.1 7.1

Impact of heuristics on sensor data fusion method Sensory information Computing mass values to events Modelling with ConSpaF Definition of regions of acceptable values for two situation spaces Situation spaces defined in different context Situation spaces with associated weights and contributions Resulting combined situation space A situation space with associated weights and contributions Resulting negated situation space Regions of values in ‘Presentation’ and ‘Meeting’ situation spaces Sensors definitions for simulation of ‘user in meeting‘

76 78 79 80 88 93 97 98 104 104 115 172

Definitions 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11

Context Attribute Application Space Context State Situation Space Containment operator Matching function Inference function Relevance function Contribution (utility value) function Symmetrically Contributing Context Attribute Asymmetrically Contributing Context Attribute Probability assignment function I Probability assignment function II Containment Identical Containment Partial Containment Overlap Orthogonal Intersection operator Situation Spaces merge operator Relevance transformation function for merge Contribution transformation function for merge Merging opposing situation spaces Merging and Splitting with a global model xiv

47 47 48 48 51 56 56 57 58 64 64 69 69 84 84 85 85 85 87 93 94 95 99 100


4.12 4.13 4.14 5.1

Negation operator on situation space Relevance transformation function for negation operation Contribution transformation function for negation operation Natural Flow

xv

101 102 102 116


C

H

A

P

T

E

R

O

Introduction

N

1

E

1.1 Introduction Recent advances in emerging computing technologies and communications evolved into ample pioneering initiatives, leading towards a world in which computing systems are distributed, mobile, intelligent and cooperative. Key in transforming theory to realisation is the continuous development of basic hardware components enabling devices to utilize greater processing power with lower energy consumption, sense the physical environment and exploit new forms of wireless communications. Development of innovative software backed by theory complements this process and is anticipated to take advantage of these and other technological advances to accomplish visions of future computing systems. Congruent with the evolution of computing systems is a new paradigm, often termed pervasive or ubiquitous computing, which leverages on the use of devices that can carry out computing in a relatively non-intrusive manner and ultimately support many aspects of work and everyday activities. The vision for a pervasive computing system is one which is saturated with computation and communication capabilities and yet is transparently and gracefully integrated in the environment [WE91, SB04]. Pervasive or ubiquitous computing has often been perceived as the next step in the evolution of distributed systems, in which computing components are not only distributed and mobile but also embedded in a large number of commonplace devices. Ubiquity of computing devices facilitates non-traditional uses and concerns research from a variety of disciplines, including distributed and mobile computing, artificial intelligence, computer supported cooperative work, human-computer interaction, and more.

1


To attain the pervasive paradigm, multidisciplinary research has begun to look into various issues concerning pervasive computing systems, ranging from architectural, algorithmic and technological challenges [YO00, PR99] to social-oriented concerns, such as privacy, security and trust [SA00a, BS93]. During this process, a number of different pertinent research areas have been recognized, out of which context-aware computing has been identified as a key ingredient in attaining the pervasive computing vision [SA01a]. Central to the notion of pervasive systems is the ability to become context-aware. Research in context-aware computing endeavours to make systems aware of specific, valuable circumstances in the computing environment, and enable them to modify their behaviour accordingly. In the context of pervasive environments, context-aware systems are those which can respond (possibly intelligently) to context information acquired by any type of sensor (either physical or virtual). This in turn, enhances services provided to users (including service personalization), makes pervasive systems intelligent by reacting (and possibly pro-acting) to changing circumstances, and promotes adaptability and autonomy of systems, liberating users from avoidable interactions. Context-awareness in pervasive computing systems poses a major research challenge concerning a variety of issues originating from the underlying requirements of pervasive environments. Uncertainty associated with sensory originated information, diversity of pertinent context, complexity and heterogeneity of pervasive computing systems, all make the realization of the vision of context-aware pervasive computing systems more challenging. To address challenges in context-aware computing, as a step towards realisation of the vision of pervasive computing, research has started to investigate different aspects of context, including gathering, discovering, modelling, reasoning and managing context.

1.2 Research Objectives and Scope of Thesis This dissertation addresses challenges concerning context-awareness in pervasive computing systems, starting by proposing a theoretical model, which defines and facilitates reasoning about context, context management and proactive behaviour of pervasive systems. Based on the model, which we view as a fundamental building block in obtaining context-awareness capabilities, we address challenges in context-aware

2


pervasive systems and develop solutions in the form of algorithms, methodologies, architecture and implementation. We aim to deal with a higher level of complexity in context-aware computing research, evolving from stand-alone, specific applications to heterogeneous, large scale context-aware pervasive systems. Dealing with these challenges calls for solutions that share or make use of an appropriate theoretical model, effective reasoning approaches and suitable architectures. Our proposed research starts from building a unifying theoretical foundation to model and reason about context. Towards this end we investigate an approach for representing context using geometrical metaphors, describing context and related concepts in multidimensional space. We pose the question of whether such a representation is useful in describing context in a general and practical way, and whether it is insightful for developing new approaches to deal with existing challenges of context-aware computing. We have found this approach to be an effective way for modelling and reasoning about context and providing a basis for investigating a variety of context related issues. Based on the model, we address issues such as dealing with context uncertainty, applying generic reasoning in changing circumstances, rapid prototyping of context-aware systems, dealing with complexity of pervasive systems and facilitating agility and proactive adaptation of pervasive systems. The focus on context-aware computing in pervasive environments defines the scope of this dissertation. We investigate challenges and propose solutions in context-aware computing. The thesis identifies gaps in modelling context, reasoning about context and building context-aware systems. It proposes a new approach to deal with context in the form of a new context model, novel reasoning algorithms and innovative architectural approach. Accordingly, this research is guided by the following research questions: 1. Can a general theory about context be developed from spatial intuitions? Would a general theory capture context details for a significantly large number of context types? And can such a theory contribute to our understanding of context and the development of reasoning approaches about context? 2. What approaches can be used in the process of reasoning about uncertain context? Can they be built over a unifying theoretical foundation? And is it possible to translate this unifying theory into an implement-able framework?

3


3. What type of architectural approach should be used to build such framework, and could it deal with complexities associated with pervasive environments? Is it possible to incorporate mobile agent technology into the context framework to increase pervasive systems agility?

1.3 Organization of Dissertation The dissertation is arranged in succession of background, theoretical contributions, architectural approach, evaluation, extensions, application uses and conclusion. It progressively presents different facets of our proposed model and approach, and builds upon these as basis for developing algorithms and practical uses to deal with various context-related challenges. Roadmap for the thesis layout is presented in Figure 1.1. The thesis comprises a background chapter (Chapter 2) followed by two theoretical chapters (Chapters 3 and 4), presenting the research theoretical contributions. Design, implementation and evaluation of the proposed approaches are presented in the next two chapters (Chapters 5 and 6). Advanced extensions and their validation are presented in Chapter 7. Case studies and application are presented in Chapter 8 and conclusion in Chapter 9.

Background Chapter 2

Theory Chapter 3

Theory Chapter 4

Implementation & Evaluation Chapter 5

Implementation & Evaluation Chapter 6

Extensions Chapter 7

Applications Chapter 8

Conclusion Chapter 9

Fig. 1.1 – Thesis structure

4


Primary research components are presented in Figure 1.2. Built over the Context Spaces model, approaches for reasoning and analysing context are developed. Based on these approaches, a context framework and applications are designed and implemented.

C o n t e x t F r a m e w o r k (Ch. 5)

A p p l I c a t i o n s

Context Stability (Ch. 7)

Managing context changes

Context Spaces Algebra & logic (Ch. 4)

Operators for manipulating context

Context Spaces Reasoning (Ch. 3, 4, 7)

Achieving context and situation awareness

Context Spaces Model (Ch. 3)

Context with state-space representation

(Ch. 8)

Fig. 1.2 - Different aspects of Context Spaces approach

We begin in Chapter 2 with a discussion on background and related work on the state of the art in modelling and reasoning about context, and review existing architectures in pervasive computing environments. We categorise, examine and analyse different modelling approaches, their characteristics and underlying reasoning philosophy. We offer our interpretation on the relationships between modelling and reasoning about context and identify important properties in context models. We use these properties to evaluate context models and explore their relative strengths and weaknesses. Based on this evaluation, we identify missing attributes and theoretical gaps in current modelling endeavours and motivate the need for models that deal with these issues. We relate our findings to existing architectural approaches in designing context-aware computing infrastructure, and discuss their advantages and disadvantages. In Chapter 3 we present the core concepts of the Context Spaces modelling approach. The proposed model overcomes shortcomings analyzed in Chapter 2 as well as accommodating properties that have been outlined in Chapter 2. We first present the basic model, termed the Naïve “Context Spaces” [PL04a], which is represented with concepts exclusively drawn from geometrical metaphors. We discuss merits of the naïve approach as well as relative limitations. We then develop the extended model, gradually introducing additional modelling extensions and developing appropriate and effective reasoning capabilities for context-aware systems. We propose and develop a novel data fusion 5


approach, termed “ConSpaFâ€? [PL05b, PZ06c] for reasoning about context, which is built over the proposed extended context model. We also show that having unifying characteristics for representing context and being an insightful instrument for reasoning, the model can also be used with different well-known reasoning approaches [PZ06b]. We demonstrate how Bayesian [BA63] and Dempster-Shafer [SH76] reasoning approaches can be applied with Context Spaces as the underlying description of context. The naĂŻve and extended Context Spaces modelling approach, including resulting reasoning methods (e.g. ConSpaF) have been presented and validated in [PL04a, PL05b, PZ05, PZ04b, PL05a, PB05, AP05, PZ06b, PZ06c]. Chapter 4 presents advanced modelling with the concepts described in Chapter 3. We develop algebra and logic for Context Spaces, which emphasise the value of the spatial approach inherent to the model. From developing, in Chapter 3, data fusion approaches to reason about a single situation; we turn to reasoning about a set of situations. We highlight the importance of concepts dealing with situations, representing primary building blocks in the model. The proposed algebra represents relationships between concepts and provides useful operations that can be applied over these concepts. The proposed operations deal with a variety of challenges in context-aware pervasive computing systems, such as composing together and reconciling between different context perspectives and facilitating more reliable reasoning outcomes. Finally, we develop an approach for evaluating the validity of expressions, which describe logically conditioned situations. Our approach incorporates the impact of uncertainty and enables evaluation (and resolution) of mutually exclusive expressions, even if inaccurate sensory evidence supports several of these expressions. The use of Context Spaces algebraic operations for reasoning and managing contextaware systems and enhancing proactive behaviour of such systems have been presented in [PL05a, PL04b, PZ06a, PL06]. Using Context Spaces based logic evaluation for reasoning about complex situation expressions under uncertainty has been demonstrated in the Workshop [PB05]. Having presented our main theoretical approach in chapters 3 and 4, Chapter 5 integrates our model, concepts and algorithmic methods into a framework for contextaware computing, termed ECORA. We present design and implementation details for building robust and agile pervasive systems that have a significant reasoning ingredient. We present our functional approach, design and implementation for applying our theory. We describe the ECORA framework including a reasoning engine as a main component 6


within a larger distributed architecture. We also discuss scalability, communication and usability of the framework. Finally, we present what we consider the next step in developing context-aware computing applications, namely, deploying context-aware mobile agents as part of our framework to address existing architectural challenges in pervasive systems. We discuss our design, implementation and evaluation for achieving this goal, including applying event-notification communication between context-aware mobile agents. Uses of the reasoning engine for reasoning about context have been established in [PL05a, PL05b, PL04b] and demonstrated in the workshops [PB05, PA05]. Development of reliable event notification mechanism among context-aware mobile agents including evaluation of the proposed approach and discussion of context-aware messaging has been presented in [PZ04a, PL03, PZ03, LP03]. Advantages and disadvantages of using mobile agent technology and its suitability for future pervasive computing systems have been presented in [PP05a]. Chapter 6 experimentally evaluates and validates the theoretical concepts and contributions proposed and developed in chapters 3 and 4 and implemented in chapter 5. The chapter focuses on various types of reasoning made viable through the use of Context Spaces concepts and related algorithms. We evaluate with a set of experiments the objective of modelling and reasoning about context, in a general way under uncertainty. Reasoning performance is evaluated in various scenarios including simulation and reallife cases with real sensors. We also develop, demonstrate and evaluate an optimization approach that refines the model for reasoning, and analyse and draw comparisons through experimentation between performances of different reasoning techniques applied with Context Spaces. We then demonstrate the use of our proposed logical evaluation for comparing logically conditioned situations under uncertainty (Chapter 4), and evaluate the effect of applying Context Spaces Algebra operations (Chapter 4) for enhancing reasoning and promoting proactive agent behaviour in open, context-aware pervasive computing systems. Experimentation results of Chapter 7 have been presented and validated in evaluation sections of [PL05a, PL05b, PL04b, PL04c, PZ05, AP05, ZA05, PL06, PZ06b, PZ06c]. In Chapter 7 we propose and develop extensions to reasoning of the Context Spaces model. Our proposed approaches make use of different aspects of Context Spaces. We first develop three context verification techniques designed to resolve conflicts and 7


information discrepancies arising during reasoning. The procedures address different types of involved uncertainty and provide guidelines based on heuristics to direct contextaware systems in achieving conflict resolution. We then exploit aspects of the model that enable characterisation of context changes at run-time. We use these features to develop an approach for maintaining the stability of pervasive systems in chosen context. We propose a methodology for achieving this goal and develop an algorithm for real-time analysis of sensory originated information. We experimentally validate the proposed approaches. The verification techniques have been presented and validated in [PL05a, PL04b, PL04c]. The concept and approaches of maintaining the stability of pervasive systems in given context, including cases of achieving systems dependability and forecasting instability in stock derivatives portfolios have been presented in [PZ05, PZ04b, AP05, ZA05]. Chapter 8 discusses case studies and applications from diverse domains that make use of the Context Spaces approach for context-awareness. The case studies indicate the generality of our modelling approach and its practical use. We first present uses of the context framework we have developed in Chapter 5 in a Unified Messaging Application scenario. This illustrates client programming tasks for interfacing with the framework and demonstrates resulting context-awareness capabilities. We then present a joint project with Hewlett-Packard Research Labs, applying the Context Spaces approach to deal with a challenge of managing systems by business objectives. We describe this initiative and how our approach successfully integrates with it and solves existing challenges. Finally, we present the application of Context Spaces to a portfolio management case, based on collaborative efforts with University of Quebec, Montreal, as an approach to forecast stock price changes and maintain stability of profit in option trade stock market cases. The use of Context Spaces approach for managing IT infrastructure by business objectives has been published in proceedings of [PB05] and demonstrated in [PB05, PA05]. Using Context approach for adaptive stock price derivatives portfolio management has been presented in [AP05, ZA05]. We conclude the dissertation in Chapter 9, presenting research summary and contributions of the thesis and future research directions.

8


C

H

A

P

T

E

R

T

Modelling, Reasoning and Designing Context-Aware

W

O

2

Pervasive Computing Systems This chapter reviews related work in the field of context-aware pervasive computing under the premise that dealing with uncertainty via appropriate context models and designing suitable architectures play key roles in the future success of context-aware pervasive computing systems. We explore two important stages in building context-aware applications. First, we focus on existing context models and reasoning approaches based on these models. Then, we review architectural approaches for building concrete applications using suitable infrastructure and context models. We explore the link between context-aware applications and sensors, on the one hand, and on communication facilities that disseminate sensory originated information [YO00, BA03], on the other. We note the uncertainty associated with the available sensed information [HI04b, SA01a, SA01b] and emphasise the need for suitable context models and reasoning approaches as the basis of context-aware computing infrastructure. We begin in Section 2.2 by first proposing a definition of context that recognizes the relationship between modelling and reasoning about context. We then make use of the underlying concepts of different context models as a criterion for a broad classification of existing modelling approaches. We identify four main properties that are advantageous in context-aware computing and review related work in modelling context according to these properties. In Section 2.3 we qualitatively evaluate the different modelling approaches with respect to the criteria we have outlined in Section 2.2. We evaluate strengths and weaknesses of specific models and examine the limitations of each group of models. Resulting from our evaluation, we identify a theoretical gap which currently exists in modelling context and we outline goals for modelling context. In Section 2.4 we turn to review existing architectural approaches in building context-aware computing infrastructure.

9


2.1 Reasoning and Modelling Context The notion of context and its interpretation depend on the domain in which context is utilized. Context, as a concept affecting the behaviour of systems, has been used in different computing domains. It has been traditionally considered in Natural Languages Processing (e.g. [MO95, IW95]), in Database and Knowledge Representation (e.g. [GM94]) and in Human-Computer Interaction (e.g. [RC98, MH92]), to name a few. Context-awareness in pervasive computing systems presents a relatively recent research area [HB98, SA01a]. The highly dynamic and complex nature of pervasive systems has created an emerging necessity for adaptability and purposeful evolution of systems. A study of context in which systems operate and adapt as well as the awareness of such systems to context changes is coupled with the attempt to enrich user experiences and enhance performance. To make context-awareness in pervasive environments feasible, different aspects of context-aware computing, including reasoning about context, modelling context, gathering, sharing and communicating contextual information need to be dealt with. These aspects are concerned with the general characteristics of pervasive computing environments, i.e., open, complex and dynamic heterogeneous computing systems, serving a variety of independent applications and users and requiring reasoning about context under uncertain conditions [PR99, SA01a, SA01b]. In recent years, research efforts have focused on these aspects of context, including context middleware and toolkits [CF03a, DS01, CR03] for information acquisition, ontologies that provide vocabularies to describe and share context information [CF03a, CF03b], different approaches to reasoning about context [WS02a, RA04] and a variety of context models [SL04]. Context models provide the basis for achieving context-awareness by representing information that describes relevant context in a consistent and general way. While middleware and toolkits assist in the acquisition of contextual data (e.g. [Q28]) and its dissemination across the context-aware platforms, they do not always provide mechanisms for inferring context. Reasoning about context without an underlying general context model becomes application specific [HL01], weakening the ability to easily apply context-awareness for different applications, in changing domains and scenarios. Communicating contextual information in uncertain environments (e.g., using common

10


vocabularies) but without an effective inference mechanism can be insufficient. Context models are, therefore, the means to bind reasoning and description of context together, and influences the applicability and scope of context-aware computing systems. Consequently, emerging research is looking at context-aware systems more generally, independently of specific applications, recognizing the need for unified approaches to context modelling and effective reasoning. Research in context-awareness has recognized the complex nature of context in many context-aware computing applications. From relatively naïve modelling of context, where particular types of context, typically those of location or user identities, were primarily modelled (e.g., [CD00, DC01, ST93b]), research has identified a broad range of additional relevant information types [SB99]. As a next step in modelling context, it is increasingly acknowledged that context does not only reflect various circumstances but that diverse information is necessary to model these circumstances. This fact is pertinent in pervasive environments incorporating various sensors as primary sources of information, where a single type of information cannot sufficiently reflect relevant context [GS02]. We, therefore, begin our discussion by determining what a context model is and what kind of relationships exist between modelling context and reasoning about context. A context model is a representation scheme for information that can be used for reasoning about context. The term context, which generally refers to “that which surrounds, and gives meaning to, something else”1, has been the focus of study in the context-aware computing research community, yielding different definitions of context in regard to the pervasive computing paradigm (e.g. [DE01, SA94, DA99, CK00, PA98, SB99]). In particular, the notion of a situation, which is generally defined as “the combination of circumstances at a given moment”2 versus context, has been used in different ways. Some perceive situations at a higher level of abstraction than context (where contextual information can be aggregated to determine situations of entities) [LO05], and others use the term ‘situation’ in reference to the real world, and context in reference to its modelled representation [GS02]. The distinction between context and realworld situations demonstrates the necessity for reasoning approaches to infer situations based on sensed or computed context. There is an inherent gap between the real-world and the world that can be perceived by computer systems, yielding uncertainty and ambiguity in system perceived context, with consequent effect on the performance of context-aware 1 2

Dictionary definition of context, in http://www.dictionary.com Dictionary definition of situation, in http://www.dictionary.com

11


systems. Under such circumstances, a reasoning capability is required to evaluate context and determine occurrences of situations. Hence, the primary goal of context models is to enable context-awareness by performing some type of reasoning. We view modelling and reasoning about context as two interdependent activities. Modelling context can be interpreted as a process of building a representation that supposedly embodies occurrences of real-life situations that can be reasoned about. The context model, therefore, is a reflection of the observer’s ability to interpret the occurrences of situations, and context is the information used in that model. Reasoning about context can be viewed as the process of evaluating context information as specified by the model. Assessing the association and mapping between context and situations, or in other words, determining occurrences of situations based on a model, is the goal of reasoning. By using context modelling in context-aware computing different benefits can be obtained. We identify the following four major properties that a context model should support: 1. Reasoning under uncertainty – Enable effective reasoning about context under uncertain conditions, including the development of new approaches specifically suitable for context-aware computing. 2. Developing general context models – Develop general context models, applicable to a large number of context-aware scenarios in different application domains. 3. Rapid and easy prototyping of applications – Allow simple and straightforward prototyping of new context-aware applications (applicable in different scenarios), including clear guidelines for performing such tasks. Be able to formally capture relevant contextual information while at the same time provide a natural (or intuitive) modelling approach for describing context. 4. Managing context effectively – Manage (e.g., manipulate, predict and share) contextual information to promote pervasive systems adaptation and management in heterogeneous and complex environments.

Under uncertainty, reasoning is essential for becoming context-aware. Adding the capability to reason about context for a variety of applications and domains contributes to the applicability of the context model and reasoning approach [HL01]. General modelling of context also contributes to rapid prototyping of new context-aware applications, where 12


we emphasise the need for clear guidelines on how and what kind of information should be modelled for achieving context-awareness. Finally, additional benefits can be achieved by cleverly managing the modelled context information, so that applications enrich their knowledge by sharing information, infer additional context based on existing context, or modify their behaviour pro-actively rather than being reactive. The four identified major properties can be used to differentiate between and evaluate existing context models. A primary differentiation between context models can be attributed to the type of reasoning and inference capabilities they enable. Different approaches to reasoning about context are based on different schemes for representing relevant facts required by the reasoning method. The relationship between a general context model and the reasoning approaches it enables is essential in evaluating its suitability for context-aware computing scenarios. The ability of a context model to represent context for a variety of applications, and the reasoning techniques that can be used with such a model, become key considerations in choosing a suitable context model. Further, we argue that a model, which sufficiently supports the complete set of properties outlined above, would require a suitable theoretical foundation, which is specifically developed for context-aware computing. We present in the next subsection a classification of context models, which are based on different theoretical foundations. Different modelling approaches excel in different properties, depending on their underlying theoretical strengths and their relevance to context-aware computing.

2.1.1 Sensor data fusion and classification models An important aspect in many context-aware applications is the ability to reason about incoming real-time data streams and consequently infer the occurring situation. The applicability of classification and sensor data fusion techniques in achieving contextawareness has been demonstrated in a number of applications, including [FH03, WS03, LA01b, GS02, HK01]. This has been particularly useful in reasoning about context under uncertain conditions. Modelling information in many sensor fusion based approaches is application specific, however, making portability of particular implementations across applications and domains difficult.

13


Integrating information from multiple sensors and data sources can provide more accurate estimates about situations of interest than using a single type of sensory originated information [GS02, SE01]. Further, combining a number of different singlepurpose sensors, where each reflects only a partial view of the environment, may produce a better understanding of a situation than if a single but more sophisticated sensor were employed [GS02]. The role of sensor fusion in context-aware applications thus becomes an essential ingredient for achieving context and situation awareness. There are various approaches, which can be used for performing sensor data fusion for context-awareness. These generally comprise detection, classification and identification methods, such as feature based reasoning (including parametric, e.g. supervised neural networks and nonparametric, e.g. Dempster-Shafer), cognitive based models (e.g. knowledge based) and physical models (e.g. Kalman filters) [KL99]. In this subsection, we focus on classification and statistically based multi-sensor data fusion techniques used in context-aware computing3. In recent years, research projects on context-awareness have begun to explore well known techniques of sensor data fusion to reason about context. Fox et al. [FH03] uses variants of Bayesian Filters (e.g. Kalman filters, Particle filters) as well as a combined model of Bayesian techniques for location tracking. Location was computed by integrating readings of inaccurate sensors such as ultrasound and infrared badges. Another Bayesian based reasoning approach was presented in [CM00] to compute estimates of indoor locations of devices by integrating the signal-to-noise ratio (SNR) between a device and wireless base-stations. Wu et al. [WS03, WS02b] applied and evaluated the Dempster-Shafer algorithm, which can be considered a generalization of Bayesian theory [KL99], for classifying sensory data and achieving context-awareness. Compared with classic Bayesian methods, the ability to assign an uncertainty measure to propositions is an appealing feature of the Dempster-Shafer approach [WS02b]. Wu et al. [WS03] proposed a modification to the Dempster-Shafer algorithm by adding weights reflecting trust in the observations considered by the algorithm. The proposed approach applies to time-invariant stochastic processes, and provides arguments for improving the correctness of the fusion. However, the contribution of adding weights is unclear, as the degree of trust in sensory information can arguably be incorporated within Dempster-Shafer rule of combination itself. This can 3

We distinguish these techniques from logic based reasoning approaches, to which we dedicate a separate subsection, i.e., using logic for combining application rules, such as in fuzzy logic based systems.

14


be achieved by considering reliability of sensors as part of the computation process of mass density functions, which are basic constituents of the Dempster-Shafer approach. A different approach for combining sensory data for context-awareness was presented by van Laerhoven et al. in [LA01a, LA01b], advocating the use of multiple low-cost sensors instead of a single sophisticated and relatively accurate sensor ([e.g., in RS00, SS98]). In the process of sensor fusion [LA01a, LA01b], an unsupervised self-organizing map (an unsupervised neural network), coupled with K-Means clustering technique was used to cluster data. By combining both techniques, classification of the input vector (i.e., sensor readings) was achieved. An additional layer of Markov Model computing probabilities of transitions between situations was added to improve the overall inference accuracy. This architecture is illustrated in Figure 2.1. Himberg et al. [HF3] used Symbol Clustering Map for achieving context-awareness, integrating information from sensors for ambient illumination, noise, air humidity, temperature, touch and 3D-acceleration. Features of clusters were purposefully sampled to achieve classification and used for identifying user activities such as standing, walking or talking. In [HK01] an approach of time series segmentation was applied to context recognition in mobile devices, capturing significant changes between context states, characterized by a large number of sensed information. Discovered segments were identified and used as templates for inferring user activities. Input

KSOM

KMeans

Label

wij x1 x2 . . . xn

wij1

“Walking”

wij 2

“Walking”

. . .

wijk

“Running”

Markov chain Fig. 2.1 (adopted from [LA01b]) – Classification of situations achieved by clustering input data streams: KSOM topology-preserving clustering coupled with K-Means clustering over labelled input vectors; Markov Chain reinforces clustering results of KSOM.

15


Simpler approaches, applied in the Smart Badge [SM98] and the Sensor Badge [FM99] projects, have integrated diverse types of sensor information for achieving context-awareness. These projects developed devices (e.g., wearable sensor badge and sensor jacket) with a number of sensors for capturing context, facilitating reasoning about the subject’s activities. The integration approach was heuristically based, and specifically tailored to each application. Although a number of projects involved reasoning about context by fusion of sensory originated information, no underlying general purpose context model has been proposed. Rather, each technique processed sensory information according to its particular algorithm (sometimes requiring application specific training of algorithms) or used a simplistic context model suitable to the specific data fusion task. For example, in [LA01a, LA01b, GS02] “cues” (as illustrated in Figure 2.2 and also known as cooking the data, for example in [GL99]) were used as a simplistic modelling approach to represent raw sensor readings in a format suitable for data classification. Such approach is common in data fusion for context awareness and has been shown to significantly improve inference results. While modelling of context has been relatively simplistic, and tailored for particular algorithms rather than represented in a general context model, the different methods for sensor data fusion look promising for inferring and interpreting context in uncertain environments. From the modelling perspective, we consider such modelling of context as lacking many of the sought after properties of context models, even though amenable to reasoning. Raw data

Analysis

Context

Multiple sensors Context Cue Cue 1,1 1,2

...

Cue 1,i

Sensor 1

Cue Cue 2,1 2,2

Cue 2,j

Sensor 2

...

Cue Cue n,1 n,2

...

Cue n,k

Sensor n

Fig. 2.2 (adopted from [LA01a, GS02]) – A fundamental approach of fusing data from multiple sensors (top) and a basic architecture of “cues” abstracting raw sensor data for better classification (bottom).

16


2.1.2 Logic based reasoning, models and ontology Formal logic underpins reasoned argumentation and is one of the approaches to describe situations and knowledge. As such it has been used in a number of context modelling and reasoning approaches. Different types of logic (e.g., propositional logic, predicate logic, fuzzy logic and so on) provide formal basis to represent facts concerning contextual information. Reasoning is applied over statements describing relationships between facts using a collection of rules, and determines the validity of these statements (or for determining actions, in the case of fuzzy logic). Logic based models, including some context models (e.g., [MC93, MB97, GG01, GF93]), are characterized by a high degree of formalization. This enables precise description of contextual facts and relationships, which, in some cases, lead to effective rule-based reasoning, but may also be non-intuitive and difficult to model and understand. Akman et al. [AS97] present a context model based on the premises of logic, which extends situation theory [BP83]. Situation theory mathematically models the concept of situations using information units, termed “infons� [DE91]. Using the situation theory approach Akman et al. [AS97] represent context as a situation type that supports two kinds of infons, namely, factual infons, stating the facts, and conditional infons, representing the relations between facts and axioms within the context. Context, therefore, is the combination of facts and rules that govern the relations within the context. Being a situation type, context is treated as a first class object of situation theory and can also capture rules and assumptions that are specific to a particular viewpoint [AS97]. To illustrate extended situation theory as a logic-based approach for context modelling, representing context in terms of facts and rules, consider the example below. We combine several cases that are discussed in [AS97]. First, factual infons, stating isolated facts, are defined. Infons are represented with the following n-place relation R: <<R, a1 , a 2 ,..., a n , i >>. Here, a1 , a 2 ,..., a n represent relevant facts for the relation R, and i states whether the relation holds (in which case i = 1), or whether the relation does not hold (in which case i = 0). Given this representation, consider the following group of infons that are involved in context s. <<student, Sullivan, Drofnats University, 1>> <<m.s. advisor, Acker, Sullivan, 1>> <<m.s. committee-member, Kraft, Sullivan, 1>>

17


These infons state factual relations such as Acker being Sullivan’s advisor and Kraft being a committee member in Sullivan’s thesis presentation. Together with stating facts, extended situation theory specifies conditions or rules over situation types. Such rules are depicted below.

S1 = [ s& | s& |= << m.s.advisor, a& , b& , 1 >>] S 2 = [ s& | s& |= << m.s. committee-member, a& , b& , 1 >>] C = ( S1 ⇒ S 2 | B) S1 and S 2 represent situation types, which involve certain relations. For example, S1 involves the fact that a& is an advisor of b& . The conditional relationship between S1 and

S 2 is denoted by C = ( S1 ⇒ S 2 | B) , which states that if a& is an advisor of b& then he is usually (under background conditions B) also a committee member in b& ’s thesis presentation. A background condition can be the following: B╞ << family-relative, a& , b& , 0 >>, i.e., a& cannot be a family relative of b& in order to be

a committee member in his presentation. Similarly, the example below states that if something is a bird, physically located in the air and it is not a penguin then it flies.

S1 = [ s& | s& |= << bird, a& , 1 >> S 2 = [ s& | s& |= << flies, a& , 1 >> B╞ << present, air, 1 >> ∧ << penguin, a& , 0 >>

C = S1 ⇒ S 2 | B

A popular choice of logic for context representation is first order predicate logic, which is an expansion of the more basic formalism of propositional logic. Predicates are templates or expressions, represented by verbal phrases describing properties of objects or relationships between objects. Predicate logic, thus, provides a mathematical model for reasoning with information represented by predicates. Ranganathan et al. [RA04] uses predicates to represent contextual information, enabling reasoning about context with logic-based mechanisms and predetermined rules. The predicate, by convention, describes the type of contextual information (e.g., location, time or temperature) and is mainly used in a subject-object, i.e. context-type(<subject>,<object>) or subject-verb-object format, i.e., context-type(<subject>,<verb>,<object>)). For example, activity and location represent such predicates: activity(room3102, meeting), or location(Jeff, in, room3004). 18


Ranganathan et al. [RA04] support different types of logic, such as probabilistic logic [HF90], enabling representation of rules for reasoning about probabilities of events, and fuzzy logic for describing and reasoning about imprecise contextual information. Another context model built using predicates is presented by Gray et al. [GS01], identifying a propositional nature in sensed context. Thus, as a development of propositional logic, predicate logic is suitable for context representation. Further, it enables the composition of more complex context expressions from simpler ones as well as associating different properties to specific context [GS01]. Additional representation approaches that make use of underlying logic-based reasoning have been explored to model context. In particular, ontologies, which make use of description logic [BS00, CD99] as a foundation for logic-based reasoning, have been considered. Ontologies [GR93, GU95] provide collections of definitions about concepts and enable common understanding of terms by establishing a joint terminology. Information is represented in ontology languages such as OIL (Ontology Inference Layer) (www.ontoknowledge.org/oil/) or DAML+OIL (DARPA Agent Markup Language) (www.daml.org/) which are compatible with existing web standards such as XML (Extensible Markup Language) (www.w3.org/XML/), RDF (Resource Description Framework) (www.w3.org/RDF/) and RDFS (RDF Schema) (www.w3.org/TR/rdfschema) and can be easily converted into description logic and reasoned about with logic based inference mechanisms. OWL (Web Ontology Language) (www.w3.org/TR/owlref/) [HA02] is another ontology language, which can be roughly regarded as an equivalent to description logic. Description logic refers to a family of knowledge representation languages designed to represent application domain knowledge in a formal and structured way [BH03] and can be considered a subset of first-order predicate logic [NB02]. Ontologies play a key role in the semantic web paradigm [BH01], aiming at achieving machine-understandable web resources, whose information can then be shared and processed both by automated tools and human users [BH03]. In the context of contextaware computing systems, ontologies (through the use of ontology languages) contribute the following appealing features [GW04]:

Logic-based reasoning about context, mainly using application specific rules for inferring context, and discovering of inconsistent contextual information due to imperfect sensing.

Knowledge sharing based on common concepts, specified in a common ontology. 19


Reuse of information specified in well known ontologies. A number of architectures for context-aware computing are based on ontology as the

underlying context model and basis for reasoning. The CoBrA architecture [CF03c] is based on an ontological context model, built over OWL. Leveraging on OWL as an expressive standard for ontology specification contributes to knowledge sharing in heterogeneous environments and enables limited logic-based inference (using existing inference tools such as FaCT [HS99] and RACER [VH01]). The ontology presented Chen et al. [CF03c] is divided into the following four related categories: physical spaces, agents (including human and software agents), location of entities, and activities of agents. The ontology specifies relations between concepts of each category, including relationships between places, e.g., containment between physical spaces and their organizational properties, roles of agents and intention and desires of entities (e.g., of speakers and audience during presentation) [CF03c]. The CoBrA ontology is application- or domain- specific. These categories and a specific choice of ontology classes such as “PresentationHappeningNow” or “SpeakerRole”, and properties such as “PresentationTitle” or “PresentationAbstract” are specific to the scenario of an intelligent meeting room, illustrated in [CF03c]. Actual reasoning in CoBrA is mainly limited to discovering inconsistencies between facts, such as a person sensed to be located in two different locations. Resolution of such inconsistencies is restricted to the use of predetermined application rules regarding these facts. Another ontology based context model is the OWL-encoded CONON context model (CONtext ONtology) [WZ04, GW04]. The context ontology specifies four abstractions that are argued by the authors to be the most fundamental types of information for capturing context of entities, namely, location, user, activity and computational entity. In the CONON model, ontology concepts are divided into high level ontology (e.g., home or office) and lower level ontology, which describes entities in a specific domain. CONON leverages on OWL being formally similar to description logic and applies reasoning mechanisms for checking consistency of information and inferring high-level context from low-level explicit context. Ontology reasoning, i.e., reasoning using a description of ontology classes, is performed using description logic, which enables representation of rules between classes such as transitive properties, sub-classing and inverse relationships between predicates. In addition, user-defined rules can be added using first-order predicate logic to provide a more powerful context inference mechanism. These are application specific rules for inferring particular situations. Figure 2.3, adopted from 20


[WZ04], demonstrates parts of an ontology specified with OWL (top) and simple userdefined reasoning rules for inferring user situation (bottom). <owl:Class rdf:ID="ContextEntity"/> <owl:Class rdf:ID="Location"> <rdfs:subClassOf rdf:resource="#ContextEntity"/> </owl:Class> <owl:ObjectProperty rdf:ID="longtitude"> <rdf:type rdf:resource="FunctionalProperty"> <rdfs:domain rdf:resource="Location"> <rdfs:range rdf:resource="xsd:double"> </owl:ObjectProperty> ... <owl:Class rdf:ID="IndoorSpace"> <rdfs:subClassOf rdf:resource="#Location"/> <owl:disjointWith rdf:resource="#OutdoorSpace"/> </owl:Class> <owl:ObjectProperty rdf:ID="locatedIn"> <rdf:type="owl :TransitiveProperty"/> <rdfs:domain rdf:resource="#Entity"/> <rdfs:range rdf:resource="#Location"/> <owl:inverseOf rdf:resource="#contains "/> </owl:ObjectProperty> ...

Watching TV

Having Dinner

(?u locatedIn LivingRoom) ∧ (TVSet locatedIn LivingRoom) ∧ (TVSet status ON) ⇒(?u situation WATCHINGTV) (?u locatedIn DiningRoom) ∧ (?v locatedIn DiningRoom) ∧ (?u owl:differentFrom ?v) ⇒(?u situation HAVINGDINNER)

Fig. 2.3 (adopted from [WZ04]) – parts of high level CONON Ontology (top) and user defined rules for reasoning about activities (bottom).

Ranganathan et al. [RA04], uniformly represent context as predicates, of which structure and semantics are specified in ontology of context types, expressed in DAML+OIL. Reasoning is typically applied with some logic-based mechanism over predetermined rules. Another approach for context representation using ontology languages is the ASC model [SL03], consisting of three core concepts, namely, aspect, scale and context information. An aspect is a superset of all reachable states, assembled in related dimensions called scales. Context is defined as the entire context information about entities, which are relevant for a specific task. These main concepts are interconnected with the relations ‘hasAspect’, ‘hasScale’ and ‘constructedBy’ [SL03]. By

21


using ontologies to represent the model, knowledge sharing and reuse are achieved and ontology reasoning mechanisms can be used for inference. Another notable approach for context modelling is the Context Modelling Language (CML) [HI04a], which extends the Object-Role Modelling (ORM) approach [HA01]. CML uses logical predicates and concept abstractions in a graphical modelling approach to attain a model that assists designers to specify and explore context requirements and relevant information. Based on appealing features of ORM as a formal and expressive modelling approach, which also allows mapping of a model into a relational database representation4, CML provides extensions suitable for context-aware computing. The model uses the concept of fact types as a notation for relevant information types, also representing various related classifications (e.g., whether they are sensed, derived, profiled and so on), quality of information (including imperfect information [HI04b]), dependencies between information types and a variety of constraints regarding the modelled information [HI04a, HI02]. As a programming abstraction, more naturally associated with context-aware computing, CML defines the notion of a situation, expressed with a predicate-based logical expression (supporting logical connectives and existential quantifiers [HI04a]). A situation is expressed as: S (v1 ,..., v n ) : Ď• , where S is the situation name, variables

and

Ď• represents

a

logical

expression

applied

over

v1 ,..., vn are

the

set

of

variables {v1 ,..., v n } . While the model makes use of logic as a basic representation approach, its main focus is exploring, representing and delivering important associations and characteristics of facts for context-aware applications [HI02]. The main contribution of the model has been argued in [SL04] to be a graphical representation and structuring of contextual information, assisting in the design phase of context-aware applications, rather than in enabling reasoning. Consider the example in Figure 2.4, adopted from [HI04a], demonstrating the CML approach. The top part of the figure (a) demonstrates the graphical aspect of modelling context with CML, illustrating relationships between information types. The bottom part (b) maps the graphical context model in (a) into modelled relations. So, for example,

4

[HH99] is another example for modelling suitable for database intensive applications.

22


using the modelled relations, a specific person during runtime can be sensed to be located at a particular location with some associated probability.

Fig. 2.4 – CML - a graphical representation of a context model and mapped relations using predicates based on the model.

Based on the model above situations and associated actions can be articulated. For example the definition below using the Occupied predicate indicates if a person is associated with an activity and should not be interrupted. Occupied(person) :

∃t1 , t 2 , activity • EngagedIn[ person, activity, t1 , t 2 ] • (t1 ≤ timenow() ∧ (timenow() ≤ t 2 ∨ isnull (t 2 )) ∨ (t1 ≤ timenow() ∨ isnull (t1 )) ∧ timenow() ≤ t 2 ) ∧ (activity =" in _ meeting"∨ activity =" taking _ call" )

23


The activities for no interruption are either being in a meeting (in_meeting) or while taking a call (taking_call). To determine the association of a person with such activities the EngagedIn predicate needs to be evaluated. The predicate defines the relationships between the current time (i.e. during runtime and represented by the timenow()function) and a determined time interval (i.e. between t 1 and t 2 ).

2.1.3 Formats and structured data models The context models discussed in sections 2.2.1 and 2.2.2 are distinguished by specific reasoning approaches, whether statistically based classification of information or logical integration of rules, as the basis for modelling context. There are other kinds of context models, discussed below, which emphasize structural representation of contextual information rather than building on an underlying reasoning philosophy. While focusing on convenient structural representation most of these context models don’t have sound theoretical reasoning mechanism and therefore may not be appropriate for reasoning under uncertainty. Such models often build upon existing standards as suitable means to represent, share, query and report contextual data. A common approach of context modelling is to identify important context attributes (e.g. location or user identity) and provide programming abstractions that relate these attributes to specific application domains. Examples of common types of entities, reflecting important context attributes in a pervasive system are persons, places and things. These abstractions were used in the Cooltown project [KI00], where each type of entity (an abstraction instance) was associated with a corresponding URL. The recognition and modelling of particular types of information in a context model limits the applicability of the model. Schmidt et al. [SB99] has suggested in that many other types of information, other than location and places, often play important roles in context-aware applications. The approach of identifying important application-specific context attributes and providing simplistic models to capture that information characterises some of the early work in context-aware computing, including the seminal work by Schilit et al. [ST93a], which used simple environment variables to capture contextual information. Since then a number of modelling approaches have emerged, which attempt to support additional context-related activities. For example, Gray et al. [GS01] represent meta-information

24


concerning issues such as quality and format of contextual information, emphasising requirement analysis and investigation of the design phase. These and similar kinds of modelling approaches are important in identifying key programming abstractions that are central in many applications and are helpful in implementing mostly domain-specific context-aware applications. However, they may be inadequate for solving more fundamental challenges associated with context, such as dealing with context uncertainty, or providing general methods to represent and reason about context. By making use of particular abstractions and vocabularies to describe context, models become application- or domain- specific. Such models mainly focus on utilizing suitable representation formats, such as well known standards (e.g., XML and RDF), which are used in the specific domains of interest. Mark-up based models represent a collection of models making use of existing standards. These models extend web standards to represent contextual information, provide a structural tagged format for data representation and have been used or extended by a number of context models. The Composite Capability/Preference Profiles (CC/PP) proposed language [KR01] presents a data representation mark-up format based on RDF [LS99] for expressing device capabilities and user preferences. The CC/PP specification defines a fixed two level hierarchy consisting of components and their characterising attributes. Specific vocabularies (e.g., describing WAP devices [WA01]) can then be specified using RDF following the CC/PP format. The Comprehensive Structured Context Profiles (CSCP) context model [HB98] is built on RDF as well and overcomes structural shortcomings of CC/PP for representing context information, namely, the strict two-level hierarchy of represented information. Building on RDF as a meta-language CSCP also supports serialization based on RDF’s XML syntax, decomposability (i.e., the ability to extract properties and sub-profiles) and extensibility (i.e., enabling future additions to the format) (see Figure 2.5 for example). XML is another standard used as a format in which contextual information is represented. For example, Capra et al. [CE01a] uses XML as means to encode context configurations and values, and make use of XML associated tree structure and XML schema to represent richer data and meta-data compared with more simple representations. Another example of an XML based model, serving as a messaging protocol of contextual information is the ConteXtML model [RA99].

25


Context models using or extending existing web standards are mostly suitable for specific applications, which mainly require context sharing, querying and simplistic interpretation. Vocabularies, specific to particular application domains are often used for providing the actual information types under the formatted representation scheme. <?xml version="1.0"?> <rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cscp = "http://example.org/CSCPProfileSyntax#" xmlns = "http://example.org/SessionProfileSyntax#" xmlns:dev = "http://example.org/DeviceProfileSyntax#" xmlns:net = "http://example.org/NetworkProfileSyntax#"> <SessionProfile rdf:ID="Session"> <cscp:defaults rdf:resource= "http://localSessionContext/CSCPProfile/previous#Session"/> <device><dev:DeviceProfile> <dev:hardware><dev:Hardware> <dev:memory>9216</dev:memory> </dev:Hardware></dev:hardware> </dev:DeviceProfile></device> </SessionProfile> </rdf:RDF> Fig. 2.5 (adopted from [HB98]) – Profiles updates in CSCP: XML serialization syntax of RDF.

2.2 Analysis and Evaluation We have identified three broad types of context models: Context models that provide basis to the process of reasoning about context, comprising two types: (1) Context models building on statistically based theories and classification approaches for sensor data fusion. (2) Models using logic as the approach for representing and performing reasoning about context. And (3) Models emphasizing structural representation of contextual information rather than reasoning. We have also highlighted four main properties in modelling context for pervasive computing systems. We make use of these, in the following sections, to evaluate the suitability of the reviewed approaches for context-aware pervasive computing. In Section 2.3.1, we evaluate approaches for achieving effective reasoning. In Section 2.3.2, we evaluate two related aspects of modelling approaches, namely modelling of context in a general way and easy and rapid prototyping of context-aware applications. In Section 2.3.3 we analyze context models with respect to their support for managing context.

26


2.2.1 Reasoning under uncertainty Pervasive environments require the use of existing and possibly new reasoning models that can handle varying degrees of context uncertainty. To date, context uncertainty has only been considered in a limited number of models. Most of these models incorporate confidence measure associated with the contextual information. For example, in [SL01], sensor data is associated with a probability estimate. Judd et al. [JS03] discuss queries about context can be specified with degrees of confidence and accuracy. and in [LS02] confidence in the information is provided to the client. [HI02, HI04b] propose to formally represent uncertainty in context-aware computing, by modelling different types of imperfections in the contextual information including ambiguity of information and lack of required information. While from a purely modelling perspective, these models (and in particular [HI02, HI04b]) are an important step in dealing with context uncertainty, they fall short in providing concrete solutions and approaches for resolving various challenges related to context uncertainty. They generally lack a clear methodology for applying reasoning over the modelled information. Sensor data fusion and classification approaches are an important tool for reasoning about context from a set of possibly inaccurate and unreliable sensory originated information. Further, a number of classification techniques can be used to learn patterns in historical sensory data streams and thereby assist in determining situations in subsequent iterations. The use of such learning techniques is clearly beneficial if situations are hard to model in advance (e.g. when precise information reflecting situations cannot be predetermined or rules cannot be articulated). In such cases, learning algorithms that discover and classify patterns in the data are appealing. Logic-based approaches, on the other hand, are typically suitable for dealing with precise information. Therefore, inaccuracies in sensed information are not naturally incorporated in most logic based inferences. Rules are often articulated for accurate facts, determined in terms of true or false (not normally associated with uncertainty factors) and are then evaluated in a logical expression. In other words, in determining rules for inferring situations, there is no differentiation regarding the relative importance of facts or a consideration of the accuracy and reliability of these facts. This demonstrates a distinct difference between the two reasoning approaches and partial incongruity in using logic for reasoning about context when uncertainty is a major factor.

27


Fuzzy logic [ZA73] considers imprecision in available knowledge. Fuzzy logic is designed to handle vague notions regarding facts, providing a rule based evaluation scheme (using IF-THEN rules, also referred to as fuzzy associative memory) that results in precise inference resolution. (The power of fuzzy logic is the ability to specify rules on vague descriptions about information yet coming up with crisp inferred result). Huadong [HU03] suggests that fuzzy rules are particularly useful for control purposes rather than in determining situations, i.e., they can be useful for determining actions to control a particular device, but may, in some cases, be less effective for reasoning about situations that have clear boundaries [HU03]. For example, there is no sense in determining that a person is 0.6 in a meeting and 0.4 reading a book, and even more so, if the situations are contradictory [HU03]. Sensor fusion techniques appear advantageous in reasoning under uncertainty, but many such techniques can be difficult to use. The use of neural networks in classifying context, for example, creates several problems when used by context-aware applications. Firstly, neural network techniques require (sometimes lengthy) training phases. During such a phase, it is critical to present sets of data that cover sufficient number of patterns that should be recognized and at the same time avoid over-feeding the network. Consequently, adding new situations or sensor types at runtime becomes problematic. Training can result in local minima, i.e., achieving less than optimal solutions [SC96]. In some cases, long term learning overwrites previously identified clusters, which is also known as the plasticity-stability problem [GR76]. Another problem is related to difficulties in explaining the classification results. Neural network algorithms are considered “black boxes�, implying their inability to map the results back to the causes. In addition, the appropriate network architecture is difficult to determine and such architecture is typically specific to particular applications, and hence less likely to be of use in a general framework for context-aware computing. Taking Bayesian reasoning as another example, prior probabilities, which in many cases are unknown, need to be specified in advance. For example, to assess the impact of detecting light for inferring a meeting, we need to determine the prior probability of a meeting in the first place, and this may be unknown and difficult to evaluate. Although in some cases learning can be applied (and only if we deal with stochastic processes) to learn prior probabilities, a system may wish to determine situations solely by the evidence currently presented without learning. Further, complexities arise in applying Bayesian

28


approaches when several possible situations and multiple conditionally dependent events exist [KL99]. Finally, because of context uncertainty, sensor data fusion by itself can be insufficient for inferring context. Due to design and application knowledge limitations or inconsistencies in sensed information, inferred situations might still be incorrect. By applying sensor data fusion, a system might infer several situations with similar confidence factors and be unable to determine which ones of these actually occur (i.e., sensor evidence may support but not require all situations to occur). Alternatively, if some inferred situations based on imperfect information are contradictory, there is difficulty to determine which the correct ones are. Based on the above, we conclude that research in reasoning about context under uncertainty is still in its infancy. Logic based models have shortcomings for reasoning under uncertainty. Similarly, sensor data fusion, classification and learning-based approaches, while at times more suited than logic to deal with uncertainty, can be difficult to generalize and to use.

2.2.2 General modelling, reusing and easy prototyping An appropriate context model should be reusable in different domains, and allow rapid prototyping of new applications. The context model provides a common approach to represent information and a way to reason about the representation. The more general the model is (using suitable abstractions), the greater the variety of context that can be represented and reasoned about (if reasoning is supported). The more natural the model is (i.e., easy to use and to define), the easier and faster the prototyping of new applications will be. Logic- and ontology- based models have recently been used as the underlying representation of context for a number of middleware level implementations (e.g., [RC03, CF03a]). Logic based approaches provide a formalized way to capture contextual information. The fact that such representations can be reasoned about by general purpose inference mechanisms has, arguably, promoted the use of logic based models in contextaware computing. However, logic-based reasoning also depends on mostly predetermined application-specific rules. This makes logic-based reasoning difficult to apply effortlessly for different applications and within an application for changing circumstances. If rules

29


(and possibly a large number thereof) need to be specified for each application or for different circumstances in the application, then application prototyping becomes difficult and the model becomes less general. Often, sensor data fusion techniques for context-awareness lack an underlying context model or in some cases employ a simplistic model, which is suitable for a specific application or domain. Without an underlying general context model, it would be more difficult to apply sensor fusion techniques to context related scenarios. Combining sensor fusion approaches for reasoning about context with a general context model is, therefore, an attractive feature. In this regard, some projects have been combined Bayesian reasoning with predicate and ontology based context models. For example, in [RA04], events represented as nodes in Bayesian network architecture are also represented as predicates in the underlying context model. Other related information such as conditional probabilities and prior probabilities of these events are represented in the Bayesian network architecture but not in the used context model. Gu et al. [GP04] combined Bayesian reasoning with a context model based on ontology and predicate calculus. Specific ontology classes describing prior and conditional probabilities are proposed as an extension to the more basic representation of predicates in context ontology. This allows representing probabilistic information in a strict ontology format and using Bayesian approach to reason about context. A number of schemes to combine ontologies with structural context models were also proposed in [HL04] and in [BN04]. Combining the CML model with ontology (using the fact that CML defines situations using predicates) enhances the model’s reasoning capabilities. Similarly, combining spatial models [BD04, NM04], which we consider as a specialized form of structural models enriches the semantic expressiveness and reasoning capabilities of spatial models. The use of predicates and ontology as the basis for describing context imposes, however, the following notable limitations. Predicates as the primary abstraction in the model and basic ingredient in representing context are too low level and do not provide a good basis for building complex context-aware systems. Building on the declarative nature of logic, low level facts specified with predicates do not provide clear guidelines, or an intuitive approach for prototyping context-aware computing systems. For example, there is no methodology regarding how and what kinds of rules to specify or what predicates to use. In large scale context-aware systems, such modelling approach would also become difficult to model, and with many application specific rules, difficult to gain 30


an overall picture of the context model. Further structural restrictions are introduced by using an ontology, which in essence is merely a standardized structural format for knowledge representation, not specifically intended for describing context. Finally, the use of logic predicates and inference rules restrict the ability to treat context as a first-class object of the context model. We distinguish between inferring context using information described with predicates and the ability to model context and changes in context explicitly. In logic-based approaches, systems can identify changes in situations and inferred context but not finer granularity changes in context at any given time and under the same occurring situation. Recognizing the limitations of existing models and knowledge representation schemes in capturing and reasoning about context necessitates further research in modelling context and developing related reasoning algorithms. We highlight the need for effectively handling context

uncertainty (possibly integrating various

suitable

approaches), and at the same time allowing easy modelling of context, including clear methodology for prototyping and reasoning about context. Based on such a model, the related set of appropriate reasoning techniques should be uniformly applicable to different context scenarios, applications and domains without modifications.

2.2.3 Context management Context management represents a significant research area that cuts across many related fields of computing. We define context management as a term that refers to managing contextual information by means of discovery, analysis, manipulation and communication of context. Much work in context-aware computing focuses on the fundamental steps of sensing data, reasoning about that data, and then reacting to the inferred context. To address challenges originating from the complex, distributed and dynamic nature of pervasive systems, more elaborate steps must be taken by context-aware systems. For example, applications should be able to pro-actively perform actions rather than react to events, which imply the need to predict context rather than just reasoning about the currently occurring situations [MA05a, MR04]. Alternatively, contextual information need not only be sensed by an application but also communicated and shared with other applications, so that a richer set of relevant information is available for reasoning.

31


Many structural models focus on communicating information, primarily between known system components or predetermined applications. Ontology-based context model offer the advantage of sharing and communicating contextual information and allow semantic interoperability in heterogeneous environments by providing a standardized way to describe information and associated semantics [GW04]. This ensures that different symbols and naming for matching objects between different applications are identified as semantically equivalent. Semantic interoperability does not, however, deal with how information describes context and how new information complements the existing description regarding context. Achieving this is the task of suitable context modelling approaches (whereas ontology merely provides a standard representation format not specifically developed for such objectives). Structural- and ontology- based models as well as other general-purpose context models can be described as ‘static’, in the sense that they do not consider context changes at runtime, which have no effect over the general reasoning outcome. In other words, these models do not model changes in context. Current modelling efforts have not considered the dynamic aspect of context, i.e., the ability to represent context changes with respect to time and reflect the general system state in varying contexts at runtime. Thus, existing models do not provide a general approach to model, analyze and describe context in a dynamically changing environment. The issue of pro-activity by predicting future context in a changing environment, for example, has been investigated by a few application-specific endeavors but not modeled within a general purpose context model. Mayrhofer et al. [MR04, MR03] propose architectures for reasoning and predicting future context of mobile devices. The architecture is based on classification, achieved by clustering historical data, and prediction is applied over the identified classes. The Neural Network House project [MO98] learns to predict the needs of inhabitants in the house and subsequently controls effectors such as air and water heating, lighting and ventilation. Another neural network based approach is proposed in [VG04] to predict a person movement in an office environment. A number of different prediction techniques, namely, neural networks, Bayesian networks and state predictor methods [PB04] are compared and evaluated in [PP05b] and used for predicting users’ movements in an office environment. In conclusion, dynamically characterizing context changes, predicting such changes, developing effective ways to communicate contextual information, all contribute to the creation of adaptive context-aware pervasive computing systems. We note the lack of a 32


general-purpose modelling approach for context that considers dynamic aspects of context, provides a general framework and basis for developing suitable algorithms, thereby, assisting in adaptation and pro-activity of context-aware pervasive systems.

2.2.4 A need for richer theoretical foundations We have evaluated strengths and weaknesses of various modelling approaches according to four properties, namely, reasoning under uncertainty, developing general context models, rapid and easy prototyping and managing context effectively. An illustrative comparison of existing context models according to these properties can be observed in Figure 2.6. The figure roughly positions each modelling approach with respect to achieving the specified goals of context-aware computing (a shorter distance to the axes’ origin reflects greater contribution of a model in the specific dimension). In reasoning about context, sensor data fusion and classification approaches seem to perform relatively well in identifying situations under uncertain conditions. Logic is also useful for performing reasoning about context but is not as powerful when uncertainty is a major factor. Structural models do not generally provide effective reasoning capabilities, and therefore, are positioned at the end of the reasoning dimension. In describing context in a general way, sensor data fusion and classification models are very-application specific and are, therefore, positioned at the end of this dimension. Most structural models are also very application specific. Logic- and ontology- based models can be used to reason about context with general purpose inferences, but also require the modelling of application-specific rules. This makes logic-based models better in generalizing context than models underpinning sensor data fusion techniques. A variation in the generality of logic based models exists, considering the fact that some models abstract the concept of a situation, thus contributing to a more generic way to describe context. To achieve rapid and easy prototyping of new context-aware computing systems a number of structural models, which are relatively simple in terms of modelling context, might be used. In prototyping complex systems that require many rules or when articulating these rules is unclear, modelling context with logic based approaches might be harder than using a learning approach. In other cases, though, additional learning and training periods, which are often required in classification techniques, hinder rapid and

33


easy prototyping of new applications. In addition, the difficulty in applying sensor data fusion implementation to new applications, further weakens the rapid prototyping property. This positions such approaches at the end of this dimension. In enhancing context management capabilities, different modelling approaches provide different contributions. Classification and statistics-based techniques can be useful in predicting future context, and ontologies can provide semantic interoperability in heterogeneous environments.

Formats & Structured Data

G o a l

Logic/ Ontology

Formats & Structured Data Logic/ Ontology

Sensor fusion & classification

Goal

Formats & Structured Data

Logic/ Ontology Sensor fusion & classification

Sensor fusion & classification

Effective reasoning

Managing context

General modelling

Easy & rapid prototyping

G o a l

Formats & Structured Data

Goal

Logic/ Ontology Sensor fusion & classification

Fig. 2.6 – Illustration of strengths, weaknesses and goals of context models

The above evaluation of different types of context models points to a failure in adequately addressing the entire set (or a large part thereof) of the four sought-after properties we have outlined. Blue dotted circles in the figure illustrate a desirable model, which capitalizes on all dimensions and sets a goal for developing suitable context models. The reliance on existing theories, developed for purposes other than context-aware computing, as the building blocks of context models (e.g., logic predicates or cues as main ingredients/concepts in modelling), limits the usefulness of such models in different dimensions. These models may offer strengths relating to particular features but also exhibit weaknesses in other dimensions. For example, sensor data fusion techniques can be advantageous in reasoning under uncertainty but less general in modelling and

34


reasoning about context. Similarly, logic based approaches can be used in a more general way to represent and reason about context but may not be sufficient under uncertain conditions. General theories such as logic or probability theory provide ways to reason about context and situations but do not offer a theoretical perspective and understanding about context. In other words, they offer useful approaches to reason about context but also require non-intuitive and limiting ways of modelling contextual information. This indicates a theoretical gap, which currently exists in modelling context, namely, the lack of a theory dealing explicitly with context (where context is a central concept in the model) rather than making use of other theoretical underpinnings or modelling approaches. Reinforcing this claim is the fact that most context models (with a few exceptions) do not directly model context as primary entity of the model but only represent information that is used for inferring context (e.g., various logic based models use predicates to represent rules for inferring context). An appropriate theoretical model about context would provide an intuitive and general way to describe context and offer insightful understanding regarding the process of reasoning about context. A model, which captures the essence of reasoning about context, could unify other more general purpose theories (e.g., probability theory or logic). Further, an adequate theoretical perspective about context would more naturally and effectively bind the properties we have previously outlined, and serve as a basis for developing new approaches for reasoning specifically about context. An additional feature complementing a suitable theoretical perspective about context is the ability to visualize context, both at the level of modelling and of reasoning. Visualisation of context could provide an additional insightful instrument both for designers, who prototype new applications, as well as for developers and researchers, who develop and implement new reasoning algorithms. The ability to visualize context (rather than merely graphically representing associated information, such as in [HI04a]) has not yet been explored. If the essence of modelled context could be metaphorically visualized then insightful actions both at design- and at run-time, could be applied. In Figure 2.7 we propose a conceptual layered approach for the process of modelling and reasoning about context. We illustrate the role played by a unifying theoretical approach in such a scheme. The bottom layer (1) describes context models, used by applications. Such models represent either an interpretation or instantiation of a unified

35


theoretical model about context (second layer), or extend additional modelling requirements on top of the fundamental context theory. The second layer (2) describes a theoretical foundation explicitly developed for interpreting and understanding context, which serves as a unifying model that is extended by more specific modelling endeavours. The theoretical model can also be used with ontologies (layer 3) that enable semantic interoperability of information described in the model, and with reasoning algorithms and general theories (layer 4) that are applied over the unifying representation of context. Ontologies (layer 3) according to this approach provide a higher conceptual layer, offering semantic interoperability between applications. Understanding context in a heterogeneous application environment could be achieved by combining the ability to deal with the semantics and having a consistent approach to represent and explain context. Similarly, utilization of existing general theories and algorithmic approaches (layer 4) would contribute to effective reasoning and management of context. An effective theoretical context model could be considered one which on the one hand offers a general yet simple way to describe and understand context and at the same time allows a variety of more general theories and algorithms to be applied.

(3)

(2)

(1)

Ontologies

(4) General Theories and Algorithms

A Unifying Theoretical Approach

Concrete Context Models

Fig. 2.7 – A proposed conceptual layered approach for context modelling and reasoning.

2.3 Design and Architectures Analogous to designing suitable context models and effective reasoning, research in context-aware computing has recognized the need for building infrastructure to support context-awareness activities [HL01, YK02]. While many context-aware applications currently custom build their own proprietary designs for context management [LS02], context frameworks and infrastructure could provide more efficient and appropriate

36


solutions, particularly when several existing applications need to utilize contextawareness. The use of an infrastructure approach enhances the ability of systems to rapidly prototype new context-aware applications, provides a unified approach to deal with context (based on suitable context models) and offers common approaches to disseminate contextual information. We have witnessed a number of prototype context frameworks, middleware and toolkits, taking diverse approaches to provide important context related services and addressing different challenges in pervasive computing. Below we explore these different approaches and their objectives.

Abstractions and context dissemination Early context middleware perceived the tasks of disseminating contextual information and providing appropriate abstractions for programmers to deal with that information as primary goals of a context infrastructure.

The Context Toolkit The Context Toolkit [DE00] builds a framework for interfacing with devices and software entities which provide contextual information. A set of abstractions, namely, context widgets, context interpreters and context aggregators can be used by application developers to prototype new context-aware applications. Widgets abstract sensory originated information and make that information available to applications. Widgets can be considered proxies to devices by mediating and encapsulating all communication between applications and real devices. Interpreters abstract the activity of recognizing context. Given information represented with widgets, interpreters are used as abstractions for reasoning about that information. Such activity is ultimately delegated to the specific application, which should provide explicit functionality to achieve appropriate reasoning. Aggregators collect contextual information from widgets and interpreters to represent the complete context of an entity.â–Ą

CARISMA The CARISMA middleware [CE01a, CE01b], aggregates contextual information and abstracts context by hiding complexities that are introduced in distributed networking settings. An approach combining reflection and metadata is proposed as a way to build a middleware that gives applications dynamic access to information about their execution context.â–Ą These and other approaches whose main focus are context dissemination, abstractions of sensors and distributed networking complexities, largely fail to address the important

37


issue of reasoning about context under uncertainty. Hence, they do not assist applications in becoming context-aware when context is uncertain, and their applicability to complex context-awareness scenarios is consequently limited.

Agents-based approaches Another architectural approach that has been adopted for building infrastructure in pervasive environments is the agent paradigm [BR97]. With agent oriented computing, autonomous entities in the system individually manage specific tasks and cooperate among themselves with standardised protocols to achieve a greater goal.

GAIA Ranganathan et al. [RC03, RA04, RM04] focus on an agent-based middleware solution for ubiquitous computing environments. The architectural approach builds on the notion of agents as autonomous entities, which can be applications, services and devices in the ubiquitous environment. Much of the significance of the middleware derives from an underlying existing infrastructure, called “Gaia”. Gaia [RO02] converts physical spaces, including devices in those spaces into a programmable computing system [RC03]. It provides services that assist in managing and programming such physical spaces, e.g. discovering devices and users in particular physical spaces, context sensing and event distribution. Every participating agent in the context middleware is a part of Gaia, a fact which enables it to be instantiated on different machines, make use of the event channels and be discovered by other agents. As an attempt to deal with agents’ heterogeneity Gaia pursues the use of ontologies for achieving syntactic and semantic agent interoperability. To support the process of reasoning about context, the middleware provides reasoning mechanisms at the disposal of agents, supporting rules and learning approaches. Context is uniformly represented as predicates, whose structure and semantics are specified in ontology of context types. Reasoning is typically applied with some logic-based mechanism over predetermined rules, and learning is mostly applied with Bayesian learning approach.□

ACAI ACAI [KK05] is another agent-oriented infrastructure for context-aware computing. The design employs different services or agents, which handle various issues in the lifecycle of a context-aware computing system. The architecture is conceptually divided 38


into several layers, including context sensing and discovery (the sensing layer), interpretation, structuring and inferring context (the context layer), and an interface to end users (the application layer) allowing negotiation about context information between context providers and users. ACAI follows an agent model in the sense that it employs independent services (or agents) that perform a specific type of work and communicate with each other. These agents include: context management agent, which monitors sessions and resources, coordinator agent, which manages contextual information for and between entities in the system, and ontology agent, which uses OWL to model context and system information in an ontology. Two other optional agents are the reasoner agent, which provides inference using logic and rules, and the system knowledge base agent, which manages information storage. While the design in ACAI employs agents, the overall architectural approach appears to be geared towards client/server architecture. There are specific agents making up the infrastructure for the middleware by providing core services and end users, represented by personal agents communicate with these server-based services.â–Ą

CoBrA The Context Broker architecture (CoBrA) [CF04, CH04] is another agent oriented approach for building middleware for context-aware computing. While it mainly deals with a specific use case of smart rooms, the architectural approach follows the design of broker agents, which maintain a shared model of context. The broker, e.g. in a smart room, is responsible for aggregating and maintaining a consistent representation of context. CoBrA uses OWL to support knowledge sharing and logic for inferences, with main focus on revealing data inconsistencies.â–Ą

Service oriented context middleware Kofod-Petersen et al. [KM05a, KM05b] present an agent-oriented middleware to support context-aware services in mobile environments. They describe a multi-agent system providing information and context to mobile users. The middleware deals with storing and retrieving information, reasoning based on templates and Case Based Reasoning [AP94], communication and aggregation of contextual information. There are three types of agents, namely, framework agents operating on Jade platform [BP99], agents detecting situations and performing goal decomposition, and specific application agents managing the application tasks.â–Ą Agent-based architectures enhance the autonomy of components within a system and consequently enable to increase scalability, reduce management complexities and promote 39


interoperability between computational entities of different organizations. However, in dealing with challenges of future pervasive systems, using only agent-based approaches in building context-awareness frameworks is insufficient. Challenges concerning mobility of components within the pervasive system, communication load and latency, and management of ad-hoc networks, require additional architectural solutions. Further, most current agent-based frameworks provide only limited modeling and reasoning capabilities, mainly using only ontology- and logic-based modeling and reasoning.

Mobile agent based approaches The use of an agent-based approach in building context infrastructure in pervasive systems is often a natural choice, given different context-aware applications that are managed autonomously and interacting with large numbers of users towards achieving their goals. In contrast to the general agent paradigm, mobile agents represent a more specific type of entities and a computing platform [LO99, KG02]. Mobile agents are software components that provide agility and re-configurability to a system by being able to move on their own volition or invited, from one host to another in a fairly autonomous way (i.e., not only is data transferred, but also code and computation state). While not all agents require mobility, this property has been recognized as beneficial in a number of large scale distributed applications, including informationcentric applications [KZ02]. In particular, various Internet-scale applications have found mobile agents useful [LO01], including distributed information retrieval, electronic marketplaces, adaptive, agile, and reconfigurable enterprise systems, and programming large networks of embedded systems5. More recent applications of mobile agents include large networks of embedded systems such as wireless ad-hoc sensor networks [QW01] and numerous proposals for the use of mobile agents in network management have been suggested (e.g., [BP98]). Consequently, a sizable number of mobile agent toolkits [MA05b] have been developed for mobile multi-agent applications, all providing toolkitspecific communication capabilities between same-platform mobile agents, facilitating direct communication between two agents and between an agent and a collection of known agents. Very little work has been conducted on incorporating mobile agents into pervasive computing systems infrastructure.

5

See http://discolab.rutgers.edu/sm/

40


Strathclyde Context Infrastructure The Strathclyde Context Infrastructure [GS03] builds on the concept of an overlay network reflecting deployment, management and usage considerations of context-aware services. The project’s emphasis is on developing a scalable and adaptable infrastructure and focuses on discovery, aggregation and delivery of contextual information. Built on experiences from [GS03], a framework using mobile agents for pervasive computing applications has been proposed in [SN03]. It proposes that the following factors need to be addressed in pervasive computing systems: component and network failures affecting the fault tolerance of a system, security issues, communication between remote entities, deployment of standalone applications whose components need to be versioned, user mobility and automatic updates of software that need to occur in order to handle new services, and communication with third party entities in a heterogeneous environment. The paper emphasizes the following advantages for the use of mobile-agent technology:

Mobile agents provide a convenient programming abstraction, hiding the underlying complexity of programming from the developer. This can result in a high-level, general purpose development framework [WJ99].

Users (or system management tier) can transfer applications from one device to another without pre-installation of code at a targeted device.

Mobile agents provide the ability to perform distributed search, based on user criteria without transmission or centralized storage of the results.

Using mobility, software components (in mobile agents) can be transported closer to the information source. This can reduce network latency and promote efficiency. It can also have potential uses for global processing of contextual information [DE03]. â–Ą

UbiMAS A Ubiquitous Mobile Agent System (UbiMAS) is discussed in [BP04], which runs as a service on top of a ubiquitous middleware. UbiMAS is a mobile agent system that functions as the application layer of a ubiquitous system. This approach is motivated as a suitable framework to support the mobility of human users. The main principle governing UbiMAS is that the ubiquitous system is responsible for managing and handling services for mobile users. Instead of a mobile human user carrying information on personal or wearable devices, there is a mobile virtual object in the ubiquitous system that accompanies the user. Such a paradigm is ideal for mobile agents, which can store information relevant to a specific user, interact with the ubiquitous environment, and most importantly migrate and follow its user. â–Ą 41


Cardoso et al. [CK02] argue in favour of mobile agents in pervasive environments and propose the following uses of mobile agents in pervasive systems:

Service adaptations – implementing services as mobile agents, migrating services to light-load nodes, improving performance and increasing system flexibility.

Component updates – using mobile agents to carry component code and data, encapsulating customised commands for installations and updates

and executing

agents in parallel/sequentially.

Quality of service negotiation – Mobile agents can negotiate resources locally on each node and find the optimal contract. This decouples the application from the negotiation process, decreases network load and enhances performance. Finally, Dobson [DO03] questions the appeal of pre-packaged applications in a highly

adaptive system. He favours instead the approach of dynamic runtime component composition based on an underlying context model. Such an approach can become feasible with mobile agents that can be dynamically composed and migrated into local hosts that support mobile agent frameworks. Mobile agents and similar technologies are starting to appear as an approach to deal with the complex, dynamic and unpredictable nature of pervasive systems that rely on ad hoc networks. Research in ad hoc networks relies on technological advances in shortrange radio technology, which would enable ubiquitous exploitation of such networks in the pervasive environment. Configuration of these networks would be highly dynamic and characterised by new types of communicating mobile devices and applications [JR04]. The available services a pervasive system offers are likely to be affected by applications dynamically joining or leaving the network [ON04]. Research in ad hoc networks has, therefore, started to look into the rapid changing context, encountered in Ad Hoc networks, as a factor that can affect deployment of services and applications [ON04].

Mobile Services Oriana et al. [ON04] present an architecture supporting mobile services where migration of services between nodes is based on context-awareness. A mobile service is a service capable of migrating to different network nodes in order to achieve its objective and quality of service. It is argued that traditional models for service interaction are inadequate for handling frequent and unpredictable nodes disconnections (due to e.g., loss of wireless connectivity or node leaving the network). Rather than deploying static services on specific nodes in an unstable network configuration, services should be mobile and able to adapt to changes in network and user context. Mobile services can be 42


considered a type of mobile agents as these services perform migration between nodes, carry their own data and state information, and perform migration by becoming aware of basic changes in context.â–Ą

EgoSpaces Julien et al. [JR04] present an approach where mobile agents make use of context to adapt to network conditions. They propose a coordination model implemented in a middleware that is shared between all agents. The model presents high-level abstractions necessary for coordination between agents, including migration, data duplication and event handling. This coordination between (possibly mobile) agents in distributed settings, governed by context relevant to individual agents, improves earlier middleware approaches, which do not consider management of distributed entities. The work in [JR04] is an extension of EgoSpaces [JR02], which provide agents with information relevant to their personalized context rather than providing only local information (i.e. available on the local host).â–Ą An appropriate use of mobile agents can contribute to developing pervasive systems. Mobile agents can be used to reduce communication latency and load, assist in dealing with ad-hoc networks and enable challenging scenarios in mobile computing cases. We note that mobile agents have mostly been used only to improve pervasive systems performance, rather than achieving context-awareness. Very little work has been done on using mobile agents as reasoning mechanism, enabling them to reason about context. In the latter case only relatively simplistic context models have been applied. We also note that by themselves, mobile agents do not always provide the best architectural approach to build context-awareness frameworks. For example, mobility of components within the framework can make management of such framework more complex and more vulnerable to misuse [PP05a]. In this dissertation we propose, develop and implement an extensible framework to context-aware computing, built over a proposed theoretical context model. The framework combines client-server and mobile-agent based architectural approaches. It supports both a context reasoning server and embedding context-awareness with mobile software agents that can be injected into the pervasive system, ad-hoc.

43


2.4 Summary and conclusion Analysis of future pervasive environments led us to focus on four appealing properties, whose attainment is significant in the evolution of context-aware computing systems. Specifically, these properties include the ability to reason about context under uncertainty, model context in a general way, represent context in a natural and intuitive way, and effectively manage and manipulate contextual information. We have noted reasoning about context as a fundamental goal of context-aware computing and described the reciprocal relationships that exist between reasoning about context and modelling context. Models in general and context models specifically, provide the underlying basis for performing reasoning, taking the description of context and inferring situations. Additionally, context models can be used to bind together the other properties we have outlined. By examining reasoning approaches that underpin different context models, we have classified existing context models into three broad categories, namely, models supporting data fusion and classification, logic- and ontology- based models, and structural models based on formats and structured data. Models in the first two categories provide ways to reason about context possibly under uncertainty. Structural models mostly deal with context representation rather than having a reasoning focus. Review and evaluation of various context models have pointed out specific strengths and weaknesses relating to the way information is represented, reasoned about and managed. For example, data fusion approaches provide ways to reason about context under uncertainty but are also application specific and difficult to generalize. Context modelled with logic-based approaches can be generalized more easily but requires low level modelling of facts and can be less effective in reasoning under uncertainty. Context modelled as structured data can be simple and easy to use but difficult to generalize or used in different kinds of reasoning conditions. The limitations of various modelling approaches for representing context often originate from the more general theories or models that underpin them. This limits their usefulness and points to a gap that currently exist in modelling context, namely, the need for a model with a richer theoretical foundation, explicitly developed for context and context-aware computing. We emphasize the notion of context as a central concept within such a model and the need to consider its complex (possibly multidimensional) nature.

44


We highlight the following desirable characteristics that are missing in existing context models and need to be developed based on an appropriate theoretical approach:

A natural and intuitive way to represent context, contributing to easy and rapid prototyping of context-aware computing systems.

An insightful way to describe and understand context and situations, contributing to development of suitable reasoning.

Modelling context such that a large number of existing reasoning approaches could be applied.

Providing a way to model and reason about context in a general way with reasoning that is applicable without modifications in different scenarios.

Modelling and dynamically detecting changes in context.

Enabling visualization of context and context changes, as a powerful instrument for designers and developers. By adhering to the above and specifically representing context in a way that elicits

perceptive context representation in a general way, a unifying modelling approach is developed and discussed on the rest of this thesis. More specific models catering for explicit application requirements could then extend the model by observing its basic modelling principles and providing additional modelling considerations. Based on suitable context models and reasoning approaches, context-aware computing infrastructure can be developed. We have reviewed different approaches for building such infrastructure. Some early projects (e.g., [DE00]) have largely ignored the need for modelling and reasoning about context under uncertainty, as part of the infrastructure. Instead, these projects focused on distributed acquisition and aggregation of contextual information from sensors as well as abstracting context information for programmers. In particular, the context toolkit’s [DE00] use of reusable standard libraries has contributed flexibility and enabled rapid prototyping of new context-aware applications. More recent projects (e.g., [KK05, CF04]) have focused on incorporating the agent paradigm into building context frameworks. The Agent paradigm builds on autonomy of computing entities, thereby, assisting in addressing issues of scalability in growing pervasive networks. Agents also incorporate their own decision making policies, which may include context reasoning capabilities. However, most of these projects focus on a relatively narrow range of modelling and reasoning approaches, mainly using logic and Ontology. Finally, mobile agents enhance ‘static’ agents’ capabilities by enabling change in the

45


physical and/or virtual execution environment. This promotes agility and flexibility of mobile agent based systems. Incorporating context-awareness capabilities into mobile agents and using such agents within a context-aware infrastructure has not yet been proposed. Rather, in existing approaches mobile agents mostly reduce network complexities and improve system performance. Reasoning mechanisms used by such mobile agents are relatively simple, if exists at all, and context models being used are often simplistic or tailored specifically to an application. These different approaches to design context frameworks deal with different challenges in context-aware pervasive computing. Each framework design corresponds to a subset of these challenges, such as providing programming abstractions to rapid prototyping context-aware applications, using agents to deal with pervasive networks’ complexity, and deploying mobile agents to enhance network performance. Based on our proposed context model and reasoning algorithms, we propose, discuss and implement a context-aware computing framework, which integrates different reasoning approaches, including logic-based and sensor data fusion. The design is extensible and incorporates both a server side reasoning engine and context-aware mobile software agents. It offers advantages in reasoning, rapid prototyping, scalability, flexibility and usability.

46


C

H

A

P

T

E

R

A Theory of Context Spaces

T

H

R

E

E

3

The preceding chapter reviewed research in context-aware computing as a key ingredient in pervasive computing. As a next step in modelling, reasoning about and managing context, this chapter presents a new approach to modelling context and situations, called “Context Spacesâ€?. The chapter presents the principles guiding the Context Spaces modelling approach and provides basis for subsequent chapters, which extend and elaborate on the model. This chapter is divided into two main parts. We begin with a presentation, formalisation and analysis of the concepts in the Context Spaces model. These concepts make up the basic model, which we refer to as the NaĂŻve Context Spaces model. In the second part we extend the basic model by proposing a number of heuristics for achieving more comprehensive modelling and effective reasoning under uncertainty.

3.1 A Theoretical Approach of Context Spaces Uncertainty in the process of reasoning about context can be regarded a result of a limited view or imperfect knowledge about the world [PA01]. The paradigm of contextaware computing, with such view in mind, can be considered as a way of obtaining information with limited sensing capabilities, but which nevertheless reflects circumstances useful to the application. Designers of a context-aware application would seek to define sensed (or discovered) context, which reflects real-life situations, as accurately as possible, governed by limitations such as technology and cost. The nature of context (in context-aware computing) can, therefore, be considered as the constrained view that a system has of the world, which can either be immediately used

47


(for triggering actions) or require additional computation for determining occurrences of situations (i.e. more elaborate reasoning). Hence, we fundamentally distinguish between a set of events that reflect a specific state of a system, and the notion of situations that can be inferred using that contextual knowledge. Consistent with this view, we express our context related philosophy in the ContextSituation pyramid. We observe a three-level hierarchy of concept abstractions. First is the basic level of raw data that are reflected by system events. In our terminology an event is a particular incident or a specific set of circumstances that change the state of a system. Information produced as a result of events is used to create a notion of context; i.e., context includes the information used in a model for representing real world situations. We define context as the set of facts, assumptions and predictions along with methods/algorithms of interpreting/discovering/processing that information. Then, as a meta-level concept over context, we observe the notion of situations, which can be inferred by analysing the contextual information. An illustration of this hierarchy is presented in Figure 3.1. Many-to-many relationships can exist between modelled information and actual situations. Being in a particular context may indicate several possible situations (hence the need for additional reasoning) and different sets of modelled information can be used to describe a particular situation. Similar outlooks of the relationship between context and situations are described in [GS02, DE01].

Situations

Context

Sensory-originated data

Fig 3.1 – Context-Situation Pyramid, a three level hierarchy of concepts for modelled information

The Context Spaces theory aims to model this view of context and enable context and situation awareness for systems that sense information with various degrees of imperfections at run-time.

48


Our modelling approach provides a conceptual framework for context-aware systems and serves as a basis for developing algorithms that reason about context in uncertain environments. Context Spaces leads towards a general context model to aid reasoning about and describing context, and to design operations for manipulating and utilizing context. The concepts use insights from geometrical spaces, the state-space model [OG67] and control theory [FA98] - we hypothesize that geometrical metaphors such as states within spaces are useful to guide reasoning about context, though the user will need to take the concepts and elaborate on them within the context of the application to be built. As a main objective of the model, we develop an approach for determining the occurrences of situations by a context-aware system. Using the model a system should be able to provide a solution to a query such as: “Is situation X occurring?” (Or “Is a user U in situation X?”). We wish to enable this capability in a general way, i.e., reasoning about situations could be performed by different applications for different types of situations and available information.

3.1.1 Principles We start by defining the application space – the universe of discourse (UOD) in terms of available contextual information for an application. The application space comprises types of information that are deemed relevant and obtainable by the system designers. It is a multi-dimensional space made up of domains of values for each relevant information type, in which context can be sensed or computed. Within it we perceive subspaces (possibly characterised by fewer dimensions), which reflect real-life situations. We call these subspaces situation spaces. Situation spaces are built over regions of values in selected dimensions and represent collections of values that reflect real-life situations. The actual values of sensory originated information are defined by the context state, e.g., the collection of current sensor readings. We define the following concepts.

Context Attribute Definition 3.1 A context attribute (denoted by a i ) is defined as any type of data

that is used in the process of reasoning about context. A context attribute is associated with a sensor, virtual or physical. The value of the sensor reading at time t is the context-attribute value at time t (denoted by a it ). 49


For example, light level (as a type of information) can be represented by a context attribute, say a 1 , (and sensed by a light sensor). A specific value, sensed at time t is denoted by a 1t .

Application Space Definition 3.2 The application space ℜ is the universe of discourse in terms of

possible

information

(which

is

sensed/discovered/computed)

for

an

application. It is defined by a tuple whose members represent all available context attributes and possible values for each context attribute.

Context State Definition 3.3 A context state is a collection of context attributes’ values at time

t. A context state is C t = (a 1t , a 2t ,..., a nt ) where C t denotes a tuple defined over a collection of n attribute-values, where each value a it corresponds to an attribute a i ’s value at time t. For example, a context state C t at time t, is made up of specific context attributes values such as say, light level ( a 1t ), noise level ( a 2t ) and motion level ( a 3t ).

Situation Space Definition 3.4 A situation space represents a real-life situation. It is a tuple of

regions of attribute values corresponding to a situation and denoted by S j = ( A 1j , A 2j ,..., A nj ) (consisting of n acceptable regions for these attributes). An

acceptable region A ij is defined as a set of elements V that satisfies a predicate P, i.e. A ij = {V |P(V)}. Let the type of a region of acceptable values (i.e. the context attribute it is defined for) be represented with the symbol [ A ij ], i.e. [ A ij ] = a i . For example, in numerical form the accepted region A1j would describe a domain of permitted real values for an attribute a1 such as the region of values of body temperature between 36.2 ˚C and 36.9 ˚C, representing the range of temperature values of a “healthy person” situation (represented by situation j ). Or, a collection of non-numerical values such as {‘Fine’, ‘Sunny’, ‘Partly Cloudy’} which represents a region of acceptable values for weather conditions context attribute of some situation.

50


A general illustration of the basic concepts discussed so far is presented in Figure 3.2. A situation space is made up of three dimensions or context attributes, satisfying individual predicates. The context state is plotted at different times ( C t1 and C t 2 ) representing a collection of different specific values. At time t1 the state corresponds to (or contained within) the situation space definition and at time t 2 the state position in space is outside the situation space definition. Context-attribute dimension

s

Ct2

C t1 s

Context-attribute dimension

Context-attribute dimension

Fig. 3.2 – A visualization of a situation space and context state at different times.

By representing situations and system’s state in multi-dimensional space (i.e. the context attributes define the number of dimensions) we provide a way to generically describe and consequently reason about situations in particular context. A region of acceptable values is defined as a set which satisfies some predicate, hence, it can consists of any information (numerical or non-numerical) that best reflects the context attribute (in terms of possible values) in relation to the specific situation. The concepts discussed so far can now be used to characterise a context-aware pervasive system with respect to time as illustrated in Figure 3.3 – a general illustration of context changes (as experienced by some entity). Here, as in the previous figure, the application space dimensions are defined by context attributes; each dimension representing a relevant and obtainable type of information. We have also added a time axis. The system’s situations of interest are modelled by situation spaces that are within the application space and mark specific regions of acceptable values in selected

51


dimensions. The context state evolves and fluctuates with respect to time and occasionally matches the definitions of some situation spaces. application-space dimensions

context-state

time

situation-space

Fig. 3.3 – Changes in the system’s context and illustration of the model’s fundamental elements. A collection of situation spaces and the context state, figuratively in multi-dimensional space, defined over the system context attributes.

The notion of context trajectory, i.e. a curve in the application space that the system’s changes in context follows over time, becomes evident and related concepts such as the pervasive systems’ stability or instability in a given context (i.e. the ability to identify and possibly affect the steadiness of the system state in a given context) become possible [PZ05, PZ04b]. In chapter 5 and 7 we further explore these concepts. The concepts discussed so far make up the essential basic Context Spaces model. It describes context with concepts drawn explicitly from geometrical metaphors, i.e., describing context and situations as structures in a multi-dimensional space. We refer to this basic model as the Naïve Context Spaces model (NCS). It is naïve because it describes context in an insightful way, but may also be insufficient (in some cases) for reasoning about context. We will progressively extend the naïve model by considering additional modelling considerations and examine their effects over the fundamental process of reasoning about context.

52


3.1.2 Characteristics of the NCS model The proposed NCS model is characterised by the fact that it describes context and situations using geometrical metaphors only. Contextual information whether representing sensor readings or real-life situations are described in the model in terms of states and spaces. Since the NCS model does not distinguish between the relevance of different context dimensions to the modelled situation the model can become, in some cases, too simplistic. For example, there is no distinction between the significance that contextattributes can have in recognizing situations. The fact of a context state being within some situation space indicates the occurrence of the situation represented by that space. We, therefore, consider the NCS model suitable in the case where sensory originated information is considered accurate. In such conditions regions of acceptable values for situation spaces define sets of necessary conditions for the occurrences of situations, i.e. the entire set of relevant sensor readings must be contained in their respective regions of values to infer the occurrence of a particular situation. This view leads to an initial approach for performing reasoning about the occurrence of situations, which are represented by situation spaces. We start by defining the notion of containment of the context state within a situation space with the following operator:

Containment operator Definition 3.5 The symbol “ ∈S ” applied between a context state and a situation space represents the fact that a context state is contained within a situation

space.

Let

C t = (a 1t , a t2 ,..., a mt ) .

Given

a

situation

space

S = ( A 1 , A 2 ,..., A n ) where m ≥ n (since m represents dimensions of relevant

context attributes of an application, and n represents a subset of these context attributes relevant to the specific situation space). C t and S are partially ordered and we are not requiring them to be union compatible. Then the expression C t ∈S S represents the fact that for every region A i in S ( 1 ≤ i ≤ n ) there is a value a it (of the same context attribute ) in C t that satisfies a it ∈ A i . We then say that C t ∈S S iff a it ∈ A i ∀i ∈ {1,..., n} . The symbol “ ∉S ” represents the fact that the context state is not contained in the situation space.

53


We represent the inference rule by: (1) Situation occurring =

If C t ∈S S then true (but could be false under uncertainty) If C t ∉S S then false (but could be true under uncertainty)

Under the NCS model assumptions, a context state contained completely within a situation space indicates the occurrence of the situation and any deviation of the context state from the space indicates the opposite (unless certain conditions are met). While under uncertainty, the NCS model’s reasoning approach can be non-pragmatic, it is nevertheless, appealing for a number of reasons. Firstly, it is simple and general, capturing the insight of explicitly representing context and situations in terms of state and space. When there are clear known necessary conditions for determining situations or observed information is considered accurate, the NCS model might be preferable to the complete model that we will progressively develop in the following sections. In such cases designers might favour the simpler approach without overheads incurred in more sophisticated modelling approaches. Secondly, the purely spatial concepts provide a basis for Context Algebra that we develop in Chapter 4, enabling manipulation and definitions of relationships between concepts of the model, and consequent practical use cases. There are many domains in which there is merit for using the NCS approach, in particular when context is primarily modelled with virtual (i.e. logical) sensors (i.e. where sensed information originates from software components). Consider for example, a communication/networking scenario where context reflects the network conditions and sensed (or computed) context (a set of parameters) is sufficient for triggering actions. Context can reflect undesired communication conditions, say low bandwidth, or high number of currently active communicating devices in certain areas. Or, in a serviceoriented scenario, context can reflect the quality of service according to download/upload rate, number of current service requests, and so on. If observed context is considered accurate, it may consequently trigger some action, e.g. ‘if quality of service is low then add more servers’. The fact that a system has complete (or nearly complete) confidence in the sensed information makes the NCS model suitable for reasoning about situations: reallife situations (or activities) are represented by situation spaces, and current information accurately reflects the system’s conditions in regard to the specific situation space.

54


Example – spatial context representation Consider the following example, which visually illustrates the use of the Context Spaces approach in modelling situations in a smart room use case. The example also motivates the need for further modelling extensions. Figure 3.4 visually represents definitions of situation spaces and context states detected at different times. We use situation spaces to represent possible activities taking place in a Smart Room, which provides a place for meetings (S1), presentations (S2) and public gatherings (S3), and is equipped with sensing devices. We have characterized each of these situations using three context attributes, namely, room light level, number of people in the room and room noise level. We provide appropriate regions of values for these situation spaces such as high number of people on Friday gatherings and low light levels during presentations. Our approach applies to any number of dimensions and here we use three dimensions for easier visualization. We plot twelve context states, obtained at different times as points having three-dimensional coordinates. In most cases, we notice a match between a given context state and a situation space. For example, context state x is contained in the situation space of a meeting, context state y is within the situation space of a presentation and context state z is within the situation space of the Friday gathering. A context state contained in a situation space indicates that the represented situation is occurring. Such indication, however, may be inadequate for performing inference (due to inaccuracies of sensory originated information or insufficient design considerations). For example, assuming sensor readings are inaccurate, what indications can be deduced by context states a, b and c (these context states are situated very close to some situation spaces and might actually be within them)? Additionally, what is the significance factor of individual context-attributes for inferring the occurrence of a situation: e.g. dimmed light levels in the room might be more indicative of the occurrence of a presentation than noise level (since noise can be also indicative of other situations and dimmed lights are explicitly related to presentations)?

55


S1 - A Meeting S 2 - A Presentation S3 - Friday Gathering

S3 z c

S2

b y

a

x

S1 m

n

Fig. 3.4 - Relationship between situation spaces, defined for situations in the smart room and the corresponding context state at different times

Also note that some context states are contained within more than one situation space. This is the case of the context states that are contained within the area shared by the meeting and presentation situation spaces (e.g., context states m and n). Does it mean that a meeting is occurring or that a presentation is occurring, or both? Can knowledge about the relationship between an attribute and situation spaces assist in determining the correct situation? To address these and similar issues during reasoning about context in contextaware scenarios, we now present an approach built on the context model’s state-space representation.

3.2 Extending the NCS Model To address shortcomings of the NCS modelling and reasoning discussed in the previous section, we extend the basic model to consider additional heuristics, which relate context attributes more comprehensively to situation spaces. We will progressively explore a number of heuristics that refine and extend the basic NCS model and develop a novel approach to integrate and reason about the modelled information.

56


In artificial intelligence, heuristics represent “rules of thumb”, mostly based on expert experience or common sense and validated with an underlying mathematical model. Many algorithms in artificial intelligence are heuristic in nature, or use heuristic rules.6 We refer to the proposed modelled heuristics as the Extended Context Spaces and to the algorithmic approach that integrates information modelled in the extended model as ConSpaF [PL05b] (Context Spaces Fusion). The heuristics we propose deal with the following issues:

Individual significance and contribution of context attributes in the situation space7.

Inaccuracies of sensory originated information.

Characteristics of context attributes and their effect on reasoning.

Partial and complete containment of context-attributes’ values in the situation space.

Each set of considerations that we explore contributes to the inference task but also affects the approach of performing such inference. Our goal is to apply reasoning over information, which is modelled with a specific subset of heuristics. To enable this, we consistently represent additional modelling considerations in the form of a set of functions Σ . Each function implements an underlying heuristic by defining specific relationships between context attributes and situation spaces. The set of functions that apply to some situation space Si are defined in the set Σ i . In terms of reasoning, we define general procedures or guidelines for inferring the occurrences of a situation, which can take any subset of modelling functions, as follows.

Matching function Definition 3.6 Let the degree of confidence in the existence of a situation

represented by a situation space Si be judged by a function µ , which takes a context state at time t, a situation space Si and a set of functions Σ i , and returns a number between 0 and 1 (inclusive), i.e. µ(C t , S i , Σ i ) ∈ [0,1] . We call

µ the matching function. Inference function Definition 3.7 Let C t be the context state at time t, Si be a situation space, and

Σ i be the set of heuristic functions. The occurrence of a situation represented

6 7

Definitions on the web http://www.google.com.au/ define: heuristics This terminology is consistent with Utility approach [WE86]

57


(

by Si is then computed by a Boolean function γ = µ (C stt , S i , Σ i ) ≥ ε i

)

where ε i ∈ [0,1] denotes a confidence threshold for the situation space. We call γ the inference function.

We use µ and γ as placeholder functions for different reasoning algorithms within the Context Spaces model. The function µ computes a confidence measure (or degree of support) for the occurrence of a situation, given knowledge about the context state, situation space and a set of functions Σ i . The function γ determines the occurrence of a situation based on the confidence measure computed by µ . Note that our inference procedures discuss a general term of confidence in a situation occurring (rather than a more specific type of measurement, e.g. probability) as we intend these functions as general guidelines that can be implemented with different algorithmic approaches, which are possibly based on different heuristics. We now consider a set of heuristics and associated integration rules for performing reasoning about context under uncertainty.

3.2.1 Individual significance and contribution of attributes Uncertainty in reasoning about context is affected by the way sensory originated information is modelled with respect to the situation being reasoned about. By identifying that different kinds of information have different indicative properties for reflecting the situation’s occurrence, a more comprehensive modelling and accurate reasoning can be achieved.

Relevance function In many cases some categories of context are more important than others for inferring a situation, e.g., high body temperature may be a strong indication of a general sickness of a person while other attributes may not be so important in inferring that specific situation. For example, high respiratory rate may be caused by and therefore also indicative of other situations, such as a person doing physical exercise. To model this difference with regards to the importance of context attributes for inferring a situation, we define the relevance function, which assigns weights to context attributes. The weights reflect how important and prioritized each attribute is (relative to other attributes) for describing a situation.

58


Relevance function Definition 3.8 Given a situation space S = ( A 1 , A 2 ,..., A n ) , a relevance function

associates weights w 1 , w 2 ..., w n with regions of values A 1 , A 2 ,..., A n of S, n

respectively, where

∑w

i

= 1 ( 1 ≤ i ≤ n ). A weight w i ∈[0,1] represents the

i =1

importance of a context attribute a i relative to other attributes in the situation space.

Contribution (utility value) function In the relevance function, we model the relative importance between the attributes of a situation space, whereas in the contribution function we model the individual contribution (or impact) of elements within a specific region for inferring a situation. That is, rather than merely knowing that the sensed value is within or not within a region, if the value is within, we also consider the particular value itself. The fact that the value is within the region is indicative of the situation, and even more so if the value is in some particular range (within the region) - how much so is what the contribution function represents. For example, it might be that some values are better reflecting the purpose of that specific region than others - e.g., for a context attribute of ‘body temperature’ in the definition of ‘subject is healthy’ the values between 36.5˚C and 36.7˚C would reflect high dominant contribution and values between 36.3˚C and 36.5˚C and between 36.7˚C and 36.9 ˚C might reflect a lesser degree of supportive contribution.

Contribution function Definition 3.9 Given an acceptable region of values A i in situation space S

(corresponding to some context attribute a i ), a function ηSi assigns a contribution level c ∈ [0,1] for each element (i.e. a value of a context-attribute) in the region A i . The contribution level of an element in a region reflects how well that element is associated with the modelled situation.

The contribution of a context attribute value can also be affected by the accuracy of sensor readings. The fact of an inaccurate sensor can be incorporated in the contribution function, which may provide low support levels for values that are similar but not actually contained within the specific region. This is similar to membership functions in Fuzzy

59


Sets [ZA73], where functions compute a degree of membership between a value and a known set. The contribution function can, thus, enable modelling of uncertainty about sensor readings and incorporate those as part of the reasoning process. We will make use of this feature in the next subsection, where we develop an approach for incorporating sensor inaccuracies as part of the reasoning process. We illustrate these ideas in Figure 3.5. The top left and bottom left diagrams illustrate support levels, assigned to values within the region; the top right and bottom right diagrams illustrate contribution functions that consider possible inaccuracy in the obtained context attribute value and therefore assign low support values for sensed information outside the region. Using the above definitions we can refine our initial inference approach by allowing uncertainty or imprecision in determining situation occurrences based on modelled context. So, indicators (or evidential support) for the occurrence of a situation are represented by the values (of context attributes) in the context state being within the accepted regions of the situation space and quite strongly indicative if they also fall within particular ranges. The fact of some context attribute value being outside its respective region in the situation space does not automatically reject the situation occurrence but only weakens its likelihood. Contribution

Contribution function

Region

Contribution Contribution function

Attribute value

Attribute value

Region Contribution

Contribution

Contribution function

Contribution function

Region

Attribute value

Attribute value Region

Fig. 3.5 – Examples of contribution functions defining the contribution level of a given value of a context attribute for inferring the occurrence of a situation

To consider such a view in practice we make use of Multi-Attribute Utility Theory (MAUT) [WE86] that takes the information represented by the model (i.e. the condition of the context state and the definition of the situation space to be inferred) and computes a confidence (or degree of support) in the occurrence of that situation. Computed 60


confidence is then compared with confidence with a confidence threshold, to facilitate a decision regarding the occurrence of the situation. (We compare the computed confidence with the individual threshold of the particular situation, thereby gaining the ability to compare outcomes computed for different situations.) MAUT provides a convenient way for combining together seemingly different contributions into a single measure, expressing the result in terms of utility [WE86]. In our case, we see utility (or contribution towards our goal of determining the occurrence of a situation) as the degree of evidential support given to the hypothesis of a situation occurring when a context attribute value is within the corresponding region. The more indicators we have that the context state matches the definition of a situation space, the greater utility is gained. MAUT is considered an evaluating scheme, which provides a general evaluation function v(x) over an object x to denote the overall object’s utility. The evaluation function is traditionally defined as a weighted accumulation of evaluating the objects’ value dimensions [WE86, SC01], which represents a combination of different contributions relevant to the object. The computation results in a single numerical measure ranging between 0 and 1. A function computing the confidence in the occurrence of a situation, considering the concepts we discussed so far, and which results in a single numerical measure ranging between 0 and 1, is the following. n

(2) Confidence = ∑ w i c i i =1

where wi denotes a weight assigned by the relevance function for a region A i in a situation space, and c i denotes the contribution level of context attribute a i ’s value in the definition of the situation space. We can contrast the confidence in the fact that a situation is occurring with a predetermined confidence threshold. A threshold can be obtained for example by predefining a situation space (including weights and contribution levels for the attributes) and selecting a context state that sufficiently reflects that situation, according to the application designers’ judgment. Applying function (2) over this information would yield a representative threshold of confidence.

61


Let us consider the following simple algorithm adhering to the above definitions for reasoning about the occurrence of some situation, by accumulating support for that situation.

Simple Matching Algorithm

µ Using Utility concept

Let a it denote the corresponding context attribute value in the context state for a region of values A i in a situation space S. For each region of values A i do: Accumulated Support := Accumulated Support + weight w i of the region A i × the contribution level of an element in the region A i with the same value as a it (if such exist, otherwise contribution = 0) Return Accumulated Support

The algorithm iterates on all regions in the situation space definition, identifies the matching context attribute values in the context state and computes the accumulated product of the region’s weight and contribution of having such value in the region. This yields a confidence measure for the occurrence of the situation by accumulating support for all the dimensions defined for that situation space. The degree of confidence is a measure reflecting how many and to what extent indicative events are supportive of the specific situation. The measure, yielding a value between 0 and 1 is then compared with a threshold Ti for inference in terms of TRUE or FALSE.

3.2.2 Inaccuracies of sensors In the previous subsection we discussed the contribution level of context attribute values towards inferring a situation, and illustrated how different contribution values can be assigned according to expert knowledge during the situation space definition. In this subsection, we present an approach to compute the contribution level at run-time. We propose an approach to incorporate the impact of sensors inaccuracies and unreliability into the contribution computation. Possible unreliability and inaccuracies associated with sensors and sensor readings also affect reasoning uncertainty and should influence the outcome of matching state 62


(defined over inaccurate context attribute values) and space. The correct value of a phenomenon8 might actually indicate the occurrence of some situation even if the sensed values (i.e. sensor readings) do not, and vice-versa. Sensory originated information is potentially inaccurate and it is important to naturally incorporate accuracy estimation in our fusion model. We illustrate how imprecision in sensed values might affect reasoning and propose an approach that integrates knowledge about sensor inaccuracies as part of the reasoning process (and in practice influences the contribution level of a value sensed via sensors). We also develop a specific technique that evaluates the impact of inaccurate sensor readings over the inference results. We first consider a heuristic, which states that the greater likelihood of the value of a context attribute being contained in a region, the greater the contribution assigned to that context attribute, and vice-versa. So, for example when we sense dimmed lights in the smart room, it might be a strong indication of a presentation taking place. However, if the light sensor is inaccurate (and might actually sense normal light levels) then the contribution of sensing dimmed lights towards inferring a presentation should be reduced. We incorporate this heuristic into our definition (2) of confidence, as follows: n ) (3) Confidence = ∑ w i ⋅ Pr(a it ∈ A i ) , i =1

)

where Pr(a it ∈ A i ) provides an approach to compute the contribution level of a context attribute value at run-time, and represents the probability of a context attribute correct ) ) value (denoted by a it ) being contained within the region A i ( a it represents the correct value (or true state) of the phenomenon and the sensed (and possibly inaccurate) value is denoted by a it ). )

There could be different ways to compute the probability of Pr(a it ∈ A i ) . We use the )

term Pr(a it ∈ A i ) as a placeholder for any kind of such algorithm or approach. We primarily distinguish between two kinds of imperfections associated with sensors: (1) the reliability of a sensor, i.e. how dependable and consistent the sensor is. If, for example, a sensor is known (or computed) to be accurate, but faulty 10% of the time, then our confidence in a reading reflecting a value contained in a region should be reduced )

respectively (i.e. Pr(a it ∈ A i ) =0.9). (2) The sensor’s inherent inaccuracy, i.e. the range of

8

Phenomenon – as a reflection of an event that can be sensed

63


errors in readings produced by that sensor. If sensor reading errors or their magnitude can be characterised, then such information can contribute into estimating the probability of a value being contained within a region.

We now propose a specific technique for

computing this probability: Let us develop a general approach for computing the probability that the correct value of a phenomenon being sensed is within some region of values, given an estimated distribution of the reading errors. We apply the following technique for sensor readings that correspond to a continuous region of values (e.g. temperature between 36.6˚C and 37.2˚C). ) Let e i = a it − a it denote an error of a sensor reading from the correct value it senses, ) where a it represents the correct value and a it denotes the (possibly inaccurate) sensor reading value. We do not characterize errors with absolute values as we would like to differentiate between the cases of different distributions of errors of a biased sensor. Let max(A i ) and min(A i ) denote minimum and maximum values of an accepted region of values A i , which corresponds to a context attribute a i , respectively.

Proposition. The probability of the correct value of a sensed phenomenon ) a it being contained within the region A i can be computed by: ) Pr(a it ∈ A i ) = Pr(e i between a it − min(Ai ) and a it − max(A i )) .

Proof: For containment in a continuous region of values the correct value must be greater or equal to min(A i ) and smaller or equal to max(A i ) , i.e.: ) ) ) (1) max(Ai ) ≥ a it ≥ min(Ai ) . Given the definition e i = a it − a it , then a it = a it − e i . ) Substitute a it with a it − e i to obtain: (2) max(A i ) ≥ a it − e i ≥ min(A) . Rewrite as: (3) (a it − min(Ai )) ≥ ei ≥ (a it − max(Ai )) . The practical implication of this is that given an estimation of the reading error distribution, we can estimate if the correct value is in the region by the observation (i.e. the inaccurate sensed value) only. For example, if we expect that the reading errors might follow, say some normal distribution estimation, then the probability that the correct value of

the

phenomenon

being

sensed

is

in

the

region

could

be

computed

by: Pr(e j ≤ a it − min(A ij )) − Pr(e j ≤ a it − max(A ij )) . The proposed technique enhances our estimation of the probability of a value being contained within a region by considering the distribution of reading errors caused by the 64


sensor’s inaccuracy. This, of course, limits the applicability of the approach to cases where sensor reading errors’ distribution can be sufficiently estimated. Information about sensors and data accuracy can be obtained by various means. These include manufacturer specifications or confidence estimation as part of the provided service (e.g. in [EP05] the positioning engine provides a confidence measure associated with the inferred location). Alternatively, testing sensors for accuracy with sufficient sample sizes and knowledge of the correct value can be used to compute estimates of reading errors. A similar approach has been suggested in [WS02b] for using ground truth knowledge [WS02b] on the current actual sensor performance and using historical knowledge on sensor performance as they age.

Example For illustration of the proposition in section 3.2.2 consider Figure 3.6, which illustrates a region of values for temperature readings and a specific sensor reading contained within this region. To effectively estimate if the correct temperature value is in the region we need to consider the value of the sensor reading in relation to the region, the actual size of the region (domain of values) and the distribution characteristics of the reading errors. In case A, if we suppose that the region is large, the sensor reading value is positioned close to its centre, and error readings are not significant, then high confidence may be computed for the correct value being contained in the region. In case B we have decreased the region size, so now the confidence in the containment also reduces. Finally, in case C, assuming that errors are more significant, then our confidence reduces even further.

Case A:

temp. region

sensor reading

minimum

maximum

Case B: min

max

min

max

Case C:

Fig. 3.6 - Estimating containment is affected by sensor reading value, error characteristics and region size

Now suppose that we obtain device specifications reporting 10% inaccurate readings of the sensor with some known divergence (say, up to 2ËšC in each direction). Instead of always assigning a confidence of 0.9 to the sensor reading being relevant as evidence for the reasoning task, we can refine the estimate with the technique above. For example, if 65


the reading indicates a temperature of, say 21˚C, and the temperature region is between, say 18˚C and 24˚C, then the confidence in containment should be 1 (rather than 0.9).

3.2.3 Characteristics of context attributes We distinguish between two types of context attributes in regard to the definition of a situation space, which have different effects over inference, as follows.

Symmetrically Contributing Definition 3.10 A symmetrically contributing context attribute increases the confidence in a situation taking place if its value is within the corresponding region, and decreases the confidence if it is outside that region.

Asymmetrically Contributing Definition 3.11 An asymmetrically contributing context attribute increases the confidence in a situation taking place if its value is within the corresponding region but would not decrease the computed confidence if its value is outside the accepted region. Every context attribute in a situation space either belongs to the set of symmetrically contributing context attributes, denoted by the set CA S , or belong to the set of asymmetrically contributing context attributes, denoted by the set CA A .

Example To clarify the distinction between symmetric and asymmetric attributes, consider the following case. First consider a situation space defined for a situation of ‘subject is healthy’ with a symmetric attribute of ‘Body Temperature’ and acceptable region of values between 36.6˚C and 37.2˚C. Any value outside this region, say 38˚C, would indicate (with some degree of confidence) that the subject is ill and would decrease the confidence in that situation taking place. In contrast, a context attribute ‘PDA location’ of a user assists in inferring a situation of ‘user in a meeting’. Having indication of a PDA located in the meeting room will increase the confidence in the user participating in a meeting. However, if the PDA location is sensed to be elsewhere, the ‘user in a meeting’ situation may still be valid (e.g., the PDA was left at home or in the office). Therefore, this type of attribute would be characterized

66


as asymmetric, since it only assists in inferring a situation but does not weaken the likelihood of the occurrence of the situation. To consider this heuristic during the fusion process we need to evaluate the containment of asymmetric attributes. If some asymmetric attributes are irrelevant to the situation (by not being contained in their respective regions), the weights of the remaining context attributes would be recalculated to maintain their relative importance. We suggest the following method for weights redistribution: Let w 1 , w 2 ,..., w n denote initial weights of context attributes in a situation space S. For each asymmetric context attribute a i ( 1 ≤ i ≤ n ), do: If the value of context attribute a i is outside the corresponding region then w i = 0. For each and every context attribute a i (both symmetric and asymmetric) do: n

ˆ i = wi / ∑ wi . w i =1

During redistribution of weights, the system examines if an asymmetric attribute fits the definition of a situation space (by being contained in a region). If it does not, it is ignored by assigning its weight to zero. Finally, after adjusting all asymmetric attributes, the relative weights of all attributes are recalculated. Consider the following example for the weights redistribution process.

Example Recall the previous example of a context-attribute ‘PDA location’, which is defined as asymmetric in a situation space of ‘user in meeting’. When the user’s PDA location indicates a location in the meeting room, it is an indication of the user being in a meeting. However, when the user’s PDA is left by mistake in his/her office, this observation does not affect the fusion result for determining whether he/she is in a meeting. In this case, the ‘PDA location’ attribute would be associated with zero weight value and the values of the remaining weights will be redistributed, to maintain their relative weights for correctly inferring the situation.□ Computing the confidence measure now involves a reevaluation of weights, as n

follows: (4) Confidence = ∑ wˆ i ⋅ Pr(a) it ∈ A i ) , for a i ∈ CAS ∪ CA A , i =1

67


The context attribute is included either in CA S or CA A , which are the sets of symmetric n

ˆ i (where ∑ wˆ i = 1 ) is a weight and asymmetric context attributes in the situation space. w i =1

measure expressing the relative importance of context attributes after a process of weights redistribution.

3.2.4 Completeness of containment In context-aware computing application designers specifically choose a relatively small number of context attributes to represent a particular situation. Therefore, it might be significant whether all or only some of the values of the chosen attributes correspond to the situation definition. In this heuristic, we ask: what is the confidence that all sensed values of the chosen context-attributes correspond to the situation space? Incorporating such heuristic would, naturally, place some weight in favour of this indication. So, for example, the fact that not all context attribute values are contained in their corresponding regions would further weaken the likelihood of the occurrence of the situation. This kind of heuristic deviates from the rationale of merely accumulating supportive sensory evidence but views the behaviour of the entire set of sensor readings as an additional type of contributing evidence. As motivation for this kind of heuristic, consider a collection of, say five, equally significant context attributes. Suppose that all of these attributes indicate quite strongly the occurrence of the situation. When an attribute value is not contained in a corresponding region, designers wish that confidence in the occurrence of a situation would decrease more than just 0.2. This is not necessarily a rational decision but may reflect intuitive analysis of circumstances performed by humans. We leave this type of reasoning as a possibility to be considered by application designers. We also show how significantly different considerations can still be incorporated in the fusion computation, using MAUT as the basis for integration. Let us model this consideration by representing the contribution of the fact that the entire set of symmetric attributes matches the definition of the situation space (asymmetric attributes are irrelevant to this consideration since they do not decrease the confidence measure by definition). We compute the conjunction of all elements in the set of symmetric context attributes of a situation space. This is represented as follows.

68


m

confidence_in_all_contained = � Pr(a) it ∈ A i ) , where a i ∈ CA S . i =1

This provides us a measure between 0 and 1 for the confidence in having all values of symmetric context attributes contained in their respective regions. The greater the likelihood of containment, the greater contribution value is computed, and vice versa. There is, however, a trade-off between ensuring complete containment of all symmetric attributes and their individual contributions as computed in equation (4). An important context attribute should produce greater impact on the final result of the fusion than another less important attribute, In contrast, when several attributes are equally significant for the evaluation of the real-life situation we may want to ensure that all of them are contained, in particular, when they are explicitly chosen at design time. We, therefore, need to account for this type of trade-off in the fusion process. MAUT provides a powerful tool for combining seemingly different contributions towards a goal (in our case towards inferring occurrence of a situation).Each contribution dimension in MAUT can also be individually evaluated using the general approach of weighted contributions, by evaluating its own relevant value dimensions. We use this approach to combine the two distinct computed contributions. We define two dimensions: d1 , which looks at individual attribute contribution and

d 2 , which represents contribution of having, for all attributes, the values of the context state within their respective regions. We now proceed and combine these two dimensions in the following general utility function: U = q 1d 1 + q 2 d 2 , where q 1 + q 2 = 1 . The individual weight (i.e., q i ) of each of the two dimensions in the overall utility measure determines which type of the general heuristics is more important. If for example, all context attributes are highly and equally significant then it is sensible to put more emphasis on d 2 , i.e. having, for all attributes, values contained within the space. Therefore, if an attribute is outside the situation space, an overall low confidence would be achieved. If, on the other hand, some context attributes are much less significant, then it might be more appropriate to give greater importance to d1 , i.e. give more weight to the values of significant attributes being contained (rather than insisting on having for all attributes, values contained within the respective regions). Consistent with this line of reasoning, we set the overall utility weights by analyzing the differences between the weights in the situation space. Greater differences increase q 1 and smaller differences increase q 2 . We suggest the following simple computation to

69


determine the weights: q 2 =

ˆ min w ˆ max denote minimum and ˆ min , w , where wˆ max ≠ 0 , and w ˆ max w

maximum weights after weights redistribution process, respectively. (Alternatively, other approaches such as analysis of variance and standard deviation can be used.) The final confidence measure, combining sensor readings and considering all the heuristics we have explored can be computed by: n

m

i =1

k =1

(5) Confidence = q1 ∑ wˆ i ⋅ Pr(a) it ∈ Ai ) + q 2 ∏ Pr(a) tk ∈ A k ) , where q1 + q 2 = 1 , a i ∈ CA S ∪ CA A , a k ∈ CAS .

3.3 Applying Well-Known Reasoning In the previous section we have proposed and developed ConSpaF, a data fusion algorithm, which integrates heuristics that are important to consider in context-aware computing. The proposed integration demonstrates a reasoning approach developed specifically for achieving context-awareness. As Context Spaces provides a general theoretical approach to describe context, the modelling principles can be utilized with different reasoning approaches other than ConSpaF. To illustrate this, in this subsection we demonstrate the application of reasoning using probability and evidence approaches.

3.3.1 Bayesian Integration Assigning probability measures modelling the probabilistic relationships between context-attributes and situation spaces provides an alternative to the heuristics discussed earlier. Consider the following definitions.

Probability functions )

Definition 3.12 A function Pi , j determines the probability for the occurrence of

a situation modelled by S i , given that the value of a context attribute a j is within its corresponding region in S i .

70


(

Definition 3.13 A function Pi , j determines the probability for having the value

of a context attribute a j within its corresponding region A ij in S i , given that a situation modelled by S i is occurring.

The probability functions provide a standard approach for relating probabilities to situation spaces based on the fundamental idea that states within spaces are indicative of occurring situations. They provide a complementary approach to the relevance and contribution functions (discussed in sections 3.2.1) for relating facts to situation spaces. ) ( Working with Pi , j is arguably a more challenging task for designers than using Pi, j . In ) many cases determining the probability with Pi, j of having some situation given an event is difficult (e.g. determine the probability of say, having a meeting given an event of light ( detected in the meeting room). In contrast, Pi , j can provide a more intuitive approach for designers. It answers the question: what is the probability of having light detected (or more generally, some other context attribute value fall within some region of values), given that a meeting is occurring. Consider the following inference procedure, applying the well-known Bayesian Theorem and reasoning approach [BA63] by considering the information modelled by the probability functions. Bayes’ rule [BA63, KC03] has become the precursor of probabilistic reasoning, providing a mechanism on how to update the probability of some phenomenon, given new evidence about that phenomenon. For example, given a new evidence of light being detected in the meeting room, we can update our prior probability for having a meeting. Bayes’ Rule states the following. Pr(S | E ) =

Pr(E | S) ⋅ Pr(S) , where ‘S’ represents a phenomenon, e.g. having a meeting, Pr(E )

and ‘E’ is the evidence, e.g. light detected. The importance of Bayes' rule is that in many situations where we want to compute Pr(S|E) it turns out that it is often difficult to do so directly, yet we might have direct

information about Pr(E|S). In terms of our proposed Context Spaces theory, the meaningful evidence is of having a context attribute value contained within a corresponding region in the definition

71


of a situation space. Using Bayes’ Rule we can compute an updated probability for the occurrence of a situation represented by the situation space, as follows. ( P i ,S ⋅ Pr(S) , where S is the situation space, Pr(S | a it ∈S A i ) is the (6) Pr(S | a it ∈S A i ) = Pr(a it ∈S A i )

probability for the occurrence of the situation represented by S, given that the context attribute value a it is within the corresponding region, and Pr(a it ∈S A i ) denotes the probability of having the value of a it contained within the region. Note that equation (6) considers the probability of containment of a context attribute value a i within a region and not the probability for having the value itself. This is directly suggested from the Context Spaces model, expressing regions of acceptable values rather than a specific value. Thus, a situation space groups different potential events, which can ( be represented by single probability estimation Pi ,S . We can use Bayes’ rule for combining evidence with information modelled in Context Spaces. An example of a simple matching algorithm ( µ ), sequentially updating the confidence in a situation would be the following: Let a it denote the corresponding context attribute’s value in the context state _

for a region of values A i in a situation space S. Let Pr (S) denote a-priori probability for the occurrence of situation S (representing the initial confidence in the occurrence of S, in Context Spaces terminology) and Pr(S) denote an updated probability for the occurrence of S given some evidence. _

1. Pr (S) := a-priori probability value (confidence) 2. for each region of values A i in situation space S, do: _ ( p ⋅ Pr (S ) 2.1 If a it ∈S A i then Pr( S ) = i ,S t Pr( a i ∈ A i ) _

2.2 Pr (S) = Pr(S) 3. return Pr(S) Considering context attribute values iteratively, the procedure updates the probability of the occurrence of the situation, given the specific evidence (the context attribute value). After all evidence has been considered, the final assessment of Pr(S) , as a probability measure between 0 and 1, is returned. This reflects a degree of confidence in the situation

72


occurrence (in probabilistic terms), which is then compared with a predetermined probability threshold Ti , for inference in terms of TRUE or FALSE. Bayesian reasoning also provides a way to integrate information from sensors in a single computation. If we assume that evidential information (i.e. readings from different types of sensors) are conditionally independent given the situation (and unconditionally independent between them, i.e. when the situation is not considered), the integration rule can be further developed. Under such conditions we can state that given a collection of independent evidences E1 , E 2 ,..., E n

(e.g., readings from different sensors) then

Pr(E1 ∧ E 2 ∧ ... ∧ E n ) = Pr(E1 ) ⋅ Pr(E 2 ) ⋅ ... ⋅ Pr(E n )

and

Pr(E1 , E 2 ,..., E n | S) = Pr(E1 | S) ⋅ Pr(E 2 | S) ⋅ ... ⋅ Pr(E n | S)

(since

that

these

variables

are

conditionally independent, each representing a new probability given the situation S). Bayesian

update

Pr( S | E 1 , E 2 ,..., E n ) =

rule

can

then

be

Pr( E 1 | S ) ⋅ Pr( E 2 | S ) ⋅ ... ⋅ Pr( E n | S ) ⋅ Pr( S ) Pr( E 1 ) ⋅ Pr( E 2 ) ⋅ ... ⋅ Pr( E n )

rewritten and

as:

expressed

and

computed in Context Spaces approach as:

Pr(S | a 1t ∈S A1 , a 2t ∈S A 2 ,...,a tn ∈S A n ) =

n ( Pr(S) ⋅ ∏ Pi,S

( ( ( P1,S ⋅ P2,S ⋅ ...⋅ Pn,S ⋅ Pr(S) t 1

t 2

t n

Pr(a ∈S A1 ) ⋅ Pr(a ∈S A 2 ) ⋅ ...⋅ Pr(a ∈S A n )

=

i =1

n

∏Pr(a

t i

∈S Ai )

i =1

However, the proposed integration procedure we have developed based on Bayesian rule potentially incurs a notable drawback. While it provides potent means for integrating related evidence, it also requires a-priori probability assessment about the phenomenon (or hypothesis) we evaluate. This is a restriction that might obstruct its use in contextaware computing scenarios. Predefined assessment of a-priori probability estimation requires either relevant expert knowledge, which in many cases is unavailable, or in some cases can be computed with a learning approach. That is, if we are dealing with a (preferably time invariant) stochastic process, than we might be able to learn such a-priori probability. However, this would pose an additional constraint concerning the probabilistic nature of the phenomenon. Moreover, learning might not be suitable for the application at hand (e.g. the application requires an immediate inference of context), in particular, when learning must be applied to the specific environment of the application. And in general, contrary to the conditions enabling a learning scheme, in many cases the probability of having some phenomenon cannot be reliably estimated by historical

73


information, which can make the Bayesian approach only suitable for specific and limited types of scenarios in context-aware computing.

3.3.2 Dempster-Shafer Integration An alternative method to Bayesian reasoning for data integration is Dempster’s rule of integration based on Dempster-Shafer theory [SH76] (hereafter DS). DS is a statistically based technique for combining evidence and can be considered a generalization of Bayesian theory as it allows assignment of probabilities to uncertain events and offers a way to represent ignorance or uncertainty [KL99]. In general terms, DS deals with a set of exclusive and exhaustive propositions, called the “frame of discernment” (F.O.D. denoted by Θ ). In our case, these propositions are the possible inferred situations known to the system and can also include unknown possible situations. An important ingredient in DS is the definition of a mass distribution function m, which provides a measure of uncertainty, applied over all the subsets of elements in the F.O.D., and which satisfies the following properties: Θ (1) m: 2 → [1,0] , (2) m( φ ) = 0, (3) ∑ m(P ) = 1 , P⊆ Θ

where 2

Θ

represents all the possible subsets of propositions from the F.O.D. and (1)

requires a value between 0 and 1 assigned by a mass function over such subset, (2) requires that a mass function applied over an empty set ( φ ) result in a value of 0, and (3) requires that the summation of masses computed over all propositions in the F.O.D. should be 1. Different mass functions can be defined given different knowledge or evidence and applied over different propositions. In our case, evidence is determined by sensory originated information and propositions represent different subsets of situations. We use the expression m i (P) to denote a mass function defined over evidence i and applied over a proposition (e.g., a subset of elements) P.

74


DS theory has a rule, known as Dempster’s rule of combination, for combining evidence, possibly originating from different sources (e.g. sensors). The combination yields a mass value assigned to a subset of the F.O.D. ( Θ ) (i.e., some situation or combination of situations) given mass functions considering the available evidences. The normalized version of the combination rule is the following: (7) m(R ) =

∑ 1− ∑

P ∩Q = R

m i ( P ) m j ( Q)

m i ( P ) m j ( Q) P ∩Q = φ

, where m(R) denotes the mass value computed for a

proposition R given the evidences i and j. To clarify equation (7), suppose that R represents a situation we wish to compute a mass value for. By considering all existing propositions, the intersection of some yield the proposition R, e.g. intersecting: P={R,K} and Q={R,L}, and intersecting some other combinations yield an empty set, e.g. intersecting: P={R,K} and Q={L,M}. A strength of DS theory is the ability to use partial knowledge over propositions and represent ignorance or uncertainty as part of the modelling process. For example, the knowledge relating the probability of having the union (or disjunction) of a specific subset of propositions, given the evidence can be modelled without the need to evaluate the mass for the individual elements in that set. A weakness of DS theory is related to the use of masses instead of probability measures and the difficulty to determine these values [KC03]. Masses can “only more or less be understood as probabilities” ([KC03]) and difficulties in coming up with these values arise when computing mass values to represent subsets of propositions and ignorance [KC03]. DS theory can be applied over information represented in Context Spaces model by defining mass distribution functions for context-attributes’ values. A mass distribution function computes a mass value when the value of the context-attribute falls within the region of acceptable values of any of the given situation spaces. In other words, each mass function is associated with a specific value of a context-attribute and can be computed for all existing situation spaces (or their combination). We represent this in Context Spaces terms as follows.

∑ (8) m(S) = 1− ∑

P ∩ Q =S

m < a it > (P) ⋅ m < a tj > (Q)

P ∩Q = φ

m < a it > (P) ⋅ m < a tj > (Q)

, where m(S) denotes the mass of the

combined evidence supporting situation S. P and Q represent situation spaces or subsets of situation spaces, and m < a it > (P) represents mass value computed for situation P with sensory originated information relating to the context-attribute value a it . 75


Whenever context attribute values satisfy specific predicates of regions of acceptable values in any situation space, a non-zero mass probability value is computed according to the prescribed mass functions properties and uncertainty estimation. The DS approach is conceptually similar to ConSpaF by the fact that both consider existing evidence or sensory originated information and evaluate how indicative is that information for the occurrence of a situation. In the next section we demonstrate the use of DS integration and in chapter 7 we apply Dempster-Shafer over the Context Spaces model as part of an evaluation comparing computed differences between ConSpaF and other reasoning approaches.

3.4 Qualitative Evaluation of Integration Approaches We have extended the basic model to allow effective reasoning under uncertainty and proposed specific modelling extensions and heuristics, specifically designed for contextaware computing [PL05b]. We have also shown that the model can be utilized with different reasoning approaches such as Bayesian and Dempster-Shafer reasoning [PZ06b]. Context Spaces provides an approach to purposefully model and reason about the occurrences of situations with limited available information. By providing an approach to effectively reason about situations that are described in a general-purpose context model, reasoning can be applied to different scenarios and applications. In addition, we argue that our proposed heuristically based integration (ConSpaF) provides a number of added values for reasoning in context-aware computing scenarios. The particular heuristics we have considered make the proposed reasoning approach specifically suitable for context-aware applications [PL05b, PZ06c]. ConSpaF represents a novel methodology for integrating context information for reasoning about situations. It offers the flexibility to choose between heuristics that are relevant to context-aware systems. For example, it considers a trade-off between a complete containment of the events (or context-attribute values) in the situation and the relative contribution of individual events. (This is often important in context-aware systems, whose designers specifically choose context-attributes that best model a given situation, under system constraints). ConSpaF finds by design a balance between these heuristics.

76


By considering our proposed heuristics, the reliability of the ConSpaF data fusion approach is enhanced. For example, characterizing the context attribute (i.e., symmetric or asymmetric) in relation to the situation, or integrating inaccuracy estimations in the data fusion algorithm makes the overall inference result more reliable. The modelling considerations are intuitive, in the sense that they capture relevant context-related relationships between the model’s concepts, and allow flexibility in choosing appropriate reasoning considerations, possibly at run-time. Designers or applications at run-time can select applicable heuristics and apply the appropriate data fusion technique. The proposed heuristics and approaches to integrate these heuristics with the Context Spaces model are presented in Table 1. The table demonstrates combinations of heuristics and changes in the formula to compute confidence as different combinations of heuristics are considered. For example, suppose one computes the confidence in the occurrence of situation S j using heuristic (1) (case B), and let Tj be the threshold for situation S j , then when n

∑w

j i

c ij > Tj we conclude that situation S j is occurring.

i =1

Case

Heuristics taken into account

A

Basic statespace representation

B

(1)

Formula for computing confidence value

CHECK IF

t

C ∈S S

Infer occurrence of situation by

Ct ∈S S TRUE,

Ct ∉S S FALSE

n

∑w

ci

CONFIDENCE GREATER THAN THRESHOLD

i

) ⋅ Pr(a it ∈ A i )

CONFIDENCE GREATER THAN THRESHOLD

i

) ⋅ Pr(a it ∈ A i )

CONFIDENCE GREATER THAN THRESHOLD

i

i =1 n

C

∑w

(1) & (2)

i =1 n

D

∑ wˆ

(1) & (2) & (3)

i =1

(1) & (2) & (3) & (4)

E

m ) ) ˆ i ⋅ p(a it ∈ A i ) + q 2 ∏ p(a kt ∈ A k ) q1 ∑ w n

i =1

k =1

CONFIDENCE GREATER THAN THRESHOLD

Heuristics (1) (2) (3) (4)

Individual significance and contribution of context-attributes Sensors inaccuracy Characteristics of context-attributes Completeness of containment

Table 3.1 - Impact of heuristics on sensor data fusion method

The proposed ConSpaF integration approach is complementary and possibly advantageous to existing data fusion techniques, offering modelling simplicity (due to

77


intuitive modelling of heuristics) and suitability for reasoning about context (due to particular set of heuristics considered). Taking Bayesian reasoning as an example of another integration approach, prior probabilities, need to be specified in advance, although in many cases in context-aware computing they are difficult to predetermine ([WH03]). The Bayesian reasoning approach also introduces complexities when multiple hypotheses and multiple conditionally dependent events are involved. Compared with Dempster-Shafer, ConSpaF differs in three notable properties. Firstly, it uses specific heuristics to determine occurrences of situations in context-aware settings. This makes it highly suitable to context-aware computing. Secondly, ConSpaF makes use of a utility-based approach to integrate sensoryoriginated information, using relevance and contribution characteristics of information. These modelling properties are used in developing algebraic operations between situation spaces, which we present in Chapter 4. The special way to model and reason about situations using ConSpaF enables to compose and partition situation spaces, handle limitations and incompleteness in sensory-originated information, promote autonomous and adaptive behaviour of context-aware systems and enhance reasoning outcomes. We develop these capabilities in Chapter 4 and evaluate them in Chapter 7. Finally, compared with Dempster-Shafer, ConSpaF provides a more comprehensive and clear way to model relevant information. DS has been criticized on the difficulty in coming up with the values for the mass functions [KC03], and this process is non-intuitive and governed by strict mathematical properties. ConSpaF uses a different approach to represent context-related information, which can be more easily modelled by contextaware systems. The following example demonstrates differences in modelling and reasoning about context using the two approaches.

Example Consider a simple scenario of reasoning about the contradicting activities of a presentation and study activities in a smart room. Suppose that three kinds of sensory data: light status, noise level and projector activity are available. The values or logical states that can be sensed for these context attributes and associated confidence or knowledge about errors in sensing these attributes are presented in Table 3.2. For example, noise level is sensed on a continuous scale between 1 and 5 and reading errors are uniformly distributed around the correct value with up to 1 measurement unit of error.

78


Context attribute Light status Noise level Projector status

Domain of values ON, DIM, OFF [1,5] ON, OFF

Reliability of reading 95% 100%

Error of reading ± 1 Uniformly distributed -

Table 3.2 – Sensory-originated information

To apply DS we first need to determine all involved propositions and relevant events. In our example, Presentation activity (P) and Study activity (S) are defined as incompatible, i.e. cannot co-exist. Therefore, for this particular case a proposition of Unknown (U) would consist of both alternatives, i.e. {P, S} and the power set of propositions would be {P, S, U}. We then identify relevant events and determine masses that reflect the association of an event with the occurrences of each of the propositions, governed by the mass mathematical properties. An example of assigning mass values for relevant events is depicted in Table 3.3. In some cases it may be unclear how to compute these mass values. For example, to what degree an event of light turned on indicates a study activity, to what degree it can also indicate a presentation or the possibility of ignorance (represented by the unknown proposition). (The way to determine the mass values is further complicated by the need to adhere to the mass properties.) How does uncertainty in the form of associated confidence in sensing light impact the computed masses? (DS does not question information accuracy [WS03] and so inaccuracy needs to be reflected (in one way or another) in the mass computation). Similarly, noise level between 1 and 2 may equally reflect study and presentation activities, but how does the associated knowledge about reading errors of noise can be incorporated to compute more accurate masses and should such information affect ignorance? Finally, DS best applies to events of discrete nature which are meaningful to all situation definitions (since a mass function relates that information with all possible propositions). It can, therefore, become difficult to handle information that is represented as low level sensor readings. Event Light off/dim Light on Projector on Projector off Noise: 1 – 2 Noise: 3 – 4

Context attribute values L_OFF/DIM L_ON P_ON P_OFF N_1-2 N_3-4

Mass values for Presentation 0.7 0.2 0.7 0 0.5 0.6

Mass values for Study 0 0.7 0.2 0.8 0.5 0.2

Mass values for Unknown 0.3 0.1 0.1 0.2 0 0.2

Total mass 1 1 1 1 1 1

Table 3.3 – Computing mass values to events

With information about the context state we compute an updated estimation of the masses using Dempster’s rule of combination. Let’s assume the following enumerated events, corresponding to the occurrence of a presentation activity: 79


1 = L_OFF/DIM, 2 = P_ON, and 3 = N_3-4. Respectively, we define three mass functions

m1 , m2 and m3 that compute mass values for these three context attributes’ values. DS combination is then applied over all propositions and available evidence. For combining evidence for the occurrence of presentation, given the values of three context attributes we apply the following computations:

∑ 1− ∑ ∑ (S) = 1− ∑ ∑ (U) = 1− ∑

m 12 (P) =

Q∩R =P

m 1 (A) ⋅ m 2 (B)

Q∩R =φ

m 12

Q ∩ R =S

m 12

Q∩R = U

m 123 (P) =

m 1 (A) ⋅ m 2 (B)

Q∩R =P

=

m1 (S) ⋅ m 2 (S) + m 1 (S) ⋅ m 2 ( U) + m 1 ( U) ⋅ m 2 (S) ≈ 0.0698 1 − m 1 (P) ⋅ m 2 (S) − m 1 (S) ⋅ m 2 (P)

m 1 (A) ⋅ m 2 (B)

Q∩ R =φ

∑ 1− ∑

m 1 ( P) ⋅ m 2 ( P ) + m 1 ( P ) ⋅ m 2 ( U ) + m 1 ( U ) ⋅ m 2 ( P ) ≈ 0.8955 1 − m1 (P) ⋅ m 2 (S) − m 1 (S) ⋅ m 2 (P)

m 1 (A) ⋅ m 2 (B)

m 1 (A) ⋅ m 2 (B)

Q∩R = φ

=

m 1 (A) ⋅ m 2 (B)

m 1 (A) ⋅ m 2 (B)

Q∩ R =φ

m 1 (A) ⋅ m 2 (B)

=

m 1 (U) ⋅ m 2 (U) = 0.03 1

=

m 12 (P) ⋅ m 3 (P) + m12 (P) ⋅ m 3 ( U) + m 12 ( U) ⋅ m 3 (P) ≈ 0.9423 1 − m 12 (P) ⋅ m 3 (S) − m 12 (S) ⋅ m 3 (P)

The results of this computation yield a combined mass value of 0.9423 for the presentation activity. In the above computation we use the mass functions indexes to denote a mass computed for the combined evidence, e.g. m12 (S) denotes the mass computed for the occurrence of Study activity by combining evidences enumerated as 1 and 2. We now examine the same case using ConSpaF: The modelling of the two situations is depicted in Table 3.4. Contributing evidence is determined for each situation separately. Weights reflect relative importance of context attributes within the specific situation. Determining relative weights poses a clearer and more achievable estimation task, without the need to account for the impact of other situations. Further, information concerning uncertainty is considered during the data fusion process and its impact is not considered in modelling the situation. Situation Presentation

Study

Context attribute 1 = Light 2 = Noise 3 = Projector 1 = Light 2 = Noise 3 = Projector

Region of values DIM, OFF 1-4 ON ON 1-2 OFF

Weight 0.4 0.2 0.4 0.4 0.2 0.4

Table 3.4 – Modelling with ConSpaF

Performing data fusion with equation (3) for the presentation activity with the context state and associated inaccuracy information yields:

80


n ) ) ) ) conf(P) = ∑ w i ⋅ Pr(a it ∈ A i ) = w 1 ⋅ Pr(a 1t ∈ A1 ) + w1 ⋅ Pr(a 2t ∈ A 2 ) + w 3 ⋅ Pr(a 3t ∈ A 3 ) = 0.98 i =1

The above modelling and reasoning example demonstrates the relative ease and appropriateness of using ConSpaF for representing and reasoning about context and situations. ConSpaF integration focuses on reasoning about situations, where situation spaces are primary elements in the model and context-attribute values relate specifically to a situation space through regions of acceptable values. Dempster-Shafer focuses on the evidence (context-attribute values) and relates each evidence to all possible propositions (situations). Using context-related heuristics to determine occurrences of situations (modelled by situation spaces), makes ConSpaF less general than DS integration but more applicable to context-aware computing. The effectiveness of sensory-originated information to the situation is reflected in the situation threshold. We propose a relatively straightforward methodology that can lead towards a systematic approach to compute the association between evidence and situations: first, combinations of context-attributes values, which reflect a borderline indication for the situation occurrence, are chosen. These represent a context state which is then used by ConSpaF to compute a degree of confidence in the situation, and serving as the situation threshold. (Several different combinations of values can be selected, and computed results – averaged, to achieve a reliable threshold). So, high threshold would typically reflect reasoning with sensors that are not very indicative of the situation, and vice versa. That is, when sensors are not very indicative, only a relatively good match between context-state and regions, yielding high computed confidence, would reflect the occurrence of the situation. Thus, with different thresholds for different sets of sensors in situation

spaces

definitions,

situations

become

comparable

during

reasoning.

(Alternatively, comparing reasoning results between different situations can be achieved by reflecting sensors indicative capabilities through the contribution functions.) The different approach of representing information also affects the characteristics of the fusion process and needs to be considered by the application. An example would be the model’s flexibility or the ability to add new elements to a context-aware system. In DS, defining new situations requires examining all the rules associated with each evidence. In ConSpaF, adding new situations would be simple and straightforward as they represent the starting point of the modelling process, and are, therefore, decoupled from other modelled situations. 81


Finally, ConSpaF provides consistent guidelines for performing reasoning about situations. It explicitly guides designers/developers and applications on steps to achieve situation awareness. Learning parameters of the model (such as weights) can also be applied, as demonstrated in Chapter 7 by optimising initial rough estimates of the weights in the definition of situation spaces.

3.5 Summary and Conclusion We have proposed and discussed a theoretical model for describing and subsequently reasoning about context in a general way. The model’s concepts use spatial metaphors and provide an approach for reasoning about context and situations of a context-aware system. We have described situations as geometrical objects in multidimensional space and investigated their relationships with the system state in a given context. Thus, context and situations are central to the proposed modelling approach, treated as first class objects in our model. Using Context Spaces, tracking changes in context by observing changes in the context state, and analysing the relationship between the context state and situation spaces is inherent. We have expressed our context related philosophy in the Context-Situation pyramid distinguishing between three levels of abstractions for concepts dealing with contextual information. These include sensory-originated information at the lowest level, context models that are constrained by the system’s sensing capabilities and the notion of situations, which are used in reference to the real world. To achieve realistic yet general modelling of context, with practical reasoning capabilities, we have examined several modelling variations making use of additional modelling considerations. Each set of considerations extends the basic model and affects the approach of inferring occurrences of situations. The fundamental method of performing reasoning remains, however, the same for any type of additional considerations. It is built on a theoretical perspective about what it means for a situation to occur: the occurrence of a situation is represented by a tuple of values (i.e., the context state comprising values obtained via sensors (and perhaps some reasoning)) being within a tuple of accepted regions (i.e. the situation space representing the situation). We have also proposed a common methodology for performing reasoning by defining the concepts

82


of confidence and situation threshold. Confidence is presented as a numerical measure (which can be computed in different ways) compared with a threshold value. Building on these ideas and on a set of heuristics used in modelling a situation space, we have designed algorithms to determine if a situation is occurring. We have demonstated how different heuristics can be combined, and have progressively developed an inference procedure that considers a number of different modelling considerations. Taking equation (5) (from Section 3.2.4) as an example, the ConSpaF approach computes a measure of confidence in the occurrence of a situation by taking into account the relative importance of context attributes, the significance in context attributes being within particular ranges, the significance when the sensed values for all context attributes are within the scope of the situation, and uncertainties in sensed values. The model provides a novel and unifying perspective about context, which can be utilized by different reasoning approaches. We have demonstrated this with Bayesian and Dempster-Shafer reasoning approaches. In comparison to existing context models, our approach offers a rich theoretical perspective about context and a clear methodology for representing and reasoning about situations in context-aware environments. The model provides a way to explain and visualise context and situations. The model can be used to dynamically represent changes in context, leveraging on the state-space representation of context and situations as first class objects of the model. A system can adapt to changes in context (and not necessarily changes in situations), actively maintain the stability of situations [PZ05], select different reasoning considerations (i.e., the heuristics) and make changes in the model’s constructs dynamically at run-time. We explore, develop and evaluate these aspects in subsequent chapters.

83


C

H

A

P

T

E

R

F

Context Spaces Algebra and Logic-based

O

U

4

R

Reasoning In the preceding chapter we presented the Context Spaces approach for modelling and reasoning about context and situations. In this chapter, we expand the model by proposing and developing Context Spaces Algebra and logic-based reasoning for operations on situation spaces. From reasoning with a single situation space (Chapter 3) we turn to reasoning with a set of situation spaces. We leverage on insights from the Context Spaces approach to come up with operations representing compositions and relationships between situation spaces. This chapter is organized as follows. In Section 4.1, we develop algebra for the NCS model. We demonstrate how the spatial representation of context contributes to understanding the relationships between situations. This yields practical implications for managing context. In Section 4.2, we develop operations for the extended model. The operations we propose and develop are useful in distributed pervasive environments and are designed to function under uncertainty. In section 4.3, we describe complex compositions of situations. We propose a consistent strategy for performing reasoning over such expressions under uncertainty and discuss advantages of our approach.

4.1 Algebra for the NCS Model In this section we propose and develop algebra for the Na誰ve Context Spaces model (NCS), derived from the spatial perspective of Context Spaces. The algebra provides 84


operations over situation spaces, and relationships between them. With our proposed algebra, situation spaces can be manipulated and utilized to enhance reasoning and context management in context-aware computing systems [PL05a]. The Context Spaces Algebra is defined over the set of situation spaces. We define two types of operators on elements of this set:

Operators that capture relationships between situation spaces.

Operators that produce combinations of situation spaces.

These are described in the following two subsections.

4.1.1 Relationships between situation spaces Let S1 , S 2 ,..., S n denote situation spaces (as defined in Chapter 3). We define five relationships between situation spaces, as follows.

Definition

4.1

Containment

relationship.

A

situation

space

S i = ( A 1i ,.A i2 .., A im ) is “contained” in a situation space S j = (A1j , A 2j ,..., A nj ) (where m ≤ n) and is denoted by Si ⊂ S j , iff for each region of acceptable values A ik (k ≤ m) in S i there exist a corresponding (i.e. of the same context attribute) region of acceptable values A kj in S j such that A ik ⊆ A kj . The containment relationship is transitive. □

Definition 4.2 - Equi-Containment relationship. A situation space S i = ( A 1i , A i2 ,..., A im ) is “equi-contained” in S j = (A1j , A1j ,..., A nj )

(denoted

by S i ⊆ S j ) iff Si is contained in S j (i.e., Si ⊂ S j ) and Si and S j are defined over the same context attributes (the same dimensions), i.e. m = n and [ A ik ] = [ A kj ] for all k ≤ n. The equi-containment relationship is transitive.

Definition 4.3 – Partial Containment relationship. A situation space Si is “partially contained” in S j iff Si is not contained in S j and some regions of acceptable values in Si are contained in regions of acceptable values in S j . □ For example, suppose a soccer team is part of an Olympic team. The soccer team is defined over a single context attribute of ‘player-names’, and the Olympic team is defined

85


over two context attributes, namely, ‘player-names’ and ‘sport-types’. The soccer team definition is contained within the definition of the Olympic team since its region of acceptable values of player-names is contained within its respective region in the Olympic team. If we remove the sport-type region from the Olympic team definition then the soccer team would be equi-contained in the Olympic team, since both teams are defined over the same context attributes. Alternatively, if we add a context attribute of say, ‘shoe sizes’ to the soccer team then the soccer team would only be partially contained within the Olympic team, since shoe size is not a context attribute in the Olympic team.

Definition 4.4 – Overlap relationship. A situation space Si “overlaps” with a situation space S j iff all regions of acceptable values in S i overlap with the respective regions of acceptable values in S j . A region of acceptable values A ik in Si

overlaps with A kj in S j if [ A ik ] is the same as [ A kj ] (i.e. are

defined for the same context attribute), and there is a subset of elements existing both in A ik and in A kj . That is, given A ik = {V |P(V)} ⊆ T and A kj = {W |Q(W)} ⊆ T , where T is some universal set of values, then A ik and A kj overlap iff A ik ∩ A kj ≠ φ . □

Definition 4.5 – Orthogonal relationship. Situation spaces Si and S j are orthogonal (denoted by Si ≠ S j ) iff they do not overlap. □ We illustrate the above relationships with the following simplified illustration of situation spaces in a two dimensional space. Context attribute

a2

S4

S1 S2 S3

Context attribute

Fig. 4.1 – Relationships between situation spaces

86

a1


According to our definitions, situation space S 2 is contained within situation spaces S1 and S 3 . Since these situation spaces are defined over the same context attributes then S 2 is also said to be identically contained in S1 and S3 (i.e. S 2 ⊆ S1 , S 2 ⊆ S3 ). Situation space

S1 overlaps with situation spaces S3 and S 4 (and also with S 2 since S 2 ⊆ S1 ), but situation spaces S3 and S 4 are orthogonal (i.e. S3 ≠ S 4 ). Situation space S 4 is also orthogonal to situation space S1 . These relationships drawn from the spatial representation of situation spaces provide basis for propositions useful for developing efficient context reasoning and management mechanisms. Consider the following propositions, applicable to the NCS model.

Proposition 4.1. If Si ⊆ S j and Si is occurring then S j is also occurring. Proof: The basis for inferring the occurrence of situations in the NCS model is matching the context state with situation space. If Si is occurring then values of the context state are contained within Si and since Si ⊆ S j then these values are also contained within S j .□ For example, suppose that ‘staff meeting’ and ‘general collaborative activity’ in a smart room are defined using the same context attributes, and suppose that the staff meeting situation is identically contained in the general collaborative activity. If a staff meeting is occurring then also the more general collaborative activity is occurring.

Proposition 4.2. If Si ⊂ S j and Si is occurring then in order to infer that S j is occurring it is sufficient to prove that the values of context attributes that are unique to S j (i.e. not defined in Si ) are contained in S j .

Proof: Since C t ∈S Si and Si ⊂ S j then values of context attributes that are defined in both Si and S j are contained in S j . Therefore, only the values of the remaining context attributes in S j need to be examined. □ For example, suppose that having a presentation requires lights turned off, projector turned on and number of people in the room greater than three. Suppose that for having a gathering activity we only require that the number of people in the room would be greater than three. If we already know that a gathering is occurring then we only need to check if

87


the conditions of light and projector correspond to the presentation in order to infer the presentation activity.

Proposition 4.3. If Si ≠ S j and some context attributes are defined both in Si and S j and Si is occurring then S j is not occurring.

Proof: Given that Si ≠ S j and that some context attributes are shared in both situation spaces and assuming certainty in readings then it is not possible that the value of the same context attribute be contained in the respective regions both in Si and in S j at the same time. Therefore, if C t ∈S Si then C t ∉S S j .□ For example, suppose that two orthogonal situations are a presentation activity in the room and study activity in the room. The presentation activity requires lights turned off, moderate noise levels and a minimum number of participants in the room. The study activity requires light turned on and low noise levels in the room. Given that a presentation is occurring then study activity is not taking place, and vice versa. □ Using the proposition 4.1 to 4.3 about relationships between situation spaces, a context-aware system can specify rules for reasoning and managing context. In Figure 4.1, under the assumption that all situations can coexist, inferring that S 2 is occurring implies that S1 and S3 are also occurring and that S 4 cannot possibly occur. Alternatively, if S1 , for example, is specified using additional context attributes then only those additional attributes need to be examined by the system.

4.1.2 Combinations of situation spaces Combining situations is useful both for compact representation of situations and as a means to apply different operations over combinations of situations. Performing integration of situations results in a new situation space representing the conditions for the co-occurrence of two original situations. That is, an integrated situation space indicates that two real-life situations are occurring together. For example, given different situation spaces representing a ‘meeting’ and ‘having lunch’ (and assuming that both can occur together), then the integration of the two situation spaces would result in a new situation space representing the conditions for having lunch during a meeting. We define the following operation.

Integration operation (restricted union) 88


Definition 4.6 - A binary integration operator denoted by “ ∪ ” represents a new

situation space out of the two original situation spaces. Given the regions acceptable values A ik = {V |P(V)} ⊆ T and A kj = {W |Q(W)} ⊆ T , where T is some universal set of values (i.e., A 1i and A 1j are subsets of the same set, effectively of the same type), then the intersection of A ik and A kj is the set denoted by A ik ∩ A kj containing elements that satisfy: e ∈ ( A ik ∩ A kj ) iff P(e) ∧ Q(e) = 1. The integration of two accepted regions is the set of elements that satisfy P and Q. The integration of two situation spaces S i = ( A 1i , A i2 ,..., A in )

and

S j = (A1j , A 2j ,..., A mj ) is denoted by Si ∪ S j and is defined as follows. S u = Si ∪ S j = ( A 1u , A u2 ..., A uk , A ik +1 ,..., A in , A kj +1 ,..., A mj ) , where we assume that the first k <= min (n, m) attributes are common in both Si and S j (without loss of generality) though their accepted regions might not be, and are computed by: A 1u = A 1i ∩ A 1j ,..., A uk = A ik ∩ A kj (the accepted regions for the common attributes are formed by intersecting the accepted regions of the respective attributes from the two situation spaces).□ The integration operator computes a situation space representing the occurrences of the two original situations. Instead of producing only common values between regions of the same context attribute, the operator computes a more constraining situation space by composing all original regions of acceptable values. As an example, consider two situation spaces: “A meeting in the meeting room” and “staff members in the meeting room”, defined over the regions of acceptable values, presented in Table 4.1. For visualization we enumerate regions of acceptable values. A meeting in the meeting room location ‘meeting-room’: 3

#people [2, 6]

noise level [1, 4]

motion level ‘light’ and ‘medium’: [1, 2]

staff members in the meeting room location

user-type

motion level

‘meeting-room’: 3

‘academic’, ‘admin’: [1, 2]

between ‘light’ and ‘heavy’: [1, 5]

Table 4.1 - Definition of regions of acceptable values for two situation spaces

The integration preserves the same constraints as in the original situation spaces, such as having staff user types in the integrated situation, even though this attribute is only specified in one of the original situation spaces. 89


We visually illustrate the integration operator in action in Figure 4.2. Here, we use a spider style plot to represent the situation space, where the axes of the diagram denote the dimensions (i.e. the context attributes) of the space. We apply union operation to contextattributes (i.e. the dimensions) and intersection operation to the common regions. Note that some attributes regions such as #people and user-type contain a collection of discrete values rather than continuous. We represent the discrete values as continuous for visualization purposes. The result of applying the integration is a new situation space, consisting of five different regions of acceptable values. Regions of the same context attributes yield common values and unique regions remain unchanged. Integrating situation spaces by using spatial insights, gives us a high-level view on situation integration where each situation is possibly defined using different context. It also represents integrating situations for visualization purposes, as well as a compact way to represent the co-occurrence conditions of the original situation spaces in a single definition.

竏ェ

=

Fig. 4.2 窶的ntegration of two situation spaces

Integrating different situations can be useful for specifying rules for different purposes, including revealing inconsistencies of sensory originated information or identifying inconsistent or contradicting situations. Consider the following example of a

90


user physical-related activity, which we represent with an alternative visualisation approach. Figure 4.3 visually depicts two situation spaces representing a ‘subject running’ and a ‘subject walking’, as perceived in the context of three physiological context attributes, namely, heart rate (HR), respiratory rate (RR) and body temperature (BT). The area shared between the two situation spaces is the result of integrating the two spaces. Knowing about the compatibility between situations (i.e. can they co-exist?), a system can define rules for identifying inconsistencies. For example, given that a subject cannot be both running and walking at the same time the following rule can be formulated:

if C t ∈S S1 ∩ S 2 then apply action x. That is, inconsistency is revealed if the context state is contained in the integrated situation space. Similar rules can be applied for defining some actions, such as applying verification techniques that resolve situation contradiction or situation ambiguity. Later, in Chapter 5 we discuss the idea of context verification and provide a set of verification algorithms, built over the Context Space concepts. Situation Space Walking S

Heart rate (BepM) 100 - 160

Respiratory Rate (BrpM) 20 - 28

Body Temp. (Deg.Celsius) 36.60–36.62

S 2 Running S1 ∩ S 2

150 - 200

26 - 40

36.61–36.63

150 - 160

26 - 28

36.61 – 36.62

1

Fig. 4.3 – Visualization of two three-dimensional situation spaces and their integration

91


4.2 Operations for the Extended Model In the previous section we presented an operation to compose situation spaces under the NCS model. We now propose and discuss operations suitable for the extended Context Spaces model. We propose two approaches to compose situation spaces: (1) Compose a collection of situation spaces into a single situation space. We develop a set of operations in Context Spaces Algebra, apply them over situation spaces and produce results in the form of new situation spaces [PZ06a, PL06]. (2) Logical expressions represent compositions of situation spaces. We develop and apply a novel approach to reason about such expressions under uncertainty.

In this section we propose, discuss and illustrate composition operations, which consider the heuristics of relative importance and individual contribution of context attributes to a situation space (applicable to equations (2), (3), (4) and (5) in Chapter 3). As opposed to operations for the NCS model, the following operations take into account the reasoning process affected by uncertainty, by which partial deviation of the context state (a set of context attributes’ values) from the situation space only reduces the confidence in the occurrence of that situation. Our goal is to enable advanced reasoning about context in distributed pervasive computing systems by allowing distributed computational entities9 to benefit from each others’ view on the situation. In pervasive environments what one entity knows about the environment, based on sensory originated information it uses or has access to, can be significantly different from another entity’s knowledge. Not only available information can be different but also the model or representation of context, based on available knowledge can be different. We propose and develop operations to compose together situation spaces (possibly representing the same situation) that enhance the reliability and accuracy of reasoning about context and situations compared to a single view (i.e. by using only a single description of the situation). We distinguish between two kinds of composition operations governed by different assumptions. The first assumes a general case where models describing some situation (i.e. the situation spaces) are potentially very different, making use of inherently different 9

Any computational entity (process, user, an application, software agent) that can process information according to some algorithms

92


kinds of sensory originated information. In such conditions, our goal is to compose these models into a single model and achieve a reasoning result which is comparable to the averaged result of performing reasoning separately with each original model. In the second approach we assume that certain similarities between models exist so that we can compose them into a single representation that preserves the relative importance between all context attributes. This yields a global model, which is defined over all available sensory originated information. We now develop these composition operations and later evaluate them in Chapter 6.

4.2.1 Composing situation spaces in the general case Let us consider a proposed composition operation, denoted by the symbol ±, applied to two or more situation spaces. The operation composes two or more situation spaces by integrating information held by different computational entities and produces a single situation space that can be reasoned about. In this operation, our goal is to compose the new situation space in such a way so that the reasoning outcome obtained from reasoning about it would be comparable to the averaged reasoning result using the original situation spaces.

Example Suppose that two situation spaces are defined for inferring the situation of a ‘business meeting’, each held by a different computational entity with different sensing capabilities. The first entity is a context reasoning application operating in the user’s PDA. It has access to light and motion sensors that are integrated with the PDA and communicates with the user’s scheduling application. It also communicate with a remote positioning engine (e.g. Ekahau engine [EP05], which tracks locations of devices such as PDA’s) to receive the user location estimates. The second entity is a context manager of the smart room, which utilizes different sensors within the room to compute situations such as the activity of users in the room. Table 4.2 contains the definitions used by these entities to represent a business meeting situation.

93


Attribute name

Values in region

Location Motion level Light level Scheduler

‘meeting room’ ‘Low’ - ‘Medium’ ‘Medium’ - ‘High’ Meeting at 12:00 PM

# of People Noise level # of People standing Projector activity

> 1 AND < 6 ‘Low’ – ‘Medium’ <3 OFF

Entity A

Entity B

Table 4.2 - Situation spaces defined in different context

Suppose that the confidence computed for the meeting given the information sensed by and defined for Entity A and Entity B is µ A (meeting) = SP1 and µ B (meeting) = SP2 , respectively. We want to enable different entities, for example the context reasoning process running on the user’s PDA, to benefit from other entities’ context description and available information. While sensory originated information can be shared with appropriate communication mechanism (we discuss this in Chapter 5) the more challenging task is to construct a model (a situation space) that takes into account situation descriptions of other entities (all relevant information is represented there). In the first proposed composition operation our goal is to produce a reasoning outcome over such a model that is comparable to averaging the computed confidence of both original models, performed separately. How much we trust the models and relevant information would determine the way we average these results. In the general case, for simplicity, we will assume equal trust in the two definitions for representing the meeting situation and compute average results. (Later, we will show how the reasoning outcome can be even further improved, gaining better reasoning outcomes (i.e. more reliable and indicative) than the averaged result.) Rather than performing inference over separate situation spaces by each and every computational entity we create a single situation space and reason about it. An entity can benefit from other entities context representations without the need to request their inference results each time. □ Our first composition operation consists of three procedural definitions: (i) Represent the original situation spaces in a new situation space (i.e. composing the regions of acceptable values). (ii) Transform the relevance values (i.e. the weights) of the original situation spaces into relevance values in the new situation space. (iii)Transform the contribution values from the original situation spaces into contribution values in the new situation space. 94


Below we define these three procedures.

(i) Composition of Situation Spaces (Definition 4.7). Given the regions of acceptable values A ik = {V |P(V)} ⊆ T and A kj = {W |Q(W)} ⊆ T , where T is the domain of all acceptable values (i.e., A ik and A kj are subsets of the same set, effectively of the same type), then the composition of A ik and A kj is a set, denoted by A ik ⊕ A kj , and every element e of this set satisfies: e ∈ ( A ik ⊕ A kj ) iff P(e) ∨ Q(e) is 1. The

composition

of

two

situation

spaces

S i = ( A 1i , A i2 ,..., A in )

and

S j = (A1j , A 2j ,..., A mj ) is denoted by Si ⊕ S S j and is defined as follows: Si , j = Si ⊕ S S j = ( A 1i , j , A i2, j ..., A ik, j , A ik +1 ,..., A in , A kj +1 ,..., A mj ) , where we assume that the first k <= min (n, m) attributes are common in both

Si and S j (without loss of generality) though their accepted regions might not be, and are computed by: A 1i , j = A 1i ⊕ A 1j ,..., A ik, j = A ik ⊕ A kj □ The composed situation space guarantees that no information associated with the original situation spaces is left out and is represented in the new situation space.

(ii) Relative weight transformation (Definition 4.8). Let w ij and w ik denote weights assigned to the regions A ij of S j and A ik of S k , respectively. Let [ A ij ] = [ A ik ]. Let q i denote the sum of weights for a region of values of the same context attribute in each original situation space:

w ij + w ik  q i =  w ij  wk i 

if both w ij and w ik exist if only w ij exists if only w ik exists

E.g. if the pairs ( w ij , A ij ) and ( w ik , A ik ) denote a region of values and associated weights for context attribute a i in situation spaces S j and S k respectively, then q i = w ij + w ik ; or, if such context attribute only exist in S j then q i = w ij . A transformed weight in the new composed situation space for context attribute a i is the relative weight between q i and the sum of the total weights. This is computed as follows: 95


n

ˆ i = q i /(∑ q j ) , where wˆ i denotes the new weight and n is the total (1) w j=1

number of unique context attributes. (The computation applies to any composition of any combination of situation spaces, e.g. if we transform three spaces: S1 , S 2 and S3 then we consider all elements of those three spaces.) □ The weight transformation procedure computes the new relative weight of a context attribute in the composed situation space. This is achieved by examining the overall weight or importance of that attribute in both original spaces, compared with the overall weight of all existing context attributes.

(iii) Contribution transformation (Definition 4.9). Let A Si1 , A Si2 ,..., A Sn i denote corresponding regions of values of the same context attribute a i in n original situation spaces. Let w Si1 , w Si2 ,..., w Sn i denote the original weights associated with each of these regions, respectively. Let e denote a common S1 S2 Sn element within some of the regions A Si1 , A Si2 ,..., A Sn denote i . Let c i , c i ,..., c i

the original contribution of an element e in these regions, respectively. For each element e compute a contribution level, as follows. Sn S1 S2 Sn c = (w Si1cSi1 + w Si2 cSi2 + ... + w Sn i c i ) /(w i + w i + ... + w i )

where c denote the new contribution level. □ The contribution transformation computes the new contribution of an element in the region of values. It is achieved by using the relative contributions of the element in the original definitions. This computes a new contribution value for an element, such that if it is associated with high accumulated weights in original regions, it computes high contribution and vice versa. We now prove that reasoning over the composed situation space (applying the three procedures) is the same as averaging results of separately reasoning about original situation spaces. The significance of this is a compositional measure expressible in terms of constituent measures.

Proposition 4.4. Given m situation spaces µ(S1 ± S 2 ± ... ± S m ) =

S1 , S 2 ,..., S m , we have:

1 1 1 µ(S1 ) + µ(S 2 ) + ... + µ(S m ) . m m m

96


Proof: Let wiS and cSi denote the weight and contribution level of a region of acceptable value A Si in a situation space S. Let Y = S1 ± S2 ± ... ± Sm denote a composed situation space with n context attributes (i.e. we have w iY , c iY for i = 1…n). The computation of a weight for a region A iY in Y by definition 4.8 can be written as: n

w iY = ( w Si1 + w Si2 + ... + w Sim ) / ∑ ( w Si1 + w Si2 + ... + w Sim ) . i =1 n

By definition 3.8, the sum of weights in a situation space is 1, i.e.

∑w

S i

=1

i =1

for every situation space S (weights associated with context attributes not in the definition of a situation space are zero). hence: w iY = ( w Si1 + w Si2 + ... + w Sm i )/m The computation of a contribution level for an element in a region A iY in Y by definition 4.9 can be written as: c iY = ( w Si1 cSi1 + w Si2 c Si2 + ... + w Sim c Sim ) /( w Si1 + w Si2 + ... + w Sim ) We compute the confidence for situation Y by evaluating each region’s weighted contribution. Hence we can write the matching function as: n n 1 ( w S1 cS1 + w S2 cS2 + ... + w Sim cSim   µ(Y) = ∑ w iY ciY =∑  w Si1 + w Si2 + ... + w Sim ⋅ i i S1 i S2 i ( w i + w i + ... + w Sim ) i =1 i =1  m  S1 S1 S2 S2 Sm Sm n n ( w c + w i ci + ... + w i ci ) 1 =∑ i i = ∑ ( w Si1 cSi1 + w Si2 cSi2 + ... + w Sim cSim ) = m m i =1 i =1 n n n 1 1 1 1 = (∑ w Si1 c Si1 + ∑ w Si2 c Si2 + ... + ∑ w Sim c Sim ) = µ(S1 ) + µ(S 2 ) + ... + µ(S m ) m i =1 m m m i =1 i =1 (During matching, only relevant context attributes are considered)□

(

)

The above composition operation allows entities to individually perform reasoning over the composed situation space. This enables more reliable reasoning by an entity without reliance on reasoning outcomes of peer entities in the network. That is, an entity can combine the ability to construct a more comprehensive description of the situation (based on others’ views) with access to a broad range of sensory originated information (e.g. by sharing). Reasoning about the situation could then be performed by the specific entity only, while reflecting other entities’ views on the situation. The composition operation is associative and commutative, allowing to apply the composition operation to any number and any order of situation spaces. 97


4.2.2 Composing different situations We have presented a composition operation for combining information from different sources that model the same situation. In some cases, we can use this operation to combine inherently different situations. During reasoning (i.e. the function µ in Chapter 3) each context attribute is evaluated separately, independently of other context attributes. Thus, as long as the information in different situation spaces can be separately evaluated for inferring another situation space, these spaces can be combined together. So, a situation, which is made up of a composition of other situations but which does not require all of these situations to occur at the same time, can be composed by combining the original situation spaces10. In other words, if situation spaces A, B and C contain information indicating the possibility of D, they can be combined into a single space to represent D. For example, we can compose a situation of ‘Person Is Sick’ by composing together indicative situation spaces of, say, ‘Low Physical Activity’, ‘Low Productivity at Work’ and ‘Conversations with Physicians’. Reasoning would then assess the combined information to compute the confidence in the occurrence of the new situation space. We can also highlight importance of some situations over other situations in the composition of the new situation space, for example by repeating them in the composition. For example, A ± A ± B would result in a composed situation space, where the original situation A is twice as important compared to B (yielding results identical

2 1 to µ(A) + µ(B) ). 3 3

Example Let us perform a composition of two situation spaces, reason about the resulted situation space and compute the confidence for the occurrence of the new situation. We will then compare this result with averaging the confidences achieved by reasoning about each of the original situations separately. Table 4.3 depicts the regions and their associated weights and contribution levels for two situations A and B. For brevity and clarity we assume continuous regions of acceptable values.

10

We distinguish between composing situations from logically integrating them, in which case all original situations should occur, rather than just contributing to the reasoning process.

98


The situations consist of three different regions of acceptable values, two of which are of the same context attribute in the two situation spaces, but containing different sets of values.

Situation A

Region of attribute a Region of attribute b Region of attribute c Region of attribute a

Situation B

Region of attribute b Region of attribute d

acceptable values min value max value 4 8 3 7 5 8 2 6 5 2

weight

contribution

0.6 0.2 0.2 0.4

1 1 1 1

0.4 0.2

1 1

9 5

Table 4.3 - Two original situation spaces with associated weights and contributions

The result of composing these situation spaces, yielding a single situation space is depicted in Table 4.4. It results in regions specified for four context attributes some with varying degrees of contribution levels.

Situation A± B

attribute region a b c d

weight 0.5 0.3 0.1 0.1

sub region 2-4 3-5 5-8 2-5

contrib. 0.4 0.3333 1 1

sub region 4-6 5-7

contrib. 1 1

sub region 6-8 7-9

contrib. 0.6 0.6667

Table 4.4 - Resulting combined situation space

Consider the following two context states at two different times: C t1 = (a = 7, b = 6, c = 6, d = 4) and C t 2 = (a = 5, b = 6, c = 6, d = 7 ) .

Reasoning over the combined situation space A ± B at time t1 we obtain:

µt1 (A ± B) = 0.5×0.6 + 0.3 + 0.1+ 0.1 = 0.8 and at time t 2 : µ t 2 (A ± B) = 0.5 + 0.3 + 0.1 + 0 = 0.9 . We now compare these results with separately reasoning about the original situation spaces at time t 1 and t 2 , which results in the following computed confidences:

µ t1 ( A) = 0.6 + 0.2 + 0.2 = 1 and µ t1 ( B) = 0.4 × 0 + 0.4 + 0.2 = 0.6 . µ t 2 (A) = 0.6 + 0.2 + 0.2 = 1 and µ t 2 (B) = 0.4 + 0.4 + 0.2 × 0 = 0.8 . Averaging results obtained by separately performing reasoning by different computational entities, yields identical confidence as in the case of reasoning with the composed situation. This implies that different situations can be composed together to represent another situation, enabling intelligent compositions of new situations. It also shows that a computational entity can independently perform reasoning with a richer model, merging

99


other entities’ perspectives, without requesting those other agents to perform reasoning and then analyze their results. ▥

4.2.3 Reconciling different perspectives Our initial composition operation so far implies that models describing the same situation are defined consistently over the same type of context attribute. This may not be the case, however, when computational entities operate under different circumstances, holding different perspectives over the object of reasoning. To reconcile between different perspectives we analyze the combined context attribute of the same type. If the regions of acceptable values are defined differently they are treated as different types of contextual information. Thus, the combined situation space distinguishes between shared context attributes in the situation and individual context attributes originating from different perspectives. For example, if two entities require the projector to be turned on to indicate a presentation activity then this would be represented with a single context attribute in the composed situation space. If, on the other hand, one entity requires dimmed lights to indicate the presentation and another requires total darkness (resulting from less capable sensing), then we treat these definitions as two different requirements, each associated with its own sensory originated information.

Example Consider the following two definitions of a presentation activity and the combined model, presented in Table 4.5. Context attributes with different acceptable regions of values appear separately in the composed definition. context attributes Presentation (definition 1) Presentation (definition 2) Presentation (merged)

acceptable values

Light Level Noise Level # of Users Light Level Speaker Status # of Users Light Level 1 Light Level 2 Noise Level Speaker Status # of Users

Dimmed, Off Low, Medium >4 Off On >4 Dimmed, Off Off Low, Medium On >4

Table 4.5 – Considering different perspectives in merging models

For example, Light Level context attribute is defined twice in the composed situation space. Different original definitions of regions of acceptable values indicate different

100


perspectives over the same context attribute, e.g., using different kinds of sensors to determine light, or using sensors positioned in different locations (e.g., beneath and above the table).□

4.2.4 Composing and partitioning with a global model We have, so far, used an underlying assumption that each computational entity has its own unique representation of context and can only expect other entities to have similarly representative descriptions. We assumed that in the general case, such models can be significantly different and without common attributes shared between them. We now change this assumption and assume that computational entities hold partial views of a single global context model that best represents some situation. We assume that there exist common attributes between these partial views that can be used to build that original global model. With such an assumption, it is possible to compose models which reflect the relative importance of sensory originated information in the global model. This assumption requires that some context attributes and their corresponding regions be shared between situation spaces, such that a situation space built with information from all sensors can be backtracked. While composing a global situation space from its partial representations may not always be feasible, its inverse operation, i.e. partitioning a model into partial sub-models is always feasible and can become quite useful in pervasive computing scenarios. Based on a complete representation of context, a partial model consisting of all attainable relevant information can be computed at run-time. An entity reasoning about context can adjust its model based on what sensory originated information is available, so that the updated model only describes information of currently available sensory data (with recomputed weights reflecting relative importance of available attributes). This would provide the most suitable description about context given a limited subset of sensed/discovered information. Many factors determine availability and relevance of information, such as information freshness [EH01], faulty sensors [YO00], discarded contradictory sensory data or communication faults. We present the following operations for composing and partitioning situation spaces.

Composing and Partitioning (Definition 4.11) Let S′ = {A i ,..., A k } and

S′′ = {A i ,..., A m } denote two models representing the same situation and let 101


there be at least one common context attribute shared between S′ and S′′ . Let

W ′ = {w ′i ,..., w ′k } and W ′′ = {w ′i′,..., w ′m′ } represent the sets of weights for corresponding context attributes in S′ and S′′ respectively. A composed situation space S would contain region of acceptable values for the complete set of context attributes from S′ and S′′ (i.e. regions of acceptable values for context attributes appearing in either S′ or S′′ or in both). A weight

wi

of

by: w i =

a

common

context

attribute

Ai

can

be

computed

w ′i ⋅ w ′i′ . Remaining weights (not shared) can be computed w ′i′ + w ′i ∑ w ′j′ w j∉W ′

by: w m =

w i ⋅ w ′i . w ′m

Weights for a partial model of S (for example S′ or S′′ ), consisting of a subset of regions can be computed based on the relative importance of weights in S.

wi . ∑wj

A weight w ′i is then computed by: w ′i =

w j∈ W ′

Proofs: Composition – Given definition 3.8, sum of weights in a composed situation space S, represented with weights from partial models can be written as:

w ′j w ′i w′ w ′′ w ′′ wi + w i + ... + k w i + l w i + ... + m w i = 1 . Given that in the w ′i w ′i w ′i w ′i′ w ′i′

general case some context attributes are shared in S′ and S′′ , it can be rewritten as: w i = ((

∑ w ′k ∈W ′

wi = (

wi(

w ′k + w ′k ∈ W ′ w ′i

w ′j′ ) =1. w ′j′∉ W ′ w ′i′

w ′k ) / w ′i + (

∑ w ′′) / w ′′)

−1

j

i

. By definition 3.8

w ′′j ∉W ′

Hence:

∑ w′

k

= 1 , thus:

w ′k ∈ W ′

w ′i w ′i′ 1 . + ( ∑w′j′) / w′i′) −1 = w ′i′ + w ′i ∑ w ′j′ w′i w j∉W′ w ′′j ∉ W ′

Partitioning - Given definition 3.8, sum of weights in partial situation space S ′ , represented with weights from original situation space can be written as:

wi w w′i + ... + k w′i = 1. Thus: w′i ⋅ ∑w j / w =1. Rewrite as: w′i = wi / ∑w j . □ wi wi j∈W′ w j∈W′

102


4.2.5 Negation of situations We have presented composition operations applied over situation spaces in the extended Context Spaces model. These operations are based on the proposed modelling and reasoning approach (ConSpaF) founded on accumulating evidential contributions for weighted context attributes of a situation space (presented in Chapter 3). This subsection demonstrates the applicability of our proposed modelling and reasoning for developing additional operations, and here we demonstrate this by proposing a negation operation applied over a situation space. The negation operation models the non-occurrence of a situation S (e.g., not in a meeting), and denoted by S . The negation simplifies transformations that can be applied to situation spaces and impacts the complexity of the reasoned about space. Under uncertainty, our reasoning approach computes a value of confidence in the occurrence of a situation. We require that the outcomes of reasoning about the negated situation would complement that confidence value. For example, if under uncertainty, reasoning about a person being in a meeting produces a confidence value of, say 0.8, then the confidence of not being in a meeting would be 0.2. Under uncertainty the remaining portion of confidence is assigned to the negated situation. This requirement can be expressed as: µ( S ) + µ(S) = 1. Similar to composition operation in subsection 4.2.1, the negation operation consists of three procedures: (i) composing the regions of acceptable values, (ii) transforming the relevance values (i.e. the weights), and (iii) transforming the contribution values. These procedural definitions are as follows.

(i) Negation operator on situation space (Definition 4.12) - A unary negation operator denoted by “ ¬ ” is applied over a situation space, yielding a new situation space, defined over the same context attributes as the original situation space. The operation is constrained on keeping the dimensionality of the original situation space. Given regions of acceptable values Akℜ = {W|Q(W)} ⊆ T and A ik ⊆ Akℜ , where T is some universal set of values and Akℜ is a region of acceptable values in the application space (and Akℜ and A ik are subsets of the same set,

103


effectively of the same type, i.e. [ Akℜ ] = [ A ik ]), then the negation of A ik , denoted by ¬A ik is the set in which every element e satisfies: e ∈ (¬A ik ) iff Q(e) = 1. The negation of a situation space S = (A 1 , A 2 ,..., A n ) is denoted by

¬S and is defined as follows: ¬S = (¬A 1 , ¬A 2 ,..., ¬A n ) □

(ii) Relative weight transformation (Definition 4.13) – We keep the weights of the original situation space. E.g. if the pairs ( w iS , A iS ) and ( w Si , A Si ) denote a region of values and associated weights in corresponding regions of the same context attribute in S and S, then w iS would be assigned the value of w Si .□

(iii) Contribution transformation (Definition 4.14) - Let A Si denote a region of acceptable values in situation space S and A iS denote the corresponding region of values (for the same context attribute) in S . Let e denote an element in A iS and c e denote its contribution. For each element e compute a contribution level c e , as follows. If e exist in A then c e = 1- contribution level of e in A Else c e = 1. □ We prove the negation operation as follows.

Proposition: µ( S ) + µ(S) = 1 Proof: Let w Si denote the weight of a region of acceptable values A Si in a situation space S. Let c Si denote the contribution level of an element in the region A Si . Let S denote the negation of situation space S. Given the matching function µ , then µ(S) and µ( S ) can be written as: n

n

i =1

i =1

µ(S) = ∑ w SicSi and µ( S ) = ∑ w iS ciS . S

S

S S By definitions 4.13 and 4.14: wi = wi and c i = 1 − c i .

104


Develop to:

µ(S) ∪ µ( S ) = n

∑w c

S S i i

n

n

n

n

i =1

i =1

i =1

i =1

∑ w SicSi + ∑ w iS ciS = ∑ w SicSi + ∑ w Si ⋅ (1 − cSi ) = n

n

i =1

i =1

+ w Si ⋅ (1 − cSi ) = ∑ w SicSi + w Si − w SicSi = ∑ w Si .

i =1

By definition 3.8 the accumulated weights in a situation space’s definition are n

equivalent to 1 ( ∑ w Si = 1 ), hence µ(S) + µ( S ) = 1. □ i =1

Example Consider the following situation space definition and the region of values of the same context attributes in the definition of the application space in Table 4.5.

Situation S Application Space

acceptable values

weight

contribution

[4, 8] [3, 7] [5, 8] [1, 10] [1, 10] [1, 10]

0.6 0.2 0.2

1 1 1

Region of attribute a Region of attribute b Region of attribute c Region of attribute a Region of attribute b Region of attribute c

---

Table 4.5 - Definition of an original situation space with associated weights and contributions

Given these definitions, we compute the negation of situation space S in Table 4.6.

Situation

S

region

weight

a b c

0.6 0.2 0.2

sub region [1, 4] [1, 3] [1, 5]

contrib. 1 1 1

sub region (4, 8] (3, 7] (5, 8]

contrib. 0 0 0

sub region (8, 10] (7, 10] (8, 10]

contrib. 1 1 1

Table 4.6 - Resulting negated situation space

Consider the following two context states at two different times:

C t1 = (a = 3, b = 6, c = 6) and C t 2 = (a = 5, b = 6, c = 4) . The accumulated confidence in S contrasted with the confidence in S is:

µ t1 (S) = 0.2 + 0.2 = 0.4 , µ t1 ( S ) = 0.6 , µ t 2 (S) = 0.6 + 0.2 = 0.8 , µ t1 ( S ) = 0.2 ,which satisfy the requirement from negation.□

4.3 Evaluating Complex Situation Expressions In the previous section we have explored algebraic operations that enhance reasoning by composing context descriptions. We now turn to logic evaluation as an approach to 105


enable more elaborate reasoning capabilities. Our objective here is to enhance the expressiveness and reduce the level of complexity in reasoning about situations. We develop an approach for inferring occurrences of logically conditioned situations, i.e. reasoning about the validity of expressions describing situations under logical constraints. We refer to these logical expressions, which contain situation spaces constituents as Complex Situation Expressions (CSE). Our proposed approach differs from classical logic-based techniques in two ways. Firstly, it is distinguished from existing approaches by incorporating the impact of uncertainty, thus enabling comparison and evaluation of two or more contradicting logical statements even when some of these are evaluated as being true. Secondly, we express the logical conditions in a fixed structure and provide a consistent strategy for reasoning about the represented information.

4.3.1 Reasoning about complex expressions In a Complex Situation Expression (CSE) we consider the following logical Context Spaces operations: AND, OR and NOT. We define the following operations to reason about expressions:

(1) Context Spaces logical AND operation: Si AND S j = min(µ(Si ) − ε i , µ(S j ) − ε j ) > 0 . (2) Context Spaces logical OR operation: Si OR S j = max(µ(Si ) − ε i , µ(S j ) − ε j ) > 0 . (3) Context Spaces logical NOT operation: NOT Si = (ε i − µ(Si ) ) > 0 . ( ε i and µ are defined in definitions 3.6 and 3.7 of Chapter 3).

For example, to reason about an expression such as, say, ((‘In a meeting’( S1 ) and (‘Having coffee’( S 2 ) or ‘Eating’( S3 ))) and not ‘Sleeping’( S 4 )), we would evaluate the expression as follows: Compute min(min(µ(S1 ) − ε1 , max(µ(S2 ) − ε 2 , µ(S3 ) − ε3 )), ε4 − µ(S4 )) and then compare the result with zero. The rationale for such reasoning comes from definitions 3.9 and 3.10. Our basic requirement for these operations is that they result in the same inferred Boolean value compared with traditional Boolean algebra evaluation. This is proven as follows.

106


Proposition: For any situation spaces S1 , S2 ,…, Sn and a Boolean inference function γ (definition 3.7), the following equations hold true:

(1) S1 AND S 2 AND…AND S n = γ(µ(S1 )) ∧ γ(µ(S2 )) ∧ ... ∧ γ(µ(Sn )) (2) S1 OR S 2 OR…OR S n = γ(µ(S1 )) ∨ γ(µ(S2 )) ∨ ... ∨ γ(µ(Sn )) (3)NOT S1 = ¬γ (µ(S1 ) ) Where ∧ , ∨ and ¬ are logical AND, logical OR and logical NOT, respectively. Proof for (1):

(I) S1 AND S 2 AND…AND S n = min(µ(S1 ) − ε1 , µ(S2 ) − ε 2 ...µ(Sn ) − ε n ) > 0 (II) γ(µ(S1 )) ∧ γ(µ(S2 )) ∧...∧ γ(µ(Sn )) =

µ(S1) − ε1 ≥ 0 ∧µ(S2) − ε2 ≥ 0 ∧...∧µ(Sn ) − εn > 0 Let µ(Si ) − ε i ( 1 ≤ i ≤ n ) be the expression with minimum value in (II), then

µ(Si ) − ε i also has minimum value in (I). Suppose (II) is TRUE, then (µ(Si ) − ε i ) > 0 , which means that (I) is also TRUE. Suppose that (II) is FALSE (i.e., (µ(Si ) − ε i ) ≤ 0 ) then both (I) and (II) are FALSE. So, for example reasoning with an AND operation such as in the expression: ‘Drinking

Coffee’

AND

‘Working

Late’,

numerically

max (µ(' Drinking − Coffee' ) − ε DC , µ(' Workin − Late' ) − ε WL )

evaluated

as

(where ε DC and ε WL are

the thresholds defined for the ‘Drinking Coffee’ and ‘Working Late’ situation spaces, respectively) would always yield a positive value if both situations are occurring, and always yield negative values if at least one situation is not occurring (assuming sufficient indications for that under uncertainty). Proof for (2):

(I) S1 OR S 2 OR…OR S n = max(µ(Si ) − ε i , µ(S j ) − ε j ...µ(Sn ) − ε n ) > 0 (II) γ(µ(S1 )) ∨ γ(µ(S2 )) ∨ ... ∨ γ(µ(Sn )) = µ(S1 ) − ε1 > 0 ∨ µ(S2 ) − ε2 > 0 ∨...∨ µ(Sn ) − εn > 0 Let µ ( S i ) − ε i ( 1 ≤ i ≤ n ) be the expression with maximum value in (II), then µ(Si ) − ε i also has maximum value in (I).

107


Suppose (II) is TRUE, then some expression µ ( S j ) − ε j ( 1 ≤ j ≤ n ) must be (µ(S j ) − ε j ) > 0 . As a maximum value expression in (II), µ(Si ) − ε i must also be positive, i.e., (µ(Si ) − ε i ) ≥ (µ(S j ) − ε j ) > 0 . Thus (I) is also TRUE. Suppose (II) is FALSE, then all expressions (including µ(Si ) − ε i ) in (II) are not positive, i.e., (µ(Si ) − ε i ) ≤ 0 . Thus, (I) is also FALSE. Similarly, reasoning with an OR operation such as in the expression: ‘Drinking Coffee’

OR

‘Working

Late’,

numerically

evaluated

as

min (µ(' Drinking − Coffee' ) − ε DC , µ(' Workin − Late' ) − ε WL ) (where ε DC and ε WL are the thresholds defined for the ‘Drinking Coffee’ and ‘Working Late’ situation spaces, respectively) would always yield a positive value if at least one situation is occurring, and always yield negative values if both situations are not occurring (assuming sufficient indications for that under uncertainty). Proof for (3):

(I) NOT S1 = ε i − µ(Si ) > 0 (II) ¬γ (µ(S1 ) ) = ¬(µ(Si ) − εi > 0) Suppose (II) is FALSE, which implies that (µ(Si ) - εi ) > 0 . Rewrite as (ε i -

µ(Si )) < 0 . This contradicts (I), therefore (I) must be FALSE. Suppose (II) is TRUE, which implies that (µ(Si ) - ε i ) < 0 . Rewrite as:

(ε i - µ(Si )) > 0 . Thus (I) is also TRUE.□ So, for example reasoning with a NOT operation such as in the expression: NOT ‘Drinking Coffee’, numerically evaluated as ε DC − µ(' Drinking − Coffee' ) (where ε DC is the threshold defined for the ‘Drinking Coffee’ situation space) would always yield a positive value if ‘Drinking Coffee’ situation is not occurring, and visa versa (assuming sufficient indications for that under uncertainty). It can also be shown that the proposed operations satisfy the properties of Boolean Logic. Proofs for this are presented in the Appendix of this dissertation.

108


4.3.2 A strategy for reasoning about complex situation expressions Complex situation expressions (as a logical statement about situations) can be transformed into Disjunctive Normal Form (DNF). Using this property we represent a complex situation expression in what we call Normal Situation Inference Form (NSIF). NSIF is a scalar matrix whose elements compute the differences between the matching functions ( µ ) and individual thresholds ( ε ) of situation spaces ordered according to the structure of the Disjunctive Normal Form (see example below). According to this structure, elements within a row form a conjuncture expression and disjunction applies between rows within the matrix. Building on the operations developed in the previous subsection we can apply a single consistent reasoning over the NSIF structure. It consists of inverting values for elements that are logically negated and applying a MAXMIN function over the complete matrix. That is, we compute the minimum value of each row and find the maximum between the minimum results. This provides a systematic way to structure and reason about complex compositions of situations that are represented by situation spaces with logical relationships. We demonstrate this approach in the following example.

Example Suppose a reasoning component needs to infer the validity of the following complex expression: (S1 OR (S 2 AND S3 ) ) AND (S 4 OR NOT S5 ) . We take the following steps: 1. Reduce the expression into DNF as follows: ( S1 AND S 4 ) OR ( S1 AND NOT S5 ) OR ( S 2 AND S3 AND S 4 ) OR ( S 2 AND S3 AND NOT S5 ). 2. Encode the expression into the following matrix (including inverting negations):

 µ(S1 ) − ε1  µ(S ) − ε 1 1  µ(S 2 ) − ε 2  µ(S 2 ) − ε 2

µ(S 4 ) − ε 4 null  ε 5 − µ(S5 ) null  µ(S3 ) − ε 3 µ(S 4 ) − ε 4   µ(S3 ) − ε 3 ε 5 − µ(S5 ) 

109


3. Apply MAXMIN (ignoring null elements), i.e., find the maximum value from

the minimum of each row and compare it to zero to infer the validity of the expression.â–Ą

4.3.3 Comparing between complex situation expressions Unlike evaluation of logical expressions with traditional logic-based approaches which determine the validity of logical expressions solely in terms of true and false, our approach applies a preliminary numerical evaluation of an expression (by applying matching functions proposed in Chapter 3, denoted by the symbol Âľ ) and results in a numerical confidence value. This enables us to compare and evaluate different, possibly opposing, logical expressions. In fact, uncertainty characterising context-aware pervasive systems, necessitates the ability to compare between situations or expressions under imperfect conditions. In logicbased reasoning, every proposition that has been reasoned about is equally evaluated, e.g., there is no distinction regarding the confidence in two situations inferred as being true. It might be, however, that one situation is inferred by using say, unreliable, inaccurate or relatively small number of indications and, therefore, contributes to a lower confidence in the inference result than the other situation. Our approach evaluates the inference confidences associated with propositions (situation spaces) in the expression rather than the final inference result, thereby providing a way to compute a single numerical confidence measure for the entire logical expression. Consider the following motivating example.

Example Suppose that a context-aware system evaluates two mutually exclusive complex expressions, say A = ((S1 AND S 2 ) OR S3 ) and B = (S1 AND NOT S3 AND S 4 ) . Suppose that both expressions are inferred as true, i.e., they logically seem to occur at the same time (although they are mutually exclusive). This is possible if reasoning is performed under uncertainty. In a traditional logic-based reasoning there is no way to determine which expression is more likely to be occurring whereas our approach determines a degree of confidence for each expression, by evaluating confidences that are products of reasoning about situations under uncertainty. Suppose the following values are evaluated for the NSIF structure: 110


 µ(S1 ) − ε1 µ(S3 ) − ε 3

A =

B = [µ(S1 ) − ε1

µ(S2 ) − ε 2   0.4 0.5  = , MAXMIN(A) = 0.4 null  − 0.2 null ε 3 − µ(S3 ) µ(S 4 ) − ε 4 ] = [0.4 0.2 0.1], MAXMIN(B) = 0.1

This computation tells the system that under the given sensed evidence and the fact that A and B are mutually exclusive, there is more confidence in complex expression A than complex expression B, and so A is more likely to be occurring.□

4.4 Summary In this chapter, we further developed our model and used spatial attributes of the model to investigate operations and relationships between situation spaces. We noted the appeal of using situation spaces as the main building blocks for developing a concrete model. Situation spaces provide an intuitive and appropriate level of abstraction for specifying a context model. Developing operations applied over situation abstractions further strengthens our modelling approach. This differs from models, whose designers only use lower-level predicates for articulating an application’s context model. With an intuitive approach to model a situation and the ability to reason about it, we developed algebraic and logic-based compositions of situations. We first developed algebra for the NCS model, which can be utilized by contextaware applications, operating under certainty. We have modelled spatially-based operators between situation spaces and illustrated their practical use. We then developed algebraic operations for the extended model. For example, we have proposed an approach to combine different perspectives of entities over situations (or objects) in a context-aware computing environment, or update a situation representation according to available information. Our approach handles information describing objects in different context and composes their representation into a single model. This is useful when different entities hold different descriptions over the same situation they need to reason about. Such circumstances might be frequent in pervasive systems when dealing with multiple computational entities that might have different knowledge and access to sensing devices. Finally, based on general operations for inferring the occurrences of situations under uncertainty (presented in Chapter 3), we developed an approach to evaluate complex

111


situation expressions formed by logic-based operations. We have proposed a matrix structure to represent complex situation expressions and developed a strategy to reason about such structures. It is to be noted that our approach computes a numerical measure of confidence in the validity of an expression consisting of logical composition of situations (and not merely a Boolean evaluation). Reasoning about the occurrence of each situation space in the complex expression can be computed by a number of approaches that consider uncertainty of information. Thus, the overall confidence measure accounts for uncertainty in the available sensed information. Consequently, an ability to evaluate and compare between several, possibly mutually exclusive expressions, is gained even if available evidence supports a number of expressions.

112


C

H

A

P

T

E

R

Design and Implementation of

F

I

V

5

E

ECORA Framework 5.1 Introduction In the preceding chapters we have proposed a theoretical model and developed algorithms and concepts to reason about and manage context. In this chapter we discuss implementation of the model, its concepts and algorithms, in a framework for contextaware pervasive computing. The framework has a significant reasoning component and supports distributed processing via context-aware mobile agents. Built on the Context Spaces model (Chapters 3 and 4), the framework aims to provide a general, flexible, reasoning-capable architecture for context-aware computing. By combining mobility with context-awareness using mobile agents we aim to provide agility, fault-tolerance and robustness for pervasive systems. We develop and integrate three core capabilities, making the following contributions to building context infrastructure: (1) reasoning about context under uncertainty as a main ingredient in a context framework, (2) the ability of components to move physically and/or virtually within the network, and (3) implicit event-based communication between mobile and static entities within the framework. We assert that future computing pervasive systems would benefit from unified and effective reasoning capabilities and that mobility of context-aware software entities can enable realization of particularly challenging scenarios. The contribution of this chapter is, therefore, not only in implementing our theoretical concepts but also in proposing,

113


motivating and developing innovative architecture, which addresses important challenges in context-aware pervasive computing systems. In Section 5.2 we outline our general architectural approach, its focus, goals and motivation. We then present design and implementation details with a focus on reasoning under uncertainty as a main goal of a middleware for context-aware computing. We describe a reasoning engine as a main component within a larger distributed architecture for context middleware. We present and develop different components of the middleware, discussing scalability, communication and usability of the framework. In Section 5.3 we describe what we consider the next step in building context-oriented architectures for pervasive systems. We present our vision, design and implementation of an architectural approach to deploy context-aware mobile software agents in pervasive systems. We focus on distributed communication and computing challenges when deploying mobile agents in pervasive environments and we present our solution, its implementation and evaluation.

5.2 A Framework for Context-Aware Computing To develop a framework for context-aware computing, a suitable, unifying general purpose context model should be built. If reasoning capabilities are a major factor for context-aware applications, such model should also support effective reasoning. In this section, we describe ECORA (Extensible Context Oriented Reasoning Architecture) - a framework based on the Context Spaces model, which is designed to facilitate contextaware computing, including reasoning under uncertainty about context, in distributed environments. We emphasize a scalable and robust approach with a focus on reasoning and appropriate communication capabilities as important services provided by a contextaware computing infrastructure. We discuss an architecture utilizing a reasoning engine server, termed CORE (Context Oriented Reasoning Engine), which is built with Context Spaces principles and is deployed with a number of additional components we will describe. The framework provides functionality in the form of Java classes that can be used in building prototype context-aware systems. By starting from a functional component library, we achieve flexibility to facilitate different architectural designs for context-aware computing systems. For example, we start with the notion of a scalable reasoning server, 114


providing services to clients (including mobile agents). However, we use the same functionality to support a decentralised mobile architecture for context-aware computing in the next section. In the latter case, agents (e.g. applications, end users, mobile software agents) can individually become context-aware with appropriate functionality and autonomously exchange information between them. We highlight the following unique properties of the framework:

Providing a unified and expressive description of context and situation by implementation of the Context Spaces model.

Achieving effective reasoning about context under uncertainty by combining Context Spaces related reasoning algorithms including sensor data fusion and logic-based algorithms, and proposed Context Spaces algebraic operations.

Achieving (i) flexibility of reasoning about context, (ii) agility in approaches to utilize reasoning capabilities, (iii) extensibility of the framework and (iv) scalability of the proposed reasoning services, by combining client-server, message queuing and mobile agent design approaches and using a modular functional component library for modelling and reasoning about context.

Construction of context-aware mobile agents by embedding mobile agents with a light-weight version of the functional component library for individually modelling and reasoning about context and using Context Spaces Algebra operations with supported publish-subscribe communication during collaboration.

5.2.1 Overview The ECORA framework is conceptually grouped into four tiers, providing services that handle different stages in the life cycle of context-aware computing systems. Built upon the Context Spaces model, it enables clients to generically specify context models (i.e., definitions of situation spaces) both at design time and at runtime and share those models with each other. A number of services, transparent to client applications make the basic framework. These handle sensory originated data and provide reasoning capabilities for context-aware clients. The framework provides an API and a simple language to describe situations to enable context and situation awareness for clients. The four conceptual tiers are presented in Figure 5.1:

115


A reasoning tier handles the inference task. It provides the capability to reason about complex situation expressions with a built-in implementation of Context Algebra operations and inference algorithms (as described in chapters 3 and 4). The reasoning tier also provides monitoring services and analysis of the stability of situations (discussed in Chapter 7). These can be requested by client applications that will be informed of changes in a given context or predicting such changes.

A communication tier provides several communication facilities, addressing various needs in a distributed system. These include message queuing services, which enable the scalability of the framework, content-based event notification services that decouple senders of notifications from receivers, and point-to-point TCP/IP based communication between known entities. The elaborate communication scheme is essential in achieving a scalable, flexible and agile computing platform.

A data tier provides services that handle data persistency and consistency. Contextaware environments often produce large volumes of sensed information and the data tier task is to maintain a repository of consistent and up-to-date information. Historical information that can be used for data mining is maintained, separately. It also provides services to store information, whether it is a sensor reading value or complex context models that are shared by clients.

A client application tier provides proxies to the services the framework offers. From a client application viewpoint, there exists only a single interface that represents the entire context framework. A client application, be it a program requiring reasoning services or a program monitoring a collection of sensors, uses the same type of a proxy object, which provides it with suitable services. It is the proxy’s task to communicate the received requests and information accordingly, and provide services the client requires, in a transparent way. REASONING TIER

COMMUNICATION TIER

DATA TIER

Context Inference

Content-Based Event Notification

Data Persistency

Model & Info. Sharing

A P I

Context Algebra Operations

Message Queuing

Data Consistency

Query Interface

A P I

Stability Analysis

P2P TCP/IP Fig. 5.1 – Four functional tiers in framework architecture

116

CLIENT APP. TIER


From a deployment perspective, the four conceptual tiers are translated into several separate services and a set of programmable objects, used by clients. Figure 5.2 depicts an overview of the deployed components. We separate the environment into two distinct deployed domains, namely a reasoning context server that supports context-aware computing, and the domain of client applications using the services of the context server. Three separate services are active in the context server. These include (1) COR Reasoning Kernel, which provides inference services, (2) COR State Monitor, which provides services for state monitoring and analysis of context, and (3) COR DB Service, which handles consistency and persistency of information in the database. Context Server

COR DB Service

Message Queues Services

DB COR State Monitor

Event Notification Services

COR Reasoning Kernel

COR-Proxy

Client Application

Client

Sensor

User

Fig.5.2 – Overview of deployment architecture

Clients make use of COR-Proxy objects, which communicate with appropriate services to fulfil the client’s task. As previously described, three types of communications are being used, namely, (1) point-to-point – between the proxy object and the reasoning and monitoring services, (2) message queuing – between the proxy and COR DB service (for persistency of sensed information and shared models), and (3) content-based event notifications - between the reasoning and monitoring services and the proxy objects, decoupling senders from receivers, such that one entity can request information from 117


others without knowing their precise identity. This type of communication also provides asynchronous messaging for clients that request monitoring services such as notifications about occurrences of specific situations.

5.2.2 Packages As previously discussed, the framework provides functional component library to facilitate flexible construction of context-aware services. These include:

The Model package, which provides a way to model situations based on the concepts of Context Spaces. The package consists of a collection of classes that represents fundamental concepts, such as context attributes, context state, situation spaces, regions of acceptable values, predicates, and so on. It enables the creation of a hierarchical context model, made up of situation spaces, each defined over a collection of acceptable attribute regions. The collection of situation spaces defined by the application is grouped in a singleton ‘Model’ class (i.e. a single model instance per client) that captures additional information about the created model, such as compatibility of situations and natural flows between situations. The package enables clients to create Context Spaces based models, incorporating specific information regarding sensors, context attributes’ inaccuracies, and typing of sensed information (e.g., numerical or textual). It stores the received information in data structures, which enable convenient extractions and effective representation of the context description. The set of classes in the Model package is the common means to describe and perceive context related information, used by all framework components and participating entities (e.g., external user applications).

The Algebra package groups a collection of classes that performs operations on the classes of the Model package. The operations defined in this package are based on Context Algebra (Chapter 4) and offer operations such as combination of situation spaces and negation of situation spaces. The Algebra package is mainly used by components of the reasoning engine (i.e. COR Reasoning Kernel and COR State Monitor components).

The Kernel package is the largest collection of classes, providing the core functionality of reasoning about context under uncertainty. Reasoning is performed over context models or situation space objects, defined using the Model package. The

118


classes in this package deal with parsing and decoding complex situation expressions, conversion of user inference requests into matrix form (see Chapter 4, subsection 4.4), and performing reasoning and verification activities.

The COM package (Context Oriented Monitoring) provides monitoring services according to users’ requests, extending the basic reasoning functionality of the Kernel package. It also provides analysis of the system state’s stability in context.

The RDBL package (Reasoning Data-Base Layer) groups classes that provide database functionality, such as uniform methods for insertion and extraction of information, persistency of context models, and maintaining up to date description of the context state in the database. Classes from this package are used by the context server components.

The RPrx package provides functionality for creating and deploying proxy objects by the middleware clients.

These functional libraries and their inter-dependencies are presented in Figure 5.3. RPrx

Model

Kernel

Algebra

COM

RDBL

Fig. 5.3 – High-level functionality description by class packages

For illustration, we present high-level class diagram of the Model and reasoning Kernel packages in Figure 5.4. The Model package is made of a hierarchy of serialzable objects (upon instantiation) and its functionality is used by different classes of the reasoning kernel package. For example, classes in the reasoning package receive a model containing situation spaces definitions and apply reasoning functionality over them.

119


CoreProxy

model Predicate

PredicateException

XAttribute

XState

XAttributeRegion

Serializable (J)

XSpace XSubRegion

XModel

Inferencer

Reasoner

XModelException

XDecoder

XMLBuilder

Runnable (J)

Parser

XMatrix

XEncoder

IncomingServerClient

Server Process

CoreException Provider

IncomingProviderClient

(reasoning) kernel

Fig. 5.4 – High-level class diagram (partial view) of model and reasoning kernel packages, denoting relationships, dependencies and usage between different classes in these packages

From this general overview of the system (described from conceptual, deployment, packages and classes perspectives) we turn to a more detailed description of the framework. We will examine different activities and describe the participating components. In Section 5.2.3 we present the components involved in creating computing transparency for clients using the framework and its services. Section 5.2.4 describes the design of CORE reasoning engine. Section 5.2.5 describes the design of the database layer

120


dealing with handling high loads of sensory information and representing shared contextual information in the database.

5.2.3 The client perspective – computing transparency with COR-Proxy and the Model Package COR-Proxy objects are used by clients to access the middleware services. The proxy provides an interface to perform various tasks depending on the client’s type. For example, clients can request reasoning over complex situation expressions ([1]) or register to receive events when some situation occurs ([2]). Alternatively, clients can use the proxy to share information such as sensor readings ([3]). In general, we distinguish between two broad types of clients, namely, applications that use the proxies for receiving reasoning services, and applications that contribute information into the system, such as applications that monitor sensor readings. Clients that use the proxy can be both of these types at the same time. Requests for different tasks are routed to different appropriate services by the proxy object. This activity is depicted in Figure 5.5; the proxy object routes requests according to the specific task, sending it directly to the reasoning components ([1] and [2]), to a message queue ([3]) (which is listened to by the DB COR component), or to the event notification mechanism. Context inference queries

State monitoring requests

[1] Event Notif. Service Active Requests for Sensor Input

Msg. Queues Service Share information

[2] Event Notif. Service Monitoring notifications

[3]

[4] COR-Proxy

COR-Proxy

Sensor

User

Model package RPrx package

Fig. 5.5 – Routing requests by service type

121


Similarly, replies from services are received by the proxy either synchronously, in which case it forwards the result back to the client method call, or asynchronously, in which case messages are received by the client at a later stage ([4]). To achieve this, each client program that uses the proxy must create a proxy object and extend an abstract class named ‘RequestDataListener’. Consequently, the proxy approach, which hides the details of the underlying context server framework, provides desirable computing transparency for clients. Together with the ability to create context models, provided by the Model package, clients can participate in a context-aware computing scheme, backed by an underlying context framework. This design for a client Java class using the proxy object is illustrated in Figure 5.6. <<abstract>> RequestDataListener Abstract:Notified(...)

ClientClass Notified(...) Do(...)

import RPrx.*;

import reagine.model.*; import RPrx.*;

Notified(…) { //do something with //received notifications }

// create a model XModel model = … XSpace sp = … // create proxy object COR-Proxy obj = new COR-Proxy(…);

Key - details of function in pseudo-code

Fig.5.6 – Client program using the framework proxy object

COR-Proxy provides a Java API for activating system services. It includes the following method calls: public String infer(Hashtable situation_spaces, String expression) CoreException

- A general purpose inference service applied over a description of a complex situation expression (as discussed in Chapter 4), specified by the client. The ‘infer’ method call provides an answer to queries such as: Is (Situation-A AND Situation-B) OR Situation-C Occurring? The complex logical expression is defined by the client with a simple language using the literals ‘&’, ‘|’, ‘!’, ‘(‘, ‘)’, representing the logical conditions of AND, OR, NOT and nested conditions (using parenthesis), 122


between situations, respectively. The implementation (at the reasoning engine side) supports complex structures, with no practical limitations regarding the expression’s amount or depth of nested conditions. As arguments the method accepts the complex situation expression and an optional collection of situation spaces that make up the complex expression. If such collection, or any part of, is not specified by the client then it is extracted by the reasoning server from a centralized repository of shared situation spaces. For example, the following code demonstrates a client method call providing only a partial list of situation spaces definitions that make up the complex expression: Hashtable sits = new Hashtable(); sits.put(sp1.getName(),sp1); //sp1.getName() = situation1 sits.put(sp2.getName(),sp2); //sp2.getName() = situation2 String result = COREProxy.infer(sits,"(situation1 | situation2) & situation3");

Parsing the client request, the reasoning engine server identifies the missing situation space and looks up its definition in the shared data repository. If the situation space is not found (has not been shared by any client) then an appropriate exception is returned to the calling client. public Document inferByProperty(Hashtable situation_spaces, String expression, String property) CoreException

- Provides the ability to infer the validity of a complex situation expression, “pinned down” over some arbitrarily defined property. E.g., infer the occurrence of some situation that happens in physical locations, or happens to users (where ‘location’ and ‘user’ are property types). The function returns an XML document specifying the validity of all situations that may occur considering the property. public String inferByPropertyValue(Hashtable situation_spaces, String expression, String property, String value) CoreException

- Infers the validity of a complex situation expression, for a specific property value. E.g., infer the occurrence of some situation that happens in the ‘meeting room’ or to a specified user. public void shareInformation(String attribute_name, String attribute_value, String dominantProperty, String pValue, String inaccuracy)

123


- Share information such as sensor readings and store it in the database. Required arguments in this method are the attribute_name and attribute_value only. public void monitor(XSpace sp, int occurences, String UID) CoreException

- Registers a request for receiving notifications on events occurring in relation to some basic situation. E.g., notifications when a user enters and leaves a ‘Meeting’ situation (where ‘Meeting’ is defined over a single situation space). public void monitor(Hashtable situation_spaces, String expression, int occurrences, String UID) CoreException

- Registers a request for receiving notifications on events occurring in relation to some complex situation expression.

In addition to the API exposed by the proxy object, the Model package also provides an API to build context models and share those models via a shared storage. Figure 5.7 demonstrates client code defining predicates for regions of acceptable values as part of the process of defining situation spaces. In this example, region1 is defined with three predicates over a domain of numerical values between 10 and 50, excluding 11, 22, 33, 44. Similarly, region2 accepts a domain of textual values, assigning a contribution of 1 to elements that are members of the set {‘A’,’B’,’C’,’D’}, contribution of 0.6 to any other element that is not a member of the set {‘E’,’F’,’G’} and a contribution of 0 to elements that are members of the set {‘E’,’F’,’G’}. Every instance of a ‘Model’ class in the Model package has a method responsible of storing itself (the instantiated class) transparently to the repository, which is accessed by the reasoning engine. This is achieved by applying a number of design patterns and following the flow of actions illustrated in Figure 5.8. A user application makes use of the RPrx and Model packages to participate in a context-aware scenario. It builds a context model and activates the ‘shareModel()’ method to share the locally defined model with other client applications ([1]). The model, which is a hierarchical collection of serializable objects ([2]), is then inserted into storage according to the location of the client application. For example, if the client and database are on different hosts, the model is serialized into remote message queues and then inserted to storage by the COR DB Service ([3]). If both the database and client are local, then the model directly inserts itself ([4]).

124


double[] bad_values = {11, 22, 33, 44}; Predicate p1 = new Predicate("=<", 50); Predicate p2 = new Predicate(">=", 10); Predicate p3 = new Predicate("!", values1); Predicate[] predicates = {p1, p2, p3}; region1.addSubRegion(predicates, 1); String[] values1 = {"A", "B", "C", "D"}; Predicate p1 = new Predicate("=",values1); Predicate[] predicates1 = {p1}; String[] values2 = {"E", "F", "G"}; Predicate p2 = new Predicate("!",values2); Predicate[] predicates2 = {p2}; region1.addSubRegion(predicates1, 1); region1.addSubRegion(predicates2, 0.6); Fig.5.7 – Defining predicates over regions of acceptable values in the definition of situation spaces Key - hierarchical structure of object data stream

COR DB Services XModel.Persist Msg. Queues Service

[3]

DB

[4] XModel.Persist Share

[1] context

XModel

model

[2]

XModel XSpace

Model package

. . .

User RPrx package

XRegion . . .

COR-Proxy

Fig.5.8 – Sharing context models

A class diagram depicting the act of sharing a context model and the well known design patterns that are involved in that process is given in Figure 5.9. The actual persistence activity is performed using the Visitor pattern [GH94], enabling the model’s objects to accept an external visitor function (residing in RDBL package) that inserts them into storage.

125


Client

GetInstance Msg. Queues Service

ShareModel

Singleton, Factory DB remote

DB local

XDB PersistModel( ) TouchDB( )

XModel GetModel( ) ShareModel( ) Persist( ) AcceptVisitor( )

Factory Visitor

XSpace AcceptVisitor( )

XRegion AcceptVisitor( )

Key implemented design patterns in method

Fig. 5.9 – Sharing context models, class diagram and involved design patterns

5.2.4 The reasoning engine - inference and state analysis The reasoning engine is a general term referring to the two reasoning components residing in the context server, namely, COR Reasoning Kernel and COR State Monitor. These components comprise the majority of code and functionality in the framework and provide the primary ingredient in the process of reasoning about context. In general, due to the underlying Context Spaces theory, the task of performing basic reasoning is identical for any combination of situations specified by different expressions. Consequently, the reasoning process becomes standardised and consistent. It follows the concepts discussed and illustrated in Chapter 3 and 4, which can be generalised into the following set of actions: (1) Parse client expression (2) Reduce into Disjunctive Normal Form (3) Encode into

Context Spaces Matrix Form (4) Perform matching over elements in the matrix with a chosen data fusion algorithm (5) Apply MAXMIN considerations over the results to infer the validity of the expression. This basic reasoning process is performed for any reasoning request. The complete life-cycle of the reasoning process comprises additional procedures that perform verifications, which partially resolve existing information discrepancies. (This aspect of

126


the reasoning process is covered in Chapter 7). The latter activity is configurable and optional for any given inference request. The general activity performed by the reasoning engine triggered by client requests is depicted in Figure 5.10. A client proxy object initiates a request, either directly to COR Reasoning Kernel via TCP/IP requesting reasoning services and synchronously awaits a reply (sequence [1],[2],[3]); or registers to some monitoring services from COR State Monitor and is being notified when some context related event occurs (sequence [4],[5],[6],[7]).

sensors

Model package

DB

[5]

Get current state

Data Fusion Verification Algebra op.

Algebra package Kernel package

[2]

RDBL package

Model package COM package

Request sensors updates

COR Reasoning Kernel

[1] Query [3] Inference result

Kernel package COR State Monitor RDBL package

[6] Notify Event Notification Services

Request context monitoring

Monitored context notifications

[4]

COR-Proxy

[7]

Context stability Prediction

Fig. 5.10 – Reasoning engine (CORE) activity

The context state information, which is used during the reasoning process, is extracted directly from the local database, residing on the context server. While this information is considered up-to-date, it is not assumed that it consists of information from all available sensors. The COR-M framework allows two types of information retrieval from sensors, namely, active and passive (i.e., push and pull methods), according to the specific sensor design. We assume that application programs that use the proxy object can be used to monitor sensors readings and/or directly request information from those sensors if such action is feasible. During reasoning a specific method identifies if any information that is required for the inference is missing. In such cases it actively issues a request for the missing information via the content-based notification system, specifying the specific kind of information required. The reasoning engine does not deal with the identities of the sensors

127


that may have that information (sensors are architecturally decoupled from the reasoning engine, having no direct link between them). Instead, applications that monitor sensors are being notified of the request and are responsible for sharing such information if it is available to them, via the proxy object. From a connection management perspective, each client’s request or registration task is individually managed in a separate thread, according to the ‘command’ design pattern [GH94]. A client connection is encapsulated in an ‘IncomingClient’ object, which handles all the necessary reasoning activity, previously described, for that request. This approach applies to managing both inference requests as well as requests for monitoring activity. Thus, the engine can handle multiple requests from different clients at the same time.

5.2.5 The COR-DB service - scalable data management Context-aware applications are often characterised by large volumes of context related information, potentially produced by many sensors. The issue of scalability and more specifically the ability to handle large quantities of raw sensed information is a priority in designing an effective framework for context-aware computing. Using COR-DB service the design provides additional architectural approaches to address this challenge. Firstly, it decouples applications that produce sensed information from the reasoning process. COR-Proxy pushes sensory information via COR-DB service, updating the context state representation, without involving the reasoning components. Consequently, the “heaviest” task from the framework perspective, namely, the reasoning task is unaffected by heavy loads of information. The reasoning components only access up-to-date representation of the context state. Secondly, the issue of handling large quantities of information is resolved by using a message queuing design approach. Rather than handling many data insertions, originating from different sensor applications and contributing to the creation of a bottleneck in the insertion process, information is first stored in queues. Then, a COR-DB data service, serially (or in parallel according to configuration) handles the insertion task according to its capability. As a result, high loads of information do not decrease COR-DB’s ability to perform insertion, and allow arbitrary increases in information loads (we assume that inserting a message describing sensor

128


readings into a queue is significantly lighter and faster task than storing that information into the database). The design of this approach and the activities handled by COR-DB are illustrated in Figure 5.11. Information arrives first to message queues ([1]), then retrieved by the CORDB Service ([2]), and then inserted into storage ([3]). A second activity pursued by COR-DB is maintaining consistency and up-to-date status of information. The component regularly monitors the storage and minimises its size by allowing only relevant and up-to-date information to exist. Consequently, entities that are interested in state information can directly retrieve it from storage without performing costly (in term of time) filtering operations. Historical information is also maintained separately from the current relevant state information.

Sensors updates

Msg. Queues Service

[1]

[3]

DB Persist models Update sensed data

[2]

Monitor data size & relevance Clean storage

COR DB Services

Model package RDBL package

Fig. 5.11 – Handling high loads and quality of data

5.3 Using the Framework with Mobile Agents Client-server architecture used in building context frameworks can arguably deal well with challenges of existing distributed systems. However, as pervasive systems become larger in scale, more open and heterogeneous, and applications more challenging, the autonomy, agility and dependability of distributed components would become critical architectural features. In such conditions, the mobile-agent paradigm becomes most valuable as it supports these features by integrating autonomy with mobility. In complex pervasive systems, the ability to fully exercise centralized control is questionable and hence autonomous light-weight components, managing different tasks for different clients can become advantageous. Incorporating context-aware mobile agents into pervasive systems would enable agility and fault-tolerance (e.g. in face of frequent disconnections). Agent mobility would also become useful given an unreliable nature of the underlying

129


wireless network and resource limitations of devices. For example, using mobile agents to track users, utilize the most reliable resources and being close to the source of information in face of recurrent disconnections. These capabilities contribute to the reduction of network load and enhance the system’s scalability and fault-tolerance [LO99, KG02]. Consider the following scenario as a motivating example for the benefits that can be attained by use of mobile agent technology in context-aware pervasive applications.

Scenario - Emergency Evacuation System Consider an emergency evacuation system in which an assortment of computing devices, such as physical sensors, monitoring applications and software mobile agents in wireless network settings make up a dynamic pervasive system. During emergency evacuation it is critical to guide employees/residents in a building to safe exits in shortest and safest routes. With client-server architecture it can become difficult to actively guide each and every individual user (from scalability and usability perspectives), who may be trapped in specific locations or encounter specific difficulties en route. For instance, there might only be a limited number of electronic signs along the way to provide essential evacuation information. In contrast, by using the mobile agents’ paradigm the system is able to dynamically “embed” intelligence in large numbers of unused devices in the environment. An agent injection service can “inject” mobile agents into devices such as unused desktops, notebooks, or any other device that can host a light-weight agent framework. Mobile agents can exploit the many devices that surround users in future/modern building/office environments. Mobile agents can then actively and autonomously guide evacuating users, by making use of existing devices in the local environment, such as desktop speakers, monitors and even personal PDAs of users. Context-aware mobile agents can reason about safety context, validate and verify context at runtime and distinguish safe routes by applying reasoning and sharing information, communicating with local sensor devices and with other mobile agents in the multi-agent community.□ To achieve such and similar visions our goal is to develop necessary functionality for developing context-aware mobile agents. We perceive the following two approaches to make mobile agents context-aware.

130


Mobile Agents as an application layer The first approach treats mobile agents as an application layer utilizing the context framework. In such a scheme mobile agents are deployed on top of the context framework using CORE services to become context-aware. Mobile agents become clients of the framework connecting to the reasoning server via COR-proxy objects. In such a case they enjoy robust reasoning with information utilized by the reasoning engine, originating from disparate sensors, making the most informed inference decision. However, in this approach mobile agents become dependent on other entities, most notably the centralized reasoning engine, in order to gain context-awareness. This has ramifications regarding fault-tolerance and scalability of the mobile agent based system. It also weakens fundamental properties of mobile agents, namely, autonomy and agility, with consequent limitations regarding managing complex pervasive cases.

Mobile Agents utilizing context-awareness functionality Rather than using a centralized reasoning server for attaining context-awareness, mobile agents can themselves carry the library of functionality for performing context reasoning over the Context Spaces model. In such a case, mobile agents use the previously discussed Java packages to build Context Spaces models and use the reasoning Java package to perform reasoning over the model. This approach, of distributing the reasoning process, embedding mobile agents with their own reasoning capabilities contributes to a more robust and agile system (see the previously mentioned motivating scenario). Mobile agents with embedded reasoning capability do not need to depend on a centralized reasoning server. However, this approach can also weaken the overall reasoning capability when not all relevant information is locally available. That is, it would be mistaken to assume that an agent by itself has complete information regarding the situations it needs to reason about. In such a case, suitable communication between agents needs to compensate for the lack of information that an agent has, i.e., agents should now effectively share information to gain a broader perspectives of situations. From the above we note a trade-off between a centralised “heavy duty� reasoning approach and light-weight fully distributed reasoning. The combination of both is arguably the most suitable. Agents can be deployed as an application layer on top of the middleware, utilizing robust reasoning services but also capable of reasoning independently.

131


To make this approach feasible, the ability to share and communicate relevant context information and disseminate events between mobile agents, applications and devices of the pervasive system, need to be established. With an effective way to communicate, such as with using the Publish-Subscribe communication genre, facilitating implicit invocations (as noted in [DG97]) mobile agents could request missing information from other agents without specifying specific recipient identities but only the type of required information. Figure 5.12 presents our proposed architecture integrating the context framework, application oriented mobile agents and event-based communication between entities of the system. Note the injection service, which embeds mobile agents with tasks and itineraries and injects agents into specific physical locations in the pervasive system.

COR DB Service

Database

CORE

MQ Services

Mobile Agent

Event Router

Agent Injection Service

COR-Proxy

‌

Mobile Agent Model package Kernel package

Fig. 5.12 – Proposed architecture in which event notifications are exchanged between context-aware mobile agents, reasoning server and system components.

To realize the above architecture in practice, we develop and evaluate an implicit event-based mobile agent communication mechanism. While standards and practices for mobile agent communication exist, the problem of implicit communication between agents as well as between agents from diverse platforms or environments poses a major challenge [LF99b]. In the following section we explore agent communication practices and motivate the use of publish-subscribe genre as a complementary communication mechanism, suitable for pervasive computing systems. We then discuss the problem of integrating such publish-subscribe communication with mobile agents and present our solution and evaluation to that problem.

132


5.3.1 Agent communication and Publish-Subscribe model Existing research in agent communication languages (ACL) has focused on providing agents with a medium for communicating information and knowledge. ACL is a paradigm for communication between autonomous agents in distributed environments, suitable for agents that adapt and cooperate in heterogeneous settings [LF99a]. Messages in ACL are considered “speech acts” and denote intentions and states of agents (and can therefore be used to follow the BDI model with modalities such as belief, desire and intention [RG91, RG95, HU99]). There are two primary agent communication languages, namely, KQML [SK93] (Knowledge Query and Manipulation Language) and FIPA ACL. Both are based on speech act theory, namely, messages are perceived as actions, since they trigger some form of action at the recipient agent [LF99a]. Using these languages, agents can exchange information with different languages describing the message’s content, use a variety of communication protocols for the message transfer and assume different semantics associated with the message content. ACL, however, is not intended to handle all possible types of messages that may be required by an agent during execution, Rather, it is an attempt to enable more meaningful exchange of information in a conversation-like manner. As such, we perceive an eventbased communication between agents as a complimentary mechanism in two aspects. Firstly, the publish-subscribe communication model can (naturally or with clever mapping) serve as the underlying communication protocol for ACL, such as other lowlevel protocols that are used for ACL (e.g. SMTP, TCP/IP, IIOP, or HTTP [LF99a]). Secondly, the event-based paradigm with an intermediary server is complementary to normal point-to-point messaging as a means to exchange additional information, e.g., to provide an agent with information the agent is unable to request from another agent directly. The paradigm of Publish-Subscribe communication has become a popular choice for a variety of applications and has proven useful for asynchronous communication between loosely coupled components of distributed systems [DG97]. Recently, research has begun to look at this type of communication for applications in wireless networks, and address a variety of challenges, concerning publish-subscribe communication, that arise in such environments (e.g. support for disconnected operations [CC03, CLP03, BH04]). (Adding

133


such communication capability to mobile agents gives rise to additional technical challenges, related to issues concerning code mobility of software agents.) In its original form, the Publish-Subscribe model is stateless and is characterized as fast, efficient and a relatively simple mechanism to implement. This pure light-weight form of publish-subscribe communication is distinguishable from the stateful implementation, which is common in message queuing platforms, including BEA MessageQ [BE05] and a range of applications that are built using the Java Message Service standard (JMS) [SU99], e.g., [OR05, IB05, SU05]. A weakness of the stateless model is potential loss of messages, as messages are not stored (i.e., the model follows a light-weight ‘fire and forget’ approach), but provides a highly scalable and fast communication mechanism. Message queues use the store-andforward technique, which guarantees the delivery of messages but results in higher latency, greater overheads and slower message delivery [BS02]. Further distinction of event-based systems is the evolution from subject-based systems (a.k.a. topics), in which a message relates to a group of subjects towards content-based systems, where a subscriber can search for content that appears within a message. The content-based approach improves the expressiveness of subscriptions, which can contain complex queries over the message content itself [BH04], without restrictions or attachment to specific group or topic. This provides greater flexibility to applications as there is less coupling between producers and consumers of messages [SS01, LP02] and allows message filtering over arbitrary message content. Examples of this type of contentbased communication include middleware such as Elvin [SA00b], LeSubscribe [AS99], Siena [CR00] and Gryphon [BS02]. We highlight the following benefits of Publish-Subscribe systems for mobile agent operating in pervasive environments:

The concept of an event is a natural abstraction for the activities within the environment and the interactions among places and agents. The event service only serves as a means of communicating (potentially large volumes of) short messages among agents or to agents about events, in a lightweight manner.

Publish-Subscribe middleware provides implicit invocation [DG97]. This suits a dynamic environment, where A needs not know B’s location since B might be continually moving, and A can interact with other components in the environment without knowing their details (e.g., their name, or how many agents there are, thereby providing scalability). 134


The publish-subscribe paradigm is independent of agent toolkits – some middleware provide APIs implemented in different languages, e.g., Elvin [SA00b] implements APIs for C, C++, Perl, Python, and Java languages, and so can be used for communication between agents built using different toolkits.

Performance studies of publish-subscribe systems suggest that they are highly scalable and are efficient means of communication in large distributed systems [CW02, SA00b].

We propose an appealing type of messaging that becomes possible by integrating context-awareness, publish-subscribe communication and mobile agents. We coin the term “context-based” messaging to messages that are routed according to the context of the recipient rather than according to its identity [LP03]. We motivate the ability to send messages to a collection of agents based on their current context, without knowing the precise identities of the agents, and where agent’s context is the situation of an agent as is made known by the agent.

5.3.2 Integrating mobile agents with Publish-Subscribe We have motivated the use of the Publish-Subscribe model and in particular contentbased messaging for communication between context-aware mobile agents. We now turn to realization of this idea. For complete account on challenges, motivation and solution for event-based messaging between mobile agents, we refer the reader to [PZ04a]. In this chapter we use Elvin [SA00b] as a representative of this kind of event-based model and its realization. The principles of the general Publish-Subscribe model and its use for mobile agents remains, however, the same for other middleware. Elvin provides a content-based messaging between entities, providing the flexibility to operate in a dynamic environment, independently of the need to configure information relating to the recipients of a notification. The notification itself is encapsulated within an object and contains a list of key-value pairs. The notification element supports several data types, such as integers, floating points, strings etc. A consumer of messages expresses its interest with a subscription element, which is built with a special subscription language containing simple logical expressions [EL00]. Consider the following subscription expression (from [EL00]): (TICKERTAPE == "elvin" || TICKERTAPE == "Chat") && ! regex(USER, "[Ss]egall")

135


This subscription expression will match any notification whose TICKERTAPE field has the string value "elvin" or "Chat" except those whose USER field also matches the regular expression "[Ss]egall". This subscription would match the following notification example: TICKERTAPE: USER: TICKERTEXT: TIMEOUT: Message-Id:

"Chat" "alice" "hello sailor" 10 "07cf0b15003409-5i3N7XDKbPVaQ-28cf-22"

Non-mobile programs objects utilizing Publish-Subscribe mechanisms such as Elvin are static, in the sense that they are located at the same host for their entire lifetime. In contrast, mobile agents are active software entities that migrate between different hosts. During its lifetime, a mobile agent can execute on several agent places at different times and may need to communicate with other mobile agents as well as with static objects. As the focus of all Publish-Subscribe middleware is to provide an event-based communication for traditional distributed applications and architectures, in which objects remain with the same host, such middleware are unfit to be used as part of mobile code. There are two problems in integrating publish-subscribe with mobile agents: 1. The first problem refers to deploying publish-subscribe with programs that change their hosting server (e.g. mobile agents). We illustrate this first problem in Figure 5.13, where a mobile agent first subscribes for events (stage 1), and then migrates to another host (stage 2). A communication server contains a subscription registration for the agent, and a connection that is identified with the old location, and so keeps sending new notifications to the wrong host. Hence, new functionality has to be added to facilitate integration of Publish-Subscribe with mobile agents. Furthermore, we aim to enable these newly developed capabilities for different mobile agent toolkits and not be restricted to a specific one. The new functionality that supports PublishSubscribe communication with mobile code was developed to integrate easily with the regular mobile agent’s code, requiring only minimal changes to the agent’s program.

136


stage 1:

stage 2: host 1

host 1

Elvin Client Library

☺ subscribe for events

Elvin Server

Elvin Client Library send notifications via connection

migration of mobile agent

host 2

Elvin Server

host 2

Elvin Client Library

Elvin Client Library

Fig. 5.13 – The problem of publish-subscribe communication with mobile agents

2. The second important mobility problem is concerned with the migration of mobile agents. While in transit, a mobile agent has no concrete existence on a particular host and is therefore unable to receive messages. This problem is intensified in a stateless event notification model, which does not store messages and therefore, unable to guarantee the delivery of messages that are lost during transition periods of the agents. We consider this problem in more detail and provide a solution later.

Solution to problem (1) To solve the first mentioned mobility problem, new functionality, represented by a MobileConsumer class was developed. The MobileConsumer class supports Java

Serialization, and thus, can be transported to different hosts as part of the mobile agent. The functionality implemented in this class follows the approach suggested in [LR00], in which an agent removes all existing subscriptions before migrating to a new location and re-subscribes to the same notifications after arriving at the new location. The class embeds this kind of behavior and performs the required operations on behalf of its client (the mobile agent). A MobileConsumer object keeps information such as a serializable representation of subscriptions and connection objects. Consequently, a mobile agent client executes the MobileConsumer object in two predefined states: before the migration, and right after the migration. Ideally, client code using MobileConsumer is implemented in call-back functions that are activated just before and after migration (by the agent’s toolkit execution environment). Such a feature of event based computing is common in most mobile agent toolkits. The following code snippet demonstrates the use of MobileConsumer and other Elvin classes in a basic scenario, in which a mobile agent subscribes for notifications: 137


MobileConsumer mc = new MobileConsumer(ServerURL); public void onCreation(Object itin) / init(Object[] creationArgs){ Subscription sub = new Subscription(strSubscription); // NotificationHandler class to handle notification events NotificationHandler nh = new NotificationHandler(); sub.addNotificationListener(nh); mc.addSubscription(sub); }

public void onDispatching(MobilityEvent m) / beforeMove(){ mc.notifyPreMigration(); } public void onArrival(MobilityEvent e) / afterMove(){ NotificationHandler nh = new NotificationHandler(); mc.notifyNewLocation(nh, strSubscription); }

(‘/’ separates different names in the Aglet and Grasshopper toolkits for callback methods) A snapshot from an experimental run validating the capability to perform PublishSubscribe communication by migrating mobile agents using MobileConsumer solution is shown in Figure 5.14. The communication was performed between agents running on two different platforms: IBM’s Aglets (www.trl.ibm.com/aglets/index_e.htm) and IKV++ GmbH Grasshopper (www.grasshopper.de). Agents migrated between hosts and exchanged messages in Publish-Subscribe fashion.

Fig. 5.14 - Communication between agents of different toolkits.

138


Solution to problem (2) Successful results of the experiment have proven the ability to perform content-based event notification between mobile agents, independently of platform considerations. This has solved the first problem of routing messages to agents that change physical hosting servers. Using the stateless event-based mechanism is lightweight and efficient, even for large volumes of messages, but has one drawback, which is the loss of messages during agent migration (problem 2). Mobile agents are not responsive during this period (transfer of code and state); hence messages that are sent to them during that time are lost. A relatively long migration time compared with very fast message dissemination implies that considerable number of messages may be lost during the life cycle of an agent, due to migration. Migration time period is directly affected by communication latency, and more specifically, by network bandwidth. Figures 5.15 and 5.16 present experimentation results identifying communication latency and average stay of an agent in location as the main factors affecting messages loss. On average, the rate of decrease of lost messages is initially high and gradually declines. The increase in migration delay leads to an increase in the percentage of lost messages. Figure 5.17 presents the effects of 8 different simulated migration delays (between 0 and 8) over the average number of lost messages. Messages loss due to mobility is particularly relevant in pervasive environments in face of degradation in network latency and changes in the agents’ behaviour. In one sense, this is not an issue as we are not intending the event-based mechanism primarily as a guaranteed point-to-point communication device but for large-scale event dissemination. Whether a small percentage of lost messages is significant depends on the semantics of the application, and if message lost cannot be tolerated in an application, the problem can be solved by using a stateful, but more heavyweight event notification system. We are interested, however, in preserving the characteristics of the pure publish-subscribe model, of large volumes of fast small message dissemination and scalable architecture while providing a solution that guarantees message delivery during migration of mobile agents. We require a light-weight specific solution that does not compromise these characteristics of the model, as will be discussed below. As a solution, we introduce a remote process, residing at the communication server host. The remote process serves as a proxy to the messaging router for mobile agents and temporarily stores messages on behalf of mobile agents during their migration periods.

139


high bandwidth

50 4 sec delay on bandwidth

40 30

50

region of lost messages

% lost messages

60

40 30 20

20 10

10

0 0

4

8

12

16

0

20

0

Delay per location (sec)

Fig. 5.15 - Effect of changes in bandwidth and length of stay in location over the average percentage of lost messages.

4 8 12 16 Delay per location (sec)

Fig. 5.16 - Aggregated regions of the number lost messages in a high bandwidth experimental run.

70

0 sec delay 2 sec delay

60 % lost messages

20

4 sec delay 50

6 sec delay

40

8 sec delay

30 20 10 0 0

4

8 12 16 Delay per location

20

Fig. 5.17 - Effect of changes in duration of stay in hosts and 8 different migration delays

This approach is similar to [SS01], an architecture that was designed to provide a solution for disconnecting applications working with Elvin. In our case, we are intending to solve the problem of agent mobility rather than dealing with disconnections, and we leverage on the inherent ability of a mobile agent to be aware of and report changes in its state, prior to migration and after arriving at a new location. The architecture of this solution is presented in Figure 5.18. Agents use the MobileConsumer object as their interface to perform event-based communication, without concerning themselves with the issue of guaranteeing message delivery during migration periods. MobileConsumer then internally communicates with the remote RouterProxy service.

140


Mobility layer

[mobile agent code] addSubscription

addSubscription

Mobile Agent

notifyPreMigration

Mobile Consumer

notifyPreMigration

Router Proxy

(client lib.)

notifyNewLocation

(client lib.)

notifyNewLocation

(service)

notify

subscribe

Comm. Router

subscribe

(service)

notify

[router host]

Fig. 5.18 - The architecture for stateless event-based communication for mobile agents including the guarantee of message delivery during migration

When an agent notifies its pre-migration status, the RouterProxy starts local storage of messages that arrive for that particular agent. When the agent notifies that it has arrived at a new location, the RouterProxy checks if messages have been stored and if so, communicates them back to the MobileConsumer object in the same method call. This activity is illustrated in Figure 5.19. agent migration

[host 1]

[host 2]

☺ Agent code

Agent code

NotifyPreMigration

NotifyNewLocation

MobileConsumer

unsubscribe

re-subscribe

NotifyPreMigration (tcp/ip)

MobileConsumer

NotifyNewLocation (tcp/ip)

[host 3] Comm. Router RouterProxy

RouterProxy

{ Start local storage of arriving messages }

{ Send back new messages to client }

Fig. 5.19 - Interaction between the agent’s code, MobileConsumer and RouterProxy.

This solution solves the issue of messages lost during migration. This approach requires, however, client management; in the sense of managing each agent’s received notifications individually. During an agent’s migration, only notifications relevant to that particular agent are being stored and forwarded to the agent upon completion of the migration process. In general, this kind of approach may become a bottleneck in the overall architecture when serving a large number of agents, requiring additional

141


computation and resulting in slower response. In order to scale the solution up and keep performance overheads low, we limit the number of agents that can be served by a RouterProxy and provide a Directory service that injects new RouterProxies to the system according to the number of mobile agents performing migration. In other words, the more agents there are, the more RouterProxies would be employed. This approach is presented in Figure 5.20. A group of agents is associated with each RouterProxy via the proxy directory service, which manages the life cycle of the proxies and the associations of agents with a specific proxy. Proxy Directory RouterProxy

agents

RouterProxy

agents

Routing Server

RouterProxy agents

Fig. 5.20 - Groups of agents relate to specific proxies via the proxy directory

5.4 Summary and Conclusion In this chapter we have presented our architectural approach and implementation details for developing reasoning capable, agile and scalable context framework. We have advocated reasoning and mobility as important ingredients in context-aware pervasive architectures and discussed their use in related scenarios. We believe that the combination of (1) a unifying context model with algorithms to reason about context under uncertainty, (2) event-based communication as an awareness mechanism, and (3) the ability of components to move as an agility mechanism, will be important for development and evolution of adaptive context-aware pervasive computing systems. To realize this vision, middleware and functionality for context-aware computing need to be developed to enable fast and easy prototyping of context-aware applications and mobile agents operating in context-based scenarios need to become aware of relevant context in their environment. We have developed a functional component library implementing concepts and algorithms of the Context Spaces approach. Based on the

142


library, we have developed the ECORA framework - a flexible, scalable and reasoning oriented framework for context-aware computing. We used the same functionality to provide mobile agents with reasoning capabilities, effectively allowing them to build and reason about context models at run-time. We have proposed the use of the Publish-Subscribe communication genre as a complementary form of communication for mobile agents in heterogeneous multi-agent systems. This type of communication is useful in the case of exchanging and disseminating short messages about events and reducing communication complexity between agents. Our approach in concept and architecture is toolkit independent (while we use Elvin as an illustration), and in principle, can be programming language independent, as long as there is support for that language in the messaging middleware. We have introduced the notion of addressing and messaging agents by the context or situation which they are currently in, which we called context-based addressing. In such a scheme, the Publish-Subscribe event model can be employed, provided the agents are built to proactively report their context to the event system via subscriptions (in effect expressing their desire to receive messages intended for their present context). We have demonstrated the applicability of our ideas by experimenting with the Elvin system, a stateless content-based Publish-Subscribe mechanism, and developing functionality that enables the integration of this system with mobile agents (overcoming difficulties introduced by the code mobility aspect of mobile agents). There are drawbacks in using Elvin, it being a stateless system so that messages might be lost when agents are in transit. However, this can be dealt with by using other stateful event systems, or as we have illustrated, by introducing an additional layer on top of the event router that handles notifications on behalf of agents while in transit. The latter solution is closer to the original purpose of the light-weight Publish-Subscribe communication genre, whereas the use of stateful event notification mechanisms is more heavyweight and possibly slower for large volumes of small messages, but addresses other issues affecting message delivery besides the mobility problem.

143


Evaluation and Validation of Context Spaces Based

6

Reasoning 6.1 Introduction In chapters 3 and 4 we have proposed and discussed the Context Spaces approach, including reasoning about and verifying context under uncertainty. We have also proposed, designed and developed operations, logic and algebra to manage context. This chapter evaluates our proposed approaches and related algorithms. We use ECORA’s functional components libraries, developed in Chapter 5, for experimenting with our algorithms. Whenever we use agents, whether mobile or static, we implement our functionality with Grasshopper agents and agent servers. In experimentation, we focus on office related and smart spaces scenarios. We use cases with real sensors in a smart room to demonstrate and evaluate reasoning with our proposed data fusion approaches. We use elaborate simulations to test more complex scenarios, involving a large amount of sensory originated information. This also enables us to introduce varying degrees of uncertainty (e.g., through simulated sensor inaccuracy) and different conditions we test. Simulations in this chapter follow similar settings: each sensor is individually characterized by value and type of data it produces, frequency of producing that data, inherent inaccuracy associated with the sensor (reflected by random errors values added to the basic value with specified variation over time) and type of access available by the sensor (i.e. push or pull). Simulated sensors are typically distributed and communication between components in an experiment is achieved through the use of the ECORA communication infrastructure (e.g. data is forwarded to a repository through the proxy objects utilizing message queues).

144


We start in Section 6.2 with analysis of features of the Context Spaces model, including representing and reasoning about context and situations under uncertainty (Chapter 3). We demonstrate modelling with Context Spaces including various heuristics we have proposed, and apply reasoning over simulated and real-life cases. We evaluate ConSpaF reasoning performance with respect to changes in sensors’ accuracy, occurring situations, expected users’ behaviours and usability when employing real sensors. We also demonstrate benefits of incorporating the proposed heuristics by experimentally comparing performance of ConSpaF with Dempster-Shafer integration approach. Finally, we demonstrate an approach to improve the Context Spaces model at run-time and optimise the choice of weights for a set of situation spaces. In Section 6.3 we demonstrate our logical evaluation scheme for conditionally dependent situations (Chapter 4) and evaluate context algebra operations (Chapter 4) with respect to enhancing reasoning outcomes by merging and partitioning context models. We analyse the operators’ impact on enhancing reasoning and enabling proactive behaviour in open, context-aware pervasive computing systems, using mobile agents.

6.2 Reasoning about situations under uncertainty In Chapter 3, section 3.2, we have proposed the Extended Context Spaces approach, which considers heuristics that are important when integrating sensory originated data for reasoning about context. We have developed ConSpaF, a utility based algorithm, integrating these heuristics. We now turn to evaluate ConSpaF, which provides the basis for reasoning about situations under uncertain conditions according to the Context Spaces model. We evaluate the fusion method that is represented by equation (5) (Chapter 3): n m ) ) ˆ ij ⋅ p(a it ∈ Aij ) + q 2 Π p(a kt ∈ A kj ) , which accounts for the relative importance of q1 ∑ w i =1

k =1

context-attributes, the significance in context attributes being within particular ranges, the significance of the sensed values for all context attributes being within the scope of the situation, and uncertainties in sensed values. We describe a set of experiments evaluating the performance of the ConSpaF algorithm. We structure the experimental evaluation into four parts. Firstly, we use a simulation of a non-trivial set of ten sensors, their inaccuracies and use scenarios. We evaluate the performance of the ConSpaF algorithm: (i) given a large set of sensory

145


originated information, and (ii) under changing circumstances, such as changes in users’ expected behaviour or inaccuracies of sensors. We evaluate how well are the proposed heuristics incorporated and reflected in the computed outcome of the confidence measure. Secondly, we demonstrate our approach over the motivating example, outlined in Chapter 3, subsection 3.1.2, that of a smart room supporting recognition of different activities, with an experiment using real-life sensors. In this experiment we distinguish between three types of situations that occur in our smart room, using our data fusion approach. The experiment demonstrates the applicability of using ConSpaF in real-life cases. Thirdly, we present an experimental comparison between ConSpaF and DempsterShafer integration technique [SH76], highlighting the benefits of incorporating heuristics into the data fusion process. Our goal is to demonstrate how the proposed heuristics contribute to the outcome of reasoning about context and sensor data fusion. Finally, we develop and evaluate a supervised learning approach, which determines the optimal (good enough) choice of weights for a situation space. Our goal is to produce better discriminating power by enabling more accurate modelling of situation spaces by applications. We evaluate the performance of the ConSpaF algorithm, applied over models that use rough estimates of weights and those that incorporate optimization elements. The experiments demonstrate that parameters of the model can be improved dynamically. It shows that applications can start with an initial rough model of situations and refine it at run-time.

6.2.1 Performance of the ConSpaF algorithm in simulation We compute the confidence measure in a setting of ‘user in a meeting’ situation, using a simulation of ten sensor types, accuracy levels and different modelling of sensor accuracies. A description of the sensors used in this simulation is provided in Table 6.1. We make different assumptions about inaccuracy for different sensor types. We use normal density functions to characterize location errors, assign Boolean values with fixed reliability probabilities for light detection (e.g., 90% of the time correct) and assume no knowledge whatsoever about the inaccuracy of noise level detection. The data in Table 6.1 is organized as follows.

146


(1) For each sensor, we assign an importance value on a scale from 1 to 5, and this value is then used to compute a weight for that sensor, which represents its significance for inferring the situation. The weights provide an initial estimate of relative importance (as would be initially given by an application designer). For example, in estimating if a specific user is in a meeting, the fact that the user is located in the meeting room is more significant than the fact that noise is detected in the room. We later show (Section 7.2.4) how such an initial set of weights can be fine-tuned automatically according to usage data. (2) We characterize each region in the situation space definition as being either symmetric or asymmetric. For example, we assume that a user always carries his/her RFID tag but may leave his/her PDA behind. Therefore, the reference to user location computed by the PDA location is asymmetric. Similarly, a projector may or may not be active during a meeting. Its activity would contribute to infer the meeting situation but not the opposite. Attribute name

Importance (1-5)

Asymmetric

Weight

User RFID Y Location

4

No

0.114286

User RFID X Location

4

No

0.114286

User PDA Y Location

3

Yes

0.085714

User PDA X Location

3

Yes

0.085714

MR Light Level 1

4

No

0.114286

MR Light Level 2

4

No

0.114286

MR Noise Level

2.5

No

0.071429

MR Motion Detected

2.5

No

0.071429

MR Projector Active

4

Yes

0.114286

MR Microphone Active

4

Yes

0.114286

Table 6.1 - Sensors definitions for simulation of ‘user in meeting‘

First, we examine the effect of asymmetric attributes in the data fusion process. Figure 6.1 depicts the results of the confidence measure for the ‘user in meeting’ situation for three scenarios. In the first scenario, all sensors yield values that are contained in the regions as specified in the definition of the situation space. This results in relatively high confidence in the specific situation (i.e., A). Even though the confidence values remain relatively high, we note the fluctuations in confidence values, and this is due to fluctuations in sensor readings (within the inaccuracy bounds) and changes in context (such as the user changing location inside the meeting room). In the second scenario, we position the user’s PDA in his/her office. As this attribute is defined as asymmetric the confidence remains practically the same, yielding high confidence in the situation (i.e., B). Minor differences of settings B from settings A are the result of weights redistribution and

147


the fact that the specific asymmetric attributes considered in A are not considered in B. In contrast, the effects of positioning the user’s RFID tag outside the meeting room are significant. The confidence measure immediately drops to reject the ‘user in meeting’ situation. This corresponds to a scenario when the user is actually in his/her office but forgot the PDA in the meeting room. A

All Contained

1 0.9 Support

c o n f.

B

B

PDA in Of fice

C

RFID in Of fice

B A

A

0.8 0.7 0.6 0.5

C

C

0.4

time

Fig. 6.1 - Effect of asymmetric attributes

Next, we examine the general behaviour of the measure when we change the readings of various sensors according to actual changes in context (and not in sensors’ accuracy). Figure 6.2 depicts different confidence levels for the same situation in three different scenarios. In the first scenario all sensors yield values, which are contained in their corresponding regions of values. This reflects the case when the user is in the meeting. In the second scenario, values are only partially contained in the regions, due to their inherent inaccuracy and experiment setting. In this case, the user is also attending the meeting but there is less indicative evidence for that. For example, we simulate the user being located close to the boundaries of the room together with high inaccuracy of the positioning mechanism, thus occasionally the computed user location does not correspond to the respective region assumed by the situation. The last scenario simulates events reflecting other situations. For example, when the user is in the corridor close to the meeting room and does not participate in the meeting. As expected, the results show degradation in computed confidence as sensed values reflect notably different situations. Finally, Figure 6.3 depicts the effect of associated inaccuracies of sensors. According to expectations the higher the inaccuracy of a sensor, the lower confidence is gained for the match between the state observed by the sensors and the situation.

148


All contained

Partially contained

Less contained

Initial inaccuracies

1

1

0.9

0.9

0.8

c o n f .

0.7

Support

Support

c o n f .

Greater inaccuracies

0.6 0.5

0.8 0.7 0.6 0.5

0.4

0.4

0.3

0.3

0.2

time

Fig. 6.2 - Effect of sensors values

0.2

Fig. 6.3 - Effect of sensors inaccuracies

In this initial set of experiments we have corroborated the impact of our proposed heuristics over the computed outcome of the confidence measure. We have separated individual heuristics demonstrating their orthogonal contribution to reasoning about context.

6.2.2 Performance of algorithm in a real-life case We present a performance analysis of a real-life case combining real sensors and data sources. Here, we demonstrate the motivating example of Chapter 3 Section 3.2.2, that of distinguishing between activities in a smart room. We are interested in identifying and distinguishing between three types of user activities, namely, (1) a user presenting, (2) a user attending another’s presentation and (3) a user attending a meeting. To reason about these activities, we have selected four context attributes whose sensors are physically positioned in different locations, namely, the user location, the meeting room light level, the user’s notebook keyboard and mouse activity, and presence of active presentation processes in the user’s notebook. We define corresponding regions of values for each situation space taking into account symmetric and asymmetric attributes and sensor inaccuracies. For discovering user location, we use the Ekahau Positioning Engine [EP05] that tracks the user’s personal devices such as his/her PDA and notebook. The positioning engine computes spatial positions by analyzing wireless signal strengths and comparing them to previous calibration. It provides a confidence value for its inferred location ranging between 0 and 1. We use Berkeley Motes [BM05] for sensing and communicating light levels in the meeting room. For retrieving information about the user’s presentation activity, we have implemented a service that intercepts the notebook

149

time


operating system events (“hooking”) and provides information on latest keyboard and mouse activity. We also provide a service that identifies active presentation processes in the user’s notebook. In the meeting room, we use a portable light-weight presentation projector that is connected to the presenting user’s notebook. It is a common practice and the assumption in this experiment that each presenter uses his/her personal notebook. The deployment of the components used in the experiment is illustrated in Figure 6.4. During experimentation, we have noticed significant inaccuracy in location estimation due to less than optimal wireless network settings that affect signal strength. Such inaccuracies are dealt with in the proposed ConSpaF algorithm, which we evaluate in this section. The Positioning Engine Server is located in a remote location and communicates with an agent that performs the fusion via the wireless 802.11b infrastructure. Light sensors

Notebook Location

Notebook sensed Location

Positioning Engine

Fig. 6.4 - Deployment snapshot of the experiment components, superimposed over Ekahau’s positioning map

An agent working on behalf of the user and running on the user notebook is equipped with communication protocols for exchanging information with remote sensing services as well as with local independent processes that provide information on notebook activity. The agent performs fusion using the inputs of the incoming information and assigns support for each of the candidate situation spaces, which represent the real-life activities. The various sources of information are depicted in Figure 6.5. Before applying fusion, information is pre-processed either by the agent or remotely, depending on the type of data. For example, light levels are sampled by the Berkeley Motes sensors ten times and then averaged. The Motes Interface Service, which handles this information, matches the

150


averaged result against predefined regions of values and communicates back textual streams, such as “DIMMED”, “ON” or “OFF”. In contrast, interpretation of keyboard and mouse activity is performed directly by the agent. Here, the amount of time elapsed since the last captured activity influences the confidence that the user is currently using his/her notebook, and this affects the confidence of a valued being contained within a region of values. Other similar approaches (e.g. in [GL99, GS02]) of logically handling raw sensor readings, i.e. interpreting raw sensory originated data and determining higher level abstractions (also known as cooking the data or using cues) are common in fusion for context awareness and have been shown to significantly improve inference results.

Data Interpretation

Motes Interface Service

Intercept user activity (keyboard/mouse)

Sensor network

Fusion

Identify presentation activity

Data Interpretation Positioning Engine Service

Fig. 6.5 - Sources of information and functional activity of the fusion

During experimentation we have switched between the activities and observed the results of the confidence measures computed for the different situations. Figure 6.6 provides confidence levels for the three activities computed for a particular user. In the experimental run depicted on the left, we have started with the user presenting first for 15 minutes, then attending a colleague’s presentation for 15 minutes and finally participating in a discussion or general meeting on the topics presented (again for 15 minutes). On the run depicted on the right, a user has given a presentation and then participated in a general meeting. Figure 6.7 presents sensor technology used in the experiment. The results reveal matching confidence levels with the actual activity taking place. Taking the left experimental run as an example, at the time the user is presenting, the confidence for this particular activity averages around 0.9 whereas confidence in other situations is significantly lower. A change in the situation towards the user only attending another’s presentation results in a drop of the confidence in the ‘User Presenting’ situation to below 0.4 and a rise of confidence in the ‘User attending a presentation’ situation to 151


levels around 0.9. Similarly, when a discussion (equivalent to a meeting) over the presentations involving the user is starting immediately after the second presentation, the confidence in ‘User in a meeting’ situation rises to 0.9 and the former situation confidence levels drop significantly. We have demonstrated in this experiment the applicability of the fusion in real-life scenarios using real sensors. U. in Meeting

U. in Presentation

support

0.4 0.2

U. Presenting

15 min

15 min

0

U. Presenting

U. in Meeting

1

0.8

c o 0.6 n f.

U. in Presentation

0.8

U. in Presentation

0.2

0.4

15 min

15 min

0

U. in Meeting time (min.)

U. Presenting

c o 0.6 n f.

support

◊ 1

U. Presenting

30 min

U. in Meeting time (min.)

Fig. 6.6 - Experimental runs

Berkeley Motes:

Ekahau Positioning Engine:

Fig. 6.7 – Berkeley Motes and Ekahau Positioning Engine, used during experimentation

152


6.2.3 Benefits of incorporating the model’s heuristics ConSpaF integration approach is effective not only in its flexibility and ease of use, but has distinct impact over the performance and result of the data fusion, which is more attuned to context related considerations. In Chapter 3, section 3.4 we have qualitatively evaluated benefits of the algorithm behaviour (i.e. how it responds to changing circumstances) compared with other reasoning approaches. In this section we quantitatively demonstrate some of these benefits, originating from the algorithm’s underlying heuristics. To illustrate differences resulting from applying the heuristics, we provide an experimental comparison between ConSpaF and a method that does not consider these heuristics (represented by Dempster-Shafer (DS)). While it is difficult to quantitatively compare inherently different approaches (for instance, DS does not question the accuracy of the sensed evidence whereas ConSpaF does, see Chapter 3, subsection 3.3.2), we seek to show how the approaches behave differently, under unpredictable environmental changes. We have simulated the scenario of a user presenting, attending another’s presentation or participating in a meeting. In order to align DS results with ours we have evaluated the probability of having some evidence and incorporated it as part of the mass probability function assigned to situations. DS computes a value which we call ‘DS-value’, whereas ConSpaF computes a confidence value (via the formula given in Chapter 3). We note that the DS-value and ConSpaF confidence value are not comparable. However, our aim here is to compare the behaviour of algorithms rather than the absolute values resulting from reasoning, e.g., how the values change in response to changes in sensory originated information. Figure 6.8 presents the graphical interface of the experimental simulation. Figures 6.9a, 6.9b, 6.10a and 6.10b illustrate results of experimental runs with a sequence starting with the user first attending a presentation, then presenting and finally participating in a meeting. We have defined the context attributes: notebook activity, active presentation process and personal PDA location as asymmetric. These definitions accommodate the possibility of the user forgetting or not immediately switching off his/her notebook or presentation process when joining the meeting or leaving his/her PDA elsewhere (e.g., in the office or at home).

153


Fig. 6.8 - Experimental run with two data fusion and modelling approaches

U. in Presentation U. Presenting 1

support

c o n f

0.4 0.3

D S v a l u e

0.7 0.6 0.5

0.8

t1

support

0.9 0.8

U. in Presentation U. Presenting

U. in Meeting

0.2 0.1

t1

0.7 0.6 0.5 0.4

0.3

time

in Meeting

0.2

0

in Presentation Presenting

0.1

0

U. in Meeting

in Presentation Presenting

time

in Meeting

Fig. 6.9a – ConSpaF, notebook ON during meeting Fig. 6.9b – DS, notebook ON during meeting U. Presenting U. in Presentation

U. in Meeting

0.7

D S v a l u e

t2

0.6

support

support

c o n f

U. in Presentation

U. in Meeting

1 0.9

1 0.9 0.8

U. Presenting

0.5 0.4 0.3 0.2 0.1 0

Presentation

Presenting

in Meeting

time

0.8 0.7 0.6 0.5 0.4 0.3 0.2

t2

0.1 0

in Presentation Presenting

in Meeting

time

Fig. 6.10a – ConSpaF, PDA taken away during meeting Fig. 6.10b – DS, PDA taken away during meeting

The results demonstrate the significance of context attributes characterization when the user activity is different from what is anticipated. During experimentation, we have simulated the user switching off his/her notebook only in the middle of the meeting (at

154


time t1 in Figure 6.9 a and b) instead of immediately after his/her presentation. Similarly, at another experimental run (Figure 6.10 a and b) the user switches off the PDA (or hands it to a user outside the meeting room) in the middle of the meeting (at time t 2 in Figure 6.10 a and b). Both context attributes, i.e. inactivity of personal notebook and personal PDA device located in the meeting room, provide indications (to some extent) of the user participating in a meeting. By using the asymmetric attributes in ConSpaF, even though the user behaves differently that what is expected for the meeting situation, the user is correctly inferred as being in the meeting. In contrast, a sharp incorrect decline is observed in DS-values, when the notebook is still switched on during the meeting or the PDA is taken elsewhere by another user. These results demonstrate the significance of incorporating context-related heuristics such as symmetric and asymmetric context attributes in the fusion process. They also reflect distinct behavioural differences of the two fusion approaches.

6.2.4 Optimising reasoning by learning the model’s parameters The model and data fusion approach we have evaluated serve as a map to guide reasoning about occurrences of situations. The model’s parameters, e.g. meaningful context-attributes, their weights and characteristics can either be explicitly defined by designers, learnt from historical data or determined by combining both approaches. In this subsection we examine a learning process, which we developed for evaluating weights in a definition of a situation space. The goals of this process are twofold: (1) Reduce design complexity by learning weights instead of predefining them. (2) Improve an existing model by optimizing initial rough estimates of weights. We make use of a genetic search approach [MI96] to discover a better combination of weights for inferring particular situations. We conceive of a space of possible solutions, where a solution is a particular combination of weights. Our goal is to improve possible combinations and find a superior solution to the existing (possibly predefined) set of weights. To find a better combination in the space of solutions we employ a genetic search, which is a heuristic search procedure that uses random choice as an instrument in guiding an exploitative search through parameter space [MI96]. There are three main operations preformed over a population of candidate solutions, inspired by biological

155


evolution mechanisms, namely Selection, i.e. choosing the most fitted solutions among a population of candidate solutions, Crossover, i.e. the process by which new generation of candidate solutions are produced and Mutation, i.e. random changes in candidate solutions. Genetic algorithms regenerate new sets of solutions, with the expectation of gaining better solutions on average and finding a sufficient solution in the search space. We applied the algorithm to the actual sensor readings as obtained in the smart room experimentation in the previous section. For evaluation we define the same situations with three context attributes, namely, room-light-level, keyboard/mouse activity on user’s notebook and active presentation processes on user notebook. We use Equation (4) in Chapter 3, for the sensor data fusion. Our approach is illustrated in Figure 6.11. Confidence in containment:

) p(a it ∈ A ij )

input

wi input

wj

. .

Sensor Fusion N

)t

∑w ⋅ p(a ∈A ) i

i

j i

Conf.

i=1

wk

input

{wi , w j , wk } Optimal solution

∆1 ∆2

∆3

Training

Initial solution space

∆1 ∆2

∆3

Solution space after training

Fig. 6.11 - General design of weight learning approach

We approach the inference task in the perspective of a supervised network. Sets of sensor readings, discovered within a specific time interval are fed to the network (along with the correct occurring situation) as inputs. Containment of context-attribute values (the inputs) within corresponding regions is then estimated. The results are fed with individual weights to the data fusion procedure, yielding computed confidence for the occurrence of the particular situation. In order to optimize the choice of weights the algorithm evaluates a solution (i.e. its Fitness, in evolutionary terminology [MI96]) according to the following rule:

156


Let µ ( A) denote the confidence computed for the occurrence of situation A. To train weights for situation space A, compute fitness of weights by: µ ( A) − max(µ ( B), µ (C ),...) if A occurs, and max(µ ( B), µ (C ),...) − µ ( A) if A does not occur. The algorithm maximizes the difference between the confidence computed for the occurring situation and the next most supported situation (in terms of computed confidence). This yields a measure of fitness depicting how well the occurring situation is distinguished from the other situations for the specific combination of weights (in terms of computed confidence). The genetic algorithm searches for the best solution, which produces greatest distinction in favour of the occurring situation. We have evaluated the learning scheme in two modes: (1) Refining a predetermined choice of weights, which involves a limited search in the locality of the predefined solutions (i.e. predefined weights), and (2) learning weights from start, which involves complete randomization of initial solutions. Results of weights training applied for the smart-room scenario are depicted in Figure 6.12. The figure presents the confidence values computed by the inference process for three weights configurations: (1) initial weights (i.e. rough estimates) as predefined by designers, (2) refined weights, using the predefined weights as the starting point of a limited search for finding better weights, and (3) recomputed weights, performing a complete search with randomized initial solutions. The results show that the refined and recomputed weights generally achieve a greater separation between the confidence values computed for the correct situation and those computed for other situations. This implies greater discriminating power between possible situations during reasoning when applying the above weight learning approach. Initial weights

○ ◊

○ 1

Refined weights

◊ 2

3

1

◊ □

□ ◊ 2

□ - support for U. presenting ○ - support for U. in a meeting ◊ - support for U. in another’s

Recomputed weights

3

1

○ □

◊ 2

1 - U. presenting 2 - U. in a meeting 3

- U. in another’s presentation

presentation

Fig. 6.12 - Inferences of situations with different weight combinations

157

3


The effects of weight training can be observed in Figure 6.13, which presents the confidence levels computed for ‘User Presenting’ situation. High confidence is obtained by all weights configurations when the user is actually presenting. Major differences are revealed, however, when the user attends another’s presentation; then, trained weights perform better and contribute to lower confidence in the situation of ‘User Presenting’.

initial weights

adjusted weights

recomputed weights

support 1.2

U. Presenting

1

◊ ○

U. in Presentation

U. in Meeting

0.8 0.6 0.4 0.2

○ ◊

0 time

Fig. 6.13 – Support levels (confidence) for ‘User Presenting’ for different weight settings

Results presented here were obtained with a population of 1000 solutions, probabilities of 0.07 and 0.7 for mutation and crossover, respectively. Training over historical data took approximately 90 seconds for 60 different sets of sensor readings samples. Assuming time intervals of several seconds between subsequent sensor readings, these results also imply that training can be applied at runtime after every acquisition of sensor readings. Given a model for representing situations, the weight learning algorithm can be reapplied without modifications over new situations. We note, however, an important aspect regarding learning weights and learning in general. During training, it is vital that all types of input information would be represented in the training set. This includes any information that affects the sensor readings by any type of possible situation. For example, it might be that other situations not modelled by the designers affect the sensor readings (e.g. high light levels can result from, say, study activity in the smart room). Presenting suitable training sets can be hard to achieve, which makes learning less feasible. In contrast, specifying important context-attributes with relative weights by designers already takes into account (perhaps rough) estimates of the environment’s impact over sensor readings. Therefore, hybrid approaches, in which initial rough estimates of weight values are specified and which are then refined by learning, should be considered.

158


Finally, Figure 6.14 illustrates the effect of training over the difference between confidence in the actual situation taking place and the next highest confidence computed for another situation. We use this as a general guide to determine the suitability of selected sets of weights (for different situations). The greater the difference, the more separation exists between confidence in the correct situation and confidences computed for other situations (and therefore a greater discriminating power during reasoning). Figure 7.10 observes a general improvement in this criterion after applying the learning algorithm.

○ differences between support

1.2

initial w eights

U. Presenting

U. in Presentation

1 0.8 0.6 0.4 0.2

refined w eights

recomputed w eights

U. in Meeting

○ ◊□

◊ □

0 time

Fig. 6.14 - Differences between confidence in correct situation and confidence in second best inference

6.3 Using Context Spaces Algebra and Logic in Reasoning In the previous section we have demonstrated reasoning about a single situation with algorithms developed in Chapter 3. We now turn to demonstrate and evaluate the use of Context Spaces algebra and logic-based evaluation, developed in Chapter 4. We will demonstrate reasoning about the validity of a logical expression describing a set of situations, under uncertainty. Then we will evaluate the proposed algebraic operations as means to strengthen reasoning and facilitate distributed reasoning in pervasive computing systems.

159


6.3.1 Reasoning about complex situation expressions The following experimentation illustrates the application of the logic-based evaluation, proposed and developed in Chapter 4 section 4.4. The proposed reasoning approach converts complex situation expressions (i.e. logical expressions representing situations) into NSIF structures (discussed in Chapter 4) and evaluates them while taking into account uncertainty of information. The significance of the demonstrated approach is the ability to compute a numerical confidence values in the validity of logical expressions (rather than Boolean values) and perform reasoning under uncertainty. This enables to evaluate the likelihood of contradicting expressions which might both be supported by sensory evidence under uncertainty. In other words, given inaccurate and unreliable sensors, several opposing situations might be inferred as occurring, and we rely on our logical evaluation to determine which situations represented by those expressions is the most likely to occur. The reasoning functionality, including logical evaluation of complex situation expressions was implemented in the kernel package, used by CORE reasoning engine. In the following experimentation, an application simulating 14 sensors, such as light sensors, location of users, projector status and other physical and virtual sensors, utilizes reasoning services of the reasoning engine, via COR-Proxy. Randomly generated data for the sensors roughly corresponds to an arbitrarily chosen set of situations that are compatible (i.e. not contradicting by definition). However, simulating inaccurate sensors sometimes yield data, which support other situations. Figure 6.15 presents the graphical interface of this demonstration. Different simulated sensors yield different types of information, including numerical, textual and Boolean valued. Sensory originated information is associated with confidence in the reading or, if applicable, knowledge about the range of the reading error (where we assume, in this experiment, uniform distribution of the error). The figure depicts a specific experimental run, comparing three expressions: (1) ‘(User2 walking and User2 presenting) or User2 studying’ (2) ‘A gathering and User2 not walking’ (3) ‘(User1 in meeting or User2 in meeting) and (User1 walking or User2 walking)’ The occurring expression in this run is expression 1, corresponding to the fact that user2 is studying. Sensory information generally reflects this situation with low noise levels, lights

160


turned on, low motion level of the subject and so on. However, some information also corresponds (although less clearly) to user2 participating in a meeting. Given that user1 is sensed to be moving, expression 2 may also be supported. Since the application defines these expressions as contradictory, it determines the valid expression according to the one with highest computed confidence. This is shown in the bottom right of the figure. Expression 1 is chosen as the most valid; a negative confidence value is computed to expression 2, a positive but low confidence is computed to expression 3, and highest confidence is computed to expression 1 (recall that with the logical evaluation any positive confidence reflects the validity of an expression). Performing logical evaluation of complex expressions under uncertainty requires a basic capability of reasoning about individual situation spaces within the expression. We have demonstrated this capability in the previous section, experimenting with ConSpaF, with a combination of heuristics corresponding to the fusion given in equation (5) in Chapter 3. In the current experimentation we have applied ConSpaF with a different combination of heuristics, corresponding to equation (4) of Chapter 3. Results of computing confidence for a situation of ‘user presenting’ given generated sensory information reflecting the user first participating in a meeting, then presenting and finally returning to the meeting, is presented in Figure 6.16. Appropriate confidences are computed for reasoning about that situation.

Fig. 6.15 – Evaluating complex situation expressions under uncertainty

161


Fig. 6.16 – Demonstrating reasoning about a single situation space

6.3.2 Composing and partitioning situation spaces Context Spaces algebra provides operation that enable to compose and partition situation spaces (Chapter 4, section 4.2). These operations are useful for merging the perspectives of different computational entities (e.g. software agents) over the object of reasoning (e.g. situations) and enhancing the reasoning outcome. Composing situation spaces enables agents to describe situations with additional relevant information and make use of additional available sensory information. Partitioning an existing situation space enables to redefine the description of the situation according to the current available sensory originated information. That is, situation spaces used in the reasoning process can be dynamically tailored according to available information, yielding optimal situation descriptions (given the current information). For evaluating operators for the extended model in Context Spaces algebra we consider the case of agents reasoning about the context of a presentation in a smart room. In the first set of experiments, we simulate a variety of sensors in a smart room such as multiple numbers of lights, noise and motion sensors, the status of the projector, speakers and microphone, computed number of users in the room and whether a presentation is scheduled. Data is randomly generated, roughly corresponding to the presentation activity, with associated reading errors. Estimated confidences of sensor accuracies are computed and readings suggesting activities other

162


than a presentation are always generated (e.g., a presentation is occurring but is not scheduled, or performed only verbally without lights turned off). Different agents have access to different sensors in the room and hold different models about the presentation activity. Some models share common context attributes while others provide descriptions based on a unique set of sensory information (thus we use different operations discussed in Chapter 4). Agents actively compose and partition models to reach a more reliable reasoning outcome. By sharing sensor readings and composing different descriptions of the presentation situation, agents enhance their individual reasoning. Figure 6.17 and 6.18 present outcomes of reasoning about the presentation activity by agents. Figure 6.17 depicts results of reasoning with individual models and Figure 6.18 depicts results of reasoning over the composed model, achieved by collaboration between agents. For comparison, we also average the result of reasoning by individual agents, and compute reasoning results performed over a global model, considering the complete set of sensors. Figure 6.17 illustrates the significantly different levels of confidence computed for the same situation, obtained by three different agents, each using a different sub-model with different subsets of information. The averaged result reflects the optimal reasoning outcome by sharing models, given an assumption that all models equally reflect the presentation and cannot be merged into a single global model.

0.98

c o n f

.

submodel 3

■□

0.93

submodel 1

submodel 2 averaged

□■

■□

0.88 0.83 0.78 0.73

0.68

○ time

Fig. 6.17 – Reasoning with different models

Successful reasoning over the composed model is illustrated in Figure 6.18, where results obtained over the composed model are identical to averaging the results from each agent individually reasoning about the situation. Reasoning about a global model, yields different but significantly similar results to the merged model. This reflects the fact that all sub-models are more or less equally reflective of the presentation situation. 163


averaged

merged

complete knowledge

0.92 0.9

C o n 0.88 f 0.86 0.84 0.82

time

Fig. 6.18 – Comparing results of merging models

Benefits of partitioning (or splitting) a model into partial representations of the situation are demonstrated in the next experimentation. By using the partitioning operation, agents update the model describing a situation according to available sensory data. During experimentation we have simulated faults in communication and sensors, yielding only a partial set of sensory information available for reasoning. In such conditions agents update their existing model according to the available information. Figure 6.19 and 6.20 compare reasoning with the original model with missing information and reasoning with the updated model (using partition operation). For comparison we also compute the optimal result, achieved by reasoning with the original model but with all information available (i.e. no faults).

□ ○ 0.87

missing info1 split for info2

missing info2 global model

0.82

c o n f

0.77

0.87

0.72

0.77

0.62 0.57

split for info1

global model

c o n 0.82 f

0.67

0.52

missing info1

0.92

0.72

time

Fig. 6.19 – Lack of information weakens reasoning

○ time

Fig. 6.20 –Splitting the model strengthens reasoning

Results clearly show that outcomes of the split model are significantly closer to the optimal results. (We note that while this approach compensates the lack of available information in modelling, the confidence in the reasoning outcome is reduced since less information is used for inference.)

164


6.3.3 Adaptive reasoning and agent mobility In addition to enhancing reasoning performance, operations in Context Spaces algebra enable adaptive behaviour of agents in pervasive systems. With our proposed operations, adaptive behaviour of agents, such as active migration between hosts or collaboration between several entities can produce more accurate reasoning. In the following, we have combined Context Spaces modelling, reasoning, and proposed operations with mobile agents as an approach to enable agility and autonomy of context-aware systems. Using the case of presentation activity in the previous section, we have deployed physically distributed Grasshopper agent servers. A reasoning mobile agent can migrate between these servers and retrieve relevant sensory information. Each server is logically positioned in a different part of the smart room and is linked to a specific set of sensors. Type and position of sensors affect the way situations are modelled, e.g., different kinds of noise sensors exhibit different sensitivity to noise, and readings obtained from light sensors in the back of the room are different from those obtained in the front. Therefore, different perspectives are produced over the same situation depending on the kind of information presented. A context-aware mobile agent is positioned in a specific agent server and reasons about the situation using available information. The agent deals with information in similar ways to the previous experiment, updating its model whenever sensory information is unavailable. However, when the confidence about the presentation activity is below a specified threshold, the agent actively migrates to another server in order to take advantage of another perspective (i.e. other contextual information available there). It then merges these perspectives to reach a more reliable inference regarding the occurrence of the presentation. Figure 6.21 presents snapshots from the logs of the agent servers, capturing the reasoning agent migration, splitting and merging activities. Results of this experimentation are presented in Figure 6.22. Reasoning with the original model is depicted by the dotted line. Results are improved by updating the model (i.e. splitting the model into sub models) according to available information. Finally, the best results (in terms of confidence computed for the presentation situation) are achieved by actively migrating and merging additional perspectives. There are two issues illustrated

165


here: (i) handling partial information by updating the situation description (i.e. splitting), and (ii) physically migrating to gain additional perspectives over the modelled situation.

Fig. 7.21 – Agent Servers logs: reasoning agent proactively migrates to gain additional viewpoints No rmal

Split

Split & M erge

0.9

0.85

c o n f

0.8

0.75

0.7

time 0.65

Fig. 7.22 – Effect of splitting and merging models Fig. 6.22 – Effects of partitioning and composing models

We have experimentally evaluated our proposed Context Algebra operations and demonstrated their usage in a simulation of office related use cases. Agents in these experiments dynamically applied compositions and partitioning of situation spaces and performed migration, according to available sensory information, peer agents in the network, and physical access to other perspectives over the situation. We have noted: (i) a consistent improvement of the reasoning result after applying the proposed operations, and (ii) an incentive for proactive and collaborative behaviour by agents using these operations.

6.6 Summary In this chapter, we have evaluated the proposed Context Spaces model and associated reasoning algorithms as an approach we assert is efficient for representing and reasoning about context. We have shown that the model is not only useful in representing context in 166


a general way but offers practical and effective ways to reason about and utilize the modelled information. We have demonstrated modelling and successful reasoning about activities in a smart room, using real sensors, at run-time. We have analysed the ConSpaF data fusion algorithm and experimentally evaluated and demonstrated its valuable characteristics, which take into account (1) the relative importance of context attributes, (2) the significance in context attributes being within particular ranges, (3) the significance when the sensed values for all context attributes are within the scope of the situation, (4) uncertainties in sensed values, and any combination of these properties. We have developed and demonstrated the ability to apply learning over the model, refining the choice of weights associated with situation spaces, thus enhancing the reasoning outcome. We have also experimentally compared results obtained by reasoning with ConSpaF and Dempster-Shafer approach, highlighting the benefits of using the proposed heuristics. The uses of logical evaluation and Context Spaces algebra as means to enhance reasoning and reduce complexity was demonstrated and evaluated. We have demonstrated reasoning about complex situation expressions, resulting in a single confidence about the occurrence of a set of logically conditioned situations. We have shown how mutually exclusive logical expressions about situations can be compared, evaluated and their occurrence resolved. We have also applied Context Spaces algebraic operations with agents and mobile agents, composing and partitioning situation spaces, sharing and merging perspectives over situations in an open and dynamic environment. We have evaluated the contribution of these activities to reasoning about context.

167


Advanced Extensions to Context Spaces

7

Through Context Spaces view of the world we propose an approach to represent context and situations as spatial metaphors. This approach advances discovery of heuristics that can be used in the process of reasoning about and managing context. The techniques discussed in this chapter demonstrate additional extensions to the Context Spaces approach, based on heuristics that deal with context verification and management. The chapter is divided into two parts. In the first part (Section 7.1) we propose and validate three context verification techniques designed to be applicable to different context related scenarios. The verification techniques are based on heuristics and resolve conflicts related to context uncertainty. In the second part (Section 7.2) we make use of the concepts of context state and context state trajectory to develop an approach to maintain pervasive systems within given boundaries of activity. We propose a methodology for achieving this goal and a novel algorithm for real-time analysis of sensory originated data.

7.1 Verification of Uncertain Context A major challenge in pervasive and context-aware computing is to handle uncertainty that emerges when systems attempt to become aware (at run-time) of desirable situations but are unable to reason effectively about those situations [BA04, SA01a, SA01b, PL04c, PL05a]. While the problem is complex in depth and breadth, various measures can be taken to alleviate it, either specifically tailored to an application or in a general way. A common approach to deal with emerging uncertainty is to mediate with the user (see for example [DM00, MH00, MA00]). While mediation is inevitable in some cases, the need for unobtrusiveness and computing transparency also motivates the need for automated techniques to resolve uncertainty (consequently removing the human users from the feedback loop). The need for automating the resolution of emerging uncertainty 168


is particularly important when activities do not explicitly involve users or concern inferred situations emerging from collaborating individuals. If context does not involve users (e.g. context defined for network conditions) then mediation is not applicable, or when determining a relatively complex activity, based on different parameters, users may not be informed of pertinent information or only hold partial information, which makes mediation hard. The uncertainty accompanying the process of reasoning about context necessitates (1) techniques to verify the correctness of initial guesses about events or the situation of an entity, and (2) general guidelines (or rules) that lead to resolution of inconsistencies for the specific context-aware application. If sensory data is inaccurate, inferred situations might be incorrect and several situations might be inferred with similar confidence. In such cases, approaches should be developed to determine which situation is actually occurring (i.e., sensor evidence may support but not require all the situations to occur), or if some inferred situations are contradictory, which are the correct ones. The challenge that we aim to address, is the following: given information discrepancy

that must be resolved, what measures can be taken that would support making the right decision? We propose to augment reasoning about context with verification techniques that guide a context-aware system towards resolving inconsistencies and conflicts. Context verification is particularly important when significantly different actions must be performed or triggered for different inferred situations. The proposed techniques address the following issues related to context uncertainty:

How to recognize occurring situations when available information does not fully correspond to the system knowledge about possible situations. That is, given that our model requires certain information to be available in order to determine occurrence of situations, what do we do if available information is inadequate.

How to support the resolution of situation ambiguity, i.e., when several situations seem to be occurring at the same time and we wish to identify which ones (or perhaps all) are occurring.

Given contradicting events (e.g., sensor readings) how to decide which one is correct, in a general way that can be applied without specifying domain or application specific rules.

169


The following section proposes and discusses three verification techniques applied in real-time for resolving conflicts about context both at the event and the situation levels.

7.1.1 Verification based on a state-space difference measure We apply the state-space difference measure approach ([PL04b, PL05a]) for verification of context states that do not correspond to any known situation spaces during inference. This measure differs from our previously discussed reasoning approaches by analysing context states, which do not reflect a known situation space and are positioned elsewhere in the application space. Based on spatial representation of context state and situations we propose a similarity/dissimilarity measure by computing a distance value reflecting the difference between the context state and a given situation space. When a system cannot explicitly determine the occurring situation (e.g., two contradicting situations are inferred with similar confidence), a numerical measure, based on this spatial proximity can point out which one is more likely to be occurring. To compute similarity the measure considers the following two heuristics:

The Euclidean spatial distance between the context state and situation space, computed in each dimension and normalized by each region’s size.

The relative importance of each dimension, reflected by the associated weight.

In the first heuristic we perform normalization of the computed distance by considering the situation’s regions’ sizes. This is based on the following assumption: spatial distances from large regions of acceptable values reflect greater similarity than spatial distances from smaller regions. This heuristic is explained and illustrated in Figure 7.1, where the context state is computed to be significantly more distant from situation B than from situation A, though simple Euclidean distance may result in similar distances.

B A

Context State

Fig. 7.1 – motivating the need for normalization in the state-space difference measure.

170


Suppose, for example, that situation A represents optimal machinery conditions with a temperature region of values between say, 8°C and 37°C. Situation B represents health of an individual with a temperature region of values between 36°C and 37°C. A temperature reading of say, 37.8°C clearly indicates that a person is sick since 0.8°C is a significant deviation from the relatively small region of temperature values in the ‘health’ situation. In contrast, a deviation of 0.8°C may imply that the optimal machinery conditions are not met, but that the current conditions are still very close to the optimal conditions, since the deviation is not significant. So when we compute the distance between a context-attribute value and a region, we also consider the size of the region to better reflect the significance of deviating from that region. The second heuristic deals with the relative importance of each context-attribute in the situation space. Naturally, the more important a context-attribute is the greater impact it should have on computing similarity, and vice versa. For example, if temperature is an important indicator (given its weight) in determining the health of an individual, then deviation from the temperature region has great effect over the measure. A similarity measure, which uses the above heuristics, is defined below.

Definition 7.1. A state-space difference measure reflects dissimilarity between the context state and a situation space. Let a si and a ir denote values of a corresponding context attribute of the same type in the context state and situation space, respectively. Let aˆ ir ∈ A i define an attribute value that is contained in the set A i , which has the most similar value to a si , where similarity between two identical attribute values is defined by the application designer (e.g. if A i ={1,2,3} and a si = 4 then aˆ ir =3) and reflected with positive numerical values, such that the smaller the value the more similar are the two attribute values. Let aˆ i reflect a numerical value, denoting the acceptable region’s absolute size, such that aˆ i = max(A i ) − min(A i ) . We compute the State-Space difference measure by:

∆space state =

n

∑w

i

⋅ f ( a si , a ir , aˆ i ) where w i is the associated weight of importance

i =1

of a

specific context attribute in the situation space and the function f

171


computes the distance between the context attribute and the region of acceptable values, as follows.

(| a si − a ir |) / aˆ i  1  fi =  0   ∆

If region is continuous If region is Boolean and a si − a ir ≠ 0 If region is discrete and a si − a ir = 0 If region is discrete and a si − a ir ≠ 0 and there is a semantic distance mapping ∆

∆ denotes the relative distance between an element and a corresponding region

consisting of a collection of discrete elements, where the element is not contained within that region. For example, a region may contain a collection of acceptable locations and we would like to have a measure of distance between another location and the set of allowed locations. We rely on a semantic layer to provide us with application specific distance measure, associated with the context of comparison, based on a semantic taxonomy and represented in application-specific ontology [e.g., see SK92, KS96, ON94].

Example For illustration, consider the following use case. Application designers wish to distinguish between two possible situations: a team meeting and a presentation that often takes place in their smart room. They define corresponding situation spaces, as presented in Table 7.1, with available information that can be sensed or computed in the smart room. Some information can be directly sensed and represented with continuous numerical values, such as the room’s current light level, whereas other types of information are discrete (or binary) in nature, such as number of people in the room or the operational status of the microphone/speakers equipment. The designers have assigned relatively high importance to the light level information for inferring a presentation for example (assuming low light level during presentations) and high importance to muting the microphone/speakers during a meeting. Context Attributes Num. of people Light level (1 – 10) Noise level (1 – 10) Mic/Speaker status

Regions of acceptable values Presentation - Importance (w) 4 – 15 (discrete integers) [2, 6] (continuous) [1, 5] (continuous) ON, OFF (Boolean)

0.25 0.5 0.25 0

Regions of acceptable values Meeting - Importance (w) Num. of people Light level (1 – 10) Noise level (1 – 10) Mic/Speaker status

2 – 8 (discrete integers) [5, 8] (continuous) [1, 8] (continuous) OFF (Boolean)

0.2 0.2 0.2 0.4

Table 7.1 - Regions of acceptable values in ‘Presentation’ and ‘Meeting’ situation spaces

172


Suppose that although a presentation is occurring, the system senses information that does not indicate any of the situation definitions. In practice the correct context state is:

Statecorrect (#People = 8, Light = 6, Noise = 2, Mic = ON), but the system senses the following context state: Statesensed (#People = 7, Light = 7, Noise = 3, Mic = ON). A StateSpace Difference measures reveals a significantly smaller difference to the presentation on situation ( ∆ presentati state− sensed = 0 ⋅ 0.25 + 0.25 ⋅ 0.5 + 0 ⋅ 0.25 + 1 ⋅ 0 = 0.125) than to the meeting

situation: ( ∆meeting state− sensed = 0 ⋅ 0.2 + 0 ⋅ 0.2 + 0 ⋅ 0.2 + 1 ⋅ 0.4 = 0.4), which enables the application to correctly infer the situation. The number of people in the room is an example of a context attribute whose region of allowed values is not continuous but follows a similar approach in computing distance of elements that are not contained in the set. For example, suppose the system detects 18 people in the room. Relative distance from, say, the corresponding region in the presentation space can be determined by dividing the number of outstanding elements from the closest element within the region on the total number of elements in the region, yielding,

in

our

case,

num people sensed − closest element in region 18 − 15 = = 0.2727 . num elements in region 11

7.1.2 Verification based on situations natural flow The following verification procedure ([PL04b, PL05a]) is used for resolving situation ambiguity under the assumption of situation compatibility, i.e. when two situations seem to happen at the same time and we wish to decide which one (or perhaps both) is actually taking place. The procedure discussed in this section is based on a heuristic regarding the likelihood of situation occurring given a special relationship characterizing situations. We define a relationship of “natural flow” between situation spaces, as follows.

Definition 5.2 - Natural Flow between situations defines a logical transition from the occurrence of one situation into another. A maximum time boundary t i , j is associated with the transition action between situations S i and S j , i.e., there is a logical time limit for a transition between situations. We denote situations Si and S j that share a symmetric natural flow relationship

173


by Si ↔ S j

and non-symmetric flow from S i

to

Sj

by Si → S j ; e.g.,

walking ↔ running, running → being tired. To make use of this type of relationship we use the following heuristic: it is more

likely that a situation is occurring after naturally (or logically) transiting from another situation, than if another, logically unrelated situation has been previously occurring. That is not to say that given the occurrence of a previously unrelated situation the current one is unlikely, but merely that it is less likely. Consider the following procedure for verification of two ambiguous situations, based on natural flow approach. Let S1 and S 2 denote two ambiguous situations. Repeat from the time of first inference of S1 and S 2 (time t) backwards with application specific small decrement α : Infer only S1 (and not S2 ) if the following conditions are satisfied: (1) If there is situation S m such that Sm →S1 and at time t −α , situation S m is occurring. (2) If for any other situation S k which satisfy Sk →S2 , at time t −α , situation Sk is not occurring. 2 (3) The state-space distance ∆Sstate at time t −α is significant. Apply the same reasoning to infer only S2 (and not S1 ). If these conditions are not satisfied then results are inconclusive. □ This verification technique combines the state-space measure and natural flow heuristic in order to resolve existing ambiguity, in cases that such resolution must be achieved. The technique looks for history of inferred situations within a certain timeframe. If a natural flow between an existing situation and previous ones is not detected and it is clear that at that time the current situation did not occur, then it is inferred that its current occurrence is less likely.

Example For illustration of this verification technique, consider the following example illustrated in Figure 7.2, which illustrates possible situations inferred by the system according to two physiological context attributes. In this example, the current context state is situated in the intersection of the ‘Running’ and ‘Sick’ situation spaces. We assume that a subject can be both sick and running, since these two situations are defined as compatible elsewhere. The reasoning problem that arises here is whether the subject is

174


only running, only being sick, or is actually both running and sick at the same time? Figure 7.2 provides an illustration of general definitions of the involved situation spaces and possible natural flows between the situations. The verification technique works as follows. It iterates backwards in time and searches the knowledge-base for previously inferred situations and discovers that at time t − α (say 10 seconds ago) the subject was in the ‘Walking’ situation. It then reveals that at time t − α the subject was not in the ‘Sick’ situation and computes a State-Space Difference measure to ensure a significant dissimilarity from the ‘Sick’ situation. It then infers that it is more likely for the subject to be currently running than sick, since the subject was previously walking. Heart Rate

Sit

Running

Sick

Walking Respiratory Rate

Standing

Walking

Running

Fig. 7.2 - Situation inference problem and natural flow relationships.

In many cases, if natural flow exists between situations then a transition flow occurs between context attribute values that characterize the situation spaces. While this may not always be the case, when such feature is applicable then analysis of the context state trajectory together with natural flow heuristic can further assist in t1 resolving existing ambiguity. Figure 7.3 illustrates the context state trajectory with respect to time to demonstrate its relationship with the situation spaces. The trajectory is made up of discrete sensor readings and exhibits a trend of a transition from ‘Walking’ towards ‘Running’ and ‘Sick’ situation spaces. Since being sick does not share natural flow relationship with ‘Walking’, and at the time the subject is walking (until time t1 ) it is clear that the subject is not sick (from the state-space measure) then only ‘running’ is inferred.

175


Running

Sick

Significant state-space difference at t1 from being sick

Walking

context-state trajectory

t1

Respiratory Rate

Fig.7.3 - Context-state trajectory and its relationship with situation spaces

7.1.3 Verification based on context abstraction levels The following technique ([PL04b, PL05a, PL04c]) is suitable for resolving discrepancies between conflicting events and conflicting situations. Suppose for example, that conflicting sensor readings are received from two similar sensors, which indicate the occurrences of different situations. If different or opposing actions must be triggered as a result of these inferences, a system must determine which of the possible situations is occurring. Our objective is to describe an approach that enables a system to identify useful available information, which can be used during verification of conflicting or unreliable events at run-time. We would also like to achieve this in a general way, without specifying application specific rules. We characterize the relationships between context attributes and situation spaces and use these characteristics for verifying the correct event (i.e. sensor reading). Consider the following approach for resolving conflicting sensor readings. Let a it (sensor1) and a it (sensor2) represent two conflicting sensor readings of the same context attribute a i . Let C1t represent the context state containing a it (sensor1) (i.e., a it (sensor1) ∈ C1t ) and C 2t represent the context state containing a it (sensor2) (i.e., a it (sensor2) ∈ C 2t ). Let A1 represent a collection of all situation spaces that are inferred using context state C1t . And let A 2 represent a collection of all situation spaces that are inferred using context state C 2t . Let N1 denote the total number of unique context attributes used in

176


the definitions of situation spaces in A1 and N 2 the total number of unique context attributes in A 2 . We state that: If N1 > N 2 then a it (sensor1) is more likely to be occurring. The degree to which we believe in the validity of a it (sensor1) depends on the difference between the number of elements in N1 compared with N 2 . Here, we assess the occurrence of one of the conflicting sensor readings, given additional information, which supports it. In this case, the occurrence of the sensor reading, which is supported by more system events (i.e. readings from other kinds of sensors), is considered more likely11. An illustration of this type of scenario is presented in Figure 7.4. Given two conflicting events e'1 and e' '1 , the number of additional events supporting e'1 (via the definitions of situation spaces S 1 and S2 ) is four (excluding e1 ) and the number of events supporting

e' '1 (excluding e1 ) is six. It follows the intuition that the more events are known to support some situation, the more confidence there is in that situation. Hence, if two events are conflicting, one supporting the situation and the other event disagreeing, then, given no other information, the occurrence of the first event (i.e. e'1 ) is considered more likely than the second one.

Contradicting Event Values

e'1

Situation Subspaces

Event Types

S1

e1 e2 e3

Value corresponds to def. of

S2 e' '1

Value corresponds to def. of

S3

e1 e4 e5 e1 . . .

e7 Fig. 7.4 - Relating other events to contradicting events using situation spaces 11

This is perhaps an optimistic and positivist view that something is observed rather than nothing and can be justified as long as there is confidence and evidence for doing so.

177


Example Suppose that two light sensors in a room indicate conflicting information, the first senses the light turned on and the second senses the light turned off. If we assume that the light in the room is actually turned on, then together with other types of sensed information, for example, the fact the there is high noise level in the room and that a number of people are present and motion is detected we can infer that a meeting is taking place. On the other hand, suppose that when we assume that the light is actually turned off, there is no other sensed information that would indicate known situations. Under such circumstances and if such conflicts need to be resolved then it is more likely that the light in the room is turned on. In other words, the fact that other events (e.g., noise level, motion and number of people) indicate the occurrence of some situation/s, and having light turned on concurs with that, would mean a greater likelihood for having light turned on. So, in general, the more additional evidence there is for occurrences of situations that also require specific values from the conflicting sensory evidence, the greater likelihood is assigned for such values during verification.â–Ą Based on the above approach, we develop a general procedure for verifying inconsistent events. It explores the idea that context is characterized at different levels of abstraction, and where contextual information at high-levels of abstraction and sensed context at low-levels of abstraction can be used to validate and correct low-level sensed context. We use the definitions of the situation spaces in the model as a map to identify events, presumably unrelated to the inconsistent event, but which nevertheless, can assist in verifying its actual value.

7.1.4 Validation of the Verification Techniques From a conceptual discussion we turn to implementation and validation of the proposed verification techniques. In this section we demonstrate the effect of applying a combination of the proposed techniques in reasoning about context under uncertainty. We illustrate the verification techniques in a simulation of office environment use cases. In this set of experiments, we simulated distributed sensors via the ECORA framework, updating information reflecting typical office situations such as meetings, presentations, users of the system and meaningful locations in the networked environment. We examine simulated sensor readings, corresponding to the general

178


situation of a meeting (that can take place in any employee’s office as well as in the meeting room and presentation theatre), a presentation, and users who participate in these situations. To demonstrate the effect of applying verification techniques we compare the results of performing reasoning without introducing uncertainty with those of applying verification over deliberate changes that make reasoning results less certain. We show that by using the verification techniques, reasoning under uncertainty yields the same results as in the case of performing reasoning under certainty. First, Figure 7.5 presents the outcomes of reasoning when all sensory originated information is correct and consistent. A box titled “Basic Situations” presents situations that are inferred using basic reasoning under the NCS model (Definition 3.5 Chapter 3) of matching context state and space. The box titled “Reasoned Situations” contains situations that are determined after applying verification techniques, and “Complex Situations” contains valid combinations of the inferred situations. Note that in this case, all simulated information is correct and matches the situations’ definitions and therefore, applying verification techniques (“Reasoned Situations” box) does not change the results obtained during the initial reasoning phase (“basic Situations” box).

Fig. 7.5 – An experimental run under certainty

179


We now introduce three different changes that reflect increasing uncertainty in the reasoning process. We exercise the following modifications at the same time: (1) We change some of the sensors’ typical behaviour, such that while still having a presentation and a meeting situation, sensors’ values are deliberately distorted in order to simulate inaccuracies and data that are not corresponding to known situations (including the presentation situation). Examples of changes we have used are changes in the sensed noise level and light intensity in the presentation theatre and office. (2) We change the settings to contain discrepancies between same-type sensors’ readings. For example, one light or noise sensor produces values corresponding to the meeting situation, while another sensor of the same type is faulty and produces very different values that do not correspond at all to the situation. (3) We add to this further uncertainty by using several context-attributes to capture the user location, e.g. our user’s location can be identified by his/her RFID tag and his/her PDA inferred location. We situate the PDA device to be at a different location from the user and situate the RFID on the user who is in the office where the meeting takes place. (Note that here we do not apply ConSpaF as the basic data fusion approach, which can deal with this kind of uncertainty as well, since we want to illustrate verification techniques.) Figure 7.6 presents the reasoning results, obtained from the reasoning engine after these changes. A box titled “Basic Situations” presents situations that are inferred using basic reasoning under the NCS model (Definition 3.5 Chapter 3) of matching context state and space. The box titled “Reasoned Situations” contains situations that are determined after applying verification techniques, and “Complex Situations” contains valid combinations of the inferred situations. Analysis of the results reveals the following notable outcomes:

We first note that, as expected, a simple reasoning (presented in box “Basic Situations”), due to the changes, fails to infer the presentation situation. However, the reasoning engine identifies the presentation activity in the next reasoning phase (point

A) by analysing the context-state, assuming possible inaccuracies in sensor readings. The actual reasoning process for this is the following. After basic reasoning, the engine looks for situations that were not inferred due to sensors’ inaccuracy. It applies the verification technique based on the state-space difference between the contextstate and selected situation spaces. Figures 7.7a and 7.7b visually demonstrate the state-space difference operator activity illustrating the relationship between the 180


context state and situation spaces. In this example, a ‘meeting’ situation space and ‘user working in office’ situation space are defined and inferred by three sensor types: (1) Light intensity in location, (2) number of people in location and (3) noise level in location. We use a radar plot where the axes in the diagram denote the dimensions (i.e. the context attributes) of the space, and fill up the space’s region of values. A separate line connecting a specific value of each context attribute denotes the context state. The context state does not fully match any of the situations but exhibits greater similarity with the ‘meeting’ situation space, in which the light intensity readings only slightly deviate from the ‘meeting’ situation space definition. In contrast there is a significantly greater difference between the context state and the ‘user working in office’ situation space. The state-space difference operation results in a very low difference between the state and the ‘meeting’ space, thereby assisting to infer its occurrence.

B A

C D

Fig. 7.6 - Results of an experimental run with added uncertainty

In the same experimental run, due to the changes preformed, discrepancies arise between same-type sensors in the office, i.e. we have different values that contradict the user location (produced by the inferred locations of the user’s RFID tag and PDA

181


device). Here a combination of verification techniques is used to resolve these conflicts. The engine first applies the Context Abstraction Levels verification technique (Section 7.1.3), which is triggered by the occurrence of low-level conflicting events. However, due to too much sensor inaccuracies and faults, the technique fails to reveal information that supports any of the contradicting events. While the system was able to detect basic discrepancy of sensed data, it had to contend with additional inaccuracies it was not aware of. In other words, it applied a verification technique over conflicting readings of same type and semantically same type sensors (e.g. two contradicting noise detectors’ readings) because it was aware of the discrepancy. But this has not yielded any inferred situation since other inaccuracies, unknown to the system were present. So, the reasoning process then combines this verification technique with the state-space verification technique. It looks for related events assuming these might also be slightly inaccurate. This yields successful verification results, where situations were identified as ‘similar enough’ to original definitions, thus revealing information supporting the Context Abstraction Levels verification technique. The outcome of this was the successful identification of the correct sensor as the one producing accurate values (point C and D in Figure 7.6). Inaccurate sensors were then assigned correct values and the overall verification yielded low confidence due to the combination of several reasoning techniques (and indexed with a ‘verification’ tag, point B in Figure 7.6).

Different aspects of uncertainty are addressed at different verification stages, whether at the preliminary stage of verifying low-level sensor readings, or after performing basic reasoning, attempting to resolve situations conflicts or reveal unidentified situations. The final result of this process is identical, however, to the initial scenario. The system succeeds to correctly infer all associated situations and composes together the same inferred situations.

Fig. 7.7a - A meeting

Fig. 7.7b - User working in office

182


An important verification technique, illustrated in the combination of techniques above is the Context Abstraction Levels (CAL), which is intended to direct applications in resolving discrepancies in low-level sensory information. We now motivate its use by explicitly evaluating its performance in experimentation. We make use of this verification technique to reason about the correct value given inaccurate sensor readings. While this kind of use may be problematic (after all, we deal with a heuristic and not proven methodology to infer context), successful results of the experimentation reinforce the underlying rationale of the verification technique. Consider the following experiment to motivate the Context Abstraction Levels technique.

Scenario Verifying low level context (i.e. sensor readings) is useful when pervasive systems deal with sensors that are inherently inaccurate. Examples of such inaccuracies can be found in Global Positioning Systems (GPS), which may vary in accuracy between 0.0l meters and 15 meters [GP05] or indoor positioning mechanisms whose accuracy depends on the number and proximity of wireless access points. Minimizing inferred location errors is important when relatively short distances off can mean being in a different room, and hence, involved in a different situation [SA01b]. We use the Context Abstraction Levels verification technique to build a heuristicbased filter of position sensor readings within an office environment. We developed a prototype that filters sensed location readings according to a scheme using high-level contextual situations. By analysing alternative situation spaces and context attributes’ values that support these situations the filter computes confidence values for alternative locations. We present a simulation, used for demonstrating this heuristic. The simulation examines a simple floor plan consisting of a meeting room, dining room, the subject’s office and a corridor, and provides information to the filtering mechanism to identify the following contextual situations: ‘Subject in office’, ‘Subject in lunch’ and ‘Subject in a meeting’. We use the following attributes for reasoning about context: ‘location’, ‘office computing activity’, ‘office door status’, ‘time’, ‘subject scheduled meetings’, ‘motion detected in area x’ and ‘light sensed in area x’. The simulation incorporates a degree of unpredictability, for example, a subject located in the dining room at lunchtime, having no particular scheduled meeting for that time, may occasionally be only accompanying a friend than having lunch himself. Consider Figure 7.8 presenting a collection of typical experimental runs encountered during simulation. We observe three typical occurrences: A1, B1 and C1 depict useful 183


filtering outcomes over the location sensor reading values. In these examples, the sensor readings indicate that the subject is located outside the area of the occurring high-level situation (e.g. in example C1 the area of the high-level situation is the office box and contains the subject’s correct location). The filtering procedure weighs the feasibility of each possible high-level situation given other possible location values (according to possible range of location error). Since the application is not aware of the true subject’s location (the red circle) it performs the minimal change possible to the estimated location so it would nominate the new situation while minimally deviating from the sensor reading values. Examples A2 and B2 depict situations where no gain is achieved with the filtering. In A2, although the sensed location is different from the true location, it is still within the logical area defined for the inferred high-level situation; hence, filtering does not provide additional useful information. In example B2, the subject’s true location is in the corridor, which does not conform to any high-level situation. The filtering mechanism cannot find any other relevant high-level situation, and by default maintains the original sensor readings. Example C2 depicts a situation where the sensor reading values are outside the valid pre-defined areas. In such cases, even though the subject’s true location does not conform to any known situation, the procedure forces a change towards the closest valid area. We performed experimental runs to examine the characteristics of the filtering; the results are shown in Figure 7.9. We observe a consistent trend of optimization of the location attribute, having lower error rates after applying filtering. Errors are compared to true location by Euclidean distance between the filtered location and true location, and between the true location and sensed location. We observe clear improvement in average location error after performing filtering for general positioning mechanisms. Although a relatively simple floor plan was used to demonstrate the impact of the verification, the procedure can be extended to more complex and elaborate settings and can be used in a variety of scenarios concerning other types of low-level context attributes. The degree of success of this approach is nevertheless dependent on the suitability of the system’s contextual configuration, i.e., to the various predefined high-level situations, the attributes they are inferred by and the accuracy of the process of reasoning about context in general. Cases can be devised in which relying on such reasoning approach fails to infer the correct context. Despite the mentioned limitation, a layer of filters that makes use of the system’s CAL verification technique is evidently useful and can be used to cope with inherent sensor inaccuracies. Our intention in this exercise is primarily in 184


demonstrating the underlying rationale of the CAL verification technique as a general way to verify context. A

B

C

reading error filtered error

6 5

1 meters

4 3 2 1

2

sample size

Fig. 7.8 - Example logical filtering scenarios

Fig. 7.9 - Filtering errors vs. sensor reading errors

7.2 Stability in Context The Context Spaces model provides an approach to represent context and context changes by observing the context state trajectory in the state-space, i.e. representing a collection of multidimensional points in the application space, representing events in the system’s context that change over time. Based on this representation we propose the concepts of stability and instability of pervasive computing systems. We call a pervasive system stable in a given context if the changes of the context state values (where context state attributes correspond to the specific context) are within specific boundaries. A pervasive system’s state is unstable in given context if it is not stable. This definition enables characterising pervasive systems in various dimensions, i.e. it can be stable in specific context (i.e. for a specific set of context attributes) and instable in other dimensions. We also identify the goal of maintaining the stability of systems in context. In pervasive computing environments, sensors are often indicative of events of interest, or events which a system should be aware of and should react to. In particular, such indications may reflect unsteadiness or instability with respect to the current situation. We perceive the ability to predict significant future events and act upon these events as an important incentive for pro-activity in pervasive systems. In such cases the system may act to keep one or more entities or itself within a specified situation and so such maintenance is in so far as the capabilities of the system will allow. In this section we propose a methodology and an algorithm for real-time analysis of sensor readings in

185

99

92

85

78

71

64

57

50

43

36

29

22

8

15

1

0


order to estimate future changes in context and to assist in maintaining the proper functioning of context-aware pervasive systems.

7.2.1 A methodology for maintaining stability We define a context state as dynamically fluctuating in time within the application space. The position of the context state within this space and its computed distance from a defined vector, termed ideal state reflects the degree of stability of the system with regard to a chosen situation that is represented by that space. An ideal state is a context state that best corresponds to that specific situation, judged by system designers. In general (applicable to many cases but not necessarily to all) the closer a context state is to the edges of the situation space, a lesser degree of stability is gained (and a greater degree of instability), and the closer it is to the ideal state or “centre”, a greater degree of stability is gained for that particular situation. Note that, similarly to Section 7.1.1, the distance between spatial positions (e.g. context state and ideal state) represents a semantic distance computation, as judged/computed by the specific application. Changes in such distance or proximity to other positions in the application space are associated with the context of comparison, based on a semantic taxonomy and may be represented in application-specific ontology. The notion of approaching the boundaries of a situation space by the context state is exemplified by the definition of Transition Areas in a situation space. Transition Areas are subsets of acceptable regions of values near the limits of the acceptable regions of values, defined in every situation space. A simplified two-dimensional illustration in Figure 7.10 is an example for these special areas. ‘Situation A’ denotes some predefined situation space’s region of acceptable values and the shaded area denotes a Transition Area. A Transition Area is defined by a boundary and denotes how vulnerable the application is from being unstable in the future. The size of the area is application dependent. Transition Areas can change over time, and we call these Dynamic Transition Areas. These areas dynamically change according to a real-time prediction procedure assessing the risk of the context-state deviating from the domain of acceptable values defined for the situation. We consider a Transition Area boundary size to be sufficient for the system to be able to balance the context state trend, if it is necessary.

186


Transition to B

Situation B Situation A Situation C

Transition to C

Fig. 7.10 – An illustration of the concept of transition areas between situation spaces

Figure 7.11 illustrates this design by representing a single attribute context state C t fluctuating within a situation, drawn against time, and the corresponding upper and lower boundaries of the Transition Area for the attribute values. When a boundary is crossed, the system acts to prevent a change in the context state, i.e. to keep the system’s context state within the boundaries. In Figure 7.6, arrows denote cases when the context state crosses the upper Transition Area and calls for actions by the system to maintain the context state within boundaries. Attribute value

Upper boundary

Ct Lower boundary time

Fig. 7.11 – Context attribute and corresponding boundary areas

Based on the articulated concepts, we propose using the following general steps for maintaining stability in a context-aware pervasive computing system. 1. If applicable, refine or statistically filter values that make up the context state by minimizing errors of the observations. 2. Estimate Dynamic Transition Area boundaries with an estimation procedure considering the following parameters: 2.1 Parameters relevant for maintaining stability, e.g., time to compensate for deviated context state trajectory. Parameters relevant for analyzing distance of the context state from situation space regions’ boundaries. (We elaborate on step 2 in subsection 7.2.2) 3. Use effectors to balance the context state trend.

187


7.2.2 Estimation procedure for Transition Areas In this section we develop an algorithm for predicting the context state within a certain time frame, and incorporate this estimation for dynamically constructing the Transition Area. The algorithm deals with the case of context state that exhibits unpredictable timevarying behaviour. Our approach analyses the recent context state trajectory in order to predict its future behaviour. It addresses the case when long-term historical data is irrelevant in predicting future context. In particular, the proposed approach is relevant when new phenomena influence the context state behaviour, and consequently analysis of historical information for performing prediction can be ineffective. Given that recent sensory information is indicative of factors currently affecting context, we make use of a conservative assumption, stating that these factors can persist until the system becomes unstable. Even though most of the context attributes exhibit only temporarily changing trends and a true behaviour can only be inferred in retrospective by observing long term historical data, from the perspective of maintaining stability, our proposed approach allows to conservatively assess risks at runtime, when no knowledge on factors external to the system exist. We, thus, focus on general aspects that reflect realtime influences over the state, namely, the context-state current velocity, acceleration and direction. In computing the stability estimate we consider two central factors, δt and λt whose combination determines the boundary size Bt at time t. δt denotes a theoretical distance measure in the state trajectory. The term ‘distance’ is used to reflect the extent of change in the values of the context attributes that make up the context state. We would like to estimate such change in the attributes’ values based on the present behaviour of the context state. In other words, we assume that if the current factors that influence the context state values continue, for a certain amount of time, the context state would consume δt measurement units (according to the attribute types), thus reflecting the extent of change in each particular attribute. The second factor λt denotes the sensitivity of computed Transition Areas to the proximity of the context state to the situation space’s boundaries. We will examine each of these factors separately.

188


7.2.3 Estimating δt - state trajectory distance We apply a technique for characterizing a state in a state-space trajectory, as introduced in [LU93], where the author investigates practices for learning rules to control systems, in the field of Robotics. Similarly, we define a semantically “first order derivative” equivalent, at time t of a context state trajectory as dC t = C t − C t −1 and define d 2C t as

d 2C t = dC t − dC t −1 . We refer to dC t and d 2C t as the local velocity and acceleration of the context state, respectively. dC t reflects the notion of velocity as it is the difference in position values (the change in values for each attribute) of the state vector over one time interval, and d 2C t reflects the notion of acceleration as it yields the difference between two subsequent velocities. We can predict the impact of external factors with extrapolation using the acceleration and velocity representation of the state in space (assuming constant acceleration). The following computation denotes estimated distance consumed by a single context attribute value in the context state, based on velocity and acceleration indicators. After computing

δt for the entire set of context attributes’ values in the context state, a measure estimating when the context state would exceed the boundaries is achieved. (1) δt =| dC | ⋅∆T +

1 ⋅ | d 2 C t | ⋅∆T 2 , where δt denotes the absolute distance predicted to be 2

consumed by a context attribute value in the state trajectory for ∆Τ time intervals, and where ∆Τ is predefined or computed time estimation for the system to apply effectors and balance undesired trend of the context state. Determining ∆Τ depends on the application intention and knowledge. For example, ∆Τ can be predefined and reflect a desired time amount for the system to be warned

before a change in situation occurs. Alternatively, ∆Τ can represent the time needed for effectors to change the context state trend. We illustrate the estimation characteristics in Figure 7.12. In this example, the prediction for the attribute’s change of value (represented by the dotted line) hypothetically computed using Equation (1) for ∆Τ time intervals for event A is greater than the distance estimated for event B. Analysis of event A reveals a significant change from a negative velocity of the state (downward trend) towards a positive velocity (upward). This implies a stronger external factor than in the case of event B and greater 189


acceleration. If such factor persists it would have greater impact over the state than the factor assumed in event B. The choice of the sampling time intervals is also important and should reflect the ability to sufficiently observe trends and influences over the context state and is therefore application and attribute specific. By estimating δt we obtain a measure of unobserved factors’ influence over the context state. However, this estimation can sometimes be insufficient if the state is already in close proximity to the boundaries of the situation. In such cases there might not be enough time to balance, if necessary, the new trend. If a system can perform context attributes’ values sampling in arbitrary time intervals, it can be used to ‘fine tune’ the algorithm’s sensitivity according to the assessed vulnerability of the situation. Performing more frequent sampling of context attribute values enables: (1) shorter durations of distance computation, (2) faster reaction to local trends and (3) more flexibility in applying the estimation technique. context attribute value

Ct B A

∆T t1

∆T t2

t3

t4

time

Fig. 7.12 - δt estimation

Given the above, the closer a context state is to the situation boundaries, a higher rate of sensor reading is issued. Consequently, the application can sense finer granularity changes and respond accordingly. We note that with such approach, the parameters in Equation (1) need to preserve their values relative to the units of measurements. For example, decreasing sample intervals reduces computed velocity between those intervals; but that velocity should be adjusted to the original units of measurement, e.g., if original velocity for temperature context attribute is determined by, say change in Degrees Celsius per 1 minute (i.e. ∆C°/Min) and sampling intervals decrease from every minute to, say, every 20 seconds (i.e. ∆C°/20Sec), then computed velocity is adjusted to the original unit of measurement, i.e. ∆C° × 3 /1Min. Using more frequent sampling intervals does not change the algorithm general behaviour; rather, it enables distance estimation in shorter time and therefore makes the

190


algorithm more sensitive. We can generally expect relatively similar (although not necessarily identical) computed distances when this consideration is applied. In summary, consider Figure 7.13 as an example for boundary estimation and observe the behaviour displayed by applying the distance computation δt. In this example the context state is made of only one attribute: a temperature sensor, and exhibits the following behaviour pattern: x t = x t −1 + µ , where µ is a random small value. In addition to the ‘normal’ attribute behaviour we added unpredictable impact of an additional and sudden force (after the 20th time unit) with greater effect over the attribute value, which lasted three time intervals. The region of acceptable values for the attribute was defined between 0 and 60, and ∆Τ =2 time intervals. The results demonstrate the context state crossing the computed upper boundary of the Transition Area. This reflects instability given that the current trend of rise in the temperature persists. value 70 Upper boundary

60 50 value

40 Context state

30 20

Lower boundary

10

time

Fig. 7.13 - δt for temperature readings

76

71

66

61

56

51

46

41

36

31

26

21

16

11

6

1

0

time context state upper boundary low er boundary

5.2.4 Discussion – analysis of approach Our technique analyses aspects of the behaviour of observed sensor readings over time and juxtaposing such readings against boundary conditions which represent desirable situations – i.e., some sense is made of these readings which then triggers appropriate actions (supposing the capabilities of the system can perform such actions). Of course, there are other techniques to make sense of sensor readings but our approach is useful when the actions are to ensure that a desirable situation (as perceived by the sensors) holds or will continue to hold. Apart from selecting an appropriate action, we can also use the technique to determine if even the best chosen action is likely to be effective at all. We can characterize when the system can be depended upon to survive changes in circumstances (i.e., likely to be able to maintain the situation) and when it cannot be depended upon, namely, when the system is very stable (well within boundaries) and when the system is less stable (close to boundaries). Moreover, we can relate historical 191


stability with dependability via the use of boundary conditions. If historical and current situations as perceived by sensors are such that the readings have been and are well within the specified boundary conditions, there is a sense that near future situations would remain within such boundary conditions as well. Analysis of the context state trajectory is not only useful for defining a general methodology for characterising system and maintaining the stability of such systems in a given context, but can also be used to perform estimation of the stability with practical algorithms. We have demonstrated this with a technique, which analyses different properties of the recent context state trajectory. Using temporal characteristics of the context state can also be used as a means to classify characteristics of ‘regular’ behaviour of context attributes in regard to specific situations. In other words, current ‘velocity’ and ‘acceleration’ of the context state can be used as measures reflecting the impact of external factors, and as such can be used to classify trends that are considered ‘regular’ or acceptable by the system designers. While this approach may not be applicable in all cases, it provides an appealing approach to analyse behaviour of context at runtime.

7.2.4 Implementation and validation For motivation, we apply the ideas and proposed techniques to a use case of a contextaware emergency evacuation system, operating in a large-scale pervasive environment. In these settings, we aim to achieve two goals: firstly, infer instability or suspicious deviations from a general state of safety (we focus on a situation of ‘fire safety’), and secondly, filter sensory data (in relation to the context of ‘fire safety’), only sending suspicious readings to the reasoning engine (i.e. those that may indicate instability of the situation), to reduce network load and enhance scalability of the system. Following the proposed methodology and distance estimation approach (Section 7.2.3) we have implemented an Instability Predictor, which analyses sensory originated data with respect to the ‘Fire Safety’ situation space. The predictor recommends at runtime the rate of sampling time intervals according to the analysis of the context state trajectory. The Predictor maintains two versions of the raw data, namely, the original data as it is read by the sensors, and a statistically filtered version, which is produced using the well known Kalman Filter technique [WB04]. The classical Kalman Filter provides optimal stochastic estimates for the true sensor readings. While in most cases the filter succeeds in

192


reducing the errors associated with the sensors’ inaccuracies and provides the predictor with more accurate values, its performance diminishes when the context state exhibits unpredictable time-varying behaviour, such as in the case of an irregular surge in the level of smoke or temperature. Both models of the data are used by the predictor, which performs conservative assessment of the association between the context state and situation, to alert irregular behaviour. The results are then either discarded (if stability is inferred) or sent for verification (in case of instability estimation). The functional elements of this process are depicted in Figure 7.14. A network of temperature sensors and smoke detectors is simulated in a defined area, whose values make up the context state for a ‘fire safety’ situation space. Each sensor in the experiment is an independent process, “continuously” (every 50 milliseconds) generating data, reflecting the true state of the event it measures. The data generated is dynamically changing with associated standard deviation and probability for producing such changes, to reflect natural changes in the environment. For example, temperature in an office does not stay fixed; rather, it fluctuates according to changes in close proximity, such as opening the window, closing the office door and malfunctioning of the air conditioner. Similarly, smoke level can change if people smoke nearby. We regard these changes as ‘normal’ since they should not cause a change in the inferred situation with regard to the ‘fire safety’ context. Inaccuracies in sensor readings are also simulated by adding to each sensor reading, an error based on a normal distribution (i.e. to determine the likelihood and magnitude of the reading error). During experimentation, we simulate normal fluctuations of the sensors readings and initiate unpredictable surges of value readings simulating the effects of fire or any other event that is not considered normal. Our objective is to infer possible instability of the situation as close as possible to the start of the irregular activity. At the same time we wish to minimize the cases of inferring normal activity as leading towards instability. For example, if a normal temperature in a room is around 21ºC and a fire starts, we would like to infer instability as soon as possible, when temperatures are still close to 21ºC and not when they are nearing 30ºC. At the same time, normal fluctuations of temperatures, even if reaching, say 25ºC, should not be treated as causing situation instability.

193


‘Continuous’ normal fluctuations Normal surges

Irregular surges Inherent reading errors

Runtime data collector

Sensitivity (frequency) recommendation

Instability Predictor

Historical inference

Verify

Kalman filter

Fig. 7.14 – Implementation, functional analysis and sensors simulation

Initial sampling time intervals (i.e. simulated sensor readings frequency) were set to four seconds, and changed at runtime according to the predictor’s recommendations. The diagrams below use different time scales than in the actual experimentation to graphically capture significant events. Figure 7.15 illustrates a typical run showing results of a single sensor, where temperature fluctuates around 21ºC. The boundary estimates dynamically changing and crossing the filtered values (obtained by Kalman filtering) indicates possible instability. Analysis reveals two possible instability areas, point A and point B. Point A represents normal fluctuation of temperature, in which case, it is sent to the reasoning engine and is later discarded (i.e. ignored or concluded by the reasoning engine as being normal). Point B represents the starting point of a surge in temperature due to fire simulation. Hence, the analysis of temporal features, such as acceleration and velocity of the context state trajectory enables to reveal suspicious behaviour at runtime close to the origin of the event. We note, however, the following reservation concerning this experimental run. Firstly, a simple numerical threshold or statistical computation could have replaced the algorithm with similar results. This case, however, is only applicable if a fluctuation around specific values is known always to take place.

194


Temperature

Boundary estimate

35 33 31 29 27 25 23 21 19

Sensor reading True values

B

A

Filtered values

Fig. 7.15 – Typical experimental run

In other cases, when temperature levels can abruptly change and still be considered normal, such threshold approach would obviously fail. This fact is illustrated in Figure 7.16, where normal but considerable changes in temperature occur randomly. These changes reflect ‘safe’ events such as opening windows when much higher temperatures exist outside. The algorithm is able to recognize such normal changes by analysing the temporal characteristics of the event and using recent historical data about verified events with similar characteristics. By analysing temporal features of the trajectory, the algorithm immediately identifies potential instability when a true fire is simulated (point A) and does not need to wait and gather more long term statistical data to infer significant trend changes. We have been using the classical Kalman filter as estimation for the true values read by the sensors. Having good estimation for the true values is important as it is these values that are compared with boundary estimation. We have noticed, however, degradation in performance whenever unpredictable changes occur, which do not conform to the filter statistical settings. Various approaches attempting to minimize the filter errors in time varying and non-linear environments exist, whether trying to dynamically adjust the filter’s parameters according to environmental changes [MC88, FB02] (a.k.a. Adaptive Kalman Filters) or by switching between alternate Kalman Filter models [M298]. The topic of applying Kalman Filter in time varying environments is not in the scope of this thesis, but techniques such as those mentioned above can be utilized to enhance the outcome of the procedure.

195


Boundary estimate

Temperature 35 33 31 29 27 25 23 21 19

True values Reading errors

Filtered values

A

Fig. 7.16 – Unpredictable normal abrupt changes

We implement a simple approach to reduce possible true value estimation errors by leveraging on the algorithm’s analysis of the trajectory‘s temporal features. Whenever computed velocities and accelerations exceed thresholds of peak values set in previous time intervals for stable events (i.e. those that did not cause instability), the algorithm uses the sensor readings for computing the dynamic boundaries (and not the filtered ones). When temporal parameters are again below the inferred peak values, it shifts back to the filter results. The result is a simple switched estimation filter that although performs less than optimal, reduces potential filtering errors that have negative effect on the algorithm performance. A typical run using the switched filter and summarizing the proposed approach is depicted in Figure 7.17. The top window depicts the correct inference of instability close to the start of the event (point C) while at the same time successfully inferring sensor readings at point A and point B as being normal. The middle window depicts a graphical representation of the recommended sampling time intervals (sensor reading frequency) produced by the Instability Predictor, at run-time. Note that, in general, as the context state is closer to the computed boundary the sampling time interval is more frequent. Finally, the bottom window depicts the simulated values of events in the experiment, the Kalman filtered result (applied over the sensor readings with associated errors), and the switched filtered result. Note an improvement in filtering accuracy of the switched approach compared with the Kalman filter.

196


38 36

Boundary estimate

34

Switched Filter

32 30 28 26

A

24

B

C

22 20 18

Time intervals

Kalman Filter Switched Filter True values

Fig. 7.17 – Switched filter and unpredictable changes

We note that the discussed approach will not always out-perform other kinds of analysis. It is designed to be applied when the context state behaviour is unpredictable and temporal characteristics, such as velocity and acceleration, of the state can be indicative of irregular behaviour. In such cases, long-term data analysis may not be useful.

7.3 Summary Context Spaces view of using spatial metaphors for representing context and situations leads towards developing new approaches for reasoning and managing context. This chapter presented proposed techniques, which are based on heuristics that benefit from this view. We have addressed issues ranging from dealing with context uncertainty to managing complexities in pervasive systems, and have demonstrated using Context Spaces approach as an insightful instrument for addressing different context related challenges. We have proposed, developed and validated three heuristic-based techniques designed to handle exceeding degrees of uncertainty in cases when conflicts and ambiguities must be resolved. We use these techniques to verify uncertain context and propose their use to guide context-aware systems in reducing uncertainty. These techniques deal with (1)

197


inadequate available information to infer occurring situations, (2) situation ambiguity, and (3) discrepancies between sensor readings. We have experimentally demonstrated the

proposed techniques and showed how their combination resolves reasoning conflicts and information discrepancies. We note that our verification techniques are based on heuristics and the validity of these heuristics for a specific application may need to be experimentally established. We have also discussed the need for predicting changes and maintaining the stability of context-aware systems with regard to specific context. We have proposed the concepts of stability and instability as means to characterize large scale pervasive systems. We have presented a general approach for examining system stability in context by defining dynamic boundaries that change according to the instability estimation of the situation. We then developed a technique that makes use of these concepts for estimating potential transitions between situations by analysing temporal features of the context state trajectory. To motivate and validate our approach we have experimented with a notion of dependability in a sensor-based fire-safety application. By computing the impact of recent events on sensed attributes and analysing temporal features of the context state, we have developed and evaluated an algorithm, which predicts potential instability of the situation, at run-time. The algorithm we have described for predicting instability and the underlying way to represent context with the Context Spaces model have been adopted as an approach to “defensively� forecast stock price changes and stabilise profit in option trade stock market cases [AP05]. We present this case in Chapter 8, discussing case studies and applications of the Context Spaces model.

198


C

H

A

P

T

E

R

E

I

Case Studies and Applications of Context

G

H

8

T

Spaces Approach Theoretical approaches and the conceptual context model, proposed, defined and discussed in this dissertation, can be evaluated on the basis of their relevance and applicability in a range of case studies. Our modelling approach provides a general way to represent context and offers valuable insights into modelled context. In this chapter we discuss applications of the Context Spaces approach and show that the model is relevant and applicable in various distinctive domains, such as communication, financial trading and IT governance and management. In Section 8.1 we demonstrate uses of the ECORA framework (discussed in detail in Chapter 5) in a Unified Messaging Application scenario and illustrate what is involved in prototyping a new context-aware application using the framework. In Section 8.2 we present a joint project with Hewlett-Packard Research Labs, applying the Context Spaces approach to deal with a challenge of managing systems by business objectives. We describe this initiative and how our approach successfully integrates with it and solves existing challenges. In Section 8.3 we discuss the application of the Context Spaces model and specific algorithms to a financial trading case, based on collaborative efforts with University of Quebec, Montreal. We present an approach to forecast stock price changes and stabilise profit in option trade stock market cases, using the Context Spaces approach. The different types of applications we discuss demonstrate the applicability and usefulness of the model as a general approach to deal with context in very different context related scenarios.

199


8.1 Case Study 1: A Unified Messaging Application In the course of this project we have demonstrated various uses of our approach in context-aware pervasive computing scenarios. Most notably, we have demonstrated an application, physically deployed in a smart-room (using real sensors) for distinguishing between users activities (Chapter 6). We have also discussed in length, design and implementation details of the ECORA framework, designed for prototyping new contextaware applications (Chapter 5). In this section we demonstrate the use of the framework and context reasoning engine for prototyping context-based decision making in a unified messaging application (hereafter UMA). UMA provides a unified messaging platform and relies on context to appropriately route incoming messages to recipients. In UMA scenarios, context can be used to reflect conditions of devices such as mobile phones, notebooks and PDAs, as well as reflect specific context of users. In a typical scenario, an incoming message to a mobile phone can be converted to text and possibly sent to the intended recipient via email. What determines the actions of the UMA is the context of the devices and users, e.g., the user directs the system to forward messages to his/her email whenever he/she is in a meeting or when his/her mobile phone is switched off or has low battery power. To deal with such preferences the messaging application needs to become context-aware, often reasoning about users’ situations under uncertain conditions. Becoming context-aware with ECORA and prototyping the case of UMA concerns three basic actions. Firstly, relevant situation spaces need to be modelled by application designers. This is a straight-forward task concerning situations reflecting devices’ status and relevant user situations (possibly described in users’ profiles). Secondly, sensory originated information in the system needs to be routed via the framework communication services. Thirdly, inference of complex logical expressions that denote users routing preferences, is performed at runtime by UMA, by interfacing with the reasoning engine via its programming API. In the following use-case, we have produced a simulation for a UMA in an office environment, consisting of 14 processes representing monitor services, each simulating a group of three to five sensors. Each such monitor process produces sensory data for a

200


predetermined logical area, such as an office, meeting room or rest-room. Altogether, we simulate a department with 14 logical areas. Sensors produce randomly-generated values within a specified range according to chosen scenarios we test. Values generated are occasionally distorted with significant inaccuracies or may become faulty (i.e., persistently produce wrong readings). The unified messaging application itself services a number of different users, considers their individual messaging preferences and utilizes the middleware for becoming context-aware. UMA utilizes the middleware infrastructure to forward sensory data, uses the Model package to define relevant situations based on user profiles, and uses reasoning services available by the reasoning engine to determine context (in order to indicate best message conversion and routing decisions). Consider the following code snippet taken from the UMA client code used in the process of building a model. XSpace USER_NOTEBOOK_ACTIVE = new XSpace("USER_NOTEBOOK_ACTIVE"); XAttributeRegion a13 = new XAttributeRegion("USER7_NB_KEYBOARD","CONTINUOUS",5,9); XAttributeRegion a14 = new XAttributeRegion("USER7_NB_ICON","CONTINUOUS",5,9); XAttributeRegion a15 = new XAttributeRegion("USER7_NB_POWER","CONTINUOUS",5,9); USER_NOTEBOOK_ACTIVE.addAttributeRegion(a13,0.2,"no"); USER_NOTEBOOK_ACTIVE.addAttributeRegion(a14,0.1,"no"); USER_NOTEBOOK_ACTIVE.addAttributeRegion(a15,0.35,"no"); USER_NOTEBOOK_ACTIVE.addDynamicRegion("USER7_NOTEBOOK_LOCATION", "USER7_LOCATION","=",0.35,"CONTINUOUS");

… … XSpace MR_MEETING = new XSpace("MR_MEETING"); XAttributeRegion a8 = new XAttributeRegion("MR_LIGHT_LEVEL","CONTINUOUS",7,9); XAttributeRegion a9 = new XAttributeRegion("MR_NOISE_LEVEL","CONTINUOUS",5,8); XAttributeRegion a10 = new XAttributeRegion("MR_NUM_PEOPLE","TEXT","3","10"); XAttributeRegion a11 = new XAttributeRegion("MR_MOTION_LEVEL","TEXT","1","3"); MR_MEETING.addAttributeRegion(a8,0.3,"no"); MR_MEETING.addAttributeRegion(a9,0.2,"no");

201


MR_MEETING.addAttributeRegion(a10,0.3,"no"); MR_MEETING.addAttributeRegion(a11,0.2,"no");

The code demonstrates definitions of situation spaces for a meeting occurring in the meeting room and of a particular user’s notebook being active. Definitions require information about context attributes, regions of acceptable values for these attributes, weights reflecting importance of these attributes to the specific situation, and whether they are symmetrically or asymmetrically contributing to the situation. Note the addDynamicRegion("USER7_NOTEBOOK_LOCATION","USER7_LOCATION","=",0.35,..

method call, which enables dynamic changes in context attribute values in the region at run-time rather than in design time. In this particular instance, a dynamic region of values is added to the situation of user notebook being active. This prompts the reasoning engine to identify the fact that the logical location of the notebook and the user are the same. The reasoning engine performs this check at run-time testing the validity of the supplied predicate (in this case an equality predicate). If both the notebook and user are inferred to be at the same location then contribution to the occurrence of the situation is added. (Note that the user and notebook locations cannot be predefined). This action supports the rationale of routing messages to the user’s notebook only if it is located close to the user. Consider the following code snippet taken from the UMA client code used during reasoning about context in regard to user messaging preferences. String expression = "NOT(USER_PC_INACTIVE) | USER_PC_OFF | " + "USER_AWAY_FORM_PC & USER_MOBILE_ACTIVE " + "& USER_IN_OFFICE_CORRIDOR"; String status = reagine.infer(spaces,expression,null); ... String status = reagine.infer(spaces,"(MR_MEETING & USER_IN_MR | USER_IN_RR) & USER_NOTEBOOK_ACTIVE", null); ... String exp1 = "MR_MEETING & USER_IN_MR | USER_IN_RR"; String exp2 = "USER_AWAY_FORM_PC & USER_MOBILE_ACTIVE & USER_IN_OFFICE_CORRIDOR"; String exp3 =... expressions[0] = exp1; expressions[1] = exp2;... Vector result = reagine.compare(spaces,expressions, null); ... Document doc = reagine.inferByProperty(space1,"GENERAL_MEETING","location");

202


The code snippet demonstrates different reasoning actions performed by the client interfacing with the reasoning engine via the programming API. For example, the client requests reasoning over the complex situation expression: “NOT(USER_PC_INACTIVE) | USER_PC_OFF | USER_AWAY_FORM_PC & USER_MOBILE_ACTIVE & USER_IN_OFFICE_CORRIDOR“. Or the expression:

“(MR_MEETING & USER_IN_MR | USER_IN_RR) & USER_NOTEBOOK_ACTIVE“. Using the compare()method call the UMA client requests the engine to evaluate a series of complex expressions to determine which one is the most supported, computing for each complex expression a numerical confidence value. We have developed a theoretical approach to enable such reasoning in Chapter 4 and discussed its implementation in the reasoning engine in Chapter 5.

Fig. 8.1 – GUI of the reasoning engine server for the UMA case

The last example demonstrates using the inferByProperty()method call, which instructs the reasoning engine to perform reasoning for a situation that occurs together 203


with some dynamically defined property. In this particular instance, the client requests inference results about meetings that are currently occurring in logical locations and receive an XML document specifying the results for this query. The results of the last query for all meetings currently occurring can be observed in Figure 8.1, above. The figure presents a GUI of the reasoning engine. Recent requests to the reasoning engine are depicted in the top-right window, internal representation of the latest reasoned about situation space is depicted in top-left window, and inference results for the query in XML format are depicted in the bottom window. This format (in XML) is returned to the client, describing in this specific case confidences of having a meeting in each logical area. The case of unified messaging demonstrates the suitability of Context Spaces model in describing the context of both human-related activities and communication and device conditions. The case study illustrates the relative context modelling simplicity and the resulting effective reasoning, achieved in prototyping context-aware applications using the ECORA framework.

8.2 Case Study 2: Management by Business Objectives Current research at HP Labs on Management by Business Objectives (MBO) [BB05] aims at developing solutions for IT management driven by an enterprise’s business objectives. Whether running an in-house IT department or managing it on behalf of an outsourcing customer, IT managers are required to align IT service delivery to the business that it supports. This requires IT managers not only to ensure smooth running of their IT operations, but also to be aware of the effect that alternative decisions may have on the business. Besides and beyond the definition of service level objectives, businesslevel indicators need to be taken into account that represent the concerns of various levels of management within the business, from line of business managers supported by the IT all the way up to the executives [BB05]. Control Objectives for Business Information-related Technology (COBIT) [GM04] and Balanced Score Cards [KN96] define mechanisms to specify and monitor such objectives and provide metrics and key performance indicators to assess related IT

204


performance. However, no tools exist today that help an IT manager plan, schedule and enact the changes by taking into account the risk of effecting the changes and their impact on the business. Bartolini et al. [BB05] have approached the goal of managing IT by business objectives through the development of a methodology for decision support in IT management. The methodology is based on developing a reasoning engine that solves the following class of decision problems: computing the alignment to objectives that are expected for each of the possible given management options, and computing the course of action aimed at managing the IT delivery systems. Through monetization of the measure of alignment the engine should perform ranking of the available options and return a suggestion on what course of action to take (substantiated by the evidence that it has for assessing the alignment with respect to the business objectives). The MBO Business Objectives information model [BB05] is articulated around a set of key concepts: Objectives, Key Performance Indicators (KPI) and Perspectives. Objectives are measurable indicators of the business goals, Key Performance Indicators (KPI) are measurable indicators of actual performance of the enabling factors of IT processes, indicating how well the process enables the goal to be reached, Perspectives are used to bundle objectives together that concern a certain angle of the business. An example of an objective defined through the model is “the aggregate service revenue generated over the current three-month period must be above $100,000”. This is modeled in MBO by defining a KPI ι representing the aggregate cost of SLA penalty paid over the current three month period, represented by a dollar amount. The target of the objective is the region in the KPI space characterized by the inequality ι < $100,000.

8.2.1 Business awareness through Context Spaces Context Spaces has been applied as a suitable model for representing and dealing with reasoning about business objectives. Treating business-awareness as a special case of context-awareness and recognizing the general modelling nature of Context Spaces makes the approach useful for representing and reasoning about business objectives. With this in mind, the Context Spaces model has been proposed as the underlying formal description of a system governed by business objectives and as an approach capable of enhancing business awareness in IT management. 205


We look at a system governed by business objectives in a similar way to a sensorbased pervasive system; both need to be adaptable and make use of the notion of context. While many pervasive computing systems rely on physical sensors as the fundamental type of information that determines relevant context, business systems rely on business objectives (as defined for example in SLAs) to determine the business context. The principles of the Context Space model can be used to represent the conditions of business constraints, having the objectives of an application define the context to be modelled. The targets defined over the MBO business objectives can be seen as predicates which at any point in time can be true (indicator is in the target region) or false (indicator is not in the target region). Transitions between states can be caused by events such as service degradations which have repercussions on business objectives (through penalties to be paid as specified in service level agreements - SLAs). We liken the business objective state as the context state, where information related to the current reading of the key performance indicators represents different context attributes values. The business objectives themselves can be used to define situation spaces, specifying the predicates for regions of acceptable values within the situation space. The objective-state reflects how well the set of objectives are satisfied at a given time, or in MBO terminology the alignment with business objectives. This kind of mapping enables the use of various algorithms based on the Context Spaces model, including reasoning about context (the degree of alignment with business objectives) in uncertain conditions (e.g. when some information is missing, inaccurate or not up-to-date), stability analysis of the context state and prediction procedures that assist in actively maintaining the stability of the application in a given business context. The feasibility of mapping business objectives onto Context Spaces implies the viability of developing an automated application, converting business objectives into Context Spaces representation. This in turn enables a variety of applications that make use of a state-space representation of the system in a given chosen context (where the context is chosen according to the application interests and can be changed arbitrarily), such as a generic mechanism for tracking and assessing alignment with business objectives. The applicability and feasiblity of using Context Spaces in managing by business objectives has been demonstrated with ‘CORE-Light’, a light-weight version of the reasoning engine, which was developed as a single process component designed to easily integrate with the enterprise’s existing infrastructure. Figure 8.2 presents a demonstration run of reasoning about business objectives in an MBO scenario using ‘CORE-Light’. A 206


variety of key performance indicators are depeicted in the top window – these make up the context-state. The reasoning engine accepts both numerical and textual values and associated confidence in the information. Complex business objectives are depicted in the bottom-left window (an expression of complex situation spaces). Windows on the right depict internal Context Spaces representation of the model and reasoning results in XML format. Reasoning about business objectives is performed using the fundamental approach of accumulating supprotive evidence (ConSpaF) presented in Chapter 3.

Fig. 8.2 – GUI of CORE-Light reasoning applied to MBO

Using the Context Spaces approach, support for more elaborate descriptions of business objectives is achieved, e.g., when several alternatives of business goals or conditional statements can be articulated more easily. Such complex business objectives may better reflect business perspectives but could not be cognitively reasoned about by the client of the system (e.g., business manager). The ability to compute alignment to business objectives for complex objective descriptions would enable users to perform various appealing business oriented computations. For example, computing the trend of alignment of complex business objectives with respect to time, or testing the effect of changes in specific key performance indicators over the computed business alignment.

207


8.2.2 Incident prioritization with Context Spaces approach We have described and demonstrated Context Spaces as an approach for managing IT by business objectives. In this section we explore a specific task within MBO, that of prioritizing incidents according to their impact on business objectives. We present a model and proposed solution for this task based on Context Spaces. Prioritizing incidents is the process of assigning priority to IT incidents, based on a prediction of their impact on business objectives. If we consider possible actions that can be performed by a business in response to various incidents, and consider possible impact of these actions on different performance indicators, then incident prioritization becomes a complex problem. In such cases, an action performed in response to an incident affects various KPIs (or various dimensions in the context state). At every iteration, new actions can be performed which ultimately affect the business alignment. The challenge then becomes to identify an optimal order of handling incidents with the best choice of actions which maximise the business alignment. Using the Context Spaces approach we can model the system’s current state in the context of business objectives. We can also identify a situation space, which reflects business objectives that need to be achieved. Within such space we can determine an ideal state the system seeks to attain. The task of finding optimal set of actions performed during time is then represented as finding the optimal trajectory of the context state, which evolves from the current state to the ideal state. This approach is depicted in Figure 8.3. To achieve this goal we compute the context state trajectory from two spatial and time positions: (1) we generate context state trajectories from the origin (i.e., current context state) based on impact of selected actions on the state, and (2) we backtrack context state trajectories from the ideal state in the situation space to the origin. Convergence of the two types of trajectories (or nearest trajectory from origin to situation space) indicates an ideal choice of actions, which affect the key performance indicators such that business alignment is maximized. A joint demonstration artefact (with HP labs, Palo-Alto) presenting this approach is provided in the Appendix.

208


Trajectories convergence indicates action path

Backtracking state trajectories from targeted performance situation

Computing state trajectories from origin

time

Fig. 8.3 – Context Spaces approach applied to incident prioritization

Using Context Spaces modelling approach and reasoning engine (CORE Light) in the case of management systems by business objectives demonstrate the applicability of the model and related reasoning approaches to cases significantly different to those discussed so far. The case illustrates the broad range of applications that can be modelled using Context Spaces and shows how modelling of situations in terms of state and space provides a unique approach to dealing with incident prioritization challenges.

8.3 Case Study 3: Stock Market Analysis and Option Trading The Context Spaces model, concepts and specific algorithms have been adopted as an innovative and compelling approach to deal with the case of stock market decisions making [AP05]. A stock market decision making situation addresses the scenario of decision making in case of a portfolio that contains derivative instruments such as ‘put’ and ‘call’ options which precisely claim adaptation of risk to a changing context by applying an option based strategy. The general modelling nature of Context Spaces, representing context as a multidimensional object in the application space, the ability to dynamically characterise context changes, and the facility to measure these changes with respect to situations that are reflected by context, makes it an appealing approach for stock portfolio analysis.

209


By adopting the Context Spaces formulation typically used in sensor driven applications, characterizing the context-state trajectory behaviour in real-time and proactively estimating the trend of context changes can be achieved. The concepts of stability and instability approaches to maintain stability of chosen context further contribute to developing mechanisms such as hedging with derivative instruments as a way to adjust context-aware financial system sensitivity to contextual changes. The algorithm and methodology for maintaining stability, proposed in Chapter 7, have been applied to deal with extreme context-state exhibiting unpredictable time-varying behaviour, in a case of an equity option portfolio. The application of the algorithm to the stock portfolio case is motivated and based on the following approach:

We set a goal of maintaining a stock price within predetermined boundaries, such that option trading over this stock yields profit. This is analogous to the task of maintaining stability in a predetermined situation. The critical moment in time and space is pertinent when the price crosses a critical line or threshold that forms the boundaries of the situation space.

Situation spaces with regions of acceptable values are natural abstractions for the case of stock portfolio, e.g., a region of acceptable values of price levels between $7 and $11 for specific stock price.

We identify a multi-dimensional nature of context, made up of relevant contextattributes, such as stock price, day trading volume, volatility in price, differences in trading peaks and lows, news about the company and so on, which can reflect changes towards instability of the portfolio.

We acknowledge, in general, failure of existing approaches to predict future stock behaviour based on past historical data, due to unpredictable behaviour of market and traders. This highlights potential benefits of applying the proposed algorithm in Chapter 7, which is based on analysis of recent context state changes in the statespace. For the stock market scenario we refer to dS t and d 2 S t as the local velocity of the price of the stock (or Delta in financial terminology), and acceleration of the context-state (or Gamma in financial terminology).

We assume that hidden trend exists, which is not revealed by the observed contextattributes. Most notably, stock price affected by temporal and local influences (uncorrelated in the long term) fluctuates (i.e., random walk) over a hidden true trend.

210


This strengthens a sensor based approach that treats input information as inaccurate, erroneous or biased and calls for filtering approaches.

Using derivatives instruments for hedging is similar to effectors in context-aware pervasive systems. These tools can be used to stabilise the option portfolio based on the proposed prediction algorithm. In the case of stock market portfolio, either small or large context changes over time

can be of importance depending on their proximity to the boundary of the option portfolio situation space. This justifies sensor driven solution in the form of an algorithm or a filtering mechanism within the proposed context aware system. The goal is to maintain the value and tolerable risk within the desired system state using derivative instruments for hedging.

8.3.1 Use case application A hybrid solution following the Context Spaces approach for an equity option portfolio mechanism, which in financial terms is simultaneously delta (i.e., velocity of change), gamma (i.e. acceleration of change), and vega (i.e., velocity of the volatility) neutral, has been applied and evaluated for specific stock portfolio cases. Consider the case of ELAN stock illustrating the merits of a decision support system with context aware characteristics. ELAN (ELN) is a leading worldwide specialty pharmaceutical company focused on the discovery, development and marketing of therapeutic products and services in neurology. As it could be seen from the global three months graph (Figure 8.4) the stock displays a very unpredictable time varying behavior with two sudden over 60% drops in a very short period of time. Context characteristics of ELN or any other company of the medical – drug sector are closely linked to the processes of new medication development in the drugs and medical sector. Various phases in preclinical and clinical evaluation are closely followed by investors and have a major impact on stock prices at the time of successes and failures announcements. Potential consequences of negative statements concerning the slower than expected progression toward commercialization or withdrawal form the market and subsequent class action, as for ELN case, are key context attributes explaining the company assessment by investors and consequently a drop in its stock price.

211


Fig. 8.4 - ELN‘s price and volume graph representations over a one year period (source Yahoo Finance)

The ability to predict changes in such a case is very important for minimizing the undesired portfolio behaviour. The challenge is determining the nature of the change which, in case of ELN, can be qualified as extreme and unpredictable, and at the same time, has well defined temporal (dynamic) and spatial context characteristics. Figure 8.5 presents the concept of transition areas adopted from Context Spaces in the context of stock analysis. The figure also presents a dynamic table automatically interpreting the various changes using a technical analysis approach termed oscillator methods. We observe two distinctive time periods; one of stability accompanied by a low transaction level and a second one of extreme instability with two almost consecutive dramatic down movements.

Event Date

Oscillator

Close at Event

Opportunity Type

Mar 31, 2005

Long-term KST

$3.24

Bearish

Mar 28, 2005

Momentum

$7.29

Bearish

Mar 23, 2005

Momentum

$7.20

Bearish

Mar 23, 2005

Short-term KST

$7.20

Bullish

Mar 17, 2005

MACD

$7.25

Bullish

Fig. 8.5 - An illustration of the concept of transition areas for ELN

Implementation details of a hybrid approach combining the stability algorithm (Chapter 7), statistical filters and financial analysis tools, based on Context Spaces methodology are beyond the scope of this dissertation. In the following we broadly describe the approach with respect to the ELN stock use case.

212


In the discussed case, the price of ELN fluctuates up and down according to concerns or anticipations of the marketplace about the stock’s future price range. In general, any factor that suggests uncertainty on a stock’s future price performance can increase the instability reported. On the other hand, factors that can result in stability or steady and consistent bullish or bearish trends are reflected by low implied volatility. For example, changes linked to expected seasonal factors are regarded as normal and they should not cause a change in the inferred situation in regard to the ‘portfolio profit’ context. This is identical to identifying ‘regular’ behaviour in the case of ‘fire safety’ demonstrated in Chapter 7. For example, if a normal ELN stock price is around $7.50 and an unexpected negative statement is made on the withdrawal of a medication from the market, we would like to infer instability as soon as possible, e.g. when the price is still around $7.50 and not when it is already down to $4 and dropping. In the same way, normal fluctuations even around $8 or 6.50$ should not be treated systematically as causing situation instability. Instead of typical sensor reading errors, the portfolio situation commands special attention to the source and quality of information associated with ‘alarms’, i.e. instability predicted using the algorithm for different context-attributes. More specifically, in addition to using the classical Kalman Filter (as demonstrated in Chapter 7) to provide optimal stochastic estimate for true sensor readings (whenever applicable), ELN case dictates an approach for incorporating imperfectly reported context. In the latter case a Bayesian optimal processor making use of Bayesian networks for reasoning about dependencies between context events has been proposed. Of importance are α- Type I and β- type II errors that reflect misuse of context information rather than instrumentation

errors [AP05]. A developed context sensitive mechanism was based on the use of derivative instrument in the form of Calls and Puts within the portfolio, allowing expansion of the number of strategies to deal with context changes (as discussed in [AJ04]). They act either proactively or reactively or both to compensate for the instable context with sensitivity that is a function of the type of error Type I or type II once detected by a filter. Context characterization through sensitivity indicators is made using well-known option sensitivity measures, namely, (1) Delta indicating the price sensitivity of an option with respect to changes in the price of the underlying asset, here ELN. It represents a first-order sensitivity measure analogous to velocity in the stability algorithm. (2) Gamma is the sensitivity of an option's delta to changes in the price of the underlying asset, and 213


represents second-order price sensitivity analogous to acceleration in the stability algorithm. (3) Vega is the price sensitivity of an option with respect to changes in the volatility which we did not include in the algorithm. Figure 8.6 illustrates the system’s components, denoting: (1) the selection of option strategy to protect against instability. The experimentation was conducted using an option strategy called ‘Long Put‘, chosen from a set of strategies designed in advance to compensate the negative effect of the change. The strategy as schematized is risk safe but it has a limited reward potential. Its main agenda is to prevent major instability of the application by preserving the right to sell the stock at a fixed strike price when it is in fact moving down, based on a conservative prediction analysing recent changes in the context state, and (2) the results of the stability analysis using the approach proposed in Chapter 7, applied over multiple dimensions and illustrated in the upper diagrams over the context attribute of price amplitude (i.e. the difference between high and low price quotes). Note that indication of instability in the trade of ELN (in the amplitude dimension – left upper diagram) is identified prior to the unpredictable stock price fall (right upper diagram). 40

10

30

5

stock price

20

upper boundary

p r 10 i c 0 e

0 -5 -10

-10

-15

-20

lower boundary time

-20

ELN

-30

time

Context Aware System Layer

Output Consequence Layer

5000 0 -5000 1

3

5

7

9 11 13 15 17 19 21

-10000

ELN with Protective Put Series1

15000

-15000 -20000

P ro fit

P rofit

a m p l i t u d e

15

-25000 Stock

10000 Series1 5000 0 1

3

5

7

9 11 13 15 17 19 21 Stock

Output Consequence Layer

Fig. 8.7 - Derivative and filter based context aware system

214


The Context Spaces approach to represent situations and changes in context appropriately models the option portfolio scenario. In addition, experimental results suggest that Context Spaces based reasoning can be useful in dealing with such and similar cases.

8.4 Summary and Conclusion In this chapter, we have presented a broad range of applications that use the Context Spaces model. We have described the use of ECORA framework and reasoning engine in a unified messaging scenario, discussed the use of the model, reasoning algorithms and reasoning engine to managing systems by business objectives, and described the use of the model, algorithms and methodology in the case of option trading and portfolio management. The diverse types of applications using Context spaces reflect the general nature of the model and its value for developing fitting solutions to challenges affected by contextawareness. Each of the discussed domains in which Context Spaces approach has been applied can be regarded as a special case of context-aware computing, thereby benefiting from the model and related algorithms.

215


C

H

A

P

T

E

R

N

I

Conclusion

N

E

9

9.1 Research Summary and Contribution This research project and dissertation have addressed a number of research questions and challenges in context-aware pervasive computing. Above all, we have developed a unifying theory about context, based on spatial metaphors. In developing such an approach, we have addressed the question of whether spatial metaphors can contribute to a general approach to representing context and be insightful for understanding reasoning about context. This question has guided the development of the Context Spaces model and related algorithms. The Context Spaces approach describes context and situations with spatial metaphors of state and space and uses these concepts as first class objects of the model. It, therefore, explicitly models context and situations rather than only representing information that is used in reasoning about context. This approach has been insightful for developing algorithms for reasoning about and managing context. The purposeful modelling of situations and occurrences of situations based on geometrical insights, and the analysis of relationships between context and situations in the state-space, have enabled different novel approaches to reasoning about context and situations (Chapter 3). Based on analysis of changes in the context state (as a first-class object of the model) approaches and methodologies have been investigated, implemented and validated to compute and maintain the stability of changes in context of a contextaware system (Chapter 7). With situation spaces as primary building blocks of the model, a Context Spaces Algebra, which investigates relationships between modelled situations, has been proposed and developed (Chapter 4). This has enhanced reasoning about context, enabled effective

216


management of contextual information and promoted adaptive behaviour of context-aware pervasive applications. Based on the Context Spaces approach, we have developed different algorithmic extensions that deal with context-awareness challenges, such as reasoning and verification of context under uncertainty (Chapter 7), or inferring the validity of logically conditioned situations under uncertainty (Chapter 4). The Context Spaces approach has, therefore, proven to be valuable not only in representing context in a unifying way, but also insightful for developing new approaches that deal with context-awareness challenges in pervasive computing systems. A further indication of the value and generality of Context Spaces as a context model has been demonstrated with applications of the model in different domains, such as in the case of management by business objectives and stock option trading (Chapter 8). We have also implemented and extensively evaluated our approaches in various context-aware pervasive computing scenarios (Chapter 6). Based on the Context Spaces model and algorithmic reasoning, we have built a framework for context-aware computing (Chapter 5). We focused on inferring context and occurrences of situations in uncertain conditions and addressed issues such as scalability, effective communication and usability of the framework. We have also developed a lightweight reasoning engine, which is incorporated into the framework. The engine can also be incorporated into other computing infrastructures, providing context reasoning services based on the Context Spaces model. The reasoning engine represents one approach to using the Context Spaces model and algorithms. We have also integrated a subset of the functional components library from the framework into mobile agents, facilitating context-aware mobile software agents. We have argued for architectural benefits of deploying these context-aware mobile entities in pervasive computing environments. Through experimentation, we have demonstrated how integrating mobile agents with the Context Spaces Algebra promotes adaptive behaviour and more effective reasoning for agent-based applications. Finally, we have discussed and developed a solution to the problem of mobile agent communication, which enables new kinds of messaging between context-aware mobile computing entities, suitable in context-aware pervasive environments (Chapter 5). This project has successfully addressed the three fundamental research questions, posed at Chapter 1, namely, (1) whether a general context model can be built using geometrical intuitions, (2) can reasoning approaches be developed over such a unifying 217


model and can the model and reasoning be implemented in a framework for context-aware computing, and (3) could such a framework incorporate mobile agent technology to increase pervasive systems’ agility. Addressing these questions, we have proposed and developed the Context Spaces model, which uses spatial insights, and defined with concepts of state and space in the application multidimensional space. Based on the model we have proposed, developed and evaluated different reasoning approaches. The model and related reasoning approaches have been implemented in a functional components library and used within a framework for context-aware computing. The functional components library is used by a context reasoning server and embedded within mobile software agents. The latter approach adds flexibility to the system, enabling to transfer context-awareness into virtual spaces, physically distributed in the pervasive environment. In conclusion, we summarise the following main contributions of this thesis:

A Conceptual model and reasoning algorithms (1) A theoretical context model, providing a unifying conceptual framework for context-aware computing systems and basis for developing reasoning approaches for such systems [PL04a, PL04b, PZ06b]. Using spatial insights, the model captures a fundamental nature of context and situation. Indicative of this are the extensions of the context model with different well-known reasoning and sensor data fusion algorithms [PZ06b]. The different approaches to perform reasoning (including ConSpaF) have been qualitatively and quantitatively compared and evaluated for achieving context awareness [PL05b, PL06, PZ06c]. The unifying characteristics of the model have been demonstrated with applications using a range of different context information [PB05, AP05, PL05b]. (2) The ConSpaF algorithm: an innovative heuristically-based sensor data fusion algorithm specifically developed for reasoning about context [PL05b, PZ06c]. The algorithms considers any combination of the following properties: (i) the relative importance of context attributes, (ii) the significance in context attributes being within particular ranges, (iii) uncertainties in sensed values, and (iv) the significance when the sensed values for all context attributes are within the scope of the situation. We have shown the benefits of using ConSpaF compared with other approaches for reasoning about context. We have also demonstrated the ability to refine the initial model and enhance the reasoning at run-time, using optimization approaches.

218


(3) Three novel verification techniques for resolution of conflicts and information discrepancies [PL04b, PL04c, PL05a]. The verification techniques provide general ways to reduce the reasoning uncertainty in context-aware computing systems, in the following areas: (i) Recognizing occurring situations when available information is different than expected, (ii) Resolving situation ambiguity and contradictions between inferred situations, and (iii) Resolving conflicts of sensory originated information. (4) An original reasoning approach for evaluating logical expressions about situations under uncertainty, inferring the validity of complex situation expressions. Our proposed approach provides a way to describe (in a fixed matrix structure) and reason (with a simple function) about complex circumstances in the environment under imperfect and uncertain information. By considering uncertainty of information, our approach enables comparison and resolution of mutually exclusive logical expressions. (5) A Context Spaces Algebra based on the Context Spaces model, providing spatially-based operations that manipulate and determine relationships between concepts of the model [PL05a, PZ06a, PL06]. Our approach handles information describing situations in different context and composes their representation into a single model. The proposed operations are useful in managing context and enhancing reasoning about context. The operations include the composition of different perspectives of entities over situations, or updating a situation representation according to available information.

Implementation of concepts and reasoning approaches (1) The ECORA framework for context-aware computing [PL06]. (2) The CORE context-oriented reasoning engine (as a subcomponent of the framework) [PL06]. (3) Design and implementation of an architectural approach to deploy context-aware mobile software agents in pervasive computing systems [PZ04a]. (4) Design, implementation and evaluation of a solution to the problem of contentbased publish-subscribe communication between mobile agents [PL03, PZ03, LP03, PZ04a]. Our proposed solution enables to perform publish-subscribe based messaging between mobile agents (possibly of different toolkits) and eliminates messages loss during mobile agent migration.

219


A conceptualization of proactive pervasive computing systems (1) Introducing the novel concepts of stability and instability of changes in context of pervasive computing systems, and a method for maintaining that stability [PZ04b, PZ05]. The proposed approach analyses the state (and changes of the state) of a pervasive system in a subset of dimensions (i.e. in a given context). Our approach provides a new perspective about pervasive systems’ stability and enables analysis and proactive management of the system state in selected dimensions. Our proposed concepts can be used to characterize when the system can be depended upon to survive changes in circumstances (i.e., likely to be able to maintain a situation) and when it cannot be depended upon, namely, when the system is very stable and when the system is less stable. (2) An algorithm for maintaining the stability of pervasive systems in the presence of changes in context that exhibit unpredictable time-varying behaviour [PZ05, AP05]. The proposed algorithm provides an approach to predict context changes when using long-term historical data is not suitable (or applicable). (3) Applying and evaluating the proposed Context Spaces Algebraic operations for composing and partitioning situation spaces and integrating these operations (including other reasoning) into mobile agents [PZ06a, PL06]. The integration of mobility and reasoning enhanced the reasoning outcomes and facilitated proactive and collaborative behaviour by agents in multi-agent pervasive computing systems.

9.2 Future Work We note that there are limitations to the modelling capabilities of Context Spaces in its current form, mostly in the absence from the model of certain properties. For example, modelling of temporal and historical data or modelling the quality of sensed information. These and other properties concerned with context and with reasoning about context could extend the basic model and form future work. Our main objective in this thesis was building a foundation for a general-purpose and insightful context representation combined with effective reasoning over such representation, rather than encompassing all possible context properties. A number of different research directions are identified on the basis of this work. The Context Spaces approach provides a foundation for further exploration of modelling and 220


reasoning directions about context. As previously noted, the model could be extended to cover additional important context properties, or, Context Spaces Algebra could be further developed to investigate relationships between context attributes and situation spaces, rather than only between situation spaces. We now describe some of the research directions that we perceive as promising extensions to this work. 1. We believe that Context Spaces, as a general and rich theory about context, models unifying characteristics of context. As such, the concepts of Context Spaces could be used to represent different existing context models and provide a common approach to merge these different models in a unifying way. This would have a significant impact on applications, models and approaches that deal with context-awareness. 2. This vision complements research in semantic interoperability between applications in the pervasive environment. The Context Spaces model could be represented with ontology languages. Thus, not only the semantics of information could be shared and understood between applications but also the representation and meaning of context. 3. The direction of further generalizing Context Spaces and developing additional reasoning capabilities also indicates the appeal of developing a query language and interface, based on Context Spaces. A future extension of this work can lead towards defining and implementing a language for querying context reasoning services, based on reasoning capabilities and Context Spaces algebra. 4. We have also demonstrated the benefits of our approach in representing changes in the context state trajectory. We have used this idea to optimise incident prioritization in the domain of management by business objectives. The idea of generating context state trajectories can be used in developing a general approach for maintaining a goal (situation space). This approach follows the idea of generating context-state trajectories from origin (current context-state), based on dependencies between context-attributes, and backtracking context-state trajectory from a future ideal state or centre of targeted situation space. By introducing new events (say effectors influencing context-attributes’ values) new dependencies can come into affect. Convergence of trajectories classifies an optimal evolution of the system towards reaching a goal and reveals a set of required actions that can affect context attributes values. 5. Another future research direction deals with learning and use of historical data. In this research we have only briefly touched upon the issue of learning, machine learning and data mining. Different approaches exist which could assist in learning the model 221


and optimise the functionality of reasoning. Combining a consistent strategy to represent and reason about context (Context Spaces) with analysis of historical data could enable adaptability based on prediction and additional general techniques for context verification. 6. Finally, we have suggested applying our approach with mobile agents, thereby, developing context-aware mobile software agents. We believe that the integration of mobility and context-awareness in pervasive computing systems is still at a very early stage. Context Spaces provides a meaningful and practical approach to represent and reason about context in a general way. The functionality of our model was implemented in light-weight software components and is ideal for integration with mobile agents. We have also demonstrated benefit of the Context spaces algebra when used by mobile agents in the pervasive environment. We see this integration as a starting point of future exploration of context-awareness in context-aware, mobile, multi-agent systems.

222


References [AJ04] Ajenstat J., Modelling Intelligent Agents for Stock Trading, Workshop on Advanced Modelling of the International Federation of Information Processing (IFIP), Hawaii, January, 2004. [AP94] Adamot A., Plaza E., Case-based reasoning: Foundational issues, methodological variations, and system approaches, AI Communications Vol. 7 pp. 39–59, 1994. [AP05] Ajenstat J., Padovitz A., Zaslavsky A., Loke S. W. Modelling and adapting to Context changes: The case of stock market decisions making, Workshop on Contextual Modelling and Decision Support, at Fifth International Conference on Modelling and Using Context, Paris, France, July 2005. [AS97] Akman V., Surav M. The use of situation theory in context modelling, Computational Intelligence: An International Journal, Vol. 13(3), pp. 427–438, 1997. [AS99] Aguilera M. K., Strom R. E., Sturman D. C., Astley M., Chandra T. D., Matching Events in a Content-Based Subscription Systems, In proc. of Eighteenth ACM Symposium on Principles of Distributed Computing (PODC '99), 1999. [BA63] Bayes Thomas, An essay towards solving a problem in the doctrine of chances, Philosophical Transactions of the Royal Society, Vol. 53, pp. 370-418, 1763. [BA03] Barkhuus, L., Context Information vs. Sensor Information: A Model for Categorizing Context in Context-Aware Mobile Computing, In proc. of International Symposium on Collaborative Technologies and Systems (CTS), Orlando, Florida, 2003. [BA04] Bardram J. E., Applications of Context-Aware Computing in Hospital Work – Examples and Design Principles, In Proc. of ACM Symposium on Applied Computing (ACM SAC), ACM Press, 2004. [BB05] Bartolini C., Boulmakoul A., Christodoulou A., Sallé M., Trastour D., Management by Business Objectives – a white paper (HP Labs), In Proc. of 12th HP OpenView University Association Workshop (HPOVU) , Porto, Portugal, July 2005. [BD04] Becker C., Dürr F., On Location Models for Ubiquitous Computing, Personal and Ubiquitous Computing, Springer-Verlag, Vol. 9 (1), pp. 20–31, 2005. [BE05] BEA MessageQ http://edocs.bea.com/tuxedo/msgq/

online

overview

and

documentation:

[BH01] Berners-Lee T., Hendler J., Lassila O., The Semantic Web, Scientific American, May, 2001.

223


[BH03] Baader F., Horrocks I., Sattler U., Description Logics as Ontology Languages for the Semantic Web, In D. Hutter and W. Stephan, editors, Festschrift, LNAI, Springer, 2003. [BH04] Burcea I., Hans-Arno J., de Lara E., Muthusamy V., Petrovic M., Disconnected Operation in Publish/Subscribe Middleware, IEEE Mobile Data Management (MDM), Berkeley, California, USA, January, 2004. [BM05] Information on Berkeley Motes available at: www.tinyos.net/, www.xbow.com/ [BN04] Becker C., Nicklas D., Where do spatial context-models end and where do ontologies start? A proposal of a combined approach, First International Workshop on Advanced Context Modelling, Reasoning And Management, UbiComp’04, September, 2004. [BP83] Barwise J., Perry J., Situations and Attitudes, MIT Press, 1983 (ISBN 1575861933). [BP04] Bagci F., Petold J., Trumler W. and Ungerer T., Ubiquitous Mobile Agent System in a P2P-Network, System Support for Ubiquitous Computing Workshop at the Sixth Annual Conference on Ubiquitous Computing (UbiComp’04), Nottingham, England, September, 2004. [BP98] Bieszczad A., Pagurek B., White T., Mobile Agents for Network Management, IEEE Communications Surveys, Vol. 1, (1), Fourth Quarter 1998. [BP99] Bellifemine, F., Poggi, A., Rimassa, G.: Jade - a Fipa-Compliant Agent Framework. Technical Report, Centro Studi e Laboratori Telecomunicazioni, also published in Proc. of PAAM’99, pp.97-108, London, April 1999. [BS93] Bellotti V., Sellen A., Design for Privacy in Ubiquitous Computing Environments, In Proc. of the Third European Conference on Computer Supported Cooperative Work (ECSCW'93), Kluwer Publications, 1993. [BS00] Baader F., Sattler U., An overview of tableau algorithms for description logics, Studia Logica, 2001. An abridged version appeared in Tableaux 2000, LNAI Vol.1847, 2000. [BS02] Bhola S., Strom R., Bagchi S., Zhao Y., Auerbach J., Robstrom F., Yuanyuan S., Exactly-once Delivery in a Content-based Publish-Subscribe System, In Proc. of the IEEE International Conference on Dependable Systems and Networks (DSN’02), June 2002. [BR97] Bradshaw J., Software Agents, Cambridge, MA: AAAI Press/MIT Press, 1997 (ISBN: 0262522349). [CC03] Caporuscio M., Carzaniga A., Wolf A. L., Design and evaluation of a support service for mobile and wireless publish/subscribe applications, Technical Report CU-CS944-03, Department of Computer Science and University of Colorado, January 2003.

224


[CD99] Calvanese D., De Giacomo G., Lenzerini M., Nardi D., Reasoning in expressive description logics, In A. Robinson and A. Voronkov, (eds), Handbook of Automated Reasoning, Elsevier Science Publishers (North-Holland), Amsterdam, 1999. [CD00] Cheverst, K., N. Davies, K. Mitchell and A. Friday, Sharing (Location) Context to Facilitate Collaboration Between City Visitors, In Proc. of IMC'00 Workshop on Interactive Applications of Mobile Computing, pp. 9-16, (ISBN 3935319754), November 2000. [CD01] Cugola G., Di Nitto E., Fuggetta A., The JEDI event-based infrastructure and its application to the development of the OPSS WFMS, IEEE Transactions on Software Engineering, Vol. 27(9), 2001. [CE01a] Capra, L., Emmerich, W., Mascolo, C., Reflective middleware solutions for context-aware applications, In Yonezawa, A., Matsuoka, S. (eds), In Proc. of Reflection 2001, pp. 126–133, Springer Verlag. [CE01b] Capra, L., Emmerich, W., Mascolo, C., middleware for mobile computing: Awareness vs. transparency, In Proc. of Eighth Workshop Hot Topics in Operating Systems, IEEE CS Press, Los Alamitos, California, pp. 164-169, 2001. [CF03a] Chen H., Finin T., Anupam J., 2003, An Intelligent Broker for Context-Aware Systems, In Proc. of Fifth International Conference on Ubiquitous Computing (Ubicomp’03), October 2003. [CF03b] Chen H., Finin T., Anupam J., An Ontology for Context-Aware Pervasive Computing Environments, Workshop on Ontologies and Distributed Systems, IJCAI’03, Acapulco, Mexico, August 2003. [CF03c] Chen H., Finin T. and Joshi A., Using OWL in a Pervasive Computing Broker, Workshop on Ontologies in Open Agent Systems (AAMAS 2003), Melbourne, Australia, 2003. [CF04] Chen, H., Finin, T., Joshi, A., A context broker for building smart meeting rooms, In Schlenoff C., Uschold M. (eds.), In Proc. of the Knowledge Representation and Ontology for Autonomous Systems Symposium, AAAI Spring Symposium, AAAI Press, Menlo Park, CA pp. 53–60, 2004. [CH04] Chen H., Finin T., Joshi A., Perich F., Chakraborty D., Kagal L., Intelligent Agents Meet the Semantic Web in Smart Spaces, IEEE Internet Computing, Vol. 8(6), November 2004. [CK00] Chen G., Kotz D. A survey of context-aware mobile computing research, Technical Report TR2000-381, available at: elans.cse.msu.edu/ni/restrict/ChenKotz2000.pdf. [CK02] Cardoso R. S., Kon F., Mobile Agents: A Key for Effective Pervasive Computing, Workshop on Pervasive Computing, ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA 2002), Seattle, November 2002.

225


[CM93] Carenini G., Moore J. D., Generating explanations in context, International Workshop on Intelligent User Interfaces (IUI’03), Orlando, Florida, January 1993 (Also in: ACM Press, ISBN: 0897915569 ). [CM00] Castro, P. Munz, R., Managing context data for smart spaces, IEEE Personal Communications, pp. 4-46 Vol. 7, Issue 5, Oct 2000. [CR00] Carzaniga, A., Rosenblum D.S., Wolf A.L., Achieving Scalability and Expressiveness in an Internet-Scale Event Notification Service, In Proc. of Nineteenth Symposium on Principles of Distributed Computing (PODC '00), Portland 2000. [CR03] Campbell R. H., Ranganathan A., A middleware for Context-Aware Agents in Ubiquitous Computing Environments, ACM/IFIP/USENIX International Middleware Conference, Rio de Janeiro, Brazil, June 2003. [CW02] Carzaniga A., Wolf A.L., A Benchmark Suite for Distributed Publish/Subscribe Systems, Technical Report CU-CS-927-02, Department of Computer Science, University of Colorado, April, 2002. Available at http://www.cs.colorado.edu/~carzanig/papers/cucs927-02.pdf [DA99] Dey A. K., Abowd G. D., Towards a better understanding of context and contextawareness, Technical report GIT-GVU-99-22, Georgia Institute of Technology, 1999, available at: ftp://ftp.cc.gatech.edu/pub/gvu/tr/1999/99-22.pdf [DC01] Davies N., Cheverst K., Mitchell K., Efrat A., Using and Determining Location in a Context-Sensitive Tour Guide, IEEE Computer: Special Issues on Location Aware Computing, Vol. 34(8), pp. 35-41, 2001. [DE03] Dearle A., Kirby G., Morrison R., McCarthy A., Mullen K., Yang Y., Connor R., Welen P., Wilson A., Architectural Support for Smart Spaces, Fourth International Conference on Mobile Data Management (MDM’03), LNCS 2574, Springer, pp. 153-164, Melbourne, Australia, 2003. [DE91] Devlin K., Logic and Information, Cambridge University Press, New York, NY, 1991 (ISBN: 0521410314). [DE00] Dey, A. K.: Providing Architectural Support for Building Context-Aware Applications, PhD Thesis, College of Computing, Georgia Institute of Technology, 2000. [DE01] Dey A. K., Understanding and Using Context, Personal and Ubiquitous Computing Journal, Vol. 5, No. 1, pp. 4-7, 2001. [DG97] Dingel J., Garlan D., Jha S., Notkin D, Towards a Formal Treatment of Implicit Invocation, In Proc. of the 1997 Formal Methods Europe Conference, 1997, Available at http://www-2.cs.cmu.edu/afs/cs/project/able/www/paper_abstracts/implicit-invocfme97.html

226


[DM00] Dey, A., Manko., J., Abowd, G., Distributed mediation of imperfectly sensed context in aware environments, Technical Report GIT-GVU-00-14, Georgia Institute of Technology, 2000. [DS01] Dey A. K., Salber D., Abowd G. D., A Conceptual Framework and a Toolkit for Supporting the Rapid Prototyping of Context-Aware Applications, Human-Computer Interaction, Vol. 16(2-4), pp. 97-166, 2001. [DO03] Dobson S., Applications Considered Harmful for Ambient Systems, Workshop on Adaptive Systems for Ubiquitous Computing In International Symposium on Information and Communication Technologies (ISICT’03), Dublin 2003. [EH01] Ebling M. R., Hunt G. D. H., Lei H., Issues for Context Services for Pervasive Computing, Advanced Topic Workshop Middleware for Mobile Computing, Heidelberg, Germany, November, 2001 [EP05] Information on Ekahau Positioning Engine available at: http://www.ekahau.com [EL00] The Elvin Subscription Language, DSTC: http://elvin.dstc.edu.au/doc/esl4.html [FA98] Fairman F. W., Linear Control Theory, The State Space Approach, John Wiley & Sons Ltd, West Sussex, England, 1998. [FB02] Fan W., Balakrishnan, V., Robust Kalman filters for linear time-varying systems with stochastic parametric uncertainties, IEEE Transaction on Signal Processing, Vol. 50, Issue 4, pp. 803-813, April 2002. [FH03] Fox D., Hightower J., Liao L., Schulz D., Borriello G., Bayesian filtering for location estimation, IEEE Pervasive Computing, 2003. [FM99] Farringdon J., Moore A.J., Tilbury N., Chruch J., Biemond P.D., Wearable Sensor Badge & Sensor Jacket for Context Awareness, In proc. of the third International Symposium on Wearable Computers (ISWC’99), San Francisco, CA, USA, 1999. [GF93] Giunchiglia F. Contextual reasoning, Epistemologica - Special Issue on I Linguaggi e le Machine 16 (1993), pp. 345–364. Also IRST-Technical Report 9211-20, IRST, Trento, Italy. [GG01] Ghidini C., Giunchiglia F, Local models semantics, or contextual reasoning = locality + compatibility, Artificial Intelligence Vol. 127(2), pp. 221–259, April, 2001. [GH94] Gamma E., Helm R., Johnson R., Vlissides J., Design Patterns, Elements of Reusable Object-Oriented Software, Addison-Wesley Professional Computing Series, 1994 (ISBN: 0201633612). [GL99] Golding A. Lesh R., N., Indoor navigation using a diverse set of cheap, wearable sensors, In Proc. of the third International Symposium on Wearable Computers (ISWC’99), pp. 29-36, San Francisco, CA, USA, October 1999.

227


[GM94] Goh C. H., Madnick S. E., Siegel M. D., Context interchange: Overcoming the challenges of large-scale interoperable database systems in a dynamic environment, In Proc. of the Third International Conference on Information and Knowledge Management, pp. 337-346, Gaithersburg, MD, USA, 1994. [GM04] Gallegos F., Manson D. P., Allen-Senft S., Gonzales C., Information Technology Control and Audit, Auerbach Publications, 2004 (ISBN: 0849320321). [GP04] Gu T., Pung H. K., Zhang D. Q. A Bayesian Approach for Dealing with Uncertain Contexts, In Proc. of the Second International Conference on Pervasive Computing (Pervasive 2004), also in the book: Advances in Pervasive Computing, the Austrian Computer Society, vol. 176, ISBN 3-85403-176-9. Vienna, Austria, April 2004. [GP05] Information on GPS, available at: http://www.gpsworld.com, http://www.colorado.edu/geography/gcraft/notes/gps/gps_f.html [GR76] Grossberg S. Adaptive pattern classification and universal recoding: Parallel development and coding of neural feature detectors, Biological Cybernetics, Vol. 23, pp. 121–134, 1976. [GR93] Gruber T. R., Towards Principles for the Design of Ontologies Used for Knowledge Sharing, In N. Guarino and R. Poli (eds), Formal Ontology in Conceptual Analysis and Knowledge Representation, Deventer, The Netherlands, 1993, Kluwer Academic Publishers. [GS01] Gray P., Salber, D. Modelling and Using Sensed Context Information in the design of Interactive Applications, In Proc. of eighth IFIP International Conference on Engineering for Human-Computer Interaction (EHCI 2001) (Toronto/Canada, May 2001), M. R. Little and L. Nigay (eds), LNCS 2254, Springer. [GS02] Gellersen H.W., Schmidt A., Beigl M., Multi-Sensor Context-Awareness in Mobile Devices and Smart Artifacts, in Mobile Networks and Applications (MONET), Oct 2002. [GS03] Glassey R., Stevenson G., Richmond M., Nixon P., Terzis S., Wang F. and Ferguson I., Towards a Middleware for Generalised Context Management, In First International Workshop for Middleware for Pervasive and Ad Hoc Computing, Middleware’03 Companion, pp. 45-52, Rio De Janeiro, Brazil, June 2003. [GU95] Guarino N., Formal ontology, conceptual analysis and knowledge representation, Int. Journal of Human-Computer Studies, Vol. 43(5/6): pp. 625-640, 1995. [GW04] Gu, T., Wang, X. H., Pung, H. K., Zhang, D. Q., Ontology Based Context Modelling and Reasoning using OWL, In Proc. of the Communication Networks and Distributed Systems Modelling and Simulation Conference (CNDS’04), San Diego, CA, USA, January 2004. [HA01] Halpin T. A., Information Modelling and Relational Databases: From Conceptual Analysis to Logical Design, Morgan Kaufman, San Francisco, 2001.

228


[HA02] van Harmelen F., et al., Owl Web Ontology Language Reference, Technical Report, 2002, available at: http://www.w3.org/TR/owl-ref/. [HB98] Held A., Buchholz S., Schill A., Modelling of context information for pervasive computing applications, In Proc. of SCI 2002/ISAS 2002, Symposium on Wearable Computers, pp. 92–99. [HC04] Harle R., Coulouris G., A Grand Challenge in Computer Science: The Sentient Building (Part I), Grand Challenges for Computing Research Conference, March 2004. [HF90] Halpern J., Fagin R., Megiddo N., A Logic for Reasoning about Probabilities, Information and Computation, vol. 87, no. 1–2, pp. 78–128, 1990. [HF03] Himberg J., Flanagan J. A., Mäntyjärvi J., Towards Context Awareness Using Symbol Clustering Map, In Proc. of Workshop for Self-Organizing Maps (WSOM’03), pp. 249-254, Kitakyushu, Japan, 2003. [HH99] Harter A., Hopper A., Steggles P., Ward A., Webster P., The Anatomy of a Context-Aware Application, In Mobile Computing and Networking, pp. 59-68, 1999. [HI02] Henricksen K., Indulska J., Rankotonirainy A., Modelling context information in pervasive computing systems, In Pervasive’02, pp. 167-180, Zurich, Switzerland, 2002. [HI04a] Henricksen K., Indulska J., A Software Engineering Framework for ContextAware Pervasive Computing, Second IEEE International Conference on Pervasive Computing and Communication (PerCom'04), Orlando, Florida, March 2004. [HI04b] Henricksen K., Indulska J., Modelling and Using Imperfect Context Information, workshop on Context Modelling and Reasoning (CoMoRea), at Second IEEE International Conference on Pervasive Computing and Communication (PerCom'04), Orlando, Florida, March 2004. [HK01] Himberg J., Korpiaho K., Mannila H., Tikanmäki J., Toivonen H.T.T., Time series segmentation for context recognition in mobile devices, In Proc. of the 2001 IEEE International Conference on Data Mining (ICDM 2001), pp. 203-210, San José, California, USA, 2001. [HL01] Hong J. I., Landay J. A., An Infrastructure Approach to Context-Aware Computing, In Human Computer Interaction Vol. 16, 2001. [HL04] Henricksen, K., Livingstone, S., Indulska, J., Towards a hybrid approach to context modelling, reasoning, and interoperation, First International Workshop on Advanced Context Modelling, Reasoning And Management, UbiComp'04, September, 2004. [HS99] Horrocks I., Sattler U., Tobies S., Practical reasoning for expressive description logics, In H. Ganzinger, D. McAllester, and A. Voronkov (eds), In Proc. of the Sixth International Conference on Logic for Programming and Automated Reasoning (LPAR’99), no. 1705 in LNAI, pp. 161–180. Springer-Verlag, 1999.

229


[HU99] Huber M., Jam: A bdi-theoretic mobile agent architecture, In Proc. of the Third International Conference on Autonomous Agents (Agents’99), pp. 236–243, Seattle, WA, 1999. [IB05] IBM MQSeries online overview 3.ibm.com/software/integration/mqfamily/

and

documentation:

http://www-

[IW95] Iwanska L., Summary of the IJCAI-95 Workshop on Context in Natural Language Processing, 1995, available at: http://www.cs.wayne.edu/context. [JR02] Julien C., Roman G. C., Egocentric context-aware programming in ad hoc mobile environments, In Proc. of the Tenth International Symposium on the Foundation of Software Engineering, pp. 21-30, 2002. [JR04] Julien C., Roman G. C., Active Coordination in Ad Hoc Networks, In Proc. of the Sixth International Conference on Coordination Models and Languages, pp. 199-215, Pisa Italy, February 2004. [JS03] Judd G., Steenkiste P., Providing contextual information to pervasive computing applications, In Proc. of First IEEE Conference on Pervasive Computing and Communications (PerCom’03), pp. 133-142, FortWorth, March 2003. [KC03] Koks D., Challa S., An Introduction to Bayesian and Dempster-Shafer Data Fusion, Technical report DSTO-TR-1436, DSTO Systems Sciences Laboratory, Australia, August 2003, available at: http://www.dsto.defence.gov.au/publications/2563/DSTO-TR1436.pdf [KG02] Kotz D., Gray R. S., Rus D., Mobile Agents: Future Directions for Mobile Agent Research. IEEE Distributed Systems Online, Vol. 3(8), 2002. [KI00] Kindberg, T., et al.: People, places, things: Web presence for the real world, Technical Report HPL-2000-16, Hewlett-Packard Labs, 2000. [KK05] Khedr M., Karmouch A., ACAI: Agent-Based Context-aware Infrastructure for Spontaneous Applications, Journal of Network & Computer Applications, Vol. 28(1), pp. 19-44, 2005. [KL99] Klein L. A., .Sensor and Data Fusion Concepts and Applications, (second edition), SPIE Optical Engineering Press, 1999, ISBN 0-8194-3231-8. [KM05a] Kofod-Petersen A., Mikalsen M., An Architecture Supporting Implementation of Context-Aware Services, Workshop on Context Awareness for Proactive Systems (CAPS’05), Helsinki, Finland, 2005. [KM05b] Kofod-Petersen A., Mikalsen M., Context: Representation and Reasoning, Special issue of the Revue d'Intelligence Artificielle on Applying Context-Management, 2005.

230


[KR01] Klyne G., Reynolds F., Woodrow C., Ohto H., Composite Capability/Preference Profiles (CC/PP): Structure and Vocabularies, W3C Working Draft, Mar 15, 2001. (URL: http://www.w3.org/TR/2001/WD-CCPP-struct-vocab-20010315/) [KS96] Kashyap V., Sheth A., Semantic and Schematic Similarities between Database Objects: A Context-based Approach, VLDB Journal, Vol. 5(4), 1996. [KN96] Kaplan R. S., Norton D. P., The Balanced Scorecard, Harvard Business School Print, 1996. [KZ02] Klusch M., Zambonelli F. (eds): Cooperative Information Agents – Best Papers of CIA’01, International Journal of Cooperative Information Systems, , Vol. 11, No. 3 and 4, 2002. [LA01a] van Laerhoven K, Aidoo K, Lowette S, Real-time analysis of Data from Many Sensors with Neural Networks, In Proc. of Fifth International Symposium on Wearable Computers, (ISWC’01), Zurich, Switzerland, 2001. [LA01b] van Laerhoven K., Combining the Self-Organizing Map and k-means clustering for on-line classification of sensor data, In Proc. of Artificial Neural Networks (ICANN ‘01), Vienna, 2001. [LF99a] Labrou Y., Finin T., Peng Y., Agent Communication Languages: The Current Landscape, Intelligent Systems, Vol. 14, No. 2, March/April 1999, IEEE Computer Society. [LF99b] Labrou Y., Finin T., Peng Y., The interoperability problem: Bringing together mobile agents and agent communication languages, In Ralph Sprague, J., (ed), Proc. of the 32nd Hawaii International Conference on System Sciences, Maui, Hawaii: IEEE Computer Society, 1999. [LO99] Lange D. B., Oshima M., Seven Good Reasons for Mobile Agents, Communications of the ACM, March, 1999. [LO01] Loke S.W., An Overview of Mobile Agent Technology for Distributed Applications: Possibilities for Future Enterprise Systems, Informatica: An International Journal of Computing and Informatics, Vol. 25(2) pp. 247-260, July 2001. [LO05] Loke S.W., Representing and Reasoning with Situations for Context-Aware Pervasive Computing: a Logic Programming Perspective, The Knowledge Engineering Review, 2005. [LP02] Liu Y., Plale B., Survey of Publish Subscribe Event Systems, Technical Report TR574, Computer Science Department, Indiana University, available at: http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR574 [LP03] Loke, S.W., Padovitz, A. and Zaslavsky, A. Context-Based Addressing: the Concept and an Implementation for Large-Scale Mobile Agent Systems Using PublishSubscribe Event Notification, Forth IFIP International Cconference on Distributed Applications and Interoperable Systems, DAIS 2003, Paris, France, pp. 274 - 284, Springer-Verlag, LNCS 2893. (ISBN 3-540-20529-2)

231


[LR00] Loke S.W., Rakotonirainy A., Zaslavsky A., Enabling Awareness in Dynamic Mobile Agent Environments, In Proc. of the Fifteenth Symposium on Applied Computing (SAC’00), Como, Italy, March 2000, ACM Press. [LS99] Lassila O., Swick R., Resource Description Framework (RDF) Model and Syntax Specification, W3C Recommendation, Feb 22, 1999, (URL: http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/) [LS02] Lei H., Sow D. M., Davis J. S., Banavar G., Ebling M. R., The design and applications of a context service, ACM SIGMOBILE Mobile Computing and Communications Review, Vol. 6(4), pp. 45 -55, October 2002. [LU93] Luzeaux D., Let’s learn to control a system, in IEEE International Conference on Systems Man Cybernetics, Le Touquet, France, 1993. [MA00] Mankoff J., Abowd G. D., Hudson S. E., OOPS: A Toolkit Supporting Mediation Techniques for Resolving Ambiguity in Recognition-Based Interfaces Computers and Graphics (Elsevier), Special Issue on Calligraphic Interfaces, 2000. [MA05a] Mayrhofer R., Context Prediction based on Context Histories: Expected Benefits, Issues and Current State-of-the-Art, In Proc. of First International Workshop on Exploiting Context Histories in Smart Environments, Pervasive 2005, Munich, Germany, May 2005. [MA05b] The Mobile Agent List: http://mole.informatik.unistuttgart.de/mal/preview/preview.html, http://draco.cis.uoguelph.ca/link.html [MB97] McCarthy, J., Buva C., Formalizing context (expanded notes), In Working Papers of the AAAI Fall Symposium on Context in Knowledge Representation and Natural Language, S. Buva C and Ł. Iwa´nska (eds), American Association for Artificial Intelligence, American Association for Artificial Intelligence, pp. 99–135, Menlo Park, California, 1997. [MC88] Mulgrew B., Cowan C. F. N., Adaptive Filters and Equalizers, Kluwer Academic Publishers, 1988. [MC93] McCarthy J., Notes on formalizing contexts, In Proc. of the Thirteenth International Joint Conference on Artificial Intelligence, R. Bajcsy (eds), Morgan Kaufmann, pp. 555–560, San Mateo, California. [MH92] Maskery H., Hopkins G., Dudley T., Context: What does it mean to application design. SIGCHI Bulletin, Vol. 24, No. 2, pp. 22-30, 1992. [MH00] Mankoff J., Hudson S. E., Abowd G. D., Interaction techniques for ambiguity resolution in recognition-based interfaces ,UIST '00, pp. 11-20, also in Technical Report GIT-GVU-00-13, available at: http://smartech.gatech.edu:8282/dspace/handle/1853/49 [MI96] Mitchell M., An Introduction to Genetic Algorithms, The MIT Press, Cambridge, Massachusetts, Sixth printing, 1996, ISBN:0-262-13316-4.

232


[MM92] Maskery H., Meads J., Context: In the eyes of users and in computer systems, SIGCHI Bulletin, Vol. 24, No. 2, pp. 12-21, 1992. [MO95] Moore J. D., Participating in Explanatory Dialogues. Interpreting and Responding to Questions in Context, A Bradford Book, The MIT Press, Cambridge, MA, USA, Series Natural Language Processing, 1995. [MO98] Mozer M. C., The neural network house: An environment that adapts to its inhabitants, In Proc. of the AAAI 1998 Spring Symposium on Intelligent Environments, pp. 110–114, AAAI Press, 1998. [MP95] Mittal V.O., Paris C.L., Use of context in explanations systems, International Journal of Expert Systems with Applications, Vol. 8, No. 4, pp. 491-504, 1995. [MR03] Mayrhofer R., Radi H., Ferscha A., Recognizing and predicting context by learning from user behavior, In W. Schreiner G. Kotsis, A. Ferscha and K. Ibrahim (eds), The International Conference On Advances in Mobile Multimedia (MoMM2003), vol. 171, pp. 25–35, Austrian Computer Society (OCG), September 2003. [MR04] Mayrhofer R., Radi H., Ferscha A., Recognizing and Predicting Context by Learning from User Behavior ITB Press, Radiomatics: Journal of Communication Engineering (invited article), Ed. 1, Vol. 1, ISBN: 1693-5152, pp. 30-42, May 2004. [MU98] [M298] Murphy K. Switching Kalman Filters, Technical report, U. C. Berkeley, 1998. [NB02] Nardi D., Brachman R. J., An Introduction to Description Logics, In the Description Logic Handbook, F. Baader, D. Calvanese, D.L. McGuinness, D. Nardi, P.F. Patel-Schneider (eds), Cambridge University Press, pp. 5-44, 2002. [NM04] Nicklas D., Mitschang B., On building location aware applications using an open platform based on the NEXUS Augmented World Model, In Software and Systems Modelling, Vol. 3(4), pp. 303-313, 2004. [OG67] Ogata K., 1967, State Space Analysis of Control Systems, Prentice-Hall, Englewood Cliffs, N. J. [ON94] Ouksel A., Naiman C., Coordinating context building in heterogeneous information systems, Journal of Intelligent Information Systems Vol. 3(1), pp. 151–183, 1994. [ON04] Oriana R., Nadeem T., Borcea C., Iftode L., Mobile Services: Context-Aware Service Migration in Ad Hoc Networks, 2004, available at: www.cs.rutgers.edu/~iftode/mobservice.pdf [OR05] [O05] Oracle Message Broker http://www.oracle.com/technology/documentation/index.html

1.0

Datasheet,

[PA98] Pascoe J., Adding Generic Contextual Capabilities to Wearable Computers, In Second International Symposium on Wearable Computers (ISWC’98), pp. 92–99, 1998.

233


[PA01] Parsons S., 2001, Qualitative Methods for Reasoning under Uncertainty, The MIT Press, Cambridge, Massachusetts, London, England. [PA05] Padovitz A., MBO and Commercial Extensions of Context Spaces, Presentation and Demo at joint Monash – Hewlett-Packard Workshop on Context and Pervasive Computing, September 2005. [PB04] Petzold J., Bagci F., Trumler W., Ungerer T., Vintan L., Global State Context Prediction Techniques Applied to a Smart Office Building, In Proc. of the Communication Networks and Distributed Systems Modelling and Simulation Conference, San Diego, CA, USA, January 2004 [PB05] Padovitz A., Bartolini C., Zaslavsky A., Loke S. W., Extending Context Spaces Approach to Management by Business Objectives, at 12th HP OpenView University Association Workshop (HPOVU) , Porto, Portugal, July 2005. [PL03] Padovitz, A., Loke, S.W., Zaslavsky, A., Using Publish-Subscribe Event Based Systems for Mobile Agents Communication, Conference on MultiAgent System Technologies (MATES), Erfurt, Germany, (eds.) M. Schillo, M. Klusch, J. Muller, and H. Tianfield, September, 2003, pp 180 - 191, Springer-Verlag, Lecture Notes in Artificial Intelligence (LNAI) 2831 (ISBN 3-540-20124-6). [PL04a] Padovitz A., Loke S. W., Zaslavsky A., Towards a Theory of Context Spaces, Workshop on Context Modelling and Reasoning (CoMoRea), at 2nd IEEE International Conference on Pervasive Computing and Communication ( PerCom ) , Orlando, Florida, March 2004, IEEE Computer Society, USA, , pp 38 - 42 (ISBN: 0769521061). [PL04b] Padovitz A., Loke S. W., Zaslavsky A., Burg B., Towards a General Approach for Reasoning about Context, Situations and Uncertainty in Ubiquitous Sensing: Putting Geometrical Intuitions to Work, 2nd International Symposium on Ubiquitous Computing Systems ( UCS ) , Tokyo , Japan , 2004. [PL04c] Padovitz A., Loke S. W., Zaslavsky A., On Uncertainty in Context-Aware Computing: Appealing to High-Level and Same-Level Context for Low-Level Context Verification, in S. K. Mostefaoui et al. (eds.) International Workshop on Ubiquitous Computing, 6th International Conference on Enterprise Information Systems (ICEIS) , 2004, INSTICC Press, Portugal, pp. 62 - 72 ( ISBN: 9728865066). [PL05a] Padovitz A., Loke S. W., Zaslavsky A., Burg B., Verification of Uncertain Context Based on a Theory of Context Spaces, International Journal of Pervasive Computing and Communications (JPCC), Troubador Publishing, to appear 2006. [PL05b] Padovitz A., Loke S. W., Zaslavsky A., Burg B. and Bartolini C., An approach to Data Fusion for Context-Awareness, in A. Dey, B. Kokinov, D. Leake, R. Turner (eds.) Fifth International Conference on Modelling and Using Context (CONTEXT) , Paris, France, Springer-Verlag, Lecture Notes in Artificial Intelligence (LNAI) 3554, pp. 353 – 367, July 2005.

234


[PL06] Padovitz A., Loke S. W., Zaslavsky A., Multiple Agent Perspectives in Reasoning about Situations for Context-Aware Pervasive Computing Systems, submitted to IEEE Transactions on System, Man and Cybernetics (SMC), (under review). [PP05a] Page J., Padovitz A. , and Gaber M. M., Mobility in Agents, a Stumbling or a Building Block?, Second International Conference on Intelligent Computing and Information Systems (ICICIS'05), Cairo, Egypt, March 2005. [PP05b] Petzold J., Pietzowski A., Bagci F., Trumler W., Ungerer T., Prediction of Indoor Movements Using Bayesian Networks, First International Workshop on Location- and Context-Awareness (LoCA’05), Oberpfaffenhofen, Germany, May 2005. [PR99] Pascoe J., Ryan N.S., Morse D.R., Issues in developing context-aware computing, In H-W.Gellersen (eds), Handheld and Ubiquitous Computing, Vol. 1707 in LNCS, pp. 208-221, Heidelberg, Germany, September 1999, Springer-Verlag. [PZ03] Padovitz A., Zaslavsky, A., Loke, S.W., Awareness and Agility for Autonomic Distributed Systems: Platform-Independent Publish-Subscribe Event-Based Communication with Mobile Agents, in M. T. Ibrahim, J. A. McCann, T. Eymann, and K. Iwano (eds.) International Workshop on Autonomic Computing Systems, at 14th International Conference on Database and Expert Systems Applications (DEXA), Prague, Czech Republic, September, 2003, pp. 669 - 673, IEEE Computer Society. [PZ04a] Padovitz A., Zaslavsky A., Loke S. W., Tosic M., Agent Communication Using Publish-Subscribe Genre: Architecture, Mobility, Scalability and Applications, In the Journal: Annals of Mathematics, Computing and Tele-informatics (AMCT) , Vol. 1, No 2, pp. 35-50, ISSN: 1109-9305, 2004. [PZ04b] Padovitz A., Zaslavsky A., Loke S. W., Burg B., Stability in Context-Aware Pervasive Systems: A State-Space Modelling Approach, in S. K. Mostefaoui et al. (eds.) 1st International Workshop on Ubiquitous Computing, at 6th International Conference on Enterprise Information Systems (ICEIS) , 2004, Porto, Portugal. 13 - 14 April 2004 , INSTICC Press , Portugal , pp. 129 - 138 (ISBN: 9728865066). [PZ05] Padovitz A., Zaslavsky A., Loke S. W., Burg B., Maintaining Continuous Dependability in Sensor-Based Context Aware Pervasive Computing Systems, Hawaii International Conference on System Sciences (HICSS -38) , Big Island, Hawaii, January 2005. [PZ06a] Padovitz A., Zaslavsky A., Loke S. W., Merging Context Perspectives: An Approach to Adaptive Agent Reasoning in Pervasive Computing Systems, WiP Session at 4th IEEE International Conference on Pervasive Computing and Communication (PerCom), Pisa, Italy, March 2006. [PZ06b] Padovitz A., Zaslavsky A., Loke S. W., A Unifying Model for Representing and Reasoning About Context under Uncertainty, 11th International Conference on Information Processing and Management of Uncertainty in Knowledge-Based Systems (IPMU), July 2006, Paris, France.

235


[PZ06c] Padovitz A., Zaslavsky A., Loke S. W., Recognizing and Describing Situations in Sensor-Based Context-Aware Applications, submitted to ACM Transactions on Information Systems (TOIS), (under review). [RA99] Ryan N., ConteXtML: Exchanging Contextual Information between a Mobile Client and the FieldNote Server, August 1999, Information available at: http://www.cs.kent.ac.uk/projects/mobicomp/fnc/ConteXtML.html. [RA04] Ranganathan A., Al-Muhtadi J., Campbell R. H., Reasoning about Uncertain Contexts in Pervasive Computing Environments, In IEEE Pervasive Computing, Vol.3, No. 2, pp. 62-70, April-June 2004. [RC98] Rodden T., Cheverst K., Davies N., Dix A.,Exploiting Context in HCI Design for Mobile Systems, In Workshop on Human Computer Interaction with Mobile Devices, Glasgow, May 1998. [RC03] Ranganathan A., Campbell R. H., A Middleware for Context-Aware Agents in Ubiquitous Computing Environments., In ACM/IFIP/USENIX International Middleware Conference, pp. 16-20, Rio de Janeiro, Brazil, June, 2003 [RG91] Rao A., Georgeff M., Modelling rational agents within a bdi-architecture, In Principles of Knowledge Representation and Reasoning: Proc. of the Second International Conference (KR’91), pp. 473–484, 1991. [RG95] Rao A., Georgeff M., Bdi agents: From theory to practice, In Proc. of the First International Conference on Multi-Agent Systems (ICMAS’95), San Francisco, USA,1995. [RM04] Ranganathan A., McGrath R. E., Campbell R. H., Mickunas M. D., Use of Ontologies in a Pervasive Computing Environment, In The Knowledge Engineering Review, Vol. 18(3), pp. 209-220, Cambridge University Press, 2004. [RO02] Román M. et al., Gaia: A Middleware Infrastructure to Enable Active Spaces, In IEEE Pervasive Computing, pp. 74-83, Oct-Dec 2002. [RS00] Rungsarityotin W., Starner T. H., Finding location using omnidirectional video on a wearable computing platform, In proc. of Fourth International Symposium on Wearable Computers, IEEE Press, pp. 61-68, 2000. [SA94] Schilit B.N., Adams N.I., Want R., Context-Aware Computing Applications, In Proc. of the Workshop on Mobile Computing Systems and Applications, pp. 85-90, IEEE Computer Society, December 1994. [SA00a] Satyanarayanan, M. Caching Trust Rather Than Content, Operating System Review Vol. 34(4), October, 2000. [SA00b] Segall, B., Arnold, D., Boot, J., Henderson, M., Phelps, T., Content Based Routing with Elvin4, In Proc. AUUG2K, Canberra, Australia, June 2000, available at: http://elvin.dstc.edu.au/doc/papers/auug2k/auug2k.pdf

236


[SA01a] Satyanarayanan M., Pervasive Computing: Vision and Challenges, IEEE PCM, pp. 10-17, August 2001. [SA01b] Satyanarayanan M., Coping with Uncertainty, IEEE CS Pervasive computing Journal, August 2001. [SB99] Schmidt A., Beigl M., Gellersen H.W., There is more to context than location, Computers & Graphics Journal, Elsevier, Vol. 23, No.6, pp 893-902, 1999. [SB04] Shafer S., Brumitt B., Meyers B., The EasyLiving Intelligent Environment System, available at: research.microsoft.com/easyliving/Documents/2000 04 Steve Shafer CHI.doc [SH76] Shafer G., 1976, A Mathematical Theory of Evidence, Princeton University Press, Princeton, NJ. [SC96] Shulin Y., Chang K. C., .Modular Neural Net Architecture for Automatic Target Recognition., In Proc. of Signal Processing, Sensor Fusion, and Target Recognition Vol., 8-10, pp. 166-177, April 1996, Orlando, Florida, [SC01] Schafer R., 2001, Rules for Using Multi-Attribute Utility Theory for Estimating a User’s Interests, workshop on Adaptivity and User Modelling in Interactive Systems (ABIS), University of Dortmund, Germany. [SE01] Stillman S. Essa I., Toward Reliable Mulitmodal Sensing in Aware Environments., Perceptual User Interfaces (PUI’01) Workshop (held in conjunction with ACM UIST 2001 Conference), Orlando, Florida, November 2001. [SK92] Sheth A., Kashyap V. So far (schematically), yet so near (semantically), In Proc. of the IFIP Conference on Semantics of Interoperable Database Systems, IFIP Transactions A-25, North Holland, November 1992. [SK93] Specification of the KQML Agent Communication Language, Technical Report, DARPA Knowledge Sharing Initiative, External Interfaces Working Group, 1993. [SL01] Schmidt A., van Laerhoven K., How to build smart appliances, IEEE Personal Communications, Special Issue on Pervasive Computing, Vol. 8(4), pp. 66-71, August 2001. [SL03] Strang T., Linnhoff-Popien C., Frank K., CoOL: A Context Ontology Language to enable Contextual Interoperability, In Proc. of 4th IFIP WG 6.1 International Conference on Distributed Applications and Interoperable Systems (DAIS2003) (Paris/France, November 2003), J.-B. Stefani, I. Dameure, and D. Hagimont (eds), LNCS 2893, Springer Verlag, pp. 236–247. [SL04] Strang T., Linnhoff-Popien C., A Context Modelling Survey, Workshop on Advanced Context Modelling, Reasoning and Management, In Ubicomp’04 Nottingham, England, 2004.

237


[SM98] Smith M.T., SmartCards: Integrating for Portable Complexity, IEEE Computer, pp. 110-112, 1998. [SN03] Stevenson G., Nixon P. A., Ferguson R. I., A General Purpose Programming Framework for Ubiquitous Computing Environments, System Support for Ubiquitous Computing Workshop, UbiComp’03, Seattle, Washington, 2003. [SS92] Sciore E., Siegel M., Rosenthal A., Context interchange using meta-attributes, In Proc. of the First International Conference on Information and Knowledge Management, pp. 377-386, 1992. [SS98] Starner T., Schiele B., Pentland A, Visual Contextual Awareness in Wearable Computing, In Proc. of the Second International Symposium on Wearable Computers, IEEE, Press, pp. 50-58, 1998. [SS01] Segall, B., Sutton P., Arkins R., Supporting Disconnectedness – Transparent Information Delivery for Mobile and Invisible Computing, Available at: http://elvin.dstc.edu.au/doc/papers/invicom01/invicom01.pdf [ST93a] Schilit B., Theimer M., Welch B., Customising Mobile Applications, In USENIX Symposium on Mobile and Location-Independent Computing, 1993. [ST93b] Spreitzer M., Theimer M., Providing location information in a ubiquitous computing environment (panel session), In Proc. of the Fourteenth ACM symposium on Operating systems principles, pp. 270 – 283, Asheville, North Carolina, United States, 1993. [SU99] Sun Microsystems, Java Message Service, November 1999. [SU05] Sun Java System Message Queue: http://docs.sun.com/db/prod/s1.s1msgqu [VG04] Vintan L., Gellert A., Ungerer T., Petzold J. – Person Movement Prediction Using Neural Networks, KI 2004 Workshop on Modelling and Retrieval of Context, University of Ulm, Germany, ISSN 1613-0073, September 2004. [VH01] Volker Haarslev R. M., Description of the racer system and its applications, In Proc. of International Workshop on Description Logics (DL’01), Stanford, USA, August 2001. [WA01] WAG UAProf, Proposed Version 30-May-2001, Wireless Application Protocol Forum Ltd., available at: http://www1.wapforum.org/tech/documents/SPEC-UAProf19991110.pdf) [WB04] Welch G., Bishop G., an Introduction to Kalman Filters, Technical Report TR 95-041, 2004, available at: www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf [WE91] Weiser, M. The Computer for the 21st Century. Scientific American, September, 1991.

238


[WE92] Walther E., Eriksson H., Musen M. A., Plug-and play: Construction of taskspecific expert-system shells using sharable context ontologies, Technical Report, http://www.stanford.edu, 1992 [WE86] Winterfeld D.AND Edwards W., 1986, Decision Analysis and Behavioural Research, Cambridge University Press, Cambridge, England. [WH03] Wu H., Sensor Data Fusion for Context-Aware Computing Using DempsterShafer Theory, PhD. Thesis CMU-RI-TR-03-52, The Robotics Institute Carnegie Mellon University, Pittsburgh, Pennsylvania 15213, December 2003. [WJ99] Wooldridge M., Jennings N. R., Software engineering with agents: pitfalls and pratfalls, IEEE Internet Computing, May/June 1999. [WS02a] Wu H., Siegel M., Ablay S., Sensor Fusion for Context Understanding, IEEE Instrumentation and Measurement, Technology Conference, Anchorage USA, May 2002. [WS02b] Wu H., Siegel M., Stiefelhagen R., Yang J., Sensor Fusion Using DempsterShafer Theory, In Proc. of IMTC'02, Anchorage, AK, USA, 2002. [WS03] Wu H., Siegel M., Ablay S., Sensor Fusion Using Dempster-Shafer Theory II: Static Weighting and Kalman Filter-like Dynamic Weighting, Instrumentation and Measurement Technology Conference (IMTC’03), Vail, CO, USA, 2003. [WZ04] Wang, X. H., Zhang, D. Q., Gu, T., Pung, H. K. Ontology Based Context Modelling and Reasoning using OWL, In Workshop Proceedings of the Second IEEE Conference on Pervasive Computing and Communications (PerCom’04), pp. 18–22, Orlando, FL, USA, March 2004. [YK02] Yau S. S., Karim F., Wang Y., Wang B., Gupta S. K. S., Reconfigurable Context-Sensitive Middleware for Pervasive Computing, IEEE Pervasive Computing, Vol. 1(3), pp. 33-40, 2002. [YO00] Yoshimi B., On Sensor Frameworks for Pervasive Systems, Workshop on Software Engineering for Wearable and Pervasive Computing (SEWPC) at ICSE, Limerick, Ireland, 2000. [ZA73] Zadeh, L., Outline of a New Approach to the Analysis of Complex Systems, IEEE Transactions on System, Man and Cybernetics Vol. 3, 1973. [ZA05] Zaslavsky A., Ajenstat J., Padovitz A., Pervasiveness and Instability Issues in Context Aware Systems Applied to Stock Market Portfolio Optimization, Optimization Days 2005, Annual Conference, Financial Modelling Session, Canada, Montreal, May 2005.

239


Appendices and exhibits 1. Boolean properties of logical evaluation (Chapter 4) Proofs that logical evaluation scheme satisfies the following known properties of Boolean algebra: Law

Communicative

Boolean Algebra

Context Spaces Algebra

A∧ B = B∧ A

µ (s 1 ) AND µ (s 2 ) = µ (s 2 ) AND µ (s 1 )

A∨ B = B ∨ A

µ (s1 ) OR µ (s 2 ) = µ (s 2 )OR µ (s 1 )

Proof:

µ(s1 ) ANDµ(s 2 ) = min(µ(S1 ) − ε1 , µ(S2 ) − ε 2 ) ; µ(s 2 ) ANDµ(s1 ) = min(µ (S1 ) − ε 1 , µ (S 2 ) − ε 2 ) µ(s1 )ORµ(s 2 ) = max(µ(S1 ) − ε1 , µ(S2 ) − ε 2 ) ; µ ( s 2 ) OR µ (s 1 ) = max(µ(S1 ) − ε1 , µ(S2 ) − ε 2 ) .

Law

Boolean Algebra

Context Spaces Algebra

((µ(s1 )ANDµ(s 2 ))ANDµ(s 3 ) =

Associative

( A ∧ B) ∧ C = A ∧ ( B ∧ C )

µ(s1 )AND(µ(s 2 )ANDµ(s 3 ))

( A ∨ B) ∨ C = A ∨ ( B ∨ C )

( µ ( s 1 ) OR µ ( s 2 )) OR µ ( s 3 ) = µ ( s 1 ) OR ( µ ( s 2 ) OR µ ( s 3 ))

Proof:

(µ (S1 ) AND µ (S 2 1 ) )AND µ (S 3 ) = min(min(µ(S1) − ε1, µ(S2 ) − ε 2 ), µ(S3 ) − ε3 ) = min(µ(S1 ) − ε1 , µ(S2 ) − ε 2 , µ(S3 ) − ε 3 ) µ (S1 ) AND (µ (S 2 ) AND µ (S 3 ) ) = min(min(µ(S2 ) − ε 2 , µ(S3 ) − ε 3 ), µ(S1 ) − ε1 ) =

min(µ(S1 ) − ε1 , µ(S2 ) − ε 2 , µ(S3 ) − ε 3 ) □

(µ (S1 ) OR µ (S 2 ) )OR µ (S 3 ) = max(max(µ(S1 ) − ε1, µ(S2 ) − ε 2 ), µ(S3 ) − ε3 ) = max(µ(S1 ) − ε1 , µ(S2 ) −ε 2 , µ(S3 ) −ε 3 ) µ (S1 )OR (µ (S 2 )OR µ (S 3 ) ) = max(max(µ(S2 ) − ε 2 , µ(S3 ) − ε3 ), µ(S1 ) − ε1 ) =

max(µ(S1 ) − ε1, µ(S2 ) − ε 2 , µ(S3 ) − ε 3 ) □

240


Law

Boolean Algebra

Context Algebra

µ (S 1 ) AND (µ (S 2 ) OR µ (S 3 )) =

Distributive

A ∧ ( B ∨ C ) = ( A ∧ B) ∨ ( A ∧ C )

(µ (S 1 ) AND µ (S 2 )) OR (µ (S 1 ) AND µ (S 3 ))

A ∨ ( B ∧ C ) = ( A ∨ B) ∧ ( A ∨ C )

µ (S 1 ) OR ( µ (S 2 ) AND µ (S 3 )) =

( µ (S 1 ) OR µ (S 2 )) AND (µ (S 1 ) OR µ (S 3 ))

Proof: (I) γ (( µ ( S 1 ) AND µ ( S 2 )) OR ( µ ( S 1 ) AND µ ( S 3 )) OR ... OR ( µ ( S 1 ) AND µ ( S n )) ) = max(min(µ (S1 ) − ε 1 , µ (S 2 ) − ε 2 ), min(µ (S1 ) − ε 1 , µ (S 3 ) − ε 3 ),..., min(µ (S1 ) − ε 1 , µ (S n ) − ε n )) > 0

(II) γ (µ ( S 1 ) AND ( µ ( S 2 ) OR µ ( S 3 ) OR ... OR µ ( S n )) ) = min (µ ( S1 ) − ε 1 , max(µ ( S 2 ) − ε 2 , µ ( S 3 ) − ε 3 ,..., µ ( S n ) − ε n )) > 0 Suppose (II) is TRUE, which means that: min(max(µ (S 2 ) − ε 2 , µ (S 3 ) − ε 3 ), µ (S1 ) − ε 1 ) > 0 . Case 1: Assume that µ ( S i ) − ε i (2 ≤ i ≤ n ) is an expression with maximum value in (II). Then, (II) evaluates to µ ( S1 ) − ε 1 , and since (II) is assumed TRUE then µ(S1 ) − ε1 > 0 . In (I) there exists an expression: min (µ ( S1 ) − ε 1 , µ ( S i ) − ε i ) evaluated as µ(S1 ) − ε1 > 0 . Any other element greater than µ ( S1 ) − ε 1 is also positive. Thus (I) is also TRUE. Case 2: Assume that µ ( S1 ) − ε 1 is the expression with maximum value in (II) and µ ( S i ) − ε i (2 ≤ i ≤ n ) is the next highest value expression. Then (II) evaluates to µ ( S i ) − ε i , and since (II) is assumed TRUE then µ ( S i ) − ε i > 0 . In (I) there exists an expression: min (µ ( S1 ) − ε 1 , µ ( S i ) − ε i ) evaluated as µ ( S i ) − ε i > 0 . (This would also be the highest value element resulting from the minimum functions) Thus (I) is also TRUE. Suppose (II) is FALSE, which means that: min(max(µ (S 2 ) − ε 2 , µ (S 3 ) − ε 3 ), µ(S1 ) − ε 1 ) ≤ 0 . Case 1: Assume that µ ( S i ) − ε i (2 ≤ i ≤ n ) is an expression with maximum value in (II). Thus, (II) evaluates to µ ( S1 ) − ε 1 , and since (II) is assumed FALSE then µ(S1 ) − ε1 ≤ 0 . Every minimum expression in (I) is not evaluated positive (since µ(S1 ) − ε1 ≤ 0 ), e.g.: min (µ ( S1 ) − ε 1 , µ ( S j ) − ε j ) ≤ 0 (2 ≤ j ≤ n ) . Thus, (I) is also FALSE. Case 2: Assume that µ ( S1 ) − ε 1 is the expression with maximum value in (II) and µ ( S i ) − ε i (2 ≤ i ≤ n ) is the next highest value expression. Then (II) evaluates to µ ( S i ) − ε i , and since (II) is assumed TRUE then µ ( S i ) − ε i ≤ 0 . Since µ ( S i ) − ε i ≤ 0 and every other expression except µ ( S1 ) − ε 1 (i.e., µ ( S j ) − ε j for 2 ≤ ( j ≠ i ) ≤ n ) is smaller than µ ( S i ) − ε i , then every minimum expression in (I) is not

evaluated positive (e.g., min (µ ( S1 ) − ε 1 , µ ( S j ) − ε j ) ≤ 0 ). Thus, (I) is also FALSE.

241


Law

Boolean Algebra

Context Algebra

NOT γ (µ (S 1 ) AND ,..., AND µ (S n ) ) =

De

A∧ B = A∨ B

γ (NOT µ (S 1 ) OR ,..., OR _ NOT µ (S n ) )

Morgan’s

A∨ B = A∧ B

¬γ (µ (S1 )OR ,..., OR µ(S n ) ) = γ (NOT µ (S1 )AND ,..., AND _ NOT µ (S n ) )

(I) γ (NOT µ (S1 ) OR ,..., OR _ NOT µ (S n ) ) = max (ε 1 − µ (S1 ),..., ε n − µ (S n ) ) > 0 (II) ¬ γ (µ (S1 ) AND ,..., AND µ (S n ) ) = ¬(min (µ (S1 ) − ε 1 ,..., µ (S n ) − ε n ) > 0 ) Suppose (II) is FALSE, which means that: min(µ (S1 ) − ε 1 ,..., µ (S n ) − ε n ) > 0 . Let

µ ( S i ) − ε i (1 ≤ i ≤ n ) be the expression with minimum value in (II), which according to our assumption must be positive (i.e., µ ( S i ) − ε i > 0 ). Since µ ( S i ) − ε i has minimum value, ε i − µ ( S i ) has maximum value in (I) and is negative (i.e., ε i − µ ( S i ) < 0 ). Thus (I) is also FALSE. Suppose (II) is TRUE, which implies that: min(µ (S1 ) − ε 1 ,..., µ (S n ) − ε n ) ≤ 0 . Let

µ ( S i ) − ε i (1 ≤ i ≤ n ) be the expression with minimum value in (II), which according to our assumption is µ ( S i ) − ε i ≤ 0 . The expression ε i − µ ( S i ) , therefore, must be the expression with maximum value in (I) and is positive (i.e., ε i − µ ( S i ) > 0 ). Thus (I) is also TRUE. (I) γ (NOT µ (S1 ) AND ,..., AND _ NOT µ (S n ) ) = min (ε 1 − µ(S1 ),..., ε n − µ(S n ) ) > 0 (II) ¬ γ (µ ( S 1 ) OR ,..., OR µ (S n ) ) = ¬ (max (µ (S 1 ) − ε 1 ,..., µ (S n ) − ε n ) > 0 ) Suppose (II) is FALSE, which means that: max(µ (S1 ) − ε 1 ,..., µ (S n ) − ε n ) > 0 . Let

µ ( S i ) − ε i (1 ≤ i ≤ n ) be the expression with maximum value in (II), which according to our assumption must be positive (i.e., µ ( S i ) − ε i > 0 ). Since µ ( S i ) − ε i has maximum value, ε i − µ ( S i ) has minimum value in (I) and is negative (i.e. ε i − µ ( S i ) < 0 ). Thus (I) is also FALSE. Suppose (II) is TRUE, which implies that: max(µ (S1 ) − ε 1 ,..., µ (S n ) − ε n ) ≤ 0 . Let

µ ( S i ) − ε i (1 ≤ i ≤ n ) be the expression with maximum value in (II), which according to our assumption is µ ( S i ) − ε i ≤ 0 . The expression ε i − µ ( S i ) , therefore, must be the expression with minimum value in (I) and is positive (i.e., ε i − µ ( S i ) > 0 ). Thus (I) is also TRUE.

242


2. Incident prioritization / management by business objectives with Context Space approach (Exhibit)

243


Glossary Application Space - All available context-attributes and possible values for each context attribute. It is the universe of discourse in terms of possible information (which is sensed/discovered/computed) for an application.

Complex Situation Expression (CSE) – Logical expressions describing situations. A CSE consists of situation spaces constituents (as propositions for the occurrences of situations) and logical operations (including precedence) between these propositions.

Context Attribute – Any type of data that is used in the process of reasoning about context. A context attribute is associated with a sensor, virtual or physical. The value of the sensor reading at time t is the context-attribute value at time t.

Context Spaces – A conceptual context model using spatial metaphors and insights from the state-space model for describing context and situations in multi-dimensional space.

Context Spaces Algebra – A set of algebraic operations applied over situation spaces, dealing with compositions of and relationships between situation spaces. Context Spaces Algebra enhances context management and reasoning about context.

Context State - A collection of context attributes’ values at time t. Context Verification – The process of resolving conflicts and information discrepancies between sensory originated information (e.g., caused by inaccuracies or unreliability of sensors) and situation inferences (e.g., ambiguities or mutual exclusion of inferred occurring situations).

ConSpaF – (Context Spaces Fusion algorithm) - An algorithm based on heuristics, integrating information modelled according to the Extended Context Spaces model and computing a confidence value for the occurrence of a situation.

ECORA Framework – (Extensible Context Oriented Reasoning Framework) - A framework for context-aware computing based on Context Spaces model and related

244


reasoning, with a focus on reasoning under uncertainty and addressing issues of scalability, communication and usability.

Extended Context Spaces (ECS) – The complete Context Spaces model, extending the NCS model by considering heuristics, which relate context attributes more comprehensively to situation spaces. The ECS is useful when reasoning about context under uncertainty.

Naïve Context Spaces (NCS) – The basic Context Spaces model, describing context and situations with concepts drawn explicitly from geometrical metaphors. The NCS model is useful when dealing with accurate sensory originated information.

Situation Space - A modelled real-life situation, defined by a collection of regions of acceptable values for selected context attributes.

Stability (in context) of Pervasive Systems – The steadiness of a pervasive system in a subset of context attributes (selected dimensions). The stability concept is used to characterize when the system can be depended upon to survive changes in circumstances (i.e., likely to be able to maintain a situation) and when it cannot be depended upon.

245


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.