Dynamic Task Allocation Method for UAV Swarms Based on Antlion Optimization
Through the distributed task allocation method of the Ant Lion optimization algorithm, the problem of task allocation adaptability and efficiency of the drone cluster in a dynamic environment is solved, and fast response and efficient task allocation are achieved.
Patent Information
- Application Number
- CN202510436011.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-04-09
AI Technical Summary
The existing dynamic task allocation method of drone clusters cannot effectively adapt to environmental changes when facing changes in dynamic scenarios, resulting in the failure of task allocation schemes, inefficient flexibility and inefficient, and a centralized architecture requires global information, which makes reallocation cost high.
Using a distributed task allocation method based on ant lion optimization, each drone interacts with information in real time, dynamically adjusts the bidding price through the ant lion optimization algorithm of segmented logarithmic fitting, generates the optimal task allocation plan, and reduces dependence on global information.
It improves the adaptability and flexibility of drone clusters in dynamic environments, reduces the impact of initial bids and the number of negotiations, and improves the efficiency of task execution.
Smart Images

Figure CN119940886B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of unmanned aerial vehicles, and particularly to a method for dynamic task allocation of an unmanned aerial vehicle cluster based on antlion optimization. Background Art
[0002] In recent years, the rapid development of unmanned aerial vehicle technology has attracted extensive attention worldwide. As a technology with great potential, unmanned aerial vehicles have shown great application prospects in military, civilian, and commercial fields. With the progress of technology and the decline in cost, unmanned aerial vehicles are gradually developing from a single platform to cluster applications. A clustered unmanned aerial vehicle system refers to a system in which multiple unmanned aerial vehicles cooperate to complete complex tasks through information sharing and task allocation. A key problem faced by a clustered unmanned aerial vehicle system is how to reasonably allocate tasks to achieve the best system performance.
[0003] The current dynamic task allocation of unmanned aerial vehicle clusters has the following problems:
[0004] 1. Most unmanned aerial vehicle task allocation problems are based on the premise that the task environment is static and determined, without considering dynamic scenario change factors such as changes in unmanned aerial vehicle information and task information. As a result, the "optimal" task allocation plan under the pre-determined conditions often fails to obtain the expected results or even fails to complete.
[0005] 2. Each unmanned aerial vehicle determines the task allocation plan through multiple rounds of bidding, which is easily affected by the initial bid and requires too many negotiation times. Therefore, it has poor flexibility when facing the problem of dynamic task allocation of unmanned aerial vehicle clusters, and the obtained task allocation plan is often unsatisfactory.
[0006] 3. Usually, a centralized architecture is used for task allocation, which not only requires real-time acquisition of global information, but also when the unmanned aerial vehicle information or target information changes, the central node needs to completely re-allocate tasks, resulting in a large cost. Summary of the Invention
[0007] In view of this, embodiments of the present application provide a method for dynamic task allocation of an unmanned aerial vehicle cluster based on antlion optimization to overcome or at least partially solve the above problems.
[0008] The first aspect of the embodiments of the present application provides a method for dynamic task allocation of an unmanned aerial vehicle cluster based on antlion optimization, the method comprising:
[0009] When the scenario information changes, each unmanned aerial vehicle in the unmanned aerial vehicle cluster performs information interaction with other unmanned aerial vehicles, the information including the bidding price of each unmanned aerial vehicle for multiple tasks and the position of each unmanned aerial vehicle among the multiple unmanned aerial vehicles;
[0010] Generate a bidding matrix based on the bidding prices of each of multiple drones for multiple tasks;
[0011] For each of the drones, initialize multiple individuals in the ant lion optimization algorithm based on piecewise logarithmic fitting, where the position of each individual is used to represent the bidding price of the drone for multiple tasks;
[0012] For each of the drones, update the bidding prices in the bidding matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a target bidding matrix;
[0013] Allocate the multiple tasks to the multiple drones according to the task allocation scheme corresponding to the target bidding matrix, and the task is allocated to the drone with the highest bidding price;
[0014] Wherein, in the ant lion optimization algorithm based on piecewise logarithmic fitting, the objective function in the ant lion optimization algorithm based on piecewise logarithmic fitting is used to solve the individual with the optimal fitness value among the multiple individuals, which corresponds to solving the optimal task allocation scheme generated by each drone for multiple tasks in the dynamic task allocation problem of the drone cluster.
[0015] Optionally, for each of the drones, updating the bidding prices in the bidding matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a target bidding matrix includes:
[0016] Calculate the fitness value of each individual among the multiple individuals, where the multiple individuals include multiple ants and multiple ant lions;
[0017] Take the individual with the optimal fitness value among the multiple ant lions as the elite ant lion;
[0018] Each ant among the multiple ants selects an ant lion as the target ant lion from the multiple ant lions through roulette wheel selection, so that the ant randomly walks between the upper bound and the lower bound according to the selected target ant lion and the elite ant lion, and the upper bound and the lower bound respectively correspond to the maximum bidding value and the minimum bidding value of the drone for the task;
[0019] During the random walk of the ant, update the upper bound and the lower bound using the boundary contraction method based on logarithmic fitting;
[0020] Calculate the fitness value of each ant according to the updated position of the ant;
[0021] When there is an ant whose fitness value is better than the fitness value of the target ant lion selected by the ant, update the position of the target ant lion to the position of the ant that selects the target ant lion, and take the current ant lion with the optimal fitness value as the elite ant lion;
[0022] Repeat the above process until the maximum number of iterations is reached. Then, update the bidding matrix based on the bidding prices of multiple drones corresponding to multiple elite antlions for multiple tasks, and obtain the target bidding matrix.
[0023] Optionally, for the fitness value of each individual among the multiple individuals corresponding to each drone, the fitness value is used to evaluate the task assignment scheme corresponding to the intermediate bidding matrix. The intermediate bidding matrix is generated based on the bidding prices of the drone corresponding to the current position of the individual in the random walk process for multiple tasks and the bidding prices of other drones for multiple tasks in the information.
[0024] The fitness value is determined based on the number of the drone swarm, the number of tasks, the decision variable of the task assignment of each drone to each task, the relative distance between the task and the assigned drone, the speed of the assigned drone, and the time required for the assigned drone to execute the task.
[0025] Among them, the decision variable of the task assignment of each drone to each task indicates whether the drone is assigned the task in the task assignment scheme corresponding to the intermediate bidding matrix; the assigned drone is the drone assigned to the task in the task assignment scheme corresponding to the intermediate bidding matrix.
[0026] Optionally, before calculating the fitness values of each ant, it further includes:
[0027] Set a random number, and determine whether to update the position of the ant again according to the random number, the current iteration number, and the maximum iteration number.
[0028] When it is necessary to update the position of the ant again, update the position of the ant according to the golden sine strategy. Among them, the occurrence probability of updating the position of the ant again decreases with the increase of the current iteration number.
[0029] Optionally, the process of determining whether to update the position of the ant again is as follows:
[0030] When the random number satisfies then it is determined that it is necessary to update the position of the ant again;
[0031] Among them, rand represents the random number, rand ∈ (0, 1); t represents the current iteration number, and T represents the maximum iteration number.
[0032] Optionally, the process of updating the position of the ant according to the golden sine strategy is as follows:
[0033] ;
[0034] Among them, represents the position of the ant in the i dimension before the update, represents the position of the ant in the i dimension after the update; c represents the upper bound of the ant, d represents the lower bound of the ant, and the i dimension refers to the i th individual among multiple individuals.
[0035] Optionally, the method of updating the upper bound and the lower bound using the boundary contraction method based on logarithmic fitting includes:
[0036] Set a proportionality coefficient, which is obtained according to a logarithmic fitting function, and the value of the proportionality coefficient increases with the increase of the number of iterations;
[0037] Based on the proportionality coefficient, the upper bound of the ant, and the lower bound of the ant, determine the upper bound and the lower bound in each round of the iterative process.
[0038] Optionally, the calculation formula for updating the upper bound and the lower bound is:
[0039] ;
[0040] Among them, represents the proportionality coefficient, represents the upper bound in the th round of iteration,
[0041] represents the lower bound in the
[0042] ;
[0043] Among them, represents the proportionality coefficient, m represents the first coefficient in the logarithmic fitting function, b n represents the second coefficient in the logarithmic fitting function; t represents the current number of iterations, and T represents the maximum number of iterations; m ∈{1, 2, 3, 4, 5}, n ∈{1, 2, 3, 4, 5}.
[0044] Optionally, each drone updates the bid price in the bid matrix respectively through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain the target bid matrix, including:
[0045] Each of the drones updates the bid price in the bid matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a first target bid matrix;
[0046] Each of the drones updates the bid price in the first target bid matrix again through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a second target bid matrix;
[0047] Determine whether the task allocation scheme corresponding to the second target bid matrix is the same as the task allocation scheme corresponding to the first target bid matrix;
[0048] When the task allocation scheme corresponding to the second target bid matrix is the same as the task allocation scheme corresponding to the first target bid matrix, determine the second target bid matrix as the target bid matrix;
[0049] When the task allocation scheme corresponding to the second target bid matrix is different from the task allocation scheme corresponding to the first target bid matrix, each drone updates the bid prices of multiple drones for multiple tasks in the second target bid matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting for multiple iterations to obtain a third target bid matrix;
[0050] When the task allocation scheme corresponding to the third target bid matrix is the same as the task allocation scheme corresponding to the obtained second target bid matrix, allocating the multiple tasks to the multiple drones according to the task allocation scheme corresponding to the target bid matrix includes: determining the third target bid matrix as the target bid matrix, and allocating the multiple tasks to the multiple drones according to the task allocation scheme corresponding to the updated third target bid matrix.
[0051] Advantages of this application:
[0052] The present application provides a method for dynamic task allocation of an unmanned aerial vehicle (UAV) cluster based on antlion optimization. The method includes: when the scene information changes, each UAV in the UAV cluster performs information interaction with other UAVs, and the information includes the bidding prices of each UAV among multiple UAVs for multiple tasks and the position of each UAV; generating a bidding matrix according to the bidding prices of each UAV among multiple UAVs for multiple tasks; for each UAV, respectively initializing multiple individuals in the antlion optimization algorithm based on piecewise logarithmic fitting, and the position where each individual is located is used to represent the bidding price of the UAV for multiple tasks; each UAV respectively updates the bidding price in the bidding matrix through the antlion optimization algorithm based on piecewise logarithmic fitting to obtain a target bidding matrix; and allocating the multiple tasks to the multiple UAVs according to the task allocation scheme corresponding to the target bidding matrix, and the task is allocated to the UAV with the highest bidding price. Wherein, in the antlion optimization algorithm based on piecewise logarithmic fitting, the objective function in the antlion optimization algorithm based on piecewise logarithmic fitting is used to solve the individual with the optimal fitness value among the multiple individuals, and in the problem of dynamic task allocation of the UAV cluster, it corresponds to solving the optimal task allocation scheme generated by each UAV for multiple tasks.
[0053] Through the technical solution of the present application, when the scene information changes, the UAVs perform real-time information interaction with each other, and then respectively dynamically adjust the bidding prices through the antlion optimization algorithm, so that the task allocation scheme can quickly adapt to the changes in the task environment, solves the problem that the task allocation scheme fails due to the dynamic changes in the environment, and improves the adaptability and flexibility of task allocation. Moreover, each UAV dynamically adjusts the bidding price of the UAV through the antlion optimization algorithm, and then respectively updates the bidding matrix to obtain a target bidding matrix. This method can not only reduce the influence of the initial bid on the result, but also reduce the number of communications required for the UAVs to negotiate the bid, and improves the task allocation efficiency of the UAV cluster. In addition, since each UAV respectively uses the antlion optimization algorithm to adjust the bidding price, this distributed architecture method reduces the dependence on global information, reduces the cost of reallocation when the task environment changes, and thus significantly improves the task execution ability of the UAV cluster in a complex dynamic environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The drawings constituting a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application.
[0055] To more clearly illustrate the technical solution of this application, the accompanying drawings required for the description of this application will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0056] Figure 1 is a flowchart of a method for dynamic task allocation of an unmanned aerial vehicle (UAV) swarm based on antlion optimization provided by an embodiment of this application;
[0057] Figure 2 is an overall framework diagram of a method for dynamic task allocation of an unmanned aerial vehicle (UAV) swarm based on antlion optimization provided by an embodiment of this application;
[0058] Figure 3 is a change diagram of the classic I value and the I value based on the logarithmic fitting function provided by an embodiment of this application;
[0059] Figure 4 is a schematic framework diagram of a device for dynamic task allocation of an unmanned aerial vehicle (UAV) swarm based on antlion optimization provided by an embodiment of this application;
[0060] Figure 5 is a schematic diagram of an electronic device provided by an embodiment of this application. Detailed implementation manners
[0061] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.
[0062] Next, the technical solutions in the embodiments of this application will be clearly and completely described with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in this application belong to the scope of protection of this application.
[0063] Figure 1 is a flowchart of a method for dynamic task allocation of an unmanned aerial vehicle (UAV) swarm based on antlion optimization provided by an embodiment of this application, Figure 2 is an overall framework diagram of a method for dynamic task allocation of an unmanned aerial vehicle (UAV) swarm based on antlion optimization provided by an embodiment of this application.
[0064] Referring to Figure 1 , an embodiment of this application provides a method for dynamic task allocation of an unmanned aerial vehicle (UAV) swarm based on antlion optimization. The method includes steps S11 to S15:
[0065] Step S11: When the scene information changes, each drone in the drone cluster interacts with other drones. The information includes the bidding prices of each drone in the multiple drones for multiple tasks and the position of each drone.
[0066] In this embodiment, referring to Figure 2 , this technical solution is applicable to the dynamic task allocation process of the drone cluster after each scene change. The scene information refers to the information related to the drone cluster and the tasks. In the dynamic task allocation of the drone cluster, when the scene information changes (such as the position, status, and / or quantity of the drones, the position of the target corresponding to the task, the priority of the task, the quantity of the tasks, etc.), each drone will interact with other drones in the drone cluster to transmit its own information and receive the information of other drones. In this process, the information exchanged within the drone cluster includes the bidding prices of each drone for multiple tasks and the position of each drone, so as to ensure that all drones can obtain the latest task and environmental information in real time, thereby providing accurate data input for subsequent task allocation.
[0067] Step S12: Generate a bidding matrix according to the bidding prices of each drone in the multiple drones for multiple tasks.
[0068] In this embodiment, each drone will bid for multiple tasks, and a bidding matrix is generated according to the bidding prices of each drone in the multiple drones for multiple tasks. This bidding matrix can be understood as the initial bidding matrix before dynamic task allocation, and the bidding prices in this initial bidding matrix are generated according to the bidding prices obtained through information interaction when the scene information changes for multiple drones.
[0069] For example, assume that the drone cluster contains two drones, namely the drone with UAV number 1 and the drone with UAV number 2 (hereinafter referred to as drone 1 and drone 2). The bidding matrix (initial bidding matrix) is shown in Table 1. Among them, each row represents the bidding prices of a drone for multiple tasks, each column represents the bidding prices of multiple drones received for a task, and the element value in the matrix represents the bidding price of the drone for the corresponding task.
[0070] For example, in the bidding matrix, the bidding prices of the drone with UAV number 1 (in the first row of the bidding matrix) for the five tasks with task sequences from 1 to 5 are respectively: 0, 300.74, 0, 0, 381.98. The bidding prices of the drone with UAV number 2 (in the second row of the bidding matrix) for the five tasks with task sequences from 1 to 5 (hereinafter referred to as tasks 1 to 5) are respectively: 417.38, 0, 388.92, 449.17, 0.
[0071] It should be noted that when the scenario information changes, the bidding price in the initial bidding matrix is obtained based on the relative position between the UAV and each task and the maximum bidding value. For example, if the maximum bidding value is 500, it means that the highest bidding price generated by the UAV cannot exceed 500. When the relative position between the UAV and the task is 100, the bidding price of the UAV for this task is 500 - 100 = 400. Therefore, the closer the relative position between the UAV and the target of the task, the higher the corresponding bidding price, and the more likely the UAV is to be assigned this task.
[0072] The bidding rule is to assign the task to the UAV with the highest bidding price. Therefore, as an example, the task assignment scheme corresponding to the bidding matrix (initial bidding matrix) is: assign task 2 and task 5 to UAV 1, and assign task 1, task 3, and task 4 to UAV 2. At the same time, since the bidding price of UAV 1 for task 5 is higher than that for task 2, the priority of UAV 1 to execute task 5 is higher than that to execute task 2. The same applies to the task execution priority of UAV 2 and will not be elaborated here.
[0073] It should be noted that the process of generating the task assignment scheme for the bidding matrix (initial bidding matrix) is only an example. In fact, it is necessary to adjust the bidding price in the bidding matrix (initial bidding matrix). Therefore, there is no need to generate a task assignment scheme for the bidding matrix (initial bidding matrix).
[0074] Table 1
[0075]
[0076] Step S13: For each UAV, initialize multiple individuals in the ant lion optimization algorithm based on piecewise logarithmic fitting. The position where each individual is located is used to represent the bidding price of the UAV for multiple tasks.
[0077] In this embodiment, for each UAV, it is necessary to initialize multiple individuals in the ant lion optimization algorithm based on piecewise logarithmic fitting. The ant lion optimization algorithm is a nature-inspired optimization algorithm that simulates the behavior of ant lions preying on ants to dynamically adjust the bidding price of the UAV for tasks. When an individual randomly walks in the search space, the position of the individual will change, and the position where the individual is located can represent the bidding price of the corresponding UAV for multiple tasks, which is a solution in the search space.
[0078] The initialization process uses the method of chaotic mapping population (Logistic mapping) to assign a random initial position to each individual in the population, thereby increasing the diversity of the initial solution and avoiding the algorithm falling into local optimum.
[0079] Specifically, the process of chaotic mapping population is as follows:
[0080]
[0081]
[0082] Among them, each drone runs the antlion optimization algorithm by itself. The algorithm iteration is based on the population. There are multiple individuals in the population. denotes the i -dimensional individual, and the individuals in the population need a numerical value as the initial position of the individual.
[0083] In the formula, is the initialization parameter. Since in the formula is determined by , therefore, after randomly generating , a series of can be directly generated, and through to generate , thereby increasing the diversity of individuals in the population.
[0084] Step S14, each of the drones updates the bid price in the bid matrix respectively through the antlion optimization algorithm based on piecewise logarithmic fitting to obtain the target bid matrix.
[0085] In this embodiment, each drone dynamically updates the bid price in the bid matrix through the antlion optimization algorithm based on piecewise logarithmic fitting, and finally obtains the target bid matrix. The update process includes random walks of individuals (ants), boundary contraction strategies, and golden sine strategies, etc. These mechanisms work together to help the drones optimize the bidding strategy in a dynamic environment and gradually approach the optimal task allocation scheme.
[0086] Among them, during the random walk of individuals, it simulates the random movement of ants at the edge of the antlion trap, which is used to explore the new solution space, corresponding to exploring the better bid prices of the drones for multiple tasks. The boundary contraction strategy is to dynamically adjust the upper and lower bounds of the search range through piecewise logarithmic fitting, so that the antlion optimization algorithm can focus on the vicinity of the optimal solution in the later stage. The golden sine strategy is to increase the diversity of solutions through the golden ratio and the non-linear characteristics of the sine function, avoiding the antlion optimization algorithm falling into local optimum during the process of boundary contraction.
[0087] For example, simulating the antlion building a trap and the ants being trapped in the antlion trap and randomly walking, the random walk method is as shown in the following formula:
[0088] ;
[0089] In the formula, t is the current iteration number, T is the maximum iteration number, X(t) represents the random walk position, cumsum represents the cumulative sum of the random walk step size, r is the generation function of the random walk step size, and its calculation is , where rand represents a random number between (0, 1).
[0090] Step S15, according to the task allocation scheme corresponding to the target bidding matrix, allocate the multiple tasks to the multiple drones, and the task is allocated to the drone with the highest bidding price.
[0091] Among them, in the ant lion optimization algorithm based on piecewise logarithmic fitting, the objective function in the ant lion optimization algorithm based on piecewise logarithmic fitting is used to solve the individual with the optimal fitness value among the multiple individuals, and in the dynamic task allocation problem of the drone swarm, it corresponds to solving the optimal task allocation scheme generated by each drone for multiple tasks.
[0092] In this embodiment, after obtaining the target bidding matrix, according to the task allocation scheme corresponding to the target bidding matrix, allocate multiple tasks to the drones corresponding to the highest bidding prices in the target bidding matrix respectively.
[0093] Through the technical solutions of the above embodiments, when the scene information changes, the drones perform real-time information interaction, and then each dynamically adjusts the bidding price through the ant lion optimization algorithm, so that the task allocation scheme can quickly adapt to the changes in the task environment, solves the problem that the task allocation scheme fails due to the dynamic changes in the environment, and improves the adaptability and flexibility of task allocation. Moreover, each drone dynamically adjusts the bidding price of the drone through the ant lion optimization algorithm, and then updates the bidding matrix respectively to obtain the target bidding matrix. This method can not only reduce the influence of the initial bid on the result, but also reduce the number of communications required for the drones to negotiate the bid, improving the task allocation efficiency of the drone swarm. In addition, since each drone adjusts the bidding price by using the ant lion optimization algorithm respectively, this distributed architecture method reduces the dependence on global information and reduces the cost of reallocation when the task environment changes, thus significantly improving the task execution ability of the drone swarm in a complex dynamic environment.
[0094] Combined with the above embodiments, the present application also provides another dynamic task allocation method for a drone swarm based on ant lion optimization. In this method, the step of "each drone, respectively updates the bidding price in the bidding matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain the target bidding matrix" in step S14 specifically includes steps S14-1 to S14-7:
[0095] Step S14-1, calculate the fitness value of each individual among the multiple individuals, and the multiple individuals include multiple ants and multiple ant lions.
[0096] In this embodiment, for each unmanned aerial vehicle (UAV), when performing the ant lion optimization algorithm, it is first necessary to calculate the fitness values of multiple individuals (including ants and ant lions). The positions of these individuals represent the different bidding prices of the UAV for multiple tasks. Each individual's position corresponds to a fitness value, and when the position of the individual changes, the fitness value will change. The fitness value is used to measure the quality of the task allocation plan corresponding to the updated bidding matrix after dynamically adjusting the bidding prices of the UAV for multiple tasks in the bidding matrix to the bidding prices for multiple tasks corresponding to the position where the individual is located.
[0097] During the random walk of the individuals, the task allocation plan corresponding to the updated bidding matrix can be understood as follows: the bidding price of the UAV executing the ant lion optimization algorithm is updated, while the bidding prices of other UAVs in the initial bidding matrix remain unchanged, and a new task allocation plan is obtained in this way.
[0098] For example, if the objective function of the UAV swarm dynamic task allocation problem is to minimize the time required for each UAV from receiving the task to all UAVs completing the task, then the fitness value can be used to determine the quality of the new task allocation plan by evaluating the length of time corresponding to the new task allocation plan, and provide a basis for the dynamic optimization of the subsequent algorithm.
[0099] Step S14-2: Select the individual with the optimal fitness value among the multiple ant lions as the elite ant lion.
[0100] In this embodiment, after calculating the fitness values of all individuals, select the individual with the optimal fitness value from the multiple ant lions as the elite ant lion. The elite ant lion represents the best strategy for the UAV to allocate tasks during the iterative process of the current algorithm. The position (i.e., the bidding price) of the elite ant lion is the core objective of the algorithm optimization. By selecting the elite ant lion, it is possible to guide other individuals (ants) to move towards a better solution in the search space, thereby gradually approaching the global optimal solution.
[0101] Step S14-3: Each ant among the multiple ants selects an ant lion as the target ant lion from the multiple ant lions through roulette wheel selection, so that the ant randomly walks between the upper bound and the lower bound according to the selected target ant lion and the elite ant lion. The upper bound and the lower bound respectively correspond to the maximum bidding value and the minimum bidding value of the UAV for the task.
[0102] In this embodiment, after selecting the elite antlions, each ant selects an antlion as the target antlion from multiple antlions through a roulette wheel mechanism. The roulette wheel mechanism is a probability-based selection method that can assign different selection probabilities to antlions according to their fitness values. The higher the fitness value of an antlion, the greater the probability of being selected. After selecting the target antlion, the ant will perform a random walk between the upper and lower bounds in the search space under the guidance of the target antlion and the elite antlion.
[0103] It should be noted that in the scenario of dynamic task allocation for UAV swarms, the upper and lower bounds of multiple individuals corresponding to UAVs are the same. The upper and lower bounds are used to define the search range of individuals. The upper and lower bounds correspond to the maximum competitive value and the minimum competitive value of the UAV for the task respectively. The maximum competitive value represents the highest value that the current UAV can bid for the task, and the minimum competitive value represents the lowest value that the current UAV can bid for the task. In this way, individuals can explore different bidding prices within the given range.
[0104] Step S14-4, during the random walk of the ant, update the upper bound and the lower bound using a boundary contraction method based on logarithmic fitting.
[0105] In this embodiment, during the random walk of the ant, the antlion optimization algorithm dynamically updates the upper and lower bounds using a boundary contraction method based on logarithmic fitting. The contraction speed of the search range is controlled by a piecewise logarithmic function. As the iteration progresses, the upper and lower bounds gradually approach, making the search range gradually shrink. This dynamic adjustment mechanism enables the algorithm to perform a global search in the initial stage and focus on a local search in the later stage, thereby improving the search accuracy and efficiency. Through boundary contraction, the algorithm can more finely adjust the bidding price of the UAV and approach the optimal task allocation scheme.
[0106] Step S14-5, calculate the fitness values of each ant according to the updated position of the ant.
[0107] In this embodiment, each time the ant performs a random walk and updates its position, the algorithm recalculates its fitness value according to the new position of the ant. The update of the fitness value reflects the quality of the task allocation under the new bidding price strategy of the ant. By comparing the updated fitness value with the previous value, the algorithm can evaluate whether the movement of the ant has brought an optimization effect to the updated task allocation scheme.
[0108] Step S14-6, when there is an ant whose fitness value is better than the fitness value of the target antlion selected by the ant, update the position of the target antlion to the position of the ant that selects the target antlion, and use the antlion with the currently optimal fitness value as the elite antlion.
[0109] In this embodiment, when the fitness value of a certain ant is better than the fitness value of the target antlion it selects, it indicates that the ant has found a better task allocation scheme. At this time, update the position of the target antlion to the position of the ant, and re-evaluate the elite antlions in the current population, and each ant re-selects the target antlion. In this way, the algorithm continuously updates the positions of the antlions, promoting the entire population to move towards a better solution space, ensuring the dynamic adjustment ability of the algorithm, and also avoiding the algorithm falling into a local optimal solution.
[0110] Step S14-7: Re-execute the process of the above steps S14-1 to S14-6 until after reaching the maximum number of iterations. Each drone selects the final elite antlion through multiple iterations of the antlion optimization algorithm. Each drone exchanges information about their bidding prices for multiple tasks again. Based on the bidding prices of multiple drones corresponding to multiple elite antlions for multiple tasks, update the bidding prices of each drone in the bidding matrix according to the bidding prices of the drones corresponding to the elite antlions for multiple tasks to obtain the target bidding matrix.
[0111] Through the technical solution of the above embodiment, the antlion optimization algorithm based on piecewise logarithmic fitting can effectively solve the complex problems in the dynamic task allocation of drone swarms. In this technical solution, the drone swarms only need two information exchanges to obtain the optimal task allocation scheme. It can not only adapt to the dynamic changes of the task environment, but also reduce the influence of the initial bid on the allocation result, reduce the negotiation times, and improve the flexibility and efficiency of task allocation.
[0112] Combined with the above embodiments, the present application also provides another method for dynamic task allocation of drone swarms based on antlion optimization. In this method, for the fitness value of each individual corresponding to each drone, the fitness value is used to evaluate the task allocation scheme corresponding to the intermediate bidding matrix, and the intermediate bidding matrix is generated according to the bidding prices of the drone corresponding to the current position of the individual in the random walk process for multiple tasks and the bidding prices of other drones for multiple tasks in the information.
[0113] That is to say, in each process of the individual (ant) wandering, the change in position corresponds to the change in the bidding price of the drone. We update the changed bidding price in the bidding matrix, replacing the original bidding price of the drone with the changed bidding price, while the bidding prices of other drones remain unchanged, so as to obtain an intermediate bidding matrix, and measure the quality of the intermediate bidding matrix through the fitness value to evaluate the task allocation scheme corresponding to the intermediate bidding matrix. And the intermediate bidding matrix can be understood as the product during the execution of the antlion optimization algorithm and does not exchange information with other drones, thus ensuring the negotiation times between drone swarms.
[0114] The fitness value is determined according to the number of the UAV swarm, the number of the tasks, the decision variables of the task assignment of each UAV to each task, the relative distance between the task and the assigned UAV, the speed of the assigned UAV, and the time required for the assigned UAV to execute the task;
[0115] Wherein, the decision variable of the task assignment of each UAV to each task indicates whether the UAV is assigned the task in the task assignment scheme corresponding to the intermediate bidding matrix; the assigned UAV is the UAV assigned in the task assignment scheme corresponding to the task in the intermediate bidding matrix.
[0116] Wherein, the fitness value F The calculation formula is:
[0117]
[0118] In the calculation formula of the fitness value F Among them, is the number of UAVs, is the number of tasks, is the i th decision variable of the task assignment of the j th UAV to the i th task, taking {0, 1}. If the UAV j executes the task on the task , then , otherwise , i is the distance that the UAV j needs to fly to reach the task, is the speed of the UAV i , is the time required for the UAV to execute the task on the task j .
[0119] That is to say, according to the bidding prices of multiple UAVs for each task in the intermediate bidding matrix, when the bidding price of a certain UAV for a task is the highest, the decision variable of the task assignment of this UAV for this task indicates that this UAV is assigned this task, then , and for other UAVs for this task .
[0120] It should be noted that according to the formula, the smaller the fitness value F is, the better the fitness value represents. And it should be distinguished that F in the calculation formula of the fitness value i and the i th dimension mentioned in other parts of the full texti is different, the fitness value F in the calculation formula of i only refers to the i th drone.
[0121] Combined with the above embodiments, the present application also provides another method for dynamic task allocation of a drone swarm based on ant lion optimization. In this method, before "calculating the fitness values of each ant" in step S14-5, steps S21 to S22 are further included:
[0122] Step S21, set a random number, and determine whether to update the position of the ant again according to the random number, the current iteration number, and the maximum iteration number.
[0123] In this embodiment, before calculating the fitness values of each ant, in order to effectively increase the diversity of solutions and avoid the algorithm falling into local optimum, a mechanism for determining whether to update the ant position again by setting a random number is adopted.
[0124] Specifically, the algorithm will determine whether to update the ant position again according to the random number, the current iteration number t, and the maximum iteration number T, so that the update of the ant position not only depends on the evaluation of the fitness value, but is also affected by random factors and the iteration progress. As the iteration number increases, the probability of updating the ant position again will decrease, making the ants more inclined to global search in the early stage and gradually reducing randomness and focusing on local search in the later stage to improve the convergence speed and accuracy of the algorithm.
[0125] Step S22, when it is necessary to update the position of the ant again, update the position of the ant according to the golden sine strategy, where the probability of updating the position of the ant again decreases with the increase of the current iteration number.
[0126] In this embodiment, when it is necessary to update the position of the ant again, the algorithm will update according to the golden sine strategy. The golden sine strategy combines the golden ratio and the optimization strategy of the sine function, and through its non-linear characteristics and dynamic adjustment ability, it can effectively increase the diversity of solutions and avoid the algorithm falling into local optimum.
[0127] In an alternative embodiment, the process of "determining whether to update the position of the ant again" in step S21 is specifically step S21-1:
[0128] Step S21-1, when the random number satisfies then it is determined that it is necessary to update the position of the ant again;
[0129] where rand represents the random number, randA value between 0 and 1; t represents the current iteration number, and T represents the maximum iteration number.
[0130] In this embodiment, as the current iteration number t increases, the probability of satisfying will become smaller and smaller. Therefore, as the number of iterations increases, the probability of updating the ant's position again will decrease. This probabilistic judgment mechanism based on random numbers and iteration progress provides a flexible dynamic adjustment ability, enabling the ant's position update to be adaptively adjusted according to the actual situation during the iteration process, thus achieving a balance between global search and local search. Through this mechanism, the solution space can be quickly explored in the early stage, and gradually focused on near the optimal solution in the later stage, improving the optimization efficiency and the quality of the solution.
[0131] Combined with the above embodiments, in an alternative embodiment, optionally, the process of updating the position of the ant according to the golden sine strategy is as follows:
[0132] ;
[0133] Where represents the position of the ant in the i th dimension before update, represents the position of the ant in the i th dimension after update; c represents the upper bound of the ant, d represents the lower bound of the ant, and the i th dimension refers to the i th individual among multiple individuals.
[0134] Combined with the above embodiments, in an alternative embodiment, the "updating the upper bound and the lower bound using the boundary contraction method based on logarithmic fitting" in step S14-4 specifically includes step S14-4-1 and step S14-4-2:
[0135] Step S14-4-1, set a proportionality coefficient, which is obtained according to a logarithmic fitting function, and the value of the proportionality coefficient increases as the number of iterations increases.
[0136] In this embodiment, in the method for dynamic task allocation of UAV swarms based on ant lion optimization, in order to more efficiently adjust the bidding price of UAVs for tasks, a boundary contraction method based on logarithmic fitting is adopted to dynamically update the upper and lower bounds of the ants.
[0137] Specifically, first, a proportionality coefficient is set. The proportionality coefficient is used to shrink the upper bound and the lower bound, and it is obtained through a logarithmic fitting function, and its value increases as the number of iterations increases. That is, a larger search range is maintained in the early stage for global exploration, while the search range is gradually narrowed in the later stage to focus on local optimization. In this way, the algorithm can balance the global search and local search capabilities at different stages and improve the optimization efficiency.
[0138] Step S14-4-2: Based on the proportionality coefficient, the upper bound of the ant, and the lower bound of the ant, determine the upper bound and the lower bound in each round of the iterative process.
[0139] In this embodiment, in each round of the iterative process, based on the above proportionality coefficient and the current upper bound and lower bound, the algorithm determines the new upper bound and lower bound.
[0140] Specifically, the new upper bound and lower bound are adjusted according to the proportionality coefficient, so that the search range gradually shrinks. This shrinking method not only helps the algorithm to quickly explore the solution space in the early stage, but also can more finely adjust the bidding price of the UAV in the later stage, so as to approach the optimal task allocation scheme. By dynamically updating the upper bound and the lower bound, the algorithm can better adapt to the changes in the task environment and reduce the situation of unsatisfactory task allocation caused by the initial bid or the dynamic changes of the environment.
[0141] Optionally, the calculation formulas for updating the upper bound and the lower bound are as follows:
[0142] ;
[0143] Where, represents the proportionality coefficient, represents the upper bound in the t-th round of the iterative process, represents the lower bound in the t-th round of the iterative process.
[0144] Combined with the above embodiments, in an alternative embodiment, the calculation formula for the proportionality coefficient is as follows:
[0145] ;
[0146] Where, represents the proportionality coefficient, m represents the first coefficient in the logarithmic fitting function, b n represents the second coefficient in the logarithmic fitting function; t represents the current number of iterations, and T represents the maximum number of iterations; m ∈{1, 2, 3, 4, 5}, n ∈{1, 2, 3, 4, 5}.
[0147] Specifically, m and b n are the coefficients of the logarithmic fitting function. The specific value of I at each node can be obtained from the I-value calculation formula of the classical ALO.
[0148] The I-value formula of the classical ALO is as follows:
[0149]
[0150] Among them, the value of w is as follows:
[0151]
[0152] Figure 3 is the change graph of the classical I value and the I value based on the logarithmic fitting function provided by an embodiment of the present application. It can be seen from Figure 3 that the I value of the classical ALO ( Figure 3 the upper curve in Figure 3 the lower curve in
[0153] For the fitting of the I value in this embodiment, the m and b n values of each fitting curve can be determined by each node. When t is 0.1T / 0.5T / 0.75T / 0.9T / 0.95T / T respectively, I is 1 / 50 / 750 / 9000 / 95000 / 1000000 respectively. Then, according to the above values, the curve can be fitted through the points (0.1T, 1) and (0.5T, 50); the curve can be fitted through the points (0.5T, 50) and (0.75T, 750); ; Fit a curve through the points (0.95T, 95000) and (T, 1000000)
[0154] Combined with the above embodiments, in an alternative embodiment, the step of "each drone updates the bidding price in the bidding matrix respectively through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain the target bidding matrix" in step S14 specifically includes steps S31 to S36:
[0155] Step S31, each drone updates the bidding price in the bidding matrix respectively through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain the first target bidding matrix.
[0156] In this embodiment, with reference to Figure 2 , each drone updates the bidding price in the initial bidding matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain the first target bidding matrix. This process involves mechanisms such as ants' random walk, boundary contraction, and golden sine strategy to dynamically adjust the drones' bids for tasks. This process is similar to the process of obtaining the target bidding matrix above.
[0157] Step S32, each drone updates the bidding price in the first target bidding matrix respectively again through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain the second target bidding matrix.
[0158] In this embodiment, after obtaining the first target bidding matrix, in order to ensure that the obtained task allocation scheme is stable, each drone needs to pass through the ant lion optimization algorithm based on piecewise logarithmic fitting again and update the bidding price in the first target bidding matrix to obtain the second target bidding matrix. To optimize the task allocation scheme, so that the drones' bids for tasks are closer to the optimal solution. That is to say, each drone needs to execute the ant lion optimization algorithm at least twice. The process of obtaining the second target bidding matrix is also similar to the process of obtaining the target bidding matrix above, except that the updated bidding matrix is the obtained first target bidding matrix.
[0159] Step S33, determine whether the task allocation scheme corresponding to the second target bidding matrix is the same as the task allocation scheme corresponding to the first target bidding matrix.
[0160] In this embodiment, determine whether the task allocation scheme corresponding to the second target bidding matrix is the same as the task allocation scheme corresponding to the first target bidding matrix. If they are the same, it means that the task allocation scheme has been stable, and this task allocation scheme can be determined as the optimal solution.
[0161] Step S34: When the task allocation scheme corresponding to the second target bidding matrix is the same as that corresponding to the first target bidding matrix, determine the second target bidding matrix as the target bidding matrix.
[0162] In this embodiment, when the task allocation scheme corresponding to the second target bidding matrix is the same as that corresponding to the first target bidding matrix, determine the second target bidding matrix as the target bidding matrix. This means that the task allocation scheme has converged, and then perform the task allocation of the UAV cluster according to this task allocation scheme.
[0163] Step S35: When the task allocation scheme corresponding to the second target bidding matrix is different from that corresponding to the first target bidding matrix, each UAV re - updates the bidding prices of multiple UAVs for multiple tasks in the second target bidding matrix through the ant - lion optimization algorithm based on piece - wise logarithmic fitting for multiple iterations to obtain a third target bidding matrix.
[0164] In this embodiment, when the task allocation scheme corresponding to the second target bidding matrix is different from that corresponding to the first target bidding matrix, then each UAV needs to re - update the bidding prices of multiple UAVs for multiple tasks in the second target bidding matrix through the ant - lion optimization algorithm based on piece - wise logarithmic fitting for multiple iterations to obtain a third target bidding matrix. The process of obtaining the second target bidding matrix is also similar to the process of obtaining the target bidding matrix above. The third target bidding matrix is generated after updating the bidding matrix obtained by the previous execution of the ant - lion optimization algorithm, and moreover, the third target bidding matrix is obtained by executing the ant - lion optimization algorithm at least three times.
[0165] Step S36: When the task allocation scheme corresponding to the third target bidding matrix is the same as that corresponding to the obtained second target bidding matrix, allocate the multiple tasks to the multiple UAVs according to the task allocation scheme corresponding to the target bidding matrix, including: determining the third target bidding matrix as the target bidding matrix, and allocating the multiple tasks to the multiple UAVs according to the task allocation scheme corresponding to the updated third target bidding matrix.
[0166] In this embodiment, when the task allocation scheme corresponding to the third target bidding matrix is the same as that corresponding to the obtained second target bidding matrix, then stop executing the ant - lion optimization algorithm in a loop, determine the third target bidding matrix as the target bidding matrix, and allocate the multiple tasks to the multiple UAVs according to the task allocation scheme corresponding to the updated third target bidding matrix, ensuring the stability of the task allocation scheme.
[0167] Through the above embodiments, by judging the stability of the task assignment scheme, the algorithm can avoid the frequent change of the task assignment scheme caused by the randomness and dynamic adjustment in the iteration process. When the task assignment scheme is stable, it is considered that the algorithm has found a reliable solution, and in this embodiment, the obtained task assignment scheme is verified to be stable by continuously executing the ant lion optimization algorithm at least twice, so as to ensure the reliability of the task assignment of the final UAV cluster.
[0168] Among them, as an example, the pseudo code of the ant lion optimization algorithm based on piecewise logarithmic fitting is as follows:
[0169]
[0170] Based on the same inventive concept, another embodiment of the present application also provides a UAV cluster dynamic task assignment device based on ant lion optimization. Figure 4 It is a framework schematic diagram of a UAV cluster dynamic task assignment device provided by an embodiment of the present application. Refer to Figure 4 and the device includes:
[0171] An information interaction module 11, configured to, when the scenario information changes, each UAV in the UAV cluster performs information interaction with other UAVs, and the information includes the bidding prices of each UAV among multiple UAVs for multiple tasks and the position of each UAV.
[0172] A bidding matrix generation module 12, configured to generate a bidding matrix according to the bidding prices of each UAV among multiple UAVs for multiple tasks.
[0173] An initialization module 13, configured to, for each UAV, initialize multiple individuals in the ant lion optimization algorithm based on piecewise logarithmic fitting respectively, and the position where each individual is located is used to represent the bidding price of the UAV for multiple tasks.
[0174] A bidding price update module 14, configured to, for each UAV, update the bidding prices in the bidding matrix respectively through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a target bidding matrix.
[0175] A task assignment module 15, configured to assign the multiple tasks to the multiple UAVs according to the task assignment scheme corresponding to the target bidding matrix, and the task is assigned to the UAV with the highest bidding price.
[0176] Among them, in the ant lion optimization algorithm based on piecewise logarithmic fitting, the objective function in the ant lion optimization algorithm based on piecewise logarithmic fitting is used to solve the individual with the optimal fitness value among the multiple individuals, which corresponds to solving the optimal task assignment scheme generated by each UAV for multiple tasks in the dynamic task assignment problem of the UAV cluster.
[0177] Optionally, the initialization module 13 includes:
[0178] A calculation unit that calculates the fitness value of each individual among the multiple individuals, where the multiple individuals include multiple ants and multiple ant lions;
[0179] An elite ant lion determination unit that uses the individual with the optimal fitness value among the multiple ant lions as the elite ant lion;
[0180] A target ant lion selection unit that, for each ant among the multiple ants, selects an ant lion as the target ant lion from the multiple ant lions through roulette wheel selection, so that the ant randomly walks between the upper bound and the lower bound according to the selected target ant lion and the elite ant lion, where the upper bound and the lower bound respectively correspond to the maximum competitive value and the minimum competitive value of the drone for the task;
[0181] A boundary contraction unit that, during the random walk of the ant, updates the upper bound and the lower bound using a boundary contraction method based on logarithmic fitting;
[0182] A fitness value calculation unit that calculates the fitness value of each ant according to the updated position of the ant;
[0183] A target ant lion position update unit that, when there is an ant whose fitness value is better than the fitness value of the target ant lion selected by the ant, updates the position of the target ant lion to the position of the ant that selects the target ant lion, and uses the ant lion with the currently optimal fitness value as the elite ant lion;
[0184] An iteration unit that re-executes the above process until the maximum number of iterations is reached, and then updates the bidding matrix based on the bidding prices of multiple drones corresponding to multiple elite ant lions for multiple tasks to obtain the target bidding matrix.
[0185] Optionally, the device further includes:
[0186] A judgment module that sets a random number before calculating the fitness value of each ant, and determines whether to update the position of the ant again according to the random number, the current number of iterations, and the maximum number of iterations;
[0187] An ant position update module that, when it is necessary to update the position of the ant again, updates the position of the ant according to the golden sine strategy, where the probability of updating the position of the ant again decreases as the current number of iterations increases.
[0188] Optionally, the judgment module includes:
[0189] A judgment unit that, when the random number satisfies then determines that it is necessary to update the position of the ant again;
[0190] Among them, rand represents the random number, rand ∈ (0, 1); t represents the current iteration number, and T represents the maximum iteration number.
[0191] Optionally, the boundary contraction unit includes:
[0192] A setting subunit for setting a proportionality coefficient, which is obtained according to a logarithmic fitting function, and the value of the proportionality coefficient increases with the increase of the iteration number;
[0193] A boundary determination subunit for determining the upper and lower bounds in each round of iteration process based on the proportionality coefficient, the upper bound of the ant, and the lower bound of the ant.
[0194] Optionally, the auction price update module 14 includes:
[0195] A first target bidding matrix acquisition unit for each drone to update the bidding price in the bidding matrix respectively through the antlion optimization algorithm based on piecewise logarithmic fitting to obtain a first target bidding matrix;
[0196] A second target bidding matrix acquisition unit for each drone to update the bidding price in the first target bidding matrix respectively through the antlion optimization algorithm based on piecewise logarithmic fitting to obtain a second target bidding matrix;
[0197] A first judgment unit for judging whether the task allocation scheme corresponding to the second target bidding matrix is the same as the task allocation scheme corresponding to the first target bidding matrix;
[0198] A first determination unit for determining the second target bidding matrix as the target bidding matrix when the task allocation scheme corresponding to the second target bidding matrix is the same as the task allocation scheme corresponding to the first target bidding matrix;
[0199] A third target bidding matrix acquisition unit for when the task allocation scheme corresponding to the second target bidding matrix is different from the task allocation scheme corresponding to the first target bidding matrix, each drone repeatedly updates the bidding prices of multiple drones for multiple tasks in the second target bidding matrix through the antlion optimization algorithm based on piecewise logarithmic fitting for multiple iterations to obtain a third target bidding matrix;
[0200] An execution unit is configured to determine the third target bidding matrix as the target bidding matrix when the task allocation scheme corresponding to the third target bidding matrix is the same as the task allocation scheme corresponding to the obtained second target bidding matrix; the step of allocating the multiple tasks to the multiple UAVs according to the task allocation scheme corresponding to the target bidding matrix includes: determining the third target bidding matrix as the target bidding matrix, and allocating the multiple tasks to the multiple UAVs according to the task allocation scheme corresponding to the updated third target bidding matrix.
[0201] Based on the same inventive concept, another embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the method as described in any of the above embodiments.
[0202] Among them, the electronic device refers to Figure 5 , Figure 5 is a schematic diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device 500 includes: a memory 510 and a processor 520. The memory 510 and the processor 520 are communicatively connected via a bus. A computer program is stored in the memory 510, and the computer program can run on the processor 520, thereby implementing the steps in the method for dynamically allocating tasks of a UAV cluster based on antlion optimization disclosed in the above embodiments of the present application.
[0203] Based on the same inventive concept, another embodiment of the present application further provides a computer program product, including a computer program, and the computer program is executed by a processor to implement the method for dynamically allocating tasks of a UAV cluster based on antlion optimization as described in any of the above embodiments.
[0204] Based on the same inventive concept, another embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method for dynamically allocating tasks of a UAV cluster based on antlion optimization as described in any of the above embodiments.
[0205] For the device, since it is basically similar to the method embodiment, the description is relatively simple, and for the related parts, reference can be made to the partial description of the method embodiment.
[0206] Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts among the embodiments can be referred to each other.
[0207] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, apparatuses, or computer program products. Therefore, the embodiments of the present application can take the form of all-hardware embodiments, all-software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0208] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing terminal devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing terminal devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0209] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0210] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0211] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0212] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal device. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or terminal device including the element.
[0213] The above provides a detailed introduction to a method for dynamic task allocation of an unmanned aerial vehicle (UAV) cluster based on antlion optimization. In this article, specific examples are used to elaborate on the principle and implementation manner of this application. For the sake of concise and clear description, the UAV information, task information, objective function, and constraint conditions in the actual application scenario are not described. However, as long as the method for dynamic task allocation of a UAV cluster based on antlion optimization is adopted, it should be considered within the scope described in this application. In particular, the key points are the boundary contraction method based on piecewise logarithmic fitting in the antlion optimization algorithm, the combination manner of the antlion optimization algorithm and the auction strategy, and the encoding method of individuals in the antlion optimization algorithm. The bidding prices of each UAV are updated using the antlion optimization algorithm. As long as the method for dynamic task allocation of a UAV cluster based on this method and this conclusion is adopted, it should be considered within the scope described in this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A dynamic task allocation method for UAV swarms based on antlion optimization, characterized in that, The method includes: When the scene information changes, each drone in the drone swarm interacts with other drones, and the information includes the bidding prices of each drone in the multiple drones for multiple tasks and the position of each drone; Generate a bidding matrix according to the bidding prices of each drone in the multiple drones for multiple tasks; For each drone, initialize multiple individuals in the ant lion optimization algorithm based on piecewise logarithmic fitting, and the position where each individual is located is used to represent the bidding price of the drone for multiple tasks; Each drone updates the bidding prices in the bidding matrix respectively through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a target bidding matrix; According to the task allocation scheme corresponding to the target bidding matrix, allocate the multiple tasks to the multiple drones, and the task is allocated to the drone with the highest bidding price; Among them, in the ant lion optimization algorithm based on piecewise logarithmic fitting, the objective function in the ant lion optimization algorithm based on piecewise logarithmic fitting is used to solve the individual with the optimal fitness value among the multiple individuals, and in the dynamic task allocation problem of the drone swarm, it corresponds to solving the optimal task allocation scheme generated by each drone for multiple tasks.
2. The method for dynamically allocating tasks for an unmanned aerial vehicle cluster based on antlion optimization according to claim 1, wherein Each drone updates the bidding prices in the bidding matrix respectively through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a target bidding matrix, including: Calculate the fitness value of each individual among the multiple individuals, and the multiple individuals include multiple ants and multiple ant lions; Take the individual with the optimal fitness value among the multiple ant lions as the elite ant lion; Each ant among the multiple ants selects an ant lion as the target ant lion from the multiple ant lions through roulette wheel gambling, so that the ant randomly walks between the upper bound and the lower bound according to the selected target ant lion and the elite ant lion, and the upper bound and the lower bound respectively correspond to the maximum bidding value and the minimum bidding value of the drone for the task; During the random walk of the ant, update the upper bound and the lower bound using the boundary contraction method based on logarithmic fitting; Calculate the fitness value of each ant according to the updated position of the ant; When there is an ant whose fitness value is better than the fitness value of the target ant lion selected by the ant, update the position of the target ant lion to the position of the ant that selects the target ant lion, and take the ant lion with the currently optimal fitness value as the elite ant lion; Re - execute the above process until after reaching the maximum number of iterations, update the bidding matrix based on the bidding prices of multiple drones corresponding to multiple elite ant lions for multiple tasks to obtain a target bidding matrix.
3. The method for dynamically allocating tasks of an unmanned aerial vehicle cluster based on antlion optimization according to claim 2, wherein For the fitness value of each individual among the multiple individuals corresponding to each drone, the fitness value is used to evaluate the task allocation scheme corresponding to the intermediate bidding matrix, and the intermediate bidding matrix is generated according to the bidding prices of the drone for multiple tasks corresponding to the current position of the individual during the random walk and the bidding prices of other drones for multiple tasks in the information; The fitness value is determined based on the number of the UAV cluster, the number of the tasks, the decision variables of the task assignment of each UAV to each task, the relative distance between the task and the assigned UAV, the speed of the assigned UAV, and the time required for the assigned UAV to execute the task; Wherein, the decision variables of the task assignment of each UAV to each task indicate whether the UAV is assigned the task in the task assignment scheme corresponding to the intermediate bidding matrix; the assigned UAV is the UAV assigned in the task assignment scheme corresponding to the task in the intermediate bidding matrix.
4. The method for dynamically allocating tasks of an unmanned aerial vehicle cluster based on antlion optimization according to claim 2, wherein Before calculating the fitness values of each ant, it further includes: Setting a random number, and judging whether it is necessary to update the position of the ant again according to the random number, the current iteration number and the maximum iteration number; When it is necessary to update the position of the ant again, updating the position of the ant according to the golden sine strategy, wherein the occurrence probability of updating the position of the ant again decreases as the current iteration number increases.
5. The method for dynamically allocating tasks of an unmanned aerial vehicle cluster based on antlion optimization according to claim 4, wherein The process of judging whether it is necessary to update the position of the ant again is: When the random number satisfies then it is determined that the position of the ant needs to be updated again; Among them, rand represents the random number, rand∈ (0,1); t represents the current iteration number, and T represents the maximum iteration number.
6. The method for dynamically allocating tasks for an unmanned aerial vehicle cluster based on antlion optimization according to claim 4, wherein The process of updating the position of the ant according to the golden sine strategy is: ; Among them, represents the position of the ant in the i dimension before the update, represents the position of the ant in the i dimension after the update; c represents the upper bound of the ant, d represents the lower bound of the ant, and the i dimension refers to the i th individual among multiple individuals.
7. The method for dynamically allocating tasks of an unmanned aerial vehicle cluster based on antlion optimization according to claim 6, wherein The process of updating the upper bound and the lower bound by using the boundary contraction method based on logarithmic fitting includes: Setting a proportionality coefficient, which is obtained according to a logarithmic fitting function, and the value of the proportionality coefficient increases as the iteration number increases; Based on the proportionality coefficient, the upper bound of the ant, and the lower bound of the ant, determining the upper bound and the lower bound in each round of iteration process.
8. The method for dynamic task allocation of an unmanned aerial vehicle cluster based on antlion optimization according to claim 7, characterized in that The calculation formula for updating the upper bound and the lower bound is: ; Among them, represents the proportionality coefficient, represents the upper bound in the t-th round of iteration process, represents the lower bound in the t-th round of iteration process.
9. The method for dynamically allocating tasks of an unmanned aerial vehicle cluster based on antlion optimization according to claim 7, wherein The calculation formula for the proportionality coefficient is: ; Among them, represents the said proportionality coefficient, m represents the first coefficient in the logarithmic fitting function, b n represents the second coefficient in the logarithmic fitting function; t represents the current iteration number, and T represents the maximum iteration number; m ∈ {1, 2, 3, 4, 5}, n ∈ {1, 2, 3, 4, 5}.
10. The method for dynamic task allocation of an unmanned aerial vehicle cluster based on antlion optimization according to any one of claims 1-9, characterized in that, Each UAV respectively updates the bid price in the bidding matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a target bidding matrix, including: Each UAV respectively updates the bid price in the bidding matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a first target bidding matrix; Each UAV respectively updates the bid price in the first target bidding matrix again through the ant lion optimization algorithm based on piecewise logarithmic fitting to obtain a second target bidding matrix; Judging whether the task assignment scheme corresponding to the second target bidding matrix is the same as the task assignment scheme corresponding to the first target bidding matrix; When the task assignment scheme corresponding to the second target bidding matrix is the same as the task assignment scheme corresponding to the first target bidding matrix, determining the second target bidding matrix as the target bidding matrix; When the task assignment scheme corresponding to the second target bidding matrix is different from the task assignment scheme corresponding to the first target bidding matrix, each UAV updates the bid prices of multiple UAVs for multiple tasks in the second target bidding matrix through the ant lion optimization algorithm based on piecewise logarithmic fitting for multiple iterations to obtain a third target bidding matrix; When the task allocation scheme corresponding to the third target bidding matrix is the same as the task allocation scheme corresponding to the obtained second target bidding matrix, the step of allocating the multiple tasks to the multiple unmanned aerial vehicles according to the task allocation scheme corresponding to the target bidding matrix includes: determining the third target bidding matrix as the target bidding matrix, and allocating the multiple tasks to the multiple unmanned aerial vehicles according to the task allocation scheme corresponding to the updated third target bidding matrix.
Citation Information
Patent Citations
Cloud computing task scheduling method based on ant lion optimization algorithm
CN109062664A
Air-ground unmanned system task matching and distribution method based on improved auction mechanism and pigeon flock evolutionary algorithm
CN117592751A