Novel Spatio-temporal Queries for Moving Object Applications

Download Report

Transcript Novel Spatio-temporal Queries for Moving Object Applications

Spatio-temporal
Pattern Queries
M. Hadjieleftheriou
G. Kollios
P. Bakalov
V. J. Tsotras
Motivation

The need to locate spatio-temporal
objects that follow specific patterns.
Examples:
 Identify
vehicles that were close to the three
recent sniper incidents
 Identify clients with specific credit card usage
patterns
 Analyze connectivity/mobility patterns in
mobile ad-hoc networks (e.g., verify that a
given pattern is prevalent)
2
Example
T
Y
Q2, t2
Q3, t3
Q1, t1
X
3
Formulation

Syntax: Q  {(S1,T1),...,(Sn ,T n )}
S
can be any spatial predicate, T can be any
temporal constraint or empty
Score object trajectories according to how

well they satisfy the query pattern
 Problem: Given a query pattern use an
index to score trajectories incrementally
 Ideally: Access only parts of trajectories
necessary to guarantee correct answers.
Prune trajectories fast!

4
Two Separate Problems

STP Queries With Time
 Every
query predicate is associated with an
absolute temporal constraint

STP Queries With Order
 Query
predicates are associated with relative
temporal constraint
5
Types of STP Queries



Range predicates: Crosses, Leaves, Meets, …
 Use Boolean score functions (crosses or not)
Distance based predicates: Nearest neighbor,
Group nearest neighbor, all other neighbors, …
 Use aggregate score functions (min, max,
average, sum, …), as long as they are
monotonic
Combinations of the above
 Use combined scoring functions and answer
each group of queries individually
6
STP Queries With Time
We use existing spatio-temporal index
structures to answer all predicates
 We employ concepts from T.A. (Fagin et
al.) to answer predicates incrementally
 We prune trajectories according to upper
and lower bounds
 We access the actual trajectories only
when good candidates have been found

7
A Simple Example
X
2
P1
0
2
0
Q
2
-2
P3
1
1
P2
1
5
T
8
A Simple Example
X
2
P1
2
0
Q
1
2
3
P3
3
-2
P2
T
9
STP Queries With Order
T
Y
Q2
Q3, t3
Q1, t1
X
10
The Exact Distance is Expensive
Cost increases exponentially as the
number of predicates increases
 Can be computed more efficiently by using
the T.A. algorithm
 Can we take predicate ordering into
account and speed up T.A. as well?

11
Previous Approaches Cannot Help

Spatio-temporal indices cannot be used!
 Full
scan of temporal dimension of the index
Projecting out the temporal dimension
does not help!
 Ideally, we need to find a method that will
retrieve only the trajectories that satisfy
the predicates in the specified order

12
Solution
Decompose the space into a grid
 Keep a list of trajectory ids that intersect
each grid cell, along with the respective
time-periods
 Given the query predicates compose
respective lists of trajectory ids/timeinstants, from the constituent cells
 Use a merge-join algorithm to prune
trajectories that do not satisfy the order of
the query

13
The Index Structure
P2
P1
A
B
...
A = { (P1, 1) }
B = { (P2, [2, 3]) }
…
P3
F = { (P1, [3,4]), (P2, 18) }
…
This is the index that we
will store
14
Example
Q2
P
1
P1
A
Q1
P2
1
Q1
B
... 3
5
9
P3
Q2
(P2, 2)
(P2, 7)
(P2, {2,3,15,16}),
(P1, {4,5}), (P3, 5)
(P2, {7,8,9,17,18}),
(P3, {3,4})
U = {P2}
15
Idea!
Run T.A. using only the candidate
trajectory data loaded so far to compute
the exact distance
 Prove that the answer will be correct even
if we don’t see the rest of the trajectory
 We speed up the computation cost
associated with the queries as well!

16
Experimental Evaluation
Synthetic datasets on the freeways of Illinois
 Up to 500K objects and 6,000,000 MBRs
 Measure the average number of disk
accesses for the index and the total number
of candidate trajectories that need to be
retrieved
 Compared linear scan, R-tree, MVR-tree

17
STP Queries with Order
Range Predicates
800
10000
CellList
CellList
R-tree
Total I/O
(log scale)
Avg. index I/O
1000
600
400
R-tree
1000
100
10
200
1
0
5
10
Number of predicates
20
5
10
20
Number of predicates
18
Avg. index I/O
(log scale)
100000
Lazy
Eager
R-tree
10000
1000
100
10
1
5
10
20
Number of predicates
Total I/O
(log scale)
STP Queries with Order
Distance Based Predicates
1000000
100000
10000
1000
100
10
1
Lazy
Eager
R-tree
5
10
20
Number of predicates
19
Conclusions
Introduced a novel type of query
 Proposed a simple yet efficient expression
mechanism
 Designed an efficient algorithm for STP
Queries with Time
 Designed an efficient index structure and
algorithms for STP Queries with Order
 Conducted extensive experiments

20
Thank you!