• Aucun résultat trouvé

Trajectory Indexing

Dans le document Mobility, Data Mining and Privacy (Page 162-167)

Trajectory Database Systems

6.3 Trajectory Indexing

Like in traditional databases, querying in MODs could be very expensive because of the nature of data and the complexity of query processing algorithms. Given also that location aware devices are almost ubiquitous in these days, trajectory data-bases will, sooner or later, face enormous volumes of data. It consequently arises that performance, in the presence of vast data sizes, will be a significant problem for trajectory databases. Since ordering is far from nature of the geographic (mul-tidimensional) data, traditional indexes like B-trees are not useful in spatial (and consequently in spatiotemporal) databases. In the domain of spatial databases, the R-tree proposed by Guttman [27] is “almost ubiquitous”, with applications ranging from geographical information systems (GIS) and computer-aided design (CAD) to image and multimedia management systems [35]. The R-tree can be considered as

D

Fig. 6.3 An example of spatial data, their MBBs, a range query, and the corresponding R-tree [35]

an extension of the B-tree inn-dimensional spaces. Similar to the B-tree, R-tree is a height balanced tree with the index records in its leaf nodes containing pointers to the actual data objects. Leaf node entries are of the form (id, MBB), whereidis an identifier that points to the actual object and minimum bounding box (MBB) is a n-dimensional interval. Nonleaf node entries are of the form (ptr, MBB), whereptr is a pointer to a child node andMBBis the bounding box that covers all child nodes.

A node in the tree corresponds to a physical disk page (or disk block, which is the fundamental element on which the actual disk storage is organized) and contains betweenmandM entries (M is the node capacity andmis a tuning parameter – usuallymis set toM/2, which guarantees that the space utilization is at least 50%).

Contrary to the B-tree, node MBBs belonging to the same tree level are allowed to overlap. Figure 6.3 illustrates a set of spatial objects and the corresponding R-tree.

In the domain of spatiotemporal indexing, R-tree variations and extensions include, among others, three-dimensional R-trees [66], TB-trees and STR-trees [49], FNR-trees [20] and MON-trees [2], while SETI [11] is a hybrid R-tree-based and partition-based technique. Since our interest in this chapter focuses on historical MODs, we restrict our discussion to indexing techniques recording past locations.

The reader interested in indexing current locations and motion vectors can find very interesting works in [52, 55, 56, 62, 74].

Taking into consideration the fact that motivation behind MODs usually comes from emerging applications such as fleet management and LBS solutions, trajectory indexing techniques are classified into those organizing motion in either unrestricted space or fixed networks. In the latter case, the underlying infrastructure is not only an additional information that somehow has to be integrated in the index, but also affects fundamental concepts, such as the notion of distance (i.e., network vs.

Euclidean distance).

6.3.1 Indexing Trajectories in Unrestricted Space

On the subject of indexing moving object trajectories in unrestricted space, the three-dimensional R-tree [66] was proposed as a straightforward extension of the R-tree in the three-dimensional space formed by the 2+1 (spatial and temporal, respectively) dimensions. It treats time as an extra spatial dimension and is capable

156 E. Frentzos et al.

of answering coordinate-based queries, as they are defined in the previous chap-ter. Although originally designed to index multimedia data, the proposal by Pfoser et al. [49] enables it to support trajectories as well. Obviously, the three-dimensional R-tree indexes collections of line segments in the three-dimensional (spatiotempo-ral) space, only concerning about the processing of the traditional coordinate-based queries, being at the same time inefficient to handle trajectory-based queries (also discussed in the previous chapter) whose processing requires the extraction of a part of – or even, the complete – moving object’s trajectory.

The trajectory bundle tree (TB-tree), proposed by Pfoser et al. [49], tries to over-come this inefficiency. The TB-tree is a height-balanced tree with the index records in its leaf nodes based on the three-dimensional R-tree. However, it turns out to be fundamentally different from other spatiotemporal access methods mainly due to its insertion and split strategy. Its insertion algorithm is not based upon the spatial and temporal relations of moving objects but it relies only on the moving object identifier (id). When a new line segment is inserted, the algorithm searches for the leaf node containing the last entry of the same trajectory, and simply inserts the new entry in it, thus forming leaf nodes that contain line segments from a single trajec-tory. If the leaf node is full, then a new one is created and inserted at the right end of the tree. For each trajectory, a double-linked list connects the leaf nodes that contain its portions together (Fig. 6.4), resulting in a structure that can efficiently answer trajectory-based queries. Pfoser et al. [49] propose also the STR-tree, which tries to combine the desired properties of both TB and three-dimensional R-tree; however as presented in the respective experimental study, same as the three-dimensional R-tree, it is also inefficient on trajectory-based queries. Zhu et al. [78] extend the work in [49] proposing the octagon-prism tree (OP-tree), which indexes trajectories by using octagon approximations instead of MBBs. On the basis of the conducted experiments, OP-trees are shown to outperform the original TB-tree both on range and trajectory-based queries.

Unfortunately, in spite of its clear advantages on trajectory-based query process-ing, the TB-tree (and its variation, the OP-tree) has a crucial drawback: because of its insertion strategy, new trajectory data are always inserted at the right “end” of the tree, leading its performance to heavily depend on the order of data insertion. This insertion strategy may not lead to problematic behavior only under the assumption that trajectory data are inserted in the index in pure chronological order: the insertion

Fig. 6.4 The TB-tree structure

strategy will organize temporally close line segments to be also close in the index.

However, in real-world applications, this assumption is not guaranteed to be true.

For example, in an application where the insertions occur in real time, if the moving object enters an area where the position transmission system does not function, its trajectory could be stored locally in the object memory and be transmitted to the central server – where the index operates – at a later time; meanwhile, other moving objects could have transmitted their positions, increasing the temporal overlapping between the tree nodes, which subsequently leads to the deterioration of the index performance.

SETI [11] is a hybrid structure, indexing trajectories at two levels to disjoint the spatial from temporal indexing. Acknowledging that trajectory data sets continually expand in the temporal dimension while the spatial boundaries remain static or at least rarely change, SETI partitions the two-dimensional space into disjoint hexagon cells that remain static during the structure’s lifetime, while other adaptive spatial partitioning strategies can also be used. Each cell logically contains only those tra-jectory segments that are completely within the cell, while in the case of a tratra-jectory segment that crosses the cell boundary is split and subsequently inserted into both cells. Actually, trajectory segments are inserted into a data file; each page of the data file contains segments from only one cell. Then, a temporal index (e.g., a one-dimensional R-tree) indexing the time intervals of each particular cell in the data file is assigned to the corresponding cell. Figure 6.5 summarizes the SETI structure.

The insertion and searching algorithms follow a multistep approach composed of spatial filtering, temporal filtering, and refinement. In particular, during each insertion, the algorithm locates the cell into which the segment has to be inserted (considering also possible splits between cells), and then inserts it in the correspond-ing page of the data file, updatcorrespond-ing at the same time the correspondcorrespond-ing entry of the one-dimensional R-tree if it is necessary. Although as presented in the experimental study of [11] SETI clearly outperforms the three-dimensional R-tree and the TB-tree in time-interval and time-slice queries, it cannot be used to process trajectory-based queries. This is due to the fact that trajectory line segments are organized inside the index, based only on their spatial and temporal relations; as such successive line segments of the same trajectory may be placed in different disk pages. Therefore, in the worst case scenario the retrieval of a single trajectory would require to read one disk page for each trajectory line segment. Moreover, authors do not provide any

R*-tree

corresponding to Ci Data File

Data Space

CellCi

Fig. 6.5 The SETI structure

158 E. Frentzos et al.

nearest-neighbor query processing algorithm, while the development of an efficient one is not a straightforward task.

6.3.2 Indexing Trajectories in Fixed Networks

The first proposal concerning the indexing of trajectories in fixed networks was presented in [20], introducing the FNR-tree based on the original R-tree. Instead of using a single R-tree to index object trajectories, the FNR-tree utilizes a forest of R-trees. More specifically, the FNR-tree is a two-stage access method, consist-ing of a two-dimensional R-tree, which organizes a set of one-dimensional R-trees (Fig. 6.6). The two-dimensional R-tree is used to index the spatial data of the network, whereas each one of the one-dimensional R-trees corresponds to a leaf of the two-dimensional R-tree, and indexes respective time intervals. As long as there are no structural changes in the spatial network, the two-dimensional R-tree remains fixed, whereas one-dimensional R-trees change as objects move. The inser-tion and range query processing algorithms presented in [20] are much alike those of SETI, consisting also of the same three steps of spatial filtering, temporal fil-tering, and refinement. The experimental study presented in [20] shows that the FNR-tree outperforms the three-dimensional R-tree by several orders of magnitude considering simple range queries, while it demonstrated a weakness in the case of time-slice queries with the entire spatial extent. Same as SETI, there is neither obvi-ous way for the FNR-tree to support efficient trajectory-based query processing nor nearest-neighbor query processing.

Exploiting the same property of a spatial network, a variation of the FNR-tree, called MON-tree, has been proposed in [2]. In this index, instead of using one-dimensional R-tree for every leaf node of the two-one-dimensional R-tree, the MON-tree utilizes a two-dimensional R-tree for every polyline of the spatial network. The MON-tree is shown to significantly outperform the three-dimensional R-tree and

O1

Fig. 6.6 An FNR-tree example: (a) trajectories of three objects on a road network and (b) the corresponding FNR-tree components

the FNR-tree, in time-interval and time-slice queries, while it shows the same disad-vantage with the previously described schemes, being unable to efficiently process trajectory-based queries.

Another interesting methodology on the same subject of indexing of objects moving on networks is presented in [48]. This approach suggests the mapping of the underlying network from two- to one-dimension by sorting the network edges according to their Hilbert values. Hilbert values is an approach for ordering the two-dimensional space; they are determined by applying a Hilbert curve covering the two-dimensional space, mapping every two-dimensional to a one-dimensional point [73]. Then, the problem of indexing three (i.e., 2 spatial+1 temporal) dimensions is reduced to the problem of indexing two (i.e., 1 spatial+1 temporal) dimensions, which can be efficiently handled by employing any existing simple spatial index as the well known R-tree, also supported by existing DBMS. After that, each range query has to be mapped accordingly to the reduced one-dimensional space, produc-ing thus a number of two-dimensional (spatial and temporal) rectangles, which are subsequently posed against the R-tree. The technique also uses an R-tree to index the underlying network so as to speed up the query mapping process. The experi-mental study presented in [48] shows that the proposed method clearly outperforms the three-dimensional approach (e.g., three-dimensional R-tree, treating time as an extra spatial dimension) as the query size increases. However, same as previous, there is no obvious way on how this approach [48] can process nearest-neighbor and trajectory-based queries.

Dans le document Mobility, Data Mining and Privacy (Page 162-167)