Distributed task planning method and device for drone swarm based on asynchronous consensus
By adopting asynchronous communication and new consensus rules in the drone cluster, use drone timestamp to reduce communication volume, and design redundant detection and avoid misunderstanding rules, solving the communication volume and frequency of existing technology The problem improves the efficiency and real time of task planning.
Patent Information
- Application Number
- CN202411568407.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The existing asynchronous consensus method causes too high traffic and communication frequency in drone clusters, reducing the efficiency and real-time nature of task planning.
The distributed task planning method of the drone collection of the asynchronous consensus is adopted. Through asynchronous communication and new consensus rules, the drone timestamp will be used to reduce the communication volume, and the redundant detection and avoiding misunderstanding rules are designed to reduce the frequency of communication.
Effectively reduce the number of messages required by the communication volume and the conflict of task conflicts when the task information is updated, and improves the speed and efficiency of the task planning of the drone cluster.
Smart Images

Figure CN119094989B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of distributed task planning for drone swarms, and in particular to a method and device for distributed task planning for drone swarms based on asynchronous consensus. Background Art
[0002] The UAV swarm task planning algorithm needs to achieve consensus on the plan within the cluster through the communication stage. Synchronous communication corresponds to the synchronous consensus method to resolve task conflicts between drones, while asynchronous communication corresponds to the asynchronous consensus method. In the research on UAV swarm task planning, the experimental environment of synchronous communication is often used because it is easy to control and adjust; in actual applications, the distributed synchronous consensus method of drone swarms requires artificially setting waiting time or additional signals so that drones in the group can iterate and synchronize. Such synchronous waiting leads to the extension of communication time, reduces the actual performance of the algorithm in real applications, and even some algorithms cannot be implemented in actual physical systems. The asynchronous consensus method solves the above problems. In asynchronous iteration, the iteration stage of each drone can be different, and the drone does not need to wait for other drones to enter the communication stage together, thus avoiding the waste of waiting time before and after calculation and communication. However, the communication protocol and consensus rules of the existing asynchronous consensus method still require a considerable amount of communication volume and communication frequency. The protocol uses the winner's task timestamp but does not include the non-winner's task timestamp. Not only will the communication volume increase with the number of tasks, but the consensus rules based on the protocol will also increase the communication frequency due to the need for multiple broadcasts to resolve conflicts between some machines. This places high demands on the network communication environment of the drone cluster, severely reducing the planning time performance of the drone cluster under networked conditions and the efficiency of asynchronous planning consensus, affecting the real-time performance of the algorithm applied to drone clusters. Summary of the invention
[0003] Based on this, it is necessary to provide a distributed task planning method and device for drone clusters based on asynchronous consensus to address the above technical problems.
[0004] A distributed task planning method for drone clusters based on asynchronous consensus, the method comprising:
[0005] Drone i communicates with other drones in the drone cluster through asynchronous communication and continuously receives task information broadcast by other drones k; the task information includes: the task winner, the task winner price and the drone timestamp; the drone timestamp indicates the time when the n drones controlled by drone i generate or update their tasks.
[0006] Initialize the convergence flag and iteration counter to 0, and the broadcast flag to 1.
[0007] Calculate the task selection in the task plan calculation phase and update the local task information;
[0008] In the task planning consensus phase, the task information of other drones k is obtained, and drone i and other drones resolve inter-machine task conflicts through the asynchronous consensus rule of the highest bidder wins, and obtain conflict-free task information.
[0009] If the broadcast flag is 1, its local task information will be broadcast.
[0010] At the end of the task plan consensus phase, the iteration counter is increased by 1; if the task conflict is resolved, the broadcast flag is set to 1, otherwise the broadcast flag is set to 0.
[0011] If the iteration counter reaches the preset convergence threshold, the convergence flag is set to 1, and the iteration of the task plan calculation link and the task plan consensus link continues. Otherwise, the convergence flag is set to 0, the iteration is stopped, and a conflict-free task plan is obtained.
[0012] Among them, asynchronous consensus rules include:
[0013] Consider drone i as the receiver and other drones k in the cluster as senders.
[0014] Fast consensus rule: After drone i receives the message about task j from drone k; if drone i believes that the winner of task j is a third-party drone m, and if drone k has a higher bid or a newer message from drone m, drone i will update its local information about task j and forward it, so that the receiver can quickly reach a consensus with the sender on the information about task j; when drone k's bid for task j is smaller, drone i will retain its local information and forward it to drone k regardless of its drone timestamp;
[0015] Tie-breaking rule: Drone i can not only break the situation where its price is the same as other drones, but also help other drones break the tie situation of equal price in advance to prevent redundant mission information forwarding and reduce network communication load.
[0016] Redundancy detection rules: When there is a conflict that needs to be handled and other drones are notified, the receiver forwards the message; message forwarding is required when the timestamp of the receiving drone is older or the timestamp of the sending drone is older.
[0017] Avoid mistransmission rules: When the receiver receives a message but cannot make a judgment, a reset is used to avoid incorrect message updates and the message is not forwarded.
[0018] In one embodiment, calculating the task selection in the task plan calculation phase and updating the local task information include:
[0019] In the task plan calculation phase, drone i will remove tasks that conflict with the plan consensus from the local plan, and then add tasks with a higher price than the current winner to form the local plan for this iteration and update it in the local task information.
[0020] In one embodiment, in the task planning consensus link, the task information of other drones k is obtained, and drone i and other drones resolve the task conflicts between drones through the asynchronous consensus rule of the highest bidder wins, and obtain conflict-free task information, including:
[0021] In the task planning consensus phase, drone i broadcasts local task information and obtains the latest task information of other drones. When obtaining the latest messages from other drones, it updates the latest messages from other drones that have been received to the local buffer.
[0022] For the first task of the first other drone directly connected to drone i, the task conflict between the machines is resolved through asynchronous consensus rules to obtain conflict-free task information.
[0023] Continue to resolve conflicts for the next task of the first other UAV until all tasks of the first other UAV are traversed, and continue to resolve conflicts for the tasks of the second other UAV until all other UAVs directly connected to UAV i are traversed.
[0024] In one of the embodiments, the information forwarding of the drone adopts UDP broadcast mode.
[0025] Before receiving update messages from other drones, drone i assumes that the status of other drones will not be updated. Then drone i will continue to broadcast its messages to avoid other drones being unable to receive its messages due to communication problems such as packet loss.
[0026] In one embodiment, the process of determining the drone timestamp in the mission information includes:
[0027] For drone i, drone timestamp The i-th element in That is, the time when the local task is generated or updated, which can be obtained through local records.
[0028] For drone timestamps The i-th element in Other elements besides , it needs to be obtained through communication; the acquisition method is: if drone k and drone i are directly connected by communication, then drone i’s task update time for drone k UAV timestamp vector sent by UAV k Get; if UAV k and UAV i are directly connected without communication, then UAV i's task update time for UAV k It needs to be obtained from other drone m. Drone m needs to be directly connected to drone i, and drone m has the mission update time of drone k.
[0029] In one of the embodiments, when there are multiple drones m directly connected to drone i, the drone timestamp of drone k uses the latest one among the multiple drones m.
[0030] In one embodiment, the trigger matrix is used to record the reasons that trigger the sender to broadcast. When the drone needs to send the information of its mission j to drone k, , .
[0031] The specific steps of the avoidance mechanism to avoid message flooding problem include:
[0032] Before UAV i enters the iteration of the planning phase and the task consensus phase, the elements of the trigger matrix of the current iteration and the trigger matrix of the previous iteration are initialized to 0, and the value of the counter recording the same broadcast reason is set to 0.
[0033] After entering the task plan consensus phase, if UAV i and UAV k have a conflict on task j and need to resolve the task conflict through broadcasting, Set to 1.
[0034] At the end of the task plan consensus phase, the drone checks whether the trigger matrix of the current iteration is the same as the trigger matrix of the previous iteration; if they are the same, the value of the counter recording the same broadcast reason is increased by one; otherwise, the value of the counter is reset to 0, and the trigger matrix of this iteration is set to be the same as the matrix of the previous iteration; after multiple iterations, when the value of the counter reaches the set threshold, drone i believes that drone k has reached a consensus or has exited the cluster, then drone i will no longer broadcast and set the broadcast flag to 0.
[0035] In one of the embodiments, the method is run in the form of dual threads, where thread 1 is the main process of the task planning algorithm, and thread 2 is a receiver that continuously receives messages from other drones without hanging up; each thread runs independently and does not hang up, and information exchange is achieved between threads through caching.
[0036] A distributed task planning device for drone swarm based on asynchronous consensus, comprising:
[0037] The drone cluster communication setting module is used for drone i to communicate with other drones in the drone cluster through asynchronous communication, and continuously receive task information broadcast by other drones k; the task information of drone i includes: the task winner considered by drone i, the winner price of the task recognized by drone i, and the drone timestamp; the drone timestamp indicates the time when the n drones controlled by drone i generate or update their tasks.
[0038] The iteration initialization module is used to initialize the convergence flag and the iteration counter to 0, initialize the broadcast flag to 1, and set the convergence threshold.
[0039] The task plan calculation module is used to calculate the task selection in the task plan calculation link and update the local task information;
[0040] The task plan consensus module is used to obtain the task information of other drones k in the task plan consensus link. Drone i and other drones resolve inter-machine task conflicts through the asynchronous consensus rule of the highest bidder to obtain conflict-free task information; if the broadcast flag is 1, its local task information will be broadcast; at the end of the task plan consensus link, the iteration counter is increased by 1; if the task conflict is resolved, the broadcast flag is set to 1, otherwise the broadcast flag is set to 0; if the iteration counter reaches the convergence threshold, the convergence flag is set to 1 and the iteration continues, otherwise, the convergence flag is set to 0, the iteration stops, and a conflict-free task plan is obtained. Among them, the asynchronous consensus rules include: taking drone i as the receiver and other drones k in the cluster as the sender; the fast consensus rule: after drone i receives the message about task j from drone k; if drone i believes that the winner of task j is a third-party drone m, if drone k has a higher bid or a newer drone m message, drone i will update its local information about task j and forward it, so that the receiver can quickly reach a consensus with the sender on the information of task j; when drone k’s bid for task j is smaller, drone i will retain its local information regardless of its drone timestamp. The information is forwarded to drone k; tie-breaking rule: drone i can not only break the situation where its price is the same as other drones, but also help other drones break the tie situation with equal prices in advance, so as to prevent redundant task information forwarding and reduce network communication load; redundancy detection rule: when there is a conflict that needs to be handled and other drones need to be notified, the receiver forwards the message; when the timestamp of the receiving drone is older or the timestamp of the sending drone is older, message forwarding is required; mistransmission avoidance rule: when the receiving party receives the message but cannot make a judgment, reset is used to avoid erroneous message updates and no forwarding is performed.
[0041] The above-mentioned method and device for distributed task planning of drone clusters based on asynchronous consensus mainly include asynchronous communication protocols and consensus rules to realize rapid task planning of low-frequency and low-pass drone clusters. This method cleverly utilizes the drone timestamp of drone information updates, reduces the communication volume of the original drone timestamp when the task information is updated, and the new drone timestamp contains more information about non-winners, which is helpful for the design of new asynchronous consensus rules. The drone cluster asynchronous planning consensus proposed in this application does not require the communication waiting required by the synchronous planning consensus, which enables the drone cluster to obtain task planning results faster. Secondly, a drone asynchronous consensus rule with a new drone timestamp is designed to resolve task conflicts between machines more quickly, effectively solves the problem of disordered information arrival under asynchronous conditions, and potentially reduces the frequency of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of a method for distributed task planning of a drone cluster based on asynchronous consensus in one embodiment;
[0043] Figure 2 Schematic diagram of an example comparison between drone timestamp and traditional task timestamp in another embodiment, wherein (a) is an example diagram of task timestamp of ACBBA method, and (b) is an example diagram of drone timestamp of the method of the present application;
[0044] Figure 3 This is a comparison chart of message sending frequencies of two methods in a typical case in another embodiment, where (a) is , The message sending frequency comparison diagram of the two methods is shown in (b). , The message sending frequency comparison diagram of the two methods is shown in (c). , The comparison chart of message sending frequency of the two methods;
[0045] Figure 4 : is a statistical diagram of the total number of messages sent by the AACM method and the ACBBA method in another embodiment, where (a) is The total number of messages sent under different n is shown in (b). The total number of messages sent under different n is shown in (c). Statistics of the total number of messages sent at different times n;
[0046] Figure 5 : is a statistical diagram of the global convergence time and individual termination time of the AACM method and other methods in another embodiment, where (a) is The statistical diagram of global convergence time and individual termination time under different n, (b) is The statistical diagram of global convergence time and individual termination time under different n, (c) is Statistical graphs of global convergence time and individual termination time under different n;
[0047] Figure 6 It is a structural block diagram of a distributed task planning device for a drone cluster based on asynchronous consensus in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] The distributed task planning method for drone clusters based on asynchronous consensus proposed in this application is referred to as the AACM method.
[0050] In one embodiment, Figure 1 As shown, a method for distributed task planning of drone clusters based on asynchronous consensus is provided, and the method includes the following steps:
[0051] Step 100: UAV i communicates with other UAVs in the UAV cluster through asynchronous communication, and continuously receives task information broadcast by other UAV k; the task information includes: the task winner, the task winner price and the UAV timestamp; the UAV timestamp indicates the time when the n UAVs controlled by UAV i generate or update their tasks.
[0052] Specifically, the implementation of asynchronous consensus requires the support of asynchronous communication, which in turn requires ensuring that drones can receive messages from other drones at any time.
[0053] Asynchronous communication will bring about the problem of out-of-order message arrival, and how to resolve task conflicts when messages arrive out of order is the main difficulty of asynchronous planning consensus methods. In the case of out-of-order message arrival, the receiver cannot be sure whether the third-party information it has is the latest, that is, the receiver cannot determine whether the sender's third-party message time is newer than the local machine, and therefore cannot determine whether the third-party message is credible and timely, and thus cannot process the message. Therefore, this application introduces the concept of agent time (i.e., drone timestamp in task information), that is, the time when the drone generates or updates the task. Using drone timestamp It represents the time when n UAVs controlled by UAV i generate or update their tasks. It can unify the task time of the same UAV into a single-machine time without recording and transmitting the update time of m tasks, thus reducing the communication volume of task time information.
[0054] The agent time factor can not only merge multiple task timestamps belonging to the same drone into one drone timestamp, reducing the communication volume from m to n (unit: 4 bytes), but it also includes the update time of non-task winners missing in the task-related timestamps, which is helpful for drones to judge the timeliness of third-party messages and decide whether to update the messages.
[0055] At present, the asynchronous planning consensus method has a large amount of communication and a high frequency of communication, which reduces the adaptability of the UAV cluster network communication conditions and affects the performance of networked UAV cluster task planning. This method cleverly uses the UAV timestamp of the UAV information update to reduce the communication volume of the original timestamp when the traditional task information is updated, and the new UAV timestamp contains more information about non-winners, which helps the newly designed asynchronous consensus rules to resolve inter-machine task conflicts more quickly, potentially reducing the amount of communication and frequency of communication required for asynchronous task conflict resolution, thereby improving the speed of UAV cluster task planning.
[0056] Step 102: Initialize the convergence flag and the iteration counter to 0, and initialize the broadcast flag to 1.
[0057] Step 104: Calculate the task selection in the task plan calculation phase and update the local task information;
[0058] Step 106: In the task planning consensus phase, the task information of other drones k is obtained. Drone i and other drones resolve the task conflicts between drones through the asynchronous consensus rule of the highest bidder wins, and obtain conflict-free task information.
[0059] Among them, the asynchronous consensus rules include: taking drone i as the receiver and other drones k in the cluster as senders; fast consensus rule: after drone i receives the message about task j from drone k; if drone i believes that the winner of task j is a third-party drone m, if drone k (sender) has a higher bid or a newer drone m message, drone i will update its local information about task j and forward it, so that the receiver can quickly reach a consensus with the sender on the information of task j; when drone k’s bid for task j is smaller, drone i will retain its own information and forward it to drone k regardless of its drone timestamp, which helps drone k and drone i to quickly reach a consensus; tie-breaking rule: drone i can not only It can break the situation where its price is the same as other drones, and at the same time help other drones break the tie situation with equal prices in advance, so as to prevent redundant task information forwarding and reduce network communication load; Redundancy detection rule: When there is a conflict that needs to be handled and notified to other drones, the receiver forwards the message (usually the receiver does not forward the message unless there is a conflict that needs to be handled and notified to other drones.); When the timestamp of the receiving drone is older or the timestamp of the sending drone is older, message forwarding is required, which helps to reduce the number of messages sent and improve the convergence speed of the algorithm; Avoid mistransmission rule: When the receiver receives the message but cannot make a judgment, it uses reset to avoid erroneous message updates, and does not forward it to avoid spreading uncertain information.
[0060] Specifically, in addition, according to whether drone i forwards the processed information, it can be divided into two types: forwarding and non-forwarding. If not specifically stated, retention and non-forwarding are the default processing behaviors of this consensus rule.
[0061] The drone-related asynchronous consensus rules proposed in this application have a fast and cautious way of updating and propagating information. It not only makes more judgments on the received messages and resolves task conflicts faster, but also propagates task information more cautiously and reduces the number of messages sent required to resolve task conflicts.
[0062] The consensus rule is the basis for drones to resolve inter-drone task conflicts and is the guarantee of task attribution consistency. It is the code of conduct for drones after receiving messages from other drones. Especially for third-party messages, how to resolve task conflicts and decide whether to forward them determines the propagation of consensus, which will significantly affect algorithm iterations, the number of messages sent, and planning time.
[0063] Based on the above drone timestamp (drone time), this application designs a new drone cluster asynchronous consensus rule, which can further reduce the number of messages required for cluster planning consensus. The specific asynchronous consensus rules are as follows, which mainly describe the behavior of drone i (receiver) after receiving the message about task j from drone k (sender). After drone i receives the message from other drone k, it mainly has the following three processing behaviors:
[0064] 1) Update: UAV i updates its local information about task j to the recognized value of UAV k, that is, , , , abbreviated as ( is the local information of UAV i about task j, is the local information of UAV k about task j); where is the winner of task j identified by drone k, is the winning bid of task j determined by drone k, It is a drone certified by UAVK Update time, is the winner of task j identified by drone i, is the winning bid of task j determined by drone i, It is a drone certified by Dronei The update time.
[0065] 2) Retention: UAV i retains its local information about task j unchanged, that is, , , , abbreviated as ;
[0066] 3) Reset: UAV i resets its local information about task j, i.e. , , , abbreviated as .
[0067] Step 108: If the broadcast flag is 1, the local task information will be broadcast.
[0068] Step 110: At the end of the task plan consensus phase, the iteration counter is increased by 1; if the task conflict is resolved, the broadcast flag is set to 1, otherwise the broadcast flag is set to 0.
[0069] Step 112: If the iteration counter reaches the preset convergence threshold, the convergence flag is set to 1, and the iteration of the task plan calculation link and the task plan consensus link is continued. Otherwise, the convergence flag is set to 0, the iteration is stopped, and a conflict-free task plan is obtained.
[0070] In the above-mentioned drone cluster distributed task planning method based on asynchronous consensus, the method mainly includes asynchronous communication protocols and consensus rules to realize low-frequency and low-pass drone cluster rapid task planning. This method cleverly utilizes the drone timestamp of drone information update, reduces the communication volume of the original drone timestamp when the task information is updated, and the new drone timestamp contains more information about non-winners, which is helpful for the design of new asynchronous consensus rules. The drone cluster asynchronous planning consensus proposed in this application does not require the communication waiting required by the synchronous planning consensus, which can enable the drone cluster to obtain task planning results faster. Secondly, a drone asynchronous consensus rule with a new drone timestamp is designed to resolve inter-machine task conflicts more quickly, effectively solve the problem of out-of-order information arrival under asynchronous conditions, and potentially reduce the frequency of communication.
[0071] In one embodiment, step 104 includes: in the task plan calculation phase, drone i will remove tasks that conflict with the plan consensus from the local plan, and then add tasks with a higher price than the current winner to form the local plan under this iteration and update it in the local task information.
[0072] In one embodiment, step 106 includes: in the task planning consensus link, drone i broadcasts local task information and obtains the latest task information of other drones. When obtaining the latest message from other drones, the latest message from other drones that has been received is updated to the local buffer; for the first task of the first other drone directly connected to drone i, the inter-machine task conflict is resolved through asynchronous consensus rules to obtain conflict-free task information; the next task of the first other drone is continued to be conflict resolved until all tasks of the first other drone are traversed, and the task of the second other drone is continued to be conflict resolved until all other drones directly connected to drone i are traversed.
[0073] In one of the embodiments, the information forwarding of the drone adopts the UDP broadcast mode; before drone i receives the update message of other drones, it is assumed that the status of other drones is not updated. Then drone i will continue to broadcast its messages to avoid other drones being unable to receive the local message due to communication problems such as packet loss.
[0074] Specifically, the consensus time of the asynchronous consensus method in TCP or UDP unicast mode is much longer than that in UDP broadcast mode, which verifies the efficiency of UDP broadcast in asynchronous communication and asynchronous consensus. However, UDP broadcast is a non-response information transmission, that is, the drone cannot confirm whether other drones have received the message transmitted by the local drone. Therefore, before receiving the update message from other drones, it is usually assumed that the status of other drones is not updated. Then the drone will continue to broadcast its message to avoid other drones being unable to receive the local message due to communication problems such as packet loss.
[0075] In one embodiment, the process of determining the drone timestamp in the mission information in step 100 includes: for drone i, the drone timestamp The i-th element in This is the time when the local task is generated or updated, which can be obtained through local records; for drone timestamps The i-th element in Other elements besides ,like The task generation or update time for other drone k needs to be obtained through communication; the acquisition method is: if drone k and drone i are directly connected by communication, then drone i’s task update time for drone k UAV timestamp vector sent by UAV k get( That is, the mission time of drone k for its own machine); if drone k and drone i are not directly connected by communication, then the mission update time of drone i for drone k is Need to be obtained from other drone m, drone m needs to be directly connected to drone i ( ), and UAV m has the mission update time of UAV k (i.e. ). Drone timestamp The update calculation of is:
[0076] ;
[0077] in, It means that drone i and drone k are directly connected. is the mission update time for drone k, It is the mission update time of drone k as known by drone m (which is directly connected to drone i).
[0078] Figure 2 The following figure shows the example comparison of the drone timestamp proposed in this application and the traditional mission timestamp, where (a) is an example diagram of the mission timestamp of the ACBBA method, and (b) is an example diagram of the drone timestamp of the method of this application. Figure 2It can be found that since the agent time includes the update time of the non-task winners that are missing from the traditional task-related drone timestamps, the drones can achieve asynchronous consensus based on the consensus rule of the highest bidder wins.
[0079] In one of the embodiments, when there are multiple drones m directly connected to drone i, the drone timestamp of drone k uses the latest one among the multiple drones m.
[0080] In one embodiment, the trigger matrix is used to record the reasons that trigger the sender to broadcast. When the drone needs to send the information of its mission j to drone k, , The method further includes: the specific steps of the avoidance mechanism to avoid the message flooding problem include:
[0081] Before UAV i enters the iteration of the mission planning phase and the mission consensus phase, the elements of the trigger matrix of the current iteration and the trigger matrix of the previous iteration are initialized to 0, and the value of the counter recording the same broadcast reason is set to 0.
[0082] After entering the task plan consensus phase, if UAV i and UAV k have a conflict on task j and need to resolve the task conflict through broadcasting, Set to 1.
[0083] At the end of the task plan consensus phase, the drone checks whether the trigger matrix of the current iteration is the same as the trigger matrix of the previous iteration; if they are the same, the value of the counter recording the same broadcast reason is increased by one; otherwise, the value of the counter is reset to 0, and the trigger matrix of this iteration is set to the same as the matrix of the previous iteration; after multiple iterations, when the value of the counter reaches the set threshold, drone i believes that drone k has reached a consensus or has exited the cluster, then drone i will no longer broadcast and set the broadcast flag to 0 (even if drone i’s local information about drone k is still inconsistent).
[0084] Specifically, broadcast logo The calculation formula is:
[0085] ;
[0086] in, Indicates whether to broadcast depends on the process of planning consensus. If there is no task conflict to be resolved during this process, then ;otherwise, .
[0087] The message flooding avoidance mechanism avoids the infinite broadcast of the cluster caused by communication problems such as packet loss, link disconnection, node exit, etc. Finally, a large number of Monte Carlo simulation experiments are used to verify the effectiveness of the proposed algorithm. A large number of Monte Carlo simulation experiments show that compared with the most representative asynchronous consistent bundling algorithm (ACBBA), the maximum reduction in the number of messages sent and the communication volume of the proposed method can reach 60% and 71% respectively, and the maximum reduction in task planning time can reach 47%.
[0088] In one of the embodiments, the method is run in the form of dual threads, where thread 1 is the main process of the task planning algorithm, and thread 2 is a receiver that continuously receives messages from other drones without hanging up; each thread runs independently and does not hang up, and information exchange is achieved between threads through caching.
[0089] Specifically, in thread 1, the two links of task plan calculation and plan consensus are cycled until convergence, wherein the task plan calculation link is to integrate the updated task information of the local machine into the conflict-free information after the plan consensus, and the task plan consensus link is to resolve the inter-machine task conflicts generated by the task plan calculation link. In the task plan calculation link, the drone will remove the tasks that conflict with the plan consensus from the local plan, and then add the tasks with a higher price than the current winner to form the local plan under this iteration and update it in the local task information. In the task plan consensus link, drone i broadcasts local task information and obtains the latest task information of other drones. Drone i and other drones resolve inter-machine task conflicts through asynchronous consensus rules to obtain conflict-free task information. It is worth mentioning that when obtaining the latest news from other drones, the latest news of other drones already in thread 2 is updated to the local buffer. In thread 2, the receiver continues to run to receive broadcast messages from other drones, which ensures that the information of other drones is up to date. As mentioned earlier, the message content is the task winner. , the task winner bids and the drone timestamp of drone k .
[0090] In one embodiment, the overall process of distributed asynchronous task planning of drone swarm is shown in Algorithm 1, which mainly involves the iteration of task plan calculation and plan consensus until the algorithm converges. After the algorithm converges, drone i will no longer run the task planning algorithm unless a new task or environmental change triggers re-planning.
[0091] First, UAV i initializes local parameters (line 1), converting the trigger matrix of this iteration and the previous iteration and Initialize the elements in to 0, and mark the convergence ,counter and iteration counter Initialized to 0, the broadcast flag Initialize to 1 (broadcast state) and set the counter threshold and convergence threshold . When the convergence mark When it is 0, the two links of task plan calculation (lines 3-4) and plan consensus (lines 5-24) are continuously iterated. Among them, line 12 is the process of using the proposed asynchronous consensus rule to resolve the task conflict between drones after receiving the message from drone k directly connected to drone i, and lines 6-24 are the process of avoiding message flooding. The value reaches the threshold When the drone i no longer broadcasts ( ), and iterate the counter Start recording (line 22); otherwise, drone i determines the broadcast flag amount according to the asynchronous consensus rule and resets the iteration counter to 0 (line 20). If it is 1 (broadcast state), it will broadcast its local information , and (Lines 6-8). When the iteration counter The value exceeds the threshold When , the algorithm is considered to have converged (Line 24).
[0092] Algorithm 1: The pseudo code of cluster distributed asynchronous task planning algorithm is:
[0093] 1. Drones Initialization bit , , and , ;
[0094] 2: while do;
[0095] 3: Step 1: Task planning calculation;
[0096] 4: Calculate task selection and update local task information and ;
[0097] 5: Step 2: Plan consensus;
[0098] 6: If ;
[0099] 7: Send local task information to other drones;
[0100] 8: end if;
[0101] 9: Get other drones Task information , and reset the trigger matrix ;
[0102] 10: for and drones Directly connected drone ( );
[0103] 11: for each task ;
[0104] 12: Asynchronous consensus rules;
[0105] 13: if ;
[0106] 14: and ;
[0107] 15: end if;
[0108] 16: end for;
[0109] 17: end for;
[0110] 18: if ;
[0111] 19: if ;
[0112] 20: and ;
[0113] 21: else;
[0114] twenty two: and ;
[0115] 23: end if;
[0116] 24: if ;
[0117] 25: end while;
[0118] The above asynchronous planning consensus method can effectively resolve inter-machine task conflicts under asynchronous communication. UAVs must be able to continuously receive messages from other UAVs. Therefore, this application runs the UAV task planning algorithm in the form of dual threads, where thread 1 is the main process of the task planning algorithm, and thread 2 is the receiver that continuously receives messages from other UAVs without hanging up. This makes the algorithm more robust to communication degradation conditions such as high packet loss rate and extended communication time.
[0119] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0120] In a verification example, to verify the effectiveness of the proposed method, the UAV cluster distributed task planning method based on asynchronous consensus (AACM method for short) proposed in this application is compared with the most representative asynchronous method ACBBA. Without loss of generality, the experiment adopts a search and rescue scenario of providing medical and food support.
[0121] The duration of the medical support mission is 300s, and the duration of the food support mission is 350s. The missions are randomly distributed in a three-dimensional space of 10km×10km×1km. The drones are randomly distributed on the ground of 10km×10km×0m. The speed of the drone providing medical support is 30m / s, and the speed of the drone providing food support is 50m / s. The experiment was conducted under a variety of experimental conditions, including the ratio of the number of missions to the number of drones p=m=n (the value range is 3-5, the step length is 1), the number of drones n (the value range is 6-16, the step length is 2), the location of drones and the mission conditions. Ten Monte Carlo experiments were conducted under the same p and n conditions with randomly distributed drones and missions. The communication range of the drones is set to 3km. When the drones are randomly distributed, it is ensured that at least one drone is within its communication range, so as to ensure the possibility of global communication of the drone cluster.
[0122] Figure 3 The comparison chart of message sending frequency between the traditional ACBBA method and the AACM method proposed in this application is shown, where (a) is , The message sending frequency comparison diagram of the two methods is shown in (b). , The message sending frequency comparison diagram of the two methods is shown in (c). , The comparison chart of the message sending frequency of the two methods when , where one message sending is defined as a drone broadcasting its information once. When there is no drone broadcasting in the cluster, the drone cluster can be regarded as reaching the algorithm convergence condition, and then the task plan of all drones can be obtained. It can be found that the AACM method can achieve cluster convergence in a shorter time, and the total number of messages sent is less than that of the ACBBA method. As the number of tasks and drones increases, the advantage of the AACM method becomes more obvious, thanks to the new drone timestamp and agent-related consensus rules that can resolve task conflicts between drones more quickly.
[0123] Figure 4 The statistical graphs of the total number of messages sent by the AACM method and the ACBBA method under different p and n are given, where (a) is The total number of messages sent under different n is shown in (b). The total number of messages sent under different n is shown in (c). Statistics of the total number of messages sent at different times n. Figure 4 It can be seen that under all p and n, the number of messages sent by the AACM method is less than that of the ACBBA method. Moreover, as the number of drones increases, the total number of messages sent also increases, and the advantage of the AACM method over the ACBBA method becomes more prominent. It should be noted that when the number of tasks exceeds the drone scale load, the number of candidate tasks for drones increases, thereby reducing task conflicts between drones, resulting in a narrowing of the gap between the two methods.
[0124] Figure 5 The statistics of global convergence time and individual termination time are given, where (a) is The statistical diagram of global convergence time and individual termination time under different n, (b) is The statistical diagram of global convergence time and individual termination time under different n, (c) is The global convergence time and individual termination time statistics for different n. Note: The curve is the change of the mean, and the vertical error bar is the variance. It can be seen that the global convergence time, that is, the task planning time, is consistent with the change of the number of messages sent. The planning time of AACM is shorter than that of ACBBA at all p and n, and the advantage continues to expand as p or n increases. ; The capabilities of the drones on the network are somewhat saturated. For the three proposed individual termination methods, the interval time basically increases with the increase of p or n, showing a certain change pattern, which can be used as a judgment method for the termination of individual algorithms in practical applications. However, the termination based on task information and the termination based on message sending have smaller changes than the termination based on task planning, and may be more suitable as individual termination criteria. In addition, the time of individual termination may also change under different network conditions. Therefore, further testing under different network conditions is required before actual use, with the upper limit of the time in all cases as the threshold.
[0125] In short, the AACM proposed in this application uses drone timestamps instead of task drone timestamps, which can effectively reduce the amount of communication. Based on the new drone timestamp, an asynchronous consensus rule related to drones is designed, which can quickly resolve task conflicts between drones and further reduce the number of messages sent and planning time. Through Monte Carlo simulation, the ratio of the size of the drone cluster to the number of tasks is (6:16)-(16:80). Compared with the range of [631,5363] of the number of messages sent by ACBBA, the range of the number of messages sent by AACM is [423,3779], which is a reduction of 29%-60%; in terms of communication volume and planning time, the results of ACBBA are [133KB, 4866KB] and [1254ms, 11250ms], and the results of AACM are [69KB, 2126KB] and [996ms, 8184ms], which are improved by 46%-71% and 12%-47%, respectively.
[0126] In one embodiment, Figure 6 As shown, a distributed task planning device for a drone cluster based on asynchronous consensus is provided, including: a drone cluster communication setting module, an iterative initialization module, a task plan calculation module and a task plan consensus module, wherein:
[0127] The drone cluster communication setting module is used for drone i to communicate with other drones in the drone cluster through asynchronous communication, and continuously receive task information broadcast by other drones k; the task information of drone i includes: the task winner considered by drone i, the winner price of the task recognized by drone i, and the drone timestamp; the drone timestamp indicates the time when the n drones controlled by drone i generate or update their tasks.
[0128] The iteration initialization module is used to initialize the convergence flag and the iteration counter to 0, initialize the broadcast flag to 1, and set the convergence threshold.
[0129] The task plan calculation module is used to calculate the task selection in the task plan calculation link and update the local task information;
[0130] The task planning consensus module is used to obtain the task information of other drones k in the task planning consensus link. Drone i and other drones resolve the task conflicts between machines through the asynchronous consensus rule of the highest bidder to obtain conflict-free task information; if the broadcast flag is 1, its local task information will be broadcast; at the end of the task planning consensus link, the iteration counter is increased by 1; if the task conflict is resolved, the broadcast flag is set to 1, otherwise the broadcast flag is set to 0; if the iteration counter reaches the convergence threshold, the convergence flag is set to 1 and the iteration continues, otherwise, the convergence flag is set to 0, the iteration is stopped, and a conflict-free task plan is obtained; Among them, the asynchronous consensus rules include: drone i is used as the receiver and other drones k in the cluster are used as senders; fast consistency rule: after drone i receives the message about task j from drone k; if drone i believes that the winner of task j is a third-party drone m, if drone k If there is a higher bid or updated drone m message, drone i will update its local information about task j and forward it, so that the receiver can quickly reach an agreement with the sender on the information of task j; when drone k's bid for task j is smaller, drone i will retain its local information and forward it to drone k regardless of its drone timestamp; tie-breaking rule: drone i can not only break the situation where its bid is the same as other drones, but also help other drones break the tie situation of equal bids in advance, so as to prevent redundant task information forwarding and reduce network communication load; redundancy detection rule: when there is a conflict that needs to be handled and notified to other drones, the receiver forwards the message; when the timestamp of the receiver's drone is older or the timestamp of the sender's drone is older, message forwarding is required; misrepresentation avoidance rule: when the receiver receives the message but cannot make a judgment, reset is used to avoid erroneous message updates and no forwarding is performed.
[0131] In one embodiment, the task plan calculation module is also used to remove tasks that conflict with the plan consensus from the local plan of drone i during the task plan calculation phase, and then add tasks with a higher price than the current winner to form the local plan for this iteration and update the local task information.
[0132] In one of the embodiments, the task planning consensus module is also used for, in the task planning consensus link, UAV i broadcasts local task information and obtains the latest task information of other UAVs, and when obtaining the latest message of other UAVs, updates the latest message of other UAVs that has been received to the local buffer; for the first task of the first other UAV directly connected to UAV i, resolves the inter-machine task conflict through asynchronous consensus rules to obtain conflict-free task information; continues to resolve the conflict for the next task of the first other UAV until all tasks of the first other UAV are traversed, and continues to resolve the conflict for the task of the second other UAV until all other UAVs directly connected to UAV i are traversed.
[0133] In one of the embodiments, the information forwarding of the drone adopts the UDP broadcast mode; before drone i receives the update message of other drones, it is assumed that the status of other drones is not updated. Then drone i will continue to broadcast its messages to avoid other drones being unable to receive the local message due to communication problems such as packet loss.
[0134] In one embodiment, the process of determining the drone timestamp in the mission information in the drone cluster communication setting module includes: for drone i, the drone timestamp The i-th element in This is the time when the local task is generated or updated, which can be obtained through local records; drone timestamp The i-th element in Other elements besides , it needs to be obtained through communication; the acquisition method is: if drone k and drone i are directly connected by communication, then drone i’s task update time for drone k UAV timestamp vector sent by UAV k Get; if UAV k and UAV i are directly connected without communication, then UAV i's task update time for UAV k It needs to be obtained from other drone m. Drone m needs to be directly connected to drone i, and drone m has the mission update time of drone k.
[0135] In one of the embodiments, when there are multiple drones m directly connected to drone i, the drone timestamp of drone k uses the latest one among the multiple drones m.
[0136] In one embodiment, the trigger matrix is used to record the reasons that trigger the sender to broadcast. When the drone needs to send the information of its mission j to drone k, , The method also includes: an avoidance module for avoiding message flooding problems, which is used to initialize the elements of the trigger matrix of the current iteration and the trigger matrix of the previous iteration to 0 before the drone i enters the task planning phase and the task consensus phase iteration, and set the value of the counter recording the same broadcast reason to 0; after entering the task planning consensus phase, if the drone i and the drone k have a conflict on task j and need to resolve the task conflict through broadcasting, Set to 1; at the end of the task plan consensus phase, the drone checks whether the trigger matrix of the current iteration is the same as the trigger matrix of the previous iteration; if they are the same, the value of the counter recording the same broadcast reason is increased by one; otherwise, the value of the counter is reset to 0, and the trigger matrix of this iteration is set to be the same as the matrix of the previous iteration; after multiple iterations, when the value of the counter reaches the set threshold, drone i believes that drone k has reached a consensus or has exited the cluster, then drone i will no longer broadcast and set the broadcast flag to 0.
[0137] In one of the embodiments, the device runs in the form of dual threads, where thread 1 is the main process of the task planning algorithm, and thread 2 is a receiver that continuously receives messages from other drones without hanging up; each thread runs independently and does not hang up, and information exchange between threads is achieved through caching.
[0138] For the specific limitations of the drone swarm distributed task planning device based on asynchronous consensus, please refer to the limitations of the drone swarm distributed task planning method based on asynchronous consensus above, which will not be repeated here. Each module in the above-mentioned drone swarm distributed task planning device based on asynchronous consensus can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0139] The technical features of the above embodiments may be arbitrarily combined. 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.
[0140] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A distributed task planning method for drone swarm based on asynchronous consensus, characterized in that: The method comprises: Drone i communicates with other drones in the drone cluster through asynchronous communication, and continuously receives task information broadcast by other drones k; the task information includes: the task winner, the task winner's price and the drone timestamp; the drone timestamp indicates the time when the n drones controlled by drone i generate or update their tasks; Initialize the convergence flag and iteration counter to 0, and initialize the broadcast flag to 1; Calculate the task selection in the task plan calculation phase and update the local task information; In the task planning consensus phase, the task information of other drones k is obtained. Drone i and other drones resolve the task conflicts between drones through the asynchronous consensus rule of the highest bidder wins, and obtain conflict-free task information. If the broadcast flag is 1, its local task information will be broadcast; At the end of the task plan consensus phase, the iteration counter is increased by 1; if the task conflict is resolved, the broadcast flag is set to 1, otherwise the broadcast flag is set to 0; If the iteration counter reaches the preset convergence threshold, the convergence flag is set to 1, and the iteration of the task plan calculation link and the task plan consensus link continues; otherwise, the convergence flag is set to 0, the iteration is stopped, and a conflict-free task plan is obtained; The asynchronous consensus rules include: Consider drone i as the receiver and other drones k in the cluster as senders; Fast consensus rule: After drone i receives the message about task j from drone k; if drone i believes that the winner of task j is a third-party drone m, and if drone k has a higher bid or a newer message from drone m, drone i will update its local information about task j and forward it, so that the receiver can quickly reach a consensus with the sender on the information about task j; when drone k's bid for task j is smaller, drone i will retain its local information and forward it to drone k regardless of its drone timestamp; Tie-breaking rule: Drone i can not only break the situation where its price is the same as other drones, but also help other drones break the tie situation of equal price in advance, so as to prevent redundant task information forwarding and reduce network communication load; Redundancy detection rules: When there is a conflict that needs to be handled and notified to other drones, the receiver forwards the message; when the timestamp of the receiving drone is older or the timestamp of the sending drone is older, the message needs to be forwarded; Avoid mistransmission rules: When the receiver receives a message but cannot make a judgment, a reset is used to avoid incorrect message updates and the message is not forwarded.
2. The method according to claim 1, characterized in that Calculate the task selection in the task plan calculation phase and update the local task information, including: In the task plan calculation phase, drone i will remove tasks that conflict with the plan consensus from the local plan, and then add tasks with a higher price than the current winner to form the local plan for this iteration and update it in the local task information.
3. The method according to claim 1, characterized in that In the task planning consensus phase, the task information of other drones k is obtained. Drone i and other drones resolve the task conflicts between drones through the asynchronous consensus rule of the highest bidder wins, and obtain conflict-free task information, including: In the task plan consensus phase, drone i broadcasts local task information and obtains the latest task information from other drones. When obtaining the latest information from other drones, it updates the latest information from other drones that has been received to the local buffer; For the first task of the first other drone directly connected to drone i, the task conflicts between drones are resolved through asynchronous consensus rules to obtain conflict-free task information; Continue to resolve conflicts for the next task of the first other UAV until all tasks of the first other UAV are traversed, and continue to resolve conflicts for the tasks of the second other UAV until all other UAVs directly connected to UAV i are traversed.
4. The method according to claim 1, characterized in that: The information forwarding of the drone adopts UDP broadcast mode; Before receiving update messages from other drones, drone i assumes that the status of other drones will not be updated. Then drone i will continue to broadcast its messages to avoid other drones being unable to receive its messages due to communication problems such as packet loss.
5. The method according to claim 1, characterized in that The process of determining the drone timestamp in the mission information includes: For drone i, drone timestamp The i-th element in The time when the local task is generated or updated, obtained through local records; For drone timestamps The i-th element in Other elements besides , then it is obtained through communication; the acquisition method is: if UAV k and UAV i are directly connected by communication, then UAV i’s task update time for UAV k UAV timestamp vector sent by UAV k Get; if drone k and drone i are directly connected without communication, then drone i's task update time for drone k It needs to be obtained from other UAV m, UAV m is directly connected to UAV i, and UAV m has the mission update time of UAV k.
6. The method according to claim 5, characterized in that When there are multiple drones m directly connected to drone i, the drone timestamp of drone k uses the latest one among the multiple drones m.
7. The method according to claim 1, characterized in that The trigger matrix is used to record the reasons that trigger the sender to broadcast. When the drone needs to send the information of its task j to drone k, , ; The specific steps of the avoidance mechanism to avoid message flooding problem include: Before UAV i enters the iteration of the mission planning phase and the mission consensus phase, the elements of the trigger matrix of the current iteration and the trigger matrix of the previous iteration are initialized to 0, and the value of the counter recording the same broadcast reason is set to 0; After entering the task plan consensus phase, if UAV i and UAV k have a conflict on task j and need to resolve the task conflict through broadcasting, Set to 1; At the end of the mission plan consensus phase, the drone checks whether the trigger matrix of the current iteration is the same as the trigger matrix of the previous iteration; if they are the same, the value of the counter recording the same broadcast reason is increased by one; Otherwise, the value of the counter is reset to 0, and the trigger matrix of this iteration is set to the same as the matrix of the previous iteration; after multiple iterations, when the value of the counter reaches the set threshold, drone i believes that drone k has reached a consensus or has exited the cluster, then drone i will no longer broadcast and set the broadcast flag to 0.
8. The method according to claim 1, characterized in that The method is run in the form of dual threads, where thread 1 is the main process of the task planning algorithm, and thread 2 is a receiver that continuously receives messages from other drones without hanging up; each thread runs independently and does not hang up, and information interaction is achieved between threads through caching.
9. A distributed task planning device for drone swarm based on asynchronous consensus, characterized in that: The device comprises: The drone cluster communication setting module is used for drone i to communicate with other drones in the drone cluster through asynchronous communication, and continuously receive the task information broadcast by other drones k; the task information of drone i includes: the task winner considered by drone i, the winner price of the task recognized by drone i, and the drone timestamp; the drone timestamp indicates the time when the n drones controlled by drone i generate or update their tasks; An iteration initialization module, used to initialize the convergence flag and iteration counter to 0, initialize the broadcast flag to 1, and set the convergence threshold; The task plan calculation module is used to calculate the task selection in the task plan calculation link and update the local task information; The task plan consensus module is used to obtain the task information of other drones k in the task plan consensus link. Drone i and other drones resolve the task conflicts between machines through the asynchronous consensus rule of the highest bidder to obtain conflict-free task information; if the broadcast flag is 1, its local task information will be broadcast; at the end of the task plan consensus link, the iteration counter is increased by 1; if the task conflict is resolved, the broadcast flag is set to 1, otherwise the broadcast flag is set to 0; if the iteration counter reaches the convergence threshold, the convergence flag is set to 1 and the iteration continues, otherwise, the convergence flag is set to 0, the iteration stops, and a conflict-free task plan is obtained; wherein, The asynchronous consensus rules include: taking drone i as the receiver and taking other drones k in the cluster as the sender; fast consensus rule: after drone i receives the message about task j from drone k; if drone i believes that the winner of task j is a third-party drone m, if drone k has a higher bid or a newer drone m message, drone i will update its local information about task j and forward it, so that the receiver can quickly reach a consensus with the sender on the information of task j; when drone k's bid for task j is smaller, drone i will retain its local information and forward it to drone k regardless of its drone timestamp; Tie-breaking rule: Drone i can not only break the situation where its price is the same as other drones, but also help other drones break the tie situation with equal prices in advance, so as to prevent redundant task information forwarding and reduce network communication load; Redundancy detection rule: When there is a conflict that needs to be handled and other drones need to be notified, the receiver forwards the message; when the timestamp of the receiving drone is older or the timestamp of the sending drone is older, message forwarding is required; Avoid mistransmission rule: When the receiver receives the message but cannot make a judgment, reset is used to avoid erroneous message updates and no forwarding is performed.
Citation Information
Patent Citations
Cluster quad-rotor unmanned aerial vehicle task planning method based on negotiation consensus
CN113934228A
Unmanned aerial vehicle asynchronous action and cooperation strategy synthesis method based on probabilistic model detection
CN114722946A