Task allocation method for cloud side-end collaborative crowd sensing system considering user will
By optimizing the task allocation and server selection in cloud-edge collaborative crowd intelligence perception through the WARP-GA and PPOWDM algorithms, the problems of ignoring user intentions and resource heterogeneity are solved, and efficient task execution and resource utilization are achieved.
Patent Information
- Application Number
- CN202510906163.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-17
AI Technical Summary
Task allocation in traditional crowd sensing ignores user intentions, and user task data offloading in cloud-edge collaborative crowd sensing has problems of resource heterogeneity and service heterogeneity, resulting in task termination or resource waste.
The WARP-GA algorithm is used for task allocation, considering the user's execution willingness, and PPOWDM is used to select appropriate edge servers for calculation, optimizing task allocation and server selection.
It improves task completion rate and platform profit, reduces delays, and improves service quality and resource utilization efficiency.
Smart Images

Figure FT_2 
Figure FT_3 
Figure FT_4
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of Internet of Things, and relates to a mobile crowdsensing system and mobile edge computing, in particular to a data collection and calculation method in a cloud-edge-end collaborative crowdsensing scenario of mobile crowdsensing. BACKGROUND
[0002] With the increasing popularity of Internet of Things technology and the wide application of intelligent sensing devices, mobile crowdsensing (MCS) has gradually become a new real-time sensing and data collection mode. Mobile crowdsensing combines the crowdsourcing concept and the sensing ability of mobile devices, and exhibits the unique features of Internet of Things. It builds an interactive and participatory sensing network through existing mobile devices, distributes sensing tasks to individuals or groups in the network, and helps professionals and the public to collect data, analyze information and share knowledge. MCS has many advantages, including flexible deployment, diverse sensing data, extensive and uniform coverage, and high scalability and versatility. In many fields such as traffic monitoring, air quality assessment, noise mapping, and unmanned aerial vehicle transportation, MCS has shown broad application prospects.
[0003] However, the traditional crowdsensing network is centralized, and the mobile users and the cloud platform rely on basic communication facilities for data transmission. Mobile users need to consume their own sensing device energy, computing resources, storage space and communication bandwidth to collect and upload data to the cloud platform, and the cloud platform also needs to process and store the data uploaded by the users. This way not only consumes a large amount of communication traffic of the sensing device, increases the sensing cost of the user, but also occupies a large amount of computing resources of the platform, resulting in large delay and reducing the quality of service.
[0004] The advantages of edge computing close to users and low delay can effectively make up for the shortcomings of traditional crowdsensing. By deploying edge servers to provide services for nearby users, users do not need to upload task data to the cloud platform, and the edge server has sufficient computing and storage capacity to provide services for users in time, thereby effectively reducing the delay and improving the quality of service. By combining edge computing and MCS, users can upload task data to the edge server, thereby reducing the load of the cloud platform and improving the data collection efficiency, and the edge server only needs to upload the task result to the cloud platform.
[0005] The advantages of cloud-edge collaborative crowd-sensing are as follows: 1) the delay of service access is reduced, thereby improving the efficiency of providing services to users; 2) the ability to provide location-aware services is provided, ensuring the quality of services related to applications; and 3) complete information about nearby areas and users is recorded, while supporting location-aware data management. Therefore, cloud-edge collaborative crowd-sensing not only inherits the advantages of traditional crowd-sensing, but also combines the unique features of edge computing, including location awareness, geographical distribution and communication efficiency.
[0006] However, cloud-edge collaborative crowd-sensing has multiple challenges. First, in terms of task allocation, there are currently two types of task allocation principles, namely "push mode" and "pull mode". Specifically, in the "push mode", crowd-sensing tasks are allocated directly to mobile users by the platform, and mobile users only need to execute the tasks according to the allocation of the platform; in the "pull mode", the platform discloses all tasks to users, who search for tasks, and users can choose tasks to execute according to their own preferences. Both modes have disadvantages. Specifically, in the "push mode", the platform only needs to allocate tasks to users according to certain criteria, completely ignoring the willingness of users, which may lead to task termination and failure to complete; in the "pull mode", the tasks executed by users are completely determined by themselves, which may lead to the fact that some tasks in remote geographical locations or with low rewards cannot be executed. Second, since users need to unload data to edge servers for computation after completing task data collection, real-world edge servers have resource heterogeneity and service heterogeneity, and multiple factors need to be considered when unloading task data, such as server resource status, unloading behavior of other users, etc. The present application is specifically directed to the above two problems, and proposes a mobile crowd-sensing data collection and computation method in a cloud-edge collaborative scenario, aiming to improve the utility of the crowd-sensing platform through innovative technical means and achieve efficient computation of tasks. SUMMARY
[0007] The present application provides a crowd-sensing data collection and computation method in a cloud-edge collaborative scenario, which can simultaneously allocate a group of tasks to a group of mobile users to execute task data collection and select appropriate edge servers for computation after the mobile users complete task data collection.
[0008] In order to realize the above process, the present application firstly searches the task published by the platform by the user, reports the execution intention to the platform after completing the search, and the platform collects the execution intention of the user and refers to the execution intention of the user in the task allocation stage. After completing the task allocation, the user collects the data, and then unloads the collected data to the edge server for calculation, and the platform selects the most suitable server for the user in the unloading process. On this basis, the present application proposes two algorithms for task allocation and edge server selection, namely WARP-GA and PPOWDM, so as to maximize the platform profit and the average residual time of all tasks. The objective function and constraint condition in the task allocation stage are as follows:
[0009]
[0010] Wherein s j represents the type of heterogeneous task, s i represents the type of sensor held by the user. val j is the value of task t j , in this problem, the fee paid by the task requester to the platform after the platform completes the task. |NoES| represents the number of times of using the edge server for calculation, not the quantity. rent p represents the cost required for each edge server to execute data processing. Re i,j,p represents the remuneration paid by the platform to the user. x i,j is a 0-1 allocation decision variable, x i,j = 1 indicates that the task t j is allocated to the user u i . C(u i ) represents the total cost of the user, and the total cost includes the moving cost, the sensing cost, the unloading cost, and the specific definitions are as follows:
[0011]
[0012] Wherein is the size of the task data executed by the user u i , the sensing cost is the unloading cost is the moving cost
[0013] When the platform executes the task allocation, the execution intention of the user has been obtained, so the steps of the present application when executing the task allocation are as follows:
[0014] S1. The obtained user execution intention is generated into an initial intention sequence according to the user;
[0015] S2. WARP-GA is used for task allocation, and an initialization population is generated by using a task sequence-based coding method;
[0016] S3. Cross, select and mutate the initial population obtained in S2 to generate a new population;
[0017] S4. Check the population obtained in S3 for conflicts, and if there is an assignment scheme that violates the detour distance constraint, perform conflict repair. For individuals that violate the detour distance constraint, accept the initial intention in S1 with a probability p;
[0018] S5. Sort the obtained population in descending order of fitness, and the chromosome with the highest fitness is the final task assignment scheme.
[0019] Preferably, the method described in S1 for users to collect intentions is that the platform generates a hierarchical tree according to the priority of task types for all incoming tasks, and then splits the generated hierarchical tree into multiple sub-trees according to skill types for users to search in parallel.
[0020] Preferably, the chromosome representation in S2 is as shown in Figure 1 The encoding method described in S2 is different from the 0-1 encoding method of the traditional genetic algorithm. The traditional 0-1 encoding method is not applicable to this problem because the order in which users perform tasks also affects the cost of users and the profit of the platform. Therefore, we adopt an encoding method based on task sequence, which can not only know the content of each task performed by users, but also know the order in which users perform tasks.
[0021] Preferably, the crossover process in S3 is as shown in Figure 2 S3 uses the roulette strategy to select when performing selection, and only crosses within the same user's gene segment when performing crossover operation, because the tasks in this problem are heterogeneous tasks, and arbitrary crossover may cause type mismatch.
[0022] Preferably, the conflict repair operation in S4 is performed. Assignments that exceed the detour distance threshold may cause users to abandon the execution of tasks, affecting the task rate and reducing the profit of the platform. Therefore, when performing conflict repair operation, accepting the intention of users with a probability p can not only improve the completion rate, but also ensure the profit of the platform.
[0023] Preferably, the chromosomes in S5 are sorted, that is, the chromosomes are arranged in descending order according to the size of the platform's total profit, and the chromosome with the highest fitness is identified as the optimal solution, that is, the task assignment scheme with the best completion effect.
[0024] After completing task allocation, the platform will perform server selection for all tasks. Due to resource and service heterogeneity, not all user paths have servers with the ideal type match and sufficient resources to directly perform calculations. Therefore, under such conditions, the possible offloading scenarios include: direct calculation, waiting calculation, and forwarding calculation. During the server selection phase, the platform's goal is to maximize the average remaining time of all tasks. The average remaining time is defined as follows:
[0025]
[0026] in, α+β+γ=1, where α, β, and γ are all 0-1 variables, indicating that only one calculation method can be selected for each task. The remaining time for each calculation method is defined as follows:
[0027]
[0028] in is the duration of the task, c s is the duration of the perception data, Among them D j is the size of the task data, ε i is the rate at which users perceive data. c o Is the uninstallation time, o p is the rate at which the server accepts data. is the calculation duration, where f p is the calculation rate. where η p is the forwarding rate between servers. Is the waiting time, Since server resources change dynamically at any time and the uninstall behaviors of users will affect each other, the present invention uses deep reinforcement learning methods to select appropriate servers and computing methods for all tasks.
[0029] First, define the state, action, and reward: S(t) = {ar p (t),l i (t),p∈k,i∈m},A(t)={x j,p (t),cm j (t),j∈n}, The penalty function P(s,a) is defined as follows:
[0030]
[0031] Where c is a constant and can be adjusted as needed.p (t) represents the edge server es at time t p Available resource state, l i (t) represents the location of user u at time t i The action space x j,p (t) represents the task t j Select the edge server es p Perform the calculation, cm j (t) represents the selected calculation method for task t j , that is, one of direct calculation, waiting for calculation and forwarding calculation.
[0032] The present application uses a proximal policy optimization algorithm with a dynamic mask action space to perform server selection. The proximal policy optimization algorithm is a policy-based reinforcement learning that has a unique clipping mechanism to limit the update amplitude of the policy, while having an experience replay mechanism to improve the efficiency of sample use. The mask action space is introduced to solve the coupling situation that may occur when users offload tasks in large-scale task scenarios.
[0033] When there is a task allocation scheme in the platform server selection, the steps of the present application in the server selection stage are:
[0034] S1. Initialize actor network parameters θ, critic network parameters ζ, maximum training rounds ME, and number of training updates UT per time;
[0035] S2. For a user u i , count the servers that are crossed by its path in the communication range and add them to the available server list AES i of the user;
[0036] S3. For each round of training, the agent obtains the state s(t) from the environment, and then performs the action a(t);
[0037] S4. Update the AES of each user, and if there is no server that can directly calculate, mask the direct calculation in the action space, that is, the action space changes from direct calculation, waiting for calculation and forwarding calculation to waiting for calculation and forwarding calculation;
[0038] S5. Obtain the reward and the action probability of the policy entropy and action. Then store these variables in the experience pool and calculate the advantage function.
[0039] More preferably, the mask operation in S4 meets the condition that the dynamic change of the server resource state and the offloading behavior of the user will influence each other in the real scenario. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 is a schematic diagram of chromosome encoding in WARP-GA
[0041] Figure 2 is a schematic diagram of the cross process in WARP-GA
[0042] Figure 3 is a schematic diagram of the cloud-edge-end collaborative crowd-sensing process
[0043] Figure 4 is a schematic diagram of the change of platform profit when the number of tasks changes from 20 to 120 while the number of fixed users is half the number of tasks
[0044] Figure 5 is a schematic diagram of the change of platform profit when the number of users changes from 20 to 60 while the number of fixed tasks is 80
[0045] Figure 6 is a schematic diagram of the change of task completion rate when the acceptance probability p of initial willingness changes from 0.2 to 0.6 under the condition of different numbers of users while the number of fixed tasks is 80
[0046] Figure 7 is a schematic diagram of the change of average remaining time of different algorithms when the number of edge servers changes from 10 to 50 while the number of fixed tasks is 80 Detailed implementation method
[0047] Next, an exemplary embodiment will be described in detail. However, it should be recognized that the structures and characteristics in one embodiment can also be combined with the structures and characteristics in other embodiments to achieve better technical effects without further detailed description.
[0048] A flow of a mobile crowd-sensing data collection and calculation method in a cloud-edge-end collaborative scenario can be intuitively shown by a flowchart of Figure 5 and includes the following key steps:
[0049] Step one: the task requester submits the sensing demand to the platform, including information such as task type, task time, task location, etc. The platform generates a hierarchical tree from the incoming task and splits it into multiple sub-trees for users to search in parallel;
[0050] Step two: the user searches for the task, and then reports his execution willingness to the platform;
[0051] Step three: the platform performs task allocation, using the WARP-GA algorithm in task allocation;
[0052] Step four: the user goes to the task location to perform data collection;
[0053] Step five: the platform selects appropriate offloading servers and calculation methods for all tasks according to the allocation results, using the PPOWDM algorithm;
[0054] Step six: the user offloads the perceived data to the corresponding server;
[0055] Step seven: the edge server performs task computation and uploads the computation result to the platform. Embodiments
[0056] Taking the location information dataset of 10357 taxis in Beijing for one week as an example, the paths of 150 taxis are selected as the mobile paths of users, the starting point is set as the starting point of the path of the taxi within a period of time, and the ending point is set as the position reached by the taxi within the period of time. The latitude and longitude are converted into position coordinate data with the lowest latitude and longitude as the origin. The moving speed of the user is set to the same unit speed suitable for the experimental scenario. The task position is randomly generated within the range of the dataset, the task type is represented by [1, 10], the value of each task is generated within [10, 50], and the time length between the completion of data collection and the deadline is generated within [600, 1200]. The settings of WARP-GA are as follows: the population size is set to 100, the maximum iteration number is set to 200, the crossover probability p c is set to 0.6, and the mutation probability p m is set to 0.1. The settings of PPOWDM are as follows: the learning rate is set to 0.0003, the discount factor is set to 0.99, the advantage function parameter is set to 0.98, the clipping range is set to 0.2, the value loss coefficient is 0.5, and the entropy loss coefficient is 0.002.
[0057] Referring to Figure 4 , as the number of tasks increases, the number of tasks completed by the user increases, and the profit of the platform increases. The performance of the WARP-GA algorithm is always superior to that of other algorithms. Considering that the simulation is intended to verify the task allocation result of WARP-GA, it is assumed that the number of users is half of the number of tasks, and there are a sufficient number of available edge servers. Obviously, as the number of tasks increases, the platform utility will also rise. It is worth noting that no matter how many tasks there are, WARP-GA always obtains the highest platform utility. This is because the algorithm takes into account the user's willingness. This consideration allows the algorithm to allocate tasks that are more in line with the user's wishes, making it more likely for the user to complete the allocated tasks and bringing higher profits to the platform.
[0058] Referring to Figure 5 , as the number of users increases, the profit of the platform gradually increases. When the number of tasks is fixed, if the number of users increases, the solution space also increases, which means that the platform can choose more users. This will reduce the situation where users abandon tasks because the tasks allocated to them do not meet their expectations, increase the number of completed tasks, and consequently increase the profit of the platform. This also indirectly verifies the superior performance of WARP-GA in terms of task completion rate.
[0059] Referring to Figure 6 The number of tasks is set to 80, the number of users is changed, and p considered during conflict resolution is modified to observe the change of task completion rate. As shown in Figure 6 : 1) When p remains constant, the task completion rate increases with the increase of the number of users, which is consistent with our previous analysis. 2) When the number of users remains fixed, the task completion rate increases with the increase of p. This is because when the platform pays more attention to p during conflict resolution, the task allocation is more likely to follow the initial intention of the user when the conflict occurs, thereby ensuring a higher task completion rate.
[0060] Referring to Figure 7 When the number of tasks is fixed at 80, the average remaining time of the task gradually increases with the increase of the number of edge servers, because with the increase of edge servers, the available resources increase, and the number of servers available for selection for each task increases. It can also be seen that compared with the traditional heuristic algorithm, PPOWDM has superior performance, because in the process of multiple training, it pays more attention to long-term benefits, and can learn better decisions in the training process.
[0061] As can be seen from the above, the WARP-GA and PPOWDM of the cloud-edge-end collaborative scenario mobile crowd sensing data collection and calculation method proposed in the application show how to improve efficiency in this field through technical innovation, and provide a more efficient solution for cloud-edge-end collaborative crowd sensing task allocation and server selection problems.
[0062] The above described embodiments are intended to present a preferred implementation, but the protection scope of the application should not be limited by this. Any person skilled in the art, within the scope disclosed by the application, based on the technical solutions and concepts disclosed by the application, makes equivalent replacements or improvements, which should be regarded as belonging to the protection scope of the patent right of the application.
Claims
1. A method for allocating tasks in a cloud-edge-device collaborative crowd-intelligence perception system considering user wishes, characterized in that: A cloud-edge collaborative crowd-sensing system consists of mobile users, cloud platforms, task requesters, and edge servers. The sensor type held by the user is s i , the location of the task is l j , the start time and end time are and The task type is s j , the task value is val j , the available storage space of the edge server is arom p , the type of task that the server can handle is s p Task allocation is accomplished by matching users and tasks, and task computation is accomplished by matching users, tasks, and servers. The task allocation and task calculation schemes include: Task Assignment: S1. Generate an initial sequence of user execution intentions according to the user's generated initial intentions; S2. Using WARP-GA for task allocation, we first generate an initial population using a task sequence-based encoding method. S3. Perform crossover, selection, and mutation on the initialized population obtained in S2 to generate a new population; S4. Check the population obtained in S3 for conflicts. If there is an allocation plan that violates the detour distance constraint, perform conflict repair. For individuals that violate the detour distance constraint, accept the initial willingness in S1 with probability p; S5. Sort the obtained population in descending order according to fitness. The chromosome with the highest fitness is the final task allocation solution. Task calculation: S1. Initialize the actor network parameters θ, the critic network parameters ζ, the maximum training rounds ME, and the number of updates per training UT; S2. For a user u i , count the servers whose paths pass through the communication range, and add them to the user's available server list AES i ; S3. For each training round, the agent obtains the state s(t) from the environment and then performs the action a(t); S4. Update each user's AES. If no server exists that can directly compute the AES, change the direct computation mask in the action space, i.e., the action space changes from direct computation, wait computation, and forward computation to wait computation and forward computation. S5. Obtain the reward and obtain the policy entropy and action probability. Then store these variables in the experience pool and calculate the advantage function.
2. The method for allocating tasks in a cloud-edge-device collaborative crowd-intelligence perception system considering user wishes according to claim 1 is characterized in that: The user intention described in S1 is that the platform uses a hierarchical tree to pre-process tasks for users to retrieve in parallel. The goal is to maximize the platform's profit. The problem can be expressed as: where s j Indicates the type of heterogeneous tasks, s i Indicates the type of sensor held by the user. val j For task t j The value of , in this problem, is the fee paid by the task requester to the platform after the platform completes the task. |NoES| represents the number of times the edge server is used for calculation, not the quantity. p Represents the cost required for each edge server to perform data processing. i,j,p Indicates the compensation paid by the platform to the user. i,j Assign decision variables, x, to 0-1 i,j =1 means that task t j Assigned to user u i 。 C(u i ) represents the total cost of the user, which includes the mobility cost, perception cost, and uninstallation cost. The specific definitions are as follows: Perceived cost Unloading costs Mobile costs The specific process is as follows: For all incoming tasks, the platform generates a hierarchical tree based on skill type priority. This tree is then split into multiple subtrees based on skill type for concurrent user search. After completing the search, users report their willingness to perform tasks to the platform. The platform then generates an initial willingness sequence based on the collected willingness.
3. The method for task allocation considering user intentions in cloud-edge-device collaborative crowd intelligence perception according to claim 1 is characterized in that: The encoding method described in S2 is different from the 0-1 encoding method of previous genetic algorithms. The previous 0-1 encoding method is not applicable to this problem because the order in which users perform tasks in this problem will also affect the user's cost and thus affect the platform's profit. Therefore, we adopted an encoding method based on task sequence. Through this encoding method, we can not only know the content of the tasks performed by each user, but also the order in which users perform tasks.
4. The method for task allocation considering user intentions in cloud-edge-device collaborative crowd intelligence perception according to claim 1 is characterized in that: S3 uses a roulette wheel strategy when performing selection and only crosses over within the gene fragments of the same user when performing crossover operations.
5. The method for task allocation considering user intentions in cloud-edge-device collaborative crowd intelligence perception according to claim 1 is characterized in that: When performing conflict repair, S4 accepts the user's initial execution intention with probability p.
6. The method for task allocation considering user intentions in cloud-edge-device collaborative crowd intelligence perception according to claim 1 is characterized in that: S5 arranges the fitness in descending order and selects the individual with the highest fitness. The individual with the highest fitness has the best allocation plan.
7. The task calculation method for cloud-edge-device collaborative crowd intelligence perception according to claim 1 is characterized in that: After completing task allocation, the platform will perform server selection for all tasks. Due to resource and service heterogeneity, not all user paths have servers with the ideal type match and sufficient resources to directly perform calculations. Therefore, under such conditions, possible offloading situations include: being able to directly calculate, waiting for calculation, or forwarding calculations. During the server selection phase, the platform's goal is to maximize the average remaining time of all tasks. The average remaining time is defined as follows: in, α+β+γ=1, where α, β, and γ are all 0-1 variables, indicating that only one calculation method can be selected for each task. The remaining time for each calculation method is defined as follows: in is the duration of the task, c s is the duration of the perception data, Among them D j is the size of the task data, ε i is the rate at which users perceive data. c o Is the uninstallation time, o p is the rate at which the server accepts data. is the calculation duration, where f p is the calculation rate. where η p is the forwarding rate between servers. Is the waiting time, Since the server resources are changing dynamically at any time and the uninstall behaviors of users will affect each other, this paper uses deep reinforcement learning to select appropriate servers and calculation methods for all tasks. First, define the state, action and reward: S(t) = {ar p (t),l i (t),p∈k,i∈m},A(t)={x j,p (t),cm j (t),j∈n}, The penalty function P(s,a) is defined as follows: Where c is a constant and can be adjusted as needed. p (t) represents the edge server es at time t p Available resource status, l i (t) represents user u at time t i The position of x in the action space j,p (t) is represented by task t j Select Edge Server p Calculate, cm j (t) is represented by task t j The selected computation method is one of direct computation, waiting computation, and forward computation. This invention uses a proximal policy optimization algorithm with a dynamic masked action space for server selection. The proximal policy optimization algorithm is a policy-based reinforcement learning algorithm with a unique clipping mechanism to limit the policy update range and an experience replay mechanism to improve sample utilization efficiency. The masked action space is introduced to address the coupling issues that may arise when users offload tasks in large-scale task scenarios.
8. The task calculation method for cloud-edge-device collaborative crowd intelligence perception according to claim 1 is characterized in that: S2 for a user u i , count the servers whose paths pass through the communication range, and add them to the user's available server list AES i .
9. The task calculation method for cloud-edge-device collaborative crowd intelligence perception according to claim 1 is characterized in that: S4 updates the AES of each user. If there is no server that can directly calculate, the direct calculation mask in the action space is changed, that is, the action space changes from direct calculation, waiting calculation and forwarding calculation to waiting calculation and forwarding calculation.