Dynamic and efficient unmanned system distributed task allocation method
By adopting consistent packet algorithm and multithreading technology in the distributed task allocation method of unmanned systems, combined with the time beat control mechanism, the problem of performance degradation of existing methods when dealing with large-scale agents and tasks is solved, and rapid response and efficient task allocation to dynamic task sets and agent sets are achieved.
Patent Information
- Application Number
- CN202411946937.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-06
AI Technical Summary
The existing distributed task allocation method for unmanned systems has degraded performance when dealing with large-scale agents and tasks, and cannot meet scenarios with high timeliness requirements, and cannot effectively utilize the constraint relationship between tasks.
A dynamic and efficient distributed task allocation method for unmanned systems is adopted, and a consistency package algorithm (CBBA) is used as the basic processing logic. Through multi-threading technology and time beat control mechanism, task package construction and conflict resolution are realized, improving the flexibility and robustness of the system.
It realizes rapid response to dynamic task sets and agent sets, improves the flexibility and robustness of the algorithm, and meets the scenario requirements with high timeliness requirements.
Smart Images

Figure CN119938319A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer technology, and in particular relates to a dynamic and efficient unmanned system distributed task allocation method. Background Art
[0002] With the rapid development of unmanned equipment, the cooperation mechanism of unmanned systems has become a key factor for unmanned equipment to take advantage of its cluster capabilities. In the process of unmanned system cooperation, the first thing is to realize the task allocation of unmanned equipment. The task allocation algorithm should not only optimize the performance of the overall system, but also adapt to environmental changes and take into account the capabilities and availability of each intelligent agent.
[0003] Multi-agent task allocation involves several key challenges, including scalability, flexibility, robustness, and optimality. Scalability ensures that the allocation algorithm can handle a large number of agents and tasks without significantly degrading performance. Flexibility refers to the ability of the system to adapt to changes in tasks and environments. Robustness is critical to keeping the system performance stable even in the event of failures of individual agents. Optimality focuses on achieving maximum system performance on a defined metric (such as minimizing the total time to complete all tasks).
[0004] The Chinese patent "CN106875090B A method for forming multi-robot distributed task allocation for dynamic tasks" proposes a task allocation method based on multi-stage auctions, which aims at time optimization and maximizes the use of robot resources. Compared with traditional auction algorithms, it can better solve dynamic tasks in the environment and give a close to optimal solution. This allocation method requires real-time tracking of task status changes. Each robot only allocates and executes a single task at the current moment. Once there is a completed task, the robot without a task will be released, so as to reallocate tasks to the robot. This method does not fully utilize the constraint relationship between tasks, and the overall task allocation time span is too long, which cannot meet the scenarios with high timeliness requirements.
[0005] The Chinese patent "CN112070383A A multi-agent distributed task allocation method for dynamic tasks" proposes a multi-agent distributed task allocation method for dynamic tasks. Taking into account the dynamic evolution of tasks, the auction-recruitment algorithm is used to form a pre-allocation plan, which can be used to complete tasks such as collaborative multi-point aggregation, collaborative multi-target reconnaissance and collaborative multi-target roundup, so that the decision-making between agents is conflict-free and the task completion efficiency is effectively guaranteed. The task allocation rate reaches 100%. This task allocation method needs to perform an auction-recruitment process for each task, resulting in low operating efficiency. At the same time, this method is suitable for solving the problem type of "multiple agents jointly executing a single task", but not for the problem type of "single agent performing multiple tasks simultaneously". Summary of the invention
[0006] In order to solve the above problems in the prior art, an embodiment of the present invention provides a dynamic and efficient unmanned system distributed task allocation method.
[0007] According to one aspect of the present invention, a dynamic and efficient unmanned system distributed task allocation method is provided, comprising the following steps:
[0008] S1, initializing a control thread and a communication thread, wherein the control thread performs job initialization processing according to a startup command, and creates a task queue and a negotiation group queue;
[0009] S2, the control thread wakes up the computing thread, the computing thread performs beat control, the computing thread includes the computing processing content of the consistency package algorithm, and the computing processing content is the local task package construction and task package conflict resolution;
[0010] S3, the computing thread constructs a local task package according to the task queue and generates a task sequence to be executed;
[0011] S4, the communication thread receives the task package data of the external platform and synchronously broadcasts the task package data of the current platform;
[0012] S5, the control thread reads the external platform task package data and the local platform task package data according to the beat setting, and determines whether they belong to the same negotiation group by comparing the repetition of the tasks of the two. If so, the local negotiation group queue and the task queue are updated, and the computing thread is awakened again;
[0013] S6. The computing thread performs conflict resolution on the task package and determines whether all platforms are consistent based on the interface message. If yes, the thread is terminated; if not, the local task package is rebuilt and the communication thread performs data sharing.
[0014] Preferably, the beat control adopts a time beat control mechanism, and the time beat control mechanism controls the start time and execution time of each link of the job, so that the job start time of each node of multiple platforms is aligned.
[0015] Preferably, the operation steps of aligning the job start time include:
[0016] Set a fixed beat time;
[0017] For any two platforms, after one platform starts the job initialization processing, the other platform starts the job initialization processing. After the job initialization of the other platform is completed, the control thread waits until the time reaches the start time plus an integer multiple of the beat time before entering the first beat.
[0018] Preferably, the beat includes a relative beat and an absolute beat, the relative beat is used to record the number of negotiation beats in which the platform participates, and the absolute beat is used to record the real time of the platform negotiation result.
[0019] Preferably, the local task package construction includes the following steps:
[0020] Each platform builds its corresponding task package;
[0021] Compare the revenue each platform gets from adding a new task to the current task package with the bid value of the task in the current winning bid list;
[0022] If the payoff value is greater than the current winning bid value, the new task is added to the current task package.
[0023] Preferably, the calculation process of the revenue value is as follows:
[0024] Based on the global search optimization algorithm, the reward function of the task for the agent is
[0025] Among them, a ij is the task T performed by agent i j The benefits that can be obtained, Indicates that task T has not been added j When agent i follows task package B i The benefits of executing tasks, Indicates joining task T j After that, agent i follows the task package B i ∪T j The maximum benefit that can be obtained from performing the task;
[0026] The calculation formula is:
[0027]
[0028] where dis(B i,k ,B i,k+1 ) indicates that from B i,k Mission location to B i,k+1 The straight-line distance to the task location;
[0029] definition:
[0030]
[0031] where a ij represents the benefit of agent i completing task j;
[0032] Its total revenue is
[0033]
[0034] Preferably, the action rules for resolving the task package conflict are:
[0035] When the shared data of the adjacent platform conflicts with the local data, the shared data is more in line with the negotiation principle, and the local data is updated to the data of the adjacent platform;
[0036] When it is impossible to determine whether the shared data or the local data is more in line with the negotiation principle, the local data is reset to the initialization data;
[0037] When local data is more consistent with the negotiation principle, the local data is not processed.
[0038] The beneficial effects brought by the present invention are as follows:
[0039] It can be seen from the above scheme that the embodiment of the present invention provides a dynamic and efficient unmanned system distributed task allocation method, which uses the consistency package algorithm as the basic processing logic, so that each agent constructs a task package according to the problem requirements and broadcasts the local optimal decision. The conflicts between task packages are resolved by strict consistency processing algorithms between agents. The algorithm introduces a real-time management mechanism for tasks and nodes, uses multi-threaded control of asynchronous interaction processes, and does not need to specify a negotiation agent set, so as to achieve rapid response to dynamic task sets and agent sets, thereby improving the flexibility and robustness of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A flowchart showing a method for dynamically and efficiently allocating distributed tasks for an unmanned system according to an embodiment of the present invention;
[0041] Figure 2 A schematic diagram showing a distributed time-tick control mechanism according to an embodiment of the present invention;
[0042] Figure 3 The figure shows the relationship between the number of single-round negotiation iterations, the number of tasks, and the number of agents in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Before introducing the dynamic and efficient unmanned system distributed task allocation method provided by this application, the professional terms involved in this application are first explained.
[0045] CBBA (Consistency Package Algorithm) is an algorithm for multi-agent collaborative task allocation. Its basic idea is that each agent generates a "task package" containing possible task allocation schemes according to its own capabilities and task requirements, and then selects the optimal task allocation scheme implementation through negotiation and information exchange between agents.
[0046] Loop-CBBA is a loop consistency packet algorithm.
[0047] Example
[0048] like Figure 1 As shown, the embodiment of the present invention provides a dynamic and efficient unmanned system distributed task allocation method. The important feature of this method is the use of multi-threading technology, which specifically includes the following steps:
[0049] (1) Initialize the thread. In the present invention, the threads that need to be initialized include:
[0050] Control thread: responsible for receiving external start or stop instructions; responsible for maintaining the task information, node information, beat control, etc. of the negotiation job;
[0051] Communication thread: responsible for receiving data from external platforms and sending data from this platform to other nodes. When the control thread starts the data receiving thread of this job, the thread processes the decision data sent by the external platform through the network communication module, saves the data in the buffer area, and moves the write pointer. When the local decision result needs to be sent to other nodes, it is sent to other nodes through the network communication module;
[0052] Computation thread: responsible for starting the calculation process according to the call command of the control thread. It includes two core calculation processes of the CBBA algorithm: local task package construction and task package conflict resolution.
[0053] (2) The control thread performs negotiation job initialization processing according to the list of tasks to be assigned contained in the startup command, creates a task queue and a negotiation group queue, and wakes up the computing thread at an appropriate time (i.e., beat control).
[0054] (3) The computing thread builds a local task package based on the platform capability constraints and task queue, generates a task sequence to be executed by the platform, and updates the local task package data.
[0055] (4) The communication thread receives the task package data of the external platform in real time, and broadcasts the task package data of the local platform in real time. After receiving the task package data of the external platform, it is temporarily stored in the buffer, waiting for the control thread to read it.
[0056] (5) The control thread reads the external platform data and local task package data according to the beat setting, and determines whether they belong to the same negotiation group based on the duplication of the two tasks. If so, it updates the local negotiation group queue, integrates the task package data of all platforms, updates the local task queue, and then wakes up the computing thread.
[0057] (6) The computing thread resolves the task package conflicts based on the global data and determines whether all platforms are consistent based on the interface message. If they are consistent, the thread ends and the control thread automatically enters the next cycle. If they are inconsistent, the local task package is rebuilt and the communication thread shares the data.
[0058] Furthermore, the beat control uses a strict time beat control mechanism. By strictly controlling the start time and execution time of each link of the job, it can be ensured that the distributed nodes process the data of the same time period at the same link when processing the job, and obtain the decision results of this node and other nodes at a fixed time. In order to achieve distributed beat control, the job start time of each node needs to be aligned. The specific method is:
[0059] Set a start time. Each stage in the processing flow has a strict time limit, so a beat time is fixed. After the job initialization is completed, the control thread needs to wait for a certain period of time until the time reaches an integer multiple of the start time + the beat time, and then enter the first beat, such as Figure 2 As shown. For any two platforms, the execution of each stage can be guaranteed to be strictly synchronized, and the data processed in each stage is guaranteed to be data in the same time period, which can meet the negotiation processing of time-sensitive decision-making jobs. The job beat is divided into "relative beat" relative to the start of the operation and "absolute beat" relative to the start time. The role of "relative beat" is to record the number of negotiation beats in which the platform participates, and the role of "absolute beat" is to record the real time of the negotiation result of the platform.
[0060] Assume that each platform has a unique identity V in the fleet. n}, each task is identified by T = {T1,…,T m}. The platform knows that the maximum number of tasks it can perform is Lt. During the task allocation process, platform i needs to store and update the following information structure:
[0061] (1) Task package. In this algorithm, the task package is represented by the vector b i Indicates that tasks are arranged in the order in which they are added to the package. Initially, all platforms have b i All elements of are set to NULL, indicating that no tasks are selected.
[0062] (2) List of winning bids. The winning bid list is represented by vector y i Indicates that the kth element y ik represents the bid of the current winner of the kth task. Initially, the y of all platforms i All elements of are set to -1, indicating that no platform bids for the task.
[0063] (3) List of winning platforms. The list of winning platforms is represented by vector z i It indicates that the information of which platform has won which tasks currently held by the storage platform i, and the kth element z ik represents the current winning platform number of the kth task. Initially, the z of all platforms i All elements of are set to -1, indicating that no platform has obtained the task.
[0064] (4) Timestamp. Timestamps i represents the update time of the information obtained by platform i from other members of the formation. This vector is an important indicator in the conflict elimination phase, which is used to indicate the newness of the information obtained by the platform from other platforms. Initially, the s i All elements of are set to -1, indicating that no information has been received from any other platform.
[0065] Furthermore, the task package construction process is that each platform determines the task set it expects to complete based on the environment information and its own capabilities. k When battlefield situation and own capabilities change, each platform adjusts the set of tasks to be completed according to the urgency of the task. Since the calculation of the benefits of the platform's execution of tasks is closely related to the actual application, the construction method of the task package is different for different applications, which is determined by the specific task application.
[0066] Taking the UAV reconnaissance mission as an example, each mission can be regarded as a location point. i For task T j The revenue p ij It can be defined as starting from the platform's starting position and flying one by one to T according to the mission execution sequence. j Each platform locally constructs its mission package b i The revenue gained by each platform from adding new tasks to the current task package is equal to the current winning bid list y i Compared with the bid value of the task, if its benefit value is greater than the current winning bid value, the task will be assigned to oneself.
[0067] There are different computing algorithms for building task packages, such as global search optimization, greedy strategy, and heuristic strategy. The running time and optimization capabilities of each algorithm are different. The specific application can be selected according to its own requirements. Taking global search optimization as an example, consider a more complex situation, that is, when there are timing constraints between tasks, the marginal benefit of a single agent for a task is variable, which is affected by the order of task execution. Therefore, the task package constructed by a single platform during multiple rounds of iterations varies greatly, and the number of conflicts between agents on tasks is large. The benefit function of the task for the agent that can be used is as follows:
[0068]
[0069] where a ij is the task T performed by agent i j The benefits that can be obtained, Indicates that task T has not been added j When agent i follows task package B i The benefits of executing tasks, Indicates joining task T j After that, agent i follows the task package B i ∪T j The maximum benefit that can be obtained by executing the task. j Join B i The position in is different, It will also be different. By traversing B i The position in is obtained.
[0070] The calculation formula is:
[0071]
[0072] where dis(B i,k ,B i,k+1 ) indicates that from B i,k Mission location to B i,k+1 The straight-line distance to the location of the task. This algorithm ensures that each agent is the local optimal under the current conditions when constructing its own task package. Definition:
[0073]
[0074] where a ij represents the benefit of agent i completing task j. For a certain allocation scheme, its total benefit can be expressed as
[0075]
[0076] Furthermore, after the task package construction process is completed, the platform shares the winning bid list, winning platform list, and update timestamp with the adjacent platform, and decides to choose one of the three operations of update, reset, and leave according to the following action rules. Specifically, when the shared data of the adjacent platform conflicts with the local data, the shared data is more in line with the negotiation principle (such as "the highest bidder wins"), then the local data is updated to the data of the adjacent platform; when it is impossible to determine whether the shared data or the local data is more in line with the negotiation principle, the local data is reset to the initialized data; when the local data is more in line with the negotiation principle, no processing is done on the local data.
[0077] Update: ij =y kj ,z ij =z kj
[0078] Reset: y ij =0,
[0079] Leave: y ij =y ij ,z ij =z ij
[0080] The specific rules are shown in Table 1.
[0081] Table 1 Conflict resolution rules
[0082]
[0083] Furthermore, after each conflict resolution is completed, the platform can determine whether it has conflicts with other platforms based on the negotiation process. When all platforms have no conflicts with other platforms, the negotiation is considered to be over. In a distributed scenario, the conflict judgment information of other platforms needs to communicate with each other before it can be confirmed. Therefore, this step needs to be paced by the control thread to ensure that the data can be received on time.
[0084] Furthermore, the Loop-CBBA algorithm proposed in the present invention is suitable for the problem of conflict-free task negotiation in a high real-time situation. This test statistically finds the relationship between the number of iterations and the number of agents and tasks when the algorithm reaches convergence under normal communication conditions. The input data is shown in Table 2.
[0085] Table 2 Simulation input data and configuration item design
[0086]
[0087] Note: The maximum number of tasks that each agent can undertake affects the load balancing of the results; for each number of agents, the agent positions are randomly generated and remain unchanged in each round of testing, and new task positions are randomly generated when the experiment is repeated.
[0088] The experiment was repeated 100 times under the same configuration, and the number of iterations T and the total profit were recorded. The average value of the number of iterations was recorded in the table (excluding the maximum and minimum values). The results are shown in Table 3 and Figure 3 shown.
[0089] Table 3. Number of single round iterations
[0090]
[0091] The simulation results show that when considering the timing constraints between tasks, the algorithm proposed in the present invention has a single-round convergence iteration number ≈ the number of tasks, and has no obvious relationship with the number of agents. In a distributed scenario, assuming that the end-to-end delay is within 10ms, for the case of 50 tasks, the maximum running time of a round of negotiation is about 1s. Within 1s, the basic input changes dramatically. After entering the next cycle, the validity of the output result of the next cycle can still be guaranteed by updating the input data. The present invention is simple to implement and can effectively meet the high real-time requirements of applications.
[0092] The above are preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A dynamic and efficient unmanned system distributed task allocation method, characterized in that: The steps include: S1, initializing a control thread and a communication thread, wherein the control thread performs job initialization processing according to a startup command, and creates a task queue and a negotiation group queue; S2, the control thread wakes up the computing thread, the computing thread performs beat control, the computing thread includes the computing processing content of the consistency package algorithm, and the computing processing content is the local task package construction and task package conflict resolution; S3, the computing thread constructs a local task package according to the task queue and generates a task sequence to be executed; S4, the communication thread receives the task package data of the external platform and synchronously broadcasts the task package data of the current platform; S5, the control thread reads the external platform task package data and the local platform task package data according to the beat setting, and determines whether they belong to the same negotiation group by comparing the repetition of the tasks of the two. If so, the local negotiation group queue and the task queue are updated, and the computing thread is awakened again; S6. The computing thread performs conflict resolution on the task package and determines whether all platforms are consistent based on the interface message. If yes, the thread is terminated; if not, the local task package is rebuilt and the communication thread performs data sharing.
2. The dynamic and efficient unmanned system distributed task allocation method according to claim 1 is characterized in that: The beat control adopts a time beat control mechanism, which controls the start time and execution time of each link of the job, so that the job start time of each node of multiple platforms is aligned.
3. The dynamic and efficient unmanned system distributed task allocation method according to claim 2 is characterized in that: The operation steps of aligning the job start time include: Set a fixed beat time; For any two platforms, after one platform starts the job initialization processing, the other platform starts the job initialization processing. After the job initialization of the other platform is completed, the control thread waits until the time reaches the start time plus an integer multiple of the beat time before entering the first beat.
4. The dynamic and efficient unmanned system distributed task allocation method according to claim 3 is characterized in that: The beat includes a relative beat and an absolute beat. The relative beat is used to record the number of negotiation beats in which the platform participates, and the absolute beat is used to record the real time of the platform negotiation result.
5. The dynamic and efficient unmanned system distributed task allocation method according to claim 1 is characterized in that: The local task package construction includes the following steps: Each platform builds its corresponding task package; Compare the revenue each platform gets from adding a new task to the current task package with the bid value of the task in the current winning bid list; If the payoff value is greater than the current winning bid value, the new task is added to the current task package.
6. The dynamic and efficient unmanned system distributed task allocation method according to claim 5 is characterized in that: The calculation process of the profit value is as follows: Based on the global search optimization algorithm, the reward function of the task for the agent is Among them, a ij is the task T performed by agent i j The benefits that can be obtained, Indicates that task T has not been added j When agent i follows task package B i The benefits of executing tasks, Indicates joining task T j After that, agent i follows the task package B i ∪T j The maximum benefit that can be obtained from performing the task; The calculation formula is: where dis(B i,k ,B i,k+1 ) indicates that from B i,k Mission location to B i,k+1 The straight-line distance to the task location; definition: where a ij represents the benefit of agent i completing task j; Its total revenue is 7. The dynamic and efficient unmanned system distributed task allocation method according to claim 1 is characterized in that: The action rules for resolving the conflict of the task package are: When the shared data of the adjacent platform conflicts with the local data, the shared data is more in line with the negotiation principle, and the local data is updated to the data of the adjacent platform; When it is impossible to determine whether the shared data or the local data is more in line with the negotiation principle, the local data is reset to the initialization data; When local data is more consistent with the negotiation principle, the local data is not processed.
Citation Information
Patent Citations
A method for forming distributed task allocation for multi-robots in dynamic tasks
CN106875090B
Dynamic task-oriented multi-agent distributed task allocation method
CN112070383A