Spatial Databases SpatioTemporal Databases Spring 2017 KiJoune Li
Spatial Databases: Spatio-Temporal Databases Spring, 2017 Ki-Joune Li
PNU STEM Spatio-Temporal Databases n Everything is changing! n Spatio-Temporal Objects Change the position or shape according to time ¨ Discrete Change vs. Continuous Change ¨ n Discrete change ¨ n Example: Change of administrative boundary Continuous change ¨ Example: Moving Objects, Meteorological Lines, Pollution Areas 2
PNU STEM Discrete Change of Spatio-Temporal Objects n No assumption on movements ¨ Example: Change of administrative boundary p 1[(2006, 01), present ) p 5 p 11 p 6 [(2000, 04, 01), (2001, 12, 31) ) p 15 p 4 p 2 p 3 p 18 [(2004, 05), (2005, 12, 31) ) p 13 [(2005, 04, 01), present ) p 14 p 17 p 16 [(2002, 01), (2004, 03, 31) ) 3
PNU STEM Discrete Change of Spatio-Temporal Objects n Representation – A naïve approach Object Valid Time Interval Geometry A 1 [(2004, 05), (2005, 12, 31) ) (p 1, p 2, p 3, p 4, p 5) A 1 [(2006, 01), present ) (p 1, p 2, p 6, p 4, p 5) A 3 [(2000, 04, 01), (2001, 12, 31) ) (p 11, p 12, p 13, p 14, p 15) A 3 [(2002, 01), (2004, 03, 31) ) (p 11, p 12, p 16, p 17, p 15) A 3 [(2005, 04, 01), present) ) (p 11, p 18, p 16, p 17, p 15) 4
PNU STEM Query Example n Find the name of the district pointed by Q at (2000, 1) p 1[(2006, 01), present ) p 5 p 11 p 6 [(2000, 04, 01), (2001, 12, 31) ) p 15 p 4 p 2 p 3 p 18 [(2004, 05), (2005, 12, 31) ) Q p 13 [(2005, 04, 01), present ) p 14 p 17 p 16 [(2002, 01), (2004, 03, 31) ) n How to process this query ? ¨ By full scan of the database ? 5
PNU STEM Problems Object Valid Time Interval Geometry A 1 [(2004, 05), (2005, 12, 31) ) (p 1, p 2, p 3, p 4, p 5) A 1 [(2006, 01), (present) ) (p 1, p 2, p 6, p 4, p 5) A 3 [(2007, 04, 01), present) ) (p 11, p 12, p 13, p 14, p 15) A 3 [(2002, 01), (2004, 03, 31) ) (p 11, p 12, p 16, p 17, p 15) A 3 [2005, 04, 01), present ) (p 11, p 18, p 16, p 17, p 15) n Large amount of duplication ¨ Duplication of similar values 6
PNU STEM Versioning Object A (t 1, 1) Object A’ (t 2, 2) Object A’’ Object A (t 1, A 1) (t 2, A 2) Object B (t 1, B 1) (t 2, B 2) ð Less duplication ð Need a Version Management Function 7
PNU STEM Continuous Change of Location n Representation of continuous movement Function e. g. Newtonian Mechanics or ¨ Needs a infinite set of values ¨ Impossible ¨ n Sampling <S, Fest > Assumption on continuous movements ¨ Set of snapshots ¨ Interpolation method: e. g. Linear Interpolation ¨ 8
PNU STEM Representation in 3 -D (x, y, t ): Trajectory n Representation in 3 -D where ti is a sampling time and fx(o, t ), fy(o, t ) are interpolation method. y (x 1, y 1, t 1) (x 2, y 2, t 2) (x 3, y 3, t 3) x t 0 t n Trajectory TR={ (p, t ) } 9
PNU STEM Interpolation (or Prediction) n Interpolation From past data: e. g. Estimate p at t where ti < ti +1 ¨ Mostly linear interpolation is used ¨ n Prediction (Extrapolation or Tracking) ¨ From the current data n ¨ Estimate p at t where ti < t and ti is the most recent snapshot Linear prediction ? 10
PNU STEM Representation in Euclidean Space n Trajectory of Moving Objects in Euclidean Space ¨ Sequence of Points in (x, y, t) Space n n (x, y, t)* with Interpolation Method such as Linear Interpolation Inappropriate for objects in Road Network Space Euclidean distance is meaningless for vehicles ¨ Queries are given on road network space rather than Euclidean space ¨ Linear Interpolation is not correct ¨ 10: 10 10: 05 10: 00 11
PNU STEM Representation in Road Network Space n Trajectory of Moving Objects in RN Space ¨ Sequence of Tuple (Seg. ID, offset, t) n n (Seg. ID, offset, t)* with Speed Interpolation Method Seg. ID : ID of Road Segment Offset : Distance from the starting point of the segment Advantages Smaller size of data for Seg. ID and offset than x, y coordinates ¨ Distance in RN Space is meaningful ¨ No more incorrect interpolation error ¨ Elimination of repeating Seg. ID ¨ n (Seg. ID, n, (offset, t)* )* 12
PNU STEM Representation by Speed Model n Speed Pattern of Vehicles Parametric Model of Speed ¨ Representation of Trajectories by Speed Model ¨ 13
PNU STEM Speed Model on Road Network Speed v 2 v 3 v 1 Time t 1 t 2 t 3 t 4 ( (t 1, v 1), (t 2, v 2, t 3), (t 4, v 3) )* 14
PNU STEM Technical Details n How to Separate Three Phases Constant Speed Phase ¨ Acceleration Phase ¨ Deceleration Phase ¨ n A simple Heuristic : k-Consecutive Points If k consecutive points of a same phase are encountered, then separate it. ¨ How to define k ? ¨ How to define acceleration ? ¨ n n Least Mean Square vs. Simple Straight Line Wavelet 15
PNU STEM Analysis of Speed Model Representation n Accuracy Normalized Speed Estimated Speed Real Speed Time n Data Size : More than 60% of reduction 16
PNU STEM Tracking on Road Network: m-Track n Collaboration with ETRI, ¨ Prof. Christian Jensen at Aalborg Univ. in Denmark ¨ n Tracking ¨ n Maintaining the current location of moving objects at server Goal Development of a tracking method for vehicles on road network ¨ To reduce the number of updates from vehicles ¨ 17
PNU STEM m. Track n Basic Assumption Moving Objects on Road Network ¨ Tracking Moving Objects with Prediction ¨ n Prediction-Based Tracking ¨ Client : Moving Object n n n ¨ Server : DB for moving objects n n ¨ Real position preal from GPS Estimated position pestimated from prediction algorithm If | preal - pestimated | > threshold, then report update to the server If there is a update request from client, then update position. Otherwise, positional data in DB is considered as correct. Prediction n Road-Based Prediction 18
PNU STEM Prediction Policies n Previous Prediction Methods In Euclidean Space ¨ Linear Movement : e. g. C. Jensen in ACM-GIS 2003 ¨ Arbitrary Movement : e. g. U. Tao in SIGMOD 2004 ¨ n n n Point-Based Prediction Vector-Based Prediction Road-Based Prediction In Road Network Space ¨ Constant Speed on a Road Segment ¨ Parametric Speed Model ¨ 19
PNU STEM Point-Based Update Policy n n n Only the position of a moving object is taken into account. The database makes constant position prediction of the position. The client sends a new position after the given threshold is crossed 20
PNU STEM Point-Based Update Policy 21
PNU STEM Vector Policy n n Object position, speed, and direction of movement are taken into account. It is assumed that the object moves linearly, at a constant speed. 22
PNU STEM Vector-Based Policy 23
PNU STEM Segment-Based Policy n n n The moving object is sending its position and velocity vector. The road on which the object is moving is known. The moving object moves along the shape of the road 24
PNU STEM Segment-Based Policy 25
PNU STEM Tracking Algorithm Moble Client predict position compare with new GPS data Query predict position [within threshold] [old connection] Server [out of threshold] Location DB [start] get GPS send update DB [continue] [finish] store settings (route) receive update receive settings (route) send threshold and new route 26
PNU STEM Comparison of Update Policies 27
PNU STEM Improvement of m. Track n Merging Segments ¨ n Avoid Irrelevant Segmentation Routing Information ¨ Avoid Unnecessary Updates due to Segment Changes 28
PNU STEM Continuous Change of Shape n How to represent it ? 29
- Slides: 29