Task allocation method and device based on Lyapunov optimization and graph convolutional network
By using a task allocation method based on Lyapunov optimization and graph convolutional networks, constructing a dynamic graph and using the DQN algorithm to optimize task allocation, the problem of inaccurate task allocation in traditional methods is solved, achieving higher accuracy and privacy protection.
Patent Information
- Application Number
- CN202510098300.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-01-22
AI Technical Summary
Traditional task allocation methods cannot accurately reflect the actual situation of tasks and workers, and cannot adapt to the dynamics and uncertainty in mobile crowdsensing scenarios, resulting in inaccurate task allocation results.
A task allocation method based on Lyapunov optimization and graph convolutional network is adopted. A dynamic graph is constructed by obtaining noisy user and task information, which is then processed using graph convolutional network and DQN algorithm. The task allocation process is optimized by combining Lyapunov optimization method and privacy-preserving state transition function.
It improves the accuracy of task allocation and can adapt to the dynamics and uncertainties in mobile crowd-sensing scenarios, while protecting user privacy and reducing the complexity of problem solving.
Smart Images

Figure CN120181425B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mobile crowdsensing technology. More specifically, the present application relates to a task allocation method and device based on Lyapunov optimization and graph convolutional networks. Background Art
[0002] Traditional task assignment methods, such as the patent application publication with publication number CN116843121A, disclose a mobile crowd-sensing task assignment method based on level matching, including grading all to-be-assigned tasks by difficulty and grading all available workers by ability; setting rewards for different to-be-assigned tasks based on difficulty levels; calculating the level matching between the level of each available worker and the level of all to-be-assigned tasks; calculating the profit of each available worker completing each to-be-assigned task based on the level matching, and calculating the time it takes for each available worker to complete each to-be-assigned task; using the ratio of profit to time as utility, calculating the utility of each available worker completing each to-be-assigned task; constructing a task assignment problem; solving the task assignment problem to generate a task sequence, assigning corresponding tasks to corresponding workers according to the generated task sequence, and having workers perform tasks according to the path planning results in the assigned task sequence. This method uses the difficulty level of the task and the ability level of the worker as prerequisites for task assignment. However, this level classification method is overly simplified and cannot accurately reflect the actual situation of tasks and workers. Furthermore, mobile crowdsensing scenarios are often dynamic and uncertain, such as the appearance and disappearance of tasks and the joining and leaving of workers. Hierarchical classification cannot accurately reflect the actual situation of tasks and workers, and therefore cannot adapt to the dynamic and uncertain nature of mobile crowdsensing scenarios, resulting in inaccurate task allocation results. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and apparatus for task allocation based on Lyapunov optimization and graph convolutional networks, which can improve the accuracy of task allocation. The present invention is mainly achieved through the following technical solutions:
[0004] A first aspect of an embodiment of the present application provides a task allocation method based on Lyapunov optimization and graph convolutional networks, comprising:
[0005] Obtaining a first dynamic graph of the current environment, wherein the first dynamic graph is constructed by at least one user attribute information and at least one task information, and each user attribute information and each task information is differentially private information obtained by performing noise processing using a Laplace mechanism;
[0006] The first dynamic graph is processed using a DQN algorithm based on Lyapunov optimization and graph convolutional network to obtain a task allocation result.
[0007] According to one embodiment of the present application, the task allocation method based on Lyapunov optimization and graph convolutional network also includes a training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network, and the training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network includes:
[0008] Obtain a second dynamic image of the historical environment;
[0009] Using the ∈-greedy strategy and the graph convolutional network used in the original DQN algorithm to calculate and process the second dynamic graph to obtain a first action;
[0010] After sending the first action to the historical environment, receiving a next dynamic graph and reward fed back by the historical environment based on the first action, wherein the next dynamic graph and the reward are calculated using a state transition function based on the Lyapunov optimization method and privacy protection;
[0011] storing the second dynamic image, the first action, the reward, and the next dynamic image as an experience in an experience replay area;
[0012] When the number of all experiences in the experience replay area reaches or exceeds the requirement of a preset batch of training data, randomly sampling from the experience replay area to obtain target experience;
[0013] calculating a target value based on the target experience;
[0014] Calculating a loss function based on the target value;
[0015] The network parameters of the graph convolutional network are adjusted based on the loss function, and the original DQN algorithm is updated to the DQN algorithm based on Lyapunov optimization and graph convolutional network.
[0016] According to one embodiment of the present application, the second dynamic graph is calculated and processed using the ∈-greedy strategy and the graph convolutional network used in the original DQN algorithm, and the calculation formula for obtaining the first action is:
[0017]
[0018] Among them, a t is the first action; ∈ is the control parameter of the ∈-greedy strategy; Q(s t ,a;ω) is the graph convolutional network pair s t and the Q value calculated by a; s tis the second dynamic graph; a is any feasible action; ω is the network parameter of the graph convolutional network.
[0019] According to one embodiment of the present application, the next dynamic graph and the reward are obtained by calculating a state transition function based on a Lyapunov optimization method and privacy protection, including the following steps:
[0020] Using a first preset algorithm to perform noise processing on the starting position information of the target user attribute information to obtain the target user position, wherein the target user attribute information is any user attribute information in the second dynamic graph;
[0021] Using the first preset algorithm to perform noise processing on task position information of target task information to obtain a target task position, wherein the target task information is any task information in the second dynamic graph;
[0022] Performing a self-increment operation on the current time slot; performing a self-decrement operation on the task expiration time of the target task information to obtain the target task expiration time;
[0023] Subtract one from the time required to complete the target task information to obtain the time required to complete the target task;
[0024] If the time required to complete the task of the target task information is equal to zero after performing a decrement operation, modifying the completion flag of the target task information;
[0025] performing the first action;
[0026] Generate a target edge corresponding to the target user attribute information and the target task information based on the target user location and the target task location;
[0027] Calculate the target task allocation queue and the target task processing queue based on the maximum task processing capability of the target user attribute information;
[0028] Calculate the queue entry speed based on the target task allocation queue;
[0029] The reward is calculated based on the target task allocation queue and the queue entry speed;
[0030] In the second dynamic graph, the starting position information of the target user attribute information is modified to the target user position, the task position of the target task information is modified to the target task position, the task expiration time of the target task information is modified to the target task expiration time, the time required for task completion of the target task information is modified to the time required for task completion, the edge corresponding to the target user attribute information and the target task information is modified to the target edge, the task allocation queue of the target user attribute information is modified to the target task allocation queue, and the task processing queue of the target user attribute information is modified to the target task processing queue, thereby obtaining the next dynamic graph.
[0031] According to one embodiment of the present application, after the step of calculating and obtaining the reward based on the target task allocation queue and the enqueuing speed, the step of calculating the next dynamic graph and the reward by calculating a state transition function based on the Lyapunov optimization method and privacy protection further includes:
[0032] Count the number of consecutive occurrences of no task assignment;
[0033] When the number of occurrences is greater than or equal to a preset value, the calculation process of the next dynamic image and the reward is terminated.
[0034] According to one embodiment of the present application, the calculation formula for calculating the enqueue speed based on the target task allocation queue is:
[0035]
[0036] Among them, r u,t is the queue entry speed; u is the target user attribute information; t is the current time slot; Allocate a queue for the target task; R max The maximum number of tasks for all users.
[0037] According to one embodiment of the present application, the calculation formula for obtaining the reward based on the target task allocation queue and the queue entry speed is:
[0038]
[0039] Among them, R(s t ,a t ) is the reward; t is the second dynamic graph; a t is the first action; V is the weight factor; b v is the task budget of the target task information; d is the embedding dimension; c uThe unit travel cost of the target user attribute information; Allocate a queue for the target task; u,t is the enqueuing speed; u is the target user attribute information; t is the current time slot; v is the target task information.
[0040] A second aspect of the embodiments of the present application provides a task allocation device based on Lyapunov optimization and graph convolutional networks, comprising:
[0041] an acquisition module, configured to acquire a first dynamic graph of the current environment, wherein the first dynamic graph is constructed from at least one user attribute information and at least one task information, and each user attribute information and each task information is differentially private information obtained by performing noise processing using a Laplace mechanism;
[0042] A processing module is used to process the first dynamic graph using a DQN algorithm based on Lyapunov optimization and graph convolutional network to obtain a task allocation result.
[0043] The third aspect of the embodiment of the present application provides a terminal device, including: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute the steps of the task allocation method based on Lyapunov optimization and graph convolutional network provided in the first aspect of the embodiment of the present application.
[0044] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute the steps of the task allocation method based on Lyapunov optimization and graph convolutional network provided in the first aspect of the embodiment of the present application.
[0045] The beneficial effects of the embodiments of the present application include:
[0046] The embodiment of the present application associates user attribute information and task information through a graph structure, constructs the relationship between task information and user attribute information, and at the same time, introduces the DQN algorithm based on Lyapunov optimization and graph convolutional network to fully capture the characteristics, potential interactions and global dependencies between task information and user attribute information, thereby providing a more accurate decision basis for online task allocation. Specifically, the embodiment of the present application is to obtain a first dynamic graph of the current environment, wherein the first dynamic graph is constructed by at least one user attribute information and at least one task information, each of which is noise-added using the Laplace mechanism to obtain differentially private information; the DQN algorithm based on Lyapunov optimization and graph convolutional network is used to process the first dynamic graph to obtain a task allocation result. Compared with the existing technology, the embodiment of the present application can fully consider the various nonlinear, spatiotemporal dependencies and other relationships between task information and user attribute information, and can truly reflect the actual situation of tasks and users. In addition, the reference of the graph structure can adapt to the dynamic and uncertain characteristics in the mobile crowd intelligence perception scenario, so that the present application implements the ability to improve the accuracy of task allocation.
[0047] Furthermore, the embodiment of the present application introduces the idea of graph problem modeling and Lyapunov optimization technology, which greatly reduces the complexity of problem solving while enhancing the model's ability to model complex dependencies in task allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 This is a technical framework diagram of the task allocation method based on Lyapunov optimization and graph convolutional network in some embodiments of the present application;
[0050] Figure 2 This is a flowchart of the task allocation method based on Lyapunov optimization and graph convolutional network in some embodiments of the present application;
[0051] Figure 3 This is a block diagram of the DQN algorithm based on Lyapunov optimization and graph convolutional networks;
[0052] Figure 4 This is a principle block diagram of a task allocation device based on Lyapunov optimization and graph convolutional network in some embodiments of the present application;
[0053] Figure 5 This is a principle block diagram of the terminal device of the present application in some embodiments. DETAILED DESCRIPTION
[0054] To make the above-mentioned objects, features, and advantages of the present application more clearly understood, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings. The following description sets forth many specific details to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar improvements without violating the scope of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0055] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0056] The terms "exemplary" or "for example" are used to indicate an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0057] The terms "comprises," "comprising," or any other variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.
[0058] The term "Lyapunov optimization" is a random network optimization theory. After research and optimization by Professor Neely and his team, the theory has become relatively mature and is no longer limited to the original control field. It has been applied to many fields. The Lyapunov optimization method is mainly used in systems with queues. In the mobile crowd-sensing task allocation scenario, tasks continuously arrive at the platform and are assigned to users for execution. A task queue can be formally constructed. In addition, considering that the user's ability to execute tasks is limited, that is, there is a threshold (user processing capacity) h j (t), so that This formula represents user u jThe number of tasks assigned in time slot t does not exceed its processing capacity. Then a virtual user processing queue can be introduced, which is defined as Combined with queue stability theory, queue P j (t) Only when assigned to user u j When the number of tasks is less than or equal to its processing capacity, it can remain stable. The application of Lyapunov optimization technology to solve problems mainly involves Lyapunov function, Lyapunov drift, and Lyapunov drift penalty function.
[0059] The term "Lyapunov function" is first constructed to perceive the task queue, assuming that Q(t) = (Q1(t),…,Q k (t)) is a vector that changes with time slot t. This vector represents the queue backlog process in a system consisting of k queues. For all queues in the model, a Lyapunov function L(t) is established, which is defined as the sum of the squares of all queue backlogs at time slot t, in the form of
[0060] The term "Lyapunov drift" introduces Lyapunov drift ΔQ(t) = E{L(t+1)-L(t)|Q(t)}, which represents the difference in the Lyapunov function from one time slot t to the next time slot t+1. If decisions are made in each time slot to greedily minimize this offset, the queue backlog will be pushed to a lower congestion state, maintaining network stability.
[0061] The term "Lyapunov drift penalty function" maps the objective function to an appropriate function penalty. This introduces the Lyapunov drift penalty function ΔQ(t)+VE{U(t)}, where the parameter V is a non-negative control parameter that adjusts the weight between minimizing system cost and maintaining system stability. A larger V value shifts the optimization focus toward minimizing cost, while a smaller V value shifts the optimization focus toward maintaining system stability. By adjusting the parameter value, a trade-off can be made between system stability and objective optimization. Greedily minimizing the Lyapunov drift penalty expression at each time slot ensures system stability while bringing the objective function closer to the optimal result.
[0062] The term "Deep Q-Network (DQN)" refers to the original DQN algorithm described in this article. It is a reinforcement learning method based on deep learning. It uses a deep neural network to approximate the action-value function and adopts experience replay and a fixed Q target to improve learning efficiency and stability. Experience replay reduces sample correlation and improves sample utilization by reusing past experience, thereby enhancing learning stability.
[0063] The term "graph convolutional network" (GCN) refers to a neural network model based on graph-structured data. It aims to aggregate information and learn representations of nodes in a graph through graph convolution operations. Its core idea is to update the feature representation of a node by aggregating information from its neighboring nodes. GCN updates the features of each node by iteratively aggregating information from its neighbors, ultimately generating a representation for the node. Its goal is to capture the structural relationships and interdependencies between nodes in the graph through this information transfer mechanism.
[0064] Differential privacy refers to a privacy-preserving technique that adds noise to private data, preventing attackers from accurately inferring personal information after the data is released. Differential privacy techniques balance privacy protection and data availability by setting an appropriate privacy budget, thereby effectively protecting and utilizing data. Common privacy-preserving mechanisms used in differential privacy include the Laplace mechanism, exponential mechanism, random response mechanism, and Gaussian mechanism. The Laplace mechanism is a simple and widely used privacy-preserving mechanism for numerical queries. For numerical query results, the Laplace mechanism achieves differential privacy by returning a result that adds noise that satisfies a Laplace distribution.
[0065] The term "Mobile Crowd Sensing (MCS)" refers to a system consisting of three parties: users (workers), a sensing platform, and data requesters. Data requesters publish tasks to the sensing platform, which then assigns them to appropriate users based on the requirements. After completing the tasks, users upload their data to the sensing platform, which then integrates and processes the data and returns the results.
[0066] Unless otherwise defined, all technical and scientific terms used in the specification of this application have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in the specification of this application includes any and all combinations of one or more of the relevant listed items.
[0067] Traditional task allocation methods use conventional deep reinforcement learning (DRL) methods to optimize task allocation performance metrics. Conventional deep reinforcement learning typically uses hand-crafted fixed-dimensional feature vectors to represent tasks and users (i.e., workers), and is unable to explicitly model complex relationships between entities such as users and tasks. However, the relationship between tasks and users is not just a linear or simple feature mapping, but rather includes a variety of nonlinear and spatiotemporal dependencies, all of which place higher demands on the optimization of online task allocation strategies. Due to the lack of sufficient consideration of these complex dependencies, traditional deep reinforcement learning exhibits certain limitations when dealing with complex dependencies between tasks. In particular, when faced with large-scale and high-dimensional tasks, it struggles to effectively capture global dependencies, resulting in weak generalization and scalability, and in turn, inaccurate task allocation.
[0068] To solve the above problems, the embodiment of this application proposes a task allocation method based on Lyapunov optimization and graph convolutional network, focusing on the research of "using differential privacy technology based on Laplace mechanism to perturb user location information to achieve privacy protection; and the perception platform uses deep reinforcement learning method to maximize platform benefits for online task allocation". The specific framework can be referred to Figure 1 shown.
[0069] The specific implementation of this application is further described below with reference to the accompanying drawings.
[0070] refer to Figure 2 As shown, it is a flowchart of a task allocation method based on Lyapunov optimization and graph convolutional network provided by the first aspect of the embodiment of the present application. The embodiment of the present application is applied to the perception platform of the mobile crowd intelligence perception system. Figure 2 In the embodiment, the task allocation method based on Lyapunov optimization and graph convolutional network includes:
[0071] S1. Obtain a first dynamic graph of the current environment, wherein the first dynamic graph is constructed by at least one user attribute information and at least one task information, and each user attribute information and each task information are differentially private information obtained by performing noise processing using a Laplace mechanism.
[0072] The current environment can be a physical device, a virtual space, a software application, an abstract concept space, or a combination thereof, depending on the application scenario of the intelligent agent.
[0073] The first dynamic graph can be represented as G t =(U t ,V t ,E t )=(Mt ,E t ), where G t is the first dynamic graph; U t is a set of user nodes, that is, a set of all user attribute information. One user attribute information corresponds to one user node; V t It is a set of task nodes, that is, a set of all task information. One task information corresponds to one task node. t is the set of edges between user nodes and task nodes; M t M is the set of user nodes and task nodes in time slot t. t The original features of each node (element) can be represented by a vector m, m = {id, x, y, f u,t ,c u ,Q u,t ,H u,t ,x u,t ,b v ,t v ,T v,t ,F v,a ,F v,f ,ms}, where id is the node number, x and y are the target nodes (i.e., M t The position of any node in the u When x and y are the starting position information of the user node, when the target node is the task node m v When x and y are the task positions of the task node; f u,t is the maximum travel capability of the user node in time slot t; c u is the unit travel cost of the user node; Q u,t is the task allocation queue of the user node; H u,t Is the task processing queue of the user node; x u,t is the maximum task processing capability of the user node in time slot t; b v is the task budget of the task node; t v is the task expiration time of the task node; T v,t is the time required to complete the task of the task node in time slot t; F v,a Is the allocation flag of the task node; F v,f Is the completion flag of the task node; ms is used to distinguish M t There are two types of nodes (i.e. user nodes and task nodes). When ms=1, the target node is the user node m u , when ms=0, the target node is task node m v For user node m u , initially defined as completing a b v , tv 、T v,t 、F v,a and F v,f All virtual tasks are 0; for task node m v , then define f at the initial u,t 、c u , Q u,t 、H u,t and x u,t The user attributes are all 0.
[0074] For E t , this embodiment of the application defines two types of edges. The first type of edge is the edge between the user node and the task node. u,v (t); The second type of edge is the edge between the user node and the task node e u1,u2 (t) and e v1,v2 (t).
[0075] Furthermore, regarding the first type of edge e u,v (t), the weight of each first-type edge is calculated according to the Manhattan distance between the two ends of the edge at time slot t. The specific calculation formula is:
[0076] L1(u,v)=|l u,t -l v,t | x +|l u,t -l v,t | y ;
[0077] e u,v (t) = L1(u,v);
[0078] Wherein, L1(u,v) is the Manhattan distance between the two ends of the edge at time slot t, u is the target user attribute information, and the target user attribute information is any one of all user attribute information; v is the target task information, and the target task information is any one of all task information; l u,t is the starting position information of the target user attribute information in time slot t; v,t is the task position of the target task information in time slot t; |l u,t -l v,t | x In the x-axis direction u,t and l v,t The distance between |l u,t -l v,t | y In the y-axis direction l u,t and l v,t The distance between u,v(t) is the weight of the edge between the target user attribute information and the target task information in time slot t.
[0079] Furthermore, the second type of edge is the edge between users and tasks. and The weight of each second-type edge is calculated based on the Manhattan distance between the two ends of the edge at time slot t and the cosine similarity of its features. The specific calculation formula is:
[0080]
[0081]
[0082] Among them, u1 is the target user attribute information, u2 is a user attribute information other than the target user attribute information in all user attribute information, The target user attribute information is in M t The corresponding node in is a user attribute information in all user attribute information except the target user attribute information in M t The corresponding node in , v1 is the target task information, v2 is a task information in all task information except the target task information, The target task information is in M t The corresponding node in For a task information other than the target task information in all task information, t The corresponding node in, cos() is the cosine similarity, is the edge between user attribute information (it can also be understood as the edge between users). is the edge between task information (it can also be understood as the edge between tasks). is the starting position information of u1 in time slot t, is the starting position information of u2 in time slot t, is the task position of v1 in time slot t, is the task position of v2 in time slot t, L1(u1,u2) is the Manhattan distance between the two ends of the edge within the user attribute information, L1(v1,v2) is the Manhattan distance between the two ends of the edge within the task information, In the x-axis direction and The distance between In the y-axis direction and The distance between In the x-axis direction and The distance between In the y-axis direction and The distance between them.
[0083] The user attribute information includes starting location information, maximum travel capacity, unit travel cost, and maximum task processing capacity. To protect the privacy of each user (i.e., worker) and prevent attackers from obtaining and abusing each user's real location, this embodiment of the application uses a local differential privacy method based on the Laplace mechanism to protect the user's location. Therefore, the user location received by the sensing platform is the location information after perturbation processing.
[0084] More specifically, the user's location can be represented by coordinates, which are composed of a longitude coordinate component and a latitude coordinate component. Since coordinates are numerical data, the embodiment of the present application uses the Laplace mechanism to add random variables that satisfy the Laplace distribution to the longitude coordinate component and the latitude coordinate component respectively, so as to perturb the longitude coordinate component and the latitude coordinate component respectively, thereby achieving the purpose of satisfying the user's location privacy. The random variables (i.e., random noise values) corresponding to the longitude coordinate component and the latitude coordinate component satisfy the mean of 0 and the variance of 2b. 2 Laplace(b) distribution. For Laplace(b) distribution, its probability density function is Where b is the noise scaling factor, Δf is the sensitivity, ε is the privacy budget, x is the random variable, and e is the exponential function with the natural constant e as the base, which is used to describe the probability density when the random variable takes a certain value.
[0085] In the embodiment of the present application, Laplace noise is added to the real coordinates of the target user (that is, any one of all users), and the calculation formula for the position coordinates after the noise is obtained is: Among them, l′ u,t is the position coordinate after adding noise; x′ j is the horizontal coordinate data of the position coordinate after adding noise; j is the vertical coordinate data of the position coordinate after noise addition; j is the longitude coordinate component of the real coordinates of the target user; j is the dimensional coordinate component of the target user's real coordinate; Δf is the sensitivity; ε is the privacy budget.
[0086] The position coordinates after adding noise can be understood as confused positions.
[0087] Each of the task information includes a task location, a task budget, a task expiration time, a task completion time, an allocation flag, and a completion flag. The allocation flag and the completion flag are both initialized to 0.
[0088] After the embodiment of the present application obtains the confused position of the user and the true position of the perception task (that is, the task position), the perception platform needs to assign the perception task to the appropriate user online, so as to optimize the objective function, that is, minimize the moving distance of the perception user, so as to maximize the benefits of the perception platform.
[0089] Furthermore, the allocation cost of the target task information (i.e., any one of the task information) allocated by the perception platform to the target user corresponding to the target user attribute information (i.e., any one of the at least one user attribute information) can be calculated by combining the starting position information, the task position, and the unit travel cost in the current time slot t. Specifically, the calculation formula of the allocation cost is: C u,v =c u ∥l u,t -l v ∥; among them, C u,v is the allocation cost, c u is the unit travel cost of the target user attribute information, ||l u,t -l v || is the Manhattan distance between the starting location information of the target user attribute information and the task location of the target task information at the current time slot t, l u,t is the starting position information of the target user attribute information at the current time slot t, l v is the task position of the target task information, u is the target user attribute information, and v is the target task information (can also be expressed as target task).
[0090] Furthermore, in each time slot, in order to match the optimal solution that ultimately brings more benefits to the platform under the limited walking ability of each user, in the embodiment of the present application, the calculation formula for the platform benefit brought by assigning the target task information to the target user is: B u,v =b v -C u,v Among them, B u,v is the platform benefit brought by assigning the target task information to the target user, b v is the task budget of the target task information, C u,v is the allocation cost.
[0091] Furthermore, the calculation formula for the platform benefits brought by all the allocation results of the current time slot is: B t =∑ u∈J ∑ v∈V A u,v B u,v Among them, B t is the platform revenue brought by all allocation results; u is the target user attribute information; J is all user attribute information; v is the target task information; V is all target task information; A u,v Whether to assign the target task information v to the target user attribute information u (ie, the target user); A u,v ∈{0,1}, when the target user attribute information u is assigned the target task information v, A u,v is 1, when the target task information v is not assigned to the target user attribute information u, A u,v is 0; B u,v The platform revenue generated by assigning the target task information to the target user. There are two ways for the perception platform to increase platform revenue: first, encourage users to perform tasks with higher rewards as much as possible to earn more rewards; second, select users who are closest to the task or have the lowest unit travel cost to perform the task, thereby reducing allocation costs.
[0092] Furthermore, the reward function corresponding to the reward is expressed as:
[0093]
[0094] Among them, R(s t ,a t ) is the reward; t is the second dynamic graph; a t is the first action; V is the weight factor; b v is the task budget of the target task information; d is the embedding dimension; c u The unit travel cost of the target user attribute information; Allocate a queue for the target task; u,t is the enqueuing speed; u is the target user attribute information; t is the current time slot; v is the target task information.
[0095] It should also be understood that the reward function is one of the five core elements (or quintuples) in the Markov decision process. In the Markov decision process, the quintuples are the state space S, the action space A, the state transition function P, the reward function R, and the discount factor (or discount coefficient) γ, γ∈[0,1], which is used to weigh the importance of long-term rewards and immediate rewards. The Markov decision process can transform the problem to be solved into a reinforcement learning problem.
[0096] For the state space, the embodiment of the present application uses the second dynamic graph G t =(U t ,V t ,E t )=(M t ,E t ) as state input. E t The internal weights represent the relationships between users, users and tasks, and tasks and tasks. t The definition of internal weights is also different.
[0097] The action space is a vector ux3, which indicates whether each user is assigned a feasible user-task pair (user number, task number, Manhattan distance) or whether the user remains in place without any task assignment. Therefore, the action space A only includes feasible user-task pairs and user-specific stop actions. "Feasible" means that after selecting a user-task pair, the following constraints are still met:
[0098]
[0099] in, is a universal quantization symbol; u is the target user attribute information (i.e., any one user attribute information among all user attribute information); U is all user attribute information (one user corresponds to one user attribute information); v is the target task information (i.e., any one task information among all task information); V is all task information; B is the total revenue of the perception platform; T is the total duration, T = {1,…,t,…,T}; t is the current time slot t; B t Platform benefits from all distribution results; A u,v b) whether to assign the target task information v to the target user attribute information u (ie, the target user); v The task budget for the target task information; c u The unit travel cost of the target user attribute information; u,t is the starting position information of the target user attribute information at the current time slot t; v is the task location of the target task information;u,t+1 is the maximum task processing capacity of the target user attribute information in time slot t+1; x u,0 is the maximum task processing capability of the target user attribute information in time slot 0; f u,t+1 is the maximum travel capability of the target user attribute information in time slot t+1; f u,t is the maximum travel capability of the target user attribute information in time slot t; f u,0 is the maximum traveling capability of the target user attribute information in time slot 0; Γ v is the completion time of the assigned task; t v is the task expiration time; V A is the set of assigned tasks; T v,t+1 is the time required to complete the task in time slot t+1; T v,t is the time required to complete the task in time slot t; T v,0 is the time required to complete the task in time slot 0; V u′ is the task set of user u′; u′ is another user different from u.
[0100] S2. Use the DQN algorithm based on Lyapunov optimization and graph convolutional network to process the first dynamic graph to obtain a task allocation result.
[0101] For example, the principle block diagram of the DQN algorithm based on Lyapunov optimization and graph convolutional network can be referred to Figure 3 As shown. Figure 3 In the example, the second dynamic graph is expressed as "state (S)", the next dynamic graph is expressed as "next state (S')", and the first action is expressed as "action (a)".
[0102] In the above implementation, the embodiment of the present application associates user attribute information and task information through a graph structure, constructs the relationship between task information and user attribute information, and at the same time, introduces the DQN algorithm based on Lyapunov optimization and graph convolutional network to fully capture the characteristics, potential interactions and global dependencies between task information and user attribute information, thereby providing a more accurate decision-making basis for online task allocation. Compared with the prior art, the embodiment of the present application can fully consider the various nonlinear, spatiotemporal dependencies and other relationships between task information and user attribute information, and can truly reflect the actual situation of tasks and users. Moreover, the reference to the graph structure can adapt to the dynamic and uncertain characteristics in mobile crowd intelligence perception scenarios, so that the implementation of the present application can improve the accuracy of task allocation.
[0103] The embodiments of this application introduce graph problem modeling and Lyapunov optimization techniques, which enhance the model's ability to model complex dependencies in task allocation while significantly reducing the complexity of problem solving. Lyapunov optimization transforms the long-term optimization objective and constraint problem into an optimization problem aimed at minimizing perceived cost, while also incorporating constraints on fair user participation. This effectively decouples short-term decisions from long-term goals while ensuring the long-term stability of the system, achieving a balance between the two.
[0104] In addition, the embodiment of the present application uses the Laplace mechanism to perform noise processing on user attribute information and disturbs the user's location information, so that user privacy is protected and user participation enthusiasm is greatly improved. Compared with privacy schemes using traditional encryption technology, this scheme has smaller computational complexity and higher efficiency.
[0105] In some embodiments, the task allocation method based on Lyapunov optimization and graph convolutional network further includes a training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network, and the training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network includes:
[0106] S31. Obtain a second dynamic image of the historical environment.
[0107] The historical environment and the current environment should be the same environment.
[0108] The data structure and data format of the second dynamic graph are the same as those of the first dynamic graph.
[0109] S32. Use the ∈-greedy strategy and the graph convolutional network used in the original DQN algorithm to perform calculation processing on the second dynamic graph to obtain a first action.
[0110] The Graph Convolutional Network (GCN) is a neural network model based on graph-structured data. It aims to aggregate information and learn representations of nodes in the graph through graph convolution operations. Its core idea is to update the feature representation of a node by aggregating information from its neighboring nodes. GCN updates the features of each node by iteratively aggregating information from its neighbors, ultimately generating a representation of the node. Its goal is to capture the structural relationships and interdependencies between nodes in the graph through this information transfer mechanism.
[0111] Furthermore, the calculation formula of step S32 is:
[0112]
[0113] Among them, a tis the first action; ∈ is the control parameter of the ∈-greedy strategy; Q(s t ,a;ω) is the graph convolutional network pair s t and the Q value calculated by a; s t is the second dynamic graph; a is any feasible action; ω is the network parameter of the graph convolutional network.
[0114] When ∈ is large, the system tends to explore more and avoid converging to the local optimal solution too early; when ∈ is small, the system relies more on current knowledge and tends to choose the optimal action. As training progresses, ∈ will gradually decrease so that the system can gradually converge to the global optimal solution during the continuous optimization process.
[0115] S33. After sending the first action to the historical environment, receive a next dynamic graph and reward fed back by the historical environment based on the first action, where the next dynamic graph and the reward are calculated using a state transition function based on the Lyapunov optimization method and privacy protection.
[0116] Furthermore, the next dynamic graph and the reward are obtained by calculating a state transition function based on a Lyapunov optimization method and privacy protection, including the following steps:
[0117] S331: Use a first preset algorithm to perform noise processing on the starting position information of the target user attribute information to obtain the target user position, where the target user attribute information is any user attribute information in the second dynamic graph.
[0118] Specifically, the calculation formula for the step of using the first preset algorithm to perform noise processing on the starting position information of the target user attribute information to obtain the target user position is:
[0119]
[0120] Among them, l′ u,t is the target user location; x′ j is the horizontal coordinate data of the target user's position; j is the vertical coordinate data of the target user's position; j is the longitude coordinate component of the real coordinates of the target user attribute information; j is the dimensional coordinate component of the real coordinate of the target user attribute information; Δf is the sensitivity; ε is the privacy budget.
[0121] S332: Use the first preset algorithm to perform noise processing on the task position information of the target task information to obtain the target task position, where the target task information is any task information in the second dynamic graph.
[0122] Specifically, the calculation formula for the step of using the first preset algorithm to perform noise processing on the task position information of the target task information to obtain the target task position is:
[0123]
[0124] Among them, l′ v,t is the target task position; x′ z is the horizontal coordinate data of the target task position; z is the vertical coordinate data of the target task position; z is the longitude coordinate component of the real coordinate of the target task location; z is the dimensional coordinate component of the true coordinate of the target task location; Δf is the sensitivity; ε is the privacy budget.
[0125] S333: Perform a self-increment operation on the current time slot.
[0126] S334: Subtract one from the target task expiration time to obtain the target task expiration time.
[0127] S335: Subtract one from the time required to complete the target task information to obtain the time required to complete the target task.
[0128] S336: If the time required to complete the task of the target task information is equal to zero after the decrement operation, modify the completion flag of the target task information.
[0129] S337: Execute the first action.
[0130] S338: Generate a target edge corresponding to the target user attribute information and the target task information based on the target user location and the target task location.
[0131] The target edge includes two types of edges, one of which is the edge between the user node and the task node. Another type of edge is the edge between the user node and the task node. and
[0132] about The calculation formula is:
[0133]
[0134] in, is the Manhattan distance between the two ends of the edge at time slot t, u is the target user attribute information, and the target user attribute information is any one of all user attribute information; v is the target task information, and the target task information is any one of all task information; l′ u,t is the target user location; l′ v,t is the target task location; |l′ u,t -l′ v,t | x is in the x-axis direction l′ u,t and l′ v,t The distance between |l′ u,t -l′ v,t | y is in the y-axis direction l′ u,t and l′ v,t the distance between them; is the weight of the edge between the target user attribute information and the target task information in time slot t.
[0135] about and The calculation formula is:
[0136]
[0137] Among them, u1 is the target user attribute information, u2 is a user attribute information other than the target user attribute information in all user attribute information, The target user attribute information is in M t The corresponding node in is a user attribute information in all user attribute information except the target user attribute information in M t The corresponding node in , v1 is the target task information, v2 is a task information in all task information except the target task information, The target task information is in M t The corresponding node in For a task information other than the target task information in all task information, t The corresponding node in, cos() is the cosine similarity, is the edge between user attribute information (it can also be understood as the edge between users). is the edge between task information (it can also be understood as the edge between tasks). is the target user position of u1 in time slot t, is the target user position of u2 in time slot t, is the target task position of the task position of v1 in time slot t, is the target task bit of v2 in time slot t, is the Manhattan distance between the two ends of the edge within the user attribute information, is the Manhattan distance between the two ends of the edge within the task information, In the x-axis direction and The distance between In the y-axis direction and The distance between In the x-axis direction and The distance between In the y-axis direction and The distance between them.
[0138] S339: Calculate a target task allocation queue and a target task processing queue based on the maximum task processing capability of the target user attribute information.
[0139] Furthermore, the calculation formula of the target task allocation queue is:
[0140]
[0141] in, Allocate a queue for the target task; Q u,t Assign a queue to the task of the target user attribute information in time slot t; u,t is the maximum task processing capability of the target user attribute information in time slot t; r u,t is the maximum number of tasks assigned to the user in time slot t; u is the attribute information of the target user; t is the current time slot t.
[0142] Furthermore, the calculation formula of the target task processing queue is:
[0143]
[0144] in, Processing queue for the target task; H u,t A task processing queue for the target user attribute information; x u,0 is the maximum task processing capability of the target user attribute information in time slot 0; u,t is the maximum task processing capability of the target user attribute information in time slot t; u is the target user attribute information.
[0145] Task processing queue H u,t It is a virtual queue used to assist in maintaining the queue Q u,tStability of the target task processing queue It is a virtual queue used to assist in maintaining the queue stability.
[0146] According to Lyapunov stability theory, the problem of maintaining system stability can be transformed into maintaining the stability of these two queues.
[0147] Specifically, about the Lyapunov function:
[0148] For each time slot t, it is assumed that the quadratic Lyapunov function L(Q t ) is a scalar measure of the total queue backlog in the queuing network, and its calculation formula is:
[0149]
[0150] Among them, L(Q t ) is the quadratic Lyapunov function; N is the total number of all user attribute information; u is the target user attribute information; The square of the queue allocated to the target task; t is the current time slot t.
[0151] Set QH t =(Q t ,H t ) represents the backlog of all queues in time slot t, and the Lyapunov function L(QH t ) is defined as:
[0152]
[0153] Among them, L(QH t ) is the Lyapunov function; N is the total number of all user attribute information; u is the target user attribute information; The square of the queue allocated to the target task; t is the current time slot; is the square of the target task processing queue.
[0154] The Lyapunov function L(QH t ) By adding the squares of the backlogs of the two queues, the overall state of the system is effectively measured, reflecting the impact of the queue backlog. In order to maintain the stability of the system, the Lyapunov function L(QH t ) for research.
[0155] Specifically, by taking the derivative of the Lyapunov function, the Lyapunov drift ΔL(QH t). This drift represents the Lyapunov function L(QH t ) changes at time slot t, and its expression is as follows:
[0156] ΔL(QH t )=E{L(QH t+1 )-L(QH t )∣QH t};
[0157] Where, ΔL(QH t ) is the Lyapunov drift; L(QH t+1 is the Lyapunov function corresponding to time slot t+1; L(QH t ) is the Lyapunov function corresponding to time slot t; QH t is the backlog of all queues in time slot t; E is the mathematical expectation or expected value.
[0158] Regarding the Lyapunov drift penalty function: Adding the objective function after the Lyapunov drift gives the drift penalty function at time slot t, which is expressed as follows:
[0159] ΔL(QH t )-V·E[B t ∣QH t ];
[0160] Where, ΔL(QH t ) is the Lyapunov drift; V is a non-negative parameter that balances system stability and objective function maximization, V>0; E is the mathematical expectation or expected value; B t The platform revenue brought by all the allocation results of the current time slot; QH t is the backlog of all queues in time slot t. As V approaches positive infinity, the system favors maximizing the objective function over maintaining stability. Conversely, as V approaches 0, the system favors maintaining stability over maximizing the objective function. Intuitively, as the formula decreases, the resulting system becomes more stable and the objective function becomes larger.
[0161] Regarding the upper bound of the Lyapunov drift penalty: When the given parameter V>0, for any feasible solution in any time slot t, the upper bound of the Lyapunov drift penalty function is:
[0162]
[0163] Among them, X max Indicates the maximum value of all task processing capabilities; R maxIndicates the maximum number of tasks that the system can distribute to all users.
[0164] While maintaining the stability of the system, the ultimate platform benefit is maximized within the limited walking capabilities of all users. This goal can be transformed into minimizing the upper bound of the above formula. u,t t,x u,0 and queue Q u,t With H u,t The situation is known, so the system only needs to optimize the following formula to optimize the target. The specific formula is:
[0165]
[0166] Among them, r u,t The meaning of other parameters is the same as the above parameters, so they are not repeated here.
[0167] S340: Calculate the queue entry speed based on the target task allocation queue.
[0168] Furthermore, the calculation formula of step S340 is:
[0169]
[0170] Among them, r u,t is the queue entry speed; u is the target user attribute information; t is the current time slot; Allocate a queue for the target task; R max The maximum number of tasks for all users.
[0171] S341. Calculate the reward based on the target task allocation queue and the queue entry speed.
[0172] Furthermore, the calculation formula of step S341 is:
[0173]
[0174] Among them, R(s t ,a t ) is the reward; t is the second dynamic graph; a t is the first action; V is the weight factor; b v is the task budget of the target task information; d is the embedding dimension; c u The unit travel cost of the target user attribute information; Allocate a queue for the target task; u,t is the enqueuing speed; u is the target user attribute information; t is the current time slot; v is the target task information.
[0175] In the embodiment of the present application, the reward can also be expressed as r(t) or r(refer to Figure 3 shown).
[0176] S342. In the second dynamic graph, the starting position information of the target user attribute information is modified to the target user position, the task position of the target task information is modified to the target task position, the task expiration time of the target task information is modified to the target task expiration time, the time required for task completion of the target task information is modified to the time required for task completion, the edge corresponding to the target user attribute information and the target task information is modified to the target edge, the task allocation queue of the target user attribute information is modified to the target task allocation queue, and the task processing queue of the target user attribute information is modified to the target task processing queue, thereby obtaining the next dynamic graph.
[0177] Furthermore, after step S341, the next dynamic graph and the reward are obtained by calculating a state transition function based on the Lyapunov optimization method and privacy protection, and the step further includes:
[0178] S343. Calculate the number of consecutive occurrences of no task allocation.
[0179] S344. When the number of occurrences is greater than or equal to a preset value, the calculation process of the next dynamic image and the reward is terminated.
[0180] Furthermore, before step S338, the next dynamic graph and the reward are obtained by calculating a state transition function based on the Lyapunov optimization method and privacy protection, and the step further includes:
[0181] Calculate the platform benefits brought by all allocation results in the current time slot.
[0182] S34: Store the second dynamic image, the first action, the reward, and the next dynamic image as an experience in an experience replay area.
[0183] S35. When the number of all experiences in the experience replay area reaches or exceeds the requirement of a preset batch of training data, randomly sample from the experience replay area to obtain target experience.
[0184] The preset batch training data is 64 batches of training data. In other embodiments, it can also be 128 batches of training data or 256 batches of training data. The specific setting can be made by those skilled in the art according to actual needs.
[0185] S36. Calculate a target value based on the target experience.
[0186] Furthermore, the calculation formula of step S36 is:
[0187] Q ta =r(t)+γarg max a′ Q(s′,a′;ω);
[0188] Among them, Q ta is the target value; r(t) is the reward; γ is the discount factor, which is used to reduce the impact of future rewards on current decisions and ensure the finiteness of long-term rewards; Q() is the graph convolutional network; s′ is the next dynamic graph; a′ is the first action; ω is the network parameter of the graph convolutional network.
[0189] The target value can be understood as a predicted task allocation result.
[0190] S37. Calculate a loss function based on the target value.
[0191] Furthermore, the calculation formula of step S37 is:
[0192] L ω =(r(t)+γarg max a′ Q(s′,a′;ω)-Q(s,a;ω)) 2 ;
[0193] Among them, L ω is the loss function; r(t) is the reward; γ is the discount factor; a′ is the first action; Q() is the graph convolutional network; s′ is the next dynamic graph; ω is the network parameter of the graph convolutional network; s is the second dynamic graph; a is the first action.
[0194] It can also be understood that the embodiment of the present application defines the loss function of DQN as the variance between the target value and the predicted value, and the target value is r(t)+γarg max a′ Q(s′, a′; ω), the predicted value is Q(s, a; ω).
[0195] The embodiment of the present application uses the Stochastic Gradient Descent (SGD) method to minimize the loss function, thereby updating the deep Q network parameters.
[0196] S38. Adjust the network parameters of the graph convolutional network based on the loss function, and update the original DQN algorithm to the DQN algorithm based on Lyapunov optimization and graph convolutional network.
[0197] refer to Figure 4As shown in FIG, a principle block diagram of a task allocation device based on Lyapunov optimization and graph convolutional network is provided in the second aspect of the embodiment of the present application. Figure 4 In the embodiment, the task allocation device 100 based on Lyapunov optimization and graph convolutional network includes:
[0198] An acquisition module 101 is configured to acquire a first dynamic graph of the current environment, wherein the first dynamic graph is constructed from at least one user attribute information and at least one task information, wherein each user attribute information and each task information is differentially private information obtained by performing noise processing using a Laplace mechanism;
[0199] The processing module 102 is used to process the first dynamic graph using a DQN algorithm based on Lyapunov optimization and graph convolutional network to obtain a task allocation result.
[0200] The third aspect of the embodiment of the present application provides a terminal device, the principle block diagram of the terminal device can be as follows: Figure 5 As shown. The terminal device includes a processor, a memory, a network interface, a display screen and a temperature sensor connected via a system bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a task allocation method based on Lyapunov optimization and graph convolutional network is implemented. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor is pre-set inside the terminal device to detect the operating temperature of the internal device.
[0201] Those skilled in the art will understand that Figure 5 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the terminal device to which the solution of the present invention is applied. The specific terminal device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0202] In some embodiments, an embodiment of the present application provides a terminal device, the terminal device including a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the steps of the task allocation method based on Lyapunov optimization and graph convolutional networks provided in the first aspect of the embodiment of the present application. A fourth aspect of the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium being used to store a computer program, the computer program causing a computer to execute the steps of the task allocation method based on Lyapunov optimization and graph convolutional networks provided in the first aspect of the embodiment of the present application.
[0203] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described embodiments. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0204] The technical features of the above embodiments can be combined without changing the basic principles of this application. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0205] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of patent protection for the present application shall be determined by the appended claims.
Claims
1. A task allocation method based on Lyapunov optimization and graph convolutional network, characterized in that: include: Obtaining a first dynamic graph of the current environment, wherein the first dynamic graph is constructed by at least one user attribute information and at least one task information, and each user attribute information and each task information is differentially private information obtained by performing noise processing using a Laplace mechanism; Using a DQN algorithm based on Lyapunov optimization and graph convolutional network to process the first dynamic graph to obtain a task allocation result; The task allocation method based on Lyapunov optimization and graph convolutional network also includes a training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network. The training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network includes: Get the second dynamic map of the historical environment; use -The graph convolutional network used in the greedy strategy and the original DQN algorithm calculates and processes the second dynamic graph to obtain a first action; after sending the first action to the historical environment, the next dynamic graph and reward fed back by the historical environment based on the first action are received, and the next dynamic graph and the reward are obtained by calculating the state transition function based on the Lyapunov optimization method and privacy protection; the second dynamic graph, the first action, the reward and the next dynamic graph are stored as an experience in the experience replay area; when the number of all experiences in the experience replay area reaches or exceeds the requirement of a preset batch of training data, the target experience is randomly sampled from the experience replay area; the target value is calculated based on the target experience; the loss function is calculated based on the target value; the network parameters of the graph convolutional network are adjusted based on the loss function, and the original DQN algorithm is updated to the DQN algorithm based on Lyapunov optimization and graph convolutional network.
2. The task allocation method based on Lyapunov optimization and graph convolutional network according to claim 1, characterized in that: The adoption The greedy strategy and the graph convolutional network used in the original DQN algorithm perform computation on the second dynamic graph to obtain the calculation formula for the first action: ; in, is the first action; For the -Control parameters of the greedy strategy; For the graph convolutional network and Calculated Q value; is the second dynamic graph; Any action that can be taken; are the network parameters of the graph convolutional network.
3. The task allocation method based on Lyapunov optimization and graph convolutional network according to claim 1, characterized in that: The next dynamic graph and the reward are obtained by calculating a state transition function based on the Lyapunov optimization method and privacy protection, including the following steps: Using a first preset algorithm to perform noise processing on the starting position information of the target user attribute information to obtain the target user position, wherein the target user attribute information is any user attribute information in the second dynamic graph; Using the first preset algorithm to perform noise processing on task position information of target task information to obtain a target task position, wherein the target task information is any task information in the second dynamic graph; Perform a self-increment operation on the current time slot; Subtract one from the target task expiration time to obtain the target task expiration time. Subtract one from the time required to complete the target task information to obtain the time required to complete the target task; If the time required to complete the task of the target task information is equal to zero after performing a decrement operation, modifying the completion flag of the target task information; performing the first action; Generate a target edge corresponding to the target user attribute information and the target task information based on the target user location and the target task location; Calculate the target task allocation queue and the target task processing queue based on the maximum task processing capability of the target user attribute information; Calculate the queue entry speed based on the target task allocation queue; The reward is calculated based on the target task allocation queue and the queue entry speed; In the second dynamic graph, the starting position information of the target user attribute information is modified to the target user position, the task position of the target task information is modified to the target task position, the task expiration time of the target task information is modified to the target task expiration time, the time required for task completion of the target task information is modified to the time required for task completion, the edge corresponding to the target user attribute information and the target task information is modified to the target edge, the task allocation queue of the target user attribute information is modified to the target task allocation queue, and the task processing queue of the target user attribute information is modified to the target task processing queue, thereby obtaining the next dynamic graph.
4. The task allocation method based on Lyapunov optimization and graph convolutional network according to claim 3 is characterized in that: After the step of calculating and obtaining the reward based on the target task allocation queue and the enqueuing speed, the step of calculating the next dynamic graph and the reward by calculating a state transition function based on the Lyapunov optimization method and privacy protection further includes: Count the number of consecutive occurrences of no task assignment; When the number of occurrences is greater than or equal to a preset value, the calculation process of the next dynamic image and the reward is terminated.
5. The task allocation method based on Lyapunov optimization and graph convolutional network according to claim 3, characterized in that: The calculation formula for the step of calculating the queue entry speed based on the target task allocation queue is: ; in, is the enqueue speed; The target user attribute information; is the current time slot; Allocating a queue for the target task; The maximum number of tasks for all users.
6. The task allocation method based on Lyapunov optimization and graph convolutional network according to claim 3, characterized in that: The calculation formula for the step of calculating the reward based on the target task allocation queue and the queue entry speed is: ; in, for said reward; is the second dynamic graph; is the first action; is the trade-off factor; A task budget for the target task information; is the embedding dimension; The unit travel cost of the target user attribute information; Allocating a queue for the target task; is the enqueue speed; The target user attribute information; is the current time slot; The target task information.
7. A task allocation device based on Lyapunov optimization and graph convolutional network, characterized in that: include: an acquisition module, configured to acquire a first dynamic graph of the current environment, wherein the first dynamic graph is constructed from at least one user attribute information and at least one task information, and each user attribute information and each task information is differentially private information obtained by performing noise processing using a Laplace mechanism; A processing module, configured to process the first dynamic graph using a DQN algorithm based on Lyapunov optimization and graph convolutional network to obtain a task allocation result; The task allocation device based on Lyapunov optimization and graph convolutional network is also used to execute the training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network, and the training step of the DQN algorithm based on Lyapunov optimization and graph convolutional network includes: obtaining a second dynamic graph of the historical environment; using -The graph convolutional network used in the greedy strategy and the original DQN algorithm calculates and processes the second dynamic graph to obtain a first action; after sending the first action to the historical environment, the next dynamic graph and reward fed back by the historical environment based on the first action are received, and the next dynamic graph and the reward are obtained by calculating the state transition function based on the Lyapunov optimization method and privacy protection; the second dynamic graph, the first action, the reward and the next dynamic graph are stored as an experience in the experience replay area; when the number of all experiences in the experience replay area reaches or exceeds the requirement of a preset batch of training data, the target experience is randomly sampled from the experience replay area; the target value is calculated based on the target experience; the loss function is calculated based on the target value; the network parameters of the graph convolutional network are adjusted based on the loss function, and the original DQN algorithm is updated to the DQN algorithm based on Lyapunov optimization and graph convolutional network.
8. A terminal device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the steps of the task allocation method based on Lyapunov optimization and graph convolutional network as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store a computer program, which enables a computer to execute the steps of the task allocation method based on Lyapunov optimization and graph convolutional network as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Mobile crowd sensing task allocation method and management system based on grade matching degree
CN116843121A
Workflow scheduling method and system based on graph convolutional neural network
CN112711475A
Mobile crowd sensing task allocation method and device, electronic equipment and storage medium
CN118265085A