Time Relaxed Spatiotemporal Trajectory Joins Petko Bakalov, Marios Hadjieleftheriou, Vassilis J. Tsotras University of California, Riverside 4/5/2019
Overview Motivation Problem description Using symbolic representation algorithm Multiple origins sliding window evaluation Symbolic class separation join Conclusion and future work 4/5/2019
Motivation (1) Spatiotemporal data is generated in many novel applications Typical queries involve “range” or “nearest neighbor” Example: X time 4/5/2019
Motivation (2) In the previous paper (“Efficient Trajectory Joins using Symbolic Representations”) we address a novel query, the Trajectory Join: “identify all pairs of similar trajectories between two datasets”. Here we examine another interesting query, the Time Relaxed Spatiotemporal Trajectory Join (TRSTJ) which effectively which finds groups of moving objects that have followed similar patterns in different times. 4/5/2019
Problem description (1) A moving object trajectory is defined as a sequence of location/time-instant pairs. Given: two sets of object trajectories R and S, distance function D(), a threshold ε and time interval δt Time relaxed trajectory join result: set V of pairs <Ri, Sj>, where Ri Є R and Sj Є S, such that there exist time-intervals δti for R and δtj for S such that | δti | = | δtj | = |δt| and D(Rδti, Sδtj) < ε 4/5/2019
Problem description (2) ε |δtR| = |δtS| δtS R δtR Y X 4/5/2019
Proposed join evaluation We can use the trajectory join algorithm described in MDM05. The key ideas of the algorithm are: Use appropriate trajectory approximation to reduce the size of the problem Define a lower bound distance function for this approximation Using this distance function, prune as many trajectory pair similarity evaluations as possible. 4/5/2019
Approximation Used (1) The algorithm takes as input a trajectory of size n and divides it into m equal-sized frames The trajectory value in each frame is substituted with the average of the values and is discretized A trajectory is represented by the “symbolic string”: CCBCDB Time A B C D X 4/5/2019
Approximation Used (2) X D C B A As index structure we keep an array of “symbolic strings” representing the trajectories CCBCDB DAABCC BDDCBB 4/5/2019
Lower bound distance function We proposed the use of the following distance function, defined over symbolic representations of trajectories d() is the distance between two symbols K is the number of symbols representing time interval |δt| 4/5/2019
Time relaxed join algorithm (1) Step 1. Generate all possible substrings from both sets S and R with length k Step 2. Define an order among these substring by using as a score the distance between these strings and some randomly picked string called origin O: Step 3. By using sliding window algorithm find all pairs between the two sets having score less then the threshold. Step 4. Verify the result with the actual tr. data 4/5/2019
Time relaxed join algorithm (2) CCBCDB DAABCC BDDCBB 1.1: CCBC 1.2: CBCD 1.3: BCDB 2.1: DAAB 2.2: AABC 2.3: ABCC 3.1: BDDC 3.2: DDCB 3.3: DCBB Step 1 Step 2 & 3 2.2 2.1 2.3 1.3 3.1 3.3 1.2 1.1 3.2 O 2.2 2.1 2.3 1.3 3.1 3.3 1.2 1.1 3.2 O 2.2 2.1 2.3 1.3 3.1 3.3 1.2 1.1 3.2 O Step 4 Trajectories 2 and 3 satisfy the criteria 4/5/2019
Experimental Results 4/5/2019
Problems There is a huge disproportion between the number of candidate pairs and the number of pairs in the join result caused by the very large number of trajectory segments (subsequences) We propose two heuristics to improve the performance Using Multiple origins Class separation Join 4/5/2019
Multiple Origins we suggest to use multiple origins O1 O2 O3 O4 … On instead of just one. In order for a pair of sequences to be reported as candidate pair by the sliding window algorithm, their difference in distances to the origins should be less than the threshold distance for every origin (drastic reduction on # of candidate pairs) 4/5/2019
Multiple Origins 4/5/2019
Multiple Origins - Experiments 4/5/2019
Class Separation Join Each class is associated with a spatial area. Sequences are assigned to the class in whose area the corresponding trajectory crossed during some (i.e. the first) frame of the sequence. We can decide whether it is possible to have a match between two trajectory sequences by looking at the classes to which they belong. 4/5/2019
Class Separation Join 4/5/2019
Class Separation Join The trajectory classes are scanned in a lexicographic order. For every class we create a sorted list combining the elements of all classes that lie on distance from the current one. Then we process this list with the already discussed algorithm. 4/5/2019
Class Separation Join 4/5/2019
Conclusion The basic symbolic join algorithm is not an efficient solution for this problem. Two simple heuristics can drastically reduce query time for the TRSTJ query. Future extension of these techniques can be the use of different distance metrics. 4/5/2019