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 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 (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 = X Y
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 e f
X e f
e f c b a Sum( e : f ) =s(f)-s(b)-s(c)+s(a) = =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 left 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 TIME= 0 TIME= 1 TIME= 2 TIME= 3 TIME= 4 TIME= 5 TIME= 6 TIME= 7 TIME= 8
A Distributed PS data cube is being constructed in a sensor network
Lemma 3 With length = h and width =k, constructed in h +k - 2 units of time EX: = 8
EX1 : aggregate sum=s(a)-s(b)-s(c)+s(d) d a b c d
EX2 : sum=s(a)-s(b)+s(c)-s(d)-s(e)+s(f)-s(d) -s(g)+s(h) 作者算錯, 多減 a b c d h g f e
Querying the aggregate sums of several regions simultaneously
4. Simulation Construction time Width : h Length : K h + k = =198 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
Network traffic against different network sizes