Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization of Continuous Query Maintenance for Trajectories.

Similar presentations


Presentation on theme: "Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization of Continuous Query Maintenance for Trajectories."— Presentation transcript:

1 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization of Continuous Query Maintenance for Trajectories For the Degree Master of Science Hui Ding December, 2005

2 Dept. of Electrical Engineering and Computer Science, Northwestern University Outline 1. Motivation 2. System Architecture 3. Context-Aware Optimization 4. Experimental Evaluation 3. Conclusion

3 Dept. of Electrical Engineering and Computer Science, Northwestern University Motivation Location-Based Services has become an enabling technology for many novel classes of applications –Transportation planning –Context-Aware Tourist Information Provider –Digital Battlefield The key problem is the efficient management of: –Transient (location, time) information of the moving objects –Various types of spatio-temporal queries pertaining to the objects Location update Database Server Moving Objects Spatial Queries Business Rules Location update

4 Dept. of Electrical Engineering and Computer Science, Northwestern University Motivation: Continuous Query Reevaluation Moving Object Database (MOD) differs from traditional database in that the data stored changes over time, due to the dynamic nature of moving objects Accordingly, the queries on such database may be instantaneous as well as continuous Consider the following query: Andi: Give me the 4-star hotels within 5 miles on my way I-90 north

5 Dept. of Electrical Engineering and Computer Science, Northwestern University Motivation: Modeling Moving Objects in the Database Moving objects can be modeled as follows: sequence of (location,time) updates (e.g., GPS-based) Electronic maps + traffic distribution patterns + set of (to be visited) points => => full trajectory (location,time, Velocity Vector ) updates now ->  A trajectory is a piece-wise linear function f: T -> (x, y) represented as a sequence of points (x1, y1, t1), (x2, y2, t2), …, (xn, yn, tn)  Realistic description: transportation vehicles, patrol cars, delivery trucks, individuals travel between home and work… Continuous Queries are Maintained on the trajectories!

6 Dept. of Electrical Engineering and Computer Science, Northwestern University Motivation: Reevaluating Continuous queries on trajectories Traffic disturbances (accident, road work, fire, storm, etc.), insertion/deletion of certain trajectory, modification to the query pattern Q: It’s 12:30pm now, retrieve the public transportation buses within half a mile around NU campus between 2:00pm and 2:30pm, and send me the answer at 1:15pm. => answer set of query invalid, => re-evaluation necessary. For example, a bus is delayed by an accident at 1:40pm and cannot be on campus between 2:00pm and 2:30pm

7 Dept. of Electrical Engineering and Computer Science, Northwestern University Motivation: Scenario Disturbance zone affects some moving objects’ trajectories in the future Queries need re-evaluation Our goal: optimize the response time it takes for re-evaluation

8 Dept. of Electrical Engineering and Computer Science, Northwestern University Motivation: Problem Statement -- Optimize the Reactive Maintenance of Continuous Queries Q3 need not be re-evaluated since its answer not affected Tr5 and Tr6 need not be considered when reevaluating Q1 and Q2 (not affected by disturbance!) Tr4 need not be considered since it is not relevant to pending queries

9 Dept. of Electrical Engineering and Computer Science, Northwestern University System Architecture Stored Procedures Main Memory Cache Table Moving Object Table Answers and Answer Updates Traffic Abnormality Post Query Database Dist. Zone ID... Time Duration Traffic Abnormality Table Database Query Region Query ID... Current Answer Query Table Traj. Shape... Pending Query... Traj ID Databas e Query Optimizer SDO_GEOMETRY type Linear Referencing System Index Engine Query Operators Geometry Engine Triggers Context Parser and Extraction User Interface... Traj. Shape... Pending Query Traj ID Traj. Shape... Pending Query Traj ID

10 Dept. of Electrical Engineering and Computer Science, Northwestern University System Architecture : Main Components  Database Tables  Database Triggers Query Trigger TR_Q:  ON UPDATE TO MOT  IF A_Q Affected  Update A_Q Queries Table (QT) Moving Objects table (MOT) Traffic Abnormalities Table (TAT)  ON INSERT/UPDATE TO TAT  IF trajectories in MOT affected  UPDATE MOT.traj_shape Traffic monitoring Trigger TR_TAT:

11 Dept. of Electrical Engineering and Computer Science, Northwestern University System Architecture: Queries Considered in Our System Range Query – Retrieve the moving objects within a given region during a time interval Within Distance Query – Retrieve the moving objects within a given distance to a querying object KNN Query – Retrieve the K nearest neighbors to the querying object

12 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: Guideline Carefully avoid context-switching cost –System level –Intra-query level Intelligently reduce disk access and computation volume –Utilizing spatio-temporal context information embedded in the queries/moving objects

13 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: System-level Context-awareness minimize the context-switching among OS processes (semantics of individual trigger execution) Set-level vs. Instance-level query re-evaluation

14 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: System-level Context-awareness “Before” vs. “After” trigger for query re-evaluation

15 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: Intra-query level Context-Awareness Chances of performance tuning: the three steps of reevaluation 1.Between affected moving objects and unaffected queries 2.Between affected queries and unaffected moving objects 3.Between affected moving objects and affected queries Report Traffic Abnormality Moving Object Trajectories Pending Queries Updated Trajectories Affected? Updated Queries Affected? 3 21

16 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: Query Indexing When reevaluating unaffected queries against affected trajectories, index on the pending queries is used to limit search space Construct Minimum Bounding Box on the fly and use it to retrieve queries that need to be reevaluated For Within Distance query and KNN query, index is maintained on the segments of the queries instead of the trajectories to improve selectivity

17 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: Query Ordering When reevaluating affected queries against unaffected trajectories, we use query ordering to take advantage of the operating system cache The space ordering is imposed by using space- filling curve R3 R1 R2 R4

18 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: Join++ -- Spatio-Temporal Peculiarities When reevaluating affected queries against affected trajectories, we proposed a spatio- temporal join algorithm to reduce the amount of computation required

19 Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization: Spatio-temporal Join Example

20 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation System-level Context-Awareness Intra-Query level Context-Awareness –Query Indexing –Query Ordering –Spatio-temporal Join Overall performance study

21 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: system-level context-awareness “Before “ trigger reduce response time significantly due to the savings in disk access Set-level trigger out performs tuple-level trigger, but this is somewhat diminished by the dominant disk access and computation time

22 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: system-level context-awareness Range Query

23 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: system-level context-awareness Within Distance Query

24 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: system-level context-awareness K-Nearest Neighbor Query

25 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: Query Indexing Range Query – 100 Affected Trajectories

26 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: Query Indexing Range Query – 200 Affected Trajectories

27 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: Query Indexing Within Distance Query – 100 Affected Trajectories

28 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: Query Indexing KNN Query – 100 Affected Trajectories

29 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: Query Ordering Ordering of A Group of Pending Range Queries

30 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: Query ordering Ordering of A Group of Within Distance Queries

31 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental Evaluation: Spatio-temporal Join

32 Dept. of Electrical Engineering and Computer Science, Northwestern University Experimental evaluation: overall performance Context-aware approach can make query reevaluation 3 times faster than the naive approach

33 Dept. of Electrical Engineering and Computer Science, Northwestern University Conclusion Investigated the impact of various context- dimension on the reevaluation of pending queries Reduced response time to traffic abnormality by utilizing the spatio-temporal correlation between the queries and the (updated) trajectories Implemented a system that maintains correct answers to three types of major continuous queries

34 Dept. of Electrical Engineering and Computer Science, Northwestern University Ongoing work: OMCAT Demo

35 Dept. of Electrical Engineering and Computer Science, Northwestern University THANK YOU!


Download ppt "Dept. of Electrical Engineering and Computer Science, Northwestern University Context-Aware Optimization of Continuous Query Maintenance for Trajectories."

Similar presentations


Ads by Google