efficient algorithms to monitor continuous constrained k nearest neighbor queries

29
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

Upload: nomlanga-kirby

Post on 31-Dec-2015

38 views

Category:

Documents


2 download

DESCRIPTION

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

TRANSCRIPT

Efficient Algorithms to Monitor Continuous Constrained k Nearest Neighbor Queries

Presented by: Mahady Hasan

Joint work withMuhammad Aamir Cheema, Wenyu Qu, Xuemin Lin

University of New South Wales, Australia

Wednesday, April 19, 2023 Presented by: Mahady Hasan2

Outline of the Presentation

• Introduction

• Related Work (Motivation)

• GridTree Approach

• ArcTrip Approach

• Continuous monitoring

• Experiments

• Conclusion

Wednesday, April 19, 2023 Presented by: Mahady Hasan3

What is NN?

o1

o2

o3

o4

o5

o6

o7

o8

o9

qo3

o4

R

Finding kNN objects. Let k=3Finding contrained kNN objects. Let k=3

o5

o7

o4

o6o3

What is Constrained NN?

Wednesday, April 19, 2023 Presented by: Mahady Hasan4

Outline of the Presentation

• Introduction

• Related Work (Motivation)

• GridTree Approach

• ArcTrip Approach

• Continuous monitoring

• Experiments

• Conclusion

Wednesday, April 19, 2023 Presented by: Mahady Hasan5

Related works

• Constrained kNN 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)

Wednesday, April 19, 2023 Presented by: Mahady Hasan6

c55

c45

c35

c54

c44

c34

c53

c43

c33

Related work: CPM

U0

D0

R 0

L 0

U1

R 1

D1

L 1

U2

R 2

D2

L 2

Heap

c44 U0 L0 D0 R0c54 c55 U1

qo5

o7

o1o3

o8

o6

o4

o2 L0 D0 c55R0 U1c43 c53

o5

o5

D0c34 R0 c55 o5 U1c33

R0 c55 o5 U1

L1

L1 D1

L1 D1c45 c35 R1o5

Finding one Nearest Neighbor

We check an cell or entry before we insert in the heap that it intersects with the given constrained region or not.

Wednesday, April 19, 2023 Presented by: Mahady Hasan7

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 cellin 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 updatethe data efficiently.

So we use some other access methods that are more naturalwith our problem setting

Wednesday, April 19, 2023 Presented by: Mahady Hasan8

Outline of the Presentation

• Introduction

• Related Work (Motivation)

• GridTree Approach

• ArcTrip Approach

• Continuous monitoring

• Experiments

• Conclusion

Wednesday, April 19, 2023 Presented by: Mahady Hasan9

Concept of Grid-Tree Structure

root

Intermediate Entries

Grid Cells

Wednesday, April 19, 2023 Presented by: Mahady Hasan10

Grid-Tree based NN search algorithm

Heap

R2

R4

R3

R1

c11

c12c13

c14

c21

c22c23

c24

q

o1 o3

o9o5

o8

o7

o2

o6

o4

root

root

R1 R2 R3R4

R2 R3R4c11c12 c13 c14

R3R4c11c13 c14c21 c22 c23c24 o9o8 o6

o8

Wednesday, April 19, 2023 Presented by: Mahady Hasan11

R1c44

R4

c33

R3

R2

Grid-Tree Based constrained NN Algorithm

c43

c34

c41

c42

c31

c32R

q

o1

o2

o3

o4

o5

o6

o7

o8

root

Heap

root

R4 R3

o7

o8

o1

c42 R3 c43

o5

c31 c43c32 c33c34

c43c32 o2 c33c34

c43c32 o2 c33c34 o4

o2

Wednesday, April 19, 2023 Presented by: Mahady Hasan12

Outline of the Presentation

• Introduction

• Related Work (Motivation)

• GridTree Approach

• ArcTrip Approach

• Continuous monitoring

• Experiments

• Conclusion

Wednesday, April 19, 2023 Presented by: Mahady Hasan13

Concept of ArcTrip

c11

c21

c31

c41

c12

c22

c32

c42

c13

c23

c33

c43

c14

c24

c34

c44

q

θstart

θend

r

cstart

Output:•cells that intersect the arc with in θstart and θend

with radius r from the query point q

Input:•Radius r•Angle range θstart , θendθstart θend

r

Returned values are c22, c32, c33

Wednesday, April 19, 2023 Presented by: Mahady Hasan14

c11

c21

c31

c41

c12

c22

c32

c42

c13

c33

c43

c14

c24

ArcTrip Based contained NN Algorithm

q

o1

o3

o9o5

o7

o2 o6

o4

θstart

θend

r

Heap

c22 c32

cNN

o5

q.cNNdist

c42

o3

o5

o3o3

Finding 1 constrained NN

Wednesday, April 19, 2023 Presented by: Mahady Hasan15

Outline of the Presentation

• Introduction

• Related Work (Motivation)

• GridTree Approach

• ArcTrip Approach

• Continuous monitoring

• Experiments

• Conclusion

Wednesday, April 19, 2023 Presented by: Mahady Hasan16

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

Wednesday, April 19, 2023 Presented by: Mahady Hasan17

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

Wednesday, April 19, 2023 Presented by: Mahady Hasan18

Outline of the Presentation

• Introduction

• Related Work (Motivation)

• GridTree Approach

• ArcTrip Approach

• Continuous monitoring

• Experiments

• Conclusion

Wednesday, April 19, 2023 Presented by: Mahady Hasan19

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).

Wednesday, April 19, 2023 Presented by: Mahady Hasan20

Grid cardinality effect

16 3.5480.0003.5483.54803.5483.5480.2293.778 .1323.5500.0003.5503.55003.5503.5500.2973.847 .6643.5580.0003.5583.55803.5583.5580.7164.274 1.11283.5730.0003.5733.57303.5733.5732.2275.800 1.62563.6190.0003.6193.61903.6193.6198.17111.790 2.15123.7430.0003.7433.74303.7433.74330.72934.472 2.6

Need to check too many objects.

Need to check many empty cells.

Wednesday, April 19, 2023 Presented by: Mahady Hasan21

Grid Memory Effect

CPM stores the heap and the visit list.

Wednesday, April 19, 2023 Presented by: Mahady Hasan22

Effect of k size

Wednesday, April 19, 2023 Presented by: Mahady Hasan23

Cardinality Effect

Updating in CPM become expensive

Wednesday, April 19, 2023 Presented by: Mahady Hasan24

Speed Effect

In CPM paper it was showed that speed has no affect.

Wednesday, April 19, 2023 Presented by: Mahady Hasan25

Agility effect

With increase in query agility CPM needsto compute the results from the scratch.

Object agility results more updates so the computation cost increases.

Wednesday, April 19, 2023 Presented by: Mahady Hasan26

Outline of the Presentation

• Introduction

• Related Work (Motivation)

• GridTree Approach

• ArcTrip Approach

• Continuous monitoring

• Experiments

• Conclusion

Wednesday, April 19, 2023 Presented by: Mahady Hasan27

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.

Thank you…

Questions??

Wednesday, April 19, 2023 Presented by: Mahady Hasan29

Some changes to calculate distance

q

Cell 1Cell 2

R

mindist(q,Cell1)maxdist(q,Cell2)mincdist(q, Cell1)maxcdist(q, Cell2)