Upload
haley
View
29
Download
2
Embed Size (px)
DESCRIPTION
CSIS7101 – Advanced Database Technologies. Spatio -T emporal D ata (Part 1) On Indexing Mobile Objects. Kwong Chi Ho Leo Wong Chi Kwong Simon Lui, Tak Sing Arthur. Content. 1 Introduction 2 Indexing Mobile Objects 3 Indexing in 2 Dimensions 4 Summary 5 Reference. 1. Introduction. - PowerPoint PPT Presentation
Citation preview
CSIS7101 – Advanced Database Technologies
Spatio-Temporal Data (Part 1)
On Indexing Mobile Objects
Kwong Chi Ho LeoWong Chi Kwong SimonLui, Tak Sing Arthur
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
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.
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
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 [(y1q, y2q),
(t1q, t2q)].
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.
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.
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.
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
C1 = v v min,
C2 = v v max,
C3= a + t2qv > y1q, and
C4 = a + t1qv <= y2q.
For v < 0. the query is : Q = D1 D2 D3 D4, whereD1 = v -v min,
D2 = v -v max,
D3 = a + t1qv y1q, and
D4 = a + t2qv y2q.
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.
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]
1st index: The intercept is computed using the line t = 0.2nd 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.
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, 2Tperiod] and [2Tperiod, 3Tperiod]
With this method, intercept is bounded, and Performance of index structure remains asymptotically the same.
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 є.
CSIS7101 - Advanced Database Technologies
Spatio-Temporal Data (Part 1) 14
2.4 Simplex range searching Two approaches:
1. Point Access Methods2. Query Approximation Algorithm
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.
CSIS7101 - Advanced Database Technologies
Spatio-Temporal Data (Part 1) 16
2.4.2 Query Approximation Algorithm Query Approximation Algorithm
Using Hough-Y dual plane
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 = E1 + E2, and
CSIS7101 - Advanced Database Technologies
Spatio-Temporal Data (Part 1) 18
2.4.2 Query Approximation Algorithm
E is based on yr (where the b coordinate is computed) and the query interval (y1q, y2q), which is unknown.
If a constant c is use to keep equidistant yr, we can have observation index, y i = y max /c × i
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 [y1q, y2q], two cases will be considered,
Case 1: y2a – y1q ≤ y max / c The area is bounded by
CSIS7101 - Advanced Database Technologies
Spatio-Temporal Data (Part 1) 20
2.4.2 Query Approximation Algorithm Case 2: y2q – y1q > 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 1The 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).
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 = t1q = t2q).
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, yr] in O(log2N + K) time.
Consider objects {p1, p2, ……. , p n}, pi has relative position y i and a velocity vi. At time t q, the position pi is pi = y i + vi × t q. The objects stored in the binary tree are sorted.
In O(log2N) time we can find the positions of yl and yr relative the objects at time t q, and we report the objects that lie between.
CSIS7101 - Advanced Database Technologies
Spatio-Temporal Data (Part 1) 23
2.5 Achieve Logarithmic Query Time
e.g. An object list {p1, p2, p3, p4, p5, p6, p7}, and at time t q and say, [y l, yr] = [p3, p6]
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 (Nlog2N + Mlog2M), where M is the number of crosses in the time period [0,T].
Consider N Objects {p1, p2, ……, pN}, pi has relative position yi and a velocity vi at time 0. Another sorted order list {pt(1) , pt(2) , ……pt(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.
CSIS7101 - Advanced Database Technologies
Spatio-Temporal Data (Part 1) 25
2.5 Achieve Logarithmic Query Time e.g.
Ordered list {p1, p2, p3, p4, p5, p6, p7} at time t = 0
Ordered list {p1, p3, p2, p6, p4, p5, p7} at time t = T
{ , p3, p2, p6, p4, p5, p7}
{ , p3, , p6, p4, p5, p7} crossing
{ , , , p6, p4, p5, p7}
{ , , , p6, , p5, p7} crossing
{ , , , p6, , , p7} crossing
{ , , , , , , p7}
{ , , , , , , }
3 Crossings ! M crossings define M ordered list of the N objects.
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(t1), B(t2), …, 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.
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 .
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.
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.
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.
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.
CSIS7101 - Advanced Database Technologies
Spatio-Temporal Data (Part 1) 32
On Indexing Mobile Objects
The End
Break or Move on to Presentation 2