• 沒有找到結果。

三、 Approximate Location Management

3.3 Query Process

Since we use the dynamic server to reduce the amount of message, the aforementioned update process has to be modified. When the server moves or splits, we set the pointer for routing message to find dynamic servers. The location based routing algorithm, such as GPSR[4], is adapted for routing algorithm of our work. The location based routing always forwards message to node close to destination. Therefore, if the distribution of query or update is inclose in some

area, we can expect the message has to route through some dynamic servers.

Note that the query with lower error bound has to be forwarded to local server in basic system. We add a cache at each node to estimate the approximate radius of target. The local server appends the reply message with a flag to let the querying node know that this information comes from local server. When querying node receives the reply message, it records the error bound of query and stores the location of local server in the cache. At next period, the querying node check this cache first. If the error bound of query is smaller than the estimate approximate radius in the cache, the query will be forwarded to the local server immediately without sending to the home server.

The concept of new query process is searching target’s information first when the message arrived at the node. The information of target could exist in each node cause the dynamic server can move or split. In sensor networks, the power consumption of processing is less than transmission. Therefore, the power consumption of searching target’s information is relative less and we can omit it. If we find the target’s information in the dynamic server before the query message arrived at original home server, the message from dynamic server to original home server can be saved.

The query message includes the identity of target, the error bound which user can tolerate, and the location of query node. At first, the query message is sent to a home server. The node confirms whether itself is the dynamic server of target when it receives the query message. If the query message is routed to home server without meeting any dynamic server, home server has to check if it had moved to another node before. The dynamic server or home server receives the query message and compares the error bound of query and approximate radius of target. If the error bound is larger , the location information of target in home server can reply to the query node immediately. Otherwise, home server forwards the query message to local server to get the information in detail. There is an example in Figure 3.11. The original home server has been split twice so we have three home servers now. The following step is the query process of approximate location management(ALM).

Step 1 Querying node sends the query to home server with target’s id and the error bound which user can tolerate.

1. Query

2. Forward query

3. Reply

Home Server Local Server Sensor Node

Figure 3.11: First case in ALM query process

Step 2 When the server receives query message, it finds target’s information and replies it to the querying node.

Step 3 If the error bound of query does not satisfy the approximate radius of target, the query message is also forwarding to local server.

Step 4 The local server receives the forwarding query and replies the precision data to querying node.

The above situation is first case in ALM query process. The dynamic server can intercept query message and reply by itself without forwarding query to original server. Now, we discuss the second case. The original home server does not have target’s information anymore as shown in Figure 3.12. It is possible when we use the dynamic server scheme. The following step is the query process in second case.

Step 1 Querying node sends the query to home server with target’s id and the error bound which user can tolerate.

Step 2 When the original home server receives query message, but it does not find any infor-mation about target. Then original home server finds the dynamic server by tracing the moving pointer or splitting pointer.

Step 3 Dynamic server receives the query from home server, it finds target’s information. Then it replies to querying node directly or forwards the query to local server.

1. Query

4. Reply

2. Find Home Server

3. Forward Query

Home Server Local Server Sensor Node

Figure 3.12: Second case in ALM query process

Step 4 The local server receives the forwarding query and replies the precision data to querying node.

Algorithm Protocol Executed at Every Node

1: if receiving a query <target id, error bound> then

2: if target in home server table then

3: neighbor table add query count;

4: if error bound > approximate radius then

5: reply to querying node;

6: else

7: forward query to local server;

8: end if

9: else

10: if is original home server then

11: find a moving node and forward query;

12: end if

13: end if

14: end if

相關文件