






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







In this paper we propose an approach that enables mobile clients to determine the validity of previous queries based on their current locations. In order to make this possible, the server returns in addition to the query result, a validity region around the client's location within which the result remains the same. We focus on two of the most common spatial query types, namely nearest neighbor and window queries, define the validity region in each case and propose the corresponding query processing algorithms. In addition, we provide analytical models for estimating the expected size of the validity region. Our techniques can significantly reduce the number of queries issued to the server, while introducing minimal computational and network overhead compared to traditional spatial queries.
Spatial databases have been extensively studied during the last two decades and several spatial access methods (SAMs) have been proposed [GG98]. Among the most popular ones is the R- tree and its variations, notably the R*-tree [BKSS90]. R-trees can be viewed as multi-dimensional extensions of B-trees. Figure 1 shows an exemplary R-tree for a set of points { a , b , c ,…} assuming a capacity of three entries per node. Points that are close in space (e.g., a, b, c ) are clustered in the same leaf node ( E 4 ) represented as a minimum bounding rectangle (MBR). Nodes are then recursively grouped together following the same principle until the top level, which consists of a single root.
a b c d e f^ h^ g
E 1 E 2 E 3
E 4 E 5 E 6 E 7 E 8
Root
E 9
i
E 1 E 2
E 4 E 5 E 8
E
0 2 4 6 8 10
2
4
6
8
10
x axis
y axis
b
E (^) f
omitted
1 e E 2 d
c
a
g
E 3
E 5 E 6 E 4
E (^7)
8
contents windowquery i E^9 q
Fig. 1 : An R-tree example
R-trees (like most SAMs) were motivated by the need to efficiently process window queries , which retrieve all the objects that intersect a window (shaded area in Figure 1). The R-tree answers a window query q as follows. The root is first retrieved and the entries inside it are compared with q. The ones (e.g., E 1 ,
E 2 ) that intersect q may contain qualifying points and are recursively searched until the leaf (data point) level. Entries not intersecting the query window (e.g., E 3 ) are not visited. Another important type of spatial information processing is the nearest neighbor query, which retrieves the data point that is closest to a query point. Roussopoulos et al., [RKV95] propose a branch-and-bound algorithm that searches the R-tree in a depth- first manner. Specifically, starting from the root, all entries are sorted according to their minimum distance ( mindist ) from the query point, and the entry with the smallest value is visited first. The process is repeated recursively until the leaf level where the first potential nearest neighbor is found. During backtracking to the upper levels, the algorithm only visits entries whose mindist is smaller than the distance of the nearest neighbor already found. In the example of Figure 2, the algorithm first visits the root entry E (^1) (since it has the minimum mindist ), and then E 4 , where the first candidate object ( a ) is retrieved. When backtracking to the previous level, entries E 5 and E 6 are excluded, since their mindist is greater than (or equal to) the distance of a. Then E 2 and E 8 are accessed, where the actual nearest neighbor (point h ) is found. Samet and Hjaltason [HS99] develop an improved algorithm, which only visits nodes that may contain the actual nearest neighbor (i.e., in the previous example the algorithm would find point h , without first retrieving a ). Both algorithms can be easily applied for the retrieval of k > 1 nearest neighbors.
E
0 2 4 6 8 10
2
4
6
8
10
x axis
y axis
b
E (^1) e f E 2
d
c
a
g
E 3
E 5 E 6 E 4
E (^7)
8 i E 9
query point
mindist( E 2 )
h = mindist( E 8 ) mindist( (^) E 4 )= mindist( a)
mindist( E 1 )
Fig. 2: Nearest neighbor example
The traditional scenario in spatial databases assumes that (i) queries are static and (ii) each query returns a single output and terminates. Consider now an alternative situation where a user with a location-aware mobile device poses a continuous query with respect to his/her current position (e.g., he wants to know the closest restaurant as he moves along). The query is sent to the server, where it is processed and the result is returned to the client via the underlying wireless networks. Due to the mobility of the user, the result may be invalidated immediately as the user's position changes. The conventional approach to attain up-to-date information is to pose a new query to the server after a position update, which could lead to high network overhead and extra processing effort.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. ACM SIGMOD'2003, June 9-12, San Diego, California, USA. Copyright 2003 ACM 1-58113-634-X/03/06...$5.00.
Assume in Figure 3 that the user (at position q ) issues a nearest neighbor query returning point o. The motivation of this work is that while the user remains in a certain area around the initial position, called the validity region (shaded area), the result remains the same. In addition to the query result, the server has to return the validity region of the query, according to which the mobile client is able to determine whether a new query should be issued by verifying whether it is still inside the validity region. Given that the mobile clients have limited storage and processing capabilities compared to the server, it pays off to perform additional processing on the server side (for the initial query) in order to reduce the number of subsequent queries. Furthermore, the representation of the validity region should be compact in order to reduce the network cost, the storage requirements and the computation that must be performed at the client side.
validity q region o
Fig. 3 : Validity region
In this paper, we study the problem of determining the validity regions for moving nearest neighbor and window queries on static point datasets, and propose appropriate representations for the corresponding validity regions and query processing techniques. The rest of the paper is organized as follows: Section 2 surveys the related work, while Section 3 defines the validity regions and describes algorithms for nearest neighbors queries. Section 4 discusses window queries, and Section 5 provides an analysis of both query types and formulae for the expected size of the validity regions. Section 6 experimentally evaluates the proposed techniques and Section 7 concludes the paper with a discussion for future work.
2. RELATED WORK
The first spatial query processing techniques for mobile computing were proposed in [ZL01] and [SR01], both dealing with moving nearest neighbor queries on static data. Zheng and Lee [ZL01] pre-compute and store in an R-tree the Voronoi diagram of the dataset. When a nearest neighbor query arrives at the server, the Voronoi diagram is used to efficiently compute the nearest neighbor (e.g., point o in Figure 4).
Fig. 4 : Example of the [ZL01] technique
In addition to the result, the server sends back to the client the validity time T of the result, which is a conservative approximation assuming that the query's speed is below a maximum value. In particular, T is the time that the query point
will cross the closest boundary of the Voronoi cell of object o (in which case point a will become the nearest neighbor). A proper value of the maximum query speed, however, is difficult to estimate. A high value will lead to a very short T (reducing the significance of the result), while a low value may cause false misses. Furthermore, the method only deals with single nearest neighbors, as the retrieval of k neighbors would require order- k Voronoi diagrams (for all possible values of k ), which are complicated and incur large space overhead. The technique of Song and Roussopoulos [SR01] does not assume Voronoi diagrams and can be used for any number of neighbors. When a k nearest neighbor query q arrives, the server computes and returns to the client a number m > k of neighbors (using existing algorithms such as [RKV95, HS99]). Let dist ( k ) and dist ( m ) be the distances of the k th^ and m th^ nearest neighbor from the query point q. If the client re-issues the query at a new location q' , it can be easily proven that the new k nearest neighbors will be among the m objects of the first query, provided that 2⋅ dist ( q,q' ) ≤ dist ( m )- dist ( k ). Figure 5 shows an example for a 2-nearest neighbor query at location q , where the server returns four results o , a , b and c (the nearest neighbors are o and a ). When the client moves to a nearby location q' , the two nearest neighbors are o and b. If 2⋅ dist ( q,q' ) ≤ dist ( 4 )- dist ( 2 ), the client can determine this by computing the new distances (with respect to q' ) of the four objects, without having to issue a new query to the server. An obvious problem of this approach (not discussed in [SR01]) lies in obtaining a proper value of m. A high value will increase the network overhead and the storage requirements at the client, while a low value may be useless (if it does not reduce the number of queries). In general, m depends on factors, such as data distribution and query frequency, which are difficult to estimate.
Fig. 5 : Example of the [SR01] technique
Given a query moving with steady velocity, [BJKS02, TPS02] return all nearest neighbor results (up to a future timestamp), i.e., the output is a set of tuples < R (^) i , T (^) i > , where R (^) i is the set of nearest neighbors during future interval T (^) i. For this situation (i.e., steady client velocity), the concept of time-parameterized (TP) queries [TP02] can be applied for both window and nearest neighbor queries. In particular when the server receives a request from a client, it executes a TP query and returns < R,T,C >, where R is the set of objects satisfying the corresponding spatial query (i.e., current result), T is the validity time of R , and C is the result change at T. From the set of objects in R , and the set of objects C that will cause changes, the client can incrementally compute the next result. Consider, for instance, that a client moving east with speed 1 issues a window query (shaded window of Figure 6a). The server returns <{ b },1,{- b }> meaning that object b currently intersects the query window, but after 1 time unit it will stop doing so (therefore, b should be removed from the result, which will become empty).
Since we do not have the Voronoi diagram for the dataset, we must compute VC(o) on the fly. To illustrate this process, consider the query in Figure 7 , which moves towards direction l. When the query reaches position q' , its nearest neighbor changes from o to a. Object a, as well as, the distance between q and q ′ can be obtained by issuing a time parameterized nearest neighbor (TPNN) query with direction l and an arbitrary speed. The TPNN query returns < R , T , C >, where R ={ o }, T corresponds to the time needed to reach q ′, and C ={- o , + a }. The distance between q and q' is computed by multiplying the query speed and T.
The problem is how to select the directions l , in order to obtain the influence points with the minimum number of TPNN queries. The outline of our solution is as follows: (i) the initial validity region is assumed to be the data universe; (ii) a TPNN query with a specific direction l (to be discussed shortly) is executed to find an influence object; (iii) the new validity region becomes the intersection of the previous region and the half-plane introduced by the new influence object; (iv) the algorithm terminates when no new influence objects can be found.
Consider a location-based nearest neighbor query q (whose nearest object is o ), as shown in Figure 8a. The initial validity region is the data universe defined by vertices v 1 to v 4. One of the vertices (e.g., v 1 ) is selected at random, and a TPNN query is issued starting from q and pointing towards the chosen vertex. Assume that a new influence object a is found by the query, and let l (^) a be its perpendicular bisector with object o. The validity region is then updated to the intersection of the half-plane introduced by l (^) a and the data universe. The new (triangular) validity region is defined by vertices v 4 , v 5 and v 6 in Figure 8b.
(a) Before query processing (b) The first TPNN query
(c) Subsequent TPNN queries (d) Confirmed vertices Fig. 8: Computation of validity region for nearest neighbor
Next, we choose any one of the three vertices (e.g., v 5 ) and pose a new TPNN query that retrieves influence object b and updates the validity region accordingly. Similarly, we perform the same procedure on v 6 , retrieving object c. Figure 8c shows the validity region after v 5 and v 6 are processed. Subsequent TPNN queries for vertices v 4 , v 7 , v 8 , v 9 and v 10 (see Figure 8d) either re-discover existing influence objects (e.g., point a for v 7 ), or fail to discover any point (e.g., v 4 ). The vertices that do not lead to the discovery of new influence objects are confirmed and not considered again. The algorithm terminates when all vertices are confirmed.
Lemma 3.1: The above method: (i) discovers all the influence objects and (ii) does not include any false hits (i.e., the final result does not contain any non-influencing objects) ■ To prove the first part, consider that there is at least an influence object which is not found by the algorithm. Figure 9 shows such an example, where v 1 , v 2 , v 3 , v 4 , v 5 and v 6 are the confirmed
algorithm. Since a is an influence object, the perpendicular bisector of a and o cuts the current validity region, meaning that at least one of the existing vertices v (e.g., v 1 ) will be removed by the TPNN query pointing towards v (which will discover a ). This contradicts the fact that v is confirmed because the confirmation implies that the TPNN query towards v did not discover any new point. Since each TPNN query by definition, either returns an influence object or fails to discover any new object, the proof of the second part of the lemma is trivial.
3.2 Query Processing The server processes a location-based nearest neighbor query in three steps: (i) it performs a nearest neighbor query to obtain the result (i.e., nearest neighbor of the query point); (ii) it iteratively performs TPNN queries to find the influence objects (iii) it returns the query result and the influence set to the client. Step (i) applies one of the existing nearest neighbor algorithms [RKV95, HS99]. Step (ii) uses the method discussed in Section 3.1 to obtain all the influence objects. A vertex set V records all the vertices of the current validity region and each vertex is associated with a flag indicating whether it is confirmed. Initially, V contains the four vertices of the data universe. The algorithm then arbitrarily chooses a vertex v from V and performs the corresponding TPNN query. If the query confirms v , its flag is set; otherwise, if the TPNN query returns a new influence object o , o added to S (^) inf. The new validity region is computed and V is updated accordingly. The same process is repeated until all the vertices of V are confirmed. Figure 10 shows the pseudo-code for finding the influence set.
Algorithm Retrieve_Influence_Set_1NN ( q, o ) /* q is the query point, o is the nearest neighbor of q */
Lemma 3.2: The algorithm performs n (^) inf + n (^) v TPNN queries, where n (^) inf is the number of influence objects and n (^) v is the number of vertices in the final validity region. ■
When the algorithm terminates, there are n (^) inf influence objects and n (^) v vertices in the validity region. The number of queries required for finding these influence objects is n (^) inf. Furthermore, n (^) v TPNN queries (that do not discover new influence objects) must be performed to confirm n (^) v vertices. Since each TPNN query can either find a new influence object or confirm a non-confirmed vertex, the total number of queries is n (^) inf + n (^) v. Notice that if each edge of the validity region is formed by an influence object, n (^) inf = n (^) v ; otherwise, n (^) inf < n (^) v , because some edges of the validity region are contributed by the universe boundary (e.g., in Figure 8, n (^) inf = 3 and n (^) v = 5).
Finally, the server returns the query result to the client along with the influence objects. The validity checking at the client side is performed by examining whether the new user location is inside the half-plane formed with respect to each influence point, which is equivalent to checking whether the query focus lies in the Voronoi cell of the result.
3.3 Extensions to k Nearest Neighbor Queries
The proposed methods can be easily applied to k nearest neighbor ( k NN) queries, where the validity region is the maximal area around the query, where each point has the same set of k nearest neighbors (we assume that the order of these k neighbors is not important). Figure 11 shows a 2-nearest neighbor query q whose result is o 1 and o 2. Let a be an arbitrary data point. Consider the intersection of two half-planes, one obtained by l (^) a1 (the bisector of a and o 1 ), the other by l (^) a2 (the bisector of a and o 2 ) as shown in Figure 11. If the query point q moves inside the intersection region, the distances from q to o 1 and o 2 are always smaller than the distance to a. The intersection of the half-planes, generated by the 2-nearest neighbors of q ( o 1 and o 2 ) and all the other objects in the dataset, forms the validity region of the 2-nearest neighbor query.
Observation : The validity region V ( q ) of a k NN query q is the intersection of the half-planes formed by the perpendicular bisectors of all the k nearest neighbors of the query point and all the other objects, or equivalently, V ( q ) is the order- k Voronoi cell kVC(q) [BKOS97] of the query q.
Fig. 11: 2-nearest neighbor query example
The algorithm for computing the influence objects and the validity region, shown in Figure 12, is similar to the one for 1NN queries in Figure 10. The differences are explained as follows: the TPNN query in line 5 of Figure 10 is replaced with a TP k NN query. Besides o (^) inf , the TP k NN query returns one of the k nearest neighbors (denoted as o (^) r ) such that o (^) inf and o (^) r define the bisector that is nearest to query q in the given direction (i.e., from query q towards vertex v ). Consequently, the check on whether o (^) inf is already in S (^) inf (line 6 of Figure 10) is changed to determining
whether the pair < o (^) inf , o (^) r > has been discovered before. An influence pair set S (^) inf_p is used to store the pairs already found.
Algorithm Retrieve_Influence_Set_ k NN ( q, S (^) o ) /* q is the query point, S (^) o is the set of nearest neighbors of q */
As an example, consider the 2NN query q (whose 2 nearest neighbors are o 1 and o 2 ) in Figure 13a. Assume that the algorithm first picks v 1 to perform the TP2NN query, which returns influence object a together with o 2 (meaning that when the query crosses the bisector of a and o 2 , object a will replace o 2 in the result). The pair < a , o 2 > is added to the influence pair set S (^) inf_p and the validity region shrinks as depicted in Figure 13b. The next TP2NN query (towards v 3 ) discovers pair < c , o 1 >. No pair is found by the query pointing to v 4 , and v 4 is confirmed. The subsequent queries towards v 6 and v 7 return pairs < b , o 2 > and < a , o 1 > as shown in Figure 13c. Finally, all the vertices are confirmed and the final validity region is obtained as illustrated in Figure 13d.
(a) Before query processing (b) The first TPNN query
(c) Subsequent TPNN queries (d) Confirmed vertices Fig. 13: Computation of validity region for k nearest neighbor
In addition to the influence objects, the algorithm must now send to the client the associated neighbor(s) for each influence object, so that the client can determine if its location is in the appropriate half-planes. It’s trivial to adopt Lemma 3.1 to prove the correctness of the algorithm. Similar to Lemma 3.2, Lemma 3. gives the number of TP k NN queries performed. Notice that the
to o 6. The initial validity region is the inner validity region defined by the vertices v 1 to v 4. One of the vertices (e.g., v 1 ) is selected, and a TP window query (TPWQ) is issued starting from the query focus f , pointing towards the chosen vertex as depicted in Figure 16b. Object o 1 is returned since its Minkowski region ( ro1 ) is closest to f in the direction from f to v 1. Clearly, o 1 is an influence object because the intersection of ro1 and the inner validity region cannot be totally covered by other Minkowski rectangles. After o 1 is added to S (^) inf (q) :
(i) The current validity region is updated by subtracting ro1. In the example of Figure 16b, the new validity region is defined by vertices v 2 to v 7.
(ii) Some objects in Cinf (q) are eliminated because the intersections of their Minkowski regions and the inner validity region are totally covered by the intersection of ro1 and the inner validity region (these objects cannot contribute to the final validity region). In the example of Figure 16b, the objects in the upper-left quadrant of o 1 (i.e., o 2 ), as well as o 1 itself, are removed from Cinf (q).
S (^) inf = { o 1 } (a) Before query processing (b) TPWQ for v 1
S (^) inf = { o 1 , o 3 } S (^) inf = { o 1 , o 3 , o 4 } (c) TPWQ query for v 5 (d) TPWQ for v 8
S (^) inf = { o 1 , o 3 , o 4 , o 5 } (e) TPWQ for v 7 Fig. 16: Computation of validity region for window query
Next, we perform the same procedure on another vertex over the updated Cinf (q). Assume v 5 is selected as illustrated in Figure 16c. The corresponding TP query retrieves o 3 as another influence object. The current validity region is then updated by eliminating vertex v 4 and v 5 , and adding v 8 and v 9. We remove o 3 from Cinf (q) to avoid considering it again. The subsequent TP window query for vertex v 8 discovers influence object o 4 and shrinks the validity region accordingly, as depicted in Figure 16d. Cinf (q) is updated
by removing object o 4. The next TP query towards vertex v 11 does not retrieve any object and v 11 is confirmed as a vertex of the final validity region (the same happens for v 2 ). Influence object o 5 is found by the TP query for v 7 as illustrated in Figure 16e. Adding o 5 into the influence set does not update the validity region since o 5 is a candidate inner influence object. Thus, v 7 is immediately confirmed_._ Finally, the algorithm confirms the remaining vertices v 10 , v 9 , v 6 and terminates with S (^) inf = { o 1 , o 3 , o 4 , o 5 }. Lemma 4.5: The above method: (i) discovers all the influence objects and (ii) does not include any false hits. ■ The proof of Lemma 4.5 is a similar to that of Lemma 3.1 and omitted. Lemma 4.6: The algorithm performs at most 4+3⋅ n (^) inf TP window queries, where n (^) inf is the number of influence objects. ■ Initially the inner validity region contains 4 vertices. After each influence object is found, we add at most 3 vertices. Thus, the total number of vertices is no more than 4+3⋅ n (^) inf. On the other hand, for any vertex, we perform at most one TPWQ towards it. Therefore, the number of TP window queries is no larger than 4+3⋅ n (^) inf. 4.2 Query Processing Once the server receives a window query from a client it performs the following steps: (i) retrieves the query result (i.e., all the inner objects); (ii) computes the candidate inner influence objects; (iii) finds the set of candidate outer influence objects; (iv) among the objects in Cinf , selects the ones that belong to S (^) inf , and (v) returns the result and the influence set to the client. Step (i) is based on traditional window query algorithms (and is, therefore, trivial). Then, the inner candidate objects - step (ii) - are the ones with the minimum/maximum coordinates (Lemma 4.2). In order to find the outer candidate set (step iii) we have to retrieve all objects whose Minkowski regions intersect the inner validity region (Lemma 4.4). This is achieved by applying a new "window" query on the point dataset, where (1) the centroid is the same as that of the inner validity region; (2) the extent on each dimension is the sum of extents of the inner validity region and the initial query; (3) the region of the original window query is subtracted (in order to avoid retrieving the inner objects). Figure 17 illustrates the new query window, continuing the example in Figure 14. It is easy to verify that the Minkowski regions of the points retrieved ( e , d ) intersect the inner validity region.
Fig. 17: Obtaining the candidate outer influence points
The elimination of candidate influence objects (step iv) is performed using the algorithm of Figure 18. Main memory TP window queries are repeatedly issued towards the non-confirmed vertices. A vertex is confirmed when the TP query towards it: (i) does not find any influence object; or (ii) discovers an inner influence object.
Algorithm Influence_Checking ( Cinf (q) )
Fig. 18: Algorithm for checking the influence objects
Finally the server returns to the client the result of the query, together with S (^) inf. The client can then determine whether the query result is still valid by examining if the focus f' of a future query is inside the validity region. This checking does not require the actual shape of the validity region, i.e., the previous result is still valid if f ' is inside the Minkowski rectangles of all influence inner objects and outside the Minkowski rectangles of all outer influence objects. Since, as shown in the experimental evaluation, the number of influence objects for the vast majority of window queries is 4, the computational cost at the client side is minimal. A last remark concerns the situation that the query result is empty (i.e., there is no inner object), in which case the inner validity region corresponds to the whole data space. The problem now is that there is no "bound" on the how far from the query focus we should search for outer influencing objects. In Figure 19, for instance, depending on the movement of the user, all data objects ( o 1 to o 11 ) may potentially influence the query, i.e., the validity region is the whole data space except the Minkowski rectangles ( ro1 to ro11 ). Clearly, returning all those points to the client is too expensive and such cases are handled separately. In particular, we perform a nearest neighbor query and find the Minkowski region r that is closest to f. Then, the validity region is approximated by a circle centered at f with radius mindist ( r ). This process is illustrated in Figure 19 where the shaded region is the conservative approximation of the validity region.
Fig. 19: Conservative validity region
5. ANALYSIS OF L OCATION-BASED Q UERIES
The expected size of the validity region is very important for several reasons. First, if the expected size is very small it may not be worth the extra computation performed at the server, or the additional network cost for transferring the validity region.
Furthermore, the size of the validity region determines the cost (in terms of the number of disk accesses) at the server; hence, it is needed for query optimization. In this section, we discuss the expected size of the validity region and the query cost of both query types on uniform and non-uniform data. We assume the cardinality of the dataset is N. We start our discussion with location-based NN queries. The validity region for a NN query is a Voronoi cell (or an order- k
Voronoi cell for uniform data [OBSC00]:
E (^) ( AVR (^) ) = (^1) [ (2 k − 1) N ] (5-1)
The derivation of the cost of location-based nearest neighbors is straightforward given the previous results for k NN and TP k NN queries [BBKK97, WSB98, B00, BBK+01, TP02]. Recall that, as shown in Lemma 3.2 (3.3), a single ( k ) NN involves one ordinary nearest neighbor query, followed by n (^) inf + n (^) v ( n (^) inf_p + n (^) v ) TP queries. Hence, the total number of node accesses is the sum of every individual (nearest neighbor or TP) query. We continue with window queries on data uniformly distributed in a square unit universe. Figure 20 illustrates an example query q with focus f over a dataset of points ( a , b , …, e , g ). Let dist (θ) be the distance that q must travel towards a direction with angle θ
V ( q ) (at which time the result of q is invalidated). If f ′ is the location where the focus crosses the boundary of V ( q ) (at angle θ), dist (θ) equals the distance between f and f ′. Figure 20 also demonstrates the corresponding query q ′ located at f ′, which covers point e , and changes the initial result { a , b , c } to { a , b , c,e }.
f
e a b
d
g
c
f '
boundary of V(q)
query at f '
original query q
θ
l θ
the sweeping region
distance traveled by query q
Fig. 20: The sweeping region of a window query q
The area A (^) VR of the validity region can be obtained by integrating
( ) ( )
(^2 2 )
0 0
1 VR 2 2 A^ ππ dist θ d θ π dist θ d θ π
= (^) ∫ ⋅ = (^) ∫ ⋅ (5-2)
Hence, the expected area E ( A (^) VR ) of the validity region can be represented as:
( ) ( )
(^2 )
0
1 VR 2 E A E dist d
π = (^) ∫ ^ θ ⋅θ (5-3)
To derive E [ dist (θ) 2 ] (along a fixed direction angle θ), we need the probability P { dist (θ)≤ξ} that the query focus travels no more than distance ξ before crossing the boundary of V ( q ). It is easier to compute the complement probability P { dist (θ)>ξ} (=1− P { dist (θ)≤ξ}) that the query focus must travel at least ξ (to cross the boundary). We define the sweeping region SR(ξ,θ) as the area swept by the edges of q during traveling distance ξ at direction θ (shaded area in Figure 20). A crucial observation is that dist (θ)>ξ if and only if there cannot be any point lying inside SR(ξ,θ) (otherwise the result of the
1E-
1E-
1E-
1E-
1E-
10K 30K 100K 300K 1000K N
area of V(q) (^) actual estimated
1E-
1E-
1E-
1E-
1E-
1 3 10 30 100 k
area of V(q) actual estimated
(a) Area of V(q) vs. N (b) Area of V(q) vs. k Fig. 22: Area of the V(q) of nearest neighbors (uniform data)
1E+
1E+
1E+
1E+
1 3 10 30 100 k
area of V(q) (m )^2 actual estimated
1E+
1E+
1E+
1E+
1 3 10 30 100 k
area of V(q) (m )^2 actual estimated
(a) GR dataset (b) NA dataset Fig. 23: Area of V(q) vs. k (real data)
Figure 24a (b) illustrates the number of edges in the validity region as a function of N ( k ) for uniform datasets with k =1 ( N =100k). Since validity checking at the client involves determining whether the current position of the client is still inside all the half- planes, the number of edges is a measure for the computation cost at the client side. This number is around 6 under all settings, which is consistent with previous findings [A91, OBSC00] that the average number of edges in a Voronoi cell (or an order- k Voronoi cell) is 6 for uniform datasets.
0
2
4
6
8
10K 30K 100K 300K 1000K N
num of edges
0
2
4
6
8
1 3 10 30 100 k
num of edges
(a) number of edges vs. N (b) number of edges vs. k Fig. 24: Number of edges of V(q) of nearest neighbors (uniform)
Figure 25 studies the number of influence objects | S (^) inf | for uniform datasets. As shown in Figure 25a, | S (^) inf | for single nearest neighbor queries is approximately 6 for all cardinalities, which is expected since the number of influence objects for a single nearest neighbor query equals the number of edges of the corresponding Voronoi cell. According to Figure 25b, | S (^) inf | decreases to 4 for k ≥ 10 ( N =100k). This is because for k > 1, an influence object may contribute more than one edge (since it can form a perpendicular bisector with any of the k nearest objects of the query), while the total number of edges remains around 6. The same results are confirmed by the real datasets in Figure 26.
Next we evaluate the cost of nearest neighbor search on the server side using uniform datasets. Figure 27a (b) shows the number of node (page) accesses as a function of cardinality for k =1 (using an LRU buffer equal to 10% of the R-tree size). The number of node
accesses for TPNN queries is about 12 times that of the regular nearest neighbor query because, on the average we need 6 TPNN queries to retrieve the influence objects and another 6 queries to confirm the vertices of the validity region. The buffer reduces the actual cost of the TP queries significantly, since all the queries access similar parts of the data space. Thus, given a relatively small buffer, the overhead imposed by location-based nearest neighbor queries is not significant.
0
2
4
6
8
10K 30K 100K 300K 1000K N
| Sinf |
0
2
4
6
8
1 3 10 30 100 k
| Sinf |
(a) | S (^) inf | vs. N (b) | S (^) inf | vs. k Fig. 25: | S (^) inf | of nearest neighbor queries (uniform data)
0
2
4
6
8
1 3 10 30 100 k
num of inf objs
0
2
4
6
8
1 3 10 30 100 k
num of inf objs
(a) GR dataset (b) NA dataset Fig. 26: | S (^) inf | vs. k (uniform data)
0
10
20
30
40
50
60
10K 30K 100K 300K 1000K N
NA (^) NN queryTPNN queries
0
1
2
10K 30K 100K 300K 1000K N
PA (^) NN queryTPNN queries
(a) NA vs. N (b) PA vs. N Fig. 27: Cost of location-based nearest neighbors (uniform data) In Figure 28 we evaluate the cost of query processing with different values of k using the real datasets (node and page accesses using 10% LRU buffer). Although the number of TPNN queries performed is almost constant (about 12 independently of k ) the number of node accesses increases with k , because the cost of each TPNN (and regular nearest neighbor) query increases. The buffer, however, absorbs most of the cost of TPNN queries.
0
20
40
60
80
100
1 3 10 30 100 k
NA NN query
TPNN queries
0
1
2
3
4
1 3 10 30 100 k
PA NN query
TPNN queries
(a) NA vs. k ( GR dataset) (b) PA vs. k ( GR dataset)
0
20
40
60
80
100
1 3 10 30 100 k
NA NN query
TPNN queries
0
1
2
3
4
5
1 3 10 30 100 k
PA NN query
TPNN queries
(c) NA vs. k ( NA dataset) (d) PA vs. k ( NA dataset) Fig. 28: Cost of location-based nearest neighbors (real data)
The remaining experiments refer to location-based window queries. Figure 29a fixes the size q (^) s of the query window to 0.1% of the data space area, and varies the dataset cardinality N for uniform data. Figure 29b shows the size of the validity region as a function of q (^) s for the 100K dataset. The size of the validity region decreases both with N and q (^) s. Large N implies high data density, meaning that the results change frequently as the query focus moves. Similarly, a large query is likely to contain numerous objects near the boundary of the window, which will lead to its invalidation. The estimated values are very accurate in all cases.
1E-
1E-
1E-
1E-
1E-
1E-
1E-
10K 30K 100K 300K 1000K N
area of V(q) actual^ estimated
1E-
1E-
1E-
1E-
1E-
1E-
0.01% 0.1% 1% 10%
area of V(q) actual^ estimated
qs (a) Area of V(q) vs. N (b) Area of V(q) vs. q (^) s Fig. 29: Area of V(q) for window queries (uniform data)
Figure 30 shows the size of the validity region for the two real datasets as a function of q (^) s , which ranges in 100km^2 ~10000km^2. The trends are similar to Figure 29b, and the estimation is again accurate despite the large skewness of the datasets. Notice that the sizes of the validity regions are rather large (9,100m^2 ~1.7× 10 6 m^2 for GR and 17,000m^2 ~2.1× 10 6 m^2 for NA ), indicating the applicability of the proposed techniques in realistic settings.
1E+
1E+
1E+
1E+
1E+
100 300 1000 3000 10000
area of V(q) actual^ estimated
(km )^2
(m )^2
qs
1E+
1E+
1E+
1E+
100 300 1000 3000 10000
area of V(q) (m ) 2 actual estimated
qs (km ) 2 (a) GR dataset (b) NA dataset Fig. 30: Area of V(q) vs. q (^) s for window queries (real data)
Next, we evaluate the number of influence objects | S (^) inf | for window queries. Figure 31a shows | S (^) inf | as a function of dataset cardinality with q (^) s = 0.1% of the data universe. Figure 31b illustrates | S (^) inf | as a function of q (^) s for a uniform dataset of 100k points. Figure 32 shows | S (^) inf | for datasets GR and NA by varying q (^) s from 100km^2 to 10000km^2. Under all settings, there exist on the average two outer and two inner influence objects, implying that the extra network cost for transmitting the validity region
(influence objects) is negligible and that the validity checking at the client side incurs little computational overhead.
0
1
2
3
4
5
6
10K 30K 100K 300K 1000K N
inner inf objs
| Sinf | outer inf objs
0
1
2
3
4
5
6
0.01% 0.1% 1% 10%
inner inf objs
| Sinf | outer inf objs
qs (a) | S (^) inf | vs. N (b) | S (^) inf | vs. q (^) s Fig. 31: | S (^) inf | for window queries (uniform data)
0
1
2
3
4
5
6
100 300 1000 3000 10000
inner inf objs
outer inf objs
qs (km ) 2
| Sinf |
0
1
2
3
4
5
6
100 300 1000 3000 10000
inner inf objs
outer inf objs
qs (km ) 2
| Sinf |
(a) GR dataset (b) NA dataset Fig. 32: | S (^) inf | vs. q (^) s for window queries (real data) In order to explain this, consider the example of Figure 33, where an outer object (e.g., a ) lies in one of the shaded regions of the extended query window (used to retrieve the candidate outer objects as shown in Figure 17). The Minkowski region of the object eliminates an entire edge of the inner validity region, i.e., the outer object replaces an inner candidate for the influence set, meaning that the total number of influencing objects remains 4. Only objects at the corners of the extended query window can result in non-rectangular validity regions. In general such points are few and for most queries they do not exist.
Fig. 33: An example of a window query Finally, we study the I/O cost (which is the dominant factor) of location-based window queries at the server side. Figure 34a shows the number of node accesses (NA) as a function of N for uniform datasets. The processing involves two window queries, one for retrieving the result and one for the (candidate) outer influence objects. In Figure 34b we repeat the same experiment using an LRU buffer equal to 10% of the R-tree size (the numbers on the columns are the page faults caused by the queries for the candidate outer objects). Clearly, the cost of the second query drops significantly because most of the accessed nodes are already in the buffer after the first query has been performed. The same can be observed from Figure 35, which shows the number of page accesses for the real datasets as a function of q (^) s. The only case that the second query has non-trivial cost is for the GR dataset and q (^) s = 10,000, because, due to the large query size, the buffer is not