In this section, we design an EEFR based on the above analysis. Using the mobility of agent node, our proposed fusion-driven routing aims to attain the energy efficient data collection with random node deployment.

### A. Cluster and grid division

The topology of EEFR is an extension based on the classical hierarchy GAP, which is also to divide the network into a series of square grids. In the network, we deployed mobile agents in uniform. The ordinary sensor nodes form the cluster structure around these mobile agent nodes. Similar to the sink node, the mobile agent nodes are not limited by energy supply, so they act as the cluster head and are responsible for the data collection management of this cluster. As the cluster head, the mobile agent node should have the ability of managing all the sensor nodes in the cluster simultaneously. Different from other cluster routing, the cluster head in EEFR does not need to be selected by rotation method from ordinary sensor nodes. To reduce the cost of network, the number of mobile agent nodes should be as less as possible which means the area managed by mobile agent nodes should be as large as possible. To guarantee the communication of two mobile agent nodes in the neighbor cluster, the number of mobile agent nodes is limited by their communication ability. Let *R* represent the communication distance of mobile agent nodes, the maximum area of cluster is

{S}_{c}=\frac{{R}^{2}}{5}.

(16)

If the cover area of whole multimedia sensor network is *S*, the minimum amount of needed mobile agent can be calculated as

{N}_{a}=\frac{S}{{S}_{c}}=\frac{5S}{{R}^{2}}.

(17)

The topology division of network includes the following two steps. The first is to divide the network into a series of larger equal square area and each square represents one cluster. There is only one mobile agent node in each cluster which can move freely. The second one is to further divide the cluster into many smaller equal square, and each square represents one grid. For the sake of avoiding data loss during transmission, the size of grid is not too large but should guarantee the communication of two random nodes in the neighbor grids. When the sensor node knows which grid it belongs to, it needs to broadcast the information with identification and receive the information from other nodes in the neighbor grid.

For completing more complicated tasks, sensor nodes are equipped with many different sensors so that the traditional data collection model is not valid. The network needs to complete more than one task, that one task is respond to one data set as described in Definition 3.1, then all the data sets compose of the data space. The mobile agent node needs to arrange the suitable nodes to complete data collection according to different tasks.

As shown in Figure 4, the operation procedure of EEFR is divided into a number of rounds and each round includes two phases, namely set-up phase and steady-state phase. The working process of set-up phase needs to complete the movement of mobile agent node, the establishment of routes, and the distribution of time-slot allocation. In steady-state phase, the sensor nodes complete the data collection under the management of mobile agent node.

### B. Movement of mobile agent node

When the mobile agent node moves to a new position, the coordinate of the grid will also change. Only the sensor nodes in the grids with the coordinate of (1, 1), (1, -1), (-1, -1), and (-1, 1) can directly send data to mobile agent node while all the other sensor nodes need to send their data to the mobile agent node by multi-hop method. In EEFR, multi-hop routes are formed between neighbor grids from source node to the mobile agent node, which can guarantee the sensory data generated by the farthest node not be lost. The data collection of inter-cluster starts from the outermost grid and ends when all data are transmitted to the mobile agent node. One-to-one or many-to-one mappings are formed among sensor nodes of neighbor grid. If a sensor node in grid *g*_{
u
} (*x*, *y*) has sensory data to be transmitted, it needs to select the corresponding relay node from its neighbor grids which is much closer to the mobile agent node. For example, when *x*, *y* > 0, the selected relay node should be in the grid *g*_{
u
} (*x*-1, *y*) or *g*_{
u
} (*x*, *y*-1). In this case, *g*_{
u
} (*x*, *y*) acts as a source grid, while *g*_{
u
} (*x*-1, *y*) or *g*_{
u
} (*x*, *y*-1) acts as the destination grid.

The data collection involves in many kinds of sensors to complete different tasks in EEFR. According to the Definition 1 in Section 3, the data collection space \hat{D} consists of *k* data sets and denoted as \hat{D}={D}_{1}\times {D}_{2}\times \cdots \times {D}_{k}. Each data set includes sensory data in different attributes.

The sink node should confirm the data set corresponding to each task and the data collection space composed by all data sets, then send these information to each mobile agent node. As the management node of cluster, the mobile agent node needs to judge which specific nodes will be used to complete the different tasks. To realize the efficient data collection, the effect of data fusion on energy consumption should be fully considered. The effective data fusion can reduce the energy consumption, while the reduced data amount is determined by the data coefficient relativity. The current research shows that the data coefficient relativity is affected by the distance among nodes. Although there are other kinds of models, the common result shows that the data coefficient relativity among nodes reduces as the increasing the space distance. Here, we adopt a model proposed by [5]

\rho =\left(1-d\u2215{d}_{s}\right)\cdot f\cdot p,

(18)

where *d* and *d*_{
s
} represent the maximum correlation distance between nodes and the space distance between two sensor nodes, *f* represents the effect of the fusion algorithm on the data correlations, and *p* is the data attribute.

The mobile agent node is responsible to find the efficient data fusion which can reduce the energy consumption in its cluster and achieve the optimization target to direct the establishment of routing. Based on Theorems 1 and 2, we can judge whether the data fusion is effective and take use of the mobility of agent node to maximum the performance of saving energy by data fusion. *s*_{
i
} and *s*_{
j
} are any two nodes in different grid of the same cluster. The following Lemma 1 gives the calculation method of finding the mobile agent position which can realize the efficient data collection using the efficient data fusion in maximum.

Lemma 1: The energy efficiency can be realized if the location of a mobile agent node can meet the requirement of max{\sum}_{{s}_{j}\in {g}_{u}\left({x}^{\prime},{y}^{\prime}\right){s}_{i}\in {g}_{u}\left(x,y\right)}\left[D\left({s}_{i}\right)+D\left({s}_{j}\right)\right]{e}_{f}-\left({e}_{t}\left(\sqrt{2}a\right)+{e}_{r}\right)\left(\mid {x}_{0}\mid +\mid {y}_{0}\mid \right)\sigma \left({s}_{i},{s}_{j}\right)min\left(D\left({s}_{i}\right),D\left({s}_{j}\right)\right)

Proof: If data fusion is not adopted, for any sensor node *s*_{
i
} ∈ *g*_{
u
} (*x*, *y*), the energy consumption of collecting the data generated by *s*_{
i
} can be calculated as

\begin{array}{ll}\hfill {E}_{1}\left({s}_{i}\right)=& D\left({s}_{i}\right){e}_{t}\left(\sqrt{2}a\right)\left(\mid x\mid +\mid y\mid \right)\phantom{\rule{2em}{0ex}}\\ +D\left({s}_{i}\right){e}_{r}\left(\mid x\mid +\mid y\mid -1\right).\phantom{\rule{2em}{0ex}}\end{array}

(19)

This moment, the minimum total energy consumption of the cluster *g*_{
u
} is

\begin{array}{c}{E}_{u1}={\displaystyle \sum _{{s}_{i}\in {C}_{u}}}{E}_{1}({s}_{i})\\ ={\displaystyle \sum _{{s}_{i}\in {C}_{u}}}[D({s}_{i}){e}_{t}(\sqrt{2}a)(\mid x\mid +\mid y\mid )\\ \phantom{\rule{0.5em}{0ex}}+D({s}_{i}){e}_{r}(\mid x\mid +\mid y\mid -1).\end{array}

(20)

If the data fusion is adopted, both of intra-grid and inter-grid fusion processes are possible to reduce energy consumption. Here, the minimum energy consumption becomes

{E}_{u2}={E}_{u1}-{E}_{\mathsf{\text{intra-f}}}-{E}_{\mathsf{\text{inter-f}}},

(21)

where *E*_{intra-f} and *E*_{inter-f} represent the saved the energy consumption by data fusion of intra-grid and inter-grid. The fusion process of intra-grid is not affected by the location of mobile agent node. It is only necessary to consider how to maximize the saving energy efficient of inter-grid fusion process, which can be described as

\begin{array}{c}\mathrm{max}({E}_{\text{inter-f}})=\mathrm{max}{\displaystyle \sum _{{s}_{j}\in {g}_{u}({x}^{\prime},{y}^{\prime})}{\displaystyle \sum _{{s}_{i}\in {g}_{u}(x,y)}[D({s}_{i})}}\\ +D({s}_{j})]{e}_{f}\\ -({e}_{t}(\sqrt{2}a)+{e}_{r})(\mid {x}_{0}\mid \\ +\mid {y}_{0}\mid )\sigma ({s}_{i},{s}_{j})\\ \cdot \mathrm{min}(D({s}_{i}),D({s}_{j})).\end{array}

(22)

Hence, Lemma 1 is proved.

According to different tasks, the mobile agent node can find the optimized position by Lemma 1, then complete the establishment of intra-cluster routing.

### C. Routing establishment

Although the minimizing energy consumption is the prior target during the routing establishment, EEFR also try to balance the energy consumption among different sensor nodes. As the sensor nodes are deployed in high density, more than one node might meet the requirement of minimizing energy consumption during routing establishment. For the sake of balancing the energy consumption, the node with more remaining energy should be selected to undertake the routing task. The routing selection includes three steps.

The first step: the mobile agent node determines the sensor nodes to complete data collection in its cluster according to different tasks, then calculates the optimization position by Lemma 1. As shown in Figure 5a, the three optimization positions of mobile agent nodes data are separately found according to different data sets *D*_{1}, *D*_{2}, and *D*_{3} generated by different tasks. Where, the black, purple, and green dots are the nodes generating data sets *D*_{1}, *D*_{2}, and *D*_{3}.

The second step: the mobile agent node determines the sensor nodes that participate the intra-grid data fusion by Theorem 1, and point the nodes with more remaining energy to complete the fusion by Theorem 1. As shown in Figure 5b, the nodes with short distance in the same grid participate intra-grid fusion process since they can meet the requirement of Theorem 1, while the nodes in long distance are forbidden in such operations.

The third step: the routing selection of inter-grid is completed by the mobile agent node according to Theorem 2, which needs to maximize the performance of saving energy by inter-grid data fusion. As shown in Figure 5c, the nodes with more remaining energy that can meet the requirement of saving energy are chosen during routing establishment. The coordinate (*x*_{0}, *y*_{0}) of route intersection from node *s*_{
i
} in grid *g*_{
u
} (*x*, *y*) and *s*_{
j
} in grid *g*_{
u
} (*x*', *y*') to mobile agent *g*(*x*_{0}, *y*_{0}) in a grid should satisfy the following condition:

\left\{\begin{array}{cc}\hfill \mid {x}_{0}\mid +\mid {y}_{0}\mid & >\frac{\left[D\left({s}_{i}\right)+D\left({s}_{j}\right)\right]{e}_{f}}{min\left(D\left(si\right),D\left(sj\right)\right)\left({e}_{t}\left(\sqrt{2}a\right)+{e}_{r}\right)\sigma},\hfill \\ \mid {x}_{0}\mid \le max\left(\mid x\mid ,\mid {x}^{\prime}\mid \right),\hfill \\ \mid {y}_{0}\mid \le max\left(\mid y\mid ,\mid {y}^{\prime}\mid \right).\hfill \end{array}\right.

(23)

For saving energy consumption, it is a general method to make the sensor nodes turn to sleep when they do not have any task. EEFR routing also adopts time-slot allocation to reduce the probability of communication collision and save energy. Let *t*_{intra} and *t*_{inter} represent the consumed time of intra-grid and inter-grid data fusion process. *n*_{max-f}represents the maximum number of each grid to complete intra-grid fusion process. *n*_{
t
} (*x*, *y*) is the number of sending data from grid *g*_{
u
} (*x*, *y*) to other grids, *n*_{
r
} (*x*, *y*) is the number of receiving data of grid *g*_{
u
} (*x*, *y*) from other grids. *T*_{
u
} is the running time of a round. The following Lemma 2 gives the allocated operating time of a random grid *g*_{
u
} (*x*, *y*):

Lemma 2: For ∀*g*_{
u
} (*x*, *y*), the allocated operating time is \frac{\left\{{n}_{max-f}{t}_{\mathsf{\text{intra}}}+\left[{n}_{t}\left(x,y\right)+{n}_{r}\left(x,y\right)\right]{t}_{\mathsf{\text{inter}}}\right\}{T}_{u}}{{n}_{max-f}{t}_{\mathsf{\text{intra}}}+{\sum}_{{g}_{u}\left(x,y\right)\in {C}_{u}}\left[{n}_{t}\left(x,y\right)+{n}_{r}\left(x,y\right)\right]{t}_{\mathsf{\text{inter}}}}.

Proof: According to the data collection process, it is firstly to complete the data transfer and fusion of intra-grid by distributed method. Hence, each grid is allocated with the same operating time for intra-grid, which can be calculated as

{T}_{\mathsf{\text{intra}}}={t}_{\mathsf{\text{intra}}}\cdot {n}_{max-f}.

(24)

Then, the time of data transfer and fusion process between grids can be calculated as

{T}_{\mathsf{\text{inter}}}=\sum _{{g}_{u}\left(x,y\right)\in {C}_{u}}\left[{n}_{t}\left(x,y\right)+{n}_{r}\left(x,y\right)\right]{t}_{\mathsf{\text{inter}}}.

(25)

Hence, the allocated operation time of each grid is T\left(x,y\right)={T}_{u}\left[{T}_{\mathsf{\text{inter}}}\left(x,y\right)+{T}_{\mathsf{\text{intra}}}\left(x,y\right)\right]\u2215{T}_{\mathsf{\text{total}}}=\frac{\left\{{n}_{max\mathsf{\text{-}}f}{t}_{\mathsf{\text{intra}}}+\left[{n}_{t}\left(x,y\right)+{n}_{r}\left(x,y\right)\right]{t}_{\mathsf{\text{inter}}}\right\}{T}_{u}}{{n}_{max\mathsf{\text{-}}f}{t}_{\mathsf{\text{intra}}}+{\sum}_{{g}_{u}\left(x,y\right)\in {C}_{u}}\left[{n}_{t}\left(x,y\right)+{n}_{r}\left(x,y\right)\right]{t}_{\mathsf{\text{inter}}}}.

Hence, Lemma 2 is proved.

Lemma 2 shows that the allocated time of grid is determined by the task amount undertaken by its nodes, where the longer time will be allocated because of more tasks.