Top Banner
Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘04
25

Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

Jan 11, 2016

Download

Documents

Maryann Heath
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

Adaptive middleware forcontext-aware applications in smart-homes

Markus HuebscherImperial College London

MPAC ‘04

Page 2: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

2

Middleware Structure of middleware Utility functions on QoC attributes

for service selection and adaptation Utility functions

Example: Euclidean distance Learning Non-context aware service selection

Outline

Page 3: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

4

Context-aware applications

e.g. user at location (x,y), light and sound values, etc.

e.g. user in living room sitting on sofa, room bright, no noise, etc.

Context

Application

CollectAggregateInterpret

Sensors

PhysicalSensor

Middleware

Application

Sensor datalogic

Page 4: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

5

Approach Self-adaptive (autonomic) middleware for context

provision. Context providers advertise their capabilities with

Quality of Context (QoC) attributes. E.g. precision, refresh rate, spacial coverage

Assume >1 alternatives for same context. location: ultrasonic, RFID, IR, smart floor,

visual gait: visual, wearable accelerometers

Middleware receives app-specific utility function to rate context providers using QoC attrs.

Given multiple alternatives, middleware selects one that maximises app’ “satisfaction”

Page 5: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

6

Middleware context structure

Sensors1 Sensors2

ContextProvider1

Sensors3

ContextProvider2

ContextService

App1 App2

Sensors

ContextProvisioning(aggregation &interpretation)

Context ProvisionAdaptation

Applications

Page 6: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

7

Provider advertisement

Sensors1 Sensors2

ContextProvider1

Sensors3

ContextProvider2

ContextService

App1 App2

Directory Service

advertQoC attrs

Page 7: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

8

Provider advertisement

CP sends advert msg to DS. Context type QoC attributes

Precision/Probability of correctness refresh rate

If advert successful periodically send heartbeat to DS Implicitly tells DS that CP still alive Provide updated values for QoC attrs

Page 8: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

9

Consumer advertisement

Sensors1 Sensors2

ContextProvider1

Sensors3

ContextProvider2

ContextService

App1 App2

Directory Service

Request context typeUtility function

Page 9: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

10

Consumer advertisement

Request context type to SD Provide Utility function

Given QoC attrs of a CP, determines how desirable CP is.

Application-specific measure of QoC. Delegate to middleware task of adapting to

best alternative

Page 10: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

11

Middleware adaptation structure

Sensors1 Sensors2

ContextProvider1

Sensors3

ContextProvider2

ContextService

App

Directory Service

Util Fct evaluation

Fires events

Call for adaptation

CPs register at DS and regularly send heartbeat to DS(“I’m alive”) providing updated QoC attrs.

Page 11: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

12

Auto update (self-configuring)

Sensors1 Sensors2

ContextProvider1

ContextService

Sensors3

ContextProvider2

Directory Service

2.event:new CP

3. switch to CP2

1.advertise

4.

Util Fct evaluation

Application

Page 12: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

13

Failure recovery (self-healing)

Sensors1 Sensors2

ContextProvider1

Sensors3

ContextProvider2

ContextService

Directory Service

2.event:CP2 failure

3. switch to CP1

1.noheartbeat

4.

Util Fct evaluation

Application

Page 13: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

14

QoC change (self-optimising)

Sensors1 Sensors2

ContextProvider1

Sensors3

ContextProvider2

ContextService

Directory Service

2.event:CP2 QoCdegradation

3. switch to CP1

1.hearbeatwith QoCdegradation

4.

Util Fct evaluation

Application

Page 14: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

15

Utility Functions

Map QoC attrs of CP to desirability of CP

Example: Euclidian distance Computes distance between a desirable point

in the QoC-space and the CP’s QoC point or the origin of the QoC-space.

Many choices as to how utility evaluated

Page 15: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

16

Euclidean distance exampleprecision

refresh rate

ref

CP1

CP2

CP3

Page 16: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

17

Euclidean distance exampleprecision

refresh rate

ref

CP1

CP2

Frequently-lost-objects finder

Light-control system

Set weightfor each dimension

CP3

Page 17: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

18

Euclidean distance example

refresh rate

ref

CP1

CP2

precision

CP3

Page 18: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

22Computing distancewith different measurement units

Problem: Have to sum values with different units, e.g. 1/metres with Hz.

Solution: Standardise scale of each dim. Manually: pick a sensible scaling factor for

each Quality of Context Tedious, subjective.

Automated scaling factor:Mahalanobis distance

For each QoC Attr: Compute Std Dev over all available CPs Express distance of attr as multiple of Std Dev

apply scaling factor 1/σi

Page 19: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

23

Learning consumer’s utility fct

If consumer does not provide Util Fct E.g. not supported (resource-constrained)

Can learn to predict consumer’s satisfaction with CPs (just yes/no)

Middleware chooses CP, consumer sends +/- feedback about CP.

Relevance-based decision tree learning Takes as input the set of QoC attributes Predict whether consumer will like a CP

(yes/no)

Page 20: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

24

Relevance-based decision tree learning

refresh rate

precision

yes

≥10

≥40

no

no

<10

<40

precision

refresh rate

ref (10,40)

CP1

CP2CP3

CP4

Page 21: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

25

yes

Relevance-based decision tree learning 2

refresh rate

precision precision

yes

<10

≥20 <40

≥10

≥40<20

precision

refresh rate

CP1

CP2CP3

CP4

yesno no

Page 22: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

26

The problem of trust Trust CP to deliver context info according to

advertised QoC attributes. Trustworthiness (tw) is a QoC attribute

determined by middleware, not CP Use praise/complaint feedback from.

consumers after CP use to determine tw. Bayesian parameter learning

Number of +/- feedbacks probability distribution for CP tw.

tw a QoC attribute. Consumer decides how much risk to take in the

hope of good QoC.

Page 23: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

27Non-context applicationsExample: printer service

App (eg on PDA) wants to find “nearest” printer.

Predefined utility function uses a map to determine nearest printer. App selects “nearest” util fct in middleware App needn’t know topology of building Apps & printers only need to know their

location, middleware does the rest.

UP1 P2

Page 24: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

28Non-context applicationsExample: printer service 2

Other utility functions: Shortest printing time

depends on print queue length and printer speed adapt printer selection if paper jams, no toner.

Best quality Resolution, colour, type of paper

Tree-based classification Utility functions generally useful for service

selection and adaptation when alternative providers can be ranked On service failure, automatically switch to next

best alternative

Page 25: Adaptive middleware for context-aware applications in smart-homes Markus Huebscher Imperial College London MPAC ‘ 04.

29

Thank you