Dynamic Queries over Mobile Objects
description
Transcript of Dynamic Queries over Mobile Objects
Dynamic Queries over Mobile Objects
Iosif Lazaridis1
Kriengkrai Porkaew2
Sharad Mehrotra1
1 University of California, Irvine, USA2 King Mongkut’s University of Technology
at Thonburi, Thailand
EDBT 2002, Prague, Czech Republic
Talk Outline
Problem Motivation: Moving Observers
Preliminaries: Motion Representation and
Indexing
Dynamic Queries : predictive Vs non-predictive
Evaluation Algorithms for Dynamic Queries
Experiments
Conclusions
Problem Motivation: Moving Observers
x
y
x
y
Problem Motivation: Moving Observers
timex
y
observer
query
moving object
Preliminaries: Motion Representation
time
x
tl th
O.x=f(t,)Object O
min(O.x)
max(O.x)
O.x=f(t,’)
Example Representation:
= (x0, v)
O.x = x0 + v(t-tl) tl
x0
slope v
th
Preliminaries: Motion Indexing
time
x
a b c
ab
c
ed gf
d
e
f g
h i j k
h i
jk
Definitions: Snapshot and Dynamic Queries
xQh
time
x
tQ
xQl
Q
Snapshot Query: Q
a
b
time
x
Q0 Q4
Q3
Q2Q1
Dynamic Query: Q0, Q1,…,Q4
c
Query Types: Predictive Dynamic Queries (PDQ)
User trajectory is known beforehand as a sequence of key snapshot queries, K0, K1,…
time
x
K0
K1
K2K3
key snapshot
snapshot
Query Types: Non-Predictive Dynamic Queries (NPDQ)
y
x
P
Q
P Q
Results retrieved in previous query P canbe useful in answering subsequent query Qif
P Q is significant P and Q are temporally close Objects are not too fast-moving
Comparison:Predictive Vs Non-Predictive Queries
Predictive queries are useful when Trajectory is pre-planned (“tour mode”), or stable
Objects are returned in order of appearance along the
known trajectory. Each object is retrieved once.
Non-predictive queries: General case when the next query cannot be inferred
Objects that have been retrieved in the previous query are not
retrieved again if they continue to appear in the next query
An interesting topic of future research: Online adaptation to query behavior
Query Evaluation: Simple Approaches
General “Naïve” Approach Ask each snapshot query separately
Disadvantage: redundant retrieval of objects;
knowledge of trajectory (if any) is not used
Pre-calculate query results for PDQ Evaluate the complete PDQ result set beforehand
Disadvantages
costly pre-computation
observer deviation?
updates?
Query Evaluation: Predictive Queries - Overview
x
timetstart tend
For each tree node, or motion segment (starting from the root) we compute an interval [tappear, tdisappear]
tappear tdisappear
a getNext(tstart, tend) interface returns objects that will appear in view during [tstart, tend] in the order of their appearance time tappear
For a snapshot at time tq, repeated calls to getNext are made until an object with tappear>tq is returned
Returned objects are keyed in order of disappearance time tdisappear and are discarded from the query result as soon as tdisappear tq
Query Evaluation: Predictive Queries - Example
A
C
b
d
E
f
G
h
time
C1 C2
e1 e2
tstart tend
tree node
motion segment
Query Evaluation: Predictive Queries - Motion Updates
g h
Ab c
d e fB
C
0 1
D
2 3 4 5 6 7
E F G H
8 9 10 11
f
3
c
4
head
g h
A
b n c
d fB
C
0 1
D
5 7 2 3 4
F E G H
8 9 10 11
f
n
3
c
head
e mN
4
6 12
M
n
12Before Update
After Update
Priority QueueR-Tree
Query Evaluation: Non-Predictive Queries
y
x
P
Q
SPACE
A
B
Ending time
Starting time
Q
P
C
D
TIME
Experiments: Data and Queries
Data and Index 2-d space of 100x100 space units
Each object updates its motion every ~1 time unit
Objects move with a velocity of ~1 space/time unit
Simulation runs for 100 time units
R-Tree with 4K page size and 0.5 fill factor is used (height=3)
Queries 1,000 trajectories. Snapshot query is issued every 0.1 time units
Varying overlap level between snapshots from 0 to 99.99%
Varying spatial range from 8x8 to 20x20
Experiments: Predictive Queries I/O
Experiments: Predictive Queries CPU
Experiments: Non-Predictive Queries I/O
Experiments: Non-Predictive Queries CPU
Conclusions
A Dynamic Query is a sequence of queries
generated by a mobile observer
We proposed algorithms to evaluate Dynamic
Queries for both the general (Non-Predictive) and a
special (Predictive) case
Future work: Generalizing Dynamic Queries
Adapting query processing to the behavior of the mobile
observer