adaptive middleware for context-aware applications in smart-homes markus huebscher imperial college...
TRANSCRIPT
Adaptive middleware forcontext-aware applications in smart-homes
Markus HuebscherImperial 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
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
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”
6
Middleware context structure
Sensors1 Sensors2
ContextProvider1
Sensors3
ContextProvider2
ContextService
App1 App2
Sensors
ContextProvisioning(aggregation &interpretation)
Context ProvisionAdaptation
Applications
7
Provider advertisement
Sensors1 Sensors2
ContextProvider1
Sensors3
ContextProvider2
ContextService
App1 App2
Directory Service
advertQoC attrs
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
9
Consumer advertisement
Sensors1 Sensors2
ContextProvider1
Sensors3
ContextProvider2
ContextService
App1 App2
Directory Service
Request context typeUtility function
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
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.
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
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
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
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
16
Euclidean distance exampleprecision
refresh rate
ref
CP1
CP2
CP3
17
Euclidean distance exampleprecision
refresh rate
ref
CP1
CP2
Frequently-lost-objects finder
Light-control system
Set weightfor each dimension
CP3
18
Euclidean distance example
refresh rate
ref
CP1
CP2
precision
CP3
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
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)
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
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
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.
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
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
29
Thank you