Download presentation
Presentation is loading. Please wait.
Published byElaine Neal Modified over 8 years ago
1
1 L AZY U PDATES : A N E FFICIENT T ECHNIQUE T O C ONTINUOUSLY M ONITORING R EVERSE K NN (PVLDB’09) Presented By: Jing LI Supervisor: Nikos Mamoulis
2
2 OUTLINE Problem & Motivation Solution: Architecture Algorithm Overview Pruning Rules For Points (Related Works) For Safe Regions Data Structure Experiments
3
3 P ROBLEM & M OTIVATION Nearest Neighbor Query (NN) Find the object closest to q Reverse Nearest Neighbor Query (RNN) Korn et. al. Sigmod 2000 Find objects s.t. q is their NN Reverse k Nearest Neighbor Query (RkNN) Find objects s.t. q is their kNN p2 is the nearest neighbor of q p1 and p4 are the reverse nearest neighbors of q
4
4 P ROBLEM & M OTIVATION Location based games Location based SMS advertising Army strategic planning … Continuous Monitoring of RkNN Objects are moving Query point is moving
5
5 S OLUTION : A RCHITECTURE Server Maintain the RNN for a query Send the result to the user Probe the exact locations of objects Moving Objects If an object moves out of its safe regions [1], it sends an update message of current location together with a new safe region to the server [1] If all objects stay inside safe regions, the solution remains the same.
6
A LGORITHM O VERVIEW Initial Computation Filtering: Determine candidates Verification: Verify each candidate Continuous Monitoring Update candidate objects (filtering) if Query or a candidate moves out of safe region, or An object enters the unpruned area The NN of a candidate object is changed Verify all candidates 6
7
7 SOLUTION: PRUNING FOR THE STATIC RNN Half-space Pruning [VLDB04] Objects in the half-space containing a can be pruned Filtering Repeat until no objects in unpruned area Verification p is RNN iff no object p’ s.t. dist(p,p’) < dist( p,q) q c b a d e Static RNN query Unpruned area
8
8 SOLUTION: PRUNING FOR CONTINUOUS RNN Do filtering starting from the existing “candidates” if Query moves, or Candidate objects move, or An object moves into the unpruned area or The NN of a candidate object is changed Do verification q c b a d e Continuous RNN query [ICDE07] Unpruned area
9
9 SOLUTION: FRAMEWORK Moving objects are assigned rectangular safe regions. When an object moves out of its safe region, it update its exact location and a new safe region to the server Easier to define pruning rules Prune objects using safe regions Advantages Low Computation Cost Low Communication Cost q c b a d e
10
H ALF -S PACE P RUNING 10 q MN p mindist(x,MN) > dist(x,p) x H p:M H p:N x x –Any x on right side of L N : mindist(x,MN) = dist(x,N) –H p:N : the half-space containing p and defined by the bisector between p and N –Any x on left side of L M : mindist(x,MN) = dist(x,M) –Any x between L M and L N : a parabola with mindist(x, MN) = dist(x,p) LMLM LNLN
11
q MN p H p:M H p:N –Frontier point F p –Moved to F p, the intersection of the half-spaces correctly bounds the pruned area –H p:N passing F p : normalized half-space H’ p:N H ALF -S PACE P RUNING : N ORMALIZATION 11 FpFp H’ p:M H’ p:N
12
C HALLENGES 12 R Q ?
13
13 H ALF - SPACE P RUNING : P RUNING R ULE 1 R M NO P Q D A B E H’ M:B H’ P:A H’ N:E H’ O:D FpFp Pairs of antipodal corners are (B,M), (A,P), (E,N) and (D,O) H M:B H P:A
14
14 T RIMMING THE RECTANGLE Q R F1 R F2 R
15
15 D OMINANCE P RUNING : PRUNING RULE 2 R M N O P Q D A B C H’ M:B H’ P:A H’ N:C H’ O:D FpFp
16
16 M ETRIC BASED PRUNING : PRUNING RULE 3 Q R R’ maxdist(R,R’) mindist(R’,Q)
17
17 O RDER O F P RUNING R ULES Cost: PR1 > PR2 > PR3 Pruning Power: PR1 < PR2 < PR3 Multi-level pruning strategy PR3 PR2 PR1
18
18 Q RFRF R1R1 R2R2 R3R3 FpFp O RDER O F P RUNING R ULES : A E XAMPLE
19
ILLUSTRATION OF FILTERING O 3 Q O 2 O 1 O 4 O 6 O 5 O 7 19
20
ILLUSTRATION OF VERIFICATION O 3 Q O 2 O 1 O 4 O 6 O 5 O 7 O1O1 O2O2 O3O3 O5O5 O6O6 20 Q ?
21
D ATA STRUCTURE Query table : id, safe region, candidate objects Object table : id, safe region Use grid data structure to support update Each cell c of the grid : Object list : objects whose safe regions overlap c Influence list : queries whose unpruned area overlaps c 21
22
22 EXPERIMENT SETTINGS Generate Moving objects and queries using Brinkhoff Generator [1] on road map of Texas Data space : 1000 Km X 1000 Km Our algorithm (SAC) is compared with IGERN [2] for RNN queries and CRkNN [3] for RkNN queries [1] T. Brinkhoff. A framework for generating network-based moving objects. GeoInformatica, 2002. [2] J. M. Kang, M. F. Mokbel, S. Shekhar, T. Xia, and D. Zhang. Continuous evaluation of monochromatic and bichromatic reverse nearest neighbors. ICDE, 2007. [3] W. Wu, F. Yang, C. Y. Chan, and K.-L. Tan. Continuous reverse k-nearest-neighbor monitoring. MDM, 2008
23
23 Evaluation of pruning rules Avg. time for PR3 : 1.1 µs ( metric based pruning rule ) PR2 : 2.3 µs ( dominance pruning rule ) PR1 : 10.5 µs ( half space based pruning rule )
24
24 E XPERIMENTS : S IZE OF SAFE REGION
25
25 EXPERIMENTS: NUMBER OF OBJECTS IGERN : ICDE 2007 work for RNN SAC : Our algorithm
26
26 EXPERIMENTS: EFFECT OF DATA MOBILITY Data mobility is the percentage of objects/queries that change their location within one time unit
27
27 Conclusion Study the problem of continuously monitoring reverse kNN Propose a new framework based on safe region Outperform previous algorithms in terms of computation cost and communication cost Drawback: We can assign large safe regions to the objects that are far away from a query point.
28
Thanks 28
29
29 C ONCEPTUAL G RID - TREE Grid data structure is preferred for moving objects, so we also use a grid structure To efficiently search the objects in unpruned area, we treat grid as a conceptual tree
30
30 H ALF - SPACE P RUNING : P RUNING R ULE 1 R M N O P Q D A B E Pairs of antipodal corners are (B,M), (A,P), (E,N) and (D,O) H M:B H’ M:B H P:A H’ P:A H’ N:E H’ O:D Any point that lies in intersection of normalized halfspaces between all pairs of antipodal corners of R and Q can be pruned (such point is closer to every point in R than any point in Q) X
31
CONTINUOUS MONITORING The pruning remains valid unless at least one of the following two happens; 1. Query or a candidate object leave its safe region 2. An object enters into the unpruned region If any of the above two happens Repeat the filtering phase Verify all candidate objects 31
32
Extensions Extension to RkNN queries –An entry e can pruned if it is pruned by at least k filtering objects –An object p is verified if there are less that k objects within range dist(p,q) Extension to Bichromatic queries –Let there be two set of objects O and P and query belongs to O –Repeat until no object of type O in unpruned region Find a nearby object of type O in the unpruned region Prune the space using this object –All objects of type P that lie in the unpruned region are the canidate objects –Verify them if there are less than k objects of type O within the range 32
33
33 T HEORETICAL A NALYSIS The filtering phase is required if at least one of the following two happens; 1.The query or a candidate objects leaves its safe zone 2.Any other object enters in the unpruned region – Let p be the probability that at a given timestamp at least one of the above two conditions hold Computation Cost = p x C Fil + C ver – Where C Fil is the cost of filtering phase and C ver is the cost of the verification phase – Let C br be the cost of a boolean range query
34
34 EXPERIMENTS: RKNN QUERIES CRkNN : MDM 2008 work for continuous monitoring RkNN SAC : Our algorithm
35
35 EXPERIMENTS: EFFECT OF SPEED
36
36 EXPERIMENTS: NUMBER OF QUERIES
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.