In this section, an approximate algorithm is proposed to minimize the service cost of the UAVs. In the following, the main idea of the approximate algorithm is first presented, and then the specific details of the algorithm are shown. Finally, the approximation ratio of the proposed algorithm is analyzed.
  3.2. The Detail of the Algorithm
The first step of the algorithm, i.e., the construction process of the auxiliary graph 
, is described below. Given the network 
, the algorithm constructs a new auxiliary graph 
 with only edge weights from the graph 
G, where 
, where
        
 is the energy consumption rate of the UAVs while hovering, 
 and 
 are the times that the UAV needs to hover in order to collect data from 
 and 
, respectively, 
 is the energy consumption rate of the UAVs while flying, and 
 is the flying time of the UAVs from 
 to 
.
Lemma 1. The optimal values of the UAV service cost minimization problem in G and  are equal.
 Proof.   Assume that 
 is the optimal value in 
G, and 
 data collection plans 
, 
, 
…, 
 form an optimal solution to the problem in 
G, where
          
Let 
, where 
 and 
 is the number of nodes in tour 
. By the definition of the weight 
 of 
, we have
          
Similarly, let 
 data collection plans 
, 
, 
…, 
 form an optimal solution to the problem in graph 
. Also, let 
 be the optimal value in 
. Then, we have
          
Assume that 
, where 
 and 
 is the number of nodes in tour 
. Following the definition of the weight 
 of 
, we have
          
In the following, we show that  and . Then, .
We first show that 
. Recall that the 
 data collection plans 
, 
, 
…, 
 form an optimal solution to the problem in 
G. For each tour 
 contained in the above 
 data collection plans, we show that the weights of 
 in graphs 
G and 
 are equal, i.e., 
, since
          
Then, we have
          
          as the data collection plans 
, 
, 
…, 
 form a feasible solution to the problem in 
.
Similarly, we have
          
          as the data collection plans 
, 
, 
…, 
 also form a feasible solution to the problem in 
G. Following Equations (
11) and (
12), we have
          
The lemma then follows.    □
 The second step of the approximation algorithm, i.e., the grouping process of the set V of PoIs, is presented as follows. Firstly, the PoIs in V are sorted according to their data update deadlines. Let , , …,  be the data update deadlines of , , …, , respectively, where . Denote , , …,  as the data collection delays of , , …, , respectively, where  when . Then, we construct  disjoint time ranges , , …, , …, , where . By the definition of the data update deadline of each PoI in set V, the data update deadline of any PoI  must be within the range , i.e., . Since the smallest value in the above  time range is , and the value , the data update deadline  for each PoI  must be in the above  time ranges. If the data update deadline  of  is in a certain time range , i.e., , then  is classified into the subset  of V. And let  be the data collection delay of . From the above process, the set V can be partitioned into  subsets , , …, , where . From the definition of the subsets, we have that the data collection delays of the PoIs in each subset are the same, i.e., the data collection delays of the PoIs in , , …, , …,  are , , …, , …, , respectively.
From the definition of the data collection delay of each PoI 
 in set 
V, we have that the data collection delay 
 of 
 is no less than half of its data update deadline 
, since
        
And the data collection delay 
 must not be greater than its data update deadline 
 because
        
From the definition of the data collection delay of each PoI, it can be seen that for any two PoIs  and  with different data collection delays, if , then the data collection delay  of  must be an integer multiple of the data collection delay  of . Among all the PoIs in the set V, PoI  has the largest data collection delay . Since the monitoring period of the network is T, for convenience, set T to be an integer multiple of the maximum data collection delay  and let , where m is a positive integer.
In the third step of the algorithm, we first find a series of data collection plans during the maximum data collection delay  among PoIs. As the length of period T is  times the length of period , then we simply repeat the data collection plans during   times to construct the data collection plans during the monitoring period T.
In the following, we describe how to construct the data collection plans during . As mentioned that the set V is partitioned into  sub-sets , , …, , where the data collection delay of each PoI in  is ,  and . Firstly, the algorithm divides , which is equal to , into  time slices of the same length, each of which is equal to . Then, it orders the time slices sequentially and determines the set of PoIs to be included in each round of data collection plans based on time slices. Since the PoIs in the sub-set  have a data collection delay , which means that the PoIs in  have to be included in the data collection plan for each time slice, whereas the PoIs in the sub-set  are only included in the data plan for the even-numbered time slice, the PoIs in the sub-set  are only included in the data plan for the time slice whose serial number is divisible by , …, the PoIs in the sub-set  are only included in the data plan for the time slice whose serial number is divisible by , …, and the PoIs in the sub-set  are only included in the data plan for one time slice. Thus, by the algorithm, the data collection plans during the  time slices are scheduled as follows:
(1) In the first time slice , dispatch the UAVs to collect data from the PoIs in . Denote the set of flying tours of the UAVs as ;
(2) In the second time slice , dispatch the UAVs to collect data from the PoIs in . And the set of flying tours of the UAVs is noted as ;
(3) In the third time slice , dispatch the UAVs to collect data from the PoIs in . And the set of flying tours of the UAVs is noted as ;
(4) In the fourth time slice , the UAVs are scheduled to collect data from the PoIs in . And the set of the flying tours of the UAVs is noted as ;
⋮
(j) In the j-th time slice , dispatch the UAVs to collect data from the PoIs in . And the set of flying tours of the UAVs is noted as , where  and ;
⋮
() In the th time slice , dispatch the UAVs to collect data from the PoIs in . And the set of flying tours of the UAVs is noted as .
Figure 2 shows the data collection plans during the 
 time slices.
 As mentioned above, we construct 
 data collection plans during the data collection delay 
, each of which involves a time slice. In the 
j-th 
 time slice, 
 is the set of 
K UAV flying tours in the data collection plan during that time slice. The set 
 of flying tours, where 
K UAVs collect all the data of PoIs in subset 
, can be obtained by invoking the algorithm for the vehicle routing problem with the objective of minimizing the total cost [
19] in graph 
. Obviously, the graph 
 is a subgraph of the graph 
.
The PoIs in  are included in the data collection plans for all of these  time slices. The PoIs in  are included in the data collection plans for only  time slices. The PoIs in  are included in the data collection plans for only  time slices.
The PoIs in  are included in the data collection plan for only one time slice. To summarize, only  time slices contain the PoIs in subset , where .
Then, during period , we construct  data collection plans , , …, , , where  denotes that in the j-th time slice  (i.e., time period ), K UAVs are dispatched to collect the data of PoIs in  following the flying tour set , where , and .
Recall that the length of the period T is  times the length of period . Finally, we simply repeat the data collection sub-plans within the period  to obtain a series of data collection sub-plans within the period T as follows.
(1) During time slice  (i.e., time period ), there are  data collection plans: , , …, , .
(2) During time slice  (i.e., time period ), there are  data collection plans: , , …, , .
⋮
() During time slice  (i.e., time period ), there are  data collection plans: , , …, , .
As shown in 
Figure 3, there are 
 data collection plans during 
.
The algorithm for the UAV service cost minimization problem is presented in Algorithm 1 as follows.
        
| Algorithm 1: Algorithm for the UAV service cost minimization problem (minCost) | 
Require: A network , the data collection time  of each PoI  in V, the maximum data collection deadline  of , and the monitoring period T. Ensure: A series of data collection plans  in period T. 
 - 1:
 Construct an auxiliary graph  from G, where ; - 2:
 Sort the n PoIs  in V by their maximum data collection deadlines in non-decreasing order, i.e., , where ; - 3:
 For each PoI , let ; - 4:
 Divide the set V into p subsets , , ⋯, , where PoI  is contained in  if , , and . By the definition of each set , the PoIs in  have the same data collection delay ; - 5:
 for q←1 to p do - 6:
  Obtain a subgraph  of the graph ; - 7:
  For the subgraph  , construct a set   of  K flying tours by invoking the algorithm for the vehicle routing problem with the objective of minimizing the total cost [ 19]; - 8:
 end for - 9:
 ; - 10:
 for j←1 to 2p do - 11:
  Let , where q is the largest integer in range  so that ; - 12:
  ; - 13:
 end for - 14:
 for m′←2 to ⌊T/T′n⌋ do - 15:
  for j←1 to 2p do - 16:
   return. - 17:
  end for - 18:
 end for - 19:
 return  
  | 
Figure 4 shows the algorithm flowchart of Algorithm 1.
   3.3. Algorithm Analysis
The main focus in this subsection is to prove the approximation ratio as well as the time complexity of the proposed algorithm.
In the following, it firstly shows that the constructed auxiliary graph 
 is a metric graph since the cited algorithm for the vehicle routing problem with the objective of minimizing the total cost [
19] can only be used in a metric graph.
Lemma 2. The constructed auxiliary graph  is a metric graph.
 Proof.   In the auxiliary graph 
, there is an edge between any two nodes in the set 
. In the following, it will be shown that the weight of any edge in the graph 
 satisfy the Triangular Inequality Theorem. For any three nodes 
, 
, 
 in the graph, there are
          
This proves that the auxiliary graph 
 is a metric graph.    □
 Lemma 3. Given a set V of PoIs and a data update deadline  for each PoI  in V, divide the set V into  sub-sets of PoIs , , …, , where the PoIs in each set  is assigned a same data collection delay . Let  be the optimal value of the UAV service cost minimization problem in the graph  (i.e., the graph G). Then,  is also the optimal value of the UAV service cost minimization problem in the graph  (i.e., the graph ). In the sub-graph  of the graph , let  be an optimal solution to the vehicle routing problem with the objective of minimizing the total cost [19]. Then, there is , where ,  and .  Proof.   In order to prove , some intermediate variables are introduced to aid the proof. Here, we first divide the monitoring period T of the entire network, i.e., , into  time slices on average, where the length of each time slice is . The monitoring period T is then divided into , , …, , …, . And the range of the j-th () time slice is .
Suppose that the optimal solution to the UAV service cost minimization problem in graph  is a composition of l optimal data collection plans starting from the moments , , …, , respectively, which is denoted as , , …, , where , , and . Recall that  is the optimal value of the UAV service cost minimization problem in graph , i.e., , where K is the number of UAVs. According to  time slices , , …, , …, , and the start time  in each optimal data collection plan  in the optimal solution, we divide the l optimal data collection plans into  disjoint groups. The specific division rule is that if the start time  of the s-th optimal data collection plan  is in the j-th time slice, i.e., , then  is classified into the j-th group, where  and . Let  be the the j-th group of the optimal data collection plans and  be the consumed energy of the UAVs in the j-th group, i.e., .
In order to prove that , we later prove the following two points for the  time slices of length :
- (i)
 There is at least one time slice j such that the UAV consumed energy  in the j-th optimal data collection plan group  partitioned in that time slice is not greater than  percent of the optimal solution , i.e., .
- (ii)
 Using the j-th group  of optimal data collection plans corresponding to the j-th time slice, we can construct a feasible solution  to the vehicle routing problem with the objective of minimizing the total cost in graph , where the consumed energy  is not greater than the consumed energy , i.e., .
Since  is an optimal solution to the vehicle routing problem with the objective of minimizing the total cost in the graph , and  is a feasible solution to the same problem in the same graph, thus there is . If the conclusions in (i) and (ii) above hold, it is obvious that .
First, the proof of (i) is given in the following, using the reduction to absurdity. In the 
 time slices 
, 
, 
…, 
, 
…, 
, we first assumed that there does not exist a time slice 
 of length 
 such that the consumed energy of the UAVs in that time slice is not greater than 
 percent of the optimal solution 
. Under the assumption, we have that the UAV consumed energy in all time slices of length 
 is greater than 
 percent of the optimal value 
. Thus, we have that the total UAV consumed energy in the 
 time slices is equal to 
. But, according to the definition of 
, there is 
, which contradicts the conclusion obtained above. Therefore, the assumption is not valid. And among the 
 data collection plans, there must exist a certain group 
 of optimal data collection plans such that the UAV consumed energy 
 in that group is no more than 
 percent of the optimal value 
, i.e.,
          
Using the j-th group of data collection plan  corresponding to the j-th time slice, we can construct a feasible solution  to the vehicle routing problem with the objective of minimizing the total cost in graph , where the consumed energy  is not greater than the consumed energy , i.e., .
Then, we prove (ii), the UAV consumed energy  in the j-th group  of optimal data collection plans is not less than the UAV consumed energy  of a feasible solution  for the vehicle routing problem with the objective of minimizing the total cost in graph . On the basis of the j-th group  of optimal data collection plans, we construct a feasible solution  for the vehicle routing problem with the objective of minimizing the total cost in graph  and such that the UAV consumed energy of  is not greater than the UAV consumed energy  in the j-th group  of optimal data collection plans.
For all optimal flying tours contained in the set , since all tours connect to the base station , then these tours form a connected graph. In this connected graph, the degree of the base station  is  and the degrees of other PoIs are 2; i.e., the degrees of all nodes in the connected graph are even numbers. Thus, these tours form a Euler graph. Since there must be a Euler circuit in a Euler graph, all the flying tours contained in the set  are also a Euler circuit, which is denoted as , and .
Here, we first show that in the 
j-th data collection plan set 
 corresponding to the 
j-th time slice, all PoIs in 
 are visited at least once. Suppose that there is a PoI 
 in 
 which is not involved in the data collection plan set 
. Since 
, combined with Ineq. (
14), for the data update duration 
, we have 
. Since we suppose that 
 is not involved in the data collection plan set 
, its data update duration 
 must be greater than the length of the time slice 
, i.e., 
. Clearly, the description in the above sentence is contradictory, so the assumption is not valid and 
 must have been visited once in some of the data collection plan set 
.
As we show in the previous paragraph, in the 
j-th set 
 of optimal data collection plans, all PoIs in 
 are visited at least once. By removing recurring edges and the PoIs that are not contained in 
 from the Euler circuit 
, we obtain a tour 
 that contains only the PoIs in 
 and the base station 
. Since the weights of the edges all follow the Triangular Inequality Theorem, we have
          
As it has been proved in the j-th data collection plan set  corresponding to the j-th time slice, all PoIs in  are visited at least once. Then, we have . Since the degree of the base station  in the tour  is , the tour  can be partitioned into K sub-tour , , …, and  that each sub-tour contains . Let  be the set of tours , , …, , i.e., . Obviously,  is a feasible solution to the vehicle routing problem with the objective of minimizing the total cost in graph .
According to Ineq. (
18), we have 
. (ii) is proved.
In the following,  will be proved on the basis of the already proved (i) and (ii).
As 
 is an optimal solution to the vehicle routing problem with the objective of minimizing the total cost in the graph 
, we have
          
Combining Ineq. (
17), Ineq. (
18), and Ineq. (
19), we have:
          
In summary, for the optimal solution  for the vehicle routing problem with the objective of minimizing the total cost in the graph , we obtain that , where  is the UAV consumed energy in the optimal solution to the UAV service cost minimization problem, , and .    □
 Lemma 4. Given a set V of PoIs and a base stations , the Algorithm 1 deduces a solution with an approximation ratio of , where ,  and  are the maximum and minimum data update deadlines, respectively, for the PoIs in the set V.
 Proof.   In the following, we show that the approximation ratio of the Algorithm 1 is .
Recall that the  data collection plans obtained in Algorithm 1 are:
, , …, ,  during time slice ;
,,…, , during time slice ;
…;
,,…, , during time slice ;
Thus, the total UAV consumed energy in the solution obtained by Algorithm 1 over the monitoring period 
T is:
          
Let 
 be the set of data collection plans during the period 
. From the construction process of 
 in the Algorithm 1, it can be seen that there are only 
 data collection plans in 
, and it only contains the PoIs in set 
, where 
. For the set 
, i.e., the set 
, there is only one data collection plan in 
 that contains all PoIs in 
. Denote 
 as the set of flying tours which are obtained as an approximate solution to the vehicle routing problem with the objective of minimizing the total cost in the subgraph 
, i.e., 
, by invoking [
19]. Denote the consumed energy of 
 as 
. Combined with Ineq. (
21), there is:
          
In the graph 
, the tour set 
 is obtained via the algorithm with an approximation ratio of 2 for the vehicle routing problem with the objective of minimizing the total cost [
19]. Denote 
 as the UAV consumed energy of flying tour set 
. In the graph 
, let 
 be an optimal solution to the vehicle routing problem with the objective of minimizing the total cost [
19]. And denote 
 as the UAV consumed energy of tours in set 
. According to [
19], we have 
, where 
. Combing with Theorem 3 and Ineq. (
20), we can obtain
          
As proved above, the approximation ratio of the Algorithm 1 is , where , and  and  are the maximum and minimum data update deadlines of PoIs in V, respectively.
The time complexity of Algorithm 1 is analyzed as follows. In the first step of the algorithm, the time complexity of the construction of the auxiliary graph 
 is 
, where 
n is the number of PoIs in the set 
V. In the second step, the time complexity of the grouping operation of PoIs in 
V is 
. In the third step, Algorithm 1 firstly finds the data collection plans within the maximum data collection delay 
, and then repeats the data collection plans within 
 to obtain the data collection plans within the network monitoring period 
T. The algorithm finds 
p sets of tours in subgraphs 
, 
, 
…, and 
, respectively, through invoking the algorithm [
19] with a time complexity of 
. And the time complexity of the third step is 
. In summary, the time complexity of the Algorithm 1 is 
, where 
, 
 and 
 are the maximum and minimum data update deadlines, respectively, and 
n is the number of PoIs in 
V.    □