A method, apparatus, storage medium, and device for unmanned aerial vehicle (UAV) data-assisted collection.
By optimizing UAV path planning through clustering and improved genetic algorithms, the network connectivity problem in UAV data collection was solved, and fast and accurate data collection path planning was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2023-07-14
- Publication Date
- 2026-06-30
AI Technical Summary
Existing UAV data collection methods cannot effectively guarantee network connectivity when faced with ground user mobility or inaccurate sensor node deployment, especially in emergency situations, where existing path planning algorithms cannot solve problems quickly or guarantee the optimal solution.
Clustering algorithms are used to divide the data into clusters, cluster head nodes are selected, and an improved genetic algorithm is used for flight path planning. The path planning process is optimized by combining greedy ideas, IPMX algorithm, hybrid mutation method and local search algorithm 2-opt.
It improves the calculation speed and accuracy of path planning, avoids the local optimum problem, and can quickly find the shortest path for UAVs to collect data, solving the problem of abnormal data collection caused by ground user mobility and inaccurate deployment of sensor nodes.
Smart Images

Figure CN116916282B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, apparatus, storage medium, and device for data collection assisted by unmanned aerial vehicles (UAVs), belonging to the field of electronic communication technology. Background Technology
[0002] Unmanned aerial vehicles (UAVs) have garnered significant attention in both academia and industry as enablers of many important applications. Due to their high mobility, UAVs can be flexibly deployed to collect data from ground sensor nodes (SNs). They fly over sensor nodes and communicate with them via low-altitude air-to-ground communication links. In this way, UAV-assisted data acquisition can conserve energy at sensor nodes, thereby extending the lifespan of wireless sensor networks.
[0003] With the emergence of the Internet of Things (IoT), data collection has become a crucial foundation for realizing IoT functions. Although many communication protocols and routing algorithms have been proposed to achieve data collection in IoT and Wireless Sensor Networks (WSN), network connectivity cannot be guaranteed. Due to the mobility of ground users or the inaccurate deployment of sensor nodes, especially in emergency situations, these communication protocols and routing algorithms may not function properly.
[0004] Utilizing the mobility of drones, data is collected through flight and relayed to a final receiver. Drone flight path planning algorithms are mainly divided into exact algorithms and approximate algorithms. Exact algorithms, such as exhaustive search and dynamic programming, can find exact solutions, but cannot solve large-scale problems quickly. Approximate algorithms, such as genetic algorithms, simulated annealing, and particle swarm optimization, can quickly solve large-scale path planning problems, but generally can only approximate the optimal solution infinitely, without guaranteeing a general solution. Genetic algorithms suffer from local optima, so they also require optimization. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, apparatus, storage medium, and device for assisted data collection by unmanned aerial vehicles (UAVs), capable of collecting data via UAVs and planning the shortest flight path for data collection. To achieve the above objective, this invention employs the following technical solution:
[0006] In a first aspect, the present invention provides a method, apparatus, storage medium, and device for unmanned aerial vehicle (UAV) data-assisted collection, including:
[0007] Acquire the ground sensor nodes and receiving nodes from which the data to be transmitted is to be obtained;
[0008] Based on the acquired ground sensor nodes, a clustering algorithm is used to divide them into clusters, resulting in multiple cluster head nodes; wherein, the cluster head nodes collect the data to be transmitted from all ground sensor nodes in the cluster;
[0009] Based on multiple cluster head nodes and receiving nodes, a pre-defined improved genetic algorithm is used to plan the flight path, obtaining the shortest path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0010] In conjunction with the first aspect, optionally, the clustering algorithm is the AP clustering algorithm, expressed by the following formula:
[0011]
[0012] In equation (1), r(i,k) is the attraction information matrix, representing the degree to which node k is suitable as the cluster center of node i, and s(i,k) represents the negative of the Euclidean distance between node i and node k, expressed by the following equation:
[0013] s(i,k)=-d 2 (x i ,x k )=-||x i -x k || 2 (5)
[0014] In equation (2), x i Let x be the ground coordinates of node i. k Let k be the ground coordinates of node k;
[0015] In equation (1), a(i,k) is the membership information matrix, representing the degree to which node i is suitable as the cluster center of node k, and represents the message from node k to node i, with an initial value of 0; a(k,k) represents the sum of positive attraction values obtained by node k from other points; k' is node k', i' is node i', a(i,k') is the membership information matrix, representing the degree to which node i is suitable as the cluster center of node k'; s(i,k') is the negative of the Euclidean distance between node i and node k'; t is the number of iterations, r t (i,k) is the attraction information matrix at iteration number t, representing the similarity value of node k as the cluster center of other nodes besides node i; r t (i',k) is the attraction information matrix when the number of iterations is t, representing the similarity value of node k as the cluster center of other points besides node i';
[0016] Among them, attraction and belonging information are attenuated using a damping coefficient λ, and are expressed by the following formula:
[0017]
[0018] In equation (3), r t+1 (i,k) is the attraction information matrix at iteration number t+1, a t+1 (i,k) is the affiliation information matrix when the iteration number is t+1.
[0019] In conjunction with the first aspect, optionally, the flight path planning using a preset improved genetic algorithm includes:
[0020] Obtain the matrix D(x,y) composed of the coordinates of multiple cluster head nodes;
[0021] Calculate the Euclidean distance between any two points in matrix D(x,y) to obtain the distance matrix Dist(x,y);
[0022] The population is initialized using a greedy algorithm to obtain the initial population.
[0023] The roulette wheel algorithm is used to select individuals in each generation of the population. The higher the individual's fitness value, the greater the probability of being selected.
[0024] The IPMX algorithm is used to perform crossover operations on each generation of the population.
[0025] The hybrid mutation method is used to perform mutation operations on each generation of the population, and different mutation operators are randomly selected for mutation operations.
[0026] The 2-opt local search algorithm is used to perform a local search on the population to find a shorter path; in response to the absence of a shorter path, the shortest flight path is obtained for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0027] In conjunction with the first aspect, optionally, the initialization of the population using a greedy approach to obtain an initial population includes:
[0028] Randomly select cluster head node i as the starting point, and find the cluster head node j that is closest to cluster head node i and the next closest cluster head node k according to the distance matrix Dist(x,y);
[0029] The next node after cluster head node i is selected according to a random function. If the probability is greater than the preset fixed probability, cluster head node j is selected; otherwise, cluster head node k is selected.
[0030] Repeat the above steps, and use the distance matrix Dist(x,y) based on the greedy idea to obtain multiple initial paths, which are the initial population.
[0031] In conjunction with the first aspect, optionally, the crossover operation performed on each generation of the population using the IPMX algorithm includes:
[0032] Two cutting points are randomly selected from the parent chromosome segment for cutting, resulting in two strings: an index string and a numerical string.
[0033] Based on the parent chromosome, the two strings are mapped to form a mapping table; the first row of the mapping table is the node index from 0 to n, where n is the length of the parent chromosome segment; the second row is the node of the numerical string corresponding to each node in the index string;
[0034] Based on the two substrings obtained, a swap list is generated; the first column of the swap list is the index string, the second column is the numeric string, and the value of the third column is set to 1;
[0035] Based on the mapping table and the swap list, a summation list is obtained. The first row of the summation list is the first row of the mapping table; the second row is the value of whether a certain node exists in the index string. If the node exists, the value is 1, otherwise the value is 0; the third row is the value of whether a certain node exists in the numeric string. If the node exists, the value is 1, otherwise the value is 0; the fourth row is the sum of the values in the second row and the third row. If the value is 0, the node does not exist in either the index string or the numeric string. If the value is 2, the node is an intermediate node that does not need to be swapped. If the value is 1, the node is a path endpoint that needs to be swapped.
[0036] Based on the summation list, the swap list is updated. If the first two columns of each row in the swap list contain intermediate nodes, the value of the third column is updated to 0. If it contains a path endpoint, the second column is updated to obtain another path endpoint, and the value of the third column is updated to 1. The nodes in the first two columns of the swap list with the value of 1 in the third column are the nodes that need to be swapped.
[0037] The points in the cut fragments of the parent chromosome are exchanged to obtain the offspring chromosome S1.
[0038] Generate a chromosome segment F of the same length as the parent chromosome. The first line of chromosome segment F is the node index from 0 to n, where n is the length of the parent chromosome segment; the second line contains all 0 values.
[0039] Let F[S1[i]] = P1[i] to update the elements of chromosome segment F, where i = 1, 2, ..., n, and n is the length of the parent chromosome segment;
[0040] Executing S2[i] = F[P2[i]] yields the offspring chromosome S2;
[0041] Crossover substitution is completed based on progeny chromosomes S1 and S2;
[0042] The crossover operation is performed sequentially on each generation of the population to complete the crossover operation for each generation.
[0043] In conjunction with the first aspect, optionally, the hybrid mutation method performs mutation operations on each generation of the population by randomly selecting a mutation operator using a random function.
[0044] In conjunction with the first aspect, optionally, the mutation operator includes:
[0045] Single-point mutation: Two points are randomly selected in a path using a random function, and their positions are swapped to complete the mutation.
[0046] Sliding mutation: Selects a small segment of the path using a random function and changes the position of this small segment in the overall path;
[0047] Reversal mutation: Select a small path segment using a random function and reverse the start and end nodes of this small path segment;
[0048] Slider Mutation: The positions of two sliding points, position1 and position2, are determined by a random function, ensuring that the distance between the two points is greater than a certain distance L. The slider is a path path with a distance of L starting from position1; the path path with a distance of L starting from position1 is changed to a path path with a distance of L ending at position2; the path path with a distance of L ending at position2 is changed back to path.
[0049] In a second aspect, the present invention provides a drone data-assisted collection device, comprising:
[0050] Acquisition module: Used to acquire the ground sensor nodes and receiving nodes for the data to be transmitted;
[0051] Clustering module: Based on the acquired ground sensor nodes, clustering is performed using a clustering algorithm to obtain multiple cluster head nodes; wherein, the cluster head node gathers the data to be transmitted from all ground sensor nodes in the cluster;
[0052] Planning module: Based on multiple cluster head nodes and receiving nodes, it uses a preset improved genetic algorithm to plan the flight path, and obtains the shortest path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0053] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the UAV data-assisted collection method as described in the first aspect.
[0054] Fourthly, the present invention provides an apparatus, characterized in that it comprises:
[0055] Memory, used to store instructions;
[0056] A processor is configured to execute the instructions, causing the device to perform operations implementing the UAV data-assisted collection method as described in the first aspect.
[0057] Compared with the prior art, the beneficial effects achieved by the UAV data-assisted collection method, apparatus, storage medium, and device provided in this embodiment of the invention include:
[0058] This invention acquires ground sensor nodes and receiving nodes for data to be transmitted; based on the acquired ground sensor nodes, a clustering algorithm is used to cluster them, resulting in multiple cluster head nodes; wherein, the cluster head nodes collect the data to be transmitted from all ground sensor nodes in the cluster; this invention uses a clustering algorithm to cluster ground sensor nodes to obtain cluster head nodes, and uses the cluster head nodes to transmit data with UAVs, which can overcome the problem of abnormal data collection caused by the mobility of ground users or the inaccurate deployment of sensor nodes in the prior art;
[0059] This invention utilizes a pre-defined improved genetic algorithm based on multiple cluster head nodes and receiving nodes to plan flight paths, obtaining the shortest path for the UAV to collect data to be sent from multiple cluster head nodes and ultimately forward it to the receiving node. The invention initializes the population using a greedy approach, optimizing the initial population and directly eliminating some poor paths, thus improving the convergence speed of the pre-defined improved genetic algorithm. The improved genetic algorithm significantly increases the computational speed of flight path planning. This invention employs a hybrid mutation method to mutate each generation of the population, randomly selecting different mutation operators to increase population diversity and avoid getting trapped in local optima. Finally, this invention uses the 2-opt local search algorithm to perform local searches on the population, finding shorter paths.
[0060] This invention enables the collection of data using drones and the planning of the shortest flight path for the drones to collect data. Attached Figure Description
[0061] Figure 1 This is a flowchart of a UAV data-assisted collection method provided in Embodiment 1 of the present invention;
[0062] Figure 2 This is a schematic diagram of the path nodes in a UAV data-assisted collection method provided in Embodiment 1 of the present invention. Detailed Implementation
[0063] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0064] Example 1:
[0065] like Figure 1 As shown in the figure, this embodiment introduces a method for UAV-assisted data collection, including:
[0066] Acquire the ground sensor nodes and receiving nodes from which the data to be transmitted is to be obtained;
[0067] Based on the acquired ground sensor nodes, a clustering algorithm is used to divide them into clusters, resulting in multiple cluster head nodes; wherein, the cluster head nodes collect the data to be transmitted from all ground sensor nodes in the cluster;
[0068] Based on multiple cluster head nodes and receiving nodes, a pre-defined improved genetic algorithm is used to plan the flight path, obtaining the shortest path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0069] The specific steps include:
[0070] Step 1: Obtain the ground sensor nodes and receiving nodes for the data to be transmitted.
[0071] Step 2: Based on the acquired ground sensor nodes, clustering algorithm is used to obtain multiple cluster head nodes; wherein, the cluster head node gathers the data to be transmitted from all ground sensor nodes in the cluster.
[0072] The clustering algorithm is the AP clustering algorithm, which is expressed by the following formula:
[0073]
[0074] In equation (1), r(i,k) is the attraction information matrix, representing the degree to which node k is suitable as the cluster center of node i, and s(i,k) represents the negative of the Euclidean distance between node i and node k, expressed by the following equation:
[0075] s(i,k)=-d 2 (x i ,x k )=-||x i -x k || 2 (8)
[0076] In equation (2), x i Let x be the ground coordinates of node i. k Let k be the ground coordinates of node k;
[0077] In equation (1), a(i,k) is the membership information matrix, representing the degree to which node i is suitable as the cluster center of node k, and represents the message from node k to node i, with an initial value of 0; a(k,k) represents the sum of positive attraction values obtained by node k from other points; k' is node k', i' is node i', a(i,k') is the membership information matrix, representing the degree to which node i is suitable as the cluster center of node k'; s(i,k') is the negative of the Euclidean distance between node i and node k'; t is the number of iterations, r t (i,k) is the attraction information matrix at iteration number t, representing the similarity value of node k as the cluster center of other nodes besides node i; r t (i',k) is the attraction information matrix when the number of iterations is t, which represents the similarity value of node k as the cluster center of other points besides node i'.
[0078] The attraction and belonging information are attenuated using a damping coefficient λ to prevent numerical oscillations during the update process, and are expressed by the following formula:
[0079]
[0080] In equation (3), r t+1 (i,k) is the attraction information matrix at iteration number t+1, a t+1 (i,k) is the affiliation information matrix when the iteration number is t+1.
[0081] Adjacency matrices can be used to represent association information. Specifically, clustering algorithms are used to obtain the association information between the UAV and ground sensor nodes, generating an adjacency matrix D = {a ij}∈R N×N (i,j=1,2,...,N), where i and j are two ground sensor nodes. Element a ij =1 indicates that the j-th node is in the cluster with the i-th node as the cluster head, and element a ij =0 indicates that the j-th node is not in the cluster whose cluster head is the i-th node.
[0082] In an embodiment, for example a 12 =0, which means the second node is not in the cluster whose cluster head is the first node. Furthermore, define a ii =0 indicates that the i-th node is not the cluster head node, and a is defined as... ii =1 means that the i-th node is the cluster head node.
[0083] This embodiment uses a clustering algorithm to cluster ground sensor nodes to obtain cluster head nodes. The cluster head nodes are then used to transmit data with the UAV, which can overcome the problem of abnormal data collection caused by the mobility of ground users or the inaccurate deployment of sensor nodes in the prior art.
[0084] Step 3: Based on multiple cluster head nodes and receiving nodes, use a pre-set improved genetic algorithm to plan the flight path and obtain the shortest path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0085] Step 3.1: Obtain the matrix D(x,y) composed of the coordinates of multiple cluster head nodes.
[0086] Step 3.2: Calculate the Euclidean distance between any two points in matrix D(x,y) to obtain the distance matrix Dist(x,y).
[0087] Using the position coordinates of each cluster head node, the distance matrix Dist(x,y) is obtained. For example, the element Dist(1,2) represents the distance from the first cluster head node to the second cluster head node.
[0088] Step 3.3: Initialize the population using a greedy algorithm to obtain the initial population.
[0089] Step 3.3.1: Randomly select a cluster head node i as the starting point, and find the cluster head node j that is closest to cluster head node i and the next closest cluster head node k according to the distance matrix Dist(x,y).
[0090] Step 3.3.2: Select the next node of cluster head node i from cluster head node j and cluster head node k according to the random function. If the probability is greater than the preset fixed probability, select cluster head node j; otherwise, select cluster head node k.
[0091] Step 3.3.3: Repeat steps 3.3.1-3.3.2, and use the distance matrix Dist(x,y) based on the greedy idea to obtain multiple initial paths, which are the initial population.
[0092] This embodiment initializes the population based on a greedy approach, optimizes the initial population, and can directly filter out some poor paths, thereby improving the convergence speed of the preset improved genetic algorithm.
[0093] Step 3.4: Use the roulette wheel algorithm to select individuals for each generation of the population. The higher the fitness value of an individual, the greater the probability of it being selected.
[0094] The roulette wheel algorithm is used to select individuals in each generation of the population. The higher the fitness of an individual, the greater the probability of being selected. The fitness of an individual is the sum of the distances of each path.
[0095] Dividing the fitness of each path by the total fitness yields the individual selection probability for each path:
[0096]
[0097] In equation (4), P(x) i ) represents path x i The individual choice probability, f(x) i ) represents path x i The fitness of N is the total number of paths.
[0098] The individual choice probabilities are calculated and accumulated to obtain the cumulative probability.
[0099] The cumulative probability method represents the selection probability of each individual using line segments of different lengths. These segments are combined into a straight line of length 1. The longer a segment is on this line, the greater the probability that the individual will be selected. Finally, a random number is generated within the interval [0, 1] using a random function. The individual whose interval the number falls into is selected.
[0100] Step 3.5: Perform crossover operations on each generation of the population using the IPMX algorithm.
[0101] Step 3.5.1: Randomly select two cutting points in the parent chromosome fragment to cut it, resulting in two strings, namely the index string and the numerical string.
[0102] In this embodiment, the paternal chromosome fragments are shown in Table 1.
[0103] In Table 1, there is a cut-off point before "P1=4, P2=7" and a cut-off point after "P1=8, P2=2". In this embodiment, the index string is "7, 10, 5, 6, 2" in row P2, and the value string is "4, 5, 6, 7, 8" in row P1.
[0104] Table 1. Fragments of paternal chromosomes
[0105]
[0106] Step 3.5.2: Based on the parent chromosome, map the two strings obtained to form a mapping table.
[0107] The first row of the mapping table is the node index from 0 to n, where n is the length of the parent chromosome segment; the second row is the node of the numerical string corresponding to each node in the index string, where 0 indicates that there is no such node in the index string.
[0108] In this embodiment, the mapping table is shown in Table 2.
[0109] Table 2 Mapping Table
[0110] Node Index 1 2 3 4 5 6 7 8 9 10 Corresponding numerical string 0 8 0 0 6 7 4 0 0 5
[0111] The swapping of nodes 2 and 8, nodes 5 and 6, nodes 6 and 7, nodes 7 and 4, and nodes 10 and 5 represents the path travel, as shown in Table 2.
[0112] Step 3.5.2: Generate a swap list based on the two substrings obtained.
[0113] The first column of the swap list is the index string, the second column is the numeric string, and the third column is set to 1.
[0114] In this embodiment, the swap list is shown in Table 3.
[0115] Table 3 Exchange List
[0116] index string Numeric strings value 7 4 1 10 5 1 5 6 1 6 7 1 2 8 1
[0117] Step 3.5.3: Obtain the summation list based on the mapping table and the exchange list.
[0118] The first row of the summation list is the first row of the mapping table; the second row is the value of whether a certain node exists in the index string, with a value of 1 if the node exists and 0 otherwise; the third row is the value of whether a certain node exists in the numeric string, with a value of 1 if the node exists and 0 otherwise; the fourth row is the sum of the values in the second and third rows, with a value of 0 indicating that the node does not exist in either the index or numeric string, a value of 2 indicating that the node is an intermediate node that does not need to be swapped, and a value of 1 indicating that the node is a path endpoint that needs to be swapped.
[0119] In this embodiment, the summation list is shown in Table 4.
[0120] Table 4 Summation List
[0121] Node Index 1 2 3 4 5 6 7 8 9 10 P1 Mapping Table 0 1 0 0 1 1 1 0 0 1 P2 Mapping Table 0 0 0 1 1 1 1 1 0 0 Summation 0 1 0 1 2 2 2 1 0 1
[0122] Nodes 5, 6, and 7 are intermediate nodes that do not require swapping. Nodes 2, 4, 8, and 10 are path endpoints that require swapping, resulting in the following... Figure 2 The diagram shows the path nodes.
[0123] Step 3.5.4: Based on the summation list, update the swap list. If the first two columns of each row in the swap list contain intermediate nodes, update the value of the third column to 0. If it contains a path endpoint, update the second column to obtain another path endpoint and update the value of the third column to 1. The nodes in the first two columns of the swap list with the value of 1 in the third column are the nodes that need to be swapped.
[0124] Compared to Table 3, since nodes 5, 6, and 7 are intermediate nodes that do not need to be swapped, the next node after node 10 in Table 6 is node 4. A value of 1 in the third column indicates that the index string and the numeric string at that point need to be swapped; otherwise, it is set to 0.
[0125] In this embodiment, the updated swap list is shown in Table 5.
[0126] Table 5 Exchange List
[0127] index string Numeric strings value 7 4 0 10 4 1 5 6 0 6 7 0 2 8 1
[0128] In this embodiment, the updated mapping table is shown in Table 6. Compared with Table 2, nodes 5, 6, and 7 are intermediate nodes that do not need to be swapped, and the corresponding numerical strings in Table 6 are set to 0.
[0129] Table 6 Updated Mapping Table
[0130] Node Index 1 2 3 4 5 6 7 8 9 10 Corresponding numerical string 0 8 0 0 0 0 0 0 0 5
[0131] In this embodiment, as Figure 2 The diagram shown is a schematic of the path nodes.
[0132] Step 3.5.5: Exchange the points in the cut fragments of the parent chromosome to obtain the offspring chromosome S1.
[0133] In this embodiment, the remaining strings after cutting are "3, 9, 8, 1, 4" in line P2 and "1, 2, 3, 9, 10" in line P1. The starting nodes in the remaining strings are nodes 2 and 10 in line P1. Node 2 is replaced by node 8, and node 10 is replaced by node 4. The index string "7, 10, 5, 6, 2" is used to replace the numeric string "4, 5, 6, 7, 8".
[0134] In this embodiment, the offspring chromosome S1 is shown in Table 7.
[0135] Table 7. Offspring Chromosome S1
[0136]
[0137] Step 3.5.6: Generate a chromosome segment F with the same length as the parent chromosome. The first line of chromosome segment F is the node index from 0 to n, where n is the length of the parent chromosome segment; the second line is all 0.
[0138] In this embodiment, chromosome segment F is shown in Table 8.
[0139] Table 8 Chromosome Fragment F
[0140] Node Index 1 2 3 4 5 6 7 8 9 10 F 0 0 0 0 0 0 0 0 0 0
[0141] Step 3.5.7: Update the elements of chromosome segment F by letting F[S1[i]] = P1[i], where i = 1, 2, ..., n, and n is the length of the parent chromosome segment. This operation determines the elements of F by considering the i-th element of S1 as the index of F, and using the i-th element of P1 as the corresponding value of the index of F.
[0142] Use row S1 of Table 7 as the first row (index) and row P1 of Table 1 as the second row (index corresponding value) to create the first transition table 9.
[0143] Table 9 First Transition Table
[0144]
[0145] In Table 9, the next node after node 8 is node 2, the next node after node 7 is node 4, the next node after node 10 is node 5, the next node after node 5 is node 6, the next node after node 6 is node 7, the next node after node 2 is node 8, and the next node after node 4 is node 10. Sort S1 in Table 9 from 1 to 10 to obtain the elements of F, as shown in Table 10.
[0146] Table 10: Elements of the updated chromosome fragment F
[0147] F-node index 1 2 3 4 5 6 7 8 9 10 Elements of F 1 8 3 10 6 7 4 2 9 5
[0148] Step 3.5.8: Execute S2[i] = F[P2[i]] to obtain the offspring chromosome S2. The purpose of this operation is to use the i-th element of P2 as an index of F, and the corresponding value of the index of F as the i-th element of S2, thereby generating the offspring chromosome S2.
[0149] Add row P2 of Table 1 to the bottom of Table 10 as the third row, and write it as the second transition table 11.
[0150] Table 11 Second Transition Table
[0151] F-node index 1 2 3 4 5 6 7 8 9 10 Elements of F 1 8 3 10 6 7 4 2 9 5 P2 3 9 8 7 10 5 6 2 1 4
[0152] Based on Table 11:
[0153] The first element of P2 is 3. When the index of node F is 3, the element of F is 3.
[0154] The second element of P2 is 9. When the index of node F is 9, the element of F is 9.
[0155] The third element of P2 is 8. When the index of node F is 8, the element of F is 2.
[0156] The 4th element of P2 is 7. When the index of node F is 7, the element of F is 4.
[0157] The 5th element of P2 is 10. When the index of node F is 10, the element of F is 5.
[0158] The 6th element of P2 is 5. When the index of node F is 5, the element of F is 6.
[0159] The 7th element of P2 is 6. When the index of node F is 6, the element of F is 7.
[0160] The 8th element of P2 is 2. When the index of node F is 2, the element of F is 8.
[0161] The 9th element of P2 is 1. When the index of node F is 1, the element of F is 1.
[0162] The 10th element of P2 is 4. When the index of node F is 4, the element of F is 10.
[0163] From S2[i]=F[P2[i]], the offspring chromosome S2 is obtained as shown in Table 12.
[0164] Table 12 Offspring Chromosome S2
[0165] Node Index 1 2 3 4 5 6 7 8 9 10 S2 3 9 2 4 5 6 7 8 1 10
[0166] Based on Tables 7 and 12, the offspring chromosomes were obtained, as shown in Table 13.
[0167] Table 13 Offspring Chromosomes
[0168] S1 1 8 3 7 10 5 6 2 9 4 S2 3 9 2 4 5 6 7 8 1 10
[0169] Step 3.5.9: Repeat steps 3.5.1-3.5.8 to perform crossover replacement on each generation of the population in turn, and complete the crossover operation for each generation of the population.
[0170] For the above process, assuming P1 and P2 have lengths of n, and the two strings S1 and S2 have lengths of m, the number of operations to generate the swap list and the mapping list is 3m+m. The number of operations to generate lists L1, L2, and L1+L2 is m+m+n. Finding an entry equal to 2 in list L1+L2 requires n operations. Updating the swap list requires n+m operations. The number of operations required to generate the final path Son1 using the swap list is n, and the number of operations required to obtain Son2 is 2n. In the worst case, the total number of operations to generate two valid paths is... We can obtain 7βn+6n, so its computational complexity is O(n).
[0171] The traditional PMX algorithm first randomly selects two cutting points to obtain two substrings, then swaps these two substrings to obtain two new paths. However, these two new paths are usually invalid, so a mapping table needs to be formed based on the obtained substrings to determine the mapping relationship. Then, duplicate elements in the two new paths are replaced to finally obtain a valid path. Assume P1 and P2 have lengths n, and the two substrings S1 and S2 have lengths m. Let A1 = S2 - (S1 ∩ S1), A2 = S1 - (S1 ∩ S2), and A1 and A2 have lengths t. Now, the elements of P1 - S1 are divided into two parts. The first part is the intersection with S2... The first set is A1, and the second set is A1. These two parts require m(nmt) and... These comparisons are used to insert the (nmt) element into Son1 and to identify t elements. Inserting the t elements belonging to A1 into Son1 requires αmt comparisons, where α is a real number. In the worst case, a = 1, t = m, and... The total number of comparisons and insertions that produce two offspring is (2β-β). 2 )n 2 +βn, so the computational complexity is O(n 2 ).
[0172] Therefore, the improved genetic algorithm provided in this embodiment reduces computational complexity and can greatly improve the computational speed of flight path planning.
[0173] Step 3.6: Use the hybrid mutation method to perform mutation operations on each generation of the population, and randomly select different mutation operators to perform mutation operations.
[0174] A random mutation operator is randomly selected using a random function to perform the mutation operation.
[0175] Mutation operators include: single-point mutation, sliding mutation, inversion mutation, and slider mutation.
[0176] Single-point mutation: Two points are randomly selected along a path using a random function, and their positions are swapped to complete the mutation.
[0177] In this embodiment, the second column and the eighth column are randomly selected and swapped to complete the mutation, as shown in Table 14.
[0178] Table 14 Single point variation
[0179]
[0180] Sliding mutation: Selects a small segment of the path using a random function and changes the position of this small segment within the overall path.
[0181] In this embodiment, the positions of columns 3 to 7 are randomly changed to complete the mutation, as shown in Table 15.
[0182] Table 15 Sliding Variation
[0183]
[0184] Reversal mutation: Select a small path segment using a random function and reverse the start and end nodes of this small path segment.
[0185] In this embodiment, columns 3 to 7 are randomly selected for reversal to complete the mutation, as shown in Table 16.
[0186] Table 16 Reversal Mutations
[0187]
[0188] Slider Mutation: The positions of two sliding points, position1 and position2, are determined by a random function, ensuring that the distance between the two points is greater than a certain distance L. The slider is a path path with a distance of L starting from position1; the path path with a distance of L starting from position1 is changed to a path path with a distance of L ending at position2; the path path with a distance of L ending at position2 is changed back to path.
[0189] In this embodiment, the first column is randomly selected as the sliding point position1, the seventh column of the offspring chromosome S1 is selected as the sliding point position2, and the slider is a path with a distance of 4 starting from position1.
[0190] Change the path starting at a distance of 2 in the first column to a path ending at a distance of 2 in the seventh column, and change the path ending at a distance of 2 in the seventh column to a path with a distance of 4, as shown in Table 17.
[0191] Table 17 Slider Variation
[0192]
[0193] This embodiment uses a hybrid mutation method to mutate each generation of the population, randomly selecting different mutation operators to increase population diversity and avoid getting trapped in local optima.
[0194] Step 3.7: Use the 2-opt local search algorithm to perform a local search on the population to find a shorter path; in response to not finding a shorter path, obtain the shortest flight path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0195] Using the 2-opt neighborhood search algorithm, a path is randomly selected, all its neighboring paths are obtained, and then the path with the shortest distance is selected. The first row is a path, and the rest are its neighboring paths.
[0196] like Figure 1 The termination condition shown is that no shorter path is found, and the shortest path is obtained for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0197] This embodiment can collect data using drones and plan the shortest flight path for the drones to collect data.
[0198] Example 2:
[0199] This embodiment provides a UAV data-assisted collection device based on Embodiment 1, including:
[0200] Acquisition module: Used to acquire the ground sensor nodes and receiving nodes for the data to be transmitted;
[0201] Clustering module: Based on the acquired ground sensor nodes, clustering is performed using a clustering algorithm to obtain multiple cluster head nodes; wherein, the cluster head node gathers the data to be transmitted from all ground sensor nodes in the cluster;
[0202] Planning module: Based on multiple cluster head nodes and receiving nodes, it uses a preset improved genetic algorithm to plan the flight path, and obtains the shortest path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
[0203] Example 3:
[0204] This invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the UAV data-assisted collection method as described in Embodiment 1.
[0205] Example 4:
[0206] This invention also provides a device, comprising:
[0207] Memory, used to store instructions;
[0208] A processor is configured to execute the instructions, causing the device to perform operations implementing the UAV data-assisted collection method as described in Embodiment 1.
[0209] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0210] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0211] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0212] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0213] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for unmanned aerial vehicle (UAV) data-assisted collection, characterized in that, include: Acquire the ground sensor nodes and receiving nodes from which the data to be transmitted is to be obtained; Based on the acquired ground sensor nodes, a clustering algorithm is used to divide them into clusters, resulting in multiple cluster head nodes; wherein, the cluster head nodes collect the data to be transmitted from all ground sensor nodes in the cluster; Based on multiple cluster head nodes and receiving nodes, a pre-defined improved genetic algorithm is used to plan the flight path, obtaining the shortest path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node. The step of using a pre-defined improved genetic algorithm for flight path planning includes: Obtain the matrix D(x,y) composed of the coordinates of multiple cluster head nodes; Calculate the Euclidean distance between any two points in matrix D(x,y) to obtain the distance matrix Dist(x,y); The population is initialized using a greedy algorithm to obtain the initial population. The roulette wheel algorithm is used to select individuals in each generation of the population. The higher the individual's fitness value, the greater the probability of being selected. The IPMX algorithm is used to perform crossover operations on each generation of the population. The hybrid mutation method is used to perform mutation operations on each generation of the population, and different mutation operators are randomly selected for mutation operations. The 2-opt local search algorithm is used to perform a local search on the population to find a shorter path; in response to the absence of a shorter path, the shortest flight path is obtained for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node. The step of performing crossover operations on each generation of the population using the IPMX algorithm includes: Two cutting points are randomly selected from the parent chromosome segment for cutting, resulting in two strings: an index string and a numerical string. Based on the parent chromosome, the two strings are mapped to form a mapping table; the first row of the mapping table is the node index from 0 to n, where n is the length of the parent chromosome segment; the second row is the node of the numerical string corresponding to each node in the index string; Based on the two substrings obtained, a swap list is generated; the first column of the swap list is the index string, the second column is the numeric string, and the value of the third column is set to 1; Based on the mapping table and the swap list, a summation list is obtained. The first row of the summation list is the first row of the mapping table; the second row is the value of whether a certain node exists in the index string. If the node exists, the value is 1, otherwise the value is 0; the third row is the value of whether a certain node exists in the numeric string. If the node exists, the value is 1, otherwise the value is 0; the fourth row is the sum of the values in the second row and the third row. If the value is 0, the node does not exist in either the index string or the numeric string. If the value is 2, the node is an intermediate node that does not need to be swapped. If the value is 1, the node is a path endpoint that needs to be swapped. Based on the summation list, the swap list is updated. If the first two columns of each row in the swap list contain intermediate nodes, the value of the third column is updated to 0. If it contains a path endpoint, the second column is updated to obtain another path endpoint, and the value of the third column is updated to 1. The nodes in the first two columns of the swap list with the value of 1 in the third column are the nodes that need to be swapped. The points in the cut fragments of the parent chromosome are exchanged to obtain the offspring chromosome S1. Generate a chromosome segment F of the same length as the parent chromosome. The first line of chromosome segment F is the node index from 0 to n, where n is the length of the parent chromosome segment; the second line contains all 0 values. make Update the elements of chromosome segment F, where i = 1, 2, ..., n, and n is the length of the parent chromosome segment; implement The offspring chromosome S2 was obtained; Crossover substitution is completed based on progeny chromosomes S1 and S2; The crossover operation is performed sequentially on each generation of the population to complete the crossover operation for each generation.
2. The UAV data-assisted collection method according to claim 1, characterized in that, The clustering algorithm is the AP clustering algorithm, which is expressed by the following formula: ,(1), In equation (1), r(i,k) is the attraction information matrix, representing the degree to which node k is suitable as the cluster center of node i, and s(i,k) represents the negative of the Euclidean distance between node i and node k, expressed by the following equation: ,(2), In formula (2), x i is the ground coordinate of node i, x k is the ground coordinate of node k; In equation (1), a(i,k) is the affiliation information matrix, representing the degree to which node i is suitable as the cluster center of node k, and k represents the message from node k to node i, with an initial value of 0; a(k,k) represents the sum of positive attraction degrees obtained by node k from other points; k ’ For node k ’ i ’ For node i ’ ,a(i,k ’ Let be the affiliation information matrix, indicating that node i is suitable to be node k. ’ The degree of cluster centering; s(i,k ’ ) represents the relationship between node i and node k ’ The negative of the Euclidean distance between them; t is the iteration number, r t (i,k) is the attraction information matrix at iteration number t, representing the similarity value of node k as the cluster center of other nodes besides node i; r t (i ’ (k) is the attraction information matrix when the iteration number is t, representing node k as node i. ’ Similarity values of cluster centers to other points; Among them, attraction and belonging information are attenuated using a damping coefficient λ, and are expressed by the following formula: ,(3), In equation (3), r t+1 (i,k) is the attraction information matrix at iteration number t+1, a t+1 (i,k) is the affiliation information matrix when the iteration number is t+1.
3. The UAV data-assisted collection method according to claim 1, characterized in that, The initial population is obtained by initializing the population using a greedy algorithm, including: Randomly select cluster head node i as the starting point, and find the cluster head node j that is closest to cluster head node i and the next closest cluster head node k according to the distance matrix Dist(x,y); The next node after cluster head node i is selected according to a random function. If the probability is greater than the preset fixed probability, cluster head node j is selected; otherwise, cluster head node k is selected. Repeat the above steps, and use the distance matrix Dist(x,y) based on the greedy idea to obtain multiple initial paths, which are the initial population.
4. The UAV data-assisted collection method according to claim 1, characterized in that, The hybrid mutation method performs mutation operations on each generation of the population by randomly selecting a mutation operator using a random function.
5. The UAV data-assisted collection method according to claim 4, characterized in that, The mutation operator includes: Single-point mutation: Two points are randomly selected in a path using a random function, and their positions are swapped to complete the mutation. Sliding mutation: Selects a small segment of the path using a random function and changes the position of this small segment in the overall path; Reversal mutation: Select a small path segment using a random function and reverse the start and end nodes of this small path segment; Slider Mutation: The positions of two sliding points, position1 and position2, are determined by a random function, ensuring that the distance between the two points is greater than a certain distance L. The slider is a path path with a distance of L starting from position1; the path path with a distance of L starting from position1 is changed to a path path with a distance of L ending at position2; the path path with a distance of L ending at position2 is changed back to path.
6. A UAV data-assisted collection device based on the method of claim 1, characterized in that, include: Acquisition module: Used to acquire the ground sensor nodes and receiving nodes for the data to be transmitted; Clustering module: Based on the acquired ground sensor nodes, clustering is performed using a clustering algorithm to obtain multiple cluster head nodes; wherein, the cluster head node gathers the data to be transmitted from all ground sensor nodes in the cluster; Planning module: Based on multiple cluster head nodes and receiving nodes, it uses a preset improved genetic algorithm to plan the flight path, and obtains the shortest path for the UAV to collect the data to be sent from multiple cluster head nodes and finally forward it to the receiving node.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the UAV data-assisted collection method as described in any one of claims 1-5.
8. A device, characterized in that, include: Memory, used to store instructions; A processor is configured to execute the instructions, causing the device to perform operations that implement the UAV data-assisted collection method as described in any one of claims 1-5.