Online Interval Skyline Queries on Time Series

advertisement
Online Interval Skyline Queries on Time
Series
ICDE 2009
Outline





Introduction
Interval Skyline Query
Algorithm
 On-The-Fly (OTF)
 View-Materialization(VM)
Experiment
Conclusion
Introduction

A power supplier need to analyze the consumption of
different regions in the service area.
Interval Skyline Query

A time series s consists of a set of (timestamp, value)
pairs. (Ex: A={(1,4) (2,3)} )

Dominance Relation


Time series s is said to dominate time series q in interval [i : j],
denoted by s [ i: j ] q , if ∀k ∈ [i : j], s[k] ≥ q[k]; and ∃l ∈ [i : j], s[l]
> q[l].
Ex: Consider interval [1,2]
s 2 [1,2] s1
Interval Skyline Query

Let tc be the most recent timestamp. We call W  [tc  w  1: tc ]
interval the base interval.



Whenever a new timestamp tc +1 comes, the oldest one tc−w+1 expires.
'
Consequently, the base interval becomes W  [tc  w  2 : tc  1]
Problem Definition:
Given a set of time series S such that each time series is in the
base interval W  [tc  w  1: tc ] , we want to maintain a data
structure D such that any interval skyline queries in interval
[i:j]  W can be answered efficiently using D.
On-The-Fly (OTF)

The on the fly method keeps the minimum and maximum
values for each time series.

Lemma:
For two time series p,q and interval [i : j ]  W if
s.min[i : j ]  q.max then s dominates q in [i : j ] .

s.min[i : j]  min k[i: j ] s[k ]

q.max  max kW q[k ]
On-The-Fly (OTF)
Iteravively process the time series in S in their max value
descending order
Ex:
Consider W  [1: 3]
Let us Compute the skyline in interval [2,3]
On-The-Fly (OTF)
Time series
s2
s3
s5
s1
s4
Max
5
5
4
4
3
Maxmin[2:3]
1
Candidate list {s2}
On-The-Fly (OTF)
Time series
s2
s3
s5
s1
s4
Max
5
5
4
4
3
Maxmin[2:3]
1
2
Candidate list {s2,s3}
On-The-Fly (OTF)
Time series
s2
s3
s5
s1
s4
Max
5
5
4
4
3
Maxmin[2:3]
1
2
4
Candidate list {s2,s3,s5}
On-The-Fly (OTF)
Time series
s2
s3
s5
s1
s4
Max
5
5
4
4
3
Maxmin[2:3]
1
2
4
2
Candidate list {s2,s3,s5}
On-The-Fly (OTF)
Time series
s2
s3
s5
s1
s4
Max
5
5
4
4
3
Maxmin[2:3]
1
2
4
2
1
Max min[2 : 3]  s 4.max
Terminate and return candidate list
Online Interval Skyline Query Answering

Radix priority search tree
(5,8)
(7,7)
(4,6)
(8,5)
(1,4)
(6,3)
(3,2)
(2,1)
Online Interval Skyline Query Answering

Radix priority search tree
(5,8)
(7,7)
(4,6)
(8,5)
(1,4)
(6,3)
(3,2)
(2,1)
Online Interval Skyline Query Answering

Radix priority search tree
X :[1 ~ 8]
(5,8)
(7,7)
(4,6)
(8,5)
(1,4)
(6,3)
(3,2)
(2,1)
X L :[1 ~ 4]
X R :[5 ~ 8]
Online Interval Skyline Query Answering

Radix priority search tree
X :[1 ~ 8]
(5,8)
(7,7)
(4,6)
(8,5)
(1,4)
(6,3)
(3,2)
(2,1)
X L :[1 ~ 4]
X R :[5 ~ 8]
Online Interval Skyline Query Answering

Radix priority search tree
(5,8)
(7,7)
(4,6)
(8,5)
(1,4)
(6,3)
(3,2)
(2,1)
Online Interval Skyline Query Answering

Radix priority search tree
(5,8)
(7,7)
(4,6)
(8,5)
(1,4)
(6,3)
(3,2)
(2,1)
Online Interval Skyline Query Answering

Maintaining a Radix Priority Search Tree for
Each Time Series


To process a time series, we use the time dimension (i.e
the timestamps) as the binary tree dimension X and
data values as the heap dimension Y.
Since the base interval W always consists of w
timestamps represent w consecutive natural number.


Apply the module w operation
Domain of X is 0,..., w 1 tc  w  1 and tc  1 will map
the same timestamp.
Online Interval Skyline Query Answering

Ex: W  [1: 3] and w=3
When the base interval becomes W '  [2 : 4]
Timestamps
1
2
3
4
s1
4
3
2
5
Online Interval Skyline Query Answering

Ex: W  [1: 3] and w=3
When the base interval becomes W '  [2 : 4]
Timestamps
s1
1
2
3
4
3
2
5
Online Interval Skyline Query Answering

Ex: W  [1: 3] and w=3
When the base interval becomes W '  [2 : 4]
W '  [2 : 4] = W '  [2,1]
[1,1] and [2,3]
Timestamps
1
2
3
4
s1
5
3
2
5
View-Materialization(VM)

Non-redundant skyline time series in interval [i:j]



(1) s is in the skyline interval [i : j ]
(2) s is not in the skyline in any subinterval [i ' : j ' ]  [i : j ]
Lemma:
Give a time series s and an interval [i : j ] if for all
interval [i ' : j ' ]  [i : j ] such that s  NRSky[i ' : j ' ] ,
'
'
'
'
for
any
time
series
s  NRSky[i : j ]
s [i: j ] s
then s  Sky[i : j ]
View-Materialization(VM)

Ex: Compute Sky[3 : 4]

Union the non-redundant
interval skylines
[3 : 3]  s3
[4 : 4]  {s1, s 2}
[3 : 4]  {s 4}
s1=(2,5) s2=(1,5)
s1
[3:4]
s2
s1 Sky[3 : 4]
SDC
5
4
3
2, 1, 3
2
(4,4)
(5,1)
(5,1)
(4,3,2)
(3,2)
Experiment
Conclusion

Interval Skyline Query

Radix priority search tree
Download