Workshop Inspection Task Allocation Method, Control System and Medium Based on Ant Colony Algorithm

Automatically plan the workshop inspection path through the ant colony algorithm, the problem of inefficient manual assignment tasks is solved, and efficient inspection of collaborative operations of multiple robots is achieved, reducing detours and repetitions, and improving overall inspection efficiency and accuracy.

CN119990498BActive Publication Date: 2025-08-05SHENZHEN LAIYISHI AUTOMATION SYST INTEGRATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510466936.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-05
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

In the prior art, manual distribution of workshop inspection tasks is inefficient, resulting in detours and repeated inspections of inspection robots, increasing time and energy consumption, making it difficult to achieve efficient coordinated operation of multiple inspection robots in complex workshop environments.

Method used

The workshop inspection task allocation method based on the ant colony algorithm is adopted, and the patrol paths of multiple inspection robots are automatically planned through the ant colony algorithm modeling and pheromone mechanism to avoid detours and repetitions, and to improve task allocation efficiency.

Benefits of technology

It realizes efficient and coordinated operation of multiple inspection robots in the workshop, reduces inspection time and energy consumption, and improves the accuracy and automation of inspection efficiency and task allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990498B_ABST
    Figure CN119990498B_ABST
Patent Text Reader

Abstract

This application relates to the technology of biological models, and discloses a method, a control system and a medium for allocating workshop patrol tasks based on the ant colony algorithm, including: modeling the ant colony algorithm based on the workshop map; initializing the ant colony algorithm and setting relevant algorithm parameters; starting to construct paths based on the ant colony algorithm: evaluating the path quality according to the estimated patrol duration of each path; after all ants complete path construction, volatilize and update the pheromone concentration of all edges according to the pheromone evaporation coefficient; and enhancing the pheromone of the edges on the path according to the path quality; adding the volatilized pheromone concentration and the enhanced pheromone concentration to obtain the new pheromone concentration; after the iteration of the ant colony algorithm ends, plan the patrol paths for each patrol robot according to the latest pheromone concentration. This application also discloses a control device. The purpose of this application is to improve the efficiency of allocating workshop patrol tasks for multiple patrol robots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of biological models, and particularly to a method for allocating workshop patrol tasks based on the ant colony algorithm, a control device, a control system, and a computer-readable storage medium. Background Art

[0002] In the workshop production environment of modern industry, ensuring the stable operation of equipment, promptly detecting and handling potential faults is of great significance for maintaining efficient production and safe production. To achieve this goal, using patrol robots to conduct regular patrols in the workshop has become a common practice.

[0003] Currently, the allocation of workshop patrol tasks for patrol robots mostly relies on manual operations. Due to the increasing scale of the workshop and the complex distribution of equipment, more patrol robots need to be introduced for patrols. At this time, it is difficult to comprehensively and accurately consider the complex layout in the workshop and the traffic conditions between regions only by manual planning, so as to quickly calculate the optimal patrol path.

[0004] Therefore, when manually allocating workshop patrol tasks for multiple patrol robots, not only is the efficiency low, but it is also easy to cause a large number of detours and repeated passing through the same area during the task execution of the patrol robots, resulting in a significant increase in patrol time, more energy consumption, and a reduction in the overall efficiency of the patrol.

[0005] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main purpose of this application is to provide a method for allocating workshop patrol tasks based on the ant colony algorithm, a control device, a control system, and a computer-readable storage medium, aiming to improve the efficiency of allocating workshop patrol tasks for multiple patrol robots.

[0007] To achieve the above purpose, this application provides a method for allocating workshop patrol tasks based on the ant colony algorithm, including the following steps:

[0008] Obtain the workshop map;

[0009] Based on the workshop map, perform modeling of the ant colony algorithm to abstractly obtain a graph G=(V, E); where V is the set of nodes, representing the key nodes in the workshop; E is the set of edges, representing the passable paths between nodes, and each edge is marked with corresponding distance information; and, initialize the pheromone concentration for each edge in the set E;

[0010] Initialize the ant colony algorithm, set the relevant parameters of the algorithm, and input the charging positions and performance parameters of the patrol robots in the workshop; where, set the number of ants m in the ant colony algorithm to be greater than the number of patrol robots n;

[0011] Place n ants at different charging locations and randomly place the remaining ants at different key nodes. Then, a path is constructed based on the ant colony algorithm. Each ant selects the next node to visit based on pheromone concentration and heuristic information, and assigns the visited nodes to different inspection robots during the path construction process.

[0012] Evaluate path quality based on the estimated inspection time of each path;

[0013] After all ants have completed the path construction, the pheromone concentration of all edges is updated according to the pheromone volatility coefficient; and the pheromone enhancement is performed on the edges on the path according to the path quality;

[0014] The volatilized pheromone concentration and the enhanced pheromone concentration are added together to obtain the new pheromone concentration;

[0015] After the ant colony algorithm iteration is completed, the inspection path is planned for each inspection robot according to the latest pheromone concentration; among them, the total task node set of all inspection paths covers the set V.

[0016] To achieve the above objectives, the present application further provides a control device, comprising:

[0017] Acquisition module, used to obtain workshop map;

[0018] The modeling module is used to model the ant colony algorithm based on the workshop map, abstracting the graph G = (V, E); where V is a set of nodes, representing key nodes in the workshop; E is a set of edges, representing the traversable paths between nodes, and each edge is marked with corresponding distance information; and the pheromone concentration is initialized for each edge in the set E;

[0019] The setting module is used to initialize the ant colony algorithm, set algorithm-related parameters, and enter the charging position and performance parameters of the inspection robot in the workshop; wherein, the number of ants m in the ant colony algorithm is set to be greater than the number of inspection robots n;

[0020] The training module places n ants at different charging locations and randomly places the remaining ants at different key nodes. The ant colony algorithm then begins to build a path. Each ant selects the next node to visit based on pheromone concentration and heuristic information, and assigns the visited nodes to different patrol robots during the path construction process.

[0021] Evaluation module, used to evaluate the path quality based on the estimated inspection time of each path;

[0022] A gain module, which is used to, after all ants complete path construction, update the pheromone concentration of all edges according to the pheromone evaporation coefficient; and enhance the pheromone of the edges on the path according to the path quality.

[0023] An update module, which is used to add the evaporated pheromone concentration and the enhanced pheromone concentration to obtain a new pheromone concentration.

[0024] A planning module, which is used to, after the iteration of the ant colony algorithm ends, plan inspection paths for each inspection robot according to the latest pheromone concentration; among them, the total task node set of all inspection paths covers the set V.

[0025] To achieve the above object, the present application also provides a control system, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the above-mentioned workshop inspection task allocation method based on the ant colony algorithm.

[0026] To achieve the above object, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the above-mentioned workshop inspection task allocation method based on the ant colony algorithm.

[0027] The workshop inspection task allocation method, control device, control system, and computer-readable storage medium provided by the present application are based on the ant colony algorithm and can calculate a better solution among many possible paths. The workshop inspection tasks can be automatically assigned to multiple inspection robots for collaborative operation, which not only improves the efficiency of workshop inspection task allocation, but also the planned high-quality paths can avoid detours and repeated inspections, greatly reducing the inspection time and energy consumption, and improving the overall inspection efficiency. The entire process of workshop inspection task allocation has a high degree of automation, improving the accuracy and reliability of task allocation, and achieving reasonable task allocation while realizing multi-robot collaborative operation. Description of the Drawings

[0028] Figure 1 It is a schematic diagram of the steps of the workshop inspection task allocation method based on the ant colony algorithm in an embodiment of the present application;

[0029] Figure 2 It is a schematic diagram of the control device in an embodiment of the present application;

[0030] Figure 3 It is a schematic diagram of the internal architecture of the control system in an embodiment of the present application.

[0031] The realization, functional features, and advantages of the object of the present application will be further described with reference to the embodiments and the drawings. Detailed implementation manners

[0032] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where 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 by referring to the accompanying drawings are exemplary and intended to explain the present application, and should not be construed as a limitation to the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by the present application.

[0033] In addition, if the description in the present application involves "first", "second", etc., it is only for descriptive purposes (such as for distinguishing the same or similar features), and should not be construed as indicating or implying its relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between various embodiments may be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0034] Referring to Figure 1 , in one embodiment, the method for allocating workshop patrol tasks based on the ant colony algorithm includes:

[0035] Step S10: Obtain the workshop map;

[0036] Step S20: Based on the workshop map, perform modeling of the ant colony algorithm to abstractly obtain a graph G=(V, E); where V is the set of nodes, representing the key nodes in the workshop; E is the set of edges, representing the passable paths between the nodes, and each edge is marked with corresponding distance information; and, initialize the pheromone concentration for each edge in the set E;

[0037] Step S30: Initialize the ant colony algorithm, set the relevant parameters of the algorithm, and input the charging positions and performance parameters of the patrol robots in the workshop; where the number of ants m set for the ant colony algorithm is greater than the number of patrol robots n;

[0038] Step S40: Place n ants at different charging positions and place the remaining ants randomly at different key nodes, and start constructing paths based on the ant colony algorithm: where each ant selects the next node to visit according to the pheromone concentration and heuristic information, and during the process of constructing the path, assign the visited nodes to different patrol robots;

[0039] Step S50: Evaluate the quality of the paths according to the estimated patrol duration of each path;

[0040] Step S60: After all ants have completed path construction, update the pheromone concentration of all edges according to the pheromone evaporation coefficient; and enhance the pheromone on the edges according to the path quality.

[0041] Step S70: Add the evaporated pheromone concentration and the enhanced pheromone concentration to obtain the new pheromone concentration.

[0042] Step S80: After the iteration of the ant colony algorithm ends, plan the inspection paths for each inspection robot according to the latest pheromone concentration; among them, the total task node set of all inspection paths covers the set V.

[0043] In this embodiment, the execution terminal of the embodiment can be a control system for controlling the inspection robot, or other devices or apparatuses (such as a control device) for controlling the inspection robot.

[0044] As described in step S10, the workshop map is the basic information source for the entire task allocation method. The workshop map can be obtained in various ways. For example, use a lidar to scan the workshop environment to generate a high-precision two-dimensional or three-dimensional map; or use existing workshop design drawings and convert them into a digital map format. The map should include the positions of the equipment in the workshop, the distribution of the channels, and the information of the obstacles, etc.

[0045] As described in step S20, it is to convert the actual workshop environment into a graph structure suitable for the ant colony algorithm to lay the foundation for subsequent path planning.

[0046] Optionally, various production equipment in the workshop is the key object of inspection, and the installation positions of these equipment can be used as key nodes. For example, in a machining workshop, the positions where numerically controlled machine tools, injection molding machines, etc. are located are key nodes, and the inspection robot needs to go to these positions to check the operating status of the equipment, whether there is abnormal vibration or noise, etc.

[0047] Optionally, the intersection points of the workshop channels are also key nodes. These are the positions where the inspection robot changes its traveling direction and may connect different equipment areas. For example, the center position of the cross-channel in the workshop, where the robot needs to make a decision to choose the next direction to go.

[0048] Optionally, the boundary positions of different functional areas can also be regarded as key nodes. For example, the boundary points between the raw material storage area and the processing area, and the inspection robot can confirm whether the material flow between the areas is normal when passing through here.

[0049] Identify key nodes based on the workshop map, and summarize all the identified key nodes to form the node set V. Each node can be represented by a unique identifier for convenient processing in the subsequent algorithm.

[0050] Refer to the obtained workshop map and find the passable paths between key nodes. These paths should be the channels that the inspection robot can actually walk on, and factors such as the width of the channel and the presence of obstacles need to be considered. For example, if a certain channel is blocked by temporarily stacked goods, then this path cannot be used as a passable path.

[0051] Determine the feasibility of the path according to the movement mode of the inspection robot (such as wheeled, tracked, etc.). Also, for each passable path, mark the corresponding distance information. This distance can be the actual physical distance or the weighted distance considering factors such as the difficulty of passage. For example, if a certain channel is relatively narrow and the robot needs to slow down when passing through, then the distance weight of this path can be appropriately increased.

[0052] Abstract all the passable paths as edges to form an edge set E. Each edge in the edge set E has corresponding start and end nodes, as well as the corresponding distance information.

[0053] In the ant colony algorithm, pheromone is an important factor guiding ants to search for paths. When an ant selects the next node to visit, it will refer to the pheromone concentration on the path, and the path with a higher pheromone concentration has a greater probability of being selected.

[0054] Initialize the pheromone concentration for each edge in the set E. Initially, the pheromone concentration of each edge can be set to the same small value, for example, all set to 1. The purpose of doing this is to avoid the algorithm being overly biased towards certain paths in the initial stage and ensure that ants can have a wider exploration space during the search process.

[0055] Through the above steps, the ant colony algorithm modeling based on the workshop map is completed, obtaining the graph G=(V, E), and preparing for the subsequent ant colony search process.

[0056] As described in step S30, the ant colony algorithm involves multiple key parameters, and the values of these parameters will directly affect the performance and search results of the algorithm. The following are the relevant parameters and their setting methods:

[0057] (1) The number of ants

[0058] The number of ants is an important parameter. More ants can explore paths more widely in the search space, increasing the possibility of finding a better solution. However, too many ants will increase the computational amount and time complexity. Usually, the number of ants can be initially determined according to the scale and complexity of the workshop. For example, for a small workshop, the number of ants can be set to 20 - 50; for a large and complex workshop, the number of ants may need to be set to 50 - 100 or even more. And in this embodiment, it is set that the number of ants m needs to be greater than the number of inspection robots n arranged in the workshop, and n≥2.

[0059] (2) Pheromone evaporation coefficient

[0060] The pheromone evaporation coefficient is used to simulate the process of pheromone evaporation over time in nature, and its value range is usually between 0 and 1. A larger value means that the pheromone evaporates faster, and ants are more inclined to explore new paths; a smaller value makes the pheromone evaporate slower, and ants are more likely to search along the paths they have walked before. Optionally, the value can be set to 0.1 - 0.5, for example, 0.2.

[0061] (3) Heuristic factor

[0062] The heuristic factor controls the importance of heuristic information (such as the reciprocal of the distance between nodes) when ants choose the next node. The larger the value, the more inclined ants are to choose nodes with shorter distances; the smaller the value, the greater the influence of pheromone concentration on ants' decisions. Optionally, the value can be 1 - 5, for example, 2.

[0063] (4) Pheromone enhancement coefficient

[0064] The pheromone enhancement coefficient determines the increase in pheromone on a path after an ant completes a path construction. A larger value will make the pheromone on high-quality paths increase faster, attracting more ants to choose this path; a smaller value makes the pheromone increase relatively slowly. Optionally, set the pheromone enhancement coefficient to be positively correlated with the path quality.

[0065] (5) Maximum number of iterations

[0066] The maximum number of iterations is used to control the termination condition of the algorithm and prevent the algorithm from infinite loop. It can be set according to the complexity of the problem and computing resources. For example, for a general workshop inspection task, it can be set to 100 - 500 times.

[0067] Optionally, through the workshop map or actual investigation, determine the charging location of the inspection robot in the workshop. The charging location is usually fixed, and it should be considered that the robot can return to charge conveniently and safely after completing the inspection task. For example, the charging location can be set in the corner of the workshop or a dedicated charging area.

[0068] Among them, each inspection robot is assigned at least one charging location.

[0069] In the previously constructed graph G, find the node corresponding to the charging location. If the charging location is exactly one of the key nodes, directly use the identifier of this node; if not, a new node can be added to the graph to represent the charging location, and add the edges and distance information between this node and other relevant nodes.

[0070] The performance parameters of the inspection robot affect path planning and task allocation, mainly including the following aspects:

[0071] Maximum cruising range: The maximum cruising range indicates the maximum distance that the inspection robot can travel after a full charge; when planning the path, it is necessary to ensure that the length of the inspection path of the robot does not exceed its maximum cruising range to prevent the robot from being unable to return to the charging location due to insufficient power during the inspection process;

[0072] Inspection speed: The inspection speed refers to the average traveling speed of the robot during the inspection process. This parameter is used to estimate the time of the inspection path and plays an important role in evaluating the path quality;

[0073] Load capacity: If the inspection robot needs to carry certain detection equipment or tools, its load capacity is also an important parameter; the load capacity affects the traveling speed and cruising range of the robot, and needs to be comprehensively considered when planning the path.

[0074] Through the above steps, the initialization of the ant colony algorithm is completed, providing the necessary parameters and information for subsequent path search and task allocation.

[0075] As described in step S40, since the inspection robot needs to return to the charging location after completing the inspection task, placing n ants at different charging locations can simulate the process of the inspection robot starting the inspection from the charging location.

[0076] In addition to the n ants starting from the charging location, the remaining ants are randomly placed on different key nodes in graph G. This can increase the diversity of the ant search paths and enable the algorithm to explore the solution space more comprehensively.

[0077] Construct a path based on the ant colony algorithm. Among them, when an ant selects the next node to visit, it comprehensively considers the pheromone concentration and heuristic information on the path. The pheromone concentration reflects the frequency of the path passed by the previous ants. The higher the pheromone concentration, the more likely the path is to be an optimal path; the heuristic information is usually represented by the reciprocal of the distance between nodes. The closer the distance, the larger the heuristic information value.

[0078] Suppose ant k is currently at node i, and the probability that it selects the next node j is calculated by the following formula:

[0079] If j belongs to , then ;

[0080] If j does not belong to , then .

[0081] Among them, Denote the pheromone concentration on the path from node i to node j; α is the importance factor of pheromone, also known as the pheromone heuristic factor; is the heuristic information, and , is the distance from node i to node j; β is the heuristic factor, also called the expected heuristic factor; is the set of nodes that ant k has not visited yet.

[0082] When j belongs to the set of nodes that ant k has not visited yet the probability that ant k selects node j is the product of the α-th power of the pheromone concentration on the path from node i to node j and the β-th power of the heuristic information, divided by the sum of the corresponding products from node i to all unvisited nodes s. Such a calculation method enables ants to comprehensively consider the pheromone concentration and the distance information between nodes when choosing a path.

[0083] When j does not belong to the set of nodes that ant k has not visited yet the probability that ant k selects node j is 0, that is, ants will not repeatedly select nodes that have already been visited.

[0084] Optionally, when each ant starts to construct a path, its set of visited nodes is initially empty, and the set of nodes that it is allowed to visit is all key nodes except the current node. Each ant selects the next node to visit from the set of allowed nodes according to the above selection probability formula. For example, if ant k is located at node i, it will calculate the selection probabilities from node i to all allowed nodes j, and then make a random selection based on these probabilities (such as using the roulette wheel selection method, the higher the selection probability of a node, the higher the probability of being selected as the next node, but this also allows ants to select those paths that although not having the highest current probability but still have potential with a certain probability, which helps the algorithm to explore more widely in the solution space and avoid falling into local optimal solutions prematurely).

[0085] After an ant selects the next node j, it adds node j to the set of visited nodes and removes node j from the set of allowed nodes. At the same time, it updates the current node to j. Repeat the above node selection and path update process until the ant has visited all key nodes or meets a specific termination condition (such as the total power consumption of the path reaches half of the patrol robot's endurance mileage or reaches the power warning value).

[0086] During the process of ants constructing paths, it is necessary to allocate the visited nodes to different patrol robots. The allocation principle can be based on various factors, such as the maximum endurance mileage of the robot, the current load situation, the distance to the node, etc. For example, preferentially allocate the nodes that are closer to a certain robot and within its endurance range to that robot.

[0087] When an ant visits a new node, according to the above allocation principle, the node is assigned to a suitable inspection robot. For example, when ant k visits node v, calculate the distances from each inspection robot to node v and their remaining battery life, and select the robot with the shortest distance and sufficient battery life to support reaching and returning to the charging location to be responsible for inspecting node v.

[0088] After each node assignment, update the status information of the corresponding inspection robot, such as the list of assigned nodes, remaining battery life, etc. For example, if node v is assigned to robot r, add node v to the list of assigned nodes of robot r, and update the remaining battery life of robot r according to the round-trip distance to node v.

[0089] Through the above steps, ants continuously construct paths and assign visited nodes to inspection robots. As the ant colony algorithm iterates, a better inspection path and task assignment scheme are gradually found.

[0090] As described in step S50, for each constructed path, calculate its estimated inspection duration. The inspection duration includes the movement time of the robot on the path, and the movement time can be calculated based on the distance of the path and the movement speed of the robot.

[0091] Determine the metrics for evaluating path quality. For example, the shorter the inspection duration, the higher the path quality. A linear scoring method can be used, where the path with the shortest inspection duration is scored 100 points, and the scores of other paths are calculated based on their ratio to the shortest duration. Other factors, such as the complexity of the path and the energy consumption of the robot, can also be considered to comprehensively evaluate path quality.

[0092] As described in step S60, update the pheromone concentration of all edges according to the pheromone evaporation coefficient ρ. The update formula is: .

[0093] Optionally, enhance the pheromone on the edges of the path according to the path quality. The higher the path quality, the greater the amount of pheromone enhancement obtained by the edges on the path. The enhancement formula can be expressed as: ; where L is the path quality; Q is the information enhancement coefficient, set as a constant, used to convert L into a pheromone concentration value applicable to this ant colony algorithm.

[0094] As described in step S70, for each edge (i, j), add the evaporated pheromone concentration and the enhanced pheromone concentration to obtain the new pheromone concentration.

[0095] As described in step S80, steps S40 to S70 are the training process for a single round of the ant colony algorithm. Steps S40 to S70 can be repeatedly executed until the algorithm iteration end condition is met.

[0096] Optionally, the end condition of the algorithm iteration can be reaching a preset number of iterations: set the number of iterations N of the algorithm in step S30, and when the actual number of iterations of the algorithm reaches N, it is considered that the iteration ends.

[0097] Optionally, the end condition of the algorithm iteration can be the convergence of the path quality: by monitoring the quality of the optimal path (such as the inspection duration) in each round of iteration, if the change in the quality of the optimal path in consecutive multiple rounds of iteration is less than a preset threshold, it indicates that the algorithm has converged and the iteration can end.

[0098] After determining the end of the iteration, plan the inspection paths for each inspection robot according to the latest pheromone concentration.

[0099] First, for each inspection robot, set its initial position as the corresponding charging position, and create a list of nodes to be visited for each robot, which contains all unvisited nodes in the node set V.

[0100] Based on the pheromone concentration, adopt corresponding task allocation strategies to plan the inspection paths of each robot. Among them, the task allocation strategies can be the greedy algorithm strategy, the multi-round allocation strategy, and the optimization and adjustment strategy.

[0101] Optionally, when using the greedy algorithm to assign tasks to robots, the robot will preferentially select nodes with high pheromone concentration as the next inspection task. For example, for a robot currently located at node u, it will calculate the pheromone concentration from u to each unassigned node and select the node v with the highest pheromone concentration as the next inspection point, because according to the exploration of previous ants, this path may be more optimal.

[0102] Optionally, in the process of multi-round task allocation, each robot calculates the probability of selecting a node according to the pheromone concentration, and then randomly selects a node according to the probability. Nodes with high pheromone concentration have a greater probability of being selected, which can ensure that the robot is more inclined to select the previously proven better inspection path.

[0103] Optionally, when optimizing and adjusting the preliminary allocation plan, the pheromone concentration also plays an important role. If it is found that the pheromone concentration on the inspection path of a certain robot is generally low, it indicates that this path may not be optimal, and some nodes on this path can be considered to be reallocated to other robots, and nodes with high pheromone concentration are preferentially allocated.

[0104] Optionally, during the process of constructing the path, calculate the estimated battery consumption of each robot in real time. The battery consumption includes the moving energy consumption of the robot on the path and the inspection operation energy consumption at each node. If the estimated battery consumption exceeds the maximum battery life of the robot, the path needs to be adjusted, such as choosing a charging location closer to the current position for charging, or reallocating the task nodes to other robots.

[0105] After initially planning the path, some path optimization and adjustment operations can also be performed to further improve the quality of the path. For example, perform local optimization on the path of each robot, such as using 2-opt algorithm, 3-opt algorithm, etc. These algorithms try to find a shorter path by swapping the edges in the path. For example, the 2-opt algorithm continuously swaps two non-adjacent edges in the path until no shorter path can be found.

[0106] Optionally, consider the paths of all robots for global adjustment. For example, if it is found that the path of a certain robot is too long while the paths of other robots are shorter, some task nodes of this robot can be tried to be allocated to other robots to balance the workload of each robot.

[0107] Optionally, for the node allocation principle, on the basis of setting that ordinary nodes are only allocated to one robot, important nodes can be set to be allocated to multiple robots.

[0108] Finally, it is necessary to check whether the set of all task nodes in the inspection paths covers the node set V. If there are uncovered nodes, the path needs to be readjusted to ensure that each key node is visited. For example, compare all the nodes in the node set V with the list of visited nodes of all robots to find the unvisited nodes; allocate the unvisited nodes to the robot closest to the node and with allowable load capacity, and then re-plan the path of this robot.

[0109] Through the above steps, according to the latest pheromone concentration after the iteration of the ant colony algorithm, reasonable and feasible inspection paths can be planned for each inspection robot, and the inspection tasks can be reasonably allocated to multiple inspection robots.

[0110] In one embodiment, based on the ant colony algorithm, a better solution can be calculated among numerous possible paths, and the workshop inspection tasks can be automatically allocated to multiple inspection robots for collaborative operation. This not only improves the efficiency of workshop inspection task allocation, but also the high-quality paths planned can avoid detours and repeated inspections, significantly reducing the inspection time and energy consumption, and improving the overall inspection efficiency. The allocation process of the entire workshop inspection task has a high degree of automation, improving the accuracy and reliability of task allocation, and achieving reasonable allocation of tasks while realizing multi-robot collaborative operation.

[0111] In one embodiment, based on the above embodiment, the steps of planning inspection paths for each inspection robot according to the latest pheromone concentration after the iteration of the ant colony algorithm include:

[0112] After the iteration of the ant colony algorithm, taking each charging location as the starting point of the inspection path for each inspection robot, synchronously plan multiple inspection paths based on the multi-round allocation strategy until all critical nodes in the set V are allocated; wherein, in each round of node allocation, calculate the probability of the next selectable node at the current position according to the latest pheromone concentration;

[0113] After initially planning the inspection paths of each inspection robot, uniformly optimize the inspection duration of the inspection paths based on the estimated inspection duration of each inspection path.

[0114] In this embodiment, set the starting point of the inspection path of each inspection robot as its corresponding charging location, and these charging locations are entered when initializing the ant colony algorithm. Based on these charging locations, start the multi-round allocation strategy to synchronously plan multiple inspection paths.

[0115] Through multi-round allocation, gradually allocate the critical nodes in the set V to different inspection robots until all critical nodes are allocated. Each round of allocation determines the next node to be visited for each robot.

[0116] In each round of node allocation, for the current position of each inspection robot, calculate the selection probability of its next selectable node according to the latest pheromone concentration (the selection probability calculation formula refers to the formula for calculating the selection probability of the next selectable node by the ant in the above embodiment).

[0117] According to the calculated probability, select the node with the highest selection probability to be visited next for each inspection robot from the unallocated nodes.

[0118] After selection, add the node to the inspection path of the corresponding robot, and update the current position of the robot to the newly selected node. At the same time, remove the allocated node from the set of nodes to be allocated. Repeat the above steps until all critical nodes in the set V are allocated.

[0119] After multi-round allocation, the inspection paths of each inspection robot are initially planned. At this time, each path contains a series of critical nodes, and the total task node set of all inspection paths covers the set V.

[0120] For each initially planned inspection path, estimate the inspection duration of each path according to the distance information of each edge in the path and the performance parameters of the inspection robot (such as moving speed, inspection operation time at each node, etc.).

[0121] In order to make the workloads of each inspection robot more balanced and avoid the situation where some robots have too long inspection times while some have too short ones, it is necessary to optimize the inspection time of the inspection paths for balance.

[0122] Optionally, calculate the average value of the estimated inspection times of all inspection paths. Find the paths with inspection times significantly greater than the average value and the paths significantly less than the average value (i.e., the difference from the average value is greater than or equal to a preset value).

[0123] Try to adjust some nodes in the long path to the short path. During the adjustment process, recalculate the inspection time of the path and ensure that the adjusted path is still relatively reasonable according to the latest pheromone concentration and heuristic information.

[0124] Repeat the above adjustment process until the differences in the inspection times of each inspection path are within an acceptable range (i.e., the difference from the average value is less than the preset value).

[0125] Through the above steps, after the iteration of the ant colony algorithm ends, it is possible to plan inspection paths that cover all key nodes and are relatively balanced for each inspection robot according to the latest pheromone concentration.

[0126] Through balance optimization, the inspection times of each robot are similar, enabling them to basically complete tasks at the same time, reducing the idle waiting time of the robots, and thus improving the efficiency of the inspection work in the entire workshop. Reasonably balancing the inspection time can make full use of the working time of each inspection robot, avoid some robots being idle for a long time, improve the utilization rate of equipment resources, and enable the inspection system in the workshop to operate with higher efficiency.

[0127] In one embodiment, based on the above embodiment, the method for balancing and optimizing the inspection time is as follows:

[0128] Represent each inspection path as a chromosome of a genetic algorithm, use the balance degree of each inspection time as the fitness, and replace the inspection path to which the task node belongs through genetic operations, evolving the population until the balance degree of the inspection time reaches the optimal value.

[0129] In this embodiment, each inspection path is represented as a chromosome of a genetic algorithm. Each chromosome corresponds to an inspection path, and the genes on the chromosome represent the task nodes on the path. In this way, the problem of planning the inspection path is transformed into a chromosome coding problem that can be processed by the genetic algorithm.

[0130] Take the balance degree of each patrol duration as the fitness. The fitness function is the core of the genetic algorithm, which is used to evaluate the quality of each chromosome (i.e., the patrol path). An optional method to measure the balance degree of patrol duration is to calculate the standard deviation of the patrol durations of each patrol path. The smaller the standard deviation, the more balanced the patrol durations of each patrol path, and the higher the fitness of this chromosome.

[0131] Optionally, according to the fitness of the chromosomes, select the chromosomes with high fitness to enter the next generation population. An optional selection method is the roulette wheel selection method, that is, the probability of each chromosome being selected is proportional to its fitness. Through the selection operation, the better patrol paths are retained and the worse paths are eliminated, gradually improving the overall fitness of the population.

[0132] Optionally, randomly select two chromosomes and exchange some of their gene segments to generate new chromosomes. In the scenario of patrol paths, the crossover operation means exchanging some task nodes in two patrol paths, thus generating new combinations of patrol paths. The crossover operation increases the diversity of the population and helps to search for better solutions.

[0133] Optionally, randomly modify some genes on the chromosome. In the patrol path problem, the mutation operation can be to transfer a task node from one patrol path to another. The mutation operation can prevent the algorithm from falling into local optimal solutions and increase the possibility of finding the global optimal solution.

[0134] Optionally, evolve the population by continuously repeating the selection, crossover, and mutation operations. The chromosomes in each generation of the population are continuously optimized and adjusted, and the fitness gradually increases. The algorithm continues to iterate until the termination condition is met, such as reaching the preset maximum number of iterations, or the fitness no longer improves significantly. At this time, it is considered that the balance degree of the patrol duration reaches the optimum.

[0135] In this embodiment, through the evolution and genetic operations of the population, the genetic algorithm can conduct extensive searches in the entire solution space, and has a high probability of finding the patrol path combination that optimizes the balance degree of patrol duration, avoiding the trap of local optimal solutions. Moreover, the algorithm can automatically adjust the search direction according to the fitness function, continuously optimize the patrol path to adapt to different workshop layouts and patrol task requirements. And the genetic algorithm can process multiple chromosomes (i.e., multiple patrol paths) simultaneously, with a certain degree of parallelism, and can find better solutions in a relatively short time, improving the optimization efficiency.

[0136] In one embodiment, based on the above embodiment, after the step of representing each inspection path as a chromosome of a genetic algorithm, using the balance degree of each inspection duration as the fitness, and evolving the population until the balance degree of the inspection duration reaches the optimal value by replacing the inspection path to which the task node belongs through genetic operations, the following steps are further included:

[0137] If there are newly added key nodes in a workshop, update the set V, and add the newly added key nodes to the inspection path with the closest distance; and / or, if there are deleted key nodes in a workshop, update the set V, and delete the deleted key nodes from the corresponding inspection path;

[0138] Based on the updated inspection path, return to execute the step of representing each inspection path as a chromosome of a genetic algorithm, using the balance degree of each inspection duration as the fitness, and evolving the population until the balance degree of the inspection duration reaches the optimal value by replacing the inspection path to which the task node belongs through genetic operations.

[0139] In this embodiment, in the actual workshop environment, due to reasons such as production layout adjustment, equipment addition or deletion, etc., the key nodes in the workshop may change, such as newly added key nodes or deleted key nodes. This kind of change will affect the original inspection path planning, resulting in the break of the balance of the inspection duration. Therefore, it is necessary to update and re-optimize the inspection path accordingly.

[0140] When there are newly added key nodes in a workshop, first update the set V and add the newly added key nodes to the set V. Calculate the distances between the newly added key nodes and the nodes on each inspection path, and add the newly added key nodes to the inspection path with the closest distance. For example, by calculating the Euclidean distance from the newly added node to each node on each inspection path, select the path with the smallest distance for addition. This can initially incorporate the newly added nodes into the inspection task without large-scale adjustment.

[0141] If there are deleted key nodes in a workshop, also update the set V and remove the deleted key nodes from the set V. After updating the set V, delete the deleted key nodes from the corresponding inspection path. Check each inspection path. If it contains the node to be deleted, remove the node from the path to ensure that the inspection path no longer contains the deleted node.

[0142] Based on the updated inspection path, represent each inspection path as a chromosome of a genetic algorithm again. The chromosome at this time reflects the updated inspection path information, providing new input for the subsequent genetic algorithm optimization.

[0143] Take the balance degree of each inspection duration as the fitness, and recalculate the fitness of each chromosome. Since the inspection path has changed, the inspection duration of each path will also change accordingly. Therefore, it is necessary to re-evaluate the balance degree of each path.

[0144] Replace the inspection path to which the task node belongs through genetic operations (selection, crossover, mutation), and continuously evolve the population. In this process, the algorithm will screen and optimize the chromosomes according to the new fitness values, and gradually improve the balance degree of the inspection duration.

[0145] Continue to perform iterations of the genetic algorithm until the balance degree of the inspection duration reaches the optimum. This process may require multiple iterations until the preset termination conditions are met, such as reaching the maximum number of iterations or the fitness no longer improves significantly.

[0146] In one embodiment, it is possible to adjust the inspection path planning in a timely manner according to the dynamic changes of the key nodes in the workshop, ensuring that the inspection system can adapt to the changes in the workshop environment and always maintain a high inspection efficiency and path balance. By re-optimizing the balance of the inspection duration and continuously adjusting and improving the inspection path, the inspection task allocation can be continuously optimized, avoiding the problems of decreased inspection efficiency and unbalanced path caused by node changes.

[0147] Since the ant colony algorithm usually requires multiple rounds of iteration, and in each round of iteration, it is necessary to simulate the search process of a large number of ants, calculate the pheromone concentration and transfer probability of each node, etc., the computational complexity is large and the time consumption is long. When only new or deleted key nodes appear in the workshop, if the ant colony algorithm is used again for path planning, it will bring unnecessary computational overhead. And directly adjusting based on the existing inspection path and optimizing the balance of the inspection duration through the genetic algorithm is relatively simple and fast in calculation, and can obtain a new optimized path in a shorter time, improving the overall planning efficiency.

[0148] The production environment of the workshop is dynamically changing, and the addition or deletion of key nodes may occur frequently. This can quickly adapt to such dynamic changes, adjust the inspection path in a timely manner, and ensure that the inspection system can operate stably and efficiently in different workshop environments, especially suitable for scenarios where key nodes in the workshop change frequently.

[0149] In one embodiment, based on the above embodiment, after the step of planning the inspection paths for each inspection robot according to the latest pheromone concentration after the iteration of the ant colony algorithm, it further includes:

[0150] According to the distance relationship between the end positions of each inspection path and each charging position, formulate a charging position exchange strategy between inspection robots to minimize the average return time of inspection robots;

[0151] Among them, if the charging position for the patrol robot to return is different from the original charging position, the patrol path is updated to the patrol path of the patrol robot originally associated with the charging position to which it returns.

[0152] In this embodiment, during the patrol task, the patrol robot needs to return to the charging position for charging after completing the patrol. If each patrol robot always returns to the original charging position, due to the difference in the distance between the end position of each patrol path and the charging position, the return time of some robots may be too long, increasing the overall waiting time and reducing the patrol efficiency. Therefore, formulating a charging position exchange strategy can optimize the return path of the patrol robot and minimize the average return time.

[0153] Optionally, the strategy is formulated according to the distance relationship between the end position of each patrol path and each charging position. The specific approach is to calculate the distance from the end position of each patrol robot's patrol path to all charging positions, and then conduct comprehensive comparison and analysis based on the Hungarian algorithm (Kuhn - Munkras).

[0154] It should be noted that the Hungarian algorithm can, given a distance matrix, find an optimal matching scheme to correspond the patrol robots to the charging positions one by one, minimizing the total distance (i.e., the total return time).

[0155] Optionally, if the charging position for the patrol robot to return analyzed based on the algorithm is different from the original charging position, in addition to setting the charging position indicated by the analysis as the target moving position after the patrol task ends, the patrol path is also updated to the patrol path of the patrol robot originally associated with the charging position to which it returns. For example, originally robot A corresponds to charging position X, and robot B corresponds to charging position Y. After adjustment by the charging position exchange strategy, if robot A has to return to charging position Y, then the patrol path of robot A will be updated to the original patrol path of robot B.

[0156] It should be understood that after the patrol paths of each patrol robot are determined, the end position of each patrol path is also clear. Since the charging position exchange strategy is formulated based on the distance relationship between the end position of the patrol path and the charging position, as long as the path is stable and the charging position remains unchanged, the distance relationship is relatively fixed, so the strategy only needs to be formulated once.

[0157] In one embodiment, by optimizing the allocation of charging positions, the return time of the patrol robot is reduced, enabling the robot to complete charging faster and resume the next round of patrol tasks, thereby improving the working efficiency of the entire patrol system. Reasonably allocating charging positions avoids the situation where some charging positions are idle while some are overused, achieving the rational utilization of charging resources and extending the service life of charging equipment. This strategy can dynamically adjust the allocation of charging positions according to the actual situation of the patrol path, adapting to different workshop layouts and patrol task requirements, and has strong adaptability and flexibility.

[0158] In one embodiment, based on the above embodiment, after the step of planning patrol paths for each patrol robot according to the latest pheromone concentration after the iteration of the ant colony algorithm, the following steps are further included:

[0159] When the patrol robot is performing patrol tasks according to the current patrol path, if it detects that the battery power is insufficient, it detects the remaining path between the current position and the end position of the current patrol path, and queries for a target robot with sufficient battery power among other patrol robots;

[0160] While controlling the patrol robot with insufficient battery power to return for charging, the remaining path is temporarily added to the patrol path of the target robot; where, when the target robot completes the patrol task, the temporarily added path is cleared from the patrol path.

[0161] In this embodiment, during the process of the patrol robot performing patrol tasks, it is necessary to monitor its battery power in real time. When the detected battery power is lower than the preset battery power, it is determined that the robot's battery power is insufficient.

[0162] Once it is determined that the battery power is insufficient, the system will detect the remaining path between the current position and the end position of the current patrol path. This requires combining the robot's positioning system and path planning information to determine. The system can calculate information such as the node sequence and length of the remaining path based on the current coordinates of the robot and the coordinates of each node on the path.

[0163] Among them, the preset requirement refers to sufficient battery power, which can not only complete the patrol tasks assigned in this section but also be able to complete the patrol tasks of the temporarily added remaining path.

[0164] Optionally, when screening for target robots from other patrol robots, the remaining battery power of each robot is compared with the power required to complete its current assigned task and the temporarily added remaining path. Only when the remaining battery power of the robot is greater than the sum of the power required for these two parts of tasks will it be regarded as a target robot meeting the preset requirements. If there are multiple robots meeting the requirements, the robot with the end point of the patrol path closest to the current position can be selected as the target robot.

[0165] After determining that the power is insufficient, the robot can plan the shortest return path based on the information of its current position and the charging position, and return to the charging position as soon as possible to charge, so as to avoid being unable to work properly due to power exhaustion; or, if the remaining power permits, directly return to the charging position where it is required to return after the originally planned inspection task ends.

[0166] Meanwhile, the system will temporarily add the remaining path to the inspection path of the target robot. This requires re-planning and adjustment of the original inspection path of the target robot to ensure that the new path is feasible and meets the requirements of the inspection task. The target robot will continue to execute the task according to the new inspection path.

[0167] When the target robot completes all inspection tasks, the system will remove the temporarily added path from its inspection path, restoring it to the original inspection path mode to prepare for the next inspection task.

[0168] In one embodiment, by adjusting the task assignment in a timely manner, it avoids the interruption or delay of the inspection task caused by a single robot's insufficient power, ensuring the continuity and efficiency of the inspection work. Other robots with sufficient power can promptly take over the remaining inspection tasks, reducing the overall inspection time. This dynamic task adjustment mechanism makes the system more adaptable and reliable. In case of emergencies such as a robot's insufficient power, the system can automatically adjust to ensure the smooth completion of the inspection task, reducing the dependence on manual intervention.

[0169] In one embodiment, based on the above embodiment, the step of obtaining the workshop map includes:

[0170] Collecting the monitoring images of the workshop based on the monitoring devices distributed at multiple different positions in the workshop; and controlling at least one inspection robot to perform a global scan of the workshop to generate a global scan image;

[0171] Integrating the monitoring images and the global scan image into the workshop floor plan to generate the workshop map, and marking the key nodes in the workshop map, as well as the passable paths and relevant distance information between the nodes.

[0172] In this embodiment, multiple monitoring devices are arranged at different positions in the workshop. These monitoring devices can be cameras, etc., and they are installed at various key positions in the workshop, such as the workshop entrance, around the equipment, at the intersection of passages, etc. Through these monitoring devices, real-time monitoring images of the workshop can be collected from different angles and positions. These images can provide intuitive information about various areas in the workshop, such as the placement of equipment and the activities of personnel.

[0173] Meanwhile, at least one inspection robot is controlled to conduct a global scan of the workshop. The inspection robot can be equipped with scanning devices such as lidar and depth cameras, and move autonomously in the workshop for omnidirectional scanning. During the scanning process, the robot will record the three-dimensional information of various objects in the workshop, thereby generating a global scan image. The global scan image can more accurately reflect the spatial structure of the workshop and the actual positions of objects, providing detailed data support for subsequent map generation.

[0174] Integrate the collected monitoring images and global scan images into the workshop floor plan. The workshop floor plan is pre-drawn, which shows the basic outline and general layout of the workshop. Through image integration technology, the information in the monitoring images and global scan images is accurately fused into the floor plan, making the map richer and more detailed.

[0175] In the generated workshop map, mark the key nodes. Key nodes usually include the entrances and exits of the workshop, the positions of important equipment, etc. Among them, the identification of key nodes can be based on a deep learning model to identify the workshop map and output the identification results for relevant engineers to confirm.

[0176] Optionally, a deep learning model suitable for image recognition tasks such as a convolutional neural network can be selected. Collect a large number of image data containing workshop scenarios in advance, and label the key nodes (such as entrances and exits, positions of important equipment, etc.) in them. Divide the labeled data into training set, validation set and test set for model training, tuning and evaluation. By continuously adjusting the parameters of the model, the model can accurately identify the key nodes in the workshop map.

[0177] Input the generated workshop map image into the trained deep learning model. The model will perform feature extraction and analysis on the image, and identify the possible key nodes in it. The model will output the identification results, including information such as the positions and types of key nodes. For example, identify a certain area as the entrance and exit of the workshop, or a certain point as the position of an important equipment.

[0178] Although the deep learning model has a high recognition accuracy, there may still be certain errors. For example, due to factors such as image quality and lighting conditions, the model may misidentify or miss some key nodes. Engineers can correct the model's identification results to ensure that the identification of key nodes is accurate.

[0179] In addition to key nodes, it is also necessary to mark the passable paths and relevant distance information between nodes. The passable paths refer to the channels where the robot can safely travel in the workshop. By analyzing the monitoring images and global scan images, the specific positions of these paths can be determined. At the same time, using the scan data and image information, the distances between nodes can be calculated and marked on the map.

[0180] In one embodiment, by combining the images collected by the monitoring device and the global scan images of the patrol robot, more comprehensive and accurate information about the workshop can be obtained. The monitoring images provide real-time dynamic information about the workshop, while the global scan images provide precise three-dimensional spatial information. The combination of the two can generate a more detailed and realistic workshop map.

[0181] In addition, referring to Figure 2 , this embodiment of the present application also provides a control device Z10, including:

[0182] An acquisition module Z11, configured to acquire a workshop map;

[0183] A modeling module Z12, configured to perform modeling of the ant colony algorithm based on the workshop map, and abstract to obtain a graph G=(V, E); where V is a set of nodes, representing key nodes in the workshop; E is a set of edges, representing passable paths between nodes, and each edge is marked with corresponding distance information; and, initialize the pheromone concentration for each edge in the set E;

[0184] A setting module Z13, configured to initialize the ant colony algorithm, set algorithm-related parameters, and input the charging positions and performance parameters of the patrol robot in the workshop; where the number of ants m in the ant colony algorithm is set to be greater than the number of patrol robots n; a training module Z14, configured to place n ants at different charging positions, randomly place the remaining ants at different key nodes, and start constructing paths based on the ant colony algorithm: where each ant selects the next node to visit according to the pheromone concentration and heuristic information, and during the process of constructing the path, assign the visited nodes to different patrol robots;

[0185] An evaluation module Z15, configured to evaluate the path quality according to the estimated patrol duration of each path;

[0186] A gain module Z16, configured to, after all ants complete path construction, perform evaporation update on the pheromone concentration of all edges according to the pheromone evaporation coefficient; and enhance the pheromone on the edges of the path according to the path quality;

[0187] An update module Z17, configured to add the evaporated pheromone concentration and the enhanced pheromone concentration to obtain a new pheromone concentration;

[0188] A planning module Z18, configured to, after the ant colony algorithm iteration ends, plan patrol paths for each patrol robot according to the latest pheromone concentration; where the total task node set of all patrol paths covers the set V.

[0189] Optionally, the control device Z10 can be a virtual control device (such as a virtual machine) or a physical device (such as a physical device other than the control system that can execute the corresponding method).

[0190] In addition, an embodiment of the present application also provides a control system. The internal architecture of this control system can be as Figure 3 shown, including a processor, a memory, a communication interface, and an input interface connected via a system bus. Among them, the processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database is used to store data called by the computer program. The communication interface is used to communicate with an external terminal for data. The input interface is used to receive signals input by an external device. When the computer program is executed by the processor, it implements a method for allocating workshop patrol tasks based on the ant colony algorithm as described in the above embodiments.

[0191] Those skilled in the art can understand that Figure 3 the structure shown in

[0192] is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the control system to which the solution of the present application is applied. For example, in some optional embodiments, the control system may further include an output interface (not shown in the figure), and the output interface is also connected to the system bus and is used to output corresponding signals to external devices.

[0193] In summary, for the method for allocating workshop patrol tasks based on the ant colony algorithm, the control device, the control system, and the computer-readable storage medium provided in the embodiments of the present application, based on the ant colony algorithm, a better solution can be calculated among many possible paths, and the workshop patrol tasks can be automatically assigned to multiple patrol robots for collaborative operation. This not only improves the efficiency of workshop patrol task allocation, but also the planned high-quality path can avoid detours and repeated patrols, significantly reducing the patrol time and energy consumption, and improving the overall patrol efficiency. The entire process of allocating workshop patrol tasks has a high degree of automation, improving the accuracy and reliability of task allocation. While achieving multi-robot collaborative operation, a reasonable allocation of tasks is achieved.

[0194] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database or other medium provided in this application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0195] It should be noted that in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, device, article or method. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, device, article or method comprising the element.

[0196] The above are only the preferred embodiments of this application, and do not limit the patent scope of this application. Any equivalent structure or equivalent process transformation made by using the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be included in the patent protection scope of this application by the same token.

Claims

1. A workshop inspection task allocation method based on ant colony algorithm, characterized in that: include: Get a map of the workshop; Based on the workshop map, the ant colony algorithm is modeled and the graph G = (V, E) is abstracted. Where V is a node set, representing the key nodes in the workshop; E is an edge set, representing the traversable paths between nodes, and each edge is marked with corresponding distance information; and the pheromone concentration is initialized for each edge in the set E; Initialize the ant colony algorithm, set algorithm-related parameters, and enter the charging location and performance parameters of the inspection robot in the workshop; the number of ants m in the ant colony algorithm is set to be greater than the number of inspection robots n; Place n ants at different charging locations and randomly place the remaining ants at different key nodes. Then, a path is constructed based on the ant colony algorithm. Each ant selects the next node to visit based on pheromone concentration and heuristic information, and assigns the visited nodes to different inspection robots during the path construction process. Evaluate path quality based on the estimated inspection time of each path; After all ants have completed the path construction, the pheromone concentration of all edges is updated according to the pheromone volatility coefficient; and the pheromone enhancement is performed on the edges on the path according to the path quality; The volatilized pheromone concentration and the enhanced pheromone concentration are added together to obtain the new pheromone concentration; After the ant colony algorithm iteration is completed, the inspection path is planned for each inspection robot according to the latest pheromone concentration; among them, the total task node set of all inspection paths covers the set V; Based on the distance relationship between the end position of each inspection path and each charging position, a charging position exchange strategy between inspection robots is formulated to minimize the average return time of the inspection robots. The distance from the end position of each inspection path to all charging positions is calculated, and a comprehensive comparison and analysis is performed based on the Hungarian algorithm to match the end of the inspection path of the inspection robot with the charging position one by one while minimizing the total distance. If the charging position to which the inspection robot returns is different from the original charging position, the inspection path is updated to the inspection path of the inspection robot originally associated with the charging position to which it returns. When the inspection robot performs the inspection task according to the current inspection path, if it detects that the battery is insufficient, it detects the remaining path between the current position and the end position of the current inspection path, and queries the target robot whose battery meets the preset requirements from other inspection robots; while controlling the inspection robot with insufficient battery to return for charging, the remaining path is temporarily added to the inspection path of the target robot; wherein, when the target robot completes the inspection task, the temporarily added temporary path is cleared from the inspection path; the preset requirement is the remaining battery of the inspection robot, which can not only complete the inspection task assigned to this section, but also complete the inspection task of the temporarily added remaining path; if there are multiple inspection robots that meet the preset requirements, the inspection robot whose end point of the inspection path is closest to the current position is selected as the target robot.

2. The workshop inspection task allocation method based on ant colony algorithm according to claim 1, characterized in that: After the ant colony algorithm iteration is completed, the steps of planning the inspection path for each inspection robot according to the latest pheromone concentration include: After the ant colony algorithm iteration is completed, each charging position is used as the starting point of the inspection path of each inspection robot, and multiple inspection paths are planned synchronously based on the multi-round allocation strategy until all key nodes in the set V are allocated. In each round of node allocation, the probability of the next selectable node at the current position is calculated based on the latest pheromone concentration. After preliminarily planning the inspection paths of each inspection robot, the inspection time of each inspection path is uniformly optimized based on the estimated inspection time of each inspection path.

3. The workshop inspection task allocation method based on ant colony algorithm according to claim 2, characterized in that: The balanced optimization method of the inspection time is: Each inspection path is represented as a chromosome of the genetic algorithm, and the degree of balance of each inspection time is used as the fitness. The inspection path to which the task node belongs is replaced through genetic operations, and the population is evolved until the balance of the inspection time reaches the optimal level.

4. The workshop inspection task allocation method based on ant colony algorithm according to claim 3 is characterized in that: After the steps of representing each inspection path as a chromosome of a genetic algorithm, using the degree of balance of each inspection time as fitness, replacing the inspection path to which the task node belongs through genetic operations, and evolving the population until the degree of balance of the inspection time is optimal, the method further includes: If a workshop has a newly added key node, the set V is updated and the newly added key node is added to the nearest inspection path; and / or, if a workshop has a deleted key node, the set V is updated and the deleted key node is deleted from the corresponding inspection path; Based on the updated inspection path, return to the step of representing each inspection path as a chromosome of the genetic algorithm, taking the degree of balance of each inspection time as the fitness, replacing the inspection path to which the task node belongs through genetic operations, and evolving the population until the degree of balance of the inspection time reaches the optimal level.

5. The workshop inspection task allocation method based on ant colony algorithm according to claim 1, characterized in that: The step of obtaining the workshop map includes: Based on monitoring devices distributed at multiple different locations in the workshop, monitoring images of the workshop are collected; and at least one inspection robot is controlled to perform a global scan of the workshop to generate a global scan image; The monitoring images and global scanning images are integrated into the workshop layout diagram to generate a workshop map, and the key nodes in the workshop map are identified, as well as the traversable paths and related distance information between the nodes.

6. A control device, characterized in that: include: Acquisition module, used to obtain workshop map; Modeling module, used to model the ant colony algorithm based on the workshop map, abstractly obtaining the graph G = (V, E); Where V is a node set, representing the key nodes in the workshop; E is an edge set, representing the traversable paths between nodes, and each edge is marked with corresponding distance information; and the pheromone concentration is initialized for each edge in the set E; The setting module is used to initialize the ant colony algorithm, set algorithm-related parameters, and enter the charging position and performance parameters of the inspection robot in the workshop; wherein, the number of ants m in the ant colony algorithm is set to be greater than the number of inspection robots n; The training module places n ants at different charging locations and randomly places the remaining ants at different key nodes. The ant colony algorithm then begins to build a path. Each ant selects the next node to visit based on pheromone concentration and heuristic information, and assigns the visited nodes to different patrol robots during the path construction process. Evaluation module, used to evaluate the path quality based on the estimated inspection time of each path; The gain module is used to update the pheromone concentration of all edges according to the pheromone volatility coefficient after all ants have completed the path construction; and to enhance the pheromone of the edges on the path according to the path quality; An updating module, for adding the volatilized pheromone concentration and the enhanced pheromone concentration to obtain a new pheromone concentration; The planning module is used to plan the inspection path for each inspection robot according to the latest pheromone concentration after the iteration of the ant colony algorithm. Among them, the total task node set of all inspection paths covers the set V. According to the distance relationship between the end position of each inspection path and each charging position, a charging position exchange strategy between inspection robots is formulated to make the average return time of the inspection robot as short as possible. Among them, the distance from the end position of the inspection path of each inspection robot to all charging positions is calculated, and a comprehensive comparison and analysis is performed based on the Hungarian algorithm to make a one-to-one correspondence between the end of the inspection path of the inspection robot and the charging position, while minimizing the total distance. If the charging position of the inspection robot's return is different from the original charging position, the inspection path is updated to the inspection path of the inspection robot originally associated with the charging position to which it returns. path; when the inspection robot performs the inspection task according to the current inspection path, if it detects that the power is insufficient, it detects the remaining path between the current position and the end position of the current inspection path, and queries the target robot whose power meets the preset requirements from other inspection robots; while controlling the inspection robot with insufficient power to return for charging, the remaining path is temporarily added to the inspection path of the target robot; wherein, when the target robot completes the inspection task, the temporarily added temporary path is cleared from the inspection path; the preset requirement is the remaining power of the inspection robot, which can not only complete the inspection task assigned to this section, but also complete the inspection task of the temporarily added remaining path; if there are multiple inspection robots that meet the preset requirements, the inspection robot whose end point of the inspection path is closest to the current position is selected as the target robot.

7. A control system, characterized in that: The control system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the workshop inspection task allocation method based on the ant colony algorithm as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the workshop inspection task allocation method based on ant colony algorithm according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Inspection path planning method and system, computer equipment and storage medium

    CN115755954A

  • Collaborative inspection method and device based on heterogeneous multi-machine combination, terminal equipment and storage medium

    CN119645065A