A Unified Algorithm for Continuous Monitoring of Spatial Queries Presented by: Muhammad Aamir Cheema Joint work with Mahady Hasan, Xuemin Lin, Wenjie Zhang University of New South Wales, Australia
Introduction No existing unified algorithm Our unified algorithm answers a broad class of spatial queries for each query, we only need to change the scoring function Presented by: Muhammad Aamir Cheema
Problem definition Versatile scoring function Let f(p) be a function that returns the score of a point p Upper bound score of a rectangle R is Lower bound score is The function f( ) is called versatile iff SU(R) ≥ SU (Rc) and SL(R) ≤ SL (Rc) for every R and its child rectangle Rc R p Rc q f(p) = - dist(p,q) f(p) = dist(p,q) Presented by: Muhammad Aamir Cheema
Problem definition Versatile top-k query Return k objects with smallest scores Continuous versatile top-k query Continuously report top-k objects as the dataset changes R p Rc q f(p) = dist(p,q) Presented by: Muhammad Aamir Cheema
Related Work k Nearest Neighbors query Return k objects closest to the query point SEA-CNN [ICDE05] YPK [ICDE05] CPM [SIGMOD05] CircularTrip [DASFAA 07] iSEE [SSDBM 07] Presented by: Muhammad Aamir Cheema
Related Work k Furthest Neighbors query Return k objects furthest from the query point [JCSS89] [PR98] [WALCOM09] Presented by: Muhammad Aamir Cheema
Related Work Constrained k Nearest Neighbors query Return k objects closest to the query point among the objects that lie in a constrained region [SSTD01] [DASFAA10] Presented by: Muhammad Aamir Cheema
Related Work Aggregate k Nearest Neighbors query Given a set of query points, return k objects that have smallest aggregated distance. [TKDE05] [SIGMOD05] [ICCSA07] Presented by: Muhammad Aamir Cheema
Modeling spatial queries to versatile top-k queries k nearest neighbors query f(p) = dist(p,q) k furhtest neighbors query f(p) = - dist(p,q) Constrained k nearest neighbors query If p is inside the constrained region Else f(p) = ∞ Presented by: Muhammad Aamir Cheema
Modeling spatial queries to versatile top-k queries Aggregate k nearest neighbors query Sum Max Min Presented by: Muhammad Aamir Cheema
Conceptual Grid-Tree root Intermediate Entries Grid Cells Presented by: Muhammad Aamir Cheema
Initial Computation Insert root of grid-tree in heap with key set to zero While heap is not empty de-heap a rectangle R If SL(R) > q.scorek Return top-k objects If R is a cell of the grid Retrieve the objects in R and update top-k list and q.scorek Else For each child Rc of R If SL(Rc) ≤ q.scorek insert Rc in heap with key SL(Rc) Presented by: Muhammad Aamir Cheema
Continuous monitoring Phase 1: receive object and query updates. Change in the queries based on the update below. Internal update (vsf(oold)≤q.scorek Λ vsf(onew)≤q.scorek) Arrange the order of top-k list Incoming update (vsf(oold)>q.scorek Λ vsf(onew)<q.scorek) Insert the object into top-k list Outgoing update (vsf(oold)≤q.scorek Λ vsf(onew)>q.scorek) Remove the object from top-k list Presented by: Muhammad Aamir Cheema
Continuous monitoring … Phase 2: Check the status of each query one by one If query moved then Execute the initial algorithm. If top-k list contains at least k objects then Keep top k objects and remove rest of the objects. If top-k list contains less than k objects then Expand the search area by visiting more cells Presented by: Muhammad Aamir Cheema
Experiments We compare our algorithm with CPM [SIGMOD05] Moving objects are generated using Brinkhoff generator [GeoInformatica02] Presented by: Muhammad Aamir Cheema
Effect of grid size Presented by: Muhammad Aamir Cheema
Effect of k Presented by: Muhammad Aamir Cheema
Effect of agility Presented by: Muhammad Aamir Cheema
Aggregate kNN queries Presented by: Muhammad Aamir Cheema
Thank you… Questions??