• 沒有找到結果。

Imprecision-tolerant Location Management Model

5.2.2 Tree Optimization

Query Statistics

Later, we will show that uncorrelated sensors should not be put together under a subtree to reduce the query cost while correlated sensors should be put together to minimize the increment of update cost. Thus, we first present how to collect query statistics to identify the correlation of sensors.

The statistics is done by the sink. The sink will maintain a counter be queried for each sensor x. After a query Query(o, tolerant radius, tolerant interval) returns to the sink with the result indicating that the object is located at sensor x, the sink will increase x.be queried by 1. In addition, the correlated sensors of x will also be recorded. Based on the query format defined in Sec. 5.2.1, we define the correlated sensors are those located in CIRCLE(x, min(tolerant radius, tolerant interval × avg speed)), where avg speed denotes the average speed of the queried object.

The query statistics will be used for the tree construction algorithm. Thus, a question is how to do the query statistics before the tree is constructed. We propose two approaches. The first approach is called ideal-collection. In this approach, if a query is issued at time t and the queried object is located at sensor x at time t, then x.be queried will be increased by 1. This approach cat collect the most precise data, but this approach is unrealistic, because the exact location of the object at time t is hard to get precisely.

The second approach is called tree-collection, in which a collection tree (e.g., the DAT tree presented in Chapter 3) will be used initially to do query statistics.

Then, by this query statistics, the tree optimized by considering the

imprecision-Figure 5.3: The values of be queried of sensors collected by (a) ideal-collection and (b) tree-collection, where the DAT tree is used.

tolerant queries can be constructed. However, because imprecision is unavoidable in the tree-collection scheme, the result of statistics may be different from that collected by ideal-collection. Fig. 5.3 shows the values of be queried of sensors collected by ideal-collection and tree-collection respectively, where 1024 sensors are randomly deployed in a 256 × 256 field with uniform distribution and each sensor is represented as a Voronoi cell. We can see that the results are similar.

Even the result collected by the IQT (Imprecision-tolerant Query Tree) tree that will be described in the next subsection is also similar to those collected by ideal-collection and the DAT tree. The reason is that the query is just replied early in the tree-collection approach and the error is acceptable even although the replied result may be imprecise. Thus, we can construct a tree initially to do query statis-tics, and then construct a new tree by considering imprecision-tolerant queries to reduce the communication cost further.

The only one remaining question is the rule used for determining the cor-relation between two nodes. Based on the query statistics, we define a func-tion Conf idence(a, b) as N (a, b)/a.be queried, where N (a, b) is the number of queries in which a is queried and b is one of correlated sensors. If Conf idence(a, b)

> min condif ence, we say that b is a correlated sensor of a.

x

Imprecision Query Tree Construction Algorithm

We argue that uncorrelated sensors should not be put together under a subtree to reduce the query cost while correlated sensors should be put together to minimize the increment of update cost. We use examples to explain the reasons.

First, we focus on the spatial-imprecision. In Fig. 5.4(a), where the dotted circle denotes CIRCLE(f, tolerant radius), when x receives a query for object o and o.location is f , it needs to forward the query to g, because not all members of Subtree(g) are located in CIRCLE(f, tolerant radius). On the other hand, in Fig. 5.4(b), we can see that when uncorrelated sensors (i.e., a, b, c and g) are removed from the subtree, x can reply this query now. Thus, the query cost is reduced. However, in Fig. 5.4(b), we can see that when an object moves from f to e, update packets have to be sent to x. Thus, when we put correlated sensors together, the increment of update cost can be minimized.

For the temporal-imprecision, similar results can be derived. Now, we as-sume the dotted circle shown in Fig. 5.4 is CIRCLE(f, tolerant interval × avg speed), where avg speed denotes the average speed of the queried object.

This means that after tolerant interval, the object may be located at the outside of the circle. However, if the object is still located in the subtree of g, o.time will not be updated. On the contrary, when we remove the uncorrelated sensor of f (e.g., Fig. 5.4(b) and Fig. 5.4(c)), o.time will be updated so that x could reply this query.

Sink

(a) (b)

b

c a

p

h d e

g f Subtree1

Subtree2

Figure 5.5: (a) The basic idea of constructing a tree. (b) The problem arising when connecting two subtrees.

Based on the observations mentioned above, we develop a tree construction algorithm IQT. The basic idea is dividing sensors into subtrees formed by corre-lated sensors and then connecting those subtrees into a tree as shown Fig. 5.5(a).

However, in Fig. 5.5(b), we can note that when Subtree2 connects to Subtree1, the composed members of Subtree1 are changed. Now when sensor p receives a query for object o and o.location is a, the probability that p cannot reply this query is high, because some uncorrelated sensors (i.e., those sensors in Subtree2) are attached to Subtree1.

One way to solve this problem is connecting all subtrees to the sink. Ob-viously, this solution is not scalable, because when an object moves from one subtree to another subtree, update messages have to be sent to the sink. Thus, we propose a backbone-based solution to solve this problem. First, some sensors will be selected to be backbone nodes. These backbone nodes will form a backbone tree. On the other hand, other non-backbone nodes will form subtrees according to the query statistics. Finally, all subtrees are connected to the backbone to form a single tree. The pseudo-code of the IQT algorithm is shown in Algorithm 3, where G denotes the modeleed network graph and QS denotes the query statistics. The

details of each procedure will be further described in the following paragraphs.

Algorithm 3 IQT(G, QS)

1: Backbone-Construction(G, QS)

2: Subtrees-Formation(G, QS)

3: Connecting-Subtrees-To-Backbone(G)

Backbone-Construction(). The first step of Backbone-Construction() is se-lecting backbone nodes. Recall that the major task of backbone nodes is to reply the queries early so that the queries do not need to be forwarded to the subtrees.

Thus, two principles should be followed when selecting backbone nodes:

• The backbone node should be close to the sink. We can see that when the backbone node is close to the roots of the subtrees, the saved query cost is limited. On the contrary, when the backbone node is close to the sink, the backbone node can reply the queries more early.

• The value of be queried of a backbone node should be low. The IQT al-gorithm will attach subtrees to the backbone nodes later and most nodes of the subtrees are not the correlated node of backbone nodes. Thus, when the result of a query is a backbone node (recall that the value of be queried of the backbone node will be added by 1 in this case), this query usually will be forwarded to that backbone node (i.e., no query cost can be saved).

Therefore, this is the reason that the sensor that is queried rarely should be selected.

Procedure 4 shows the pseudo-code of the Backbone-Construction procedure and the backbone nodes selection procedure is from line 1 to line 13, where two pa-rameters are used. The first parameter α (0 ≤ α ≤ 1) is used to limit the values of be queried of backbone sensors. We can see that the sensors that are queried rarely will be selected. (Note that we can also see that at most bα × |VG|c backbone nodes will be selected.) On the other hand, the second parameter β (0 ≤ β ≤ 1) is used to limit the distance between the backbone node and the

sink so that the backbone nodes can be the nodes close to the sink. (Note that MAX HOP COUNT = max{hop count(x, sink)|∀x ∈ VG})

After selecting the backbone nodes, these backbone nodes form a backbone subgraph (denoted by BG = (VBG, EBG)), in which VBG is the set of backbone nodes and an edge belongs to EBG if both of its two incident nodes are backbone nodes. Then, the DAT algorithm proposed in Chapter 3 is run on BG. The rea-son to do so is to connect backbone nodes and minimize the update cost locally.

Because BG may be disconnected, it is possible that some backbone nodes do not have parents after running the DAT algorithm. Obviously, a backbone node should choose a parent that is also a backbone node. Thus, a backbone node x that does not have a parent will choose a backbone node y as its parent so that hop count(sink, x) = hop count(sink, y) + hop count(x, y). This ensures that the tree will be deviation-free. If there are more than one such backbone node, then the sensor y that makes hop count(x, y) minimum will be selected. The rea-son why minimum is chosen is to reduce the update cost. Procedure 4 shows the related pseudo-code (from line 14 to line 24).

Subtrees-Formation(). For non-backbone nodes, they should form subtrees based on the query correlation as we mentioned above. To begin with, we sort non-backbone nodes by be queried in increasing order. The reason why increasing order is used is explained as follows: the best tree for reducing query cost is the one where each non-backbone node connects to a backbone node alone. In this case, we can see that for a non-backbone node, no other uncorrelated sensors will exist. However, this will incur higher update cost. So we prefer to form correlated sensors into subtrees to minimize the increment of update cost. Thus, when we examine the non-backbone nodes in increasing order, the sensors with lower be queried will form subtrees first and the sensors with higher be queired have higher opportunity to be alone. (This ensures that the sensors with higher be queried have no uncorrelated sensors for each query.)

Then, we examine each node in L. If a node x ∈ L is not examined yet, then it will form a subgraph ST = (VST, EST) first. Thus, the major task of