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

A Unified Algorithm for Continuous Monitoring of Spatial Queries

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

A Unified Algorithm for Continuous Monitoring of Spatial Queries

Presented by: Muhammad Aamir Cheema

Joint work withMahady Hasan, Xuemin Lin, Wenjie Zhang

University of New South Wales, Australia

Presented by: Muhammad Aamir Cheema2

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 Cheema3

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

Rc

q

f(p) = dist(p,q)

p

f(p) = - dist(p,q)

Presented by: Muhammad Aamir Cheema4

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

Rc

q

f(p) = dist(p,q)

p

Presented by: Muhammad Aamir Cheema5

Related Work

k Nearest Neighbors queryReturn k objects closest to the query point– SEA-CNN [ICDE05]– YPK [ICDE05]– CPM [SIGMOD05]– CircularTrip [DASFAA 07]– iSEE [SSDBM 07]

Presented by: Muhammad Aamir Cheema6

Related Work

k Furthest Neighbors queryReturn k objects furthest from the query point– [JCSS89]– [PR98]– [WALCOM09]

Presented by: Muhammad Aamir Cheema7

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 Cheema8

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 Cheema9

Modeling spatial queries to versatile top-k queriesk 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) = ∞

Presented by: Muhammad Aamir Cheema10

Modeling spatial queries to versatile top-k queriesAggregate k nearest neighbors query

– Sum

– Max

– Min

Presented by: Muhammad Aamir Cheema11

Conceptual Grid-Tree

root

Intermediate Entries

Grid Cells

Presented by: Muhammad Aamir Cheema12

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 Cheema13

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

14

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

15

Experiments

• We compare our algorithm with CPM [SIGMOD05]• Moving objects are generated using Brinkhoff generator

[GeoInformatica02]

Presented by: Muhammad Aamir Cheema

16

Effect of grid size

Presented by: Muhammad Aamir Cheema

17

Effect of k

Presented by: Muhammad Aamir Cheema

18

Effect of agility

Presented by: Muhammad Aamir Cheema

19

Aggregate kNN queries

Presented by: Muhammad Aamir Cheema

Thank you…

Questions??