21
Continuous Intersection Joins Over Moving Objects Rui Zhang University of Melbourne Dan Lin Purdue University Kotagiri Ramamohanarao University of Melbourne Elisa Bertino Purdue University

Continuous Intersection Joins Over Moving Objects

  • Upload
    gudrun

  • View
    28

  • Download
    1

Embed Size (px)

DESCRIPTION

Continuous Intersection Joins Over Moving Objects. Rui Zhang University of Melbourne Dan Lin Purdue University Kotagiri Ramamohanarao University of Melbourne Elisa Bertino Purdue University. Outline. Backgrounds Intersection Joins on moving objects Indexes for moving objects - PowerPoint PPT Presentation

Citation preview

Page 1: Continuous Intersection Joins Over Moving Objects

Continuous Intersection Joins Over Moving Objects

Rui ZhangUniversity of Melbourne

Dan LinPurdue University

Kotagiri RamamohanaraoUniversity of Melbourne

Elisa BertinoPurdue University

Page 2: Continuous Intersection Joins Over Moving Objects

Outline

Backgrounds Intersection Joins on moving objects Indexes for moving objects

Algorithms Adapting existing algorithms Our approach

Time constrained processing Improvement techniques

Experiments

Page 3: Continuous Intersection Joins Over Moving Objects

Motivation (Traditional) Intersection join

Given two sets of spatial objects A and B, find all object pairs ‹i,j›, where iA, j B, such that i intersects j.

Intersection join on moving objects Moving Continuous

Page 4: Continuous Intersection Joins Over Moving Objects

Join Algorithms

Nested loops join Basic Expensive

Block nested loops join Efficient Dependent on buffer size

Index nested loops join Efficient and robust

Sort-merge join Efficient Difficult for spatial objects

Page 5: Continuous Intersection Joins Over Moving Objects

Indexing Moving Objects Monitoring moving objects

Sampling-based Trajectory-based

p = p ( t ref ) + v (t - t ref ) TM : maximum update inter

val

R-tree [SIGMOD’84] Minimum bounding rectang

le (MBR)

TPR-tree [SIGMOD’00] Add time parameters to the

R-tree

Other indexes: Bx-tree [VLDB’04], STRIPES [SIGMOD’04] Only for points

u u u

uu

u

u

N2N1N1

N2

N1

A C D

N1

B E

N2

F

N3 N3

A

B

C

D

E

F

Page 6: Continuous Intersection Joins Over Moving Objects

Naive Algorithm (NaiveJoin) Join nodes from two TPR-trees recursively

If intersected, check on children Otherwise, disregard it For an update, compute its join pairs and update the answer

Join result

‹a1,b1›, [0,3]

‹a2,b2›, [1,4]

‹a3,b4›, [6,8]

Node access (IO)

roots, N1, N2, N3, N4

Comparison (CPU)

root A vs root B, N1 vs N3, N2 vs N4

Page 7: Continuous Intersection Joins Over Moving Objects

Extended TP-Join Algorithm (ETP-Join) Time Parameterized Join (TP-Join) [SIGMOD’02]

Current result ‹a1,b1› Expiry time 1 Event that causes the change ‹a2,b2›

Join result

‹a1,b1›, [0,3]

‹a2,b2›, [1,4]

‹a3,b4›, [6,8]

root A vs root B, N1 vs N3

Comparison (CPU)

roots, N1, N3

Node access (IO)

For the 1st TP-Join

Page 8: Continuous Intersection Joins Over Moving Objects

Summary

NaiveJoin One tree traversal per up

date, but expensive traversal

ETP-Join Cheaper traversal, but

too frequent traversals

Node access (IO)

roots, N1, N2, N3, N4

Comparison (CPU)

root A vs root B, N1 vs N3, N2 vs N4

Node access (IO)

roots, N1, N3

Comparison (CPU)

root A vs root B, N1 vs N3

For the 1st TP-Join

Too long Too short

Page 9: Continuous Intersection Joins Over Moving Objects

Key Problem

Find a good time range for computing the join pairs

Observation

Consider object a and b Let the next update time for them be ta and tb Perfect time range for computing their join result is [tc, min(ta,tb)]

How do we know ta or tb?

TM gives a bound for them Time range is cut from [tc, ] to [tc, tc+TM]

Is this correct for all objects?

Yes. Proof in technical report: http://www.cs.mu.oz.au/~rui/publication/TR_mj.pdf

Page 10: Continuous Intersection Joins Over Moving Objects

Time Constrained Processing (TC-Join) NaiveJoin with constrained processing time ra

nge [tc, tc+TM]

Join result

‹a1,b1›, [0,3]

‹a2,b2›, [1,4]

‹a3,b4›, [6,8]

Node access (IO)

roots, N1, N3

Comparison (CPU)

root A vs root B, N1 vs N3

Page 11: Continuous Intersection Joins Over Moving Objects

Further Optimization (MTB-Join)

Many objects will not update at the time bound

Put objects in time buckets

Each time bucket has an associated TPR-tree An object is inserted into the tree whose time

bucket contains the object’s latest update time

tc is in [TM, 3/2TM]

Page 12: Continuous Intersection Joins Over Moving Objects

Improvement on the Basic Join Algorithm

Plane Sweep

Sorting based on the lower left corner in dimension x Two sequences: Sa = ‹a3, a4, a5›; Sb = ‹ b1, b2, b3, b4›

Two essential components for PS

Lower bound Upper bound

Page 13: Continuous Intersection Joins Over Moving Objects

Other Improvements

Sorting dimension selection Smaller average speed

Intersection check First intersection check and then plane sweep

Page 14: Continuous Intersection Joins Over Moving Objects

Experiments: setting Computer: 2.6G Pentium IV CPU, 1G RAM

Datasets: Uniform, Gaussian, Battlefield

Measure: IO and Time

Parameter Value

Node capacity 113

Maximum update interval (TM) 60, 120, 240

Maximum object speed 1, 2, 3, 4, 5

Object size (% of space) 0.5, 0.1, 0.2, 0.4, 0.8

Dataset size 1K, 10K, 50K, 100K

Dataset Uniform, Gaussian, Battlefield

Page 15: Continuous Intersection Joins Over Moving Objects

Experiments: TC processing

Up to 15 times improvement

Page 16: Continuous Intersection Joins Over Moving Objects

Experiments: Improvement techniques

Up to 6 times improvement

Page 17: Continuous Intersection Joins Over Moving Objects

Comparison: Initial Join

MTB-Join outperforms others

Half an hour for NaiveJoin

Page 18: Continuous Intersection Joins Over Moving Objects

Comparison: Maintenance

Up to 104 times improvement

Time for processing the join for one second

1K 10K 100K

MTB-Join 0.03 millisecs 0.05 secs 6 secs

ETP-Join 6.3 secs 15 mins hours

Page 19: Continuous Intersection Joins Over Moving Objects

Conclusion and future work

Conclusion

Time Constrained processing

Further optimization by bucketing in time

Improvement techniques

Several orders of magnitude performance improvement

Future work

Applying TC processing to other queries

Page 20: Continuous Intersection Joins Over Moving Objects

References R-tree [SIGMOD’04]

Antonin Guttman. R-Trees: A Dynamic Index Structure for Spatial Searching . ACM SIGMOD Conference 1984.

TPR-tree [SIGMOD’00] S. Saltenis, C. S.Jensen, S. T. Leutenegger, and M. A. Lopez. Indexing the

positions of continuously moving objects. ACM SIGMOD Conference 2000.

Bx-tree [VLDB’04] C. Jensen, D. Lin, and B.C.Ooi. Query and update efficient B+-tree based

indexing of moving objects. International conference on Very Large Databases, 2004.

STRIPES [SIGMOD’04] J. M. Patel, Y. Chen, and V. P. Chakka. STRIPES: An efficient index for pre

dicted trajectories. ACM SIGMOD Conference 2004.

TP-Join [SIGMOD’02] Y. Tao and D. Papadias. Time-parameterized queries in spatio-temporal d

atabases. ACM SIGMOD Conference 2002.

Page 21: Continuous Intersection Joins Over Moving Objects

Questions

Please send your questions to

Rui Zhang

[email protected]