Efficient Algorithms to Monitor Continuous Constrained k Nearest Neighbor Queries Presented by: Mahady Hasan Joint work with Muhammad Aamir Cheema, Wenyu Qu, Xuemin Lin University of New South Wales, Australia
Outline of the Presentation Introduction Related Work (Motivation) GridTree Approach ArcTrip Approach Continuous monitoring Experiments Conclusion Friday, February 22, 2019 Presented by: Mahady Hasan
What is NN? What is Constrained NN? R o9 o5 o5 o1 o7 o7 o3 o3 o3 o6 o6 q o2 o4 o4 o4 o8 Finding contrained kNN objects. Let k=3 Finding kNN objects. Let k=3 Friday, February 22, 2019 Presented by: Mahady Hasan
Outline of the Presentation Introduction Related Work (Motivation) GridTree Approach ArcTrip Approach Continuous monitoring Experiments Conclusion Friday, February 22, 2019 Presented by: Mahady Hasan
Related works Constrained kNN queries: Continuous k NN queries: H. Ferhatosmanoglu et al. first introduce the constrained kNN queries (SSTD 2001). Gao et. al find k-nearest trajectories in a constrained region. (DASFAA 2008) Continuous k NN queries: YPK-CNN( Yu et al. ICDE 2005) SEA-CNN (Xiong et al. ICDE 2005) CPM (Mouratidis et al. SIGMOD 2005) Friday, February 22, 2019 Presented by: Mahady Hasan
Related work: CPM o2 o3 o1 o6 o5 o5 o5 q o4 o8 o7 Heap U2 c44 U0 c54 We check an cell or entry before we insert in the heap that it intersects with the given constrained region or not. D2 Finding one Nearest Neighbor Friday, February 22, 2019 Presented by: Mahady Hasan
Motivation We have observed that in case of our problem setting CPM needs to check lots of cells before it inserts the cell in the cell in the heap. So CPM becomes expensive in terms of computational time. At the same time CPM needs more space to store the heap and visit lists to update the data efficiently. So we use some other access methods that are more natural with our problem setting Friday, February 22, 2019 Presented by: Mahady Hasan
Outline of the Presentation Introduction Related Work (Motivation) GridTree Approach ArcTrip Approach Continuous monitoring Experiments Conclusion Friday, February 22, 2019 Presented by: Mahady Hasan
Concept of Grid-Tree Structure root Intermediate Entries Grid Cells Friday, February 22, 2019 Presented by: Mahady Hasan
Grid-Tree based NN search algorithm Heap R3 R2 c23 c22 o1 root o3 R1 R2 R4 R3 c24 c21 o9 c12 R2 c13 c11 c14 R4 R3 o5 o6 root c21 c13 c24 o8 c11 c14 o9 c22 c23 o6 R4 R3 R4 c13 R1 c12 q o2 o8 o8 c14 c11 o4 o7 Friday, February 22, 2019 Presented by: Mahady Hasan
Grid-Tree Based constrained NN Algorithm Heap c33 R3 c32 R2 R o4 root o6 o1 o1 R4 R3 c34 c31 o8 o8 o2 o2 c42 R3 c43 root c31 c32 c43 c34 c33 c43 R4 o3 c42 R1 o5 o5 c32 o2 c43 c34 c33 q o7 o7 c32 o2 c43 c34 c33 o4 c44 c41 Friday, February 22, 2019 Presented by: Mahady Hasan
Outline of the Presentation Introduction Related Work (Motivation) GridTree Approach ArcTrip Approach Continuous monitoring Experiments Conclusion Friday, February 22, 2019 Presented by: Mahady Hasan
Concept of ArcTrip θend r θstart cstart q Input: Radius r Angle range θstart , θend c41 c42 c43 θend c44 r θstart θend c31 c32 c33 c34 r Output: cells that intersect the arc with in θstart and θend with radius r from the query point q θstart c21 c22 c23 c24 q cstart c11 c12 c13 c14 Returned values are c22, c32, c33 Friday, February 22, 2019 Presented by: Mahady Hasan
ArcTrip Based contained NN Algorithm Heap c41 c42 θend c43 o1 c42 c22 c32 q.cNNdist o3 o3 o3 c31 c32 c33 o9 cNN o5 o5 r o5 o3 c21 c22 c24 θstart q o2 o6 c11 c12 c13 c14 o4 o7 Finding 1 constrained NN Friday, February 22, 2019 Presented by: Mahady Hasan
Outline of the Presentation Introduction Related Work (Motivation) GridTree Approach ArcTrip Approach Continuous monitoring Experiments Conclusion Friday, February 22, 2019 Presented by: Mahady Hasan
Continuous monitoring Phase 1: receive object and query updates. Find affected queries. Change in the queries based on the update below. Internal update (dist(oold,q)≤q.distk Λ dist(onew,q)≤q.distk) Arrange the order in q.CkNN Incoming update (dist(oold,q)>q.distk Λ dist(onew,q)<q.distk) Insert object in q.CkNN Outgoing update (dist(oold,q)≤q.distk Λ dist(onew,q)>q.distk) Remove object from q.CkNN Friday, February 22, 2019 Presented by: Mahady Hasan
Continuous monitoring … Phase 2: Check the status of each query one by one If query moved then Execute the initial algorithm. If q.CkNN > k then Keep top k objects and remove rest of the objects. If q.CkNN < k then Expand the search area by visiting more cells Friday, February 22, 2019 Presented by: Mahady Hasan
Outline of the Presentation Introduction Related Work (Motivation) GridTree Approach ArcTrip Approach Continuous monitoring Experiments Conclusion Friday, February 22, 2019 Presented by: Mahady Hasan
Experiment Setup Parameter Range Grid size 162, 322, 642, 1282, 2562, 5122 Object cardinality 20k , 40k, 60k, 80k, 100k Query cardinality 100, 200, 500, 1000, 2500, 5000 Values of k 2, 4, 8, 16, 32, 64, 128 Object/query speed Slow, Medium, Fast Object/query agility 10%, 30%, 50%, 70%, 90% Brinkhoff data generator; Oldenburg city (Germany). Friday, February 22, 2019 Presented by: Mahady Hasan
Grid cardinality effect Need to check many empty cells. Need to check too many objects. Friday, February 22, 2019 Presented by: Mahady Hasan
CPM stores the heap and the visit list. Grid Memory Effect CPM stores the heap and the visit list. Friday, February 22, 2019 Presented by: Mahady Hasan
Effect of k size Friday, February 22, 2019 Presented by: Mahady Hasan
Cardinality Effect Updating in CPM become expensive Friday, February 22, 2019 Presented by: Mahady Hasan
Speed Effect In CPM paper it was showed that speed has no affect. Friday, February 22, 2019 Presented by: Mahady Hasan
Agility effect Object agility results more updates so the computation cost increases. With increase in query agility CPM needs to compute the results from the scratch. Friday, February 22, 2019 Presented by: Mahady Hasan
Outline of the Presentation Introduction Related Work (Motivation) GridTree Approach ArcTrip Approach Continuous monitoring Experiments Conclusion Friday, February 22, 2019 Presented by: Mahady Hasan
Conclusion We proposed two novel Grid access methods. We devise two algorithms to compute the constrained k nearest neighbors. Our experimental results show our algorithms performs much better than the existing algorithm in terms of memory space and run time. Friday, February 22, 2019 Presented by: Mahady Hasan
Thank you… Questions??
Some changes to calculate distance R maxcdist(q, Cell2) maxdist(q,Cell2) Cell 2 Cell 1 mincdist(q, Cell1) mindist(q,Cell1) q Friday, February 22, 2019 Presented by: Mahady Hasan