UAV task allocation method based on reverse learning snake algorithm
Through the drone task allocation method based on the reverse learning snake algorithm, the problems of insufficient computing accuracy and unclear constraints in the task allocation of drone clusters are solved, and efficient task allocation is achieved under the condition of limited computing resources.
Patent Information
- Application Number
- CN202211424607.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-11-15
AI Technical Summary
The existing drone cluster task allocation technology has problems such as insufficient optimization of task allocation, unspecified consideration of constraints, and insufficient calculation accuracy.
The drone task allocation method based on the reverse learning snake algorithm is adopted. By modeling the task allocation scenario, the reverse learning snake algorithm parameters are set, and iteratively solve them to optimize the drone's task allocation plan.
The calculation accuracy of drone task allocation is improved, and the optimal task allocation is achieved in systems with insufficient computing resources is taken into account the constraints of the task.
Smart Images

Figure CN115755964B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of unmanned aerial vehicle cluster task planning, and in particular relates to a method for allocating unmanned aerial vehicle tasks based on a reverse learning snake algorithm. Background Art
[0002] Cooperation is a common group behavior in human society. In order to complete tasks efficiently, it is usually necessary to decompose the goals into tasks and assign subtasks to each member of the group. For example, in administrative management, each member of the team has his or her own work; in military operations, attacking a target point requires team members to attack from different angles. Applying this distribution behavior to drone cluster control rooms has been a very popular research direction in recent years.
[0003] In the field of drones, the problem of drone task allocation includes finding the optimal allocation of drones to a set of tasks, and these drones and tasks usually have their own characteristics. The proposal and development of the concept of drone swarm technology overcomes the problems of relatively small load when a single drone is operating (a single machine no longer carries all sensor equipment), low environmental perception efficiency, and limited information processing capabilities. At the same time, drone swarms also have the characteristics of strong robustness, wide application fields, and strong scalability. Therefore, drone swarm collaborative technology is widely used and is generally divided into two major application scenarios: civil and military. In the civilian field, drone swarms can be applied to a variety of scenarios such as agriculture, express logistics, emergency rescue, pipeline inspection, remote sensing and earth observation. In the military field, it is used in various cluster combat and defense systems. Although the existing research on drone swarms has been widely used and the relevant technologies are relatively mature. However, there are still some problems:
[0004] (1) Through research, it is found that in the current research field of UAV swarm collaboration, most of the research directions are related technologies of UAV swarm collaboration. However, the task allocation within the UAV swarm is also a key link that cannot be ignored. However, the existing related research content is very limited. Therefore, the task allocation technology of UAVs is urgently needed to be studied;
[0005] (2) When a drone swarm completes a task, the task constraints are very important. However, most existing studies do not have clear requirements for the constraints. Therefore, the constraint problem needs to be considered in the task allocation of drone swarms.
[0006] (3) In order to save resources and costs, how to improve the calculation accuracy and ensure the optimal allocation of tasks to be completed by the drone cluster is a problem worth studying. Summary of the invention
[0007] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for allocating tasks of drones based on a reverse learning snake algorithm, which is aimed at a specific physical object, a drone cluster, and abstracts it into a drone cluster to solve the problem of task allocation, and has obvious advantages for systems with limited computing resources.
[0008] The objective of the present invention is achieved through the following technical solution: A method for allocating unmanned aerial vehicle tasks based on a reverse learning snake algorithm comprises the following steps:
[0009] S1. Modeling the task allocation scenario: Assume that there are m drones performing n tasks, m ≥ n, and each task starts and ends at the same time. Each task requires at least one drone to complete, and idle drones are allowed to exist. Then the decision variable of the task allocation problem is a binary matrix U, and the jth element u in the i-th row of the matrix is ij =1 means that UAV i performs mission j, u ij = 0 means that drone i did not perform task j; the cost matrix is represented by W, and the jth element in the i-th row of the matrix is w ij represents the cost of UAV i performing mission j;
[0010] According to the cost minimization principle, the objective function and its constraints are established as follows:
[0011]
[0012]
[0013]
[0014] S2. Set the initialization parameters of the reverse learning snake algorithm: use a population-based algorithm to set the algorithm's population, number of iterations, and threshold parameters for each link;
[0015] S3. Iterate the optimization process: set the total number of iterations for problem solving to T, and the current number to t; calculate the environmental parameters: temperature H, food quantity Q, and when t≤T, calculate the current food quantity Q and its threshold value Q. th The relationship between the current temperature H and its threshold value H th After each iteration, the optimal individual of each gender population in the current field is updated and defined as the location of food, which is compared with the previous generation. T is incremented and S3 is repeated. When t>T, the loop is exited and the global optimal solution is output.
[0016] S4. Solve to obtain the optimal allocation of drones to tasks, output this allocation plan, and calculate its final benefit.
[0017] Furthermore, in S2, the population setting method of the algorithm includes the following sub-steps:
[0018] S21, redefine: vectorize the decision matrix U row to x = (u 11 ,u 12 ,…,u 1n ,…,u m1 ,u m2 ,…,u mn ), the cost matrix W is vectorized to w = (w 11 ,w 12 ,…,w 1n ,…,w m1 ,w m2 ,…,w mn ), the dimensions of both vectors are D = m × n, and the decision variables are subject to lower and upper bounds, and each element has x min =0≤x d ≤x max =1,x d represents the dth element in x, d = 1, ..., D; since the decision variable x is binary discrete, the objective function is redefined as min f(x) = x′·w, where x′ = round(x), indicating that each element is rounded off;
[0019] S22, generate the original seed cluster X: randomly generate P in [x min ,x max ] The number of snake individuals x that obey independent uniform distribution on the interval i :
[0020] x i =x min +r×(x max -x min ),x i ∈X (2)
[0021] Where r is a random number uniformly distributed in the interval [0,1];
[0022] S23. Calculate reverse seed clusters Calculate each individual x according to the following formula i The reverse individual
[0023]
[0024] S24. Merge and filter the original population and the reverse population: Since the goal of the problem is to maximize f(x), the set The first D elements that make the objective function f(x) larger are randomly divided into two sets X m With X fIn the equation, they represent the male population and the female population respectively; min f(x) is the minimum value of the function f(x), argmin f(x) represents the variable value when the objective function f(x) takes the minimum value, then the record “food” is:
[0025] f food =minf(x),x food =argminf(x), x∈x m ∪x f .
[0026] Furthermore, the S3 includes the following sub-steps:
[0027] S31, calculate environmental parameters and make judgments: According to the current number of iterations t, calculate the temperature H and the amount of food Q as follows:
[0028]
[0029] When Q th Enter S32 when Q ≥ Q th And H>H th Enter S33; when Q ≥ Q th And H≤H th Enter S34; after S32, S33, and S34 are executed, enter S35; Q th , H th They are the preset food quantity and temperature thresholds respectively;
[0030] S32, exploration: the current food quantity Q is less than the food quantity threshold value Q th When each individual x in the snake group of gender g g , i By ability α g , i Search for food and update the current position to x as follows g,i ′:
[0031] x g,i ′=x g,r ±0.05α g,i ((x max -x min )r+x min ) (5)
[0032] Where r in the calculation formula represents a random number uniformly distributed in the interval [0,1], and when used as a subscript, it represents a random individual numbered r in the population; ± represents the random positive and negative numbers in the actual calculation, with equal probability of 50%; g = f or m, representing female or male, respectively; x g,r Indicates gender g The position of a random individual r in a population, its ability to search for food is:
[0033]
[0034] where f g,r =f(x g,r ), f g,i =f(x g,i ), is the value of the fitness function (i.e., the objective function);
[0035] S33. Digging: When the amount of food Q ≥ Q th , and the temperature is high, that is, the temperature H is higher than the threshold value H th When , the snake group will move towards the location of the food and dig for food, updating its own position. This process is affected by the current ambient temperature H. The position calculation formula of each individual is:
[0036] x g,i ′=x food ±2rH(x food -x g,i ) (7)
[0037] S34, struggle, mating and spawning: when the amount of food Q ≥ Q th , and the ambient temperature H <H th When the snakes are in the same group, they will reproduce; the individuals in the snake group will randomly choose one of the two behaviors: courtship struggle and mating, laying eggs and reproducing offspring:
[0038] With a 60% probability, individuals in a group will engage in courtship struggles:
[0039]
[0040] where β g,i The fighting ability of individual i of gender g is affected by the best individual in the current gender group, that is, the one with the largest function value f g,best The individual impact is calculated as follows:
[0041]
[0042] With a 40% probability, individuals in the snake group will mate, lay eggs and reproduce; individuals in the male group x m,i and individuals x of the female population f,i Mating is performed according to the following formula:
[0043]
[0044] Among them, the mating ability of individual i of sex g is defined as:
[0045]
[0046] Subsequently, the offspring produced replace the worst individual x in the current sex population. g,worst , that is, the individual with the largest value of f(x) is replaced by:
[0047] x g,worst ′=x min +r(x max -x min ) (12);
[0048] S35. Update: At the end of each cycle, record the best and worst individuals in the group of gender g on the current field:
[0049]
[0050] Among them, argminf(x g,i ) means to make the objective function f(x g,i ) takes the minimum value of the variable, argmaxf(x g,i ) means to make the objective function f(x g,i ) is the value of the variable when it reaches its maximum value.
[0051] The present invention mainly targets the specific physical object of drone swarm, and abstracts it into a drone swarm to solve the problem of task allocation. First, a mathematical model of the task allocation problem is established, and then a novel method is designed to solve it. The swarm intelligence algorithm is used in combination with the reverse learning process to screen the randomly generated population, thereby reducing the consumption of computing power. Therefore, the drone task allocation method based on the reverse learning snake algorithm proposed in the present invention has obvious advantages for systems with limited computing resources. Compared with the prior art, the beneficial effects of the present invention are reflected in the following two aspects:
[0052] (1) This paper proposes a novel UAV task allocation method based on reverse learning snake algorithm. Compared with genetic algorithm, particle swarm algorithm and other methods, it introduces a newer snake algorithm with better performance and expands the application scenarios of the snake algorithm.
[0053] (2) In the existing related research, most of the literature did not consider the redundancy phenomenon in the initialization population. The present invention takes into account that the individuals in the initialization population are not fully utilized, and by combining reverse learning, the utilization rate of the initialization population is improved, the consumption of subsequent calculations is reduced, and computing resources are saved.
[0054] (3) The feasibility of the present invention proves that the combination of the snake algorithm and reverse learning can be generalized and can be used in other swarm intelligence optimization algorithms to improve performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flow chart of the method for allocating tasks of unmanned aerial vehicles based on the reverse learning snake algorithm of the present invention;
[0056] Figure 2 A flowchart of iterating the optimization process of the present invention;
[0057] Figure 3 A task execution weight graph of an embodiment;
[0058] Figure 4 It is a convergence curve diagram of the embodiment. DETAILED DESCRIPTION
[0059] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0060] like Figure 1 As shown, a method for allocating unmanned aerial vehicle tasks based on a reverse learning snake algorithm of the present invention comprises the following steps:
[0061] S1. Modeling the task allocation scenario: Assume that there are m drones performing n tasks, m ≥ n, and each task starts and ends at the same time. Each task requires at least one drone to complete, and idle drones are allowed to exist. Then the decision variable of the task allocation problem is a binary matrix U, and the jth element u in the i-th row of the matrix is ij =1 means that UAV i performs mission j, u ij = 0 means that drone i did not perform task j; in the same dimension, the cost matrix is represented as W, and the jth element in the i-th row of the matrix is w ij represents the cost of UAV i performing mission j;
[0062] According to the cost minimization principle, the objective function and its constraints are established as follows:
[0063]
[0064]
[0065]
[0066] S2. Set the initialization parameters of the reverse learning snake algorithm: Use a population-based algorithm to set the algorithm's population, number of iterations T, and threshold parameters for each link (threshold values H for temperature and food quantity). th and Q th );
[0067] The algorithm's population setting method includes the following sub-steps:
[0068] S21, redefine: To facilitate calculation, the decision matrix U is vectorized as x = (u 11 ,u 12,…,u 1n ,…,u m1 ,u m2 ,…,u mn ), the cost matrix W is vectorized to w = (w 11 ,w 12 ,…,w 1n ,…,w m1 ,w m2 ,…,w mn ), the dimensions of both vectors are D = m × n, and the decision variables are subject to lower and upper bounds, and each element has x min =0≤x d ≤x max =1,x d represents the dth element in x, d = 1, ..., D; since the decision variable x is binary discrete, the objective function is redefined as min f(x) = x′·w, where x′ = round(x), indicating that each element is rounded off;
[0069] S22, generate the original seed cluster X: randomly generate P in [x min ,x max ] The number of snake individuals x that obey independent uniform distribution on the interval i :
[0070] x i =x min +r×(x max -x min ),x i ∈X (2)
[0071] Where r is a random number uniformly distributed in the interval [0,1];
[0072] S23. Calculate reverse seed clusters Calculate each individual x according to the following formula i The reverse individual
[0073]
[0074] S24. Merge and filter the original population and the reverse population: Since the goal of the problem is to maximize f(x), the set The first D elements (the value of D can be defined by the user) that make the objective function f(x) larger are randomly divided into two sets X m With X f In the equation, they represent the male population and the female population respectively; min f(x) is the minimum value of the function f(x), argmin f(x) represents the variable value when the objective function f(x) takes the minimum value, then the record “food” is:
[0075] f food =minf(x),x food =argminf(x), x∈X m ∪X f .
[0076] S3. Iterate the optimization process: set the total number of iterations for problem solving to T, and the current number to t; calculate the environmental parameters: temperature H, food quantity Q, and when t≤T, calculate the current food quantity Q and its threshold value Q. th The relationship between the current temperature H and its threshold value H th After each iteration, the optimal individual of each gender population in the current field is updated and defined as the location of food, which is compared with the previous generation. T is incremented and S3 is repeated. When t>T, the loop is exited and the global optimal solution is output.
[0077] like Figure 2 As shown, step S3 includes the following sub-steps:
[0078] S31, calculate environmental parameters and make judgments: According to the current number of iterations t, calculate the temperature H and the amount of food Q as follows:
[0079]
[0080] When Q th Enter S32; when Q ≥ Q th And H>H th Enter S33; when Q ≥ Q th And H≤H th Enter S34; after S32, S33, and S34 are executed, enter S35; Q th , H th They are the preset food quantity and temperature thresholds respectively;
[0081] S32, exploration: the current food quantity Q is less than the food quantity threshold value Q th When each individual x in the snake group of gender g g,i By ability α g,i Search for food and update the current position to x as follows g,i ′:
[0082] x g,i ′=x g,r ±0.05α g,i ((x max -x min )r+x min ) (5)
[0083] Where r in the calculation formula represents a random number uniformly distributed in the interval [0,1], and when used as a subscript, it represents a random individual numbered r in the population; ± represents the random positive and negative numbers in the actual calculation, with equal probability of 50%; g = f or m, representing female or male, respectively; x g,r Represents the position of a random individual r in a population of gender g, and its ability to search for food is:
[0084]
[0085] where f g,r =f(x g,r ), f g,i =f(x g,i ), is the value of fitness function (i.e. objective function);
[0086] S33. Digging: When the amount of food Q ≥ Q th , and the temperature is high, that is, the temperature H is higher than the threshold value H th When , the snake group will move towards the location of the food and dig for food, updating its own position. This process is affected by the current ambient temperature H. The position calculation formula of each individual is:
[0087] x g,i ′=x food ±2rH(x food -x g,i ) (7)
[0088] S34, struggle, mating and spawning: when the amount of food Q ≥ Q th , and the ambient temperature H <H th When the snakes are in the same group, they will reproduce; the individuals in the snake group will randomly choose one of the two behaviors: courtship struggle and mating, laying eggs and reproducing offspring:
[0089] With a 60% probability, individuals in a group will engage in courtship struggles:
[0090]
[0091] where β g,i The fighting ability of individual i of gender g is affected by the best individual in the current gender group, that is, the one with the largest function value f g,best The individual impact is calculated as follows:
[0092]
[0093] With a 40% probability, individuals in the snake group will mate, lay eggs and reproduce; individuals in the male group x m,i and individuals x of the female population f,i Mating is performed according to the following formula:
[0094]
[0095] Among them, the mating ability of individual i of sex g is defined as:
[0096]
[0097] Subsequently, the offspring produced replace the worst individual x in the current sex population. g,worst , that is, the individual with the largest value of f(x) is replaced by:
[0098] x g,worst ′=x min +r(x max -x min ) (12);
[0099] S35. Update: At the end of each cycle, record the best and worst individuals in the group of gender g on the current field:
[0100]
[0101] Among them, argminf(x g,i ) means to make the objective function f(x g,i ) takes the minimum value of the variable, argmaxf(x g,i ) means to make the objective function f(x g,i ) is the value of the variable when it reaches its maximum value.
[0102] S4. Solve to obtain the optimal allocation of drones to tasks, output this allocation plan, and calculate its final benefit.
[0103] The allocation problem in this embodiment consists of 5 drones and 4 tasks to be completed, such as Figure 3 As shown in the figure, UAV represents the UAV and Task represents the task to be completed; its cost matrix and its optimal solution matrix are:
[0104]
[0105] In this embodiment, the total number of iterations in the allocation problem model is T=50, and the population size is P=4.
[0106] Combining the above parameters to carry out simulation calculation, the results are as follows Figure 4 As shown in the figure, it can be seen intuitively that the allocation scheme converges to the global optimum. The simulation results confirm that the proposed allocation scheme can achieve the optimal allocation of UAV tasks.
[0107] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. The UAV task allocation method based on reverse learning snake algorithm is characterized by: The following steps are involved: S1. Modeling the task allocation scenario: Assume that there are m drones performing n tasks, m ≥ n, and each task starts and ends at the same time. Each task requires at least one drone to complete, and idle drones are allowed to exist. Then the decision variable of the task allocation problem is a binary matrix U, and the jth element u in the i-th row of the matrix is ij =1 means that UAV i performs mission j, u ij = 0 means that drone i did not perform task j; the cost matrix is represented by W, and the jth element in the i-th row of the matrix is w ij represents the cost of UAV i performing mission j; According to the cost minimization principle, the objective function and its constraints are established as follows: S2. Set the initialization parameters of the reverse learning snake algorithm: Use a population-based algorithm to set the algorithm's population, number of iterations, and threshold parameters for each link; the algorithm's population setting method includes the following sub-steps: S21, redefine: vectorize the decision variable U into x = (u 11 ,u 12 ,…,u 1n ,…,u m1 ,u m2 ,…,u mn ), the cost matrix W is vectorized to w = (w 11 ,w 12 ,…,w 1n ,…,w m1 ,w m2 ,…,w mn ), the dimensions of both vectors are D = m × n, and the decision variables are subject to lower and upper bounds, and each element has x min =0≤x d ≤x max =1,x d represents the dth element in x, d = 1, ..., D; since the decision variable x is binary discrete, the objective function is redefined as minf(x) = x′·w, where x′ = round(x), indicating that each element is rounded off; S22, generate the original seed cluster X: randomly generate P in [x min ,x max ] The number of snake individuals x that obey independent uniform distribution on the interval i : x i =x min +r×(x max -x min ),x i ∈X (2) Where r is a random number uniformly distributed in the interval [0,1]; S23. Calculate reverse seed clusters Calculate each individual x according to the following formula i The reverse individual S24. Merge and filter the original population and the reverse population: Since the goal of the problem is to maximize f(x), the set The first D elements that make the objective function f(x) larger are randomly divided into two sets X m With X f In the equation, they represent the male and female populations respectively; minf(x) is the minimum value of the function f(x), argminf(x) represents the variable value when the objective function f(x) takes the minimum value, and the record "food" is: f food =minf(x),x food =argminf(x),x∈X m ∪X f ; S3. Iterate the optimization process: set the total number of iterations for problem solving to T, and the current number to t; calculate the environmental parameters: temperature H, food quantity Q, and when t≤T, calculate the current food quantity Q and its threshold value Q. th The relationship between the current temperature H and its threshold value H th After each iteration, the optimal individual of each gender population in the current field is updated and defined as the location of food, which is compared with the previous generation. T is incremented and S3 is repeated. When t>T, the loop is exited and the global optimal solution is output. S4. Solve to obtain the optimal allocation of drones to tasks, output this allocation plan, and calculate its final benefit.
2. The method for assigning unmanned aerial vehicle tasks based on the reverse learning snake algorithm according to claim 1 is characterized in that: The S3 comprises the following sub-steps: S31, calculate environmental parameters and make judgments: According to the current number of iterations t, calculate the temperature H and the amount of food Q as follows: When Q th Enter S32; when Q ≥ Q th And H>H th Enter S33; when Q ≥ Q th And H≤H th Enter S34; after S32, S33, and S34 are executed, enter S35; Q th , H th They are the preset food quantity and temperature thresholds respectively; S32, exploration: the current food quantity Q is less than the food quantity threshold value Q th When each individual x in the snake group of gender g g,i By ability α g,i Search for food and update the current position to x as follows g,i ′: x g,i ′=x g,r ±0.05α g,i ((x max -x min )r+x min ) (5) Where r in the calculation formula represents a random number uniformly distributed in the interval [0,1], and when used as a subscript, it represents a random individual numbered r in the population; ± represents the random positive and negative numbers in the actual calculation, with equal probability of 50%; g = f or m, representing female or male, respectively; x g,r Represents the position of a random individual r in a population of gender g, and its ability to search for food is: where f g,r =f(x g,r ), f g,i =f(x g,i ); S33. Digging: When the amount of food Q ≥ Q th , and H is higher than the threshold value H th When , the snake group will move towards the location of the food and dig for food, updating its own position. This process is affected by the current ambient temperature H. The position calculation formula of each individual is: x g,i ′=x food ±2rH(x food -x g,i ) (7) S34, struggle, mating and spawning: when the amount of food Q ≥ Q th , and the ambient temperature H <H th When the snakes are in the same group, they will reproduce; the individuals in the snake group will randomly choose one of the two behaviors: courtship struggle and mating, laying eggs and reproducing offspring: With a 60% probability, individuals in a group will engage in courtship struggles: where β g,i The fighting ability of individual i of gender g is affected by the best individual in the current gender group, that is, the one with the largest function value f g,best The individual impact is calculated as follows: With a 40% probability, individuals in the snake group will mate, lay eggs and reproduce; individuals in the male group x m,i and individuals x of the female population f,i Mating is performed according to the following formula: Among them, the mating ability of individual i of sex g is defined as: Subsequently, the offspring produced replace the worst individual x in the current sex population. g,worst , that is, the individual with the largest value of f(x) is replaced by: x g,worst ′=x min +r(x max -x min ) (12); S35. Update: At the end of each cycle, record the best and worst individuals in the group of gender g on the current field: Among them, argminf(x g,i ) means to make the objective function f(x g,i ) takes the minimum value of the variable, argmaxf(x g,i ) means to make the objective function f(x g,i ) is the value of the variable when it reaches its maximum value.