Multi-agent conflict coordination method and device, equipment and medium
By performing deadlock detection and conflict coordination in a multi-agent system, key agents are identified and corresponding strategies are adopted, thus resolving the path conflict problem and improving the system's stability and response speed.
Patent Information
- Application Number
- CN202511075183.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-08-01
AI Technical Summary
The lack of efficient conflict prediction mechanisms in existing multi-agent systems leads to local optimal choices causing global path conflicts during path planning, making it difficult to achieve globally optimal path allocation.
By performing deadlock detection before agents execute tasks, key agents that are stuck in a waiting state due to occupying the same path node are identified. Based on the number of key agents, an avoidance point strategy or a replanning strategy is selected to avoid path conflicts.
It improves the stability and reliability of multi-agent systems, reduces the burden of real-time decision-making, quickly resolves conflicts, and enhances the system's response speed and adaptability.
Smart Images

Figure CN120579575B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent agent technology, and in particular to a method, apparatus, device and medium for conflict coordination among multiple intelligent agents. Background Technology
[0002] With the development of technologies such as machine vision, automatic control, and artificial intelligence, intelligent agent application technology has also made significant progress. Currently, intelligent agents are being applied in various situations to achieve goals such as saving manpower, improving work efficiency, and avoiding the dangers of manual operation.
[0003] Currently, multi-agent systems typically use graph theory algorithms (such as Dijkstra's algorithm or A*). The algorithm is used to plan paths and mark resource occupancy on the graph so as to avoid nodes or paths occupied by other agents in real time by dynamically updating the graph state.
[0004] However, graph theory algorithms lack efficient conflict prediction mechanisms, do not fully consider the interaction effects between agents, rely solely on simple resource occupancy marking to avoid conflicts, cannot identify potential conflicts in advance, and are difficult to achieve globally optimal path allocation. When multiple agents plan paths simultaneously, conflicts may occur in the global path due to local optimal choices. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for coordinating conflicts among multiple agents, which addresses the shortcomings of existing technologies that rely solely on simple resource occupancy markers to effectively avoid conflicts. This effectively solves the path conflict problem in multi-agent systems and improves the overall performance and reliability of the system.
[0006] This invention provides a multi-agent conflict coordination method, comprising: distributing pre-acquired planned paths of each agent to the corresponding agents; performing deadlock detection on the next path node of each agent according to the planned paths of each agent to obtain key agent information, the key agent information including agents that are stuck in a waiting state due to occupying the same path node; selecting a conflict coordination strategy and executing it according to the number of key agents in the key agent information; wherein the conflict coordination strategy is configured in advance based on the corresponding number of key agents.
[0007] According to a multi-agent conflict coordination method provided by the present invention, deadlock detection is performed on the next path node of each agent according to the planned path of each agent to obtain key agent information. The method includes: based on the same time step, determining whether the next path node of each agent is occupied according to the planned path of each agent, thereby obtaining key agent information, which includes the agent and other agents occupying the next path node of the agent; when it is determined that the next path node of other agents is not occupied or the occupying agent is an agent in the key agent information, the deadlock detection process ends; when it is determined that the next path node of other agents is occupied and the occupying agent is not an agent in the key agent information, the corresponding occupying agent is updated to the key agent information, and the method continues to determine whether the next path node of the occupying agent is not occupied or whether the corresponding occupying agent is an agent in the key agent information, according to the planned path of each agent, until it is determined that the corresponding next path node is not occupied or the corresponding occupying agent is an agent in the key agent information, at which point the deadlock detection process ends.
[0008] According to a multi-agent conflict coordination method provided by the present invention, the conflict coordination strategy includes an avoidance point strategy and a replanning strategy. Based on the number of key agents in the key agent information, a conflict coordination strategy is selected and executed, including: when the number of key agents is less than a preset threshold, an avoidance point strategy is selected and executed; wherein, the avoidance point strategy is used to control the corresponding key agent to move to a preset avoidance node corresponding to the key agent for avoidance based on the key agent information and the planned path of each agent; when the number of key agents is greater than or equal to the preset threshold, a replanning strategy is selected and executed; wherein, the replanning strategy is used to control all key agents to move to a preset free area based on the key agent information, and to replan the paths of all key agents.
[0009] According to a multi-agent conflict coordination method provided by the present invention, an avoidance point strategy is implemented, comprising: selecting other agents occupying the next node of an agent based on key agent information, and obtaining the preset avoidance nodes of the other agents; when it is determined that the preset avoidance nodes of other agents are not occupied according to the planned paths of each agent, controlling the other agents to move to the preset avoidance nodes; when it is determined that the preset avoidance nodes of other agents are occupied, continuing to determine whether the preset avoidance nodes of other agents occupying the preset avoidance nodes of other agents are occupied according to the planned paths of each agent, until an unoccupied preset avoidance point is obtained, and sequentially moving the corresponding other agents to the corresponding unoccupied preset avoidance points.
[0010] According to a multi-agent conflict coordination method provided by the present invention, a replanning strategy is implemented, including: moving all key agents to a preset free area and updating the starting position of each key agent; based on the starting position of each key agent, combined with the previously acquired target position of each key agent and the environmental map, using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to perform path search and obtain the planned path of each agent.
[0011] According to the multi-agent conflict coordination method provided by the present invention, deadlock detection is performed on the next path node of the corresponding agent according to the planned path of each agent. The method further includes: based on the same time step, according to the planned path of each agent, determining that the next path node of the agent is not occupied for each agent, reserving the next path node of the agent and releasing the previous path node of the agent using a preset reservation time window.
[0012] According to the present invention, a multi-agent conflict coordination method is provided, which distributes the planned paths of each agent obtained in advance to the corresponding agent. The method includes: sending the planned paths of each agent obtained in advance to a preset middleware, so as to convert the format of the planned paths of the agents according to the type of the corresponding agents, and distributing the converted planned paths to the corresponding agents.
[0013] The present invention also provides a multi-agent conflict coordination device, comprising: a deadlock detection module, which distributes the planned paths of each agent to the corresponding agents and performs deadlock detection on the next path node of each agent according to the planned paths of each agent to obtain key agent information, including agents that are stuck in a waiting state due to occupying the same path node; and a conflict coordination module, which selects and executes a conflict coordination strategy according to the number of key agents in the key agent information; wherein the conflict coordination strategy is configured in advance based on the corresponding number of key agents.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the multi-agent conflict coordination method as described above.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-agent conflict coordination method as described above.
[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the multi-agent conflict coordination method as described above.
[0017] The multi-agent conflict coordination method, apparatus, device, and medium provided by this invention prevent deadlock caused by path conflicts during agent execution by performing deadlock detection before agents execute tasks, thereby improving the stability and reliability of the system. Furthermore, different conflict coordination strategies are pre-configured for different numbers of key agents to reduce the burden of real-time decision-making, handle various conflict situations more flexibly, accelerate conflict resolution, improve system response speed, and enhance system adaptability and efficiency. This effectively solves the path conflict problem in multi-agent systems and improves the overall performance and reliability of the system. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the conflict coordination method for multiple agents provided by the present invention.
[0020] Figure 2 This is a schematic diagram of the deadlock detection process provided by the present invention;
[0021] Figure 3 This is a schematic diagram of the multi-agent conflict coordination device provided by the present invention;
[0022] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] Figure 1 This is a flowchart illustrating the multi-agent conflict coordination method provided by the present invention, as shown below. Figure 1 As shown, the method includes:
[0025] S11, the planned paths of each agent will be sent to the corresponding agents, and deadlock detection will be performed on the next path node of each agent according to the planned path of each agent to obtain key agent information, including agents that are stuck in a waiting state due to occupying the same path node;
[0026] S12, select and execute a conflict coordination strategy based on the number of key agents in the key agent information; wherein, the conflict coordination strategy is configured in advance based on the corresponding number of key agents.
[0027] It should be noted that the step number "S1N" in this specification does not represent the order of the multi-agent conflict coordination methods. The following details will explain this in conjunction with... Figure 2 The present invention describes a multi-agent conflict coordination method.
[0028] Step S11 involves sending the planned paths of each agent to the corresponding agents and performing deadlock detection on the next path node of each agent according to the planned paths of each agent to obtain key agent information, which includes agents that are stuck in a waiting state due to occupying the same path node.
[0029] In one optional embodiment, before distributing the pre-acquired planned paths of each agent to the corresponding agent, the process includes: acquiring the starting position, target position, and environment map of each agent, and using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to perform path search and obtain the planned paths of the agents. It should be noted that the method for performing path search to obtain the planned paths of the agents can refer to the replanning strategies described below, and will not be repeated here.
[0030] Furthermore, after obtaining the planned paths of the agents, the process includes: distributing the previously obtained planned paths of each agent to the corresponding agent.
[0031] Specifically, the planned paths of each agent, obtained in advance, will be sent to the corresponding agents. This includes sending the planned paths of each agent to a preset middleware, which will convert the format of the planned paths according to the type of the agent, and then send the converted planned paths to the corresponding agents. Additionally, when an agent returns real-time status information to the scheduling system after executing the planned path, the middleware will also convert the format of the status information, and then send the converted status path to the corresponding scheduling system.
[0032] Furthermore, after the planned paths of each agent are distributed to the corresponding agents, the following steps are taken: based on the planned paths of each agent, deadlock detection is performed on the next path node of the corresponding agent.
[0033] It should be added that deadlock detection is used to detect whether, at the same time step, there are agents waiting for each other due to competing for the same path node.
[0034] Specifically, refer to Figure 2 Based on the planned paths of each agent, deadlock detection is performed on the next path nodes for each agent. This includes: at the same time step, based on the planned paths of each agent, determining that the next path node of each agent is not occupied, reserving the next path node for the agent using a preset reservation time window, and releasing the previous path node of the agent. It should be noted that "release" is used to cancel the corresponding reserved path node.
[0035] Furthermore, the length of the preset reservation time window can be set based on the longest movement distance of the agent from a standstill to its maximum idle speed and from its maximum idle speed to a standstill, as well as the collision volume of the agent. The specific setting can be determined according to actual design requirements or experimental results. During path distribution, the preset reservation time window occupies the corresponding path node and distributes it to the corresponding agent, while releasing the previous node, ensuring continuous movement of the agent and preventing collisions caused by agents simultaneously arriving at the same path node.
[0036] Additionally, please continue to refer to Figure 2 Based on the planned paths of each agent, deadlock detection is performed on the next path nodes of the corresponding agent. It also includes: based on the planned paths of each agent, deadlock detection is performed on the next path nodes of the corresponding agent to obtain key agent information.
[0037] Furthermore, based on the planned paths of each agent, deadlock detection is performed on the next path nodes of the corresponding agents to obtain key agent information. This includes: based on the same time step, according to the planned paths of each agent, determining whether the next path node of each agent is occupied, and obtaining key agent information, which includes the agent and other agents occupying the next path node of the agent; when it is determined that the next path node of other agents is not occupied or the occupying agent is an agent in the key agent information, the deadlock detection process ends; when it is determined that the next path node of other agents is occupied and the occupying agent is not an agent in the key agent information, the corresponding occupying agent is updated to the key agent information, and based on the planned paths of each agent, it continues to determine whether the next path node of the occupying agent is not occupied or whether the corresponding occupying agent is an agent in the key agent information, until it is determined that the corresponding next path node is not occupied or the corresponding occupying agent is an agent in the key agent information, at which point the deadlock detection process ends.
[0038] It is worth noting that if the next node cannot be occupied, a deceleration command is issued to the agent until the agent comes to a complete stop at the last occupied node. After a new node is successfully reserved, the agent is controlled to stop decelerating and accelerate, thereby effectively avoiding any form of collision throughout the process.
[0039] Step S12: Select and execute a conflict coordination strategy based on the number of key agents in the key agent information; wherein the conflict coordination strategy is configured in advance based on the corresponding number of key agents.
[0040] In this embodiment, the conflict coordination strategy includes an avoidance point strategy and a replanning strategy. Based on the number of key agents in the key agent information, a conflict coordination strategy is selected and executed, including: when the number of key agents is less than a preset threshold, an avoidance point strategy is selected and executed; wherein, the avoidance point strategy is used to control the corresponding key agent to move to a preset avoidance node corresponding to the key agent for avoidance based on the key agent information and the planned path of each agent; when the number of key agents is greater than or equal to the preset threshold, a replanning strategy is selected and executed; wherein, the replanning strategy is used to control all key agents to move to a preset free area based on the key agent information and to replan the paths of all key agents.
[0041] Specifically, the avoidance point strategy includes: selecting other agents occupying the next node of the agent based on key agent information, and obtaining the preset avoidance nodes of the other agents; when it is determined that the preset avoidance nodes of other agents are not occupied according to the planned paths of each agent, controlling the other agents to move to the preset avoidance nodes; when it is determined that the preset avoidance nodes of other agents are occupied, continuing to determine whether the preset avoidance nodes of other agents occupying the preset avoidance nodes of other agents are occupied according to the planned paths of each agent, until an unoccupied preset avoidance point is obtained, and then moving the corresponding other agents to the corresponding unoccupied preset avoidance points in sequence.
[0042] It should be noted that when moving other agents to the corresponding unoccupied preset avoidance points in sequence, the agent that last confirmed to have a corresponding unoccupied preset avoidance point is moved to that preset avoidance point first, and the node position after the agent cancels its occupation is provided as an unoccupied preset avoidance point for the corresponding agent to avoid. This process continues until the other agents occupying the next node of the current agent move to the corresponding preset avoidance point.
[0043] In an optional embodiment, after executing the avoidance point strategy, the process includes: making a reservation using a preset reservation time window based on the next path node of each agent, and releasing the previous path node of each agent.
[0044] In addition, the replanning strategy includes: moving all key agents to a preset free area and updating the starting position of each key agent; based on the starting position of each key agent, combined with the previously acquired target position of each key agent and the environmental map, using the adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to perform path search and obtain the planned path of each agent.
[0045] In this embodiment, based on the starting position of each key agent, combined with the previously acquired target positions and environmental map of each key agent, a path search is performed using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to obtain the planned path for each agent. This includes: SA, based on a preset time window, extracting the node with the minimum cost from the preset open set of each agent and adding it to a previously created preset closed set; wherein, during initialization, the nodes in the preset open set are the initial nodes determined based on the starting position of the corresponding agent and the preset cost of the initial nodes; SB, determining the corresponding neighbor nodes based on the node with the minimum cost and the environmental map, and removing neighbor nodes existing in the preset closed set; SC, for each neighbor node, using a search-based temporal A algorithm (STA), determining the first cost from the initial node to the neighbor node via the node with the minimum cost, and using a real-time repair A algorithm (STA). RRA The process involves: 1) performing a reverse search from the target node to its neighboring nodes to obtain the second cost; where the target node is determined based on the target position of the corresponding agent; 2) determining the total cost of the corresponding neighboring nodes based on the first and second costs; 3) selecting the neighboring node with the minimum total cost as the next path node in the agent's planned path based on the total cost of each neighboring node, and updating the next path node and its corresponding total cost to the agent's preset open set; and 4) adjusting the preset time window based on the preset time step, and iterating steps SA-SE using the adjusted preset time window until the preset maximum number of iterations is reached to obtain the corresponding planned path.
[0046] It should be noted that, through WHCA The hierarchical structure, using correspondence and windowing techniques to calculate for each agent, initially plans the multi-agent path and combines it with real-time repair (RRA). The mechanism and reverse search enhance the flexibility and adaptability of path planning. By using a hierarchical approach, the scale of the multi-agent path planning problem is simplified, improving the computation speed. The windowing technique focuses on local path optimization, reducing the computational burden of global search. Furthermore, the real-time repair mechanism dynamically detects and repairs path conflicts, enhancing the algorithm's adaptability to dynamic environments and ensuring path feasibility.
[0047] If the open set is empty and no path is found, a preset character representing the corresponding meaning is returned. The preset character can be set according to actual design requirements, such as None, etc., without further limitation here. Additionally, in the initial iteration, the nodes in the preset open set are the initial node and its corresponding preset cost. In subsequent iterations, the nodes in the preset open set can be determined based on the update from the previous iteration; refer to the above process for details, which will not be further described here. Furthermore, by using STA, priority queues (preset open sets) and preset closed sets are used to manage pending and processed nodes, and RRA is considered during the planning process. The object provides a reverse cost estimate to optimize the path, RRA Used to support STA in accurately assessing costs during path planning.
[0048] Specifically, based on the node with the lowest cost and the environment map, the corresponding neighbor node is determined, including: determining the corresponding neighbor node based on the node with the lowest cost and the environment map; removing the corresponding neighbor node if it is determined that there is an obstacle or it is occupied based on the state of each neighbor node in the environment map; and / or removing the corresponding neighbor node if it is determined that the agent is a restricted type of the corresponding neighbor node based on the state of each neighbor node in the environment map.
[0049] In addition, the total cost of the corresponding neighboring nodes is determined based on the first cost and the second cost, including: determining the first location cost based on the node with the lowest cost, its predecessor, and its corresponding neighboring nodes; determining whether the road segment formed by the node with the lowest cost, passing through the node with the lowest cost to the corresponding neighboring node, and combining the environmental map to obtain the corresponding second location cost; wherein the second location cost is set based on different types of agents and their respective maps; determining the corresponding third location cost based on the corresponding agent; wherein the third location cost is set based on the agent traveling in a straight line within the corresponding preset driving area; and obtaining the total cost of the corresponding neighboring nodes based on the first location cost, the second location cost, the third location cost, the first cost, and the second cost.
[0050] In summary, the embodiments of the present invention prevent deadlocks caused by path conflicts during the execution of tasks by performing deadlock detection before the agents execute tasks, thereby improving the stability and reliability of the system. Furthermore, different conflict coordination strategies are pre-configured for different numbers of key agents to reduce the burden of real-time decision-making, handle various conflict situations more flexibly, accelerate conflict resolution, improve system response speed, and enhance system adaptability and efficiency. This effectively solves the path conflict problem in multi-agent systems and improves the overall performance and reliability of the system.
[0051] The multi-agent conflict coordination device provided by the present invention is described below. The multi-agent conflict coordination device described below and the multi-agent conflict coordination method described above can be referred to in correspondence.
[0052] Figure 3 A schematic diagram of a multi-agent conflict coordination device is shown. The device includes:
[0053] The deadlock detection module 31 will send the planned paths of each agent to the corresponding agents, and perform deadlock detection on the next path node of each agent according to the planned paths of each agent to obtain key agent information, including agents that are stuck in a waiting state due to occupying the same path node.
[0054] The conflict coordination module 32 selects and executes a conflict coordination strategy based on the number of key agents in the key agent information; wherein the conflict coordination strategy is configured in advance based on the corresponding number of key agents.
[0055] In an optional embodiment, the device includes: a path planning module, which, before sending the pre-acquired planned paths of each agent to the corresponding agent, acquires the starting position, target position, and environment map of each agent, and uses an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to perform path search to obtain the planned paths of the agents.
[0056] Furthermore, the deadlock detection module 31 is used to: after obtaining the planned paths of the agents, send the previously obtained planned paths of each agent to the corresponding agents.
[0057] Specifically, the deadlock detection module 31 is used to: send the pre-acquired planned paths of each agent to a preset middleware, which converts the format of the planned paths according to the type of the corresponding agent, and then sends the converted planned paths to the corresponding agents. Additionally, when an agent returns real-time feedback status information to the scheduling system after executing the planned path, the middleware also converts the format of the status information, and then sends the converted status path to the corresponding scheduling system.
[0058] Furthermore, the deadlock detection module 31 is also used to: after sending the planned paths of each agent to the corresponding agents, perform deadlock detection on the next path node of each agent according to the planned paths of each agent.
[0059] Specifically, the deadlock detection module 31 includes: a detection unit, which, based on the same time step and according to the planned paths of each agent, determines for each agent that the next path node of the agent is not occupied. Correspondingly, the device also includes: a reservation module, which, using a preset reservation time window, reserves the next path node of the agent and releases the previous path node of the agent. It should be noted that "release" is used to cancel the corresponding reserved path node.
[0060] In addition, the detection unit is also used to: perform deadlock detection on the next path node of each agent according to the planned path of each agent, and obtain key agent information.
[0061] Furthermore, the detection unit is used to: based on the same time step, and according to the planned paths of each agent, determine for each agent whether the next path node of the agent is occupied, thereby obtaining key agent information, which includes the agent and other agents occupying the next path node of the agent; when it is determined, based on the planned paths of each agent, that the next path node of other agents is not occupied or that the occupying agent is an agent in the key agent information, the deadlock detection process ends; when it is determined that the next path node of other agents is occupied and the occupying agent is an agent not in the key agent information, the corresponding occupying agent is updated to the key agent information, and based on the planned paths of each agent, it continues to determine whether the next path node of the occupying agent is not occupied or whether the corresponding occupying agent is an agent in the key agent information, until it is determined that the corresponding next path node is not occupied or the corresponding occupying agent is an agent in the key agent information, at which point the deadlock detection process ends.
[0062] In this embodiment, the conflict coordination module 32 is used to: when the number of key intelligent agents is less than a preset number threshold, select an avoidance point strategy and execute it; wherein, the avoidance point strategy is used to control the corresponding key intelligent agent to move to the preset avoidance node corresponding to the key intelligent agent to avoid it according to the key intelligent agent information and the planned path of each intelligent agent; when the number of key intelligent agents is greater than or equal to the preset number threshold, select a replanning strategy and execute it; wherein, the replanning strategy is used to control all key intelligent agents to move to a preset free area according to the key intelligent agent information, and replan the path of all key intelligent agents.
[0063] Specifically, the conflict coordination module 32 includes: an avoidance point confirmation unit, which selects other intelligent agents occupying the next node of the intelligent agent based on key intelligent agent information, and obtains the preset avoidance nodes of the other intelligent agents; an occupation status determination unit, which, based on the planned paths of each intelligent agent, controls the other intelligent agents to move to the preset avoidance nodes when it is determined that the preset avoidance nodes of the other intelligent agents are not occupied; when it is determined that the preset avoidance nodes of the other intelligent agents are occupied, it continues to determine whether the preset avoidance nodes of the other intelligent agents occupying the preset avoidance nodes of the other intelligent agents are occupied, until an unoccupied preset avoidance point is obtained, and then moves the corresponding other intelligent agents to the corresponding unoccupied preset avoidance points in sequence.
[0064] In an optional embodiment, the reservation module is further configured to: after executing the avoidance point strategy, make a reservation using a preset reservation time window based on the next path node of each agent, and release the previous path node of each agent.
[0065] In addition, the conflict coordination module 32 also includes: a position update unit, which moves all key agents to a preset free area and updates the starting position of each key agent; and a replanning unit, which, based on the starting position of each key agent and combined with the previously acquired target position and environmental map of each key agent, uses an adaptive window-based hierarchical cooperation A algorithm based on reserved redistribution to perform path search and obtain the planned path of each agent.
[0066] Specifically, the replanning unit is used for: SA, based on a preset time window, extracting the node with the minimum cost from the preset open set for each agent and adding it to the previously created preset closed set; wherein, during initialization, the nodes in the preset open set are the initial nodes determined based on the starting position of the corresponding agent and the preset cost of the initial nodes; SB, determining the corresponding neighbor nodes based on the node with the minimum cost and the environment map, and removing neighbor nodes that exist in the preset closed set; SC, for each neighbor node, using the search-based temporal A algorithm (STA) to determine the first cost from the initial node to the neighbor node via the node with the minimum cost, and using the real-time repair A algorithm (STA). RRA The process involves: 1) performing a reverse search from the target node to its neighboring nodes to obtain the second cost; where the target node is determined based on the target position of the corresponding agent; 2) determining the total cost of the corresponding neighboring nodes based on the first and second costs; 3) selecting the neighboring node with the minimum total cost as the next path node in the agent's planned path based on the total cost of each neighboring node, and updating the next path node and its corresponding total cost to the agent's preset open set; and 4) adjusting the preset time window based on the preset time step, and iterating steps SA-SE using the adjusted preset time window until the preset maximum number of iterations is reached to obtain the corresponding planned path.
[0067] Furthermore, the replanning unit includes: a neighbor node determination subunit, which determines the corresponding neighbor node based on the node with the lowest cost and the environment map; an effective node filtering subunit, which removes the corresponding neighbor node if it is found to have an obstacle or is occupied based on the state of each neighbor node in the environment map; and / or, removes the corresponding neighbor node if it is found that the agent is a restricted type of the corresponding neighbor node based on the state of each neighbor node in the environment map.
[0068] In addition, the replanning unit further includes: a first location cost determination subunit, which determines the first location cost based on the node with the lowest cost, its predecessor node, and its corresponding neighboring nodes; a second location cost determination subunit, which determines whether a road segment formed by the node with the lowest cost, passing through the node with the lowest cost to its corresponding neighboring node, and in conjunction with the environmental map, whether the road segment belongs to a different map, and obtains the corresponding second location cost; wherein the second location cost is set based on different types of agents and their respective maps; a third location cost determination subunit, which determines the corresponding third location cost based on the corresponding agent; wherein the third location cost is set based on the agent traveling in a straight line within the corresponding preset driving area; and a total cost determination subunit, which obtains the total cost of the corresponding neighboring nodes based on the first location cost, the second location cost, the third location cost, the first cost, and the second cost.
[0069] In summary, this invention utilizes a deadlock detection module to perform deadlock detection before agents execute tasks, preventing deadlocks caused by path conflicts during execution and improving system stability and reliability. Furthermore, a conflict coordination module pre-configures different conflict coordination strategies for different numbers of critical agents, reducing the burden of real-time decision-making, handling various conflict situations more flexibly, accelerating conflict resolution, improving system response speed, and enhancing system adaptability and efficiency. This effectively solves the path conflict problem in multi-agent systems, improving overall system performance and reliability.
[0070] Figure 4An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440. The processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a multi-agent conflict coordination method. This method includes: distributing the pre-obtained planned paths of each agent to the corresponding agent; performing deadlock detection on the next path node of each agent according to their planned paths to obtain key agent information, including agents that are stuck in a waiting state due to occupying the same path node; selecting and executing a conflict coordination strategy based on the number of key agents in the key agent information; wherein the conflict coordination strategy is pre-configured based on the corresponding number of key agents.
[0071] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0072] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the multi-agent conflict coordination method provided by the above methods. The method includes: distributing the planned paths of each agent obtained in advance to the corresponding agents, and performing deadlock detection on the next path node of each agent according to the planned paths of each agent to obtain key agent information, including agents that are stuck in a waiting state due to occupying the same path node; selecting a conflict coordination strategy and executing it according to the number of key agents in the key agent information; wherein the conflict coordination strategy is configured in advance based on the corresponding number of key agents.
[0073] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a multi-agent conflict coordination method provided by the above methods. The method includes: distributing pre-acquired planned paths of each agent to the corresponding agents; performing deadlock detection on the next path node of each agent according to the planned paths of each agent to obtain key agent information, including agents that are stuck in a waiting state due to occupying the same path node; selecting a conflict coordination strategy and executing it according to the number of key agents in the key agent information; wherein the conflict coordination strategy is configured in advance based on the corresponding number of key agents.
[0074] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0075] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-agent conflict coordination method, characterized by, Comprise: The planning path of each agent acquired in advance is issued to the corresponding agent, and the next path node of the corresponding agent is detected for deadlock according to the planning path of each agent, to obtain key agent information, the key agent information including the agent trapped in a waiting state due to occupying the same path node; According to the number of key agents in the key agent information, a conflict coordination strategy is selected and executed; wherein the conflict coordination strategy is configured based on the corresponding number of key agents in advance; The conflict coordination strategy includes an avoidance point strategy and a re-planning strategy; according to the number of key agents in the key agent information, a conflict coordination strategy is selected and executed, including: When the number of key agents is determined to be less than a preset number threshold, the avoidance point strategy is selected and executed; wherein the avoidance point strategy is used to control the corresponding key agent to move to a preset avoidance node corresponding to the key agent for avoidance according to the key agent information and the planning path of each agent; When the number of key agents is determined to be greater than or equal to the preset number threshold, the re-planning strategy is selected and executed; wherein the re-planning strategy is used to control all key agents to move to a preset idle interval, and the paths of all key agents are re-planned; Executing the avoidance point strategy includes: According to the key agent information, selecting other agents occupying the next node of the agent, and obtaining the preset avoidance node of the other agent; When the preset avoidance node of the other agent is determined to be unoccupied according to the planning path of each agent, the other agent is controlled to move to the preset avoidance node; When the preset avoidance node of the other agent is determined to be occupied, according to the planning path of each agent, it is determined whether the preset avoidance node of the other agent occupying the preset avoidance node of the other agent is occupied, until an unoccupied preset avoidance point is obtained, and the corresponding other agent is moved to the corresponding unoccupied preset avoidance point in turn; Executing the re-planning strategy includes: Moving all key agents to a preset idle area, and updating the starting position of each key agent; According to the starting position of each key agent, combining the target position of each key agent acquired in advance and the environment map, an adaptive window-based hierarchical cooperative A algorithm based on reservation redistribution is used for path search to obtain the planning path of each agent; According to the planning path of each agent, the next path node of the corresponding agent is detected for deadlock, further comprising: Based on the same time step, according to the planning path of each agent, for each agent, it is determined that the next path node of the agent is unoccupied, and a preset reservation time window is used to reserve the next path node of the agent and release the last path node of the agent.
2. The multi-agent collision coordination method of claim 1, wherein, According to the planning path of each agent, the next path node of the corresponding agent is detected for deadlock, to obtain key agent information, including: The next path node of each agent is determined to be occupied according to the planned path of each agent, and key agent information is obtained, the key agent information including the agent and other agents occupying the next path node of the agent; When the next path node of the other agent is determined to be unoccupied or the occupying agent is the agent in the key agent information according to the planned path of each agent, the deadlock detection process is ended; When the next path node of the other agent is determined to be occupied and the occupying agent is not the agent in the key agent information, the occupying agent is updated to the key agent information, and whether the next path node of the occupying agent is unoccupied or the occupying agent is the agent in the key agent information is determined according to the planned path of each agent until the next path node is determined to be unoccupied or the occupying agent is the agent in the key agent information, and the deadlock detection process is ended.
3. The multi-agent collision coordination method of claim 1, wherein, The planned path of each agent obtained in advance is sent to a preset middleware to perform format conversion on the planned path of each agent according to the type of the agent, and the planned path after format conversion is sent to the corresponding agent. The planned path of each agent obtained in advance is sent to a preset middleware to perform format conversion on the planned path of each agent according to the type of the agent, and the planned path after format conversion is sent to the corresponding agent.
4. A multi-agent collision coordination device, characterized by, The deadlock detection module sends the planned path of each agent obtained in advance to the corresponding agent, and respectively performs deadlock detection on the next path node of the corresponding agent according to the planned path of each agent to obtain key agent information, the key agent information including agents in a waiting state due to occupying the same path node; The conflict coordination module selects a conflict coordination strategy according to the number of key agents in the key agent information and executes the conflict coordination strategy; wherein the conflict coordination strategy is configured based on the number of key agents in advance; The conflict coordination strategy includes an avoidance point strategy and a re-planning strategy; the conflict coordination module is configured to: When the number of key agents is less than a preset number threshold, the avoidance point strategy is selected and executed; wherein the avoidance point strategy is used to control the corresponding key agent to move to a preset avoidance node corresponding to the key agent according to the key agent information and the planned path of each agent to avoid; When the number of key agents is greater than or equal to the preset number threshold, the re-planning strategy is selected and executed; wherein the re-planning strategy is used to control all key agents to move to a preset idle interval and re-plan the paths of all key agents according to the key agent information; The conflict coordination module includes: The avoidance point confirmation unit selects other agents occupying the next node of the agent according to the key agent information, and obtains a preset avoidance node of the other agents; The occupation state determination unit determines, according to the planning path of each agent, when the preset avoidance node of the other agent is not occupied, to control the other agent to move to the preset avoidance node. When the preset avoidance node of the other agent is occupied, according to the planning path of each agent, the occupation state determination unit continues to determine whether the preset avoidance node of the other agent occupying the preset avoidance node of the other agent is occupied until an unoccupied preset avoidance node is obtained, and sequentially moves the corresponding other agent to the corresponding unoccupied preset avoidance node. The conflict coordination module further comprises: A position updating unit moves all key agents to a preset idle area and updates the starting positions of the key agents. A re-planning unit, according to the starting positions of the key agents, combines the target positions of the key agents and the environment map obtained in advance, and uses an adaptive window-based hierarchical cooperative A algorithm based on reservation redistribution to perform path search and obtain the planning path of each agent. The deadlock detection module further comprises: A detection unit, based on the same time step, according to the planning path of each agent, determines, for each agent, whether the next path node of the agent is unoccupied. The device further comprises: A reservation occupation module uses a preset reservation time window to reserve the next path node of the agent and release the previous path node of the agent.
5. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the multi-agent conflict coordination method of any one of claims 1 to 3.
6. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the multi-agent conflict coordination method of any one of claims 1 to 3.
Citation Information
Patent Citations
Communication multi-agent path planning method and device based on priority re-planning
CN118760180A
Intelligent agent dynamic scheduling method and device based on deadlock prediction
CN119130307A