Presentation is loading. Please wait.

Presentation is loading. Please wait.

Continuous Density Queries for Moving Objects

Similar presentations


Presentation on theme: "Continuous Density Queries for Moving Objects"— Presentation transcript:

1 Continuous Density Queries for Moving Objects
Xing Hao, Xiaofeng Meng Renmin University of China Jianliang Xu Hong Kong Baptist University

2 Outline Introduction Continuous Density Queries Experiments
Quad-tree Safe interval Update Query Experiments Conclusions

3 Outline Introduction Continuous Density Queries Experiments
Quad-tree Safe interval Update Query Experiments Conclusions

4 Introduction Density Queries Research : New applications :
Vehicle tracking Traffic navigation Travel services Research : modeling & indexing Range & aggregation queries k-nearest-neighbor queries Embedded systems Mobile communications Positioning technologies Density Queries

5 Introduction Density Query:
Given a set of objects O and a query q, determine the dense region with a high concentration of moving objects.

6 Introduction Application Interflow of goods and materials
Traffic control Collision probability evaluation Bandwidth management ……

7 Introduction Continuous Density Query:
Given a set of moving objects O and a query q at time t, determine the dense region with a high concentration of moving objects at that time. t2 t1

8 Outline Introduction Continuous Density Queries Experiments
Quad-tree Safe interval Update Query Experiments Conclusions

9 Continuous Density Queries
Continuous Density Query: A continuous density query returns all the regions that satisfy the following three conditions: 1. The density of the region is no less than ρ; 2. The minimum area of our interest is s and any sub-area of the region with an area larger than s must be dense; 3. No two regions in the result set overlap with each other. ρ×s s

10 Stop dividing when the area of the cell is less than s
Quad-tree Quad-tree Index space To get the answers satisfying the above conditions. We proposed a Quad-tree based algorithm. First we partition the space into a grid. In the Quad-tree, each node corresponds to a cell in the grid. the space is recursively divided into four quadrants until the area of the subspace is less than the threshold s given in the second condition. …… …… Stop dividing when the area of the cell is less than s

11 Quad-tree Node ((row, col), level, state, safe_interval)
0: Sparse Leaf node 1: Dense state 0: Sparse for all children Non-leaf node 1: Dense for all children A node in the Quad-tree is represented by a tuple. First is an index to identify the node, level denotes the level of the tree that the node belongs to. If the it’s a leaf node, the state can be 0 or 1, which indicates the region represented by the node is sparse or dense. For a non-leaf node, the state can be 0, 1, or 2, where 0 indicates all its children nodes are sparse, 1 indicates all its children nodes are dense, and otherwise the state is 2. The safe interval is the valid time interval of the state. For example, if the region is dense, it will remain dense for at least a time period of safe interval. After that, the state of the region may or may not change. 2: Else Safe Interval : The safe interval is the time period for which the region keeps its current state.

12 The state may not be changed after t1.
Safe Interval Safe interval of dense cell Only focus on the leaving objects Dense cell: C Object number threshold:3 O3 O1 Leaving time: t1, t2, t3, t4, t5 O2 Now let’s see how to compute the safe interval. For a dense region, to simplify the computation, we only focus on the objects leaving from it, without considering the entering objects. This is because an entering object will not change the state of a dense cell. We compute the leaving time for each object and predict when the region becomes sparse. This figure gives an example, cell C is a dense region. There are totally five objects in C, , o1; o2; o3; o4; and o5. the object number threshold for a dense cell is three. That is ,when the amount of objects in the cell is less than 3, the cell turns sparse. We can compute the time for each object when it leaves the cell based on the location and velocity information.. Suppose the leaving times of these objects are t1,t2,t3,t4 and,t5, sorted in an ascending order it is t5; t3; t1; t4, and t2,. So o5 is the first leaving from c, then o3 and o1 ,after o1 moves out of this cell ,there are only 2 objects. The cell becomes sparse, so the safe interval is t1. Since we didn’t consider the entering object, there may be some objects move into the cell before t1, so when the safe interval expires, the state of the cell may not change , Thus, the state of this cell and the corresponding safe interval need to be re-calculated upon expiration. Ascending order: t5 , t3, t1, t4, t2 O4 O5 C Safe interval: t1 The state may not be changed after t1.

13 Safe Interval Safe interval of sparse cell
Only focus on the entering objects Sparse cell: C Object number threshold:3 O5 O6 O1 O7 to=L/Vmax O2 Entering time: t1,t2,t3,t4,t5,∞,∞, ∞ Entering time: t1,t2,t3,t4,t5,to,to,to For a sparse leaf cell, we only focus on the entering objects, Take this figure as an example, cell C is a sparse cell. the density threshold is 3, now there are 1 object in cl, so after 2 objects moving into this cell, it will turn into dense. To reduce the cost of scanning outside objects, we expand the cell until the expanding region contains more than 2 objects. When all the objects in this expanding region enter into the cell, the cell's state may be changed . On the other hand, a fasting moving object outside this expanding region may have also entered into the cell. Such earliest time is given by this formula: Vmax is the maximum moving speed ,L is the length of the expanding distance. Thus, within the interval to, the objects outside C will not move into it. we only need to scan the objects in the expanding region and estimate whether these objects can change the state of this sparse cell by computing their entering times. If the leaving time of the inside object is longer than to, it will be set to to. So the safe interval will not longer than to. As in the figure, the Entering time of the objects are t1,t2,t3,t4,t5,to,to and,to. sorted in an Ascending order it is t2,t1,t5,t3, to,to,to,t4 So after o2; o1; move into C, the cell changes into dense ,so t1 is the safe interval of the dense cell. Similar to the case for a dense leaf cell, the state and the safe interval of a sparse cell have to be re-computed when the safe interval expires. O8 C L O3 Ascending order: t2,t1,t5,t3, to,to,to,t4 O4 Safe interval: t1

14 Updating The safe interval expires The velocity of the object updates
Dense S1 D1 S2 Locate in Sparse Dense S3 S4 S5 Old direction Lu Now we know the safe interval of each cell but There are two cases in which we need to update the safe interval of a leaf cell: one is when the safe interval expires, we need to re-compute the state and safe interval of the cell, as discussed above ; the other is when the velocity of the object updates, we need to re-compute the states and safe intervals of those cells affected by this update. Below we will discuss how to deal with the second case. There are 3 kinds of cells that may be influenced by a updating object, the cells which updating object locates in and the cells intersecting with the old or new trajectories of the updating object. When the updating object is in a sparse cell, we do not need to recompute the safe interval of this cell since we consider only the entering objects from the outside. When the old trajectory of a updating object crosses a dense cell, we needn’t to recaculate the safe interval since we only consider the objects in this cell while compute the safe interval; if it is a sparse cell, The object’s update may make the safe interval longer., but before the current safe intervals their states would remain unchanged. So we don’t change the safe interval ertheir When the new trajectory of a updating object crosses a dense cell , the safe interval of it doesn’t be changed for the same reason as above. But if it crosses a sparse cell ,we need to recompute the safe interval because if the object move into this cell before its safe interval, the state of it may be changed earlier. In order to reduce the computing cost, this formula can be used to determine the length of the trajectory, where v1 is the new speed of o1 and SImax is the maximum safe interval among all cells. We only update the safe intervals of the sparse cells that intersect with the segment Lu. The cells which don’t interscet with the segment will recaculate their safe intervals before the object move into it. Sparse Old direction Dense New direction New direction Sparse D2 O1 D3 D4 Lu=v*SImax

15 Query processing Bottom up Leaf node Non-leaf node 0: Sparse 1: Dense
2: Else 2 r2 r3 r4 r5 2 1 1 …… 1 1 1 1 1 1 …… Having computed the states and safe intervals for all leaf cells, we are ready to find dense regions. We search the Quad-tree in a bottom-up manner. For an intermediate node, if all its child nodes are dense, this node is also dense. The bottom-up search of a dense region stops until an ancestor is not dense. Then its child nodes that are dense are returned as answers. The safe interval of the dense region is set as the smallest interval of the leaf cells contained in the dense region. When the safe interval expires, this means the safe interval of a leaf cell expires. The state and safe interval of that leaf cell will be updated, based on which the dense region is also reevaluated. c1 c2 c3 c4 c5 c6 c7 c8 c4 c3 c8 c7 c1 c2 c5 c6

16 Outline Introduction Continuous Density Queries Experiments
Quad-tree Safe interval Update Query Experiments Conclusions

17 Experiments Experiments Parameters Snapshot Quad-tree based algorithm
The experiments evaluate the efficiency of our proposed Quad-tree based algorithm. The Snapshot algorithm, with repeated execution, is included for comparison. We assume a 100*100 space for the moving objects to move around, following a random movement model. The experiments study the impact of a variety of system factors, including the density threshold ½, the minimum region area s, and the number of moving objects #mo. 100 continuous density queries with random durations are tested.

18 CPU time of the two approaches when the dense threshold changes.
Experiments Results CPU time of the two approaches when the dense threshold changes.

19 Experiments Results (a) (b)
CPU time against (a) minimum region bounding; (b) number of moving objects.

20 Experiments Results Then we evaluate the efficiency of the two approaches when the query interval changes. The performance gap of the two algorithms decreases when the query interval becomes larger.

21 Outline Introduction Continuous Density Queries Experiments
Quad-tree Safe interval Update Query Experiments Conclusions

22 Conclusions Using safe interval to support continuous density queries;
Construct Quad-tree to improve the efficiency of query processing; Comparing with previous work, the cost of our approach is lower.

23 Thank you Q&A

24 Related work Snapshot Continuously
Effective density queries on continuously moving objects. [ICDE2006] C.S.Jensen et al. t0 t0+H t1 t2 t3 t4


Download ppt "Continuous Density Queries for Moving Objects"

Similar presentations


Ads by Google