58
Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang § , Manli Zhu § , Dimitris Papadias § , Yufei Tao , Dik Lun Lee § Department of Computer Science § Hong Kong University of Science and Technology and Carnegie Mellon University Presented By Sreepraveen Veeramachaneni

Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

Embed Size (px)

DESCRIPTION

11/18/20023 Introduction The paper proposes an approach that enables mobile clients to determine the validity of previous queries based on their current location. Two types are spatial queries are discussed 1.Window Queries 2.Nearest Neighbor Queries

Citation preview

Page 1: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

Location-based Spatial Queries

AGM SIGMOD 2003Jun Zhang§, Manli Zhu§, Dimitris Papadias§, Yufei Tao†, Dik

Lun Lee§

Department of Computer Science§Hong Kong University of Science and Technology

and†Carnegie Mellon University

Presented By Sreepraveen Veeramachaneni

Page 2: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 2

Outline

• Introduction• General techniques in spatial query Processing• Motivation • Background• Location-based nearest neighbor search• Location-based window queries• Experiments• Summary• References

Page 3: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 3

Introduction

• The paper proposes an approach that enables mobile clients to determine the validity of previous queries based on their current location.

• Two types are spatial queries are discussed

1.Window Queries 2.Nearest Neighbor Queries

Page 4: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 4

Techniques In use

• Spatial databases have been extensively studied during the last two decades and several spatial access methods have been proposed.

• The most popular one is R-tree and its variations like R* -tree.

• R-trees can be viewed as multi-dimensional extensions of B-trees.

Page 5: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 5

R-treeAssuming capacity of 3 entries per node. Points that are close in space are clustered in the same leaf node represented as a MBR. Nodes are then recursively grouped together following the same principle until the top level, which consists of a single root

Page 6: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 6

R tree Contd.

• This technique is used to answer window queries

• Another important type of spatial information processing is nearest neighbor query, which retrieves the data point that is closest to a query point

Page 7: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 7

Branch and Bound Algorithm

• Roussopoulos et al., proposed a branch and bound algorithm that searches the R-tree in a depth first manner.

• Starting from root, all entries are sorted according to their minimum distance from the query point, and the entry with the smallest value is visited first.

• The process is repeated recursively until the leaf level where the first potential nearest neighbor is found.

• During backtracking to upper levels, the algorithm only visits entries whose mindist is smaller than the distance of the nearest neighbor already found.

Page 8: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 8

Page 9: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 9

Outline

• Introduction• General techniques in spatial query Processing• Motivation • Background• Location-based nearest neighbor search• Location-based window queries• Experiments• Summary

Page 10: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 10

Traditional Scenario

The traditional scenario in spatial databases assumes that(i) Queries are static and(ii) Each query returns a single output and

terminates.

Page 11: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 11

Where Is Your Nearest Restaurant?

user

a

• Traditional nearest neighbor search in spatial databases considers static query points.

Page 12: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 12

What if You Move?

• Getting only the nearest neighbor is inadequate: When will it expire?

user moving on a highway

a b

the nearest restaurantchanges here

Page 13: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 13

• The conventional approach to attain up-to-date information is to pose a new query to the server after a position update, which could lead to high network overhead and extra processing effort.

• And due to high mobility of the user, the result may be invalidated immediately as the user’s position changes

Page 14: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 14

Outline

• Introduction• General techniques in spatial query Processing• Motivation • Background• Location-based nearest neighbor search• Location-based window queries• Experiments• Summary

Page 15: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 15

First spatial query processing Technique for Mobile computing[ Zheng, Lee SSTD 2001]

• The first technique was to pre-compute and store in an R-tree the Voronoi diagram of the dataset.

• Voronoi Diagram: The Voronoi diagram of a collection of geometric objects is a partition of space into cells, each of which consists of the points closer to one particular object than to any others

Page 16: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 16

• When a nearest neighbor query arrives at the server, the Voronoi diagram is used to efficiently compute the nearest neighbor

Page 17: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 17

• In addition to result, the server sends back to the client the client the validity time T of the result, which is a conservative approximation assuming that the query’s speed is below a maximum value.

• Problem: Difficult to estimate the value of Query speed. A high value will result in very short T and a low value will result in false misses

• The method only deals with single nearest neighbor queries and retrieval of K neighbors would require order-K Voronoi diagrams , which are complicated and incur large space overhead.

Page 18: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 18

K- Nearest neighbor query[ Song, Roussopoulos, SSTD 2001]

• Song and Roussopoulos proposed a technique that does not assume Voronoi diagrams and can be used for any number of neighbors.

• When a k nearest neighbor query q arrives, the server computes and returns to the client a number m > k of neighbors.

Page 19: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 19

Implementation

• Let dist (k) and dist (m) be the distances of the kth and mth nearest neighbor from the query point q.

• If the client re-issues the query at a new location q’, the new k nearest neighbors will be among the m objects of the first query, provided that

2.dist(q,q’) ≤ dist(m) – dist(k)

Page 20: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 20

Example• The figure shows an example

for a 2-nearest neighbor query at location q, where the server returns four results o, a, b and c ( the nearest neighbors are o and a)

• When the client moves to the location q’, the two NN are o and b.

• If 2.dist(q, q’) ≤ dist(4) – dist(2), the client can determine this by computing new distances (wrt to q’) of the four objects, with out having to issue a new query to the server

Page 21: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 21

Problems

• An obvious problem of this approach lies in obtaining a proper value of m

• A high value will increase the network overhead and the storage requirements at the client, while a low value may be useless( if it does not reduce the number of queries)

• m depends on factors like data distribution and query frequency which are difficult to estimate

Page 22: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 22

Time Parameterized Nearest Neighbor (TP NN) Tao and Papadias, SIGMOD02]• Given a query moving with steady velocity, return all

nearest neighbor results ( up to a future timestamp), i.e., the output is a set of tuples <Ri, Ti>, where Ri is the set of nearest neighbors during future interval Ti

• For this situation, the concept of time parameterized queries can be applied for both window queries and nearest neighbor queries.

• When a server receives a request from a client , it executes a TP query and returns <R,T,C>, where R is the set of objects satisfying the corresponding spatial query (current result), T is the validity time of R, and C is the result change at T

• From the set of objects in R, and the set of objects in C that will cause the changes , the client can incrementally compute the next result

Page 23: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 23

TP window Query• Consider, that a client

moving east with speed one issues a window query.

• The server returns <{b}, 1, {-b}> meaning that object b currently intersects the query window, but after 1 time unit it will stop doing so and therefore, b should be removed from the result.

Page 24: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 24

Influence of a Object

• The result of a spatial query changes in future because some objects “influence” its correctness.

• If an object (e.g., b) satisfies the query at the current time, it may influence the result when it no longer satisfies it in the future (at time 1).

• An object not currently in the result (e.g., d) may influence the query when it becomes part of the result (at time 2).

• Some objects such as a and c, may never change the result, so their influence time is set to ∞

Page 25: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 25

Time Parameterized Nearest Neighbor (TP NN)[Tao and Papadias, SIGMOD02]

• Returns:– The nearest neighbor R of the current query location– The expiry time T of R (given the query’s movement)– The change C of the result at T

20 4 6 8 10

2

4

6

8

10

x axis

y axis

b

c

a

d

e f

g h

i jk

l

m

query (speed 1)

its position at time 2

Result: R={i}, T=2, C={j}

Page 26: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 26

Problem with the techniques discussed so far:• All the techniques we discussed for mobile

computing presuppose that future locations of clients can be calculated using their current movements (i.e., the velocity of client is known and constant during the lifespan of the query)

• But in many applications query velocities are continuously updated as the users change their speed or direction of movement

• Motivated by this, the authors introduce a technique where, instead of time, the validity of the result is determined by the users location in space.

Page 27: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 27

Outline

• Introduction• General techniques in spatial query Processing• Motivation • Background• Location-based nearest neighbor search• Location-based window queries• Experiments• Summary

Page 28: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 28

Location-Based Nearest Neighbors

Assumptions: We assume that there exists a spatial index (e.g.,

R-trees) for data objects, but no specialized structures (e.g., Voronoi diagrams) for nearest neighbor search.

Page 29: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 29

• Some users (say, a tourist walking causally) cannot specify their heading directions clearly.

user

a

as long as you are here"a" is your nearest restaurant

Getting You Covered by the Nearest Restaurant

Page 30: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 30

• In addition to the nearest restaurant, we also return the validity region of this restaurant.

• Another query is issued to retrieve the new nearest restaurant, only if the user moves out of this region.

user

a

as long as you are here"a" is your nearest rest.

Validity Region of the Result

Page 31: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 31

• Points that determine the influence region.

user

a

as long as you are here"a" is your nearest rest.

Influence Points

Page 32: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 32

• Keeping the influence points avoids the “in-polygon” check.

– The user only needs to check if her/his location is closer to any yellow point than a.

user a

b

Influence Points

Page 33: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 33

Validity Region: A Closer Look

• The validity region of q is the Voronoi Cell (VC) of o.

q

o

a

b

c

d

validityregion

perpendicular bisectorof a and o

Page 34: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 34

Pre-Compute the Voronoi Diagram?• Bad idea!

• To answer kNN of a specific value k, a k-order Voronoi Diagram is necessary.

– If we want to answer NN, 2NN, …, 20NN, then 20 sets of Voronoi Diagrams are necessary.

• Huge space!

• Poor support for data update.

• Our solution: Compute the cell on the fly.

– Use a single R-tree

– Support all values of k

Page 35: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 35

Relationship with Time Parameterized NN

• If q moves towards l, then its nearest restaurant will change to point a at position q’.– The corresponding TP query q returns: (i) o, (ii), a,

and (iii) q’.

q

o

a

b

c

d

l

q'

perpendicular bisectorof a and o

Page 36: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 36

Algorithm

• Step 1 – Find the current NN• Step 2 – Use TP NN queries to tighten the validity

region progressively

v3

oq

v1 v2

v4

b

c

a

v3

oq

v1v2

v4la c

a

v5

v6

Page 37: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 37

Algorithm• Step 2 – Use TP NN queries to tighten the validity

region progressively

v3

oq

v1v2

v4v6

b

c

a

v5

v7

v9

v8

v10 v3

oq

v1 v2

v4

v8

v6

v7

v9

v10

b

c

a

v5

• The algorithm issues totally 2Sinf TP NN queries, where Sinf is the number of influence points.

• This algorithm generalizes to computing k-order Voronoi Cells for arbitrary values of k (see the paper for details).

Page 38: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 38

Extensions to k NN queries

• The above method can be easily applied to k nearest neighbor queries, where the validity region is the maximal area around the query, where each point has the same set of k nearest neighbors.

Page 39: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 39

Outline

• Introduction• General techniques in spatial query Processing• Motivation • Background• Location-based nearest neighbor search• Location-based window queries• Experiments• Summary• References

Page 40: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 40

• Some users would consider more restaurants in their vicinity.

• The validity region here is such that, as long as the user stays in this region, the query result does not change.

Location-based Window Queries: Find All Close Restaurants

a

bc

g

user location

query window

d

e

validity region

Page 41: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 41

Location-based Window Queries

• The focus f of the window query q is the centroid of the query window

• The validity region V (q) of a query q is the maximal area around the query focus (i.e., f є V (q)) where the query result R (q) does not change

• The points that satisfy q are called inner objects, and those outside the query window outer objects

Page 42: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 42

Location-based Window Queries

• The Minkowski region of each point (e.g., a) is a rectangle (ra) identical to the query window whose centroid lies on the corresponding point (a)

• If query focus moves inside ra, the query result always contains object a.

• The intersection of the inner Minkowski regions corresponds to inner validity region.

Page 43: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 43

• If the user location is at the boundary of the validity region, the corresponding query window’s boundary will cross some data point.

The Validity Region of Window Queries

a

bc

g

user location

query windowd

e

Page 44: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 44

• If the user location is at the boundary of the validity region, the corresponding query window’s boundary will cross some data point.

The Validity Region of Window Queries

a

c

gquery window

d

e

user location

b

Page 45: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 45

• If the user location is at the boundary of the validity region, the corresponding query window’s boundary will cross some data point.

The Validity Region of Window Queries

a

c

gquery window

d

e

user location

b

Page 46: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 46

• If the user location is at the boundary of the validity region, the corresponding query window’s boundary will cross some data point.

The Validity Region of Window Queries

a

c

gquery window

d

e

user location

b

Page 47: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 47

a

bc

g

user location

query window

d

e

validity region

• In addition to the query result {a,b,c}, the user is also aware of 2 inner influence points {a,b} and 2 outer influence points {d,e}.

• The original result is invalidated if the query window:– Does not cover any inner influence point.– Covers any outer influence point

• The user does not need to store the actual boundary of the validity region).

The Influence Points

Page 48: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 48

• First get the query result {a,b,c} (a traditional window query).

• Then the influence points.– Using Time Parameterized Window Queries (see

paper).

Retrieving the Influence Points

a

bc

g

user location

query window

d

e

validity region

Page 49: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 49

Outline

• Introduction• General techniques in spatial query Processing• Motivation • Background• Location-based nearest neighbor search• Location-based window queries• Experiments• Summary• References

Page 50: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 50

Experiments• Datasets

– GR (23K, data space 800km800km),

– NA (569K, data space 7000km7000km)

• Disk page size set to 4k bytes

• Index: R*-tree

• Queries

– LB kNN – parameter k

– LB WQ – parameter query length

– Each workload consists of 200 queries with the same parameters distributed uniformly in the data space.

Page 51: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 51

Experiments

• The area of validity region drops linearly with cardinality since the number voronoi cells increases ( while the area of data space remains constant).

• Under all settings the average number of edges in a voronoi cell is 6 for uniform datasets which is equal to number of influence objects.

Page 52: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 52

Experiment 1: Number of Influence Points for LB kNN

0

2

4

6

8

1 3 10 30 100k

num of influence points

GR

0

2

4

6

8

1 3 10 30 100k

num of influence points

NA

• The number of influence objects decreases to 4 for k>10. this is because for k>1, an influence object may contribute more than one edge (since it can form perpendicular bisector with any of the k nearest neighbors of the query), while the total number of edges remains around 6.

Page 53: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 53

Experiment 2: Query cost for LB kNN

0

20

40

60

80

100

1 3 10 30 100k

NN queryTPNN queries

GR

NA

0

20

40

60

80

100

1 3 10 30 100k

NANN queryTPNN queries

NA

• The above figure shows the number of node accesses as a function of cardinality for k = 1

• The number of nodes accesses for TPNN queries is about 12 times that of the regular nearest neighbor query because, on average we need 6 TPNN queries to retrieve the influence objects and another 6 queries to confirm the vertices of the validity region.

Page 54: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 54

Experiment 2: Query cost for LB kNN with a buffer

0

1

2

3

4

1 3 10 30 100k

PANN queryTPNN queries

GR (10% buffer)

0

1

2

3

4

5

1 3 10 30 100k

PANN queryTPNN queries

NA (10% buffer)

• As we can see, using an LRU buffer equal to 10% of the R-tree size the actual cost of TPNN queries reduces significantly, since all the queries access similar parts of the data space.

• Thus, given a relatively small buffer, the overhead imposed by location-based NN queries is not significant

Page 55: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 55

Experiment 3: Number of Influence Points for LB WQ

0

1

2

3

4

5

6

100 300 1000 3000 10000

inner influence objectsouter influence objects

2 (km )qs

|Sinf |

GR

0

1

2

3

4

5

6

100 300 1000 3000 10000

inner influence objectsouter influence objects

2 (km )qs

|Sinf |

NA

Page 56: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 56

Experiment 4: Query cost for LB WQ

0

5

10

15

20

100 300 1000 3000 10000

PA

0.39

0.260.230.20

query for resultquery for inf objs 4.9

2 (km )qsGR

0

10

20

100 300 1000 3000 10000

PA query for resultquery for inf objs

0.29

0.28

0.230.150.115

15

2 (km )qsNA

Page 57: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 57

Conclusion

• Location-based queries retrieve the validity regions for the query results.

– We considered kNN and window queries.

• Future work

– Apply the concept of validity region to other types of queries (e.g., range queries).

– Study the incremental computation of the query result (i.e., what happens after the user exits the validity region?)

Page 58: Location-based Spatial Queries AGM SIGMOD 2003 Jun Zhang §, Manli Zhu §, Dimitris Papadias §, Yufei Tao †, Dik Lun Lee § Department of Computer Science

11/18/2002 58

References

1. Song, Z., Roussopoulos, N. K-Nearest Neighbor Search for Moving Query Point. SSTD 2001

2. Tao, Y., Papadias, D. Time Parameterized Queries in Spatio-Temporal Databases. SIGMOD 2002

3. Zheng, B., Lee, D. Semantic Caching in Location Dependant Query Processing. SSTD 2001

4. Roussopoulos, N., Kelly, S., Vincent, F. Nearest Neighbor Queries. SIGMOD 1995