Top Banner
SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien L ee November 04, 2005 1 Department of Computer Engineering Chonbuk National University 2 Department of CS&E, Pennsylvania State University [email protected] [email protected]
27

SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Apr 01, 2015

Download

Documents

Jaquez Nobbs
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

SebGIS 2005

An Efficient Trajectory Index Structure for MovingObjects in Location-based Services

1Jae-Woo Chang, 1Jung-Ho Um and 2Wang-Chien LeeNovember 04, 2005

1Department of Computer EngineeringChonbuk National University

2Department of CS&E, Pennsylvania State University

[email protected]

[email protected]

Page 2: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-2-

20

05

Contents

Introduction

Background and Motivation

Trajectory Access Scheme for Moving Objects

Performance Analysis

Conclusion

Page 3: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-3-

20

05

Introduction

Spatial databases has been well studied in the last two decades

There has been development of numerous spatial data models, query

processing techniques, and index structures

Most of the existing work considers Euclidean spaces

In practice, objects can usually move on road network

Network distance is determined by the length of the real shortest path

connecting two objects on the network

ex: a gas station nearest to a given point in an Euclidean space may be more distant

in a road network than another gas station

Network distance is an important measure in Spatial Network

Databases (SNDB)

Page 4: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-4-

20

05

Related Work

HKUST’s work Papadias proposed a major network storage scheme for spa

tial network databases(SNDB) Employ a disk-based network representation that preserves

connectivity and location Spatial entities are indexed by respective spatial access me

thods supporting Euclidean queries and dynamic updates

Consist of three components adjacency component, Poly-line component, Network R-tree

Page 5: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-5-

20

05

Related Work

TB-Tree (Trajectory-Bundle Tree) Pfoser proposed a hybrid index structure which preserves trajectories A predominant trajectory index structure for Euclidean spaces Fast access to the trajectory information of moving objects Has a couple of problems in SNDB

Root

A1 A2 A3 B1 B2 B3 A4 A5 B4 B5

non-leaf node

leaf node

MBB PTR

Page 6: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-6-

20

05

Motivation

Problems of the TB-Tree in SNDB Because moving objects move on a predefined spatial network in SNDB, the p

aths of moving objects are overlapped due to frequently used segments leads to a large volume of overlap among the MBRs of internal nodes no longer achieves good performance on retrieving moving object trajectories in S

NDB When a moving object moves on the predefined spatial network for a long tim

e, the dead space for the moving object trajectory is highly increased leads to a large volume of overlap with other object’s trajectories. results in poor retrieval performance on moving object trajectories in SNDB, due to

its small discrimination capability

To solve the problems of TB-Tree Propose a new signature-based access scheme which can have fast accesses to

moving object trajectories.

Page 7: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-7-

20

05

Trajectory Access Scheme for Moving Objects

1 2 m

3

.

.

1 2

m

Trajectory Info

Signature Info

Location Info

1 2 m

3

.

.

1 2

m

Trajectory Info

Signature Info

Location Info

Partition 2

1 2 m

3

.

.

1 2

m

Trajectory Info

Signature Info

Location Info

Partition n

MO(timestamp) 1

n

2

Partition Table

Partition 1

Architecture of trajectory access scheme

Overall Architecture

Page 8: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-8-

20

05

Architecture of trajectory access scheme

Main idea Designed to create and maintain partitions which store the

predefined number of moving object trajectories Contain trajectories’ signatures together in the order of

their start time Reasons for using partitions

a partition includes the fixed number of moving object trajectories– possible to construct a bit-sliced signature file which enables

good retrieval performance a partition can be accessed independently to answer a trajectory-

based query – possible to efficiently retrieve the trajectories of past moving

objects on a given time. a partition is created and maintained depending on its start time

– possible to efficiently retrieve the trajectories of past moving objects on a given time

Page 9: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-9-

20

05

Architecture of trajectory access scheme

Advantage of our trajectory access scheme Is not affected by the overlap of moving objects’ paths

never causes the dead space problem Well supports a complex query containing a partial trajectory

condition because it generates signatures using a superimposed coding Can achieve very good retrieval performance

can be easily adapted to a parallel execution environment

Major components Partition table A set of partitions

trajectory information location information signature information

Page 10: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-10-

20

05

Architecture of trajectory access scheme

Partition Table Resided in a main memory due to its small size

To answer a user query, we find partitions to be accessed by searching the partition table

Ei=<p_start_time, p_end_time, p_expected_time, final_entry_no> p_start_time,p_end_time,p_expected_time

– the smallest start time, the largest current and end time of all the trajectories in a partition, respectively

final_entry_no: the last entry number in a partition

Page 11: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-11-

20

05

Architecture of trajectory access scheme

Partition Trajectory information

Maintains moving object trajectories which consist of a set of segments(or edges)

Ti=<MOiid,#_past_seg,#_future_seg,#_mismatch,{sij,eid,start,end,ts,(te or v)}>

– Moiid: ID for Moi

– #_past_seg, #_future_seg: the number of past and expected future segments

– #_mismatch: the number of mismatched segments between past and future segments

– sij: j-th segment of the trajectory for Moi, eid: edge ID for an edge covering sij

– start,end: relative start and last location of sij in the edge– ts,te: start and end time of sij– v:average speed of sij in the edge

Page 12: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-12-

20

05

Architecture of trajectory access scheme

Location information contains the location of an object trajectory stored in the trajectory

information area allows for accessing the actual object trajectories allows for filtering out irrelevant object trajectories based on the ti

me condition Ii = <MOiid, Li, strat_time, current_time, end_time >

– Li : location for MOi in the trajectory information area– start_time : time when the trajectory for MOi is first inserted– current_time : time when the last segment of the trajectory for MO i i

s inserted– end_time : time when the last expected segment for MOi will be inse

rted

Page 13: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-13-

20

05

Architecture of trajectory access scheme

Signature information To create a signature from a given object trajectory in an efficient

manner

– make use of a superimposed coding because very suitable to SNDB applications where the number of segments for an object trajectory is variable

Calculate Fd(False drop)

– a trajectory signature seems to qualify, given that the corresponding object trajectory does not actually qualify

Assuming Fd= 1/N Fd=-(ln 2)2 х S/r k=S х ln2/rN: average number of segments per object trajectory is r

S: optimal values for both the size of a signature in bit

k: the number of bits to be set per segment

Page 14: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-14-

20

05

Architecture of trajectory access scheme

bit-sliced signature method achieve good retrieval performance– create a fixed-length signature slice for each bit position in the

original signature string– for answering the query, Disk page I/O less than k*m (k: the

number of bits assigned to a segment, m: the number of segments in a query trajectory)

– advantage» When the number of segments is small, requires the small

number of page I/Os» When the number of segments is increased, the number

of page I/O accesses is decreased» When the number of segments is large, we can achieve

good retrieval performance eventually

Page 15: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-15-

20

05

Insertion Algorithm

Can be divided into an initial trajectory insertion algorithm and a segment insertion algorithm

Initial Insertion Algorithm Find the last partition in the partition table and obtain an available entry(NE) To insert the initial trajectory with no expected trajectories

create a new expected future segment based on an edge where an object currently moves store it into the NE entry of the trajectory information area in the last partition store start_time(StartT), current_time(CurrentT), and end time(ExpectedET) into the NE entry

of the location information area in the last partition

– StartT and CurrentT are both assigned to the start time of the moving object

– ExpectedET is assigned to NULL

To insert the the initial trajectory with expected trajectories insert a list of expected future segment(TrajSegList) into the NE entry of the trajectory inform

ation area in the last partition create a segment signature(SSn) and generate a trajectory signature(SigTS) by using superimp

osing(Oring) store StartT, CurrentT, and ExpectedET into the NE entry of the location information area in t

he last partition

– ExpectedET is assigned to the expected end time of the last segment of the TrajSegList

Store the SigTS into NE entry by using the bit-sliced manner Store <StartT,CurrenT,ExpectedET> into the last partition entry(LP)

Page 16: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-16-

20

05

Insertion Algorithm

Algorithm InsertFirst(MOid, TrajSegList)

/* TraSegList contains the information of a set of expected segments for the trajectory of a moving object Moid */

1. TrajSeg = the first segment of TrajSegList

2. Generate a signature SigTS from TrajSeg

3. StartT = CurrentT = ts of TrajSeg

4. Obtain final_entry_no of the entry, in the partition table, for the last partition, LP

5. NE = final_entry + 1 //NE=the next available entry in LP

6. Obtain the location, Loc, of the entry NE in the trajectory info area for inserting object trajectory

7. if(end field of TrajSeg=NULL){//no expected trajectory

8. ExpectET = NULL

9. Store <MOid,0,1,TrajSeg> into the entry NE, pointed by Loc, of the trajectory information area in LP}

10. else { // expected trajectory exists

11. #fseg = 1

12. while (the next segment Sn of TrajSegList ≠ NULL) {

13. #fseg = #fseg + 1

14. Generate a signature SSn from Sn

15. SigTS = SigTS | SSn }

16. Store <MOid,0,#fseg,TrajSegList> into the entry NE, pointed by Loc, of the trajectory info area in LP

17. Compute ExpectET by using ts, start, and v of the last segment of TrajSegList } // end of else

18. Store SigTS, using the bit-sliced manner, into the entry NE of the signature information area in LP

19. Store <MOid,Loc,StartT,CurrentT,ExpectET> into the entry NE of the location information area in the LP

20. Store <StartT,CurrentT,ExpectET,NE> into the entry for LP in the partition table

End InsertFirst

Page 17: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-17-

20

05

Insertion Algorithm

A segment Insert Algorithm Find a partition storing its trajectory from the partition table by using the start time (ST)

of the moving object Obtain the entry (NE) storing the trajectory information of the partition To Insert a segment for trajectories with no expected future ones

store a new segment (TrajSeg) into trajectory information area generate a trajectory signature (SigTS) from the TrajSeg store the SigTS into the NE entry of the signature information area in the bit sliced mannaer store <MOid, Loc, StartT, CurrentT, ExpectedET>into the NE entry of the location informatio

n area

To Insert a segment for trajectories with no expected future ones store a new segment according to three types of the discrepancy between a new segment and e

xpected segment (find_seg())

– Seg_pos=0, no segment coinciding with TrajSeg

– Seg_pos=1, coincideing with TrajSeg is the first one

– Seg_pos>1, coincideing with TrajSeg is not the first one delete seg_pos-1 segments from the expected segments of the NE entry store the TrajSeg into the (#actual_seg)-th segment of the NE entry move all the expected segments of the NE entry forward by seg_pos-2

Page 18: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-18-

20

05

Insertion Algorithm

the ratio of mismatch(#_mismatch) is not greater than a threshold(τ)

– store the trajectory signature(SigTS) generated from the TrajSeg into the NE entry of the signature information area in the bit sliced manner

greater than a threshold(τ)

– regenerate SigTS

– all the bit-sliced signatures in the signature information area in the partition P Update the value of #actual_seg, #future_seg, and #mismatch in the NE entry Update the CurrentT of the NE entry in the location information area as well as

that of the partition P’s entry in the partition table

Page 19: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-19-

20

05

Insertion Algorithm

Algorithm InsertSeg (MOid, TrajSeg, ST)

/* TraSeg contains a segment for the trajectory of a moving object Moid, to be stored with an object trajectory’s start time, ST*/

1. Generate a signature SigTS from TrajSeg

2. Locate a partition P covering ST in partition table

3. Locate an entry E covering ST for the moving object with MOid in the location information area and get its location, Loc, in the trajectory information area

4. Obtain #actual_seg, #future_seg, and #mismatch of the trajectory info entry E (i.e., TE) for the MOid in P

5. if(#future_seg = 0) { // no expected trajectory

6. Insert TrajSeg into the (#actual_seg+1)-th trajectory segment of TE

7. Store SigTS, using the bit-sliced manner, into the entry E of the signature info area in P}

8. else { // expected trajectory exists

9. seg_pos = find_seg(TrajSeg,Loc)

10. #actual_seg++, #future_seg = #future_seg – seg_pos

11. case(seg_pos = 0) { // find no segment

12. Insert TrajSeg into segment of TE and relocate the future traj segments backward

13. Store SigTS, using the bit-sliced manner, into the entry E of the signature info area in P }

14. case(seg_pos = 1) //find the first segment

15. Insert TrajSeg into (#actual_seg)-th trajectory segment of TE for exchanging the old segment

16. case(seg_pos > 1) {//find the (seg_pos)-th segment

17. #mismatch = #mismatch + seg_pos – 1

18. Insert TrajSeg into (#actual_seg)-th segment of TE and relocate the future traj segments forward

19. if(#mismatch/(#future_seg+#actual_seg) > τ) regenerate_sig(Loc,SigTS,E,P) } }// end of case// end of else

20. Update #actual_seg, #future_seg, and #mismatch of TE

21. CurrentT = te of TrajSeg

22. Store CurrentT into the current_time of the entry E of the location information area in the partition P

23. Store CurrentT into the p_current_time of the partition P entry in the partition table

End InsertSeg

Page 20: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-20-

20

05

Retrieval Algorithm

Finds a set of objects whose trajectories match the segments of a query trajectory.

Retrieval Algorithm Find a set of partitions (partList) satisfying the time interval (TimeRange) repre

sented by <lower, upper> of a given query(Q) (find_partition()) generate a query signature (Qsig) from a query trajectory’s segments For each partition of the partList

search only the signature slices corresponding to the bits set by ‘1’ in Qsig in the signature information area

create a list of candidates(CanList) being set to ‘1’ by bit-oring the signature slices for the entire candidates

– determine if their start_time, end_time, and current_time satisfy TimeRange

– determine if query trajectory matches the object trajectories correponding to the entries

– if matching is found, insert the object’s ID into result list(MoidList)

Page 21: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-21-

20

05

Retrieval Algorithm

TR1(e2, e4, e5, e8)

TR2(e4, e9, e8)

TR3(e11, e3, e7, e10)

TR4(e1, e5, e7, e9, e11)

s1

s2

s3

s4

1011 1010 1100 0000

0110 0011 0011 0000

0100 0001 1111 1111

0001 0100 1001 1111

making signature

storing the signature by bit sliced manner

e2 -> 1000 1000 0000 0000

e5 -> 0000 0000 1100 0000

e8 -> 0010 0010 0000 0000

s1 : 1011 1010 1100 0000

e4 -> 1001 0000 0000 0000

Q(e2, e4)

e2 -> 1000 1000 0000 0000

e4 -> 1001 0000 0000 0000

qs : 1001 1000 0000 0000

s1 s2 s3 s4

0110 0011 00110000

1011 1010 11000000

0001 0100 10011111

0100 0001 11111111

TR1

1001 1000 00000000

qs

Example of Retrieval Algorithm

Page 22: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-22-

20

05

Retrieval Algorithm

Algorithm Retrieve(QSegList, TimeRange, MOidList)

/* MOidList is a set of ids of moving objects containing a set of query segments, QsegList, for a given range time, TimeRange */

1. Qsig = 0, #qseg = 0, partList = Ø

2. t1 = TimeRange.lower, t2 = TimeRange.upper

3. for each segment QSj of QsegList {

4. Generate a signature QSSi from Qsj

5. QSig = QSig | QSSj, #qseg = #qseg + 1 }

6. find_partition(TimeRange, partList)

7. for each partition Pn of partList {

8. Obtain a set of candidate entries, CanList, by examining the bit slices of the signature info area in Pn,

corresponding to bits set by 1 in QSig

9. for each candidate entry Ek of CanList {

10. Let s,e,c be start_time, end_time, current_time of the entry Ek of location information area

11. if((s ≤ t2) AND (e ≥ t1 OR c ≥ t1)){

12. #matches = 0

13. Obtain the first segment ESi of the entry Ek of the trajectory info area, TEk

14. Obtain the first segment QSj of QsegList

15. while(ESi ≠ NULL and QSj ≠ NULL) {

16. if(match(Esi, QSj)=FALSE)

Obtain the next segment ESi of TEk

17. else { #matches = #matches + 1

18. Obtain the first segment ESi of Tek }

19. if(#matches=#qseg) MOidList=MOidList{TEk’s MOid}

20. } } } //end of while //end of if //end of for- CanList

21. } // end of for - partList

End Retrieve

Page 23: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-23-

20

05

Performance Analysis

Environment Environment for implementation

pentium- 2.0GHz CPU with 1GB main memory(Windows 2003 OS)Ⅳ Performance Environment

obtain 170,000 nodes and 220,000 edges in Sanfrancisco Bay Map generate 50,000 moving objects randomly on the road network by using Bri

nkhoff’s algorithm compare our access scheme with TB-tree

Page 24: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-24-

20

05

Insertion Performance

Reason Our trajectory access method

– Needs to acquire a signature built for the moving object trajectory, change the signature, and store it in bit-sliced manner

TB-tree

– Only needs to append the segment to the existing moving object trajectory.

Performance Analysis

TB-tree Our signature-based scheme

Trajectory insertion time(s) 0.03 0.95

Page 25: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-25-

20

05

Performance Analysis

Retrival Performance

trajectory retrieve(wall_time)

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

2 3 4 5 6 8 10 12 14 16 18 20query segment

Tim

e(s

econd)

signatureTB- tree

Page 26: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-26-

20

05

Performance Analysis

Reason Our trajectory Access method

– creates a query signature combining all the segments in a query and searches for potentially relevant trajectories of moving objects once by using the query signature

TB-tree

– due to a large extent of overlap in its internal nodes when the number of segments in a query trajectory is small, a large volume of dead spaces, performs a range search for each MBR containing segment

Page 27: SebGIS 2005 An Efficient Trajectory Index Structure for Moving Objects in Location-based Services 1 Jae-Woo Chang, 1 Jung-Ho Um and 2 Wang-Chien Lee November.

Seb

GIS

-27-

20

05

Conclusion

Proposed an efficient trajectory access scheme for indexing moving objects Designed our access scheme for efficiently dealing with the

trajectories of moving objects on road network Provided an initial insertion algorithm, segment insertion algorithm,

and retrieval algorithm Show that our access scheme achieves about one order of magnitude

better retrieval performance than TB-tree

Future work Needed to extend our access scheme to a parallel environment to

achieve better retrieval performance can be performed easily due to the characteristic of signature file