1 / 26

Spatio-Temporal Queries and Indexing

Spatio-Temporal Queries and Indexing. Rui Zhang http://www.csse.unimelb.edu.au/~rui The University of Melbourne. Outline. Backgrounds Spatio-temporal queries Spatio-temporal indices Indexing historical data HR-tree Indexing current (and future) data Dual transformation TPR-tree.

riva
Télécharger la présentation

Spatio-Temporal Queries and Indexing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Spatio-Temporal Queries and Indexing Rui Zhang http://www.csse.unimelb.edu.au/~rui The University of Melbourne

  2. Outline • Backgrounds • Spatio-temporal queries • Spatio-temporal indices • Indexing historical data • HR-tree • Indexing current (and future) data • Dual transformation • TPR-tree

  3. Spatio-temporal data and applications Examples: Continuously report the closest gas station on my way home? Remind me to buy drinks when I’m close to a supermarket Predict how many vehicles will be in the CBD in the next hour. In summary, queries involve spatial objects (e.g., points, lines, polygons) and time

  4. Continuous Range Query • Range queries: find all the objects that will intersect a given range Q and the time they intersect Q Result: R={b} R={b}, [0,1]

  5. Continuous NN Query • NN queries: find the nearest object to a given query point q at all timestamps Result: R={d} R={f} {d [0,1.5]; f (1.5, ∞]}

  6. Spatio-temporal Aggregate Queries • Aggregate queries • Aggregate range query: find how many objects passed through a range Q during a given time interval T • Density query: find all regions whose density at t is larger than 

  7. Continuous Join Query • Join queries • given two moving object sets, find all the pairs of objects whose extents intersect for every timestamp Result: R={ ‹A1, B1› [0 , 3] , ‹A4, B3› [0 , 4] , ‹A3, B2› [1 , 3] , ‹A5, B3› [2 , 6] }

  8. Spatio-temporal Data Indexing • Indexing historical data: store the history of a spatio-temporal evolution. • HR-tree • Indexing current data: find the current (and future) positions of moving objects. • Dual-transformation • TPR-tree

  9. Indexing Historical data Snapshot based approach • Spatio-temporal Evolution

  10. Historical R-tree (HR-tree) An R-tree is maintained for each timestamp in history. Trees at consecutive timestamps may share branches to save space. o4 o3 timestamp 1 o1 o6 p2 o5 p1 o2 p3 o7 timestamp 1 p1 p2 p3 M. Nascimento and M. Silva, Towards historical R-trees, in SAC, pages 234-240, 1998 o1 o2 o3 o4 o5 o6 o7

  11. timestamp 2 p1 p2’ p3’ o3 o4 o3 o4 o5’ HR-tree o4 o3 timestamp 2 o1 o6 p2’ o5’ p1 o2 p3’ o7 timestamp 1 p1 p2 p3 o1 o2 o3 o4 o5 o6 o7

  12. Dual transformation • Trajectories are plotted as lines in the time-location space (y, t); p(t) = vt+a trajectories o 1 o 2 o 3 o 4 • J. Patel, Y. Chen and V. Chakka, STRIPES: an efficient index for predicted trajectories, in SIGMOD, pages 635-645, 2004. (t) time

  13. Dual space-time • Idea: map a line to a point (y) location intercept trajectories o o 1 1 o 2 o 3 o 4 o 2 o 3 (t) time slope intercept

  14. Dual space-time indexing • Query must be transformed. [(y1q, y2q), (t1q, t2q)] • a + t2qv >= y1q and a+ t1q v <= y2q , for v>0 • a + t1qv >= y1q and a+ t2q v <= y2q , for v<0

  15. Dual space-time indexing for 2D Objects • Map a moving point p with location (px, py) and velocity (vx, vy) to the 4D point (vx, ax, vy, ay) • Query is also transformed to a linear constraint query: Q=[(x1q, x2q), (y1q, y2q), (t1q, t2q)] • ax + t2qvx >= x1q and ax+ t1q vx <= x2q • ay + t2qvy >= y1q and ay+ t1q vy <= y2q • x1qvy - y2qvx <= axvy – ayvx<= x2qvy -y1q vx

  16. Time-Parametrised R-tree(TPR-tree) • Store the MBRs as functions of time • MBR(t) = MBR(t0) + V(t) • The MBRs grow with time, at any time instant in the future we can compute the “MBR” • S. Saltenis, C. Jensen, S. Leutenegger, M. Lopez, Indexing the Positions of Continuously Moving Objects, in SIGMOD, pages 331-342, 2000. • Y. Tao, D. Papadias, J. Sun, The TPR*-tree: an optimized spatio-temporal access method for predictive queries, in VLDB, pages 790-801, 2003.

  17. TPR-treeMoving Object Representation • Storing the locations of moving objects is a challenge: • Update the database with the new locations • Use a function of time f(t) to store a location • Update overhead is reduced • update the database only when velocity changes u u u u u u u

  18. TPR-treeMotion function • For each object, the database stores • Its minimum bounding rectangle (MBR) at the reference time 0 • Its current velocity bounding rectangle (VBR) {vx1,vx2,vy1,vy2} • Examples: MBR(a)={2,4,3,4}, VBR(a)={1,1,1,1}; MBR(c)={8,9,8,9}, VBR{c}={-2,0,0,2} • An update is necessary only when an object’s VBR changes.

  19. (a) The boundaries at current time 0 (b) The boundaries at future time 1 TPR-treeMBRs

  20. TPR-treeInsertion and Deletion • Insertion and Deletion similar to R-tree • The only difference is that you have to compute the values overlap and volume over time • Trick: try to optimize the structure for the next T time instants • Another optimization: when you update an object, re-compute the MBR at the current time (TPR*-tree)

  21. TPR-tree: NN Queries • Assume PNN be the current NN of query q; • The time that q’s NN changes to another data point o, TINF, equals the time q crosses the perpendicular bisector of line segment PNNo TINF(o, q)=1.5

  22. TPR-tree: NN Queries • The time that q’ NN changes to a data object in a non-leaf entry E of the TPR-tree, TMININF(E, q), depends on mindist(E, q).

  23. TPR-tree: Join QueriesNaiveJoin • 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

  24. TPR-tree: Join QueriesTime-constrained Join (TC-Join) R. Zhang, J. Qi, D. Lin, W. Wang, R. C. Wong. A Highly Optimized Algorithm for Continuous Intersection Join Queries over Moving Objects, VLDB Journal,  21 (4), pages 561-586, 2012. • NaiveJoin with constrained processing time range [tc, tc+TM]

  25. Summary of the Indexing Techniques

  26. Recommended Readings and References • Spatio-temporal queries • Y. Tao and D. Papadias. Time-parameterized queries in spatio-temporal databases, in SIGMOD, pages 334-345, 2002. • R. Zhang, H. V. Jagadish, B. T. Dai, K. Ramamohanarao. Optimized Algorithms for Predictive Range and KNN Queries on Moving Objects. Information Systems, 35(8): 911-932, 2010. • C. S. Jensen, D. Lin, B. C. Ooi, R. Zhang. Effective Density Queries of Continuously Moving Objects. in ICDE, 2006. • R. Zhang, J. Qi, D. Lin, W. Wang, R. C. Wong. A Highly Optimized Algorithm for Continuous Intersection Join Queries over Moving Objects, VLDB Journal,  21 (4), pages 561-586, 2012. • HR-tree • M. Nascimento and M. Silva, Towards historical R-trees, in SAC, pages 234-240, 1998. • Dual transformation • J. Patel, Y. Chen and V. Chakka, STRIPES: an efficient index for predicted trajectories, in SIGMOD, pages 635-645, 2004. • TPR-tree • S. Saltenis, C. Jensen, S. Leutenegger, M. Lopez, Indexing the Positions of Continuously Moving Objects, in SIGMOD, pages 331-342, 2000. • Y. Tao, D. Papadias, J. Sun, The TPR*-tree: an optimized spatio-temporal access method for predictive queries, in VLDB, pages 790-801, 2003. Note: some of the contents in these slides are from the Internet, e.g., http://www.cs.bu.edu/faculty/gkollios/ada02/lectnotes.html, web.cs.wpi.edu/~cs561/s04/talks/motion-databases.ppt.

More Related