380 likes | 543 Views
Continuous Reverse Nearest Neighbor Monitoring. Tian Xia, Donghui Zhang College of Computer and Information Science Northeastern University. Outline. Background and Definitions Related Work The Monitoring Region Query Processing Experimental Results Conclusions. Static NN and RNN Query.
E N D
Continuous Reverse Nearest Neighbor Monitoring Tian Xia, Donghui Zhang College of Computer and Information Science Northeastern University ICDE 2006, Atlanta, GA
Outline • Background and Definitions • Related Work • The Monitoring Region • Query Processing • Experimental Results • Conclusions ICDE 2006, Atlanta, GA
Static NN and RNN Query • Nearest Neighbor (NN) Query: Given a set of objects O and a query point q, determine the object closest to Q. q o1 ICDE 2006, Atlanta, GA
Static NN and RNN Query • Reverse Nearest Neighbor (RNN) Query: Given a set of objects O and a query point q, determine the objects which have Q as their nearest neighbor. o2 o4 q o1 o3 ICDE 2006, Atlanta, GA
Continuous Queries • In moving-object databases, the query results are constantly changing over time. • Continuous queries is to monitor the correct query results over time. • Motivating examples are the numerous location-based applications: traffic monitoring, enhance 911 service, mixed-reality games, and etc. ICDE 2006, Atlanta, GA
Our Problem • Continuous Reverse Nearest Neighbor (CRNN) Query: Given a set of objects O and a set of query points Q, all being static or moving, monitor the exact reverse nearest neighbors of each query point over time. ICDE 2006, Atlanta, GA
Time stamp 2 o2 o4 q o1 o3 CRNN Query: Example Time stamp 1 o2 o4 q o1 o3 Results: o3 and o4. Results: o1, o3 and o4. ICDE 2006, Atlanta, GA
Problem Setup • Objects and query points are moving unpredictably. Objects send their location updates to the server. • Objects and query points are indexed using a regular grid to ensure short location-update time. ICDE 2006, Atlanta, GA
Outline • Background and Definitions • Related Work • The Monitoring Region • Query Processing • Experimental Results • Conclusions ICDE 2006, Atlanta, GA
q Solutions to static RNN Query • Pre-computation based solutions (Korn and Muthukrishnan, 2000; Yang and Lin, 2001). o4 o3 ICDE 2006, Atlanta, GA
q Solutions to static RNN Query • SAE approach (Stanoi, et al., 2000) 60o 60o ICDE 2006, Atlanta, GA
Solutions to static RNN Query • TPL approach (Tao, et al., 2004) o4 q o1 o3 ICDE 2006, Atlanta, GA
Straightforward solution for CRNN • To answer continuous RNN query, repeatedly re-compute from scratch the reverse nearest neighbors of every query point, upon every update. • Lots of computations are wasted! ICDE 2006, Atlanta, GA
Incremental Result Update • Continuous range query (q1 and q2) and continuous NN query (q3). q1 q3 q2 • Shadowed area is called the monitoring region. • Updates outside the monitoring region will not affect the results. ICDE 2006, Atlanta, GA
Why CRNN query is difficult? • Compared to static RNN query, incremental update and computation of query results are required. • Compared to other continuous queries, CRNN query has no simple monitoring regions, due to the complex nature of the RNN query. ICDE 2006, Atlanta, GA
Outline • Background and Definitions • Related Work • The Monitoring Region • Query Processing • Experimental Results • Conclusions ICDE 2006, Atlanta, GA
Three properties of a simple monitoring region • Has a simple and regular shape. • Contains only the result objects. • Only rely on the distance between query and object. Continuous range query o2 q o1 Continuous NN query ICDE 2006, Atlanta, GA
o2 The Monitoring Regions of the CRNN Query • The monitoring region of a CRNN query point does not satisfy any of the three properties. o4 q o1 o3 ICDE 2006, Atlanta, GA
S5 S4 S0 S1 S3 S2 The Monitoring Regions of the CRNN Query • The monitoring region of a CRNN query point consists of two parts: pie-regions (shadowed) and circ-regions (red circles). ICDE 2006, Atlanta, GA
The Monitoring Regions of the CRNN Query • Pie-regions monitors all possible candidates (at most six). • Updates in the pie-regions may change the candidate set. • Circ-regions decides whether a candidate is a false positive or not. • Updates in the circ-regions may invalidate positive candidates, or vice verse. • The two kinds of regions are stored and manipulated completely differently! ICDE 2006, Atlanta, GA
Outline • Background and Definitions • Related Work • The Monitoring Region • Query Processing • Initialization • Incremental Monitoring • Experimental Results • Conclusions ICDE 2006, Atlanta, GA
Initializing CRNN Query • Combining SAE and Conceptual Partitioning (Mouratidis, et al. 2005). Features: • Performing six constrained NN searches simultaneously and optimally. • Partially integrating the refinement step with the filter step, due to the relaxation of the circ-regions. ICDE 2006, Atlanta, GA
Initializing CRNN Query S5 • Early invalidation of candidate (e.g. o2) is done as much as possible in the filter step, saving NN search in the refinement step. c3,6 S0 S4 q c3,5 o1 o3 o4 o2 S1 S3 S2 c0,0 ICDE 2006, Atlanta, GA
Storing the Pie-regions • The pie-regions are stored using the book-keeping technique, i.e. by associating cells and query points together. • Each query point stores up-to six candidates and the distances to them. ICDE 2006, Atlanta, GA
Updating the Pie-regions Three cases: • Some object enters a pie-region which does not contain it. • A candidate leaves its pie-region. • A candidate moves within its pie-region. • Pie-regions are expanded (shrunk) by associating (un-associating) the new (old) cells. • In all three cases, the corresponding circ-regions need to be updated. ICDE 2006, Atlanta, GA
Why treat the circ-regions differently? • A circ-region may change frequently, even if the corresponding pie-region is unchanged. • Circ-regions is not always changed incrementally. • Computation of NN queries for candidates is expensive and not always necessary. • Circ-regions do not need to be kept tight all the time! ICDE 2006, Atlanta, GA
Storing the Circ-regions • The candidates of all query points are indexed by an in-memory Frequently Update R-tree (FUR-tree. Lee, et al., 2003). • Circles are virtually stored in the FUR-tree, i.e. the FUR-tree is augmented by the radiuses of circ-regions. • Objects invalidating the candidates are stored in a separate hash table (called “NN-Hash”), with pointers to the corresponding candidates. o8 FUR-tree Internal Hash table pointing to each leaf object o6 o2 o1 ~ o6 o5 o1 o4 NN-Hash o3 o2 o7 o1 o8 o7 ICDE 2006, Atlanta, GA
o6 Updating the Circ-regions: the Lazy-Update Optimization • Candidates are updated efficiently! • Most of the NN search are avoided! o7 o8 o6 o8 o8 o7 o6 ICDE 2006, Atlanta, GA
Partial-Insert Optimization • Only large circ-regions are stored in the FUR-tree. • Rationale: small circ-regions are unlikely to cause any result update, thus are stored separately in a hash table. Benefits: • FUR-tree size is reduced, leading to more efficient query processing. • There are less number of circ-region updates. • Insertion of a small circ-region is very simple. ICDE 2006, Atlanta, GA
Outline • Background and Definitions • Related Work • The Monitoring Region • Query Processing • Experimental Results • Conclusions ICDE 2006, Atlanta, GA
Experimental Settings • Dataset: Network based Generator of Moving Objects (Brinkhoff, 2002). • # of objects (K): 10, 20, 40, 60, 80, 100 • # of query points (K): 1, 2, 4, 6, 8, 10 • Object mobility (%): 1, 5, 10, 15, 20 • Query point mobility (%): 1, 5, 10, 15, 20 ICDE 2006, Atlanta, GA
Comparison with TPL • TPL-FUR: straightforwardly apply static TPL method on FUR-tree. • Incremental: our complete incremental approach. ICDE 2006, Atlanta, GA
Effects of Optimizations (1) • Uniform: store and manipulating pie- and circ-regions uniformly. • LU-only: apply Lazy-Update optimization only. • LU+PI: apply both Lazy-Update and Partial-Insert optimizations. ICDE 2006, Atlanta, GA
Effects of Optimizations (2) • Uniform: store and manipulating pie- and circ-regions uniformly. • LU-only: apply Lazy-Update optimization only. • LU+PI: apply both Lazy-Update and Partial-Insert optimizations. ICDE 2006, Atlanta, GA
Outline • Background and Definitions • Related Work • The Monitoring Region • Query Processing • Experimental Results • Conclusions ICDE 2006, Atlanta, GA
Conclusions • We addressed an interesting problem of monitoring continuous reverse nearest neighbors (CRNN) in a dynamic environment. • We defined an effective monitoring region of a CRNN query point. • We presented an incremental and scalable approach, and two important optimizations. • Our experiments showed our method is much more efficient than straightforward ones. ICDE 2006, Atlanta, GA
THANK YOU! QUESTIONS? ICDE 2006, Atlanta, GA