Cleaning robot control method and cleaning robot

Through the path planning method based on chunking and genetic algorithm optimization based on bow sweep line clustering, the problem of low efficiency and coverage of traditional bow shaped paths in complex environments is solved, and a more efficient cleaning robot cleaning effect is achieved.

CN119949696APending Publication Date: 2025-05-09SHENZHEN ZBEETLE INTELLIGENCE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510292055.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

Traditional bow-shaped paths are difficult to effectively cover the cleaning area in complex environments, resulting in a decrease in bow-sweep efficiency and coverage of cleaning robots.

Method used

By dividing the areas to be cleaned based on the bow sweep line clustering method, determining the cleaning path and cleaning order in each piece of cleaning block, combining with the genetic algorithm to optimize the path, and filtering the cleaning path with the lowest cost as the target cleaning path.

Benefits of technology

It improves the cleaning efficiency and coverage of cleaning robots, and can more effectively deal with cleaning tasks in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119949696A_ABST
    Figure CN119949696A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a control method of a cleaning robot and the cleaning robot, and the method comprises the steps: determining a to-be-cleaned area, dividing the to-be-cleaned area into a plurality of to-be-cleaned blocks based on a bow sweeping line clustering mode, determining the cleaning path of each to-be-cleaned block and the cleaning sequence of each to-be-cleaned block, obtaining an initial cleaning path, calculating the path cost of each initial cleaning path, and reserving the path meeting the preset path cost as a first-generation cleaning path; and performing cyclic selection crossover variation on the first-generation cleaning path, obtaining a second-generation cleaning path after a convergence condition is met, determining the path with the lowest cost as a target cleaning path, and controlling the cleaning robot to perform cleaning according to the target cleaning path. The arch sweeping line clustering mode is more fit with the sweeping path of arch sweeping, the obtained path is used for planning the whole area, and then crossover variation is carried out, so that premature convergence to a local optimal solution can be prevented, and the sweeping efficiency and the coverage rate of the robot can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a control method of a cleaning robot and the cleaning robot. Background Art

[0002] With the iteration of household cleaning robots, the cleaning efficiency and intelligence of robots have become the key points that consumers pay the most attention to. The bow sweeping coverage cleaning of the sweeping robot is an efficient cleaning strategy that aims to ensure that the robot can evenly and comprehensively cover the entire cleaning area. This method imitates the traditional "bow" cleaning mode, that is, the cleaning tool or equipment moves in a series of parallel paths to achieve a complete cleaning of the ground.

[0003] However, the traditional bow-shaped path only searches for the nearest uncleaned point for coverage cleaning. In complex environments such as multiple obstacles and irregular rooms, the bow scanning of the cleaning robot is easily affected by the environment and needs to frequently switch to the nearest bow scanning line, thus generating too many repeated transition paths, which greatly reduces the bow scanning coverage efficiency. Summary of the invention

[0004] Based on this, the present invention provides a control method for a cleaning robot, which can cope with coverage cleaning in complex environments to ensure the cleaning efficiency and coverage rate of the robot.

[0005] In a first aspect, a control method for a cleaning robot is provided, the method comprising:

[0006] Identify the area to be cleaned;

[0007] The area to be cleaned is divided into multiple blocks to be cleaned based on the bow-sweep line clustering method;

[0008] Determine a cleaning path in each to-be-cleaned block, and determine a cleaning order of each to-be-cleaned block in the to-be-cleaned area, to obtain at least one initial cleaning path for the to-be-cleaned area;

[0009] Calculate the path cost of each initial cleaning path, and retain the initial cleaning path that meets the preset path cost as the first generation cleaning path;

[0010] The retained first-generation cleaning paths are subjected to cyclic selection and crossover mutation, and the second-generation cleaning paths are obtained after the convergence conditions are met;

[0011] Determine the cleaning path with the lowest path cost from the second-generation cleaning paths as the target cleaning path;

[0012] Control the cleaning robot to clean the area to be cleaned according to the target cleaning path.

[0013] Optionally, the retained first-generation cleaning paths are subjected to cyclic selection and crossover mutation, and a second-generation cleaning path is obtained after a convergence condition is met, including:

[0014] Perform floating point encoding on each retained first-generation cleaning path to obtain a floating point encoding group corresponding to each first-generation cleaning path;

[0015] The floating-point number arrays in the floating-point number encoding groups of the first-generation cleaning paths are crossed, and a new floating-point number encoding group is obtained by mutation, and the newly obtained floating-point number encoding group is used as the second-generation cleaning path.

[0016] Optionally, the area to be cleaned is divided into a plurality of blocks to be cleaned based on a bow-scan line clustering method, including:

[0017] Arranging the bow scanning lines evenly and at equal intervals in the same direction in the non-obstacle area of ​​the area to be cleaned;

[0018] The bow sweeping lines that can continuously turn and perform uninterrupted cleaning in the area to be cleaned are clustered into the same block, and the area to be cleaned is divided into a plurality of blocks to be cleaned.

[0019] Optionally, determining a cleaning path in each to-be-cleaned block, and determining a cleaning order of each to-be-cleaned block in the to-be-cleaned area, and obtaining at least one initial cleaning path for the to-be-cleaned area, comprises:

[0020] Determine the endpoints of the two longest-distance sweeping lines in each of the blocks to be cleaned as the preselected starting point and end point of the blocks to be cleaned, randomly arrange the starting point and end point of each of the blocks to be cleaned, and obtain multiple initial sweeping paths for the area to be cleaned;

[0021] Or / and, according to the current position of the cleaning robot, a breadth-first search algorithm is used to search for the nearest block to be cleaned, and then the nearest other blocks to be cleaned are searched through the block to be cleaned, and the cycle is repeated until the end of the area to be cleaned is searched from the last block to be cleaned, and the order from the nearest block to be cleaned to the last block to be cleaned is used as the initial cleaning path.

[0022] Optionally, determining the area to be cleaned further includes determining a starting point and an end point of the area to be cleaned;

[0023] Then, the step of determining the cleaning paths in each to-be-cleaned block and determining the cleaning order of each to-be-cleaned block in the to-be-cleaned area to obtain at least one initial cleaning path for the to-be-cleaned area includes:

[0024] In combination with the starting point and end point of the area to be cleaned, the endpoints of the two longest-distance sweeping lines in each block to be cleaned are determined as the pre-selected starting point and end point of the block to be cleaned, and the starting point and end point of each block to be cleaned are randomly arranged to obtain multiple initial cleaning paths for the area to be cleaned.

[0025] Optionally, the convergence conditions include:

[0026] The cyclic selection crossover mutation reaches the maximum number of iterations, the fitness value reaches a certain threshold, or the fitness value does not show significant difference for several consecutive generations;

[0027] Otherwise, return to the step of calculating the path cost of each initial sweeping path, and retain the initial sweeping path that meets the preset path cost as the first generation sweeping path.

[0028] Optionally, determining the start point and the end point of the area to be cleaned includes:

[0029] When there is only one area to be cleaned, the location of the base station of the cleaning robot is determined as the end point of the area to be cleaned;

[0030] When there are multiple areas to be cleaned, a passage between the area to be cleaned and other areas to be cleaned is determined as an end point of the area to be cleaned.

[0031] Optionally, calculate the path cost of each initial sweep path, including:

[0032] One or more of the following information is used as the path cost of each cleaning path:

[0033] The total length of the bow sweep line in the blocks to be cleaned in each cleaning path;

[0034] The turning cost of the bow sweep line in the block to be cleaned in each cleaning path;

[0035] The transition distance between the blocks to be cleaned in each cleaning path;

[0036] The obstacle penalty value between the blocks to be cleaned in each cleaning path.

[0037] Optionally, after controlling the cleaning robot to clean the area to be cleaned according to the target cleaning path, the method further includes:

[0038] When encountering an obstacle during the cleaning process, remove the obstacle along the edge;

[0039] The block to be cleaned where the obstacle is located is divided twice based on the bow-sweep line clustering method to obtain multiple blocks to be cleaned where the obstacle is located;

[0040] Replan the cleaning path for each obstacle to be cleaned;

[0041] After controlling the cleaning robot to clean the blocks to be cleaned according to the cleaning path, it continues to clean other blocks to be cleaned on the target cleaning path.

[0042] In a second aspect, a cleaning robot is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements each step of any one of the above control methods for the cleaning robot when executing the computer program.

[0043] The robot control method introduced above, firstly, because the blocks to be cleaned are divided based on the bow-sweep line clustering method, the cleaning path is more in line with the bow-sweep, thereby facilitating improving efficiency and coverage; secondly, the cleaning path of the area to be cleaned is based on the cleaning paths in each block to be cleaned, and the cleaning order of each block to be cleaned in the area to be cleaned is determined. The obtained path is planned for the entire area to be cleaned, which can improve efficiency and coverage; then, the cleaning paths that meet the preset path costs are screened and cross-mutated to obtain a new cleaning path to prevent premature convergence to a local optimal solution; finally, the cleaning path with the lowest path cost is determined from the newly obtained cleaning paths and the retained cleaning paths as the target cleaning path, and the cleaning robot is controlled to clean the area to be cleaned according to the target cleaning path. It can be seen that the cleaning robot control method provided by the present invention can cope with coverage cleaning in complex environments to ensure the cleaning efficiency and coverage of the robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 A basic flow chart of a control method for a cleaning robot provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a bow-sweep line of a cleaning robot provided in an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of floating point number encoding and decoding logic provided by an embodiment of the present invention;

[0048] Figure 4 A basic structural block diagram of a cleaning robot control device is provided for an embodiment of the present invention;

[0049] Figure 5 A basic structural block diagram of a cleaning robot provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0051] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0053] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0054] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0055] Please refer to Figure 1 , Figure 1 Schematic diagram of the basic flow of the control method of this embodiment.

[0056] like Figure 1 As shown, a control method includes:

[0057] S101, determining an area to be cleaned.

[0058] The area to be cleaned is the area that the cleaning robot needs to clean in one task, which may be a room, multiple rooms, or one or more areas in one room. In some examples, determining the area to be cleaned further includes determining the start point and the end point of the area to be cleaned, and using the start point and the end point of the area to be cleaned as the start point and the end point of the path planning.

[0059] S102: Divide the area to be cleaned into a plurality of blocks to be cleaned based on the bow-scan line clustering method.

[0060] The bow-sweep line clustering method refers to arranging the bow-sweep lines in one direction on the cleaning area map, which can be arranged horizontally or vertically, and then looping through two consecutive bow-sweep lines with only one adjacent horizontal distance or vertical distance. If the two endpoints of the two straight lines are within a certain distance range, it is considered that the two lines can be directly connected by turning, and the two bow-sweep lines are placed in the same block, otherwise they are placed in a new block, until all the straight lines in the uncleaned bow-sweep line set are divided into several blocks, and multiple blocks to be cleaned are obtained.

[0061] S103: Determine a cleaning path in each to-be-cleaned block, and determine a cleaning order of each to-be-cleaned block in the to-be-cleaned area, to obtain at least one initial cleaning path for the to-be-cleaned area.

[0062] The endpoints of the two longest sweeping lines in each block to be cleaned are determined as the pre-selected starting and ending points of the block to be cleaned. The optimal cleaning order can be transformed into solving the shortest path from the starting point of the cleaning task to all the blocks to be cleaned (starting points and ending points) to the end point of the cleaning task. In some examples, the initial cleaning path can be obtained based on the random arrangement method - the starting points and ending points of each block to be cleaned are randomly arranged to obtain multiple initial cleaning paths for the area to be cleaned, and then iterate based on these multiple initial cleaning paths. In some other examples, the initial cleaning path can be obtained based on the method of local optimal solution - in order to make the genetic algorithm converge to the optimal solution faster, before starting the crossover mutation, a local optimal solution can be calculated using the greedy idea: according to the current location of the cleaning robot, the breadth-first algorithm is used to search for the center point A of the nearest block to be cleaned, and then the center point A of the block to be cleaned is used to search for other nearest center points B, and the cycle is repeated until the end of the area to be cleaned is searched from the last block to be cleaned in the area to be cleaned, and the sequence from the nearest block to the last block to be cleaned is used as the initial cleaning path for the area to be cleaned. Of course, these two methods of obtaining the initial cleaning path can also be combined - the local optimal cleaning sequence obtained based on the greedy idea and the several cleaning sequences obtained by the random strategy are used to form the initial cleaning path, and then the path cost is calculated, and the first generation of cleaning paths that meet the preset path cost are retained, and then the crossover mutation operation is performed on them cyclically. After the convergence condition is met, the second generation of cleaning paths is obtained, that is, the initial cleaning path obtained by the second local optimal solution is put into the initial cleaning path set obtained by the first method to form the initial cleaning path.

[0063] S104, calculating the path cost of the initial cleaning path, and retaining the initial cleaning path that meets the preset path cost as the first generation cleaning path.

[0064] In the traditional traveling salesman problem, the path cost between cities is generally calculated using the Euclidean distance between cities. However, in the embodiments of the present invention, there are often many obstacles between the "city" blocks to be cleaned, and the real path between two blocks to be cleaned needs to bypass obstacles. Therefore, the Euclidean distance cannot reflect the real distance between the blocks to be cleaned. In the embodiments provided in the present application, the obstacle penalty value of the path between the blocks to be cleaned in each cleaning path can be used as the path cost of each cleaning path. By adding a certain penalty value based on the number of obstacles occupied on the connecting grid between the blocks to be cleaned on the map, a more realistic cleaning path can be calculated without excessive consumption of computing resources, and the possibility of passing obstacles during the cleaning process can be reduced.

[0065] In some other examples, the total length of the sweep lines in the blocks to be cleaned in each cleaning path, the turning cost of the sweep lines in the blocks to be cleaned in each cleaning path (the turning distance between the sweep lines in the blocks to be cleaned), the transition distance between the blocks to be cleaned in each cleaning path (the distance from the end point of the first block to be cleaned to the starting point of the second block to be cleaned), and one or more of the obstacle penalty values ​​in the paths between the blocks to be cleaned in each cleaning path can be used as the path cost of each cleaning path.

[0066] S105, performing cyclic selection and crossover mutation on the retained first-generation cleaning paths, and obtaining the second-generation cleaning paths after the convergence conditions are met.

[0067] In some examples, the retained first-generation sweep paths can be represented as a set of floating-point arrays (floating-point encoding), the floating-point array including multiple floating-point numbers, the real digits of the floating-point numbers are the block numbers, and the decimal places are the endpoint numbers of the blocks corresponding to the real digits. Floating-point decoding is the process of converting the encoded floating-point array into the actual solution to the problem. The floating-point encoding and decoding of the embodiments of the present application are usually very direct, because the encoded floating-point numbers directly represent the solution to the problem.

[0068] The crossover operation is the process used in genetic algorithms to combine two parent individuals to produce offspring. For floating-point encoding, the commonly used crossover method can use two-point crossover, randomly select two crossover points in the floating-point gene, randomly exchange the real number and decimal place of the parent individuals between these crossover points, and generate new offspring. If there are repeated or default real number numbers in the gene individuals generated after the crossover, select the two other blocks closest to the current block endpoints and place them in the middle. Based on the first-generation sweeping path (parent), the second-generation sweeping path (offspring) can be obtained. The first and second here are only used to distinguish between the parent and offspring, and are not limited to only these two generations.

[0069] The mutation operation is the process used to introduce new genetic diversity in genetic algorithms. For floating-point encoding, the commonly used mutation method can be random mutation, which randomly generates decimal places within the range of endpoint numbers 1 to 4 and forms new values ​​with real places.

[0070] Loop selection may refer to looping step S105 until the convergence condition is met. In some other examples, loop selection may also refer to looping step S103 to step S105 until the convergence condition is met. Convergence conditions include reaching the maximum number of iterations, the fitness value reaching a certain threshold, or the fitness value of several consecutive generations is not obvious. Evolutionary algorithms such as genetic algorithms are iterative search algorithms that start from an initial population and generate new populations generation after generation by continuously performing operations such as selection, crossover, and mutation. The maximum number of iterations is the maximum number of iterations allowed by the algorithm set in advance. When the algorithm reaches this maximum number of iterations, it will stop running regardless of whether the optimal solution is found, and output the current optimal result. This is to avoid the algorithm from looping infinitely and ensure that the algorithm completes the task within limited time and computing resources. The fitness value is an indicator to measure the quality of individuals in the population, and is usually related to the objective function of the problem. In a genetic algorithm, each individual has a fitness value, which reflects the individual's ability to adapt to the environment or solve problems. The fitness value reaching a certain threshold means that the algorithm has found a good enough solution that meets the requirements of the problem or achieves the expected accuracy. At this point, the algorithm can stop running, because continued iteration may not bring better results, or even if better results can be obtained, the degree of improvement may be outside the acceptable range. During the algorithm iteration process, if the optimal fitness value of the population for several consecutive generations has not been significantly improved or changed, it means that the algorithm may have converged to a local optimal solution or near the global optimal solution, and it is difficult to find a better solution through further iterations. The "no obvious change" here can be judged by setting a specific threshold. For example, if the change in the optimal fitness value of consecutive k generations is less than a certain minimum value ∈, in this case, continuing to iterate may only be an invalid search near the current optimal solution, wasting computing resources, and the algorithm can be stopped.

[0071] S106, determining a cleaning path with the lowest path cost from the second-generation cleaning paths as a target cleaning path;

[0072] S107: Control the cleaning robot to clean the area to be cleaned according to the target cleaning path.

[0073] The robot control method introduced above, firstly, because the blocks to be cleaned are divided based on the bow-sweep line clustering method, the cleaning path is more in line with the bow-sweep, thereby facilitating improving efficiency and coverage; secondly, the cleaning path of the area to be cleaned is based on the cleaning paths in each block to be cleaned, and the cleaning order of each block to be cleaned in the area to be cleaned is determined. The obtained path is planned for the entire area to be cleaned, which can improve efficiency and coverage; then, the cleaning paths that meet the preset path costs are screened and cross-mutated to obtain a new cleaning path to prevent premature convergence to a local optimal solution; finally, the cleaning path with the lowest path cost is determined from the newly obtained cleaning paths and the retained cleaning paths as the target cleaning path, and the cleaning robot is controlled to clean the area to be cleaned according to the target cleaning path. It can be seen that the cleaning robot control method provided by the present invention can cope with coverage cleaning in complex environments to ensure the cleaning efficiency and coverage of the robot.

[0074] In some embodiments, the control method of the cleaning robot provided by the present invention may include the following steps:

[0075] S201: Determine the area to be cleaned.

[0076] The area to be cleaned is the area that the cleaning robot needs to clean in a task. It can be a room, a multi-room, or one or more areas in just one room. Determining the area to be cleaned includes determining the starting point and end point of the area to be cleaned. In some examples, when there is only one area in the area to be cleaned, the location of the base station of the cleaning robot is determined as the end point of the area to be cleaned. At this time, the cleaning robot can directly return to the base station after the cleaning task is completed. In some other examples, when the area to be cleaned includes multiple areas, the passage between the area to be cleaned and other areas to be cleaned is determined as the end point of the area to be cleaned. For example, after the cleaning robot completes the cleaning of the first area, it will go to the second area for cleaning. At this time, the passage between the first area and the second area is a necessary road. At this time, the passage between the first area and the second area can be the end point of the first area to be cleaned. For example, after the cleaning robot completes the cleaning of room 1, it must enter room 2 through the door of room 1 for cleaning. At this time, the point on the door line of room 1 can be used as the end point of the area to be cleaned (room 1).

[0077] S202: Arrange the scanning lines evenly and at equal intervals in the same direction in the non-obstacle area in the area to be cleaned.

[0078] In some examples, the map of the cleaning area (such as the current room) can be treated and the sweep lines can be arranged in a direction, either horizontally or vertically, such as each sweep line is horizontal to the Y-axis or horizontal to the X-axis.

[0079] S203: clustering the bow sweeping lines that can continuously turn and perform uninterrupted cleaning in the area to be cleaned into the same block, and dividing the area to be cleaned into a plurality of blocks to be cleaned.

[0080] Of course, the clustering division is the set of uncleaned bow sweep lines in the uncleaned area, and the uncleaned area may not be clustered to be cleaned blocks. At this time, loop through two consecutive bow sweep lines with only one adjacent spacing in horizontal or vertical distance. If the two endpoints of the two straight lines are within a certain distance range, it is considered that the two lines can be directly connected by turning, and the two bow sweep lines are placed in the same block, otherwise they are placed in a new block, until all the straight lines in the set of uncleaned bow sweep lines are divided into several blocks, and multiple blocks to be cleaned are obtained.

[0081] S204: Determine the endpoints of the two longest-distance sweep lines in each block to be cleaned as the pre-selected starting point and end point of the block to be cleaned.

[0082] In order to ensure the continuity of the bow sweep line in the block to be cleaned, by default, one of the two outermost bow sweep lines in the block to be cleaned is selected as the starting line of the block cleaning, and the other is selected as the ending line of the block cleaning. Both endpoints of the starting line can be used as the starting point. If any endpoint is selected as the starting point s, one of the corresponding endpoints of the other block ending line can be determined as the end point e according to the continuous bow sweep sequence in the block. The starting point and the end point are reversible. At this time, there are two pairs of one-to-one corresponding starting points and end points in the block to be cleaned. The global optimal starting point and the corresponding end point of the bow sweep block will be determined in the subsequent solution of the traveling salesman problem. Figure 2 As shown, in the current irregular environment, due to the existence of several obstacles, the bow-sweep line is divided into ten blocks to be cleaned, where the black solid line is the outermost bow-sweep line in the block to be cleaned, and the black dotted line is the continuous bow-sweep line in the block to be cleaned. After the machine starts from the base station position (station) and covers and cleans all the blocks to be cleaned, it goes to the door of the room (door) to clean the next uncleaned room.

[0083] S205: In combination with the starting point and the end point of the area to be cleaned, the starting point and the end point of the block to be cleaned are determined from the pre-selected starting points and the end points of each block to be cleaned, and the order between the blocks to be cleaned is determined to obtain at least one initial cleaning path for the area to be cleaned.

[0084] The optimal cleaning order can be transformed into the Traveling Salesman Problem (TSP). Each block to be cleaned can be regarded as a "city" of the TSP. The cost of a city is the sum of the lengths of all the bow sweep lines in the block to be cleaned and the turning distance between two consecutive bow sweep lines in the block to be cleaned. The cost of the transition between cities is the moving distance of the cleaning robot from the end point of the current block to be cleaned to the starting point of the next block to be cleaned. Therefore, the optimal cleaning order can be transformed into solving the shortest path from the starting point of the cleaning task to traverse all the blocks to be cleaned and reach the end point of the cleaning task.

[0085] In step S201, the area to be cleaned is determined, including the starting point and the end point of the area to be cleaned. In step S204, the pre-selected starting point and the end point of the block to be cleaned are determined. At this time, the starting point and the end point of the area to be cleaned, the pre-selected starting point and the end point of the block to be cleaned, and the order between the blocks to be cleaned can be combined to solve the cleaning path of the area to be cleaned.

[0086] With regard to the cleaning path of the area to be cleaned, in some examples, the endpoints of the two farthest bow scanning lines in each block to be cleaned can be determined as the pre-selected starting point and end point of the block to be cleaned, and the starting point and end point of each block to be cleaned can be randomly arranged to obtain multiple initial cleaning paths (initial cleaning path set) for the area to be cleaned, and then iteration is performed based on these multiple initial cleaning paths.

[0087] In some other examples, for solving the cleaning path of the area to be cleaned, a better initial cleaning path can be obtained based on the breadth-first search (BFS) algorithm, and then iterated based on the initial cleaning path. Of course, these two methods of obtaining the initial cleaning path can also be combined. First, the local optimal cleaning order is obtained based on the greedy idea, and the initial cleaning path is composed of several cleaning orders obtained by the random strategy. The first generation of cleaning paths is obtained through path cost calculation and screening, and then the crossover mutation operation is performed cyclically to obtain the second generation of cleaning paths after the convergence conditions are met.

[0088] Here, the steps to obtain a better initial cleaning path based on the breadth-first search (BFS) algorithm are: according to the current location of the cleaning robot, the breadth-first search algorithm is used to search for the center point A of the nearest block to be cleaned, and then the other nearest center points B are searched through the center point A of the block to be cleaned, and the cycle is repeated until the end of the area to be cleaned is searched from the last block to be cleaned, and the sequence from the nearest block to the last block to be cleaned is used as the initial cleaning path of the area to be cleaned. This allows the genetic algorithm to converge to the optimal solution faster, and before starting crossover mutation, a local optimal solution can be calculated using the greedy idea.

[0089] S206: Calculate the path cost of the cleaning path, and retain the cleaning path that meets the preset path cost as the first generation cleaning path.

[0090] In the traditional traveling salesman problem, the path cost between cities is generally calculated using the Euclidean distance between cities. However, in the embodiment of the present invention, there are often many obstacles between the "city" blocks to be cleaned, and the real path between two blocks to be cleaned needs to bypass obstacles, so the Euclidean distance cannot reflect the real distance between the blocks to be cleaned. The embodiment of the present invention provides a method of adding a certain penalty value according to the number of obstacles on the connecting grid between the blocks to be cleaned on the map, so as to calculate a more realistic cleaning path without excessive consumption of computing resources, and at the same time reduce the possibility of passing obstacles during the cleaning process.

[0091] In the embodiments provided in the present application, one or more of the total length of the bow-sweep lines in the blocks to be cleaned in each cleaning path, the turning cost of the bow-sweep lines in the blocks to be cleaned in each cleaning path, the transition distance between the blocks to be cleaned in each cleaning path, and the obstacle penalty value between the blocks to be cleaned in each cleaning path can be used as the path cost of each cleaning path.

[0092] In some examples provided by the embodiments of the present invention, the path cost of calculating the cleaning path can be calculated by the following formula:

[0093]

[0094] Where N represents the maximum number of blocks to be cleaned;

[0095] D={D1,D2,…,D N} is the set of blocks to be cleaned;

[0096] C i Block D to be cleaned i The internal cleaning cost includes the total length of the bow sweep line and the turning cost within the block to be cleaned);

[0097] D ij From the block to be cleaned D i The exit to the block D to be cleaned j Transition distance of the entrance;

[0098] P ij From the block to be cleaned D i The exit to the block D to be cleaned j The penalty value of obstacles on the way during the entrance process;

[0099] S is the starting point, E is the end point; π=(π1,π2,…,π k ,…,π N ) is the access order of the blocks to be cleaned.

[0100] S207: performing floating point encoding on each of the retained first-generation cleaning paths to obtain a floating point encoding group corresponding to each of the first-generation cleaning paths;

[0101] Each retained first-generation cleaning path is represented as a set of floating-point arrays (floating-point encoding), including multiple floating-point numbers, the real digits of the floating-point numbers are the block numbers, and the decimal digits are the endpoint numbers of the blocks corresponding to the real digits, which facilitates subsequent cross-mutation operations and decoding operations. Figure 3 As shown, the floating point encoding group has N bits in total, n is the total number of blocks, and the order of the floating point encoding represents the cleaning order of the blocks.

[0102] S208: Cross the floating-point number arrays in the floating-point number coding groups of the first-generation cleaning paths, mutate to obtain new floating-point number coding groups, and use the newly obtained floating-point number coding groups as the second-generation cleaning paths.

[0103] Crossover is the process used in genetic algorithms to combine two parent individuals to produce offspring. For floating-point encoding, a commonly used crossover method can be two-point crossover, where two crossover points are randomly selected in the floating-point gene, and the real and decimal places of the parent individuals are randomly exchanged between these crossover points to generate new offspring. If there are repeated or default real number numbers in the gene individuals generated after the crossover, the two other blocks closest to the current block endpoints are selected and placed between them.

[0104] The mutation operation is the process used to introduce new genetic diversity in genetic algorithms. For floating-point encoding, the commonly used mutation method can be random mutation, which randomly generates decimal places within the range of endpoint numbers 1 to 4 and forms new values ​​with real places.

[0105] Floating point number decoding is the process of converting the encoded floating point number array into the actual solution to the problem. The floating point number encoding and decoding of the embodiment of the present application is usually very direct, because the encoded floating point number directly represents the solution to the problem. Figure 3As shown, the bow scanning order of the area to be cleaned starts from the first endpoint of the fourth block, and starts from the end point corresponding to the first endpoint of the current block to the second endpoint of the third block to start bow scanning, and arranges in sequence until reaching the third endpoint of the last second block, and after cleaning, goes to the end point of the current cleaning task (usually the base station).

[0106] S209: Return to execute S206 until the maximum number of iterations is reached, the fitness value reaches a certain threshold, or there is no significant fitness value for several consecutive generations.

[0107] Evolutionary algorithms such as genetic algorithms are iterative search algorithms that start from an initial population and generate new populations generation after generation by continuously performing operations such as selection, crossover, and mutation. The maximum number of iterations is the maximum number of iterations allowed by the algorithm. When the algorithm reaches this maximum number of iterations, it will stop running and output the current optimal result regardless of whether the optimal solution is found. This is to avoid the algorithm from looping indefinitely and to ensure that the algorithm completes the task within limited time and computing resources.

[0108] The fitness value is an indicator used to measure the quality of individuals in a population, and it is usually related to the objective function of the problem. In a genetic algorithm, each individual has a fitness value, which reflects the individual's ability to adapt to the environment or solve problems. When the fitness value reaches a certain threshold, it means that the algorithm has found a good enough solution that meets the requirements of the problem or achieves the expected accuracy. At this point, the algorithm can stop running, because continuing to iterate may not bring better results, or even if better results can be obtained, the degree of improvement may be outside the acceptable range.

[0109] During the algorithm iteration process, if the optimal fitness value of the population does not increase or change significantly for several consecutive generations, it means that the algorithm may have converged to a local optimal solution or near the global optimal solution, and it is difficult to find a better solution through further iterations. The "no obvious change" here can be judged by setting a specific threshold, for example, the change in the optimal fitness value for consecutive k generations is less than a certain minimum value ∈. In this case, continuing to iterate may only be an invalid search near the current optimal solution, wasting computing resources, so the algorithm can be stopped.

[0110] S210: Determine a cleaning path with the lowest path cost as a target cleaning path;

[0111] Based on the method for calculating the path cost of the cleaning path in step S206, the cleaning path with the lowest path cost can be selected from the second cleaning paths as the target cleaning path.

[0112] S211: Control the cleaning robot to clean the area to be cleaned according to the target cleaning path.

[0113] S212: During the cleaning process, obstacles may be encountered. If an obstacle is encountered, the obstacle can be removed along the edge;

[0114] S213: performing secondary division on the block to be cleaned where the obstacle is located based on the bow-scan line clustering method to obtain multiple blocks to be cleaned where the obstacle is located.

[0115] S214: replanning the cleaning path for each obstacle to be cleaned block;

[0116] S215: After controlling the cleaning robot to clean the to-be-cleaned blocks according to the cleaning path, continue to clean other to-be-cleaned blocks of the target cleaning path.

[0117] After step S213, the block to be cleaned where the obstacle is located is divided again according to the above steps S202 to S203, and the block to be cleaned where the obstacle is located is subdivided into multiple small blocks. The cleaning path of the block to be cleaned (each small block) where the obstacle is located is recalculated according to steps S204 and S205, and then the block to be cleaned is cleaned according to the cleaning path. After the cleaning is completed, other blocks to be cleaned on the target cleaning path (i.e., other blocks to be cleaned other than the block to be cleaned where the obstacle is located) are further cleaned.

[0118] The blocks to be cleaned are divided based on the bow-sweep line clustering method, which is more in line with the bow-sweep cleaning path and thus facilitates improving efficiency and coverage; secondly, the obtained path is planned for the entire area to be cleaned, which can improve efficiency and coverage; then, in order to prevent premature convergence to the local optimal solution, the cleaning paths that meet the preset path costs are screened for cross-mutation to obtain new cleaning paths, and then the cleaning path with the lowest path cost is determined from the newly obtained cleaning paths and the retained cleaning paths as the target cleaning path, and the cleaning robot is controlled to clean the area to be cleaned according to the target cleaning path. The cleaning robot control method provided by the present invention can cope with coverage cleaning in complex environments to ensure the cleaning efficiency and coverage of the robot.

[0119] In order to solve the above technical problems, the embodiment of the present invention also provides a cleaning robot. Figure 4 , Figure 4 The basic structural block diagram of the control device of the cleaning robot in this embodiment includes:

[0120] A determining device for determining an area to be cleaned;

[0121] A clustering division device, used for dividing the area to be cleaned into a plurality of blocks to be cleaned based on a bow-scanning line clustering method;

[0122] A cleaning path determination device, used to determine the cleaning path in each to-be-cleaned block, and determine the cleaning order of each to-be-cleaned block in the to-be-cleaned area, to obtain at least one initial cleaning path for the to-be-cleaned area;

[0123] A path cost calculation device, used to calculate the path cost of each initial cleaning path, and retain the initial cleaning path that meets the preset path cost as the first generation cleaning path;

[0124] A crossover mutation device, used for performing crossover mutation on the retained first-generation cleaning path to obtain a second-generation cleaning path;

[0125] The path cost calculation device is also used to determine the cleaning path with the lowest path cost from the first generation cleaning path and the second generation cleaning path as the target cleaning path;

[0126] The cleaning control device is used to control the cleaning robot to clean the area to be cleaned according to the target cleaning path.

[0127] Optionally, the crossover mutation device is further used to perform floating point encoding on each retained first-generation cleaning path to obtain a floating point encoding group corresponding to each first-generation cleaning path;

[0128] The floating-point number arrays in the floating-point number encoding groups of the first-generation cleaning paths are crossed, and a new floating-point number encoding group is obtained by mutation, and the newly obtained floating-point number encoding group is used as the second-generation cleaning path.

[0129] Optionally, the cluster division device is further used to evenly place the bow scanning lines in the non-obstacle area in the area to be cleaned at equal intervals in the same direction;

[0130] The bow sweeping lines that can continuously turn and perform uninterrupted cleaning in the area to be cleaned are clustered into the same block, and the area to be cleaned is divided into a plurality of blocks to be cleaned.

[0131] Optionally, the cleaning path determination device further comprises: determining the endpoints of the two longest-distance bow sweep lines in each of the to-be-cleaned blocks as the pre-selected starting point and end point of the to-be-cleaned blocks;

[0132] The starting point and the end point of the block to be cleaned are determined from the pre-selected starting points and the end points of the blocks to be cleaned according to the genetic algorithm, and the order between the blocks to be cleaned is determined to obtain at least one initial cleaning path for the area to be cleaned.

[0133] The cleaning robot control device provided by the present invention can cope with coverage cleaning in complex environments to ensure the cleaning efficiency and coverage rate of the robot.

[0134] The present invention also provides a cleaning robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements each step of any one of the above-described control methods for the cleaning robot when executing the computer program. Figure 5 , Figure 5 The basic structural block diagram of a cleaning robot is shown, and the cleaning robot includes a processor and a memory connected by a system bus. Among them, the memory stores an operating system, a database and a computer-readable instruction, and a control information sequence may be stored in the database. When the computer-readable instruction is executed by the processor, the processor can implement the control method of the cleaning robot. The processor of the cleaning robot is used to provide computing and control capabilities to support the operation of the entire terminal. The memory of the terminal may store computer-readable instructions, and when the computer-readable instruction is executed by the processor, the processor can execute the control method of the cleaning robot. The network interface of the terminal is used to connect and communicate with the terminal. It can be understood by those skilled in the art that the structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0135] Technicians in this technical field can understand that the "cleaning robot" used here refers to a device that can be moved for cleaning, which can be a sweeper, a mop, a sweeping and mopping robot, and other intelligent mobile cleaning devices.

[0136] The present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to execute each step of the control method of the cleaning robot introduced in any of the above embodiments.

[0137] This embodiment also provides a computer program that can be distributed on a computer-readable medium and executed by a computing device to implement at least one step of the above-mentioned control method for the cleaning robot; and in some cases, at least one of the steps shown or described can be executed in an order different from that described in the above embodiments.

[0138] This embodiment further provides a computer program product, including a computer readable device, on which the computer program as shown above is stored. In this embodiment, the computer readable device may include the computer readable storage medium as shown above.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0140] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0141] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0142] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A control method for a cleaning robot, characterized in that: The control method comprises: Identify the area to be cleaned; Dividing the area to be cleaned into a plurality of blocks to be cleaned based on the bow-sweep line clustering method; Determine a cleaning path in each to-be-cleaned block, and determine a cleaning order of each to-be-cleaned block in the to-be-cleaned area, to obtain at least one initial cleaning path for the to-be-cleaned area; Calculate the path cost of each initial cleaning path, and retain the initial cleaning path that meets the preset path cost as the first generation cleaning path; The retained first-generation cleaning paths are subjected to cyclic selection and crossover mutation, and the second-generation cleaning paths are obtained after the convergence conditions are met; Determine a cleaning path with the lowest path cost from the second-generation cleaning paths as a target cleaning path; The cleaning robot is controlled to clean the area to be cleaned according to the target cleaning path.

2. The control method according to claim 1, characterized in that: The method of performing cyclic selection and crossover mutation on the retained first-generation cleaning paths to obtain the second-generation cleaning paths after the convergence condition is met includes: Perform floating point encoding on each retained first-generation cleaning path to obtain a floating point encoding group corresponding to each first-generation cleaning path; The floating-point number arrays in the floating-point number encoding groups of the first-generation cleaning paths are crossed and mutated to obtain new floating-point number encoding groups, and the ones that meet the convergence conditions are determined from the newly obtained floating-point number encoding groups as the second-generation cleaning paths.

3. The control method according to claim 1, characterized in that: The method of dividing the area to be cleaned into a plurality of blocks to be cleaned based on the bow-scan line clustering method includes: Arranging the bow scanning lines evenly and at equal intervals in the same direction in the non-obstacle area of ​​the area to be cleaned; The bow sweeping lines that can continuously turn and perform uninterrupted cleaning in the area to be cleaned are clustered into the same block, and the area to be cleaned is divided into a plurality of blocks to be cleaned.

4. The control method according to claim 1, characterized in that: The determining of the cleaning paths in each to-be-cleaned block and the determining of the cleaning order of each to-be-cleaned block in the to-be-cleaned area to obtain at least one initial cleaning path for the to-be-cleaned area includes: Determine the endpoints of the two longest-distance sweeping lines in each of the blocks to be cleaned as the preselected starting point and end point of the blocks to be cleaned, randomly arrange the starting point and end point of each of the blocks to be cleaned, and obtain multiple initial sweeping paths for the area to be cleaned; Or / and, according to the current position of the cleaning robot, a breadth-first search algorithm is used to search for the nearest block to be cleaned, and then the nearest other blocks to be cleaned are searched through the block to be cleaned, and the cycle is repeated until the end of the area to be cleaned is searched from the last block to be cleaned, and the order from the nearest block to be cleaned to the last block to be cleaned is used as the initial cleaning path.

5. The control method according to claim 4, characterized in that: Determining the area to be cleaned also includes determining a starting point and an end point of the area to be cleaned; Then, the step of determining the cleaning paths in each to-be-cleaned block and determining the cleaning order of each to-be-cleaned block in the to-be-cleaned area to obtain at least one initial cleaning path for the to-be-cleaned area includes: In combination with the starting point and end point of the area to be cleaned, the endpoints of the two longest-distance sweeping lines in each block to be cleaned are determined as the pre-selected starting point and end point of the block to be cleaned, and the starting point and end point of each block to be cleaned are randomly arranged to obtain multiple initial cleaning paths for the area to be cleaned.

6. The control method according to any one of claims 1 to 5, characterized in that: The convergence conditions include: The cyclic selection crossover mutation reaches the maximum number of iterations, the fitness value reaches a certain threshold, or the fitness value does not show significant difference for several consecutive generations; Otherwise, return to the step of calculating the path cost of each initial cleaning path, and retain the initial cleaning path that meets the preset path cost as the first generation cleaning path.

7. The control method according to any one of claims 1 to 5, characterized in that: Determining the starting point and the end point of the area to be cleaned includes: When there is only one area to be cleaned, determining the location of the base station of the cleaning robot as the end point of the area to be cleaned; When there are multiple areas to be cleaned, a passage between the area to be cleaned and other areas to be cleaned is determined as an end point of the area to be cleaned.

8. The control method according to any one of claims 1 to 5, characterized in that: The calculating of the path cost of each initial cleaning path includes: One or more of the following information is used as the path cost of each cleaning path: The total length of the bow sweep line in the blocks to be cleaned in each cleaning path; The turning cost of the bow sweep line in the block to be cleaned in each cleaning path; The transition distance between the blocks to be cleaned in each cleaning path; The obstacle penalty value between the blocks to be cleaned in each cleaning path.

9. The control method according to any one of claims 1 to 5, characterized in that: After controlling the cleaning robot to clean the area to be cleaned according to the target cleaning path, the method further includes: When an obstacle is encountered during the cleaning process, the obstacle is edged; The block to be cleaned where the obstacle is located is divided twice based on the bow-sweep line clustering method to obtain multiple blocks to be cleaned; Replan the cleaning path for each obstacle to be cleaned; After controlling the cleaning robot to clean the to-be-cleaned blocks according to the cleaning path, the cleaning robot continues to clean other to-be-cleaned blocks of the target cleaning path.

10. A cleaning robot, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements each step of the control method of the cleaning robot as described in any one of claims 1 to 9 when executing the computer program.

Citation Information

Patent Citations

  • Robot traversal control method, chip and cleaning robot

    CN110362079A

  • Cleaning robot path planning method and cleaning robot

    CN111930111A

  • Planning method and device of cleaning path

    CN115248042A

  • Arch sweeping direction selection method of cleaning robot and cleaning robot

    CN115670295A

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

    CN115755954A