Aggregate sum retrieval in sensor network by distributed prefix sum data cube Lok Hang Lee and Man...

Post on 21-Jan-2016

213 views 0 download

Tags:

transcript

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)

OUTLINE

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

1. Introduction

Data aggregate important data retrieval problems

Common operation like SUM, AVG, MAX, and MIN

Construct a distributed data cube

Distributed prefix sum data cube in autonomous way

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

(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)

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

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

Definition 2

A prefix sum data cube is a grid of cells

in which each cell maintains a prefix sum.

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

Definition 4

X

e

f

X

e

f

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

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)

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

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

A Distributed PS data cube is beingconstructed in a sensor network

Lemma 3

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

EX: 5 + 5 - 2 = 8

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

d

ab

cd

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

Querying the aggregate sums ofseveral regions simultaneously

4. Simulation

Construction time

Width : h

Length : K

h + k = 200

100+100-2=198

10

10

Network Traffic

Width : h

Length : K

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

(a) Network traffic against different network sizes

60

50

40

30

20

10

0

Network traffic against different network sizes