Multi-agent formation method and device based on pigeon flock algorithm
By applying the pigeon flock algorithm in multi-agent formations, the problems of high parameter requirements, easy to fall into local optimal solutions and high hardware resource consumption in the prior art are solved, and more efficient, robust and adaptable formation flight is achieved.
Patent Information
- Application Number
- CN202411884479.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-16
AI Technical Summary
The existing multi-agent formation methods, such as the ant colony algorithm and the dragonfly algorithm, have problems such as high parameter requirements, easy to fall into local optimal solutions, and high hardware resource consumption, and are difficult to apply to complex and large-scale formation tasks.
The multi-agent formation method based on the pigeon flock algorithm is adopted to control the drone for diffusion operations, maintain a safe distance, and use the pre-established pigeon flock algorithm model, including the compass operator model and the landmark operator model, to determine the target points of the drone cluster to achieve stable and efficient flight of the formation.
This method improves the robustness and adaptability of the drone formation, avoids the trap of local optimal solutions, reduces the consumption of hardware resources, and achieves more efficient and accurate task completion.
Smart Images

Figure CN120010462A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of multi-agent technology, and in particular relates to a multi-agent formation method and device based on a pigeon flock algorithm. Background Art
[0002] Currently, when forming a team of multiple agents, the following methods are usually used:
[0003] (1) Multi-agent team formation method based on ant colony algorithm
[0004] Ant Colony Optimization (ACO) is a heuristic optimization algorithm that simulates the foraging behavior of ants. It solves combinatorial optimization problems by simulating the group behavior of ants when looking for food. During the foraging process of ants, when an ant finds a food source, it returns to the ant nest and releases a chemical called pheromone. Other ants will choose a path based on the pheromone concentration when looking for food. Generally, the path with more pheromone is more likely to be selected. As time goes by, pheromones evaporate, so the pheromone concentration on the path will gradually decrease. In the algorithm, the distribution and volatilization process of pheromones simulate this phenomenon. The ant colony algorithm has good global search performance and can widely explore the solution space to obtain the global optimal solution. However, if the problem is more complex, the algorithm converges slowly. In practical applications, if the pheromone does not evaporate in time, it will fall into a local optimal solution.
[0005] (2) Multi-agent formation method based on dragonfly algorithm
[0006] The Dragonfly Algorithm is a heuristic optimization algorithm inspired by the predation behavior of dragonflies. In the algorithm, individual dragonflies move in the search space at a certain speed to find the optimal solution. The speed and direction of movement are affected by multiple factors, such as individual experience, information about neighbors, and global information. During the movement process, individual dragonflies adjust their movement strategies through interactions with neighboring dragonflies and global information. This information sharing helps dragonflies better guide the search process and avoid falling into local optimal solutions. During each iteration, the dragonfly updates its position based on the fitness evaluation results and moves in a more favorable direction. The Dragonfly Algorithm excels at global search in large-scale and complex search spaces, which helps find the global optimal solution to the problem. However, for large-scale problems, the algorithm requires a lot of computing resources, including memory and processor time, resulting in slow convergence and is not suitable for continuous problems.
[0007] The multi-agent formation method can be summarized into the above two methods. The first method has high requirements on parameters. Different parameters are suitable for different scenarios and are prone to fall into local optimality. The second method has high requirements on hardware and takes a lot of time. Therefore, how to provide a multi-agent formation method based on the pigeon flock algorithm has become a technical problem that needs to be solved urgently in this field. Summary of the invention
[0008] The object of the present invention is to provide a multi-agent formation method and device based on pigeon flock algorithm.
[0009] According to a first aspect of the present invention, a multi-agent formation method based on a pigeon flock algorithm is provided, comprising:
[0010] According to the number of drones and the appropriate angle, the drones are controlled to perform a diffusion operation so that a safe distance is maintained between the drones;
[0011] According to the pre-established pigeon flock algorithm model, the compass operator model is used to judge the distance from the drone to the destination and determine the current optimal solution; when the distance from the drone to the destination is less than a preset value, the landmark operator model is used to determine a better solution drone cluster; wherein the pre-established pigeon flock algorithm model includes at least a compass operator model and a landmark operator model;
[0012] According to the optimal solution drone cluster, determine the coordinates of the center point of the drone cluster;
[0013] According to the coordinates of the center point of the drone cluster, the target point of the drone cluster is determined so that all drones in the drone cluster maintain a cluster state and fly to the target point of the drone cluster.
[0014] Optionally, the compass operator model is used to judge the distance from the UAV to the destination and determine the current optimal solution, including:
[0015] In the compass operator stage, the optimal solution position of the drone at the current time is found, and other drones will move to the optimal solution position of the drone.
[0016] Optionally, in the compass operator stage, the optimal solution position of the drone at the current time is found, and other drones move to the optimal solution position of the drone, including:
[0017] In three-dimensional space, the moving direction and speed of the drone cluster are updated according to the following formula:
[0018] V i (t) = V i (t-1)*e -Rt +rand*(X g -Xi (t-1));
[0019] Update the next target position of each drone according to the following formula:
[0020] X i (t) = X i (t-1)+V i (t).
[0021] Optionally, adopting a landmark operator model and determining a better solution for the drone cluster includes:
[0022] In the landmark operator stage, the optimal solution set of the drones at the current time is found, and the center point of the optimal solution set is calculated, and other drones are controlled to move toward the center point of the optimal solution set.
[0023] Optionally, in the landmark operator stage, finding the optimal solution set of the drone at the current time and calculating the center point of the optimal solution set includes:
[0024] The following formula is used to calculate the number of iterations in the landmark operator and the number of optimal solution drone clusters. The drones included in the optimal solution drone cluster are selected based on the distance between each drone and the target point.
[0025]
[0026] Optionally, determining the coordinates of the center point of the drone cluster according to the optimal solution drone cluster includes:
[0027] According to the following formula, the coordinates of the center point of the optimal solution drone cluster are calculated;
[0028]
[0029] Determining the target point of the drone cluster according to the center point coordinates of the drone cluster includes:
[0030] Update the target point of the drone cluster according to the following formula:
[0031] X i (t) = X i (t-1)+rand*(X c (t)-X i (t-1)).
[0032] Optionally, the pre-established pigeon flock algorithm model includes:
[0033] The Main class, as the core of the algorithm for scheduling the entire pigeon flock, can generate UAV class objects, i.e. drones, in the Main class. Initialize the number and position of drones, call the Pig_fly class through the start method to make the drones move in different directions to expand the search area; call the Pig_fly class through the run method to control the flight of the drone cluster;
[0034] UAV class, which represents the drone class. The properties of the drone include: 3D coordinates, speed, and number of iterations;
[0035] The Destination class represents the destination and attracts the drone to the destination;
[0036] Among them, the pigeon flock algorithm of the Pig_fly class includes the moves method, which is used to perform diffusion operations on the drone in the initial stage; the external method, which is used to calculate and update the moving direction and moving speed of the drone in the compass operator stage; the artificial method, which is used to reproduce the artificial potential field method to prevent the drone from colliding during flight; the internal method, which is used to calculate and update the moving direction and moving speed of the drone in the landmark operator stage.
[0037] According to a second aspect of the present invention, there is provided a multi-agent formation device based on a pigeon flock algorithm, comprising:
[0038] A control module, used to control the drones to perform diffusion operations according to the number of drones and appropriate angles, so that each drone maintains a safe distance;
[0039] A judgment module is used to judge the distance from the UAV to the destination using a compass operator model according to a pre-established pigeon flock algorithm model, and determine the current optimal solution; when the distance from the UAV to the destination is less than a preset value, a landmark operator model is used to determine a better solution UAV cluster; wherein the pre-established pigeon flock algorithm model includes at least a compass operator model and a landmark operator model;
[0040] A calculation module, used to determine the coordinates of the center point of the drone cluster according to the optimal solution drone cluster;
[0041] The flight module is used to determine the target point of the drone cluster according to the coordinates of the center point of the drone cluster, so that all drones in the drone cluster maintain a cluster state and fly to the target point of the drone cluster.
[0042] In a third aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.
[0043] In a fourth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.
[0044] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.
[0045] The beneficial effects brought by the present invention are as follows:
[0046] It can be seen from the above scheme that the embodiment of the present invention provides a multi-agent formation method and device based on the pigeon flock algorithm, which has the following beneficial effects: according to the number of drones and the appropriate angle, the drone is controlled to perform diffusion operation so that each drone maintains a safe distance; according to the pre-established pigeon flock algorithm model, the compass operator model is used to judge the distance from the drone to the destination and determine the current optimal solution; when the distance from the drone to the destination is less than the preset value, the landmark operator model is used, and the optimal solution drone cluster is determined; wherein the pre-established pigeon flock algorithm model includes at least a compass operator model and a landmark operator model; according to the optimal solution drone cluster, the center point coordinates of the drone cluster are determined; according to the center point coordinates of the drone cluster, the target point of the drone cluster is determined, so that all drones in the drone cluster maintain a cluster state and fly to the target point of the drone cluster. These rules not only enable drones to make autonomous decisions and actions, but also ensure their safety and stability in various situations. By establishing a multi-agent system model, drones can cooperate with other agents to complete various tasks according to preset rules. This synergy enables drones to operate efficiently in complex environments, avoid collisions, achieve accurate target tracking, and improve the accuracy and speed of task completion. At the same time, the established rule base provides guidance for different mission requirements and environmental conditions. These rules not only enable the UAV to make autonomous decisions and actions, but also ensure its safety and stability in various situations. This intelligent control and optimization method not only improves the intelligence level of the UAV, but also optimizes its operating efficiency. It gives the UAV higher robustness and adaptability, enabling it to respond flexibly in a changing environment and complete various complex tasks. The research on intelligent behavior modeling based on multi-agents and rules has injected new vitality into the intelligent process of UAVs and other engineering systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of a process flow of a multi-agent formation method based on a pigeon flock algorithm provided according to an embodiment;
[0048] Figure 2 A basic flow chart of a pigeon flock algorithm provided according to an embodiment;
[0049] Figure 3 A compass operator model is provided according to an embodiment;
[0050] Figure 4 A landmark operator model is provided according to an embodiment;
[0051] Figure 5 A class diagram of a pigeon flock algorithm provided according to an embodiment;
[0052] Figure 6 A diffusion operation diagram is provided according to an embodiment;
[0053] Figure 7 A compass operator phase operation diagram provided according to an embodiment;
[0054] Figure 8 A landmark operator phase operation diagram provided according to an embodiment;
[0055] Fig. 9 This is a structural block diagram of a multi-agent formation device based on a pigeon flock algorithm in the present application.
[0056] Fig.10 It is a block diagram of an electronic device of the present application.
[0057] Fig.11 It is a block diagram of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] The multi-agent formation method is of great significance: it improves the efficiency of task completion, enhances the robustness of the system, improves the accuracy and stability of the formation, and expands the application field. In today's era of rapid technological development, the importance of the multi-agent formation method is becoming more and more prominent.
[0060] First, the multi-agent formation method significantly improves the efficiency of task completion through the coordination and cooperation between agents. In large-scale complex tasks, multiple agents need to efficiently coordinate to complete their respective tasks, which requires effective communication and collaboration between agents. The multi-agent formation method can not only avoid the reuse of resources, but also realize the parallel processing of tasks, greatly speeding up the completion of tasks and improving work efficiency.
[0061] Secondly, the multi-agent formation method enhances the robustness of the system. In the actual environment, agents may face various uncertainties and interferences, such as obstacles and communication interruptions. The multi-agent formation method can make the system more adaptable and robust through mutual cooperation and information sharing between agents. Even when faced with uncertain factors, the system can respond quickly through cooperation between agents to ensure the smooth completion of the task.
[0062] Third, the multi-agent formation method improves the accuracy and stability of the formation. Traditional formation methods often cannot ensure the accuracy and stability of the formation's movement when facing highly complex and dynamically changing environments. The multi-agent formation method introduces optimization algorithms such as the pigeon flock algorithm, which can more accurately control the movement trajectory of the agents, maintain the stability of the formation, and make the formation movement more accurate and reliable.
[0063] Finally, the application areas of the multi-agent formation method are constantly expanding. UAV formations, robot formations, vehicle formations and other fields are scenarios where the multi-agent formation method is widely used. In these fields, the multi-agent formation method achieves more complex and efficient task execution by realizing the coordination and cooperation between agents. UAV formations can be used for large-scale regional monitoring, robot formations can be used for exploration and rescue in complex environments, and vehicle formations can improve the safety and smoothness of the transportation system. The expansion of these application areas has made the multi-agent formation method a powerful engine to promote the development of related industries.
[0064] The research on intelligent behavior modeling of complex engineering systems based on multi-agents and rules is of great significance in modern scientific and technological applications. This research not only promotes the improvement of the intelligence level of engineering systems, but also provides important support for the optimization of system operation efficiency and the enhancement of robustness. Applying this research method to the field of UAV technology is forward-looking and innovative. In this framework, the UAV is regarded as an intelligent agent, working with other intelligent agents and following rules and restrictions to achieve tasks such as coordinated flight, obstacle avoidance and target tracking of the UAV.
[0065] Specifically, by establishing a multi-agent system model, drones can work together with other agents to complete various tasks according to preset rules. This synergy enables drones to operate efficiently in complex environments, avoid collisions, achieve accurate target tracking, and improve the accuracy and speed of task completion. At the same time, the established rule base provides guidance for different task requirements and environmental conditions. These rules not only enable drones to make autonomous decisions and actions, but also ensure their safety and stability in various situations. This intelligent control and optimization method not only improves the intelligence level of drones, but also optimizes their operating efficiency. It gives drones higher robustness and adaptability, enabling them to respond flexibly in a changing environment and complete various complex tasks. At the same time, this research method provides new ideas and methods for the innovation of drone technology and promotes the rapid development of this field. Therefore, the research on intelligent behavior modeling based on multi-agents and rules has injected new vitality into the intelligent process of drones and other engineering systems.
[0066] The pigeon flock algorithm has the following main features:
[0067] 1. Bioinspiration: The pigeon flock algorithm has strong bioinspiration. It simulates the behavior of pigeons when foraging. This simulation based on the natural ecosystem helps the algorithm better adapt to real-world problems. This bioinspiration enables the algorithm to gain inspiration from nature and better apply it to solving practical problems.
[0068] 2. Global search capability: In complex multi-peak functions, the pigeon swarm algorithm can avoid falling into the local optimal solution and instead find the global optimal solution. This global search capability makes the pigeon swarm algorithm more reliable in solving practical problems, especially those with complex search spaces.
[0069] 3. Adaptability: During the search process, individual pigeons will adjust their search strategies according to the specific circumstances of the problem. This adaptability enables the algorithm to better adapt to different types of problems, improving the robustness and flexibility of the algorithm.
[0070] 4. Parallelism: The algorithm is designed so that it can be easily applied to multi-core and distributed computing environments, making full use of computing resources and improving the efficiency of the algorithm. This is especially important for solving large-scale problems and can speed up the problem-solving process.
[0071] 5. Not dependent on the gradient information of the problem: Compared with some traditional optimization algorithms, the pigeon flock algorithm does not require the gradient information of the problem, which makes it suitable for problems that are difficult to derive or the gradient information is difficult to obtain. This feature makes the pigeon flock algorithm more widely used in practical problems.
[0072] The operation cycle of the pigeon swarm algorithm can be divided into the following two parts: one is the compass operator stage, in which the drone swarm focuses on global search to find possible solutions. The other is the landmark operator stage, in which the drone swarm further optimizes the search by utilizing the known optimal solution to obtain better results. The basic flow chart is as follows Figure 2 shown.
[0073] Reference Figure 1 , shows a flowchart of a multi-agent formation method based on a pigeon flock algorithm of the present application, which can be applied to electronic devices, wherein the method specifically may include the following steps:
[0074] S101, controlling the drones to perform diffusion operations according to the number of drones and appropriate angles, so that each drone maintains a safe distance;
[0075] S102, according to the pre-established pigeon flock algorithm model, using the compass operator model, judging the distance from the drone to the destination, and determining the current optimal solution; when the distance from the drone to the destination is less than a preset value, using the landmark operator model, and determining a better solution drone cluster; wherein the pre-established pigeon flock algorithm model includes at least a compass operator model and a landmark operator model;
[0076] S103, determining the coordinates of the center point of the drone cluster according to the optimal solution drone cluster;
[0077] S104. Determine a target point of the drone cluster according to the coordinates of the center point of the drone cluster, so that all drones in the drone cluster maintain a cluster state and fly to the target point of the drone cluster.
[0078] Another embodiment of the present application further supplements the multi-agent formation method based on the pigeon flock algorithm provided in the above embodiment.
[0079] Optionally, the compass operator model is used to judge the distance from the UAV to the destination and determine the current optimal solution, including:
[0080] In the compass operator stage, the optimal solution position of the drone at the current time is found, and other drones will move to the optimal solution position of the drone.
[0081] Specifically, the first stage of the pigeon swarm algorithm explores the solution space through random search and generates a set of candidate solutions. Due to the introduction of randomness, the pigeon swarm algorithm can explore in the global search space and avoid falling into the local optimal solution. The goal of this stage is to expand the search range and obtain as many candidate solutions in the solution space as possible, providing more options for the local search in the next stage. The compass operator stage aims to simulate the process of pigeons looking for food, and determine the potential target location through observation and information exchange between individuals. Its main workflow is as follows:
[0082] Initialization: Randomly generate a group of pigeons to represent candidate solutions in the solution space, assign a position to each pigeon to represent its current solution, and set the initial speed and movement direction for each pigeon.
[0083] Random movement: Each pigeon moves randomly according to certain strategies and rules. The movement can be based on the current position plus a random offset, or it can be randomly selected according to a specific probability distribution.
[0084] Information exchange: Each pigeon evaluates its fitness based on its current position and the objective function value of the problem, determines the quality of the current solution through fitness, and exchanges its position information and fitness information with other pigeons.
[0085] Position and speed update: Pigeons determine the position of the current optimal solution through information exchange, and update the speed, direction and target position of each pigeon based on the pigeon’s own position, speed and the current optimal solution position.
[0086] Termination condition judgment: In the first stage of the search process, it is necessary to set appropriate termination conditions, such as reaching a certain number of iterations or meeting a certain stopping criterion. If the termination condition is met, then enter the next stage, otherwise continue the search in the first stage. Figure 3 As shown,
[0087] When updating the position and speed of each pigeon, the formula is as follows:
[0088] V i (t) = V i (t-1)*e -Rt +rand*(X g -X i (t-1))(Formula 1);
[0089] X i (t) = X i (t-1)+V i (t)(Formula 2);
[0090] Where: V(t) is the flight speed, X(t) is the position.
[0091] In three-dimensional space, the position and speed of the pigeon are updated in each iteration. Each pigeon adjusts its flight direction and speed according to formula 1 and adjusts its position according to formula 2.
[0092] In the first stage, individuals in the pigeon flock search based on their own experience and local information and form some local solutions.
[0093] In the second stage, individuals in the pigeon flock jointly explore a broader solution space through information exchange and cooperation, and update and improve their respective solutions through cooperation.
[0094] Its main workflow is as follows:
[0095] 1) Obtain the number of optimal solutions: In each iteration, half of the number of pigeons are obtained as the optimal solutions for the second stage.
[0096] 2) Information exchange: Information exchange is divided into individual information exchange and collective information exchange. In individual information exchange, individuals in the pigeon flock share their own experience with other members of the pigeon flock by exchanging their own information. This information exchange can be carried out through direct information transmission or indirect information feedback.
[0097] In collective information exchange, information exchange between individuals is not limited to one-to-one communication, but can also be carried out in groups. Individuals in a pigeon flock obtain global information by observing and perceiving the behavior and coordination of other individuals.
[0098] 3) Collaborative search: After individuals obtain more global information through information exchange, they can search more targetedly in the solution space. Individuals can use the experience and solutions of other individuals to guide their own search direction, thereby finding a better solution faster.
[0099] 4) Collaborative updating: Individuals can update their own solutions during the search process and share the improved solutions. This collaborative updating process can be achieved through pheromone updates, solution fusion, or group collaborative behavior.
[0100] 5) Balance between convergence and diversity: Through information exchange and cooperation, individuals can gradually converge to a better solution to obtain better optimization performance. However, in order to maintain the diversity of the solution space, individuals need to maintain a certain degree of exploration in the process of cooperation to avoid falling into the local optimal solution.
[0101] Therefore, there is a need to balance the requirements of convergence and diversity in the cooperative renewal process.
[0102] Optionally, in the compass operator stage, the optimal solution position of the drone at the current time is found, and other drones move to the optimal solution position of the drone, including:
[0103] In three-dimensional space, the moving direction and speed of the drone cluster are updated according to the following formula:
[0104] V i (t) = V i (t-1)*e -Rt +rand*(X g -X i (t-1));
[0105] Formula 1, formula for calculating pigeon speed.
[0106] Update the next target position of each drone according to the following formula:
[0107] X i (t) = X i (t-1)+V i (t).
[0108] Formula 2 is the calculation formula of the pigeon target point in the compass operator stage;
[0109] Optionally, adopting a landmark operator model and determining a better solution for the drone cluster includes:
[0110] In the landmark operator stage, the optimal solution set of the drones at the current time is found, and the center point of the optimal solution set is calculated, and other drones are controlled to move toward the center point of the optimal solution set.
[0111] Optionally, in the landmark operator stage, finding the optimal solution set of the drone at the current time and calculating the center point of the optimal solution set includes:
[0112] The following formula is used to calculate the number of iterations in the landmark operator and the number of optimal solution drone clusters. The drones included in the optimal solution drone cluster are selected based on the distance between each drone and the target point.
[0113]
[0114] Formula 3 is a formula for calculating the number of optimal solutions.
[0115] Optionally, determining the coordinates of the center point of the drone cluster according to the optimal solution drone cluster includes:
[0116] According to the following formula, the coordinates of the center point of the optimal solution drone cluster are calculated;
[0117]
[0118] Formula 4 is the calculation formula for the center point of the optimal solution set.
[0119] Determining the target point of the drone cluster according to the center point coordinates of the drone cluster includes:
[0120] Update the target point of the drone cluster according to the following formula:
[0121] X i (t) = X i (t-1)+rand*(X c (t)-X i (t-1)).
[0122] Formula 5 is the calculation formula for the pigeon target point in the landmark operator stage.
[0123] Specifically, the formula used in obtaining the number of optimal solutions is:
[0124]
[0125] In each generation, use N p To record the number of half of the pigeons. In the cooperative update process, the formula used is:
[0126]
[0127] X i (t) = X i (t-1)+rand*(X c (t)-X i (t-1))(Formula 2)
[0128] The meanings of the letters in each formula are as follows:
[0129] Indicates the order of the pigeons i
[0130] represents the position X of the i-th pigeon i
[0131] represents the speed V of the i-th pigeon i
[0132] Represents the number of iterations t
[0133] Represents the map factor R
[0134] Represents the random number rand
[0135] represents the pigeon sequence g of the current optimal solution
[0136] Represents the number of better solution pigeon groups N p
[0137] Indicates the optimal solution for the center position of the pigeon flock X c
[0138] Represents the fitness function fitness.
[0139] like Figure 4 As shown in Figure 1, cooperative search and cooperative update are one of the key mechanisms of the pigeon swarm algorithm. Through cooperative search and cooperative update, individuals can make full use of the experience and knowledge of the group, so as to search and optimize more targetedly. Cooperative search refers to individuals guiding their search based on the solutions of other individuals, such as conducting local searches near the optimal solutions of other individuals, or adjusting the direction according to the behavior of other individuals during global search. Cooperative update refers to individuals updating and improving solutions based on the solutions of other individuals, such as using the excellent solutions of other individuals to merge solutions, or updating individual solutions through collaborative behavior. In the second stage of the pigeon swarm algorithm, balancing convergence and diversity is an important consideration. Convergence refers to the ability of the algorithm to gradually converge to a better solution to obtain better optimization performance. Diversity refers to the ability of the algorithm to maintain the diversity of the solution space and avoid falling into the local optimal solution. In the process of cooperation, individuals need to maintain a certain degree of exploration to avoid focusing only on local solutions and ignoring global solutions. Therefore, it is necessary to reasonably design strategies for information exchange and cooperative update to balance the requirements of convergence and diversity.
[0140] The second stage of the pigeon swarm algorithm realizes collaborative search and cooperative update among individuals through information exchange and cooperative optimization. This stage can effectively utilize the wisdom of the group and guide the algorithm to conduct a global search in the solution space to find a better solution. At the same time, by balancing the requirements of convergence and diversity, the pigeon swarm algorithm can take into account both the accuracy and diversity of the search during the search process and improve the optimization performance.
[0141] Compared with the previous methods for solving the multi-agent formation problem, the formation scheme based on the pigeon flock algorithm determined by the present invention can be applied to different scenarios, which improves the robustness of the invention. In addition, the present invention avoids the scenario where the result falls into the local optimum.
[0142] The technical idea of the present invention is to construct a formation method for multiple agents based on the pigeon flock algorithm. Aiming at the shortcomings of the current control-based strategy to solve problems in different scenarios, a pigeon flock algorithm (Pigeon-Inspired Optimization, PIO) is proposed, inspired by the behavior of biological clusters. The behavior of birds in groups shows some characteristics worth learning from. For example, when pigeons are looking for food or nests, they will use a strategy similar to random walks to search. The basic idea of this strategy is to randomly select a direction around the current position to move until the target position is found or an obstacle is encountered. Birds have adaptive characteristics and can adapt to changes in the environment and constantly adjust their behavior to obtain better food or habitats. In the pigeon flock algorithm, this adaptability is reflected in the exploration and utilization of the search space by pigeons.
[0143] (1) Behavioral Model
[0144] Learning behavior: In the compass operator phase, the optimal solution position at the current time is found. Except for the drone with the optimal solution, other drones will move to this position. In the landmark operator phase, the optimal solution set at the current time is found, and the center point of the optimal solution set is calculated. Except for the drone belonging to the optimal solution set, other drones will move to this center point.
[0145] Perception behavior: In the compass operator phase and the landmark operator phase, all drones need to sense their distance from the final target point. In addition, in order to avoid collision, they also need to sense the distance between them and all other drones.
[0146] Decision-making behavior: In the compass operator stage and the landmark operator stage, each drone has its own target point. Therefore, they will determine their own moving direction and speed. In order to avoid collision, they need to use the artificial potential field method to determine a moving direction and speed that avoids collision. The final moving direction and speed are the combination of the moving direction and speed obtained in these two cases.
[0147] Reasoning behavior: In the compass operator phase, since the optimal solution position at the current time is closest to the final point, the pigeons believe that this position can better guide them to move towards the final point. In the landmark operator phase, the distance between the pigeons and the final point is very close, so through the center point of the set of better solutions, they can find the path to the final point faster.
[0148] (2) Class Construction
[0149] There are several categories in the pigeon flock algorithm modeling process:
[0150] The Main class, as the core of the algorithm for scheduling the entire pigeon flock, can generate UAV class objects, i.e. drones, in the Main class. Initialize the number and position of drones, and call the Pig_fly class through the start method to make the drones move in different directions to expand the search area. Call the Pig_fly class through the run method to control the flight of the drone cluster.
[0151] The UAV class represents the drone class. The properties of the drone include: three-dimensional coordinates, speed, and number of iterations.
[0152] The Destination class represents the destination and attracts the drone to the destination.
[0153] The Pig_fly class is the core of the pigeon flock algorithm. Its methods include: the moves method, which is used to perform diffusion operations on drones in the initial stage; the external method, which is used to calculate and update the moving direction and speed of the drone in the compass operator stage; the artificial method, which is used to reproduce the artificial potential field method to prevent drones from colliding during flight; the internal method, which is used to calculate and update the moving direction and speed of the drone in the landmark operator stage.
[0154] like Figure 5 As shown, the pre-established pigeon flock algorithm model includes:
[0155] The Main class, as the core of the algorithm for scheduling the entire pigeon flock, can generate UAV class objects, i.e. drones, in the Main class. Initialize the number and position of drones, call the Pig_fly class through the start method to make the drones move in different directions to expand the search area; call the Pig_fly class through the run method to control the flight of the drone cluster;
[0156] UAV class, which represents the drone class. The properties of the drone include: 3D coordinates, speed, and number of iterations;
[0157] The Destination class represents the destination and attracts the drone to the destination;
[0158] Among them, the pigeon flock algorithm of the Pig_fly class includes the moves method, which is used to perform diffusion operations on the drone in the initial stage; the external method, which is used to calculate and update the moving direction and moving speed of the drone in the compass operator stage; the artificial method, which is used to reproduce the artificial potential field method to prevent the drone from colliding during flight; the internal method, which is used to calculate and update the moving direction and moving speed of the drone in the landmark operator stage.
[0159] For example, Figure 6 As shown, in the initial case, a suitable angle is selected according to the number of drones to perform diffusion operations so that a safe distance is maintained between each drone.
[0160] like Figure 7 As shown, in the compass operator stage, the distance to the destination is used to determine the current optimal solution, the moving direction and speed of the drone cluster are updated according to Formula 1, and the next target point of each drone is updated according to Formula 2.
[0161] like Figure 8As shown in the figure, when the distance to the destination is relatively close, the landmark operator phase is entered. The number of iterations in the landmark operator is obtained by formula 3, and the number of drone clusters with the best solution is obtained. The drones included in the drone cluster with the best solution are selected by the distance between each drone and the target point. The coordinates of the center point of the drone cluster with the best solution are obtained by formula 4, and then the target point of the drone cluster is updated by formula 5.
[0162] Finally, all drones in the drone cluster maintain the cluster state and reach the target point.
[0163] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.
[0164] Another embodiment of the present application provides a multi-agent formation device based on the pigeon flock algorithm, which is used to execute the multi-agent formation method based on the pigeon flock algorithm provided in the above embodiment.
[0165] like Fig. 9 , which is a schematic diagram of the structure of a multi-agent formation device based on a pigeon flock algorithm provided in an embodiment of the present application. The multi-agent formation device based on a pigeon flock algorithm includes a control module 901, a judgment module 902, a calculation module 903 and a flight module 904, wherein:
[0166] The control module 901 is used to control the drones to perform diffusion operations according to the number of drones and appropriate angles, so that each drone maintains a safe distance;
[0167] The judgment module 902 is used to judge the distance from the UAV to the destination according to the pre-established pigeon flock algorithm model and the compass operator model to determine the current optimal solution; when the distance from the UAV to the destination is less than a preset value, the landmark operator model is used to determine the optimal solution UAV cluster; wherein the pre-established pigeon flock algorithm model includes at least a compass operator model and a landmark operator model;
[0168] The calculation module 903 is used to determine the coordinates of the center point of the drone cluster according to the optimal solution drone cluster;
[0169] The flight module 904 is used to determine the target point of the drone cluster according to the coordinates of the center point of the drone cluster, so that all drones in the drone cluster maintain a cluster state and fly to the target point of the drone cluster.
[0170] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0171] Another embodiment of the present application further supplements the multi-agent formation device based on the pigeon flock algorithm provided in the above embodiment.
[0172] Optionally, the judging module is used to:
[0173] In the compass operator stage, the optimal solution position of the drone at the current time is found, and other drones will move to the optimal solution position of the drone.
[0174] Optionally, the judging module is used to:
[0175] In three-dimensional space, the moving direction and speed of the drone cluster are updated according to the following formula:
[0176] V i (t) = V i (t-1)*e -Rt +rand*(X g -X i (t-1));
[0177] Update the next target position of each drone according to the following formula:
[0178] X i (t) = X i (t-1)+V i (t).
[0179] Optionally, the judging module is used to:
[0180] In the landmark operator stage, the optimal solution set of the drones at the current time is found, and the center point of the optimal solution set is calculated, and other drones are controlled to move toward the center point of the optimal solution set.
[0181] Optionally, the judging module is used to:
[0182] The following formula is used to calculate the number of iterations in the landmark operator and the number of optimal solution drone clusters. The drones included in the optimal solution drone cluster are selected based on the distance between each drone and the target point.
[0183]
[0184] Optionally, the computing module is used to:
[0185] According to the following formula, the coordinates of the center point of the optimal solution drone cluster are calculated;
[0186]
[0187] Determining the target point of the drone cluster according to the center point coordinates of the drone cluster includes:
[0188] Update the target point of the drone cluster according to the following formula:
[0189] X i (t) = X i (t-1)+rand*(X c (t)-X i (t-1)).
[0190] Optionally, the pre-established pigeon flock algorithm model includes:
[0191] The Main class, as the core of the algorithm for scheduling the entire pigeon flock, can generate UAV class objects, i.e. drones, in the Main class. Initialize the number and position of drones, call the Pig_fly class through the start method to make the drones move in different directions to expand the search area; call the Pig_fly class through the run method to control the flight of the drone cluster;
[0192] UAV class, which represents the drone class. The properties of the drone include: 3D coordinates, speed, and number of iterations;
[0193] The Destination class represents the destination and attracts the drone to the destination;
[0194] Among them, the pigeon flock algorithm of the Pig_fly class includes the moves method, which is used to perform diffusion operations on the drone in the initial stage; the external method, which is used to calculate and update the moving direction and moving speed of the drone in the compass operator stage; the artificial method, which is used to reproduce the artificial potential field method to prevent the drone from colliding during flight; the internal method, which is used to calculate and update the moving direction and moving speed of the drone in the landmark operator stage.
[0195] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0196] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0197] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0198] Fig.10 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0199] Reference Fig.10 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0200] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0201] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0202] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0203] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0204] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0205] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0206] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0207] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0208] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0209] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0210] Fig.1119 is a block diagram of a computer-readable storage medium 1900 shown in the present application. For example, the computer-readable storage medium 1900 may be provided as a server.
[0211] Reference Fig.11 , the computer-readable storage medium 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0212] The computer readable storage medium 1900 may also include a power supply component 1926 configured to perform power management of the computer readable storage medium 1900, a wired or wireless network interface 1950 configured to connect the computer readable storage medium 1900 to a network, and an input / output (I / O) interface 1958. The computer readable storage medium 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0213] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0214] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0215] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0216] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0217] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0218] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0219] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0220] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0221] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0222] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0223] The above are preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A multi-agent formation method based on pigeon flock algorithm, characterized in that: include: According to the number of drones and the appropriate angle, the drones are controlled to perform a diffusion operation so that a safe distance is maintained between the drones; According to the pre-established pigeon flock algorithm model, the compass operator model is used to judge the distance from the drone to the destination and determine the current optimal solution; when the distance from the drone to the destination is less than a preset value, the landmark operator model is used to determine a better solution drone cluster; wherein the pre-established pigeon flock algorithm model includes at least a compass operator model and a landmark operator model; According to the optimal solution drone cluster, determine the coordinates of the center point of the drone cluster; According to the coordinates of the center point of the drone cluster, the target point of the drone cluster is determined so that all drones in the drone cluster maintain a cluster state and fly to the target point of the drone cluster.
2. The multi-agent formation method based on the pigeon flock algorithm according to claim 1 is characterized in that: The compass operator model is used to judge the distance from the drone to the destination and determine the current optimal solution, including: In the compass operator stage, the optimal solution position of the drone at the current time is found, and other drones will move to the optimal solution position of the drone.
3. The multi-agent formation method based on the pigeon flock algorithm according to claim 2 is characterized in that: In the compass operator stage, the optimal solution position of the drone at the current time is found, and other drones will move to the optimal solution position of the drone, including: In three-dimensional space, the moving direction and speed of the drone cluster are updated according to the following formula: V i (t)=V i (t-1)*e -Rt +rand*(X g -X i (t-1)); Update the next target position of each drone according to the following formula: X i (t)=X i (t-1)+V i (t)。 4. The multi-agent formation method based on the pigeon flock algorithm according to claim 2 is characterized in that: The landmark operator model is adopted and the optimal solution drone cluster is determined, including: In the landmark operator stage, the optimal solution set of the drones at the current time is found, and the center point of the optimal solution set is calculated, and other drones are controlled to move toward the center point of the optimal solution set.
5. The multi-agent formation method based on the pigeon flock algorithm according to claim 4 is characterized in that: In the landmark operator stage, the optimal solution set of the drone at the current time is found, and the center point of the optimal solution set is calculated, including: The following formula is used to calculate the number of iterations in the landmark operator and the number of optimal solution drone clusters. The drones included in the optimal solution drone cluster are selected based on the distance between each drone and the target point.
6. The multi-agent formation method based on the pigeon flock algorithm according to claim 5 is characterized in that: Determining the coordinates of the center point of the drone cluster according to the optimal solution drone cluster includes: According to the following formula, the coordinates of the center point of the optimal solution drone cluster are calculated; Determining the target point of the drone cluster according to the center point coordinates of the drone cluster includes: Update the target point of the drone cluster according to the following formula: X i (t)=X i (t-1)+rand*(X c (t)-X i (t-1))。 7. The multi-agent formation method based on pigeon flock algorithm according to claim 1, characterized in that: The pre-established pigeon flock algorithm model includes: The Main class, as the core of the algorithm for scheduling the entire pigeon flock, can generate UAV class objects, i.e. drones, in the Main class. Initialize the number and position of drones, call the Pig_fly class through the start method to make the drones move in different directions to expand the search area; call the Pig_fly class through the run method to control the flight of the drone cluster; UAV class, which represents the drone class. The properties of the drone include: 3D coordinates, speed, and number of iterations; The Destination class represents the destination and attracts the drone to the destination; Among them, the pigeon flock algorithm of the Pig_fly class includes the moves method, which is used to perform diffusion operations on the drone in the initial stage; the external method, which is used to calculate and update the moving direction and moving speed of the drone in the compass operator stage; the artificial method, which is used to reproduce the artificial potential field method to prevent the drone from colliding during flight; the internal method, which is used to calculate and update the moving direction and moving speed of the drone in the landmark operator stage.
8. A multi-agent formation device based on pigeon flock algorithm, characterized in that: include: A control module, used to control the drones to perform diffusion operations according to the number of drones and appropriate angles, so that each drone maintains a safe distance; A judgment module is used to judge the distance from the UAV to the destination using a compass operator model according to a pre-established pigeon flock algorithm model, and determine the current optimal solution; when the distance from the UAV to the destination is less than a preset value, a landmark operator model is used to determine a better solution UAV cluster; wherein the pre-established pigeon flock algorithm model includes at least a compass operator model and a landmark operator model; A calculation module, used to determine the coordinates of the center point of the drone cluster according to the optimal solution drone cluster; The flight module is used to determine the target point of the drone cluster according to the coordinates of the center point of the drone cluster, so that all drones in the drone cluster maintain a cluster state and fly to the target point of the drone cluster.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.