Multi-vehicle task allocation and path planning method and device for traffic inspection

By combining iterative auctions and multi-objective evolutionary algorithms, the efficiency and quality issues of multi-vehicle task allocation and path planning in traffic network inspection were solved. This approach achieves high-quality task allocation and path planning schemes with low computational overhead, thereby improving the balance and economy of inspection tasks.

CN122334818APending Publication Date: 2026-07-03CHONGQING UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2026-04-02
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In traffic network inspection, existing technologies struggle to simultaneously balance the efficiency and quality of multi-vehicle task allocation and path planning. Greedy methods are prone to getting stuck in local optima and have unbalanced loads, while simple auction allocation cannot guarantee global equilibrium, and simple evolutionary optimization methods converge slowly and are sensitive to the initial population.

Method used

An iterative auction algorithm is used to obtain the initial task edge allocation sequence, forming the elite individual gene sequence. Combined with the initial population, a Pareto front is obtained through multi-objective evolutionary algorithm optimization. The final solution is determined by Knee Point quadratic decision-making, and Dijkstra's algorithm is used for fast path cost evaluation.

Benefits of technology

Achieving a high-quality feasible solution that balances balance and cost with low computational overhead improves the scheduling efficiency and balance of inspection tasks, reduces the maximum path cost and total path cost, and enhances the availability and reproducibility of the project.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122334818A_ABST
    Figure CN122334818A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of intelligent transportation and path coverage optimization technology, and provides a method and apparatus for multi-vehicle task allocation and path planning for traffic inspection. The method includes: obtaining a weighted road network graph; initializing the starting node of each inspection vehicle; obtaining the initial task edge allocation sequence of the inspection vehicle based on the starting node of the inspection vehicle using an iterative auction algorithm to form an elite individual gene sequence; transforming the elite individual gene sequence to obtain an initial evolutionary population, which includes the elite individual gene sequence; using the initial evolutionary population as the optimization objective and a multi-objective evolutionary algorithm to iteratively optimize and obtain the final Pareto front based on the maximum path cost and the total path cost of all inspection vehicles; determining the inflection point from the final Pareto front, restoring the inflection point to obtain the final task edge allocation sequence, and generating the final node path sequence of the inspection vehicle, which can reduce the maximum path cost and avoid the deterioration of the total path cost of all inspection vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation and route coverage optimization technology, and in particular to a method and apparatus for multi-vehicle task allocation and route planning for traffic inspection. Background Technology

[0002] Traffic network inspection tasks typically require inspection vehicles to arrive at, pass through, or cover inspection targets within a limited time. Inspection targets can be road segments, intersections, traffic facilities, or combinations thereof. Due to the complex topological structure, limited road connectivity, and varying path costs depending on road segment length and traffic conditions, the scheduling of inspection tasks usually requires solving two coupled problems simultaneously: task allocation and path planning. On the one hand, it's necessary to rationally distribute a large number of inspection tasks among multiple inspection vehicles to achieve load balancing; on the other hand, it's necessary to plan feasible and low-cost travel routes for each inspection vehicle. These problems are usually combinatorial optimization problems. As the task size and the number of inspection vehicles increase, the search space grows exponentially, making it difficult to obtain the optimal solution through exhaustive search. Therefore, heuristic or intelligent optimization algorithms are often used in engineering to solve these problems.

[0003] In related technologies, common solution methods mainly include greedy methods, auction allocation methods, and evolutionary optimization methods.

[0004] (1) Greedy methods usually construct solutions step by step according to rules such as nearest distance, minimum cost or task priority, and have the advantages of simple implementation and fast calculation speed. However, these methods have strong local selectivity and are prone to getting trapped in local optima. Especially in the scenario of multiple inspection vehicles working together, it is often difficult to take into account the global load balance. It is easy for some inspection vehicles to have too many tasks and too long travel paths while other inspection vehicles have low loads, resulting in a large longest path (or maximum completion time) and affecting the overall inspection efficiency.

[0005] (2) Auction allocation methods (such as iterative auctions, task bidding allocation, etc.) construct the bidding price of inspection vehicles for tasks and iteratively update the allocation results. They can obtain a relatively reasonable task allocation in a short time and have the characteristics of fast convergence and strong interpretability. However, existing auction methods still have shortcomings in practical applications: First, the auction stage is often dominated by local cost bidding. If there is a lack of constraints or penalty mechanisms for the global equilibrium goal, the allocation result of "low total cost but unbalanced load" is easy to occur; Second, the allocation result obtained from the auction usually needs to be further transformed into an executable path. The coupling between allocation and path planning is strong. If only simple path splicing or local repair is used, the overall solution quality may still be limited; Third, when the road network scale increases or the task density is high, the cost calculation in the auction process is frequent. If there is a lack of an efficient path cost evaluation mechanism, the computational cost may still be significant.

[0006] (3) Evolutionary optimization methods (such as genetic algorithms, cross-generational elite selection and heterogeneous recombination algorithms (CHC), and non-dominated sorting genetic algorithms with elite strategies (NSGA-II) can find the best solution in a large search space through population search and iterative evolution. They are suitable for handling complex constraints and multi-objective optimization problems (such as simultaneously optimizing the longest path and total cost). However, evolutionary optimization methods usually have disadvantages such as slow convergence speed, long computation time, and sensitivity to the quality of the initial population. Especially in the traffic network inspection scenario, the encoding and decoding process needs to meet the network connectivity constraints, and fitness evaluation often relies on a large number of path cost calculations, resulting in high iteration costs per generation. At the same time, if the initial population is randomly generated with poor quality, the evolutionary process may require many generations to obtain a usable solution, which is difficult to meet the real-time or near-real-time requirements of engineering. For multi-objective evolutionary algorithms, although a set of Pareto optimal solutions can be output, in practical applications, secondary decision-making is still required to select the final execution scheme. Existing technologies often lack efficient selection mechanisms that are combined with the characteristics of the road network inspection task, resulting in limited usability.

[0007] Therefore, existing technologies generally face the following problems: in multi-vehicle task allocation and path planning for traffic network inspection, it is difficult to simultaneously consider solution efficiency and solution quality; greedy methods are prone to getting trapped in local optima and have uneven load; simple auction allocation cannot guarantee global balance and is limited by allocation-path coupling; simple evolutionary optimization, although it has global search capabilities, has high computational overhead, slow convergence, and is sensitive to initial solutions. Based on the above problems, there is an urgent need for a technical solution that can utilize a fast allocation mechanism to provide high-quality initial solutions and further combine evolutionary optimization to achieve global joint optimization, so as to improve the scheduling efficiency, balance, and economy of traffic network inspection tasks. Summary of the Invention

[0008] This application addresses the problems in traffic network inspection scenarios, such as combinatorial explosion caused by strong coupling between task allocation and path planning, the tendency of traditional greedy methods to get trapped in local optima and unbalanced load, the difficulty of balancing balance and total cost by simple auction methods, and the slow convergence and sensitivity of simple evolutionary optimization methods to the initial population. It proposes a method and device for multi-vehicle task allocation and path planning for traffic inspection, so as to obtain a high-quality feasible solution that balances balance and cost with low computational overhead.

[0009] Firstly, this application provides a multi-vehicle task allocation and path planning method for traffic inspection. The method includes: obtaining a weighted road network graph; wherein the weighted road network graph uses intersections as nodes, road segments between node pairs as edges, and the length of the road segments between node pairs as edge cost; initializing the starting node of each inspection vehicle; obtaining the initial task edge allocation sequence of the inspection vehicles using an iterative auction algorithm based on the starting nodes of the inspection vehicles, and using a vehicle separator to separate the initial task edge allocation sequences of all inspection vehicles to form an elite individual gene sequence; transforming the elite individual gene sequence to obtain an initial evolutionary population, the initial evolutionary population including the elite individual gene sequence; and using a multi-objective evolutionary algorithm to iteratively optimize and obtain the final Pareto front based on the initial evolutionary population with the maximum path cost and the total path cost of all inspection vehicles as optimization objectives. The inflection point is determined from the final Pareto front, and the equilibrium individual gene sequence is obtained by reconstructing the inflection point. The final task edge allocation sequence of the inspection vehicle is obtained based on the equilibrium individual gene sequence, and the final node path sequence of the inspection vehicle is generated based on the final task edge allocation sequence of the inspection vehicle.

[0010] Secondly, this application provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the multi-vehicle task allocation and path planning method for traffic inspection described in the first invention of this application.

[0011] The beneficial technical effects of this application are as follows: When facing large-scale traffic networks, traditional evolutionary algorithms often generate a large number of invalid or high-cost detour paths in the randomly generated initial population, causing a large amount of computing power to be wasted in the early stages of the algorithm on repairing infeasible solutions. This application provides a high-quality starting point for the iterative optimization of multi-objective evolutionary algorithms by outputting the prior elite individual gene sequence (which has already achieved local optima and satisfies the road network connectivity topology constraints) through an iterative auction mechanism. Therefore, diverse individuals are generated based on the elite individual gene sequence to obtain the initial evolutionary population. This allows the iterative optimization of multi-objective evolutionary algorithms to inherit the advantage of fast convergence of the auction mechanism and to utilize the global mutation capability of the non-dominated sorting genetic algorithm to escape local optima. Thus, a better solution is explored in a very small number of iterations while considering the trade-off between task balance and total cost, and the final Pareto front is obtained. Then, a quadratic decision-making method is used to determine the inflection point from the final Pareto front, automatically select the trade-off solution, reduce the uncertainty of manual solution selection, improve the availability of engineering implementation and the reproducibility of results, and finally restore the inflection point to obtain the final node path sequence of the inspection vehicles. This can reduce the maximum path cost and avoid a significant deterioration in the total path cost of all inspection vehicles. Attached Figure Description

[0012] Figure 1This is a flowchart illustrating a preferred embodiment of the multi-vehicle task allocation and path planning method for traffic inspection according to the present invention. Figure 2 This is a flowchart illustrating the specific implementation of a multi-vehicle task allocation and path planning method for traffic inspection in an example of the present invention. Figure 3 This is a schematic diagram of iterative auction bidding and allocation update in a preferred embodiment of the present invention; Figure 4 This is a schematic diagram of chromosome encoding and decoding in a preferred embodiment of the present invention; Figure 5 This is a schematic diagram of the Knee Point quadratic decision-making process in a preferred embodiment of the present invention. Detailed Implementation

[0013] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0014] This invention provides a multi-vehicle task allocation and route planning method for traffic inspection. The execution entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application embodiment: a server, a terminal, or a computer. In other words, the multi-vehicle task allocation and route planning method for traffic inspection can be executed by software or hardware installed on a terminal device or a server device. The software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0015] This invention provides a multi-vehicle task allocation and path planning method for traffic inspection. In a preferred embodiment, please see... Figure 1 The method includes: Step S1: Obtain the weighted road network graph; wherein, the weighted road network graph uses intersections as nodes, road segments between nodes as edges, and the length of road segments between nodes as edge cost.

[0016] In this embodiment, the traffic network is abstracted as a weighted graph, with traffic intersections in the network as nodes, and roads or highways (which can be called road segments) between two traffic intersections as edges. The length of a road segment is used as the edge weight of its corresponding edge. In this way, the weighted graph is stored in a database or memory, and the executing entity reads the weighted graph from the database or memory for subsequent processing.

[0017] For example, a weighted road network map Represented as: ,in, This represents the set of nodes in a weighted graph of a road network. Represents the edge set of a weighted graph of a road network. Represents the edge cost set, edge The edge cost is represented as .

[0018] The system simultaneously constructs the following information: Edge endpoint pair list (edges): describes the node pair corresponding to each edge (the node pair at both ends of the edge), such as edge endpoint pair list. Corresponding node pairs ; Edge weight list (edge_values): Used to describe the edge cost corresponding to each edge, such as the edge weight list. correspond ;use Represents a weighted road network map The number of nodes, Represents a weighted road network map The number of edges; The shortest path table is pre-cached, and the shortest path table includes a weighted graph of the road network. The shortest path between all pairs of nodes in the network is considered to be infinite or empty if there is no path connecting any two pairs of nodes. The weighted graph of the road network is calculated based on Dijkstra's algorithm. The minimum cost path between any pair of nodes in the table, node pair Between nodes To the node minimum cost path The process of obtaining the result is represented as follows: .

[0019] By pre-caching the shortest path table, it is easy to directly query it during subsequent processing such as iterative auction bidding, path concatenation, and fitness.

[0020] Step S2: Initialize the starting node for each inspection vehicle. The inspection vehicle is not limited to an unmanned vehicle, a drivable inspection vehicle, or an inspection robot. K represents the total number of inspection vehicles, typically 3 to 10, preferably 5. The starting node for each inspection vehicle can be manually determined based on requirements. After determining the starting node, set the current position of all inspection vehicles as the starting node identifier, such as the inspection vehicle... Current location , For inspection vehicles The starting node.

[0021] In this embodiment, preferably, step S2 includes: Single-start mode: Randomly select a node from the set of nodes in the weighted graph of the road network as the starting node for all inspection vehicles. All inspection vehicles start from the same node, represented as: in, This indicates the index of patrol vehicles. This indicates that any starting point can be selected. The single-starting-point mode randomly selects a unified starting point, which simplifies vehicle scheduling and configuration, reduces the complexity of initial deployment, and is suitable for scenarios where inspection vehicles are parked centrally and scheduled uniformly, with a fixed starting position. It is suitable for scenarios with a small road network, a concentrated inspection range, and no need to disperse the initial position.

[0022] Multi-starting point mode: K nodes are uniformly sampled from the node set of the weighted graph of the road network as the starting nodes of K inspection vehicles, where K is a positive integer. Each vehicle has its own starting point. The starting node is: Represents the set of nodes Uniform sampling is used. The multi-starting point mode is suitable for vehicles deployed in a dispersed manner, without unified parking points, with a large road network and a wide inspection area, where it is necessary to reduce initial path conflicts.

[0023] This implementation provides two initialization modes: single-start point and multi-start point, to adapt to different deployment scenarios of traffic inspection and improve the applicability of the solution.

[0024] Step S3: Based on the starting node of the inspection vehicle, the initial task edge allocation sequence of the inspection vehicle is obtained by using an iterative auction algorithm. The initial task edge allocation sequences of all inspection vehicles are separated by a vehicle separator to form the elite individual gene sequence.

[0025] In this embodiment, according to the requirements of the multi-objective evolutionary algorithm for individuals in the population in subsequent steps, elite individual gene sequences are constructed. These elite individual gene sequences, like those of other individuals in the population, can also be called chromosomes and are of a certain length. Gene sequences, such as Figure 4 As shown, non-negative integers represent task edge numbers (a permutation covering all edges); negative integers represent vehicle separators. The separator is .

[0026] like Figure 4 As shown, chromosomes support two encoding formats and are automatically identified during decoding: Format 1 (marker-first): The first gene is the delimiter, and the edges after a certain delimiter until the next delimiter are assigned to the vehicle corresponding to that delimiter; Format 2 (shuffle): The first gene is the edge, and the vehicle edge sequence is restored by segmenting according to the original delimiter and splicing the head and tail.

[0027] like Figure 4 As shown, chromosomes are represented by gene sequences using task edge numbers + vehicle separators. The code is compatible with both marker-first and shuffle encoding formats, and the task edge sequences of each vehicle are reconstructed according to the separator rules during the decoding stage. Elite individual gene sequences use format 1: for each vehicle... Write the delimiters in order. Then, write the edge sequence `auction_edges[k]` assigned to the vehicle in the auction. This elite individual is not shuffled to ensure it can be restored to the original auction scheme.

[0028] In step S3, the initial task edge allocation sequence of all inspection vehicles is separated by vehicle separators to form the elite individual gene sequence.

[0029] like Figure 3 As shown, the processing of the iterative auction algorithm is essentially a cyclic bidding process for the set of unassigned edges. Preferably, each auction process includes: Step S31, set of unassigned edges Select one edge to be assigned from the given edge.

[0030] In this embodiment, the set of unassigned edges The edges in the image represent task edges. To achieve comprehensive coverage of the transportation network, the set of unassigned edges is determined before the iterative auction algorithm is executed. Actually an edge set Maintain it as follows: .

[0031] Edges to be allocated can be selected according to their index order. Let's assume that the edges to be allocated were selected in this auction process. , Edges to be assigned The nodes at both ends.

[0032] Step S32: Construct the inspection vehicle's bid for the edge to be assigned based on the current location node of the inspection vehicle and the edge cost of the edge to be assigned. The bid can be calculated according to a pre-defined bidding function. Generally, the sum of the cost of the inspection vehicle's current location node to reach the edge to be assigned and the edge cost of the edge to be assigned can be used as the bid. It should be noted that if there is no passable road segment or path between the current location node of the inspection vehicle and the edge to be assigned in the weighted road network graph, then the inspection vehicle will not participate in the bidding, or its bid will be set to infinity.

[0033] Step S33: Assign the edge to be assigned to the inspection vehicle with the lowest bid, and update the current position node of the inspection vehicle with the lowest bid.

[0034] Step S34: Remove the unallocated edges from the unallocated edge set and proceed to the next auction until the unallocated edge set is empty. .

[0035] Through continuous iterative auctions, when At that time, each inspection vehicle (e.g., inspection vehicle k) corresponds to an initial task edge allocation sequence. It includes the road sections that need to be inspected during the inspection process, and also includes the inspection vehicles. Node path sequence .

[0036] The above technical solution adopts a round-by-round single-edge auction allocation method, processing only one edge to be allocated each time, simplifying the allocation logic and reducing computational overhead; it constructs a bidding process based on the current location node of the inspection vehicle and the cost of the edge to be allocated, ensuring that the bidding result closely matches the actual traffic cost of the road network and guaranteeing the rationality of the allocation; it assigns the edge to be allocated to the vehicle with the lowest bid, prioritizing the allocation scheme with the lowest cost of the new path, effectively controlling the vehicle's path cost; it updates the current location node of the winning vehicle in real time, ensuring that subsequent bidding calculations are based on the latest vehicle status, improving the accuracy of the allocation; and it removes allocated edges one by one until the set of unallocated edges is empty, ensuring that all inspection edges are completely allocated without omission or duplication.

[0037] In a preferred embodiment, the inspection vehicle k is to be assigned an edge. The bidding includes a base cost, which is the cost of vehicle k reaching the edge to be assigned. The cost of the minimum cost path and the edge to be assigned The sum of edge costs ensures that the bidding accurately reflects the actual new path cost for vehicles to perform the task, guarantees that the bidding calculation closely matches the real traffic costs of the road network, and avoids invalid detours and excessive cost allocation based on the shortest path calculation. This makes the task allocation results more in line with the actual inspection path requirements, and improves the feasibility and economy of the allocation scheme.

[0038] Inspection vehicle K arrives at the assigned edge The cost of the minimum cost path is obtained by querying the current location node of the inspection vehicle from the pre-stored shortest path table. With the edge to be assigned The two nodes at both ends Minimum cost path and its cost and ,from and Select the smallest value as the inspection vehicle k to reach the edge to be assigned. The minimum cost path is represented. The specific process is as follows: Inspection vehicles k arrived at the assigned edge respectively Two nodes The cost of the minimum path: Therefore, vehicle k arrives at the edge to be assigned. Basic cost for: like and If neither side is reachable (i.e., Dijkstra's cache is -1), then the vehicle will not bid on that side. If the vehicle Reach the edge Basic cost for Then the vehicle First to the edge nodes Execute the edge again Finally, reach the edge nodes Conversely, the first to arrive Then .

[0039] In the above preferred embodiment, and more preferably, vehicle k is the edge to be assigned. bidding It also includes penalties for vehicle k. , For vehicle k to reach the edge to be assigned The basic cost; ; in, This indicates the number of task edges assigned to vehicle k; This represents the load penalty factor, which can be set to 0.25 based on experience. This represents the scaling factor. Preferably, the average edge weight is calculated as the scaling factor: .

[0040] In the above implementation, the addition of a penalty term consisting of the number of tasks already assigned to the inspection vehicle, a penalty coefficient, and a scaling factor during the bidding process can create bidding constraints on inspection vehicles with high loads, preventing excessive concentration of tasks on a few vehicles. By using a load penalty term to guide task allocation to inspection vehicles with lower loads, the balance of task allocation among multiple vehicles is improved, and the cost of the longest inspection path is reduced. The use of a fixed, configurable penalty coefficient and a standardized scaling factor ensures stable and controllable penalty calculation, facilitating adaptation to different road networks and inspection scale scenarios.

[0041] Step S4: Transform the gene sequences of elite individuals to obtain the initial evolutionary population, which includes the gene sequences of elite individuals.

[0042] Preferably, the initial evolutionary population comprises N individual gene sequences. In step S4, the gene sequences of elite individuals are transformed to obtain the initial evolutionary population, including: Step S41: Obtain N-1 individual gene sequences by replicating the elite individual gene sequences; Step S42: Perform in-vehicle task edge sequential shuffling on each of the N-1 individual gene sequences with a first probability; the position of the vehicle separator does not change during in-vehicle task edge sequential shuffling, and the task edge allocation sequence corresponding to each inspection vehicle is shuffled (i.e. randomly shuffled) with a first probability, and the first probability is not limited to 50%.

[0043] Step S43: After completing step S42, a global random shuffle is performed on each of the N-1 individual gene sequences with a second probability; where N is a positive integer greater than 1. The global random shuffle is a global shuffle of individual gene sequences, and the vehicle separators are also shuffled. This results in a partial inheritance auction allocation and also allows for cross-vehicle exchanges to jointly form a diverse initial evolutionary population.

[0044] Step S44: The gene sequences of elite individuals and N-1 individual gene sequences form the initial evolutionary population.

[0045] The aforementioned initial population generation scheme generates an initial population by replicating the gene sequences of elite individuals and shuffling them step by step. This preserves the high-quality allocation structure of the auction solution. It sets a first probability to perform in-vehicle edge sequence shuffling, increasing local search diversity without changing the vehicle's task assignment. It sets a second probability to perform global shuffling, allowing tasks to be redistributed among vehicles and expanding the global search space. The resulting initial population inherits the feasibility and excellent performance of the auction scheme and has sufficient diversity, which can accelerate the convergence speed of the evolutionary algorithm and avoid getting trapped in local optima.

[0046] At this point, the process of decoding chromosomes (individual gene sequences in the population) to form the vehicle task edge allocation sequence is as follows: Identify all vehicle separator positions from the chromosome's gene sequence (genes). If it's format 1: directly determine the vehicle ID from the vehicle separator value and take its subsequent segment as its task edge allocation sequence; if it's format 2: segment according to the natural order of the vehicle separators, and concatenate the first segment (head segment) and the last segment (tail segment) to the vehicle corresponding to the last vehicle separator, such as... Figure 4 In format 2, the sequence formed by e2, e1, and e5 is used as the task edge allocation sequence for vehicle 3. For the rest in format 2, the task edge allocation sequence is still based on the segment following the vehicle separator.

[0047] Step S5: Based on the initial population of the evolutionary process, with the optimization objectives of the maximum path cost and the total path cost of all inspection vehicles, a multi-objective evolutionary algorithm is used to iteratively optimize and obtain the final Pareto front.

[0048] In this embodiment, the maximum path cost refers to the maximum path cost of all individual gene sequences in the population. It is the cost of the path with the highest cost among all paths generated by all inspection vehicles based on the task edge allocation sequence in that individual's gene sequence, and can be used as objective function 1: in, Indicates patrol vehicle The cost of a path generated by a task edge allocation sequence in an individual gene sequence is the cost of the shortest path from the starting node of the vehicle to the first task edge in the task edge allocation sequence, the edge cost of all task edges in the task edge allocation sequence, and the sum of the costs of the shortest path between any two task edges in the task edge allocation sequence.

[0049] In this implementation, the total path cost of all inspection vehicles refers to the sum of the path costs generated by the task edge allocation sequences of all vehicles in each individual gene sequence, which serves as objective function 2: .

[0050] Step A1: Starting from the starting node of the inspection vehicle, initialize the positive integer i to 1; Step A2: Obtain the minimum cost path between the starting point and the two nodes of the i-th task edge in the task edge allocation sequence; Step A3: Select the minimum cost path with the lowest cost as the connection path for the i-th task edge, and use the node of the i-th task edge on the connection path as both the connection node and the new starting point. Step A4: If all task edges in the task edge allocation sequence have obtained connection paths and connection nodes, then execute step A5; otherwise, let i = i + 1 and return to execute steps A2 and A3. Step A5: Sequentially connect the starting node, the connection paths and connection nodes of all task edges in the task edge allocation sequence, and the endpoint node of the last task edge in the task edge allocation sequence to form the path of each inspection vehicle. All nodes on the path form a node path sequence.

[0051] Step S6: Determine the inflection point from the final Pareto front and restore the inflection point to obtain the equilibrium individual gene sequence.

[0052] In this embodiment, the Pareto front includes multiple target points, each corresponding to an individual gene sequence. The optimization objective for each target point is the maximum path cost of the individual gene sequence and the total path cost of all inspection vehicles. Step S6 involves determining the inflection point from the final Pareto front, including: Step S61: Sort all target points in the final Pareto front in descending order of maximum path cost to form a target point sequence, and select the two endpoints of the target point sequence; Step S62: Connect the two endpoints to form a straight line in the two-dimensional space composed of the two optimization objectives, and calculate the distance from all objective points in the final Pareto front to the straight line; Step S63: The target point with the greatest distance to the straight line is taken as the inflection point.

[0053] In this embodiment, when NSGA-II is used to obtain the final set of target points on the Pareto front: ; This indicates the number of target points in the target point set. This represents the target point index. The values ​​of the two targets are normalized using their lengths to obtain normalized values ​​for both targets: , Side cost and .

[0054] By default, Knee Point is used to output a unique execution solution.

[0055] First, perform Min-Max normalization: right Each objective function in the equation is normalized using the Min-Max method in the two-dimensional objective space: Among them Similarly.

[0056] Sort the normalized points according to the first objective, take the line connecting the two endpoints, calculate the perpendicular distance from each point to the line, and select the point with the largest distance as the inflection point: If the endpoint is , ,point The straight-line distance is: The individual corresponding to the point with the largest D is taken as the final representative solution. .

[0057] like Figure 5 As shown, the endpoints of the final generation Pareto front are connected in the normalized target space, and the perpendicular distance from each point to the connection is calculated. The point with the largest perpendicular distance is taken as the compromise solution corresponding to the Knee Point and output as the unique execution solution, that is, the balanced individual gene sequence.

[0058] Restore the true metrics and output the path. Since the target is stored as a normalized target, the output true metrics can be restored proportionally. Will The final task edge allocation sequence car_edges of the inspection vehicle is obtained by decoding, and the final node path sequence car_routes is obtained as the final inspection scheme output.

[0059] Step S7: Obtain the final task edge allocation sequence of the inspection vehicle based on the balanced individual gene sequence, and generate the final node path sequence of the inspection vehicle based on the final task edge allocation sequence of the inspection vehicle.

[0060] In a preferred embodiment, in step S5, iterative evolution is performed until the evolution stopping condition is met, and each iterative evolution executes: Step S51: Perform crossover and mutation processing on the parent population of this iteration to generate the offspring population of this iteration. The parent population includes N individual gene sequences, and the offspring population includes more than one offspring individual gene sequence.

[0061] In this embodiment, the evolutionary operation parameters are: crossover probability PCROSS=0.99, mutation probability PMUT=0.2, and NSGA-II maximum generation NSGA_MAXGEN=200.

[0062] The Order Crossover (OX) processing procedure is as follows: For parent individuals : Separate the edge sequence (remove the delimiter), and perform OX: random selection of intervals on the edge sequence. ,copy From the middle section to the offspring, the remaining positions are sorted by The relative order of filling did not result in any edges; The separator positions are filled back into the offspring according to the parent separator positions, thus maintaining the constraint that chromosome length and separator number meet the requirement. Crossover generates offspring individuals child1 and child2.

[0063] The mutation handling process is as follows: Three types of mutations are triggered in offspring with probability: Invert_mutation: Randomly selects two points at non-separator positions and reverses the interval edge sequence; Slide mutation: Selects an edge interval and inserts it by moving it left or right.

[0064] After mutation, the individual's fitness / objectives are set to an unevaluated state for subsequent recalculation.

[0065] The load balancing mutation (balance_mutation) selects an edge from a heavily loaded edge interval and inserts it into a lightly loaded edge interval. The mutation succeeds if and only if the load is more balanced.

[0066] Step S52: Use the parent and offspring populations from this iteration to form the population for this iteration.

[0067] Step S53: Using an edge direction adaptive strategy, based on the task edge allocation sequence of each inspection vehicle in the individual gene sequence of the population in this iteration, generate the node path sequence of the inspection vehicle in the individual gene sequence.

[0068] Preferably, step S53 includes: Step A1: Starting from the starting node of the inspection vehicle, initialize the positive integer i to 1; Step A2: Obtain the minimum cost path between the starting point and the two nodes of the i-th task edge in the task edge allocation sequence; Step A3: Select the minimum cost path with the lowest cost as the connection path for the i-th task edge, and use the node of the i-th task edge on the connection path as both the connection node and the new starting point. Step A4: If all task edges in the task edge allocation sequence have obtained connection paths and connection nodes, then execute step A5; otherwise, let i = i + 1 and return to execute steps A2 and A3. Step A5: Sequentially connect the starting node, the connection paths and connection nodes of all task edges in the task edge allocation sequence, and the endpoint node (i.e., the node that is not a connection node) of the last task edge in the task edge allocation sequence to form the path of each inspection vehicle. All nodes on the path form a node path sequence.

[0069] For example, the edge direction adaptive strategy process is as follows: For inspection vehicles The first task , For the task edge The two end nodes.

[0070] If it is a single-start mode, the starting point is... Comparison of costs and Choose the closer endpoint as the starting point (connection node) of the first task edge, and start the path node sequence from... Connect the node to the starting point of the edge; If it is a multi-start mode, the direction is selected from the edge endpoints according to the subsequent rules.

[0071] For subsequent side tasks The endpoint of the previous edge is prev_end: If prev_end equals Then the direction is swapped so that the current edge from ; If prev_end equals Then the direction is swapped so that the current edge from ; If prev_end is not equal to It is not equal to ,Compare and Choose the endpoint with the lower cost as the starting point of the current edge (swap directions if necessary); If prev_end is inconsistent with the current edge starting point, then the path node sequence from prev_end to the starting point is inserted to complete the concatenation. This yields the vehicle node path sequence car_routes[k].

[0072] Step S54: Based on the individual gene sequence in the population of this iteration, obtain the node path sequence of all inspection vehicles, and obtain two optimization objective values ​​for the individual gene sequence. The two optimization objective values ​​include the maximum path cost and the total path cost of all inspection vehicles.

[0073] Step S55: Using the Non-Dominated Ranking II (NSGAII) and Crowding Selection strategy, the two optimization objective values ​​corresponding to the individual gene sequences in the population of this iteration are stratified and screened to obtain the Pareto front of this iteration. In this embodiment, the NSGAII and Crowding Selection strategy is more stable in the multi-objective solution space and closer to the Pareto front. It has a greater advantage in the trade-off between equilibrium and cost, and is selected when a more balanced solution is required. The specific steps are as follows: After calculating the objectives for offspring individuals, the parent and offspring populations are merged. A non-dominated sort is performed on the merged population to obtain multiple layers of non-dominated fronts. The crowding degree of individuals in each front is calculated. Individuals are then added to the next generation population in descending order of front level. If the number of individuals in the last front exceeds the population size limit, truncation is performed based on the crowding degree, from highest to lowest, to form the next generation of evolutionary population. Simultaneously, the Pareto front target point set `pareto_fronts` corresponding to each generation iteration is recorded.

[0074] Step S55: Obtain the parent population for the next iteration based on the Pareto front of this iteration.

[0075] In this embodiment, the evolution stopping condition is not limited to the number of iterations reaching a preset maximum number, or the number of generations of the individual reaching a maximum number of generations.

[0076] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method for multi-vehicle task allocation and path planning for traffic inspection.

[0077] The present invention also discloses a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the multi-vehicle task allocation and path planning method for traffic inspection provided by the present invention. The computer program product should be understood as a software product that mainly implements its solution through a computer program, such as a program product integrated in the cloud or a software library.

[0078] Compared with the prior art, the present invention has the following beneficial effects: 1) When traditional evolutionary algorithms face large-scale traffic networks, the randomly generated initial population often contains a large number of invalid or high-cost detour paths, causing the algorithm to waste a lot of computational resources in the early stages of patching infeasible solutions. This invention provides a high-quality starting point for the evolutionary algorithm by outputting prior elite individuals (which already possess local optima and satisfy the network connectivity topology constraints) through an iterative auction mechanism. Based on this, a suitable random shuffling strategy is introduced to generate diverse individuals, allowing the algorithm to inherit the advantage of rapid convergence from the auction mechanism while leveraging the global mutation capability of evolutionary algorithms to escape local optima. This enables the algorithm to explore a better solution within a very small number of iterations, while simultaneously considering the trade-off between task balance and total cost.

[0079] 2) Introduce a load penalty coefficient into the bidding process. This enhances the ability to regulate vehicle load balancing, enabling controllable adjustment of the degree of vehicle load balancing. It guides the proactive suppression of task concentration on a few vehicles during the allocation phase, which helps reduce the longest path index. Improve the efficiency of multi-vehicle collaborative inspection; 3) Through the evolutionary optimization stage, a global search for solutions is conducted. The task sequence structure is reorganized among different feasible solutions using the crossover operator, and the task order and vehicle allocation are perturbed and explored using the mutation operator. By retaining superior individuals and eliminating inferior solutions through selection strategies, it is possible to escape the local optima caused by greedy algorithms or single-auction allocation, thereby further reducing the total cost index. And improve its correlation with the longest path metric. A comprehensive balance.

[0080] 4) Through the non-dominated ranking and crowding selection strategy preservation mechanism of multi-objective evolutionary optimization (NSGA-II), the output of a Pareto solution set covering different preferences is achieved in the same solution process, enabling the system to maintain equilibrium. ) and economy ( It provides multiple alternatives between different objectives; compared with single-objective optimization which only provides a single solution, it can provide greater adaptability for decision-making under different inspection strategies or different constraints.

[0081] 5) After obtaining the Pareto solution set, the Knee Point quadratic decision is used to automatically select a compromise solution, reducing the uncertainty of manual solution selection and improving the usability and reproducibility of the results in engineering implementation; at the same time, the Knee Point selection tends to achieve a better compromise at the inflection point of the Pareto curve, so that the final solution can reduce the longest path while avoiding a significant deterioration in total cost.

[0082] 6) The Dijkstra shortest path cache table is used for fast lookup in cost evaluation, and CHC elite retention and auction-guided initialization are used to reduce invalid search generations during evolution. Therefore, it can still maintain good computational efficiency and deployability when the road network size increases or the number of task edges increases.

[0083] 7) Achieving a strong coupling mechanism between the allocation algorithm and the evolutionary algorithm: Existing technologies (such as multi-agent task allocation) often only process task allocation and path planning sequentially, or rely on complex reinforcement learning evaluation in between. This invention directly injects feasible paths of the road network generated by iterative auction as prior elite chromosomes into the evolutionary population. Through a strong coupling architecture guided by heuristic auction and based on multi-objective evolution for depth search, it fundamentally solves the engineering pain points of traditional evolutionary algorithms, such as the explosion of large-scale road network combinations and the extremely slow convergence caused by the randomness of the initial population.

[0084] 8) A fully automated decision-making closed loop, completely free from human intervention, has been constructed: Multi-objective optimization often faces bottlenecks due to the large size of the output solution set, requiring expert experience or human intervention for final selection, making it difficult to meet the real-time scheduling needs of intelligent transportation. This invention introduces the maximum vertical distance method to automatically lock the Knee Point in the normalized target space, and achieves automatic output of a unique execution scheme through pure mathematical analytical geometry, significantly improving the system's automation level and engineering implementation capability.

[0085] In the description of this specification, the references to terms such as "an embodiment," "some embodiments," "example," "specific example," "a implementation," "a preferred implementation," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0086] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A multi-vehicle task allocation and path planning method for traffic inspection, characterized in that, The method includes: Obtain the weighted graph of the road network; where the weighted graph of the road network uses intersections as nodes, road segments between nodes as edges, and the length of road segments between nodes as edge cost; Initialize the starting node for each inspection vehicle; Based on the starting node of the inspection vehicle, an iterative auction algorithm is used to obtain the initial task edge allocation sequence of the inspection vehicle. The initial task edge allocation sequences of all inspection vehicles are separated by vehicle separators to form the elite individual gene sequence. The initial population of evolution is obtained by transforming the gene sequences of elite individuals, and the initial population of evolution includes the gene sequences of elite individuals. Based on the initial population of the evolutionary process, with the optimization objectives being the maximum path cost and the total path cost of all inspection vehicles, a multi-objective evolutionary algorithm is used to iteratively optimize and obtain the final Pareto front. The inflection point is determined from the final Pareto front, and the inflection point is reconstructed to obtain the equilibrium individual gene sequence; The final task edge allocation sequence of the inspection vehicle is obtained based on the balanced individual gene sequence, and the final node path sequence of the inspection vehicle is generated based on the final task edge allocation sequence of the inspection vehicle.

2. The multi-vehicle task allocation and path planning method for traffic inspection according to claim 1, characterized in that, The initialization of the starting node for each inspection vehicle includes: A node is randomly selected from the node set of the weighted road network graph as the starting node for all inspection vehicles. Alternatively, K nodes can be uniformly sampled from the node set of the weighted graph of the road network as the starting nodes for K inspection vehicles, where K is a positive integer.

3. The multi-vehicle task allocation and path planning method for traffic inspection according to claim 1, characterized in that, In the step of obtaining the initial task edge allocation sequence for the inspection vehicle based on the starting node of the inspection vehicle using an iterative auction algorithm, each auction process includes: Select one edge to be assigned from the set of unassigned edges; Construct the bidding process for the inspection vehicle's edge to be assigned based on the current location node of the inspection vehicle and the edge cost of the edge to be assigned. Assign the edge to be assigned to the inspection vehicle with the lowest bid, and update the current position node of the inspection vehicle with the lowest bid. Remove unassigned edges from the set of unassigned edges and proceed to the next auction until the set of unassigned edges is empty.

4. The multi-vehicle task allocation and path planning method for traffic inspection according to claim 3, characterized in that, Vehicle k to be assigned edge The bidding includes a base cost, which is the cost of vehicle k reaching the edge to be assigned. The cost of the minimum cost path and the edge to be assigned The sum of the costs of the edges.

5. The multi-vehicle task allocation and path planning method for traffic inspection according to claim 4, characterized in that, Vehicle k to be assigned edge The bidding also includes a penalty for vehicle k. : ; in, This indicates the number of task edges assigned to vehicle k; Indicates the load penalty coefficient. This represents the scaling factor.

6. The multi-vehicle task allocation and path planning method for traffic inspection according to any one of claims 1-5, characterized in that, The initial evolutionary population comprises N individual gene sequences. The process of transforming the gene sequences of elite individuals to obtain the initial evolutionary population includes: N-1 individual gene sequences are obtained by replicating the gene sequences of elite individuals; For each of the N-1 individual gene sequences, perform sequential shuffling of the in-vehicle task with the first probability; A global random shuffle is performed on each of the N-1 individual gene sequences with a second probability; where N is a positive integer greater than 1. The gene sequences of elite individuals and the gene sequences of N-1 individuals constitute the initial population for evolution.

7. The multi-vehicle task allocation and path planning method for traffic inspection according to any one of claims 1-5, characterized in that, The optimization of the initial population based on the maximum path cost and the total path cost of all inspection vehicles is based on a multi-objective evolutionary algorithm to obtain the final Pareto front. In this step, iterative evolution is performed until the evolutionary stopping condition is met. Each iteration of evolution executes the following steps: The parent population of this iteration is cross-processed and mutated to generate the offspring population of this iteration. The parent population includes N individual gene sequences, and the offspring population includes more than one offspring individual gene sequence. The parent and offspring populations from this iteration are used to form the population for this iteration. An edge direction adaptive strategy is adopted to generate the node path sequence of each inspection vehicle in the individual gene sequence based on the task edge allocation sequence of each inspection vehicle in the individual gene sequence of the population in this iteration. Based on the individual gene sequences in this iterative evolution population, the node path sequences of all inspection vehicles are obtained, and two optimization objective values ​​for the individual gene sequence are obtained. The two optimization objective values ​​include the maximum path cost and the total path cost of all inspection vehicles. Using a non-dominated sorting and crowding selection strategy, the two optimization objective values ​​corresponding to the individual gene sequences in the population of this iteration are stratified and screened to obtain the Pareto front of this iteration. The Pareto front from this iteration is used to obtain the parent population for the next iteration.

8. The multi-vehicle task allocation and path planning method for traffic inspection according to claim 7, characterized in that, The step of generating the node path sequence of an inspection vehicle in an individual gene sequence based on the task edge allocation sequence of each inspection vehicle in the individual gene sequence of the current iterative evolution population using the edge direction adaptive strategy includes: Step A1: Starting from the starting node of the inspection vehicle, initialize the positive integer i to 1; Step A2: Obtain the minimum cost path between the starting point and the two nodes of the i-th task edge in the task edge allocation sequence; Step A3: Select the minimum cost path with the lowest cost as the connection path for the i-th task edge, and use the node of the i-th task edge on the connection path as both the connection node and the new starting point. Step A4: If all task edges in the task edge allocation sequence have obtained connection paths and connection nodes, then execute step A5; otherwise, let i = i + 1 and return to execute steps A2 and A3. Step A5: Sequentially connect the starting node, the connection paths and connection nodes of all task edges in the task edge allocation sequence, and the endpoint node of the last task edge in the task edge allocation sequence to form the path of each inspection vehicle. All nodes on the path form a node path sequence.

9. The multi-vehicle task allocation and path planning method for traffic inspection according to any one of claims 1-5, characterized in that, The Pareto front includes multiple target points, each corresponding to an individual gene sequence. The optimization objective for each target point is the maximum path cost of the individual gene sequence and the total path cost of all inspection vehicles. The determination of the inflection point from the final Pareto front includes: Sort all target points in the final Pareto front in descending order of maximum path cost to form a target point sequence, and select the two endpoints of the target point sequence. In a two-dimensional space composed of two optimization objectives, connect the two endpoints to form a straight line, and calculate the distance from the straight line to all objective points in the final Pareto front; The target point that is the furthest from the straight line is taken as the inflection point.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-9.