aggregate sum retrieval in sensor network by distributed prefix sum data cube lok hang lee and man...

25
Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department of Computer Science and Eng ineering 19th International Conference on Advanced Information Networking and Applications (AINA’05)

Upload: gervase-dalton

Post on 21-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Aggregate sum retrieval in sensor network by distributed prefix sum data

cube

Lok Hang Lee and Man Hon WongThe Chinese University of Hong Kong

Department of Computer Science and Engineering

19th International Conference on Advanced Information Networking and Applications (AINA’05)

Page 2: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

OUTLINE

1. Introduction 2. Prefix Sum Data Cube 3. Building Distributed PS Data Cube 4. Simulation 5. Conclusion

Page 3: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

1. Introduction

Data aggregate important data retrieval problems

Common operation like SUM, AVG, MAX, and MIN

Construct a distributed data cube

Page 4: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Distributed prefix sum data cube in autonomous way

Fast and simultaneous retrievals of aggregate sum data on any rectangular region

Page 5: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

(a) A grid-like area and the readings of the cells(b) The PS data cube of that area

0 1 2 3

(a) (b)

Page 6: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

2. Prefix Sum Data Cube

A 2-D grid every cell of the grid holds a numeric value v(x,y)

PS data cube storing pre-computed data aggregates

Page 7: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Definition 1

Each cell locating at column Xi and row Yi

keeps a value v ( Xi , Yi )

Prefix sum s ( Xi , Yi ) stored in cell is

Yi

n

Xi

mnmv

00),(

12 45

27 2112+27+45+21 =105 12 57

39 105

X

Y

0 1

0

1

0 1

0

1

Page 8: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Definition 2

A prefix sum data cube is a grid of cells

in which each cell maintains a prefix sum.

Page 9: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Definition 3

Sum of all the cell values in the region e : f

Sum( e : f )

e : f is the rectangular region with sensors e being the anchor

f being the endpoint

Page 10: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Definition 4

X

e

f

Page 11: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

X

e

f

Page 12: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

0 1 2 3

e

f

c

b

a

Sum( e : f )

=s(f)-s(b)-s(c)+s(a)

=648-141-136+12

=383

Page 13: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

3. Building Distributed PS Data Cube

Lemma1 – s(Xc,Yc)=v(Xc,Yc)+s(Xc-1,Yc)+s(Xc,Yc-1)

-s(Xc-1,Yc-1)

For any cell c located at

(Xc,Yc)

Page 14: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Three variables u(i) , l(i) , d(i) received from the upper, left, and the upper l

eft neighbors

Computes own prefix sum(Xi,Yi)

At time t locate (X,Y) X+Y=t to do calculate its prefix sum and broadcast

Page 15: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Lemma 2

At time t = X+Y, the prefix sums of all the nodes at (X,Y ) will be ready

0 1 2 3 4

0 1 2 3 4

TIME= 0

TIME= 1

TIME= 2

TIME= 3

TIME= 4

TIME= 5

TIME= 6

TIME= 7

TIME= 8

Page 16: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

A Distributed PS data cube is beingconstructed in a sensor network

Page 17: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Lemma 3

With length = h and width =k, constructed in h +k - 2 units of time

EX: 5 + 5 - 2 = 8

Page 18: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

EX1 :aggregate sum=s(a)-s(b)-s(c)+s(d)

d

ab

cd

Page 19: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

EX2 : sum=s(a)-s(b)+s(c)-s(d)-s(e)+s(f)-s(d) -s(g)+s(h)

作者算錯 ,多減

a

bcdh

g f

e

Page 20: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Querying the aggregate sums ofseveral regions simultaneously

Page 21: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

4. Simulation

Construction time

Width : h

Length : K

h + k = 200

100+100-2=198

10

10

Page 22: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Network Traffic

Width : h

Length : K

Page 23: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

5. Conclusion

Use a distributed prefix sum (PS) data cube to facilitate the retrieval of aggregate sums from multiple regions

In worst case, the algorithm only takes O(N) time

Page 24: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

(a) Network traffic against different network sizes

60

50

40

30

20

10

0

Page 25: Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man Hon Wong The Chinese University of Hong Kong Department

Network traffic against different network sizes