A Unified Algorithm for Continuous Monitoring of Spatial














![Experiments • We compare our algorithm with CPM [SIGMOD 05] • Moving objects are Experiments • We compare our algorithm with CPM [SIGMOD 05] • Moving objects are](https://slidetodoc.com/presentation_image_h2/bfb98c0156021034dbe6e73b1e5ac509/image-15.jpg)





- Slides: 20
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 2 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 R p Rc • 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 3 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) 4 Presented by: Muhammad Aamir Cheema
Related Work k Nearest Neighbors query Return k objects closest to the query point – SEA-CNN [ICDE 05] – YPK [ICDE 05] – CPM [SIGMOD 05] – Circular. Trip [DASFAA 07] – i. SEE [SSDBM 07] 5 Presented by: Muhammad Aamir Cheema
Related Work k Furthest Neighbors query Return k objects furthest from the query point – [JCSS 89] – [PR 98] – [WALCOM 09] 6 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 – [SSTD 01] – [DASFAA 10] 7 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. – [TKDE 05] – [SIGMOD 05] – [ICCSA 07] 8 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 – f(p) = dist(p, q) • Else – f(p) = ∞ 9 Presented by: Muhammad Aamir Cheema
Modeling spatial queries to versatile top-k queries Aggregate k nearest neighbors query – Sum – Max – Min 10 Presented by: Muhammad Aamir Cheema
Conceptual Grid-Tree root Intermediate Entries Grid Cells 11 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) 12 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 13 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 14 Presented by: Muhammad Aamir Cheema
Experiments • We compare our algorithm with CPM [SIGMOD 05] • Moving objects are generated using Brinkhoff generator [Geo. Informatica 02] 15 Presented by: Muhammad Aamir Cheema
Effect of grid size 16 Presented by: Muhammad Aamir Cheema
Effect of k 17 Presented by: Muhammad Aamir Cheema
Effect of agility 18 Presented by: Muhammad Aamir Cheema
Aggregate k. NN queries 19 Presented by: Muhammad Aamir Cheema
Thank you… Questions? ?