Skip to main content
Sensors (Basel, Switzerland) logoLink to Sensors (Basel, Switzerland)
. 2019 May 29;19(11):2456. doi: 10.3390/s19112456

Time-Efficient Allocation Mechanisms for Crowdsensing Tasks with Precedence Constraints

Xiaocan Wu 1, Yu-E Sun 2,3,*, He Huang 1,3, Yang Du 3, Danlei Huang 1
PMCID: PMC6603554  PMID: 31146376

Abstract

Crowdsensing has emerged as an efficient and inexpensive way to perform specialized tasks by leveraging external crowds. In some crowdsensing systems, different tasks may have different requirements, and there may be precedence constraints among them, such as the Unmanned Aerial Vehicle (UAV) crowdsensing systems. Moreover, minimizing the total execution time is a regular target for finishing the crowdsensing tasks with precedence constraints. As far as we know, only a few existing studies consider the precedence constraints among crowdsensing tasks, and none of them can minimize the total execution time simultaneously. To tackle this challenge, an efficient allocation mechanism for tasks with precedence constraints is first proposed, which can minimize the total execution time. Then, a case study is given to show how to fit our mechanism in the UAV crowdsensing system. Finally, the simulation results show that the proposed mechanisms have good approximate optimal ratios under different parameter settings and are efficient for the UAV crowdsensing system as well.

Keywords: crowdsensing, task allocation, execution time minimization, precedence constraint, UAV

1. Introduction

With the emergence of various wireless technologies (4/5G, DSRC, and etc.), ubiquitous terminal equipment, such as smartphones, vehicles and UAVs, can collect real-time data from the environment and transmit the data to the IoT central server effectively [1,2,3]. As an important application of IoT, crowdsensing can leverage the power of large crowds to complete the complicated sensing tasks by using their smartphones or other mobile devices [4,5]. Compared with the conventional data collection methods, crowdsensing provides a low-cost and time-efficient solution for large-scale sensing tasks. With the dramatic proliferation of mobile devices, a set of crowdsensing systems have been implemented in recent year [6,7,8,9,10,11,12,13,14,15,16,17]. For instance, Kumar Rana et al. implemented an Ear-Phone system for monitoring the environmental noise pollution in urban areas through crowdsensing data collection [18].

Task allocation mechanism is crucial for crowdsensing, which directly decides the performance of the crowdsensing system. A variety of task allocation mechanisms have been proposed for crowdsensing systems [19,20,21,22,23,24,25,26,27,28,29,30,31]. For example, Reddy et al. proposed to maximize the spatial coverage with limited resource [19]. Jaimes et al. designed a budget-constrained incentive mechanism for task allocation [20]. He et al. took travel time into consideration and proposed to maximize the spatial coverage [21]. Considering that crowdsensing tasks may have various requirements (such as the type of data, sensing periods, etc.) and workers have different skills and reliability levels. Li et al. proposed to dynamically select appropriate workers for given tasks while keeping the constraints satisfied [22], Jin et al. incorporated quality of data to design the incentive mechanisms for MCS systems [25]. Iijima et al. considered the individual preference in distributed environments and proposed an adaptive task allocation mechanism that maximizes the social utility [32].

However, all these studies assume that the tasks in the crowdsensing system can be performed simultaneously and ignore that the sensing tasks may have precedence constraints in some applications. A crowdsensing task with precedence constraints cannot be executed before its pre-order tasks are finished. Actually, many crowdsensing applications have multiple steps, which will cause the precedence constraints of sensing tasks. UAV crowdsensing system is a typical system with precedence constraints, where exist mainly six types of tasks: WASD (Wide Area Search and Destroy), ISR (Intelligence Surveillance and Reconnaissance), CAS (Close Air Support), SEAD (Suppression of Enemy Air Defense), AR (aerial refueling), and PS (precision strike) [33,34]. In this system, there exists an execution sequence among tasks. Another example is the MCS based traffic congestion monitoring system, which monitors the traffic condition through collecting the sensing data of vehicles on different major roads. When a traffic jam occurs, the system will publish tasks to find out the reason that causes this congestion, to monitor the progress of the events that cause traffic congestion or to verify the effectiveness of the traffic grooming strategy. Obviously, these tasks have precedence constraints, i.e., the system needs to find out the congestion reason before monitoring the progress of the events.

Designing an efficient task allocation mechanism for tasks with precedence constraints meets more challenge than the existing ones. First, time efficiency, i.e., the total execution time of all the tasks, is usually important for these crowdsensing systems. Generally, task requesters want the total execution time as short as possible, such as in the UAV system [35,36,37,38]. However, different tasks may have different requirements for users, and each user can only meet the requirements of some tasks. The platform can only allocate tasks to the user who meets their requirements. Since all the constraints are taken into account, it is a hard job to allocate the tasks to users optimally, especially for the case users arrive online. As far as we know, only a few studies [39,40,41,42,43,44] have considered the precedence constraints among different tasks. For example, Schwarzrock et al. proposed a task allocation mechanism for UAV system, which can increase the amount of performed tasks [45]. However, none of these studies can minimize the total execution time of all the tasks at the same time.

To address this challenge, the crowdsensing task allocation problem with precedence constraints is studied in this paper, and an efficient allocation mechanism with the goal of minimizing the total execution time of tasks is designed. The NP-hardness of the studied problem can be proved by reducing the problem studied in this work to a classic NP-hard problem of multiprocessor scheduling problem (the details are as shown in Section 2.3), which means the studied problem does not exist a polynomial-time algorithm to get the optimal solution. Therefore, a near-optimal allocation mechanism is proposed to solve it. The designed mechanism includes four steps, which are task level division, final task set construction, allocation priority sequence construction, and task allocation. In order to minimize the total execution time of tasks, the mechanism first divides the level of tasks based on their precedence constraints and computes expected finish time of each task by assuming that there are enough users for all the tasks. Since the total execution time of the tasks is bounded by the critical task tc with the maximum expected finish time, the platform should first allocate a task to a user which can minimize the expected finish time of tc. Based on this principle, the algorithm constructs an allocation priority sequence for tasks. When a user arrives, it greedily chooses the task with the highest priority in the allocation priority sequence to allocate until all the tasks have been finished. Then, a case study is given to show how to fit the proposed mechanism in the UAV systems by considering the features of the UAV system. Finally, the simulation results show that the proposed mechanisms are efficient for crowdsensing systems with task precedence constraints. The main contributions of this work are listed as follows:

  • An efficient task allocation algorithm for tasks with precedence constraints is designed. As far as we know, this is the first work which considers the precedence constraints of tasks and the proposed algorithm can minimize the total execution time of all the tasks.

  • A case study is given to show how to fit the proposed mechanism in the UAV system, by considering the features of UAV task allocation problem.

  • Extensive simulations are conducted to evaluate the performance of the proposed algorithm, and the results show that the proposed algorithm has good approximate optimal ratios under different parameter settings.

The remainder of the paper is organized as follows. The description of the system model is presented in Section 2. Then, the details of the proposed approximation algorithm are given in Section 3. Next, a case study is given to show how to fit the proposed mechanism in the UAV system in Section 4. Afterward, a variety of simulations are conducted to evaluate the mechanism in Section 5. Lastly, the conclusion of the whole work is presented in Section 6.

2. Preliminaries

In this section, the system model is first introduced in Section 2.1, and then, the formal formulation of the task allocation problem is in Section 2.2. After that, the NP-hardness of the studied problem is proved in Section 2.3.

2.1. System Model

The crowdsensing system studied in this work is shown in Figure 1, which including a crowdsensing platform, a task requester and a set of mobile device users U={u1,u2,,un}. At the beginning of the task allocation, the requester will submit a set of tasks, which is denoted as T={t1,t2,t3,,tm}, to the crowdsensing platform. Each task tjT can be presented as tj={Cj,hj,lj,Dj}, where Cj denotes the conditional task set of tj, hj is the expected performing time of task tj, lj is the location of task tj, Dj is the description of tj. Due to the precedence constraints among tasks, only when all the tasks in the conditional task set Cj have been finished, can the task tj be assigned to a user to perform. However, if the conditional task set Cj=ϕ (i.e., the task tj has no conditional task), the task tj can be allocated by the platform at any time.

Figure 1.

Figure 1

The structure of the crowdsensing system.

After receiving the task request from the requester, the platform will publish all the description of tasks to the users. The users arrive online, and each available user ui will submit a set of interested tasks Ti to the platform. Based on the requirement of tasks and users, the platform will allocate the tasks to users one by one. Assume that each task only needs to be performed by one user, and the platform will allocate no more than one task to each user at each round. After finishing the allocated task, the platform will add the still available users to the waiting list, and treat it as a new arrival user. Use ui={Ti,PHi} to present user ui, where PHi is the expected execution time set of ui, and each phi,jPHi is the expected execution time of ui for performing task tj.

In the UAV crowdsensing system, the task requester is the carrier, and each user is a UAV. The flight duration from the location of one task to another for different UAVs may be varied, which is an essential factor for the expected execution time of UAVs. Consider a UAV ui has finished task tj at the location lj and is assigned to perform next task tk at the location lk. The travel duration of ui can be presented as tdi,k=TD(ui,lj,lk), where TD(ui,lj,lk) is a function to calculate how long it generally takes for ui to fly from lj to lk. Furthermore, if a UAV ui is going to finish its first task tk, the travel duration starts from its initial location li and it is denoted as tdi,k=TD(ui,ϕ,lk)=TD(ui,li,lk). Notice that hk is the expected performing time of task tk. Then, phi,k is mainly decided by tdi,k and hk in the UAV system.

2.2. Problem Formulation

The goal of this work is to minimize the total execution time of the tasks with the precedence constraints.

For facilitate reading, we summarize some symbols that are used in this paper in Table 1.

Table 1.

The descriptions of notations used in this paper.

Notation Description
U a set of mobile device users
ui a mobile device user i
Ti interested tasks submitted by user i
PHi the expected execution time set of user i
phi,j the expected execution time of user i for performing task j
T the task set submitted by requester
tj a task j
Cj the conditional task set of task j
hj the expected performing time of task j
lj the location of task j
Dj the description of task j
tdi,k the travel duration of user i to the location of task k
yj binary variable to represent whether task j is finished
aj binary variable to represent if task j is permitted to be allocated
xi,j binary variable to represent whether task j is allocated to user i
sj the earliest time that the platform can allocate the task j to a user
Lj the level of task j
F the final task set
fj the order of task j in allocation priority sequence
hje the expected finishing time of task j
cjt the recorded task with maximum expected finishing time in Cj

Let yj={0,1} represent whether the task tj is finished. If the task tj is a finished task, yj=1, otherwise, yj=0. Use aj={0,1} to denote if the task tj is permitted to be allocated, and it has aj=tkCjyk. If task tj satisfies the constraint aj=1, tj can be allocated to a user. Further use xi,j={0,1} to indicate whether the platform allocates task tj to user ui. If tj is assigned to the user ui, xi,j=1, otherwise, xi,j=0. Suppose sj is the expected beginning time of task tj, (i.e., the earliest time that the platform can allocate task tj to a user). Obviously, each sj should satisfy that sjmaxtkCj(sk+uiUphi,kxi,k). Define the total time that the users finish the tasks in the task set as the execution time of a task set. Then, the goal of this work is to minimize the execution time of the task set T.

Definition 1 (The Studied Task Allocation Problem(STAP)).

The studied crowdsensing task allocation problem can be defined as follows:

minmaxtjT(sj+phi,jxi,j)s.t.sjmaxtkCj(sk+uiUphi,kxi,k)

The first constraint shows that the studied allocation mechanism should satisfy the precedence constraints of tasks. Therefore, tj can be performed only when all the tasks in its conditional task set have been finished.

2.3. Analysis of the NP-Hardness

In the following, it will prove that the studied task allocation problem can be reduced to the multiprocessor scheduling problem, which is a well-known NP-hard problem [46]. The description of the multiprocessor scheduling problem is as follows: given a set of jobs and m processors, the goal of the multiprocessor scheduling problem is to find the minimum possible time required to schedule all jobs in the job set on m processors such that there is none overlap, where each job has a fixed processing time.

Theorem 1.

The studied task allocation problem (STAP) is NP-hard.

Proof. 

Consider a simple case of the studied problem, where there is no precedence constraint among tasks, and each user is interested in all the tasks. Then, the task set in this problem can be viewed as the job set in the multiprocessor scheduling problem, and the users in the studied problem can be viewed as the processors in the multiprocessor scheduling problem. The performing time of tasks in this problem is equal to the processing time of jobs in the multiprocessor scheduling problem. Then, the goal of the problem is equivalent to find the minimum possible time required to schedule all jobs on the processors such that there is none overlap. As is known to all, the multiprocessor scheduling problem is NP-hard. Therefore, the problem studied in this work is also NP-hard, which finished the proof. □

3. Algorithm Design

It has been proved that the studied task allocation problem (STAP) is NP-hard, which means an approximation mechanism with polynomial-time is demanded to solve it. The proposed mechanism includes four steps, which are task level division, final task set construction, allocation priority sequence construction, and task allocation. In the first step, the levels of tasks are divided based on their conditional task sets. Define a task that is not in any conditional task set of other tasks as a final task. The total execution time of all the tasks is determined by the finishing time of final tasks. Thus, the second step of the mechanism is the construction of the final task set. Next, the mechanism achieves its design goal by sorting the tasks in descending order based on their expected finishing time. Finally, the tasks are allocated to users according to the allocation priority sequence constructed in the third step.

3.1. Task Level Division

The level in the algorithm is used to denote the precedence constraints among tasks. In the studied model, tasks can be allocated to users only when all the tasks in their conditional task set have been finished. Thus, the level of all the tasks in Cj should be less than the level of tj. Symbol Lj is used to denote the level of tj. Obviously, each task tj with Cj=ϕ is in the lowest level ( i.e., Lj=1 ). The details of how to divide the level of tasks are as shown in Algorithm 1.

Algorithm 1 task level division
Require:
  the task set T
Ensure:
  L={Lj}tjT
  • 1:

    Set T=T;

  • 2:

    for each tj in T do

  • 3:

     Set Cj=Cj;

  • 4:

    Set k=1;

  • 5:

    whileTϕdo

  • 6:

    for each task tjT do

  • 7:

      if Cj=ϕ then

  • 8:

       Set Lj=k;

  • 9:

    for each task tjT do

  • 10:

      for each task tqCj do

  • 11:

       if Lq=k then

  • 12:

        Delete tq from set Cj;

  • 13:

      if Lj=k then

  • 14:

       Delete tj from set T;

  • 15:

    k++;

  • 16:

    returnL={Lj}tjT;

In Algorithm 1, it first makes a copy for each conditional task set Cj, which is denoted as Cj. Initially the current task level k=1. The task level division algorithm runs in an iterative way. In each iteration, it scans all the tasks in temporary task set T. When tj is scanned, it will check whether the temporary conditional set Cj=ϕ or not. If Cj=ϕ, set the task level of tj equal to k (i.e., set Lj=k). After all the tasks in T have been scanned, it will delete the tasks with level k from the temporary conditional set of other tasks and delete tj from the temporary task set T. Finally, the algorithm sets k=k+1, and starts the next iteration until the task set T=ϕ.

The following instance is given to express the algorithm more clearly. Suppose the task set T={t1,t2,t3,,t6} in Figure 2.

Figure 2.

Figure 2

The instance for Algorithm 1.

According to Algorithm 1, the level of each task in the task set T is gotten. Apparently, tasks are divided into three levels. t1,t2,t3 are in the first level, t4,t5 are in the second level and t6 is in the last level.

3.2. Final Task Set Construction

Definition 2.

Define the tasks that don’t exist in any other tasks’ conditional task set as final tasks. There exists at least one final task tj in T. If tj is a final task, then tjCk stands for all the tkT.

Since the total execution time of the tasks is bounded by final tasks, construction of the final task set is performed before sorting the allocation priority of tasks. In Algorithm 2, all the tasks in T are firstly assumed as final tasks. Then, they are checked one after another. When task tj is checked, it will be deleted from the final task set F if it exists in the conditional task set of at least one task. The details are as shown in Algorithm 2.

Algorithm 2 Final task set construction
Require:
  the task set T
Ensure:
  the final task set F
1: Set F=T;
2: for each task tjF do
3:  for each task tkT do
4:   for each task tqCk do
5:    if tj=tq then
6:     Delete task tj from the final task set F;
7: return the final task set F;

Consider the instance in Section 3.1. There is no conditional task set Ck(k[1,6]) in this example contains task t6. Thus, the constructed final task set F={t6}. Obviously, all the tasks in T should be done when all the final tasks in F have been finished, and it is the feature of the final task.

3.3. Allocation Priority Sequence Construction

The optimization objective is bounded by the final tasks with the maximum expected finishing time. Thus, all the expected finishing time of the final tasks should be computed when tasks are allocated to users. To achieve the designed goal, the algorithm sorts the tasks with their expected finishing time and constructs an allocation priority sequence. In the following, some important definitions are given first.

Definition 3.

Task Sequence: A task sequence is sequence of tasks which satisfies the l-th task in the sequence should be in the conditional task set of the l+1-th task and this sequence ends in a final task.

Since the tasks can only be performed one by one in the task sequence, the expected finishing time of a task sequence is equal to the expected finishing time of the final task in the sequence.

Definition 4.

The Critical Task Sequence: The critical task sequence is defined as the task sequence with maximum expected finishing time.

The allocation priority sequence construction algorithm runs in iterations. In each iteration, the critical task sequence of the task set T has to be found first, then the algorithm puts the task with the lowest level in the critical task sequence into the allocation priority sequence. The details are as shown in Algorithm 3.

Suppose fj is the order of task tj in the allocation priority sequence. In each iteration, the algorithm aims to find a task sequence and its value is greater than any other task sequences. Note that the value of a task sequence is equal to the expected finishing time of the final task in the sequence. To get the expected finishing time of the final tasks, the expected finishing time of the tasks in their conditional task set should be calculated. Thus, Algorithm 3 first computes the expected finishing time of each task in T.

Let hje be the expected finishing time of task tj. Note that the expected execution time of different users for the same task may be different. However, users arrive online in this work. Thus, it hardly to get the expected execution time of tasks before allocating. In order to solve this problem, the mechanism assumes the expected execution time of task tj is hj in this step. Then, it has hje=hj when Lj=1. When Lj2, hje=hj+max{hpe}tpCj. Notice that the algorithm computes the expected finishing time of tasks from low level to high level, and the levels of tasks in Cj are lower than tj. Thus, {hpe}tpCj are known when it computes hje. cjt is used to record the task with maximum expected finishing time among tasks in Cj, which can help to construct the critical task sequence.

After computing the expected finishing time of all the final tasks at the start of the algorithm, the mechanism begins to construct the priority sequence in iterations. As the expected finishing time of all the final tasks is calculated, the task tq with maximum expected finishing time can be found, and construction of the critical task sequence of task tq is available with the help of recorded cjt. Suppose tp is the task with lowest level in the critical task sequence of final task tq, tp is put into the allocation priority sequence by setting fp=l. Then, tp is deleted from task set T. If tp is a final task, tp should also be deleted from the final task set F. Afterward, the algorithm finds tasks that are directly or indirectly related with the deleted tp and computes their expected finishing time. Finally, the next iteration begins until T=ϕ.

Based on the information of tasks in Figure 2, the allocation priority sequence is gotten by continuously finding a new critical task sequence for a changed task set T. Figure 3a is the situation of task set T when the first task in allocation priority sequence has been found, and Figure 3b corresponds to the second task in the sequence. In Figure 3a, the task sequence <t3,t5,t6> is the critical task sequence, then, the task t3 is the first task in allocation priority sequence. In Figure 3b, the task sequence <t2,t4,t6> is the critical task sequence in the changed task set T{t3}, and the task t2 is the second task in the allocation priority sequence. Furthermore, in order to find the third task in the allocation priority sequence, the mechanism ought to find the critical task sequence in the changed task set T{t2,t3}.

Figure 3.

Figure 3

The instance for Algorithm 3.

Algorithm 3 Allocation priority sequence construction
Require:
  the task set T, the final task set F,
  the refresh task sequence R;
Ensure:
  the allocation priority sequence {fj}tjT;
  • 1:

    fork=1 to max{Lj}tjT do

  • 2:

    for each task in T do

  • 3:

      if Lj=k then

  • 4:

       Set cjt is the task with the maximum expected finishing time among all the tasks in Cj.

  • 5:

       Compute the expected finishing time hje;

  • 6:

    Set l=1;

  • 7:

    whileTϕdo

  • 8:

     Find the final task tqF with maximum expected finishing time;

  • 9:

     Construct the critical task sequence of task tq;

  • 10:

     Set fp=l;

  • 11:

     Find the task tp with the lowest level in the critical task sequence of task tq;

  • 12:

     Delete tp from T;

  • 13:

    if tpF then

  • 14:

      Delete tp from F;

  • 15:

     Gather all the rest tasks that have priority relationship with tp in the sequence R;

  • 16:

    for each task tj in R do

  • 17:

      Set cjt is the task with the maximum expected finishing time among all the tasks in Cj.

  • 18:

      Compute the expected finishing time hje;

  • 19:

      Add all the rest tasks that have priority relationship with tj to the back of sequence R;

  • 20:

     Set l=l+1;

3.4. Task Allocation

After constructing the allocation priority sequence, the platform allocates tasks to users according to the order in the constructed allocation priority sequence. The proposed task allocation mechanism runs iteratively. In each iteration, the platform greedily allocates one task to a user, which will minimize the expected total execution time of all tasks. The details are as follows:

Step 1: Sort the tasks in T according to the allocation priority sequence.

Step 2: In each iteration, the task with the highest priority in the sorted task list should be found first, and its conditional task set is ϕ. Assume this task is tj. Next, compute the expected execution time of all users interested in task tj. Then, the user ui who interested in tj with the minimum pti,j can be found. The platform allocates tj to ui in this iteration. After that, the platform deletes ui from the available user set and deletes tj from the task set T. Then, the next iteration begins until the task set T=ϕ. In the case of there is no task can be allocated to users, and all the tasks and users remain in T and W should wait for new arrive users or some of the allocated tasks finished.

Step 3: When an allocated task tj has finished by ui, the platform deletes tj from all the conditional task sets that include tj. If ui is still available, the platform adds ui into the available user set, and views it as a new arrival user. Then, run step 2.

Note that the expected total execution time will be minimized if the tasks are performed in the order of the constructed allocation priority sequence. The proposed allocation mechanism greedily choose the task with the highest priority to allocate in each iteration, which means the mechanism can achieve a near-optimal total execution time.

4. A Case Study: Task Allocation Mechanism for UAV System

This section is to show how to fit the proposed task allocation mechanism in the UAV system.

Consider a Crowdsensing based UAV system, there exists a carrier, a control platform and a group of UAVs embedded with different kinds of sensing devices. At the beginning of each round allocation, the carrier first submits the tasks to the platform. The platform has an available UAV list, and each available UAV submits a set of tasks that it can perform to the platform. Then, the platform runs Algorithms 1 and 2 to compute the level of each task and construct the final task set.

As is introduced in Section 2.1, the expected execution time of a UAV for task tj is mainly decided by the flight duration from the current location to Lj and the expected performing time of tj in the UAV system. Although the flight time of different UAV may be varied, the expected performing time of different UAVs is similar for a fixed task. Therefore, the expected performing time of tj can be assumed to equal to hj for all the UAVs that have ability to perform tj. In the step of constructing the allocation priority sequence, set hje=hj+max{hpe}tpCj. By running Algorithm 3, the platform can get the allocation priority sequence of tasks.

Then, the platform adds the UAVs in a waiting list, and allocates the tasks to them based on the allocation priority sequence. In each iteration of allocation, the platform allocates a task to a user that can minimize the total execution time of all the tasks, i.e., allocates a task with the lowest level in the critical sequence to the user with minimal expected execution time. Based on the proposed mechanism of constructing the allocation priority sequence, the task with the lowest level in the critical sequence is the task with the highest priority in the sequence. Assume tj is this specific task. The expected execution time of a UAV ui for performing tj is phi,j=tdi,j+hj.

When a UAV has finished an allocated task tj, it will be added to the waiting list again. Moreover, the platform will delete tj from all the conditional task sets that include tj. This process goes on, until all the tasks have been finished.

5. Simulation

In this section, the settings of all the parameters are introduced first, and then extensive simulations are conducted to evaluate the proposed mechanisms.

5.1. Simulation Setting

A task is not always allocated immediately once it is available. More in details, when a task is available to be allocated, it might wait some time before being allocated. Furthermore, the total execution time of all the tasks is not likely to equal the theoretically optimal value of the allocation for the task set. Thus, the approximate optimal ratio is related to the performance of the algorithm in simulations.

Definition 5.

The parameter Alg denotes the execution time of task set T under the allocation of an algorithm, and Opt represents the theoretically optimal value of the allocation for the task set T. Then, the approximate optimal ratio: η=AlgOpt.

The setup of the simulation is as follows. In order to show the performance of the proposed algorithm, it varies the number of the released tasks, the number of the involved mobile device users and the level of the tasks set T with the symbol of m, n, l. Besides, m=|T|, n=|U| and l=max{Lj}tjT. The number of total tasks in each level is uniformly distributed in [m/l5,m/l+5]. For any task tj in task set T, it has attributes of expected performing time hj, conditional task set Cj, and its location lj. The size of Cj is always distributed in [1,4] at random. In Figure 4, Figure 5, Figure 6, Figure 7, Figure 8 and Figure 9, the parameter hj appears to follow the uniform distribution in U[20,40]. And in Figure 10 and Figure 11 simulations, the parameter hj can also be U(30,50) uniformly distributed. Each user ui submits a set of tasks Ti that he is interested in performing, and the size of Ti is randomly generated in [4,10] or [8,14] in different experiments. Furthermore, in Figure 4, Figure 5, Figure 8, Figure 9, Figure 10 and Figure 11, the parameter |Ti| always follows U[4,10] uniform distribution. And in Figure 6 and Figure 7 simulations, the parameter |Ti| is also set as U(8,14) uniformly distributed. What’s more, to show that the proposed mechanism is available to be applied to the UAV system, settings about both tasks and users’ location are also made. In Figure 4, Figure 5, Figure 6 and Figure 7, Figure 10 and Figure 11, both the locations of tasks and users are uniformly distributed in U(0,100). And in Figure 8 and Figure 9, the location can also be normally distributed in N(50,3). If a user ui is assigned to finish the task tj, calculate the Euclidean distance of the user and task, and relate it to the travel duration of the user ui for the task tj. After that, the requested performing time of a user ui to perform task tj is determined.

Figure 4.

Figure 4

The approximate optimal ratio of the proposed algorithm vs. different n when m=200,300,400.

Figure 5.

Figure 5

The approximate optimal ratio of the proposed algorithm vs. different l when m=200,300,400.

Figure 6.

Figure 6

The approximate optimal ratio of the proposed algorithm vs. different n when |Ti|U(4,10) or U(8,14).

Figure 7.

Figure 7

The approximate optimal ratio of the proposed algorithm vs. different l when |Ti|U(4,10) or U(8,14).

Figure 8.

Figure 8

The approximate optimal ratio of the proposed algorithm vs. different n when (lj)x,(lj)yU(0,100) or N(50,3).

Figure 9.

Figure 9

The approximate optimal ratio of the proposed algorithm vs. different l when (lj)x,(lj)yU(0,100) or N(50,3).

Figure 10.

Figure 10

The approximate optimal ratio of the proposed algorithm vs. different n when hjU(20,40) or U(30,50).

Figure 11.

Figure 11

The approximate optimal ratio of the proposed algorithm vs. different l when hjU(20,40) or U(30,50).

In each case of <m,n,l>, the simulation generates 2000 instances and takes the average value of them. The average value is the outcome of the case finally. The settings of all cases and the outcomes of simulations are shown in Table 2 and Table 3.

Table 2.

The description of different cases.

Case Description Fixed Parameter
m |Ti| hj (lj)x and (lj)y
A 200 U(4,10) U(20,40) U(0,100) l=6 or n=70
B 300 U(4,10) U(20,40) U(0,100)
C 400 U(4,10) U(20,40) U(0,100)
D 400 U(8,14) U(20,40) U(0,100)
E 300 U(4,10) U(30,50) U(0,100)
F 300 U(4,10) U(20,40) N(50,3)

Table 3.

The approximate optimal ratios under different cases.

Approximate Optimal Ratios
Case Number of Mobile Device Users (n) Number of Levels (l)
50 60 70 80 90 100 110 6 8 10 12 14 16
A 1.413 1.316 1.236 1.209 1.183 1.163 1.117 1.234 1.160 1.133 1.116 1.094 1.084
B 1.679 1.521 1.500 1.387 1.362 1.292 1.234 1.511 1.414 1.332 1.267 1.211 1.165
C 1.999 1.801 1.708 1.610 1.503 1.429 1.357 1.702 1.541 1.431 1.331 1.286 1.252
D 1.802 1.715 1.529 1.455 1.344 1.293 1.249 1.607 1.425 1.293 1.251 1.223 1.204
E 1.743 1.620 1.520 1.453 1.381 1.308 1.246 1.553 1.432 1.352 1.305 1.235 1.201
F 1.586 1.462 1.380 1.351 1.262 1.238 1.172 1.387 1.292 1.217 1.185 1.151 1.127

5.2. Simulation Results

In Figure 4, Figure 6, Figure 8 and Figure 10, the performance of the proposed algorithm is validated by changing the number of released tasks in different parameter settings. Regardless of other parameters’ settings, it is obvious that when the number of involved users increases, the approximate optimal ratio decreases. As the theoretically optimal value of the allocation for the task set T is only in connection with the structure of the task set T, and the theoretically optimal value is fixed no matter how involved users change. When the number of involved users increases, the time of task’s waiting to be allocated is likely to decrease, which would make the execution time of the task set T decrease. Then, the approximate optimal ratio decreases. Therefore, the approximate optimal ratio decreases as the number of involved users increases.

In Figure 5, Figure 7, Figure 9 and Figure 11, the performance of the proposed algorithm is shown by changing the level of the tasks set in different environment setting. Apparently, the approximate optimal ratio will decrease if the levels of the task set increases. It is because more levels of task set make the number of tasks in each level less, the tasks are more likely to be allocated once they are available, and the waiting time of tasks in task set T is likely to decrease, which would make the execution time of the task set T closer to the theoretically optimal value of the allocation for the task set. Thus, the approximate optimal ratio decreases as the level of task set increases.

In Figure 4 and Figure 5, the performance of the algorithm is illustrated by changing the number of released tasks. In both two settings, the number of released tasks m ranges in {200,300,400}. In Figure 4, it changes the value of involved users n from 50 to 110 while the level of task set l is set to be 6. And in Figure 5, it changes the level of the task set l from 6 to 16 while the number of involved users n is set to be 70. Both two simulations show that the approximate optimal ratio increases with the increasing number of released tasks. As the theoretically optimal value of the allocation for the task set T is only in connection with the structure of the task set T, and the theoretically optimal value is fixed no matter how the number of released tasks changes. When the number of released tasks increases, the time of each task waiting to be allocated is likely to increase, and the execution time of the released task set is also to increase, which would increase the execution time of the task set T.

In Figure 6 and Figure 7, the size of involved users’ interested task set Ti is in different range. In these two simulations, the performance of the algorithm is validated by changing the size of user’s submitted task set. Furthermore, the size of user’s submitted task set is uniformly distributed in U(4,10) or U(8,14). In both two settings, the number of released task m is fixed in 400. In Figure 6, the number of involved users n is changed from 50 to 110 while the level of task set l is set to be 6. And in Figure 5, it changes the level of task set l from 6 to 16 while the number of involved users n is set to be 70. Both two simulations show that the approximate optimal ratio decreases with the increasing number of user’s submitted tasks. As the theoretically optimal value is fixed no matter how the number of released tasks changes. When the number of submitted tasks increases, and there exists some users in the available user list, the time of each task’s waiting to be allocated is more likely to decrease, and the execution time of the released task set is also to decrease, which would make the execution time of the task set T decrease.

In Figure 8 and Figure 9, the performance of the algorithm is shown by changing the area of region that the released tasks and involved users locate in. In both two settings, the number of released task m is fixed to 300. In Figure 8, the number of involved users n ranges from 50 to 110 while the level of task set l is set to be 6. And in Figure 9, the level of task set l ranges from 6 to 16 while the number of involved users n is set to be 70. Both two simulations show that the approximate optimal ratio increases with the increasing of the area of regions. It is because when the area of region increases, the performing time of released tasks increases, then the time of each task waiting to be allocated is likely to increase, and the execution time of the released task set is also to increase, which would increase the execution time of the task set T.

In Figure 10 and Figure 11, the performance of the algorithm is illustrated by changing the expected performing time of released tasks. In both two settings, the number of released task m is fixed to 300. In Figure 10, the number of involved users n is changed from 50 to 110 while the level of task set l is set to be 6. And in Figure 11, it changes the level of task set l from 6 to 16 while the value of involved users n is set to be 70. Both two simulations show that the approximate optimal ratio increases with the increasing expected performing time of released tasks. When expected performing time of released tasks increases, the time users have to wait for each task to be allocated may increase, and the execution time of the released task set is also to increase, which would make the execution time of the task set T increase.

6. Conclusions

In this paper, the precedence constraints of tasks are considered, and an efficient task allocation algorithm is designed for crowdsensing systems with the goal of minimizing the total execution time of the tasks. The proposed algorithm first divides tasks into multiple levels and finds all the final tasks. Then, it constructs an allocation priority sequence according to the expected finishing time of tasks, and allocates the tasks to users based on the constructed allocation priority sequence. Finally, a case study is given to show how to fit the designed mechanism in the UAV system. The simulation results verify the efficiency of the designed mechanism.

In future work, the deadlines of tasks and the available time intervals of users will be taken into consideration when designing an efficient task allocation mechanism for tasks with precedence constraints. Moreover, the plans for designing a mobile crowdsensing based traffic congestion monitoring system and exploring real-world experimentation for the proposed task allocation mechanism also deserve to be carried out.

References

Author Contributions

All the authors contributed to various degrees to ensure the quality of this work. Conceptualization, X.W. and Y.S.; Methodology, Y.S. and H.H.; Software, X.W., Y.D. and D.H.; Validation, Y.D. and D.H.; Formal analysis, X.W. and Y.S.; Investigation, Y.D.; Resources, Y.S. and H.H.; Data curation, X.W.; Writing—original draft preparation, X.W.; Writing—review and editing, X.W., Y.S. and H.H.; Visualization, D.H.; Supervision, Y.S.; Project administration, Y.S. and H.H.; Funding acquisition, Y.S. and H.H.

Funding

This research was partially funded by National Natural Science Foundation of China (NSFC) under Grant No. 61572342, No. 61672369, No. 61873177, and Natural Science Foundation of Jiangsu Province under Grant No. BK20161258.

Conflicts of Interest

The authors declare no conflict of interest.

References

  • 1.Qiu T., Chen N., Li K., Atiquzzaman M., Zhao W. How can heterogeneous Internet of Things build our future: A survey. IEEE Commun. Surv. Tutor. 2018;20:2011–2027. doi: 10.1109/COMST.2018.2803740. [DOI] [Google Scholar]
  • 2.Qiu T., Liu X., Li K., Hu Q., Sangaiah A.K., Chen N. Community-aware data propagation with small world feature for internet of vehicles. IEEE Commun. Mag. 2018;56:86–91. doi: 10.1109/MCOM.2018.1700511. [DOI] [Google Scholar]
  • 3.Qiu T., Zheng K., Han M., Chen C.P., Xu M. A data-emergency-aware scheduling scheme for Internet of Things in smart cities. IEEE Trans. Ind. Inform. 2018;14:2042–2051. doi: 10.1109/TII.2017.2763971. [DOI] [Google Scholar]
  • 4.Ganti R.K., Ye F., Lei H. Mobile crowdsensing: Current state and future challenges. IEEE Commun. Mag. 2011;49:32–39. doi: 10.1109/MCOM.2011.6069707. [DOI] [Google Scholar]
  • 5.Liu J., Shen H., Narman H.S., Chung W., Lin Z. A Survey of Mobile Crowdsensing Techniques: A Critical Component for The Internet of Things. ACM Trans. Cyber-Phys. Syst. 2018;2:18. doi: 10.1145/3185504. [DOI] [Google Scholar]
  • 6.Leonardi C., Cappellotto A., Caraviello M., Lepri B., Antonelli F. SecondNose: An Air Quality Mobile Crowdsensing System; Proceedings of the 8th Nordic Conference on Human-Computer Interaction: Fun, Fast, Foundational; Helsinki, Finland. 26–30 October 2014; pp. 1051–1054. [Google Scholar]
  • 7.Xu C., Li S., Zhang Y., Miluzzo E., Chen Y. Crowdsensing the speaker count in the wild: Implications and applications. IEEE Commun. Mag. 2014;52:92–99. doi: 10.1109/MCOM.2014.6917408. [DOI] [Google Scholar]
  • 8.Wan J., Liu J., Shao Z., Vasilakos A., Imran M., Zhou K. Mobile crowd sensing for traffic prediction in internet of vehicles. Sensors. 2016;16:88. doi: 10.3390/s16010088. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Pan B., Zheng Y., Wilkie D., Shahabi C. Crowd Sensing of Traffic Anomalies Based on Human Mobility and Social Media; Proceedings of the ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems; Orlando, FL, USA. 5–8 November 2013; pp. 344–353. [Google Scholar]
  • 10.Foremski P., Gorawski M., Grochla K., Polys K. Energy-Efficient Crowdsensing of Human Mobility and Signal Levels in Cellular Networks. Sensors. 2015;15:22060–22088. doi: 10.3390/s150922060. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Rogstadius J., Vukovic M., Teixeira C.A., Kostakos V., Karapanos E., Laredo J.A. CrisisTracker: Crowdsourced social media curation for disaster awareness. IBM J. Res. Dev. 2013;57:4:1–4:13. doi: 10.1147/JRD.2013.2260692. [DOI] [Google Scholar]
  • 12.Adeel U., Yang S., McCann J.A. Self-Optimizing Citizen-Centric Mobile Urban Sensing Systems; Proceedings of the International Conference on Autonomic Computing; Philadelphia, PA, USA. 18–20 June 2014; Berkeley, CA, USA: USENIX Association; 2014. pp. 161–167. [Google Scholar]
  • 13.Kumar S., Gil S., Katabi D., Rus D. Accurate Indoor Localization with Zero Start-up Cost; Proceedings of the Annual International Conference on Mobile Computing and Networking; Maui, HI, USA. 7–11 September 2014; pp. 483–494. [Google Scholar]
  • 14.Yuan N.J., Zheng Y., Zhang L., Xie X. T-Finder: A Recommender System for Finding Passengers and Vacant Taxis. IEEE Trans. Knowl. Data Eng. 2013;25:2390–2403. doi: 10.1109/TKDE.2012.153. [DOI] [Google Scholar]
  • 15.Zheng Y., Liu F., Hsieh H.P. U-Air: When Urban Air Quality Inference Meets Big Data; Proceedings of the ACM SIGKDD; Chicago, IL, USA. 11–14 August 2013; pp. 1436–1444. [Google Scholar]
  • 16.Zheng Y., Xie X. Learning Travel Recommendations from User-generated GPS Traces. ACM Trans. Intell. Syst. Technol. 2011;2:2:1–2:29. doi: 10.1145/1889681.1889683. [DOI] [Google Scholar]
  • 17.Du Y., Sun Y.E., Huang H., Huang L., Xu H., Bao Y., Guo H. Bayesian Co-Clustering Truth Discovery for Mobile Crowd Sensing Systems. IEEE Trans. Ind. Inform. 2019 doi: 10.1109/TII.2019.2896287. [DOI] [Google Scholar]
  • 18.Rana R.K., Chou C.T., Kanhere S.S., Bulusu N., Hu W. Ear-phone: An End-to-end Participatory Urban Noise Mapping System; Proceedings of the ACM/IEEE IPSN; Stockholm, Sweden. 12–16 April 2010; pp. 105–116. [Google Scholar]
  • 19.Reddy S., Estrin D., Srivastava M. Pervasive Computing. Springer; Berlin/Heidelberg, Germany: 2010. Recruitment Framework for Participatory Sensing Data Collections; pp. 138–155. [Google Scholar]
  • 20.Jaimes L.G., Vergara-Laurens I., Labrador M.A. A location-based incentive mechanism for participatory sensing systems with budget constraints; Proceedings of the IEEE PerCom; Lugano, Switzerland. 19–23 March 2012; pp. 103–108. [Google Scholar]
  • 21.He S., Shin D., Zhang J., Chen J. Toward optimal allocation of location dependent tasks in crowdsensing; Proceedings of the IEEE INFOCOM; Toronto, ON, Canada. 27 April–2 May 2014; pp. 745–753. [Google Scholar]
  • 22.Li H., Li T., Wang Y. Dynamic Participant Recruitment of Mobile Crowd Sensing for Heterogeneous Sensing Tasks; Proceedings of the IEEE MASS; Dallas, TX, USA. 19–22 October 2015; pp. 136–144. [Google Scholar]
  • 23.Boutsis I., Kalogeraki V. On Task Assignment for Real-Time Reliable Crowdsourcing; Proceedings of the IEEE ICDCS; Madrid, Spain. 30 June–3 July 2014; pp. 1–10. [Google Scholar]
  • 24.Goel G., Nikzad A., Singla A. Mechanism design for crowdsourcing markets with heterogeneous tasks; Proceedings of the AAAI HCOMP; Pittsburgh, PA, USA. 2–4 November 2014; pp. 77–86. [Google Scholar]
  • 25.Jin H., Su L., Chen D., Nahrstedt K., Xu J. Quality of Information Aware Incentive Mechanisms for Mobile Crowd Sensing Systems; Proceedings of the ACM MobiHoc; Hangzhou, China. 22–25 June 2015; pp. 167–176. [Google Scholar]
  • 26.Feng Z., Zhu Y., Zhang Q., Ni L.M., Vasilakos A.V. TRAC: Truthful auction for location-aware collaborative sensing in mobile crowdsourcing; Proceedings of the IEEE INFOCOM; Toronto, ON, Canada. 27 April–2 May 2014; pp. 1231–1239. [Google Scholar]
  • 27.Sun J. An incentive scheme based on heterogeneous belief values for crowd sensing in mobile social networks; Proceedings of the IEEE GLOBECOM; Atlanta, GA, USA. 9–13 December 2013; pp. 1717–1722. [Google Scholar]
  • 28.Ahmed A., Yasumoto K., Yamauchi Y., Ito M. Distance and time based node selection for probabilistic coverage in People-Centric Sensing; Proceedings of the IEEE SECON; Salt Lake City, UT, USA. 27–30 June 2011; pp. 134–142. [Google Scholar]
  • 29.Zhou Z., Feng J., Gu B., Ai B., Mumtaz S., Rodriguez J., Guizani M. When Mobile Crowd Sensing Meets UAV: Energy-Efficient Task Assignment and Route Planning. IEEE Trans. Commun. 2018;66:5526–5538. doi: 10.1109/TCOMM.2018.2857461. [DOI] [Google Scholar]
  • 30.Liu Y., Guo B., Wang Y., Wu W., Yu Z., Zhang D. TaskMe: Multi-task Allocation in Mobile Crowd Sensing; Proceedings of the ACM UbiComp; Heidelberg, Germany. 12–16 September 2016; pp. 403–414. [Google Scholar]
  • 31.Gong W., Zhang B., Li C. Location-Based Online Task Scheduling in Mobile Crowdsensing; Proceedings of the IEEE GLOBECOM; Singapore. 4–8 December 2017; pp. 1–6. [Google Scholar]
  • 32.Iijima N., Sugiyama A., Hayano M., Sugawara T. Adaptive Task Allocation Based on Social Utility and Individual Preference in Distributed Environments. Procedia Comput. Sci. 2017;112:91–98. doi: 10.1016/j.procs.2017.08.177. [DOI] [Google Scholar]
  • 33.Eun Y., Bang H. Cooperative task assignment and path planning of multiple UAVs using genetic algorithm; Proceedings of the AIAA Infotech at Aerospace 2007 Conference and Exhibit; Rohnert Park, CA, USA. 7–10 May 2007; p. 2982. [Google Scholar]
  • 34.Boskovic J.D., Prasanth R., Mehra R.K. A multi-layer autonomous intelligent control architecture for unmanned aerial vehicles. J. Aerosp. Comput. Inf. Commun. 2004;1:605–628. doi: 10.2514/1.12823. [DOI] [Google Scholar]
  • 35.Schumacher C., Chandler P., Pachter M., Pachter L. Constrained Optimization for UAV Task Assignment; Proceedings of the AIAA Guidance, Navigation, and Control Conference and Exhibit; Providence, RI, USA. 16–19 August 2004; p. 5352. [Google Scholar]
  • 36.Bellingham J., Tillerson M., Richards A., How J.P. Cooperative Control: Models, Applications and Algorithms. Springer; Berlin/Heidelberg, Germany: 2003. Multi-Task Allocation and Path Planning for Cooperating UAVs; pp. 23–41. [Google Scholar]
  • 37.Leary S., Deittert M., Bookless J. Constrained UAV mission planning: A comparison of approaches; Proceedings of the IEEE ICCV Workshops; Barcelona, Spain. 6–13 November 2011; pp. 2002–2009. [Google Scholar]
  • 38.Roberge V., Tarbouchi M., Labonté G. Comparison of Parallel Genetic Algorithm and Particle Swarm Optimization for Real-Time UAV Path Planning. IEEE Trans. Ind. Inform. 2013;9:132–141. doi: 10.1109/TII.2012.2198665. [DOI] [Google Scholar]
  • 39.Chatterjee A., Borokhovich M., Varshney L.R., Vishwanath S. Efficient and flexible crowdsourcing of specialized tasks with precedence constraints; Proceedings of the IEEE INFOCOM; San Francisco, CA, USA. 10–15 April 2016; pp. 1–9. [Google Scholar]
  • 40.Casbeer D.W., Holsapple R.W. Column generation for a UAV assignment problem with precedence constraints. Int. J. Robust Nonlinear Control. 2011;21:1421–1433. doi: 10.1002/rnc.1722. [DOI] [Google Scholar]
  • 41.Peng J., Zhu Y., Zhao Q., Xue G., Zhu H., Cao J., Li B. Fair Energy-Efficient Sensing Task Allocation in Participatory Sensing with Smartphones. Comput. J. 2017;60:850–865. doi: 10.1093/comjnl/bxx015. [DOI] [Google Scholar]
  • 42.Abououf M., Singh S., Otrok H., Mizouni R., Ouali A. Gale-Shapley Matching Game Selection—A Framework for User Satisfaction. IEEE Access. 2019;7:3694–3703. doi: 10.1109/ACCESS.2018.2888696. [DOI] [Google Scholar]
  • 43.Tang C., Wei X., Xiao S., Chen W., Fang W., Zhang W., Hao M. A Mobile Cloud Based Scheduling Strategy for Industrial Internet of Things. IEEE Access. 2018;6:7262–7275. doi: 10.1109/ACCESS.2018.2799548. [DOI] [Google Scholar]
  • 44.de Moraes R.S., de Freitas E.P. Experimental Analysis of Heuristic Solutions for the Moving Target Traveling Salesman Problem Applied to a Moving Targets Monitoring System. Expert Syst. Appl. 2019 doi: 10.1016/j.eswa.2019.04.023. [DOI] [Google Scholar]
  • 45.Schwarzrock J., Zacarias I., Bazzan A.L., de Araujo Fernandes R.Q., Moreira L.H., de Freitas E.P. Solving task allocation problem in multi Unmanned Aerial Vehicles systems using Swarm intelligence. Eng. Appl. Artif. Intell. 2018;72:10–20. doi: 10.1016/j.engappai.2018.03.008. [DOI] [Google Scholar]
  • 46.Garey M.R., Johnson D.S. Tutorial: Hard Real-time Systems. IEEE Computer Society Press; Los Alamitos, CA, USA: 1989. Complexity Results for Multiprocessor Scheduling Under Resource Constraints; pp. 205–219. [Google Scholar]

Articles from Sensors (Basel, Switzerland) are provided here courtesy of Multidisciplinary Digital Publishing Institute (MDPI)

RESOURCES