• 沒有找到結果。

Presentation/Organization of research: Good

Loco-cKNN: An Extended Safe Time based cKNN Query Protocol in MP2P Networks

Kai-Ting Yang, Chian-Yi Lo, Ge-Ming Chiu, and Ding-Jie Huang Department of Computer Science and Information Engineering National Taiwan University of Science and Technology, Taipei, Taiwan

Email: {D9615007, M9615005, chiu, D9515002}@mail.ntust.edu.tw

Abstract—The continuous spatial query has been one of the highly demanded services in mobile computing system recently.

One of them is a continuous k nearest neighbor query (cKNN), which is a query that continuously returns a set of k nearest mobile objects to a query issuer. However, most of existing approaches rely on a centralized server to provide cKNN ser-vice. This paper investigates techniques for processing cKNN query in a mobile peer to peer network (MP2P), and aims at reducing communication traffic incurred when performing queries. With a given query issuer, we propose a distributed monitoring protocol, called Loco-cKNN (LOcation awareness and update COllaboration cKNN), for cKNN query. Location awareness and update collaboration are two main techniques that proposed in our protocol. Moreover, this paper also describes a way for eliminating the requirement of the query re-broadcast message; thus communication cost can be further reduced. The simulation results demonstrate that the proposed Loco-cKNN has high query correctness and effectively in cutting the amount of communication traffic for processing cKNN queries.

I. INTRODUCTION

The advance of mobile communication technique has at-tracted enormous research interests in mobile computing re-cently. Particularly, the availability of positioning capability, such as GPS, leads to a high demand for various location-based services (LBS) from mobile users. One of the most important categories of LBS is spatial query, which refers to queries whose answers are dependent on locations of the users who issue the queries. The k nearest neighbor (KNN) query is one of the most popular type of spatial queries. It is used to locate the k points of interest that are nearest to the user who issues the query.

Recently, the spatial query has been extended from snapshot query to continuous query and has been extensively studied in the literature [1,2]. A continuous spatial query is a spatial query that exists in the network for a period of time. Generally, a continuous query refers to moving objects and due to the mobility, the query result may change along time. Hence, to ensure the correctness of the query result, the system must inform the query issuer about any change of the result in real time.

This paper studies the problem of continuous KNN query, which is hereafter referred to as a cKNN query, in mobile peer-to-peer (MP2P) network environments. A general example of cKNN query is that at the end of a music concert, a taxi center would want to keep track of the most nearest ten taxies from the concert hall for the following thirty minutes.

Although cKNN query problem has been widely studied, most of the approaches rely on a centralized server to perform the cKNN service [3]–[7]. Their researches mainly focus on reducing data I/O of the server. Recently, to reduce the computation load of a server, some protocols are proposed [1,8]. In their research, the server devolves some computation load to mobile nodes; thus alleviates the computation and com-munication overhead of the server. Some distributed protocols are proposed to solve the cKNN issue in MP2P environments without the support of fixed infrastructure [2,9]. The aim of their protocol is to promise the correctness of query result in distributed manner.

This paper reexamines the cKNN problem in a MP2P network. The objective is to reduce communication overhead incurred when processing cKNN queries while ensuring the query correctness. We proposed a cKNN query protocol named LOcation awareness and update COllaboration cKNN, Loco-cKNN, which adopts two techniques, location awareness and update collaboration, to achieve the goal without sacrificing the correctness of the query result. The concept of location awareness is the primary technique that makes use of the loca-tion informaloca-tion which is locally available to extend the length of a safe time. Moreover, the idea of update collaboration is employed as an auxiliary technique to further reduce the location-update traffic by sharing newer location information at intermediary nodes. In addition, this paper also proposed a scheme for eliminating the requirement of query re-broadcast message, and consequently periodically broadcast is no longer required.

II. RELATEDWORK

In early stage, spatial queries were mainly addressed over static objects maintained in a centralized database. They focus on the design of index structures to facilitate spatial query services in a centralized server [10,11]. Traditional spatial queries are mostly static for which queries and objects do not move. They focuses on returning a single query result.

As a result of node mobility, query results may change from time to time. This turns the problem of snapshot spatial query to continuous spatial query. Some of the researches addressed the problem of moving queries with static objects [12,13].

Recently, there has been a dramatic proliferation of liter-ature addressing the techniques for cKNN query, which can

be divided into two classes: 1) centralized approaches [3]–

[7,14,15], and 2) distributed approaches [1,2,8,16]. Most of the centralized approaches depend on mobile objects periodically returning their location back to the server. Since most of them are implemented with complex data structure and algorithm, the system loading and accuracy of the query result are sig-nificantly affected by the location-update frequency of mobile objects. Unlike centralized method, distributed approaches devolve computation load to mobile objects; hence they are more suitable for mobile ad hoc environments. In this paper, we focus on the distributed approaches and further analyze the relative techniques.

Both [1] and [8] tackled the cKNN problem in a hybrid approach. Their methods rely on a server, which receives location updates from mobile objects and helps to compute the query results. In addition, the server will delegate mobile nodes to monitor the cKNN queries. These architectures, however, may have a drawback that keeps a server’s loading remains high.

In [2], the authors provided an approach to solve the cKNN queries with stationary query points in MP2P networks. They used the concept of safe-time and proposed a distributed solution for the problem. For a given stationary query, query result remains unchanged during the safe-time period. When the safe-time expires, the method performs a ring broadcast within a circular band to identify the new kth and (k + 1)th objects. However, the concept of ring broadcast is infeasible in MP2P network and cannot ensure the desired area can be fully covered by the broadcast messages.

In [9], the authors proposed a cost-effective technique to process four kinds of spatial monitoring queries based on primitive stationary range monitoring query in MP2P system.

The method partitioned the network into disjointed gird cells and forced each mobile node to cache queries that are relevant to its home cell. Other types of continuous moving queries can be converted into the primitive type of query. However, the continuous monitoring overhead of those converted types of queries was not addressed in the paper.

III. THEPROPOSEDLOCO-CKNN

In this section, we first describe the system model used in the paper. We then present an analysis of the cKNN query followed by the proposed Loco-cKNN protocol for processing cKNN query.

A. System Model and Assumption

In this paper, we consider a MP2P network that consists of a collection of mobile devices. Each device is equipped with some wireless communication interface such as IEEE 802.11. In addition, each mobile device has some positioning capable mechanism such as GPS; hence it is aware of its current geographical location at any time. A mobile device communicates with another device by passing messages, for which intermediary devices act as relays in forwarding the messages. Also, this paper assumes that the maximum moving speed of mobile devices is known in advance and is denoted

by MaxSpd. The assumption of prior knowledge of MaxSpd is possible and reasonable in many scenarios. For example, roaming human users typically have maximum capable mov-ing speed. In addition, most road networks have maximum speed limit that mobile vehicular nodes have to comply with.

A cKNN query is defined as a location-based spatial query that continuously returns a set of k nearest objects to the query issuer. Since each network object is associated with a distinct mobile device, the terms object, device, and node are used interchangeably throughout the paper. Given a set of moving objects O = {o1, o2, . . . , on} and a set of stationary query nodes QN = {q1, q2, . . . , qq} in a two dimensional geographical space. A cKNN query continuously monitors a set of k moving objects that are nearest to the corresponding query issuer. Two query results are considered identical as long as they consist of exactly the same set of moving objects, regardless of the order of the objects. That is, a cKNN query does not concern about the order of the objects in the result.

Due to mobility of moving objects, the query result changes from time to time. It is important to inform the query issuer about the change of the result; thus continuously monitoring the query is the main process of the cKNN query service.

Without loss of generality, Loco-cKNN is described below with respect to a query issuer q1.

Let dis(pi, pj) denote the Euclidean distance between po-sitions pi and pj. Also let oti refer to the position of object oi

at time t. The relative distance between oi at time t1 and oj

at time t2 with respect to q1 is defined as dstq1(oti1, otj2) = dis(oti1, q1) − dis(otj2, q1). Last, let ith NN represent the ith nearest neighbor of the query issuer.

B. Analysis of cKNN Query

Consider a cKNN query Q, issued by q1. Let us focus on the time when query result changes. Generally, a cKNN query process is divided into three phases: initial phase, monitor phase, and update phase. In the initial phase, the query issuer q1 submits the query Q and obtains the first query result.

After the initial phase, mobile objects enter the monitor phase, during which they monitor Q continuously for the entire query period. The aim of this phase is to ensure that every mobile object can detect the change of query result caused by itself and takes appropriate action accordingly. When an object discovers that itself may affect the query result, it enters the update phase immediately. In the update phase, the object will send a location-update message to an appropriate node as described later to update its knowledge about the current location of the node, and the node will recalculate the result.

The monitoring phase and update phase alternates for each mobile node until the query time of Q expires.

Upon the end of the initial phase, it is clear that mobile objects in the network are divided into two sets: the result set R, and the non-result set R. For example, in Fig. 1, q1issues a cKNN query with k = 5. We have R = {o1, o2, o3, o4, o5} and R = {o6, o7} after the initial phase is performed. Note that a change of the result can only happen at the time when one of the object in R exchanges the position with another object

q1

from R. More specifically, it would be the kth NN exchanges the position with the (k + 1)th NN, and the exchange process occurs instantaneously.

The previous analysis shows that the (k + 1)th NN is the crucial object to watch. If no object in set R exchanges the position with (k + 1)th NN, then the query result remains unchanged. Therefore, mobile objects in R have to monitor the (k + 1)th NN in our protocol. If any of them exchanges the position with (k + 1)th NN, such change will be detected immediately and a message will be sent to update the query result. However, the role of the (k + 1)th NN may change from along time due to object mobility. If a new mobile object replaces the old (k + 1)th NN, the system must update this new information to every mobile node involved in the query to ensure the correctness of the result. There are two cases in which the (k + 1)th NN is replaced: (1) the kthNN exchanges with the (k + 1)thNN, resulting in a change of query result as well; (2) the original (k + 2)th NN exchanges with (k + 1)th NN, causing itself to become the new (k + 1)th object. The detail about how to handle these two situations and to keep track on the (k+1)thNN is described in the following section.

C. Loco-cKNN

The proposed Loco-cKNN protocol consists of three phases:

initial phase, monitoring phase, and the update phase. Loco-cKNN employs two techniques, namely, location awareness and update collaboration. These techniques are used in the second and third phases respectively to reduce communication overhead.

1) Initial phase: In the initial phase, we adopt a distributed kNN snapshot protocol to obtain the initial snapshot k + 1 NN objects. q1then collects enough information and computes the query result plus the information of (k + 1)th NN object. Let oi refer to the current ith NN of the query. Object ok+1 is used for processing query but does not belong to R. After q1

obtains the initial KNN result, it sends the information about ok+1to all o1∼ ok objects so that they can monitor ok+1.

2) Monitoring phase with location awareness technique:

Upon receiving the location information about ok+1, mobile nodes in R enter the monitoring phase and start to monitor ok+1. Essentially, each node oi, i ≤ k, computes a safe time which is a duration of time that the query result cannot possibly change because of the movement of oi. That is, oi

q1

Fig. 2: Example of safe time.

will not change the position with ok+1 before the safe time expires. Let t1 denote the current time, then we have:

safe time =dstq1(oti1, otk+11 )

2 × MaxSpd (1)

Recall that dstq1(oti1, otk+11 ) is the relative difference between oi and ok+1 with respect to q1 at time t1. Equation (1) is derived from the idea that oi and ok+1 are moving closer to each other in exactly opposite directions with respect to q1, at MaxSpd. Hence, when safe time expires, these two objects can at most be at equal distance from q1. Therefore, during safe time interval, it needs no communication to update the query result. Once the safe time expires, oi proceeds to the third phase, namely, the update phase to update its current location.

An example of safe time derivation is illustrated in Fig. 2.

The safe time computed according to Equation (1) is based on the extreme assumption that mobile objects are both moving at MaxSpd. However, this scenario may rarely occur in reality. Object oican take advantage of this situation to extend the safe time. In this regard, we observed that oi is always aware of its own current position. Based on this information, oi can locally determine whether the above extreme situation indeed takes place when safe time expires. This can be easily done by computing the distance between current position of oiand the nearest possible location of ok+1, based on location information known to oi itself.

Precisely, each location data of ok+1, is associated with a timestamp. Let t2 denote the time when the first safe time expires, i.e. t2= t1+safe time. Let dsbe the shortest possible distance between oi and ok+1at t2. ds can then be obtained:

ds= dstq1(oti2, otk+11 ) − (t2− t1) × MaxSpd

dsis calculated by oi on the assumption that ok+1is moving toward q1 at MaxSpd, during the entire safe time. If ds>0, the safe time can then be further extended by an mount of time, called safe time’

safe time’ = ds

2 × MaxSpd (2)

Fig. 3 illustrates the derivation of extended safe time’. The same process can be repeated when the extended safe time’

subsequently expires, as long as the above criterion ds > 0 remains true. In this manner, oi utilizes its local position information to prolong the length of safe time to the extreme.

q1 ok+1

Fig. 3: Example of extended safe time.

3) Collaboration update phase: When oi finds itself may exchange the position with ok+1, it proceeds to update phase in which it sends a location-update message to ok+1. The message contains the current location of oi along with the timestamp of the location information of ok+1 known to oi. In this phase, mobile nodes may collaborate to reduce communication cost by sharing location information about ok+1.

Assume that there is an intermediary node, op, on the path from oi to ok+1. If op receives the location-update message sending from oito ok+1, opfirst checks the timestamp associated with ok+1. If the location information about ok+1

maintained by op is more recent than the one maintained by oi, op may use its location information to compute the safe time for oi. By using the newer location information, op

may conclude that oi can further extend the safe time. If the extended safe time exceeds a given threshold, op determines to return the newer location information about ok+1back to oi

without forwarding the location-update message. Otherwise, it continues relaying the message. If there exists no such kind of intermediary node, the location-update message will eventually reach ok+1. In addition, when the location-update packet is returned, either from ok+1 or from intermediary op, mobile nodes along the path will update their location information about ok+1 according to the information in returned packet.

For example, consider the communication graph shown in Fig. 4, which reflects the tree topology structure of the previous example. Suppose o5 detects that it might have exchanged the position with o6, the current ok+1, it sends a location-update message to o6to acquire the latest position of it. The packet goes through path (o5, o2, o6). If the result does not change, o6 will simply return the packet, containing its latest location information, back to node o5. Along the reverse path, o2will also update its location information about o6according to the packet. Later, if o4sends a location-update message through path (o4, o1, q1, o2), o2 can use the newer information to help to re-compute the safe time for o4, without forwarding the packet to ok+1. Thus, lots of communication overhead can be saved. On the other hand, as the case when node o5indeed changes the position with o6, the original ok+1, o6 will send a message to inform the query issuer q1 and o5

about the change, and starts to monitor o5. Since o2relays the

q1

Fig. 4: Collaboration update example shown in tree structure.

inform packet, it can update the location about o5, the new (k + 1)th, and computes a new safe time accordingly as well.

After a while when o4 issues a location-update message to o6, the original (k + 1)th NN, the packet will go through q1. q1

will update the information about the new (k + 1)th object, o5, to o4 and thus o4 knows a change has happened and it has to monitor o5 from now on.

As described earlier, objects in set R also need to monitor ok+1 in order to prevent any of them from becoming the new (k + 1)th NN but no one is aware of the occurrence of the event. Existing solutions rely on periodically re-broadcasting the query, letting mobile objects aware of the query and the current ok+1. Here, we propose a method to eliminate the need for broadcasting the query.

Our technique is motivated by the observation that a mobile object may become part of the query result only after the node makes connection with some objects, including the query issuer, that has already been part of the query result. Therefore, in our scheme, if oi, i ≤ k, makes connection to a new neighbor on, oi will pass the information about Q to on,

Our technique is motivated by the observation that a mobile object may become part of the query result only after the node makes connection with some objects, including the query issuer, that has already been part of the query result. Therefore, in our scheme, if oi, i ≤ k, makes connection to a new neighbor on, oi will pass the information about Q to on,

相關文件