Department of Computer Science Spatio-Temporal Histograms Hicham G. Elmongui*Mohamed F. Mokbel +...

Post on 17-Dec-2015

215 views 0 download

Transcript of Department of Computer Science Spatio-Temporal Histograms Hicham G. Elmongui*Mohamed F. Mokbel +...

Department of Computer Science

Spatio-Temporal Histograms

Hicham G. Elmongui* Mohamed F. Mokbel+ Walid G. Aref*

*Purdue University, Department of Computer Science+University of Minnesota, Department of Computer Science

elmongui@cs.purdue.edu, mokbel@cs.umn.edu, aref@cs.purdue.edu

SSTD’05 Hicham G. Elmongui

2

Motivation

Infrastructure for keeping track and answering continuous queries on moving objects– Moving Queries / Moving Objects– Stationary Queries / Moving Objects– Moving Queries / Stationary Objects– Range Queries, KNN, …

Spatio-TemporalDatabase Server

SSTD’05 Hicham G. Elmongui

3

Motivation

Spatio-TemporalDatabase Server

How many cars on this freeway? Where is my nearest McDonald’s?

SSTD’05 Hicham G. Elmongui

4

Motivation

SELECT M.IDFROM MovingObjects MWHERE M.Type = “Truck”INSIDE Area A;We cannot collect statistics statically

(e.g. histograms) and answer queries efficiently over an extended period of

time

SSTD’05 Hicham G. Elmongui

5

Motivation

Go

to w

ork

Ret

urn

hom

e

Lu

nch

hour

0

0.2

0.4

0.6

0.8

1

12:0

0 A

M

1:0

0 A

M

2:0

0 A

M

3:0

0 A

M

4:0

0 A

M

5:0

0 A

M

6:0

0 A

M

7:0

0 A

M

8:0

0 A

M

9:0

0 A

M

10:0

0 A

M

11:0

0 A

M

12:0

0 P

M

1:0

0 P

M

2:0

0 P

M

3:0

0 P

M

4:0

0 P

M

5:0

0 P

M

6:0

0 P

M

7:0

0 P

M

8:0

0 P

M

9:0

0 P

M

10:0

0 P

M

11:0

0 P

M

12:0

0 A

M

Downtown

A residential area

Not just time makes a

difference, but also space makes

a difference

Nor

mal

ized

Fre

qu

ency

SSTD’05 Hicham G. Elmongui

6

ST-Histograms

Histograms aware of the underlying

space and time dimensions

SSTD’05 Hicham G. Elmongui

7

System Architecture

Query Plan

feedbackQuery Executor

Query Optimizer

ST-Histogram Manager

Continuous Query

Dat

a

SSTD’05 Hicham G. Elmongui

8

Queries as Light Spots

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

SSTD’05 Hicham G. Elmongui

9

Queries as Light Spots

6.98%

6.98%

6.98%

6.98%

6.25%

6.25%

6.01%

6.01%

6.25%

6.25%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

Q1

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

6.25%

10%

SSTD’05 Hicham G. Elmongui

10

Queries as Light Spots

6.15%

6.15%

6.15%

6.15%

15.04% 9.84%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

6.01%

5.05%

5.05%

5.05%

6.01%

Q2

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.01%

6.98%

6.98%

6.98%

6.98%

Q1

20%

SSTD’05 Hicham G. Elmongui

11

15.04% 9.84%15.04% 9.84%

Queries as Light Spots

6.15%

6.15%

6.15%

6.15%

5.05% 5.05%5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

Q1

Q2

SSTD’05 Hicham G. Elmongui

12

Queries as Light Spots

6.29%

6.29%

6.29%

6.29%

4.22%

15.51%

3.24%

10.15%

5.21%

5.21%

5.21%

5.21%

5.21%

5.21%

5.21%

5.21% 1%

5.05% 5.05%Q2

15.04% 9.84%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

5.05%

6.15%

6.15%

6.15%

6.15%

Q1

SSTD’05 Hicham G. Elmongui

13

Features of ST-Histograms

No computing capabilities assumed for the moving objects– Moving objects update their location periodically with the spatio-

temporal database server

No patterns assumed for queries– Queries come and go anytime anywhere

Diskless spatio-temporal stream database serverEnable for adaptive query processing

SSTD’05 Hicham G. Elmongui

14

ST-Histogram Construction/Refining

Initially

Selectivity of a query

Rate of a query to a grid cell

SSTD’05 Hicham G. Elmongui

15

Experiments – Data Sets

Network-based Generator of Moving Objects (SSDBM’00, GeoInformatica’02)

Map of Greater Lafayette AreaEvery MO updates its location every 10 sec

SSTD’05 Hicham G. Elmongui

16

Estimation Relative Error vs. Query Size

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.25% 0.50% 0.75% 1% 4%

Query Size

Ave

rag

e R

elat

ive

Err

or

SSTD’05 Hicham G. Elmongui

17

ST-Histogram’s Stability

0%

5%

10%

15%

20%

25%

30%

35%

40%

45%

50%

0 5 10 15 20 25 30 35 40

Time

Av

era

ge

Re

lati

ve

Err

or

0.75%1%4%

SSTD’05 Hicham G. Elmongui

18

ST-Histogram vs. Random Sampling

0

0.1

0.2

0.3

0.4

0.5

0.6

RS(10%) RS(25%) RS(50%) RS(75%) ST-Histogram

Ave

rag

e R

elat

ive

Err

or

SSTD’05 Hicham G. Elmongui

19

Related Work

Spatio-temporal histograms– Choi and Chung (SIGMOD’02)– Tao et al (ICDE’03)– Marios et al (SSDBM’03)

Sampling– Random Sampling– Venn Sampling (ICDS’05)

SSTD’05 Hicham G. Elmongui

20

Conclusion

Aware of the underlying space and time dimensionsImplemented in PLACE (a spatio-temporal database server)Efficient for spatio-temporal streaming applicationsRefined upon feedback from query executorUsed in an online/offline modeAccommodate periodicity in moving objects’ behaviorEnable adaptive query processingAverage relative error 8% for practical query sizes

SSTD’05 Hicham G. Elmongui

21

The END

Thank You