Abstract
With the pervasive use of mobile devices and increasingly computational ability, more concrete and deeper collaborations among mobile users are becoming possible and needed. However, most of the studies fail to consider load balancing requirement among mobile users. When tasks are unevenly distributed, the processing time as well as energy consumption will be extremely high on some devices, which will inevitably counterweight the benefits from incentive mechanism and task scheduling scheme. In this work, we propose eCOTS (Efficient and Cooperative Task Sharing for Large-scale Smart City Sensing Application). We leverage the “balls and bins” theory for task assignment, where d mobile users in contact range are investigated, and select the least loaded one among the d users. It has been proved that such simple case can effectively reduce the largest queueing length from
1. Introduction
Recent years have witnessed a significant rise in the usage of smart phone as well as the associated applications. With the increasing number of mobile devices in network, people would share their data with mobile devices and make further collaborations with each other. Recently, crowdsourcing with participatory sensing schemes enables more unconscious and volunteering collaborations among sensing information shareholders. Actually, in such mobile computing environment, deeper collaborations are needed. Mobile users with different number of tasks will share and reassign tasks among them, taking advantages of computing and energy diversity. For example, users with low battery level will offload their tasks onto the contacted users in communication ranges with higher battery level. Even further, tasks should be assigned to nodes with higher computing ability.
However, previous works [1–5] fail to achieve load balancing among users. Under these schemes, the queuing length may be extremely high in some particular nodes, which will inevitably lead to exhausted energy and long delay. The root reason is that these works are all focusing on the data sharing efficiency instead of the allocation equilibrium among diverse users. Moreover, computational capability and remaining energy levels are also vitally important for task reallocation.
Traditional load balancing schemes cannot be applied to mobile social network directly, because, in mobile social network, the information collection and task assignment should be distributed. Centralized schemes will suffer from overwhelmingly communication overhead and time delay. Even though, the distributed features are applied such as some of the distributed algorithms, the transitory intercontact time, and dynamic queueing length [6, 7] making this task assignment fail to balance the tasks among users properly.
Actually, a simple and effective method is called for balancing the tasks among mobile users, which is critically important for smart phone based large-scale urban sensing applications. Unfortunately, balancing the tasks allocation among mobile users is not trivial. First, task balancing among mobile users needs accurate buffering information for each user, which will cost significant amount of bandwidth. Second, multiple task-assignment users and unpredictable task completion time will incur dynamic buffer-length, which makes the balanced queue length difficult to achieve. Third, it is difficult to measure the intercontact time in mobile social network, which makes it difficult to evaluate the task completion time. Also, the remaining energy level and computational diversity among users should be considered for fair and balanced task allocation.
In this work, we propose eCOTS (Efficient and Cooperative Task Sharing for Large-scale Smart City Sensing Application). We address the above three challenges with two important techniques. First, we use the “two choices” scheme in “balls and bins” theory [8] as fundamental mechanism for task offloading, where queuing lengths of d users are compared, and users with the least value are selected. Such scheme is simple but effective. The root reason is that random walk also plays the role of random selection. Second, we leverage the random walk behavior for random choice and consider the energy level as well as computational capability for task reassignment. We find that the considerations for energy consumption and computational capability effectively offset the uncertainty in mobility without adding much complexity. The root reason is that energy consumption is also an implicit factor for intercontact time. Further, the computational capability also dominates the task allocation preference as well as inter contact frequency. We verified the effectiveness of the proposed techniques in our extensive experimental study.
The contribution of this work is threefold.
We propose eCOTS, an efficient cooperative task shared among smartphone users for large-scale urban sensing applications. To the best of our knowledge, we are the first systematic study on balanced task assignment in pure distributed environment.
We incorporate the energy level and computational capability in task-assignment scheme, which could be in appliance with heterogeneous mobile social network. eCOTS can deal with these two cases separately and jointly with satisfiable performance. Also, these concerns are helpful in achieving the robustness in mobile environment.
We make an extensive experimental study on our proposed scheme. The evaluations include the task balancing effects in different traffic load under different energy levels and computational capabilities. Experimental results based on real trace data show the surprisingly good balancing property even though the variance and diversity between users are very large.
The rest of the paper is organized as follows. We describe our system model in Section 2. Section 3 provides problem formation as well as preliminary analysis about it. After describing our algorithm design in Section 4. We evaluate the performance of eCOTS by simulation in Section 5 and make real trace driven study in Section 6. Finally, we discuss related work in Section 7 and conclude the work in Section 8.
2. Preliminary and System Model
2.1. “Balls and Bins” Theory
The “balls and bins” problem is classic and simple, being widely used in many applications in computer science such as hashing [9, 10], shared memory emulations in DMM (Distributed Memory Machines) [11, 12], and load balancing with limited information. The basic problem is very simple. Given n nodes are to be thrown into n bins, where each ball is chosen to each bin uniformly and independently, the focus is the maximum loaded bin, that is, the largest number of balls in all the bins; is approximately
If the balls are thrown sequentially and each ball is placed in the least loaded bins of
with high probability. We call this method “d-choice paradigm.”
When the number of balls m is larger than n, especially
while for the “d-choice paradigm,” the maximum load is
Notably, there is also a very interesting and beneficial property in “d-choice paradigm.” This property motivates us to take this method into task assignment and balancing scheme where increasing the number of tasks will not increase the variance of the queue length.
The “d-choice paradigm” has been widely studied and extended for many interesting aspects. For example, many studies [8] focus on the weighted balls and bins, which is practical and useful in real task assignment. For computer system and networks, the parallel execution studies with overhead considerations are very useful and get many concentrations [6, 7].
In our study, the “d-choice paradigm” is useful but should be tailored for our investigated problem. We will introduce our system model and the investigated problem in the following paragraphs.
2.2. Modeling the Users and Tasks
We consider a mobile social network, where n users in user set
The tasks getting from other users are listed in queue
2.3. Modeling the Energy Level and Computational Capability
Each user i has an energy level
Another fact is that the execution time is inversely proportional to the computational capability, which will accordingly affects the queueing length. In our model, the task queue is processed according to users’ capability; that is, the queuing length
2.4. Modeling the Mobile Social Network
Each user performs random walk in a finite area. There are totally n users randomly roaming in an area, where a communication range R is set for each mobile user. When two nodes are in the communication range of each other, the tasks can be reallocated. As the data transmission rate is comparatively high with the task information, we assume the task reallocation period is sufficient when two nodes are roaming in communication range. We also assume that the inherent parameters in each user, for example, the energy level, queueing length, and the computational capabilities, can also be exchanged during the intercontact time between users. The basic scheme is shown in Figure 1. In this picture, we can see our model of task offloading and reassignment more clearly. When User 1 is doing the allocation, he or she is considered as the center of his or her communication circle. For example, there are in total 5 users within the communication range. User 1 just picks randomly two of them (User 2 and User 3) and deliver the task to the less loaded one (User 2). More extensively, User 1 can also reassign tasks to other users according to different metrics.

Basic scheme of task offloading and reassignment.
3. Problem Formation
3.1. Basic Problem
We investigate the task of offloading and balancing scheme for mobile social network. In particular, balancing among users means an even distribution of the tasks. The goal is to minimize the sum of queueing length difference between each one and the average value, which can be given by
where
3.2. Evaluating the Gap between Maximum and the Average
It can be formulated by minimizing the gap between the average value and the maximum queueing length achievable with high probability. This evaluation has two advantages. First, it is simple. Instead of computing the gap between average value and all the queues, the maximum queueing length is investigated, which saves large amount of communication overhead in distributed mobile networks. Without loss of generality, such evaluation is also reasonable. Second, it is also an important metric in evaluating the worst case between the average cases. For example, we need to know the task finishing time in average and the worst. Also, in batched task offloading case, the task finishing time depends on the latest one, which corresponds to the longest queueing length. Thus, such evaluation can be given by
3.3. Allocate with Weighted Tasks and Different Computational Capability
We investigate the allocation scheme 𝒜 where each task is given different weights. Similarly, the evaluation can be represented by
where
When the nodes are given different computational capabilities, the representation can be given by
where
4. Algorithm Design
4.1. eCOTS Overview
Our algorithm is leveraging two basic characteristics in random based paradigm with theoretical guarantees. One is the 2-choice paradigm, where investigating 2 choices is nearly optimal in practice. The other is the randomness in mobile sensor network, especially the random walk behavior. The stationary distribution over the visiting frequency and diversity among users provides sufficient choices as well as randomness for task reassignment. In summary, our basic idea is simple. There are basically two parts in our algorithm. First, the algorithm will select the users in communication range according to the number of users in range. Second, according to the “d-choice paradigm,” the users are selected for task reassignment according to their queueing length. Notably, when the energy level and computational capability are considered, the problem is similar to weighted bin case in “balls and bins” theory. However, considering energy level brings negative impact. Such property is different from traditional weighted bin case. While we consider the computational capability case, it differs from weighted bin theory, because, for the traditional weighted bin problem, selecting the higher weight bin with higher probability is not favorable. However, in our concern, as the execution time is inversely proportional to the computational capability, selecting users in higher capability with higher probability accordingly is favorable and reasonable. In the following subsection, we will describe our algorithm eCOTS in detail.
4.2. Algorithm Description on eCOTS
According to the above derivation, we present the algorithm description on task allocation in mobile case as Algorithm 1. The input parameters are the number of users n, the number of time slots m, the communication range r, the location edge,
the number of users, n; the number of time slots, m; communication range, r; location edge (users’ locations can't go beyond the edge), number of choice, d; queue length: queue length (considering task weight and users' ability): (1) Initialize (2) (3) randomly generate users' locations: (4) for every user j, (5) (6) record that (7) (8) (9) randomly choose d of them (10) s = the one with shortest length among the d-choice (11) (12) s = the one with shortest length in range (13) (14) continue allocation (15) (16) (17) (18) (19) (20)
At the beginning of our Algorithm 1, both queue lengths and the allocation time slot are initialized with 0. And then, when the allocation time slot arrives, we first randomly generate users’ locations
Considering that every task has its own difficulty and each person's ability to deal with the task is in diversity, the task length is totally different from what we can see; it is the actual complexity of every task queue. We measure this with w; in addition, w should be added by the corresponding value of person s with
5. Simulation Results
In this section, we conduct extensive simulations to evaluate eCOTS algorithm. The overall methodology and simulation settings are introduced firstly. Afterward, we evaluate the performance of eCOTS in terms of different parameter settings. Table 1 summarizes the parameters frequently used in this paper.
Parameter settings.
5.1. Implementation Methodology and Simulation Settings
In this simulation, we emulate a realistic and meaningful scenario for mobile social network as follows. For each time slot i, n users randomly walked in a square region of 100 m × 100 m. As a result, for user k, the location
5.2. Performance Evaluation of eCOTS
We compare eCOTS with the simple random delivering approach based on four metrics:
5.2.1. Impact of Communication Range
We need to compare eCOTS with the initial random allocation in different communication ranges. Here we choose
As shown in Figure 2(a), when the communication range is set to

Choice performance in the communication range.
Further, we also perform the comparison between eCOTS and optimal case (reassign tasks to the least loaded users within the communication range) in Figure 4. Since the full line (eCOTS) almost coincides with the dotted one (optimal case), we have no doubt to believe that eCOTS algorithm works perfectly. With the eCOTS algorithm, no person bears too much work to do while some other users have little task to process.
5.2.2. Impact of Task Weight
We need to evaluate the impact of task weight on the eCOTS performance. In this experiment, we make a slight modification on the previous settings, where every task has its own weight. As we all clearly know that different tasks have different difficulties, we should make the more difficult tasks owning far more weight than the easy one. The person we choose to deliver the task actually will not just add its task length by 1 but also the given task weight.
To demonstrate the better performance of eCOTS, we let the task weight vary from {1–5, 1–50, 1–500}. If we have access to know about the task length of everyone, we can have the picture as in Figure 5. It shows comparison between eCOTS and random allocation in task length. Comparing with Figure 3, the case that users cannot know the task load of others, only knowing the number of tasks. The difference between the maximum load and minimum load has been narrowed significantly. As shown in Figure 5(a), we find that eCOTS algorithm is almost the same as the optimal case, which indicates that eCOTS algorithm really works in task allocation.

2-choice performance with different task weights, comparing queue lengths only.

2-choice performance versus optimal case (identical).

2-choice performance comparing the task length.
In summary, eCOTS method achieves a much better performance rather than random allocation in terms of task weight.
5.2.3. Impact of Users’ Computational Ability
In social network, users have diversity in ability. An able man always should do more work; we take this factor into our consideration. To quantify different users’ ability, we simply set their ability with 1–5 levels. That is to say, if a person's ability is
As shown in Figure 6, we first allocate our tasks according to the queue length. While it shows great superiority in queue lengths of users, the performance is not satisfactory when incorporating into the diverse ability. On account of this issue, we assume that everyone's ability is widely known in our experiments. In Figure 7, the full line represents our eCOTS method and the dotted one is on behalf of the random allocation method. Obviously, our method performs much better than the random allocation method because the distribution of queue length of users is centering at the perfect average point.

2-choice performance versus random allocation considering users’ ability, comparing queue lengths.

2-choice performance versus random allocation considering users’ ability, comparing task length.
5.2.4. The Impact of Energy Consumption
Task execution will cost energy consumption. In task allocation, we must consider the metric of users’ energy. Apparently, we may not give the task to the user with limited energy although this user may be the one bearing the least load. In other words, we need to consider users’ energy levels in advance and the queue length of every user as well. Each user has full energy

eCOTS performance versus random allocation considering users’ energy.
5.2.5. The Impact of Parameter-d Setting
After we finished all the work above, we begin to study the impact of parameter-d setting. In the “balls and bins” theory, it is well known that, if we increase the number of d, the performance of d-choice will be even better. Based on this, we set parameter-d as

Impact of parameter-d setting.
6. Trace Driven Evaluation
According to the simulation results above, we find that “2-choice” has shown great superiority in the typical scenario of mobile social network, while simulation is obviously not enough to convince our algorithm. As a matter of fact, we need trace-driven performance evaluation to put up the adaptability of “2-choice” in real world.
6.1. Trace Data Processing
The trace we use is Rollernet [14], which is the public data collected with iMotes in the roller tour in Paris. RollerNet was interested in tracking contacts between different mobile users. The data set has been collected in August 20, 2006. According to organizers and police information, about 2,500 people participated in the rollerblading tour. The total duration of the tour was about three hours. During the tour, the iMotes has been deployed to 62 skaters. The experiment successfully recorded contacts between not only all devices they distributed, but also a large amount of external devices (cell phones, PDAs). To make sure the trace is authentic and faithful, we only pick the contacts recorded between iMotes to continue our work.
Part of User 1's original contact file is in Table 2; the first and second columns give the IDs of the devices which the contact is reporting. The third and fourth columns describe, respectively, the first and last time when the address of ID2 was recorded by ID1 or the address of ID1 was recorded by ID2 for this contact. The fifth column enumerates contacts with the same ID1 and ID2 as
Contact records of User 1.
Back to our model, we do the allocation task in every time slot. Here, we should divide the original time data into a series of time slots. From Table 2, we find that Starting Times have a public basic value 1156000000. For convenience, let Starting Times subtract basic value 1156000000. After that, we change the time unit from second to minute and then sort the meeting time in ascending order, for example,
6.2. Algorithm Implementation
6.2.1. One User Allocating Tasks
Let us start our algorithm in this way. First, we should find out the users that User 1 met in the same time slot. Then, in every time slot, if User 1 comes across more than d users, randomly picks d of them and offload the task to the less loaded one. Otherwise, if the number is smaller than d, then just give the task to the least loaded one among them. Setting d in different values, we get graphs as Figure 10. In Figure 10(a), when

d-choice in User 1.
6.2.2. All Users Allocating Tasks
In the social mobile network, users reassign their tasks distributively. We should take all users into consideration as Figure 11(a). We prefer that users do their allocation in the same time slot. Of course, the longer the contact interval is, the more people will do their allocation in one time slot. We set the interval into 60, 120, and 300 seconds, respectively; the performance of eCOTS (

Performance of eCOTS (

Performance of eCOTS (
7. Related Work
Our work relates to the efficient data transfer scheme over disruption-tolerant networks or opportunistic networks. The intermittent contact between randomly roaming users is useful for data sharing between mobile users. These networks have been studied extensively in a variety of settings, from military [4] to disasters [5]. These settings all assume that the fixed infrastructure is unavailable or costly even highly unreliable. With numerous cheap and distributed working terminals, some expensive works can be accomplished successfully. Further, the communication links are subject to disruptions, and the opportunistic access will bring more chances for data sharing. In summary, our work relates to three research topics, which are crowdsourcing schemes, random walk, and “balls and bins” theory. As “balls and bins” theory has been introduced in Section 2, in this section, we mainly introduce the related works on crowdsourcing schemes for cooperative task accomplishment and the literatures on random walk studies.
7.1. Crowdsourcing Schemes for Cooperative Task Accomplishment
Many working crowdsourcing systems are concentrating on many researchers and industrial efforts in terms of designing actual platforms like [13, 15, 16]. These working systems also need extensive evaluation with solid results like [1, 2]. Further and more importantly, there are many studies focusing on pricing schemes for effective crowdsourcing incentives [3]. In smart city sensing applications, crowdsourcing paradigms leverage the pervasive human behavior, for example, walking, driving, shopping, and so forth, to provide a large-scale urban sensing network with wider coverage in time and space domain. Moreover, the social relationship, for example, the crowd gathering and migrations, is also important for some specific applications, for example, the flu influence detection, air quality, traffic monitoring, and so forth. The popularity of smartphone also speeds up the crowdsourcing based applications for urban sensing. Recently, the crowdsourcing based sensing applications are exploited to monitor the urban environment [17–20]. More specifically, Mun et al. [19–21] employ the customized and portable sensors on each participant to monitor the air quality of the city. The constructions of noise map for the smart city are discussed in [17, 22]. Leveraging the cell phone microphones of the participants, these works focus on the implementation of the monitoring system. However, they fail to consider the unreliability and inaccuracy of the observations in the participatory sensing.
7.2. Random Walk
The random walk concept was proposed by Pearson [23]. We are interested in random walks in city scale, where a walker starts from a source node to a destination node and for each step of this travel. Note that, in mobile social network, the social relationship and human behavior dominate the trajectories of the human graph. Although in some specific trajectories, it does follow the random walk character, the mass number of users can form a relatively steady distribution of random walk. The inherent reason is the law of large numbers [24].
Fortunately, random walks can be put into mobile social network for exploring the character and opportunities in data transmissions. For instance, Newman [25] proposes the random-walk betweenness centrality, such kind of metric reasonably defines how often a node in a graph is visited by a random walker between all possible node pairs. Similar to the betweenness evaluation, Noh and Rieger [26] introduce the random-walk closeness centrality metric, which measures how fast a node can successfully get a random-walk message from other mobile nodes, in the random deployed system, such as mobile social networks. These works provide us with a guarantee that there are relatively robust closeness between users even if they are randomly mobile users. And further, the messages can be delivered relatively stable among users with high probability of convergence.
The main focus of this paper is load balancing in distributed crowdsourcing system. Different from previous crowdsourcing based applications, we use a pure distributed computation and communication model, where users need not transmit any messages for centralized computation. In large-scale urban sensing application, such property would be welcome because it will not bring much trouble to the mobile users. Also, difficult tasks can be cooperatively shared by mass number of users, which can fully explore the energy usage among users and provide more reasonable usages on computational capability.
The random walk model in our study is also realistic and applicable to mobile social networks. We use the simulation model as well as real trace data. Both network scenarios have shown the effectiveness of our proposed scheme.
8. Conclusion
In this work, we investigate the task offloading and reassignment problem in mobile social network. In particular, we focus on the load balancing issue for efficient task execution for energy constrained mobile device. We propose eCOTS (Efficient and Cooperative Task Sharing for Large-scale Smart City Sensing Application). Our algorithm leverages the “d-choice paradigm” for “balls and bins” problem. When mobile users are in communication range, only 2 users are selected and compared for the least loaded checking. Such simple scheme ensures balanced allocation even the energy level and computational capability are highly dynamic.
In future work, we are going to investigate the multilevel forwarding case for efficient and balanced load allocation. Also, trace-driven performance evaluations are needed for more convincible algorithm validation.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
This research is partially supported by NSF China under Grants nos. 61003277, 61232018, 61272487, 61170216, and 61172062, NSF CNS-0832120, NSF CNS-1035894, and China 973 Program under Grants nos. 2009CB320400, 2010CB328100, 2010CB334707, and 2011CB302705.
