• 沒有找到結果。

Chapter 2: SmartBone: An Energy-Efficient Smart Backbone Construction in

2.2 SmartBone Design

2.2.2 Flow-Bottleneck Preprocessing

Backbone seeds are chosen based on the 2-hop neighbors’ information. After collecting neighbor information, SmartBone performs FlowBP to choose critical nodes. It is noticeable that those critical nodes contain articulation points. Therefore, these critical nodes are especially chosen to act as the backbone seeds. The connectivity can be improved in several ways, such as adding nodes [23], deploying MicroRouters [24], and using movable mobile routers [25]. SmartBone adopts Flow-Bottleneck to ensure critical nodes to be selected as coordinators. Critical nodes are nodes which on the critical communication paths in the network, and critical nodes contain cut points deservedly.

SmartBone exists additional communication overhead in Flow-Bottleneck

Preprocessing which other methods (ex: SBC) does not cost. However, FlowBP only runs once after network deployment in a topology. Hence, the overhead of FlowBP is negligible regarding the whole communication lifetime. In addition, the dense topology would become a sparse topology as time goes by, since it always exist nodes which consume a significant amount of energy in the network. The FlowBP would have to run again to accommodate to the new topology in such circumstances.

As noted previously, FlowBP allows SmartBone to maintain necessary connectivity, particularly in a sparse topology. FlowBP can detect the fragile part of many possible link paths, and make sure those links are includes in the backbone. The following is the detail procedure.

1) Distributed Depth First Search (DDFS)

The purpose of Distribute Depth First Search (DDFS) is to find the number of different possible paths to reach each node. DDFS extended the Depth First Search (DFS) algorithm to find N spanning trees in the network topology, where N is number of nodes. We emulate a situation that each node of network sends a packet to entire network through a spanning tree. Each node records its parents for each spanning trees. Number of different parents for each node gives us how many possible links to reach this node. The node with small number of different parents indicates that most of packets reach this node by few bridges. Therefore, it’s important to identify two end nodes of the bridge as critical nodes. FlowBP has two main steps. The first step is the Distributed Depth First Search (DDFS) processing, and the second is Flow-Bottleneck checking. In the first step, the DDFS algorithm is performed on each node. The following is the data structure used, and the detailed DDFS procedure as illustrated in Fig. 1.

% The following is pseudo-code for DDFS

% procedure. We emulate the operation of stack

% to perform distributed DFS algorithm. The data

% structure of DDFS is defined as follows:

%

% PRED : the parent node ID

% CHILD : the child node ID

% VISITED : has been visited or not

% NEIGHBOR_LIST : 1-hop neighbor list

% DISCOVER : the order of visit

% NOWTIME : virtual visited order

% In the beginning, the DFS_ROOT performs

% DFS_ROOT_TASK() to launch the DFS_SPANNING()

% procedure. If a node is DFS_ROOT, it sets PRED

% as itself and notifies its 1-hop

% neighbors with 'DFS_VISITED' message.

PROCEDURE DFS_ROOT_TASK():

PRED := DFS_ROOT

VISITED := 1

DISCOVER := 1

NOWTIME := 2

broadcast ( "DFS_VISITED" )

performs DFS_SPANNING() PROCEDURE

ENDPROCEDURE

% PROCEDURE DFS_SPANNING()

% When node-v performs DFS_SPANNING(), it checks

% whether it can choose a non-visited node-w

% from NEIGHBOR_LIST. If exists such node-w then

% node-v notifies node-w with 'DFS_BEGIN'

% message. It is equivalent to the 'PUSH'

% operation on the stack% Otherwise, it equals

% to the 'POP' operation and node-v notifies

% its parent with 'DFS_BACK' message.

PROCEDURE DFS_SPANNING():

IF ( select non-visited w from NEIGHBOR_LIST ) {

add w to CHILD

% 'PUSH' operation

send ( "DFS_BEGIN", NOWTIME) to w }

ELSE {

% 'POP' operation

send ( "DFS_BACK" ) to PRED }

ENDPROCEDURE

% If a node receives 'DFS_VISITED' message from

% node-p, it removes node-p from its own

% NEIGHBOR_LIST.

PROCEDURE DFS_VISITED():

removes p from NEIGHBOR_LIST ENDPROCEDURE

% If a node receives 'DFS_BEGIN' from node-v,

% it's its turn to perform DFS_SPANNING()

% procedure.

PROCEDURE DFS_BEGIN():

PRED := v

VISITED := 1

DISCOVER := NOWTIME + 1

broadcast ( "DFS_VISITED" )

performs DFS_SPANNING() PROCEDURE ENDPROCEDURE

% If node-p receives 'DFS_BACK' which send to

% itself from node-v, it means that node-v

% finishes the exploration of spanning tree which rooted from

% itself. Hence, node-p proceeds to DFS_SPANNING

% to explore the remainder network topology.

PROCEDURE DFS_BACK():

performs DFS_SPANNING() PROCEDURE ENDPROCEDURE

Fig. 1. DDFS procedure

Table I. FLOW_TH used during simulation Average Network Density 20 15 10 8

FLOW_TH 0 2 5 9

The conventional DFS algorithm often utilizes recursion, and it generally manipulates the stack to simulate recursion. DDFS simulates stack operation by sending control messages between nodes. For example, a PUSH stack operation corresponds to selecting a node from the NEIGHBOR_LIST and marking it as visited.

At this moment, the visited nodes send DFS_BEGIN messages to non-visited nodes, as shown in ‘IF’ segment of Fig. 1. Conversely, a POP stack operation indicates that non-visited nodes can no longer be found in the NEIGHBOR_LIST, that is, the NEIGHBOR_LIST is null. The node with a null NEIGHBOR_LIST sends DFS_BACK message to DFS_PRED, as shown in ‘ELSE’ segment of Fig. 1. DDFS can simulate stack operation entirety, so the DFS algorithm can be applied on each node in a distributed fashion.

2) FlowBP Checking

The DDFS procedure is finished N times, where N represents the number of network nodes so that the information needed by FlowBP can be obtained. All nodes are then checked to determine which critical nodes are. The DFS_PRED of each node is checked after repeating DDFS N times. DFS_PRED records the parent IDs of each node. If the number of different parents of one node as recorded in DFS_PRED is below a threshold (FLOW_TH), then the node and corresponding parent node are selected as critical nodes. Since the FlowBP can identify these critical nodes, particularly in sparse topology, sufficient nodes are in the awaken state can be found to act as coordinators and relay packets. However, a node with large different parents under DDFS indicates that it can be reached through many possible paths. Therefore, if some of the paths are failed or obstructed, then the packets can still reach the same destination node through other paths. In general, network designers deploy sensor networks with different average network density according to their deployment consideration. If a sensor network was deployed with sparse topology, FLOW_TH should be higher, thus large number of critical nodes can be found. On the contrary, in dense topology, FLOW_TH is decreased. Table I is the multiple levels of FLOW_TH used during our simulation.

相關文件