27
An Approach to Content An Approach to Content Adaptation for Mobile Adaptation for Mobile Computing Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University of Hong Kong

An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

Embed Size (px)

Citation preview

Page 1: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

An Approach to Content An Approach to Content Adaptation for Mobile Computing Adaptation for Mobile Computing

Francis C.M. Lau (& W.Y. Lum)

Department of Computer Science & Information Systems

The University of Hong Kong

Page 2: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

2

The Next Gold Rush?The Next Gold Rush?

“The current Internet gold rush will be dwarfed by what is about to happen with

Wireless Internet Access.” – The Economist

Page 3: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

3

Challenges of Mobile ComputingChallenges of Mobile Computing

• Device heterogeneity and constraints• Content heterogeneity• The network• The user

Page 4: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

4

Content AdaptationContent Adaptation

• Why adapt contents?– Most contents for viewing are for the larger screens– Creating multiple versions a burden– Even if you don’t mind, there are just too many possible

devices– Different users want different things– Having one, original version is easier to manage

• Content adaptation is about generating any content version from one single original version

• Author-once-present-anywhere (AOPA)

small devices

Page 5: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

5

PreadaptationPreadaptation

• Keeping just the original version (any other version is runtime-generated) could be slow

• Preadaptation– to create all possible versions, and do static

“selection” at runtime, or– to create just a few essential versions, and do

dynamic adaptation – hence the “balance”

Page 6: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

6

A User-Centric, Context-Sensitive A User-Centric, Context-Sensitive ApproachApproach

• Content adaptation is not just about adapting to the device, but also the user, the network, …

• Adapting to the user – a user-centric approach• The user has preferences

– speed (how much delay can I tolerate?), color (do I mind black-and-white?), scaling (is smaller text size ok?), modality (do I care what format?), …

• What the user most prefers however might not be feasible because of constraints of the context– the device, the network, the requested object

Page 7: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

7

A Collaborative EnvironmentA Collaborative Environment

INTERNET

INTERNET

INTERMEDIATE PROXY SERVER

CONTENTS PROVIDER

USER & DEVICE

Content adaptation happens here

THE CONNECTIONS

Preadapted versions stored here

Page 8: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

8

Content Adaptation in Two StepsContent Adaptation in Two Steps

• Content negotiationN(PN(Ppreferencepreference, P, Pdevicedevice, P, Pnetworknetwork, P, Pcontentcontent) ) V V

– V the recommended version– Note: “version” = ID or metadata, not the real

content

• Content realizationR(V) R(V) O O

– O the actual object returned to the client

Page 9: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

9

Page 10: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

10

Content NegotiationContent Negotiation

• Negotiation: user’s preference againstthe context

• Preferences represented by scoresand stored as score nodes in an efficient data structure

• To traverse the data structure from highest-scoring node until TRUE:

TRUE || FALSE TRUE || FALSE decision(score-node, context) decision(score-node, context)– where context = (Pdevice, Pnetwork, Pcontent)– note that estimated rendering time is considered in the

process

Page 11: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

11

recommendedversion=

CONTENTNEGOTIATION

CONTENTNEGOTIATION

Page 12: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

12

Negotiating for the Best VersionNegotiating for the Best Version

Page 13: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

13

Content RealizationContent Realization

• To generate the object based on the desired version recommended by the negotiation module

• Involves one or more transcoding steps from some “optimal” preadapted version

• Tradeoff between– real-time transcoding overhead (CPU cost, or

time)– storage overhead of preadaptation (I/O cost)

Page 14: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

14

Transcoding Relation GraphTranscoding Relation Graph

• V the set of all possible contentversions

• The edge (vi, vj) means vj can bederived from vi throughtranscoding– vi could be (4-bit color, 75% scaling);

vj could be (1-bit color, 50% scaling)

• Transcoding () is a lossy operation• Edge labels are the time cost of the corresponding

transcoding operations based on some cost model• At least v0, the original content version, should be

present in the content server

Page 15: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

15

To Build the Preadapted Set, VTo Build the Preadapted Set, Vprepre

• Constrained by total size allowed

• Each vertex (white) not in Vpre must be pointed to by exactly one edge from a vertex (black) in Vpre

• With least total edge cost (over all edges from a black vertex to a white vertex) among all the possibilities

• NP-complete

Page 16: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

16

The Greedy Algorithm (GREEDY)The Greedy Algorithm (GREEDY)

• C(V) = total edge (black-to-white) cost based on an optimal edge set for a given preadapted set V

• We can take space into account as well: to maximize C'( ) which is the aggregated transcoding cost saving per unit spatial consumption

Vpre initial setwhile not exceeding space allowed

select v Vpre such that C(v Vpre) is minimizedadd v to Vpre

Page 17: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

17

ExampleExample

Vpre C( ) space

v0 13.6 500

v0, v1 8.6 750

v0, v2 8.5 700

v0, v3 10.2 580

v0, v4 7.7 600

v0, v4, v1 3.5 850

v0, v4, v2 4.3 800

v0, v4, v3 6.8 680

Space limit: 850 Kbytes

Page 18: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

18

How Good is GREEDYHow Good is GREEDY

• Let A and B be the improvements (i.e., reduction in transcoding time over all content versions) due to the optimal solution (OPT) and GREEDY respectively; then

– where k and k' are the numbers of versions selected by GREEDY and OPT respectively

• If k=9 and k'=8, then GREEDY is at least 70% of OPT in performance

k

k'

1k'

B

A

1

Page 19: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

19

How Good is GREEDYHow Good is GREEDY

• Proof based on that for a greedy selection algorithm for “datacubes” by Harinarayan et al. [SIGMOD96]

• Can we do better?– “The greedy algorithm does as well as we can

hope any [deterministic] polynomial-time algorithm to do” – according to some recent result on set cover

Page 20: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

20

ExperimentationExperimentation

• A prototype PDF document content adaptation system (simulation)

• User preference in five domains: color, downloading time, scaling, modality, segmentation, each having a range of 4 values– hence 45 = 1024 score nodes per user

Page 21: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

21

Negotiating for the Best VersionNegotiating for the Best Version

Page 22: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

22

ExperimentationExperimentation

• We measured performance in terms of the following against preadaptation capacity– aggregated transcoding cost saving– content coverage ratio = # of selected versions / all

versions

• C'( ) performs better than C( ) in most situations

Please refer to our Mobicom paper for the graphs

Page 23: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

23

ExperimentationExperimentation

• Modality vs. downloading time; all others kept constant

• WAP device:– (a) modality >

downloading time WBMP

– (b) downloading time > modality WML

• PDA:– (c) PDF, (d) BMP,

(e) HTML better picture

Page 24: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

24

ExperimentationExperimentation

• Setting maximum download time– (a) WBMP, (b) larger WML, (c) smaller WML– note how (c) is segmented/cropped and the use of the

“next” anchor

a cb

Page 25: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

25

ExperimentationExperimentation

• Awareness of network delays– (a) 144 kbps PDF with 256 colors– (b) 19.6 kbps BMP with 16 colors– (c) 9.6 kbps HTML

a cb

Page 26: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

26

Further ResearchFurther Research

• Versions weighted according to popularity• To exploit mutual dependencies between objects• Dynamic (re-)preadaptation

– similar to caching– separate caching at the proxy?

• Better algorithms than GREEDY• Automatic content augmentation – “pervasive authoring”• Easily-transcodable contents• Do we really need that many versions?• User preferences – how specified?• Collaborative design: device-proxy-server• Adaptation of code

Page 27: An Approach to Content Adaptation for Mobile Computing Francis C.M. Lau (& W.Y. Lum) Department of Computer Science & Information Systems The University

27

Related PublicationsRelated Publications

• W.Y. Lum and F.C.M. Lau, “User-centric Content Negotiation for Effective Adaptation Service in Mobile Computing”, IEEE Transactions on Software Engineering, to appear.

• W.Y. Lum and F.C.M. Lau, “A Context-Aware Decision Engine for Content Adaptation”, IEEE Pervasive Computing, Vol. 1, No. 3, July-September 2002, 41-49.

• W.Y. Lum and F.C.M. Lau, “On Balancing Between Transcoding Overhead and Spatial Consumption in Content Adaptation”, Proc. Mobicom 2002, Atlanta, USA, September 2002, 239-250.