Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Complex Spatio-Temporal Pattern Queries Cahide Sen University of Minnesota.

Similar presentations


Presentation on theme: "1 Complex Spatio-Temporal Pattern Queries Cahide Sen University of Minnesota."— Presentation transcript:

1 1 Complex Spatio-Temporal Pattern Queries Cahide Sen University of Minnesota

2 2 Outline  Motivation  Introduction  Contributions  STP Query Algorithms  Related Work  Evaluation  Future Work

3 3 Motivation Given a large collection of spatio-temporal trajectories Environment 2-dimentional space and 3 rd dimension as time Find out how to evaluate Spatio-Temporal Pattern queries? Objective to achieve less computation and I/O cost

4 4 What is Spatio-Temporal Pattern Query? An STP query returns trajectories that follows movement patterns defined as spatio-temporal predicates. Some examples: “find objects that crossed through refion A at time T 1, came as close as possible to point B at a later time T 2 and then stopped inside circle C sometime during interval (T3, T4)” “find objects that first crossed through region A, then passed as close as possible from point B and finally stopped inside circle C”

5 5 What is trajectory? an imagined trace of positions followed by an object moving through space, in other words, the position of the object as function of time. Trajectory allows you to compute the location of an object for any given time. The model presented is independent of trajectory representation.

6 6 More on ST Pattern Queries An ST pattern query Q is expressed as: Q = {(Q 1,T 1 ), (Q 2,T 2 ), …, (Q m,T m )} where each pair is a spatio-temporal predicate. Q k can be range or NN query. T is time constraint which can vary from a time instant (t) to time-interval (  t) or empty. If T is empty, the query is classified as STP with Order. Otherwise, STP with Time.

7 7 More on ST Pattern Queries STP Query with Time “find objects that crossed through region A at time T 1, came as close as possible to point B at a later time T 2 and then stopped inside circle C sometime during interval (T3, T4)” STP Query with Order “find objects that first crossed through region A, then passed as close as possible from point B and finally stopped inside circle C”

8 8 Contributions  Introduces and formalizes Spatio-Temporal Pattern queries  Proposes query evaluation algorithms for STP queries with time and STP queries with order  A novel index structure for evaluation of STP queries with order

9 9 STP Query Algorithms 1.STP Queries with Time Range Predicate Evaluation NN Predicate Evaluation Combinations 2.STP Queries with Order Range Predicate Evaluation NN Predicate Evaluation Combinations

10 10 STP Queries with Time Traditional spatio-temporal index structure is used to index trajectories (R-tree, MVR-tree). Trajectories are approximated using Minimum Bounding Rectangles. An MBR bounds movement of an object for a small time-interval.

11 11 Leaf nodes of ST index are populated with MBRs associated with the object. Data entries in this index points to raw trajectory data on disk. Raw trajectory data is stored on sequential pages per trajectory. Thus, MBRs are indexed using a secondary spatio-temporal index structure.

12 12 STP Query with Time, Range only Given Q = {(Q 1,T 1 ), (Q 2,T 2 ), …, (Q m,T m )} where all Q m are range  Evaluate predicates concurrently outcome: candidate trajectories 2.Then, take intersection of these candidate trajectories 3.Retrieve only the trajectories belonging to the intersection Visualize …

13 13 STP Query with Time, NN only Fact: An NN predicate is satisfied only with respect to other NN predicates. Not as straightforward as evaluating range queries Two approaches : Lazy, Eager Lazy : Main motivation is prepruning. Eliminate trajectories whose LB D (Q,P j ) is larger than any known UB D (Q,P k ) so that decrease number of P k to retrieve from disk.

14 14 Lazy Strategy Q = { (NN(0), 1), (NN(0), 2), (NN(0), 3), (NN(0), 4), (NN(0), 5) } In other words, locate the object that stays closer to the origin during time interval [1,5]. First locate, 1-NN, 2-NN etc MBRs for each query predicate

15 15 More on Lazy Strategy While true concurrentBestFristSearch () Output: set S of P j discovered during NN searches For each P j in S if LB D (Q,P j ) > t then remove P j from S else if P j covers Q then PD = getRawTrajectory(P j ) compute D(PD, Q) if D(PD, Q) < t then t = D(PD, Q) and P B = P j else remove P j from S For each P j left in S if LB D (Q,P j ) < t then stop = false else remove P j from S If stop then break End while Return P B

16 16 More on Lazy Strategy A hash-table indexed by trajectories Each entry stores current LB D (Q,P j ) and bit vector, one bit per predicate indicating if predicate q i is covered by P j P1P1 P2P2 P3P3 P.. Q1Q1 Q2Q2 Q.. Q1Q1 Q2Q2

17 17 More on Lazy Strategy Each time a new MBR is located, corresponding entry in hash table P j is retrieved, corresponding bit is set and LB D (Q,P j ) is updated. If AND operation on bit vector is true, it means P j covers the query. D(Q, P j) is computed and stored as LB D (Q,P j. For other Ps, pessimistic approximation done P1P1 P2P2 P3P3 11111 11100 00011

18 18 More on Lazy Strategy Benefits:  Incremental discovery of trajectory MBRs  Prepruning before loading raw trajectory data  Thus, reduces access to raw data on disk

19 19 Eager Strategy Load raw trajectory data from disk for each predicate Q i Then, compute D(Q i, P j ) Lazy or Eager? Depends on query properties and how many pages are occupied per trajectory

20 20 Combinations Satisfiability of NN predicates depends on satisfiability of range predicates. First evaluate range predicates Then evaluate NN predicates

21 21 STP Queries with Order Expressed as : Q= {Q 1, Q 2, Q 3,…, Q m } Problem: Traditional ST indexes can not be used since time constraint is missing and relative order of predicates is of importance. A special structure storing order inside the index is needed. Solution: an index structure which maintains the order with which each P j satisfies query predicates. For each Q i, associate an ordered list of P j s satisfying Q i, S Qi Trajectories in S Qi are ordered by their ids’. Given a STP query Q, all predicates are evaluated concurrently by merge-join among all S Qi s. Even this solution can be improved. How?

22 22 More on Queries with Order P 1, 3P 1, 9P 3, 8P 6, 5.. P 2, 1P 3, 3P 3, 2P 5, 6 Q1Q1 Q2Q2 Q3Q3 Q..

23 23 More on Queries with Order Use space-partitioning grid Each cell acts as a range predicate. Thus, S Qi is created for each cell. Predicates are evaluated by merge-join like before. Then, verification step to prune false positives.

24 24 More on Queries with Order Benefits  space saving due to symbolic representation trajectories  discretizes space, only a fixed number of lists are kept (the cell list can be stored on a secondary storage)

25 25 Related Work  No current related work on evaluating combinations of spatial predicates with time and order  No current work on efficient evaluation of combination of NN predicates  “Mobility Patterns” by Mouza and Riagux, patterns are expressed as regular expressions and can not handle distance-based queries, neither explicit time constraints. Besides, this model assumes regions are predefined and divided into named zones.

26 26 Related Work – cont. Map partitioned into several zones identified with labels (a, b,..) Ex: “Give all the objects that traveled from a to f, stayed at least 2 minutes in f then traveled from f to c.” Q= (a.f{2,}.c,0), mobility pattern as a regular expression To evaluate the pattern query, build an automaton

27 27 Experiments and Evaluations Synthetic dataset of moving object trajectories R-tree and MVR-tree index structures are used to index MBRs. On average 20 MBRs per trajectory RelevantPattern set: 100 queries formed from partial segments of trajectories already in the dataset, slightly skewed in time and space RandonPattern set: 100 queries whose predicates lie on consecutive nodes of the network All predicates on STP queries with Time are NN and with Order range. Top-20 results are returned.

28 28 Performance vs. # of Predicates, time STP queries with Time  Lazy deteriorates since many index nodes need to be accessed before a tight threshold can be computed on randompattern set  On relevantpattern set, both lazy and eager remain quite unaffected since NN discovery is fast and searches terminate faster.

29 29 Performance vs. # of Predicates, time  Randompattern, # of trajectories to load increases as # of predicates increases.  Eager loads more trajectories.  On relevantPatttern set, both Lazy and Eager load same amount of trajectories since there are many trajectories similar to the given queries. Very fast  See the differences in scale

30 30 Performance vs. # of Predicates, order STP queries with Order  Relevantpattern set  CellList reduces I/O since trajectories are pruned efficiently during joining of lists.  CellList decreases # of trajectories to load  R-tree performs very poorly since no way to prune trajectories due to missing time constraint and order information is not stored in index.

31 31 Future Work  How to integrate k-NN queries into this model?  How to decrease space requirements?  Can we make the STP queries continuous?  How to extend the techniques for STP queries with relative temporal constraints? (10 minutes before or after, etc.)  How to develop solutions for environments with uncertain moving object trajectories?

32 32 Conclusion  Introduced Spatio-Temporal Pattern queries for trajectories  Developed algorithms for evaluation of STP queries  Developed special index structure for STP queries with order  Achieved its goals: reduced I/O and computation cost

33 33

34 34 Queries with Order, kNN only For each predicate Q i, there is a S Qi. S Qi is populated with all entries contained in cells adjacent to Q. In each phase, number of adjacent cells is increased by moving one cell further. (first cell containing Q, then adjacent 8 cells, etc) For each addition to S Qi, LB D (Q i,P j ) is computed. For every new cell added in S Qi, first join S Qi with other S Qj.


Download ppt "1 Complex Spatio-Temporal Pattern Queries Cahide Sen University of Minnesota."

Similar presentations


Ads by Google