Download presentation
Presentation is loading. Please wait.
Published byBethanie Washington Modified over 8 years ago
1
CSIS7101 – Advanced Database Technologies Spatio-Temporal Data (Part 1) On Indexing Mobile Objects Kwong Chi Ho Leo Wong Chi Kwong Simon Lui, Tak Sing Arthur
2
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 2 Content 1 Introduction 2 Indexing Mobile Objects 3 Indexing in 2 Dimensions 4 Summary 5 Reference
3
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 3 1. Introduction Traditional Database Model assume that data stored in the database remain constant. Not appropriate for applications with continuously changing data. Better approach: Object location as a function of time f(t), and update the database only when the parameters of f change. This approach introduces a novel problem since the database is not directly storing data values but function to compute these values.
4
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 4 2. Indexing Mobile Objects 2.1 Partition the mobile objects into two categories: Let’s say objects are moving on an 1-dimensional plane. 1. Object with low speed v 0. 2. Objects with speed between v min and v max. (i.e. Moving Objects) 2.2 Space-Range Representation 2.3 Dual Space-Time Representation 2.4 Simplex Range Searching 2.5 Achieve Logarithmic Query Time
5
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 5 2. Indexing Mobile Objects 2.2 Space-Range Representation Plot the trajectories y(t) = v t + a of the mobile objects as line in time-location (t,y) plane. The query is expressed as 2-dimensional interval [(y 1q, y 2q ), (t 1q, t 2q )].
6
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 6 2.2 Space-Range Representation Shortcomings: Minimum Bounding Rectangle (MBR) much larger than a Line. Object retains trajectory until updated, all lines extend to “infinity”. Mapping a line segment as a point in 4 dimensions, will not work. SAM can only access queries until end of the current session.
7
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 7 2.3 Dual Space-Time Representation Map a line from primal plane (t, y) to a point in the dual plane. Hough-X plane: y(t) = v t + a is represented by a point (v, a) in dual space. Hough-Y plane: y(t) = vt + a is transformed to t = 1/v y(t) – a/v. In dual space, the coordinates are n = 1/v and b = -a/v.
8
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 8 2.3 Dual Space-Time Representation Hough-X Dual Space Query is transformed in a polygon query in the dual space. This polygon uses a linear constraint polygon.
9
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 9 2.3 Dual Space-Time Representation The 1-dimensional MOR query in dual Hough-X is expressed as For v > 0 the query is : Q = C1 C2 C3 C4, where C 1 = v v min, C 2 = v v max, C 3 = a + t 2q v > y 1q, and C 4 = a + t 1q v <= y2q. For v < 0. the query is : Q = D1 D2 D3 D4, where D 1 = v -v min, D 2 = v -v max, D 3 = a + t 1q v y 1q, and D 4 = a + t 2q v y 2q.
10
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 10 2.3 Dual Space-Time Representation Problem : range of a = [- v max x t now, y max - v min x t now ] Time is increasing, values of the intercepts are not bounded. V max is significant, values of intercept become very large, and potentially a problem (unbounded range of real numbers) To solve: Assuming that when an object crosses a border it issues an update (deletion or reflection). With minimal speed, all objects updated their motion information at least once during a T period time instant, where T period = y max / v min.
11
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 11 2.3 Dual Space-Time Representation Two distinct index structures. Each object stores only once. [0, T period ] and [T period, 2T period ] 1 st index: The intercept is computed using the line t = 0. 2 nd index: The intercept is computed using the line t = T period. With this, the intercept will always have the values between 0 and v max × T period. Both indices are used in database query.
12
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 12 2.3 Dual Space-Time Representation Keeping on that, after time 2T period, the first index is deleted and a new index is created. We then have [T period, 2T period ] and [2T period, 3T period ] With this method, intercept is bounded, and Performance of index structure remains asymptotically the same.
13
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 13 2.4 Simplex range searching The dual space-time representation transforms the indexing mobile objects on a line to simplex range searching in two dimensions. Theorem 1 (Lower Bound) Simplex reporting in d-dimensions with a query time of O (n δ + k), where N is the number of points, n = N/B, K is the number of the reported points, k = K/B and 0 < δ ≤ 1, requires space Ω (n d(1- δ) – є ) disk blocks, for any fixed є.
14
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 14 2.4 Simplex range searching Two approaches: 1. Point Access Methods 2. Query Approximation Algorithm
15
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 15 2.4.1 Point Access Method Point Access Method Using R-trees to answer simplex range queries, the 1- dimensional MOR query can be answered in the dual Hough-X space.
16
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 16 2.4.2 Query Approximation Algorithm Query Approximation Algorithm Using Hough-Y dual plane
17
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 17 2.4.2 Query Approximation Algorithm Since rectangular query is an efficient access method, the query is approximated by a rectangular one. The query rectangle The query area is enlarged by area E = E 1 + E 2, and
18
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 18 2.4.2 Query Approximation Algorithm E is based on y r (where the b coordinate is computed) and the query interval (y 1q, y 2q ), which is unknown. If a constant c is use to keep equidistant y r, we can have observation index, y i = y max /c × i
19
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 19 2.4.2 Query Approximation Algorithm A given 1-dimensional query MOR query will be forwarded to the index(es) that minimize E. Rectangle range search = simple range search on the b coordinate axis. Each of the observation index can be a B+ tree. To process query interval [y 1q, y 2q ], two cases will be considered, Case 1: y 2a – y 1q ≤ y max / c The area is bounded by
20
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 20 2.4.2 Query Approximation Algorithm Case 2: y 2q – y 1q > y max / c The query is decomposed into collection of smaller sub-queries: one sub-query per sub-terrain contained by the original query’s endpoints. The sub-queries can be answered with bounded E using an appropriate “ observation” index. Lemma 1 The one dimensional MOR query can be answered in time O(log B n + (K + K’) / B), where K’ is the approximation error. The space used is O(c n) where c is a small constant, and the update is O(c log B n).
21
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 21 2.5 Achieve Logarithmic Query Time Restrict our queries to occur before the first time that a point overtakes another. To index mobile objects in a bounded time interval T in the future. Consider objects are moving on a line, Find all the objects that lie in the segment [ y l, y r ] at time t q (i.e. t q = t 1q = t 2q ).
22
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 22 2.5 Achieve Logarithmic Query Time Lemma 2 If we have the relative ordering of all the objects at time t q, the position of the objects at time t c that corresponds to the closest crossing event before t q, and the speed of the objects, we can find the objects that are in [y l, y r ] in O(log 2 N + K) time. Consider objects {p 1, p 2, ……., p n }, p i has relative position y i and a velocity v i. At time t q, the position p i is p i = y i + v i × t q. The objects stored in the binary tree are sorted. In O(log 2 N) time we can find the positions of y l and y r relative the objects at time t q, and we report the objects that lie between.
23
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 23 2.5 Achieve Logarithmic Query Time e.g. An object list {p 1, p 2, p 3, p 4, p 5, p 6, p 7 }, and at time t q and say, [y l, y r ] = [p 3, p 6 ]
24
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 24 2.5 Achieve Logarithmic Query Time Lemma 3 We can find all the crossings of objects in time O (Nlog 2 N + Mlog 2 M), where M is the number of crosses in the time period [0,T]. Consider N Objects {p 1, p 2, ……, p N }, p i has relative position y i and a velocity v i at time 0. Another sorted order list {p t(1), p t(2), ……p t(N) } at time T. Then objects i and j cross if and only if t(j) < t(i). Keep the objects in a linked list, in the same order they were at time t = 0. Scan the sorted lit of objects at time t = T. All the crossings can be reported in O(N + M). After all crossings are reported we can find when each occurs and sort them on their time attribute.
25
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 25 2.5 Achieve Logarithmic Query Time e.g. Ordered list {p 1, p 2, p 3, p 4, p 5, p 6, p 7 } at time t = 0 Ordered list {p 1, p 3, p 2, p 6, p 4, p 5, p 7 } at time t = T {, p 3, p 2, p 6, p 4, p 5, p 7 } {, p 3,, p 6, p 4, p 5, p 7 } crossing {,,, p 6, p 4, p 5, p 7 } {,,, p 6,, p 5, p 7 } crossing {,,, p 6,,, p 7 } crossing {,,,,,, p 7 } {,,,,,, } 3 Crossings ! M crossings define M ordered list of the N objects.
26
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 26 2.5 Achieve Logarithmic Query Time Lemma 4 We store the O(M) order lists of N objects in O(n+m) blocks and perform a search on any list in O(log B (n+m)) I/O’s, where n = N/B and m = M/B. Embed the binary tree structure of the list of N objects inside a B- tree. Each B tree use O(n) nodes where each node hold B entries. A s node stores the evolution of trees B(0), B(t 1 ), B(t 2 ), …, B(t M ). Post the entries of s as changes in the history of the parent node p. When a new copy of node s is created, a new record is added on the “log” of p that has the same position l, but a pointer to the new copy of s and the current time.
27
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 27 2.5 Achieve Logarithmic Query Time Overall space O(n+m), and Query time O(log B (n+m)) Theorem 2: Given N objects and a time limit T, an one dimensional MOR1 query can be answered in time log B (n +m) using space O(n +m), where m = M/B and M is the number of crosses of objects in the time limit T.
28
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 28 3. Indexing in Two Dimensions The 1.5-dimensional problem Objects moving in the plane but their movement is restricted on using a given collection of routes (roads) on the finite terrain. Each predefined route can be represented as a sequence of connected (straight line) segments. Indexing the line segment by standard SAM. Indexing the object moving on the given route is an1-dimensional model.
29
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 29 3. Indexing in Two Dimensions The 2-dimensional problem Decompose the motion of the object into two independent motions, one in the x-axis and the other in the y-axis. For each axis, use the methods for the 1- dimensional case and answer two 1-dimensional MOR queries. The algorithms for the 1- dimensional case can be used. Take the intersection of the two answers to find the answer to the initial query.
30
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 30 4. Summary One-dimensional case, We have: A dynamic, external memory algorithm with guaranteed worst case performance and linear space. A practical approximation algorithm also in the dynamic, external memory setting, which has linear space and expected logarithmic query time. An algorithmic query time for a restricted version of the problem. Two-dimensional case, Extending the techniques to 2-dimensional networks of 1- dimensional routes as well objects moving on a plane.
31
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 31 5. Reference George Kollios, Dimitrios Gunopulos and Vassilis Tsotras. On Indexing Mobile Objects. ACM PODS, 1999.
32
CSIS7101 - Advanced Database Technologies Spatio-Temporal Data (Part 1) 32 On Indexing Mobile Objects The End Break or Move on to Presentation 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.