Cleaning path planning method and device, equipment, medium and program product

By dynamically planning the cleaning path of the sweeping robot and using Euclidean distance to select the optimal path, the problems of high energy consumption and repeated traversal in the existing technology are solved, and the cleaning efficiency and user experience are improved.

CN119124201APending Publication Date: 2024-12-13GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411264410.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively plan the cleaning path of sweeping robots, resulting in high energy consumption and repeated traversals, affecting the cleaning efficiency and user experience.

Method used

By obtaining the current location of the sweeper, determining the room and sub-region, querying the adjacent sub-region, dynamically planning the path, using Euclidean distance as the cost function, selecting the optimal path, and avoiding complex path planning algorithms and load cost functions.

Benefits of technology

It realizes low-energy-consuming and efficient cleaning path planning, avoids repeated traversals, and improves the user experience and the intelligence level of sweeping robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119124201A_ABST
    Figure CN119124201A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of household appliance control, and discloses a sweeping path planning method, device and equipment, a medium and a program product, and the method comprises the steps: determining a current room where a sweeper is located and a current sub-region in the current room according to the current position of the sweeper; querying all adjacent sub-regions adjacent to the current sub-region according to a preset region division state, and determining different path strategies based on the current sub-region and the adjacent sub-regions; taking the adjacent sub-region as the current sub-region, supplementing the path strategy through circular query until all the sub-regions in the current room are queried, and obtaining a plurality of cleaning paths; and selecting the sweeping path corresponding to the minimum Euclidean distance to control the sweeper to sweep in the current room. According to the method, multiple cleaning paths can be dynamically and efficiently planned on the basis of not depending on a complex path planning algorithm and a load cost function, low energy consumption and attractiveness of the cleaning paths are guaranteed, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of household appliance control technology, and in particular to a cleaning path planning method, device, equipment, medium and program product. Background Art

[0002] Before starting to perform full-coverage cleaning, the intelligent sweeping robot will prioritize perception and mapping, and generate an environmental map. On this basis, it will segment the environmental map with obstacles to form multiple obstacle-free sub-areas, and perform full-coverage planning and cleaning.

[0003] Among them, designing corresponding algorithms to achieve a reasonable partition connection strategy can allow the sweeping robot to connect each sub-area with the shortest possible path, effectively avoiding unnecessary consumption of machine energy, preventing the area that has been swept and mopped from being traversed again to cause secondary pollution, and creating an efficient and beautiful product functional image at the customer level. Therefore, it is very necessary to coordinate the paths of the sweeping robot to traverse these barrier-free sub-areas. The existing technology coordinates the adjacency relationship between partitions by designing a connectivity graph, and designs a set of complex cost functions between regions. It determines whether to go to the next area by calculating the cost value, and cannot achieve high-efficiency and low-energy cleaning path planning. Summary of the invention

[0004] In view of this, the present invention provides a cleaning path planning method, device, equipment, medium and program product to solve the problem of complex cleaning path planning algorithm.

[0005] In a first aspect, the present invention provides a method for planning a cleaning path, the method comprising:

[0006] Get the current position of the sweeper, determine the current room where the sweeper is located according to the current position, and determine the current sub-area of ​​the sweeper in the current room according to the preset area division status;

[0007] Query all adjacent sub-areas adjacent to the current sub-area according to the preset area division status, and determine different path strategies based on the current sub-area and the adjacent sub-areas;

[0008] The adjacent sub-region is taken as the current sub-region, and the process returns to the step of querying all adjacent sub-regions adjacent to the current sub-region according to the preset region division result, and the path strategy is supplemented until all sub-regions in the current room are queried and multiple cleaning paths are obtained;

[0009] The Euclidean distances of all cleaning paths are calculated, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean the current room.

[0010] The cleaning path planning method provided by the embodiment of the present invention determines the current room of the sweeper according to the current position, determines the current sub-area in the current room according to the preset area division state, queries all adjacent sub-areas adjacent to the current sub-area, and determines different path strategies based on the current sub-area and the adjacent sub-area, takes the adjacent sub-area as the current sub-area, and returns to the step of querying all adjacent sub-areas adjacent to the current sub-area, until all sub-areas in the current room are queried, and multiple cleaning paths are obtained, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean in the current room. The present invention traverses the adjacent sub-areas in turn according to the current sub-area, and selects the optimal path at the cost of the Euclidean distance. It can dynamically and efficiently plan multiple cleaning paths without relying on complex path planning algorithms and load cost functions. Moreover, the cleaning path is planned based on the proximity of the area, which can ensure the low energy consumption and beauty of the cleaning path and improve the user experience.

[0011] In an optional embodiment, after determining the current sub-area of ​​the sweeper in the current room according to the preset area division status, it also includes: determining the first area number corresponding to the current sub-area according to the preset area division status, placing the first area number in an adjacent queue, and adding the first area number to the head end of the path strategy in the path strategy container.

[0012] The present invention can update the path strategy based on the adjacent area by setting the adjacent queue and the path strategy container, and it is not easy to miss when traversing by using the queue, and dynamic path planning can be realized.

[0013] In an optional implementation, all adjacent sub-areas adjacent to the current sub-area are queried according to a preset area division state, and different cleaning paths are determined based on the current sub-area and the adjacent sub-areas, including: all adjacent sub-areas adjacent to the current sub-area are queried according to the preset area division state, and the second area number corresponding to the adjacent sub-area is determined, the number of areas of the adjacent sub-area is at least one, and the number of corresponding second area numbers is at least one; the path strategy with the first area number at the tail end is used as the target path strategy, and it is determined whether the target path strategy contains the second area number; if not, each second area number is added to the tail end of the target path strategy, so that the same target path strategy is updated to a new path strategy according to the number of areas, and if included, it is not added; the first area number at the head position in the adjacent queue is taken out, and each second area number is put into the adjacent queue from the tail position in sequence.

[0014] The present invention traverses the adjacent sub-areas of the current sub-area and continuously updates the path strategy based on the area proximity, so as to dynamically and efficiently plan a variety of cleaning paths, thereby improving the intelligence level of the sweeping robot. Moreover, the path planning algorithm is relatively simple and efficient path planning can be achieved.

[0015] In an optional implementation, taking the adjacent sub-region as the current sub-region includes: taking the adjacent sub-region corresponding to the second region number at the head position in the adjacent queue as the current sub-region, and updating the first region number to the second region number.

[0016] The present invention is based on the first-in-first-out principle of the queue, can realize the traversal of each sub-area, and gradually complete the exploration of each sub-area, and is not prone to confusion or omission.

[0017] In an optional embodiment, after taking the adjacent sub-region corresponding to the second region number at the head position in the adjacent queue as the current sub-region and updating the first region number to the second region number, it also includes: if the second region number is the same as the first region number, taking out the second region number at the head position in the adjacent queue, and returning to the step of taking the adjacent sub-region corresponding to the second region number at the head position in the adjacent queue as the current sub-region and updating the first region number to the second region number.

[0018] The present invention can avoid repeated exploration of the same sub-area by exploring adjacent identical area numbers in the adjacent queue only once, reduce algorithm redundancy, and further achieve efficient path planning.

[0019] In an optional implementation, after all sub-areas in the current room have been queried and multiple cleaning paths have been obtained, it also includes: determining whether a sub-area is missing in the cleaning path according to a preset area division state, and if missing, supplementing the path according to the missing sub-area.

[0020] The present invention can avoid missing some areas during the cleaning process of the room by supplementing the missing sub-areas in the cleaning path, thereby achieving comprehensive cleaning of the room and improving the user experience.

[0021] In an optional implementation, the Euclidean distances of all cleaning paths are calculated, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean the current room, including: calculating the sub-Euclidean distances between the center positions of adjacent arranged sub-regions in sequence according to the arrangement order of the sub-regions included in the cleaning path; taking the sum of the sub-Euclidean distances of each adjacent arranged sub-region as the Euclidean distance of the cleaning path, and selecting the cleaning path corresponding to the minimum Euclidean distance to control the sweeper to clean the current room.

[0022] The embodiment of the present invention uses the Euclidean distance as the cost of the cleaning path, which can avoid simplifying the cost function, reduce the complexity of the path planning algorithm, and achieve efficient path planning.

[0023] In a second aspect, the present invention provides a cleaning path planning device, the device comprising:

[0024] A position determination module is used to obtain the current position of the sweeping machine, determine the current room where the sweeping machine is located according to the current position, and determine the current sub-area of ​​the sweeping machine in the current room according to the preset area division state;

[0025] An area query module is used to query all adjacent sub-areas adjacent to the current sub-area according to the preset area division status, and determine different path strategies based on the current sub-area and the adjacent sub-areas;

[0026] A path planning module is used to take the adjacent sub-area as the current sub-area, and return to the step of querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division result, and supplement the path strategy until all sub-areas in the current room are queried and multiple cleaning paths are obtained;

[0027] The path determination module is used to calculate the costs of all cleaning paths and select the cleaning path corresponding to the minimum cost to control the sweeper to clean the current room.

[0028] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the cleaning path planning method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0029] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the cleaning path planning method of the first aspect or any corresponding embodiment thereof.

[0030] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the cleaning path planning method of the above-mentioned first aspect or any corresponding embodiment thereof.

[0031] In a sixth aspect, the present invention provides a sweeping machine, comprising: the computer device of the third aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 is a flow chart of a cleaning path planning method according to an embodiment of the present invention;

[0034] Figure 2 is a schematic diagram of room division according to a cleaning path planning method according to an embodiment of the present invention;

[0035] Figure 3 is a schematic diagram of area division according to a method for planning a cleaning path according to an embodiment of the present invention;

[0036] Figure 4 is a flow chart of another cleaning path planning method according to an embodiment of the present invention;

[0037] Figure 5 is a schematic diagram of a judgment flow of another cleaning path planning method according to an embodiment of the present invention;

[0038] Figure 6 is a schematic diagram of queue data operation of another cleaning path planning method according to an embodiment of the present invention;

[0039] Figure 7 is a flow chart of another cleaning path planning method according to an embodiment of the present invention;

[0040] Figure 8 is a schematic diagram of a path strategy container of another cleaning path planning method according to an embodiment of the present invention;

[0041] Fig. 9 is a structural block diagram of a cleaning path planning device according to an embodiment of the present invention;

[0042] Fig.10 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0044] The embodiment of the present invention is applicable to the scene where a sweeper cleans the floor in a room. The embodiment of the present invention provides a cleaning path planning method, which traverses adjacent sub-areas in a room through a queue to achieve the effect of dynamic and efficient path planning.

[0045] According to an embodiment of the present invention, an embodiment of a method for planning a cleaning path is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0046] In this embodiment, a cleaning path planning method is provided, which can be used for a sweeping machine. Figure 1 is a flow chart of a method for planning a cleaning path according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0047] Step S101, obtaining the current position of the sweeping machine, determining the current room where the sweeping machine is located according to the current position, and determining the current sub-area of ​​the sweeping machine in the current room according to a preset area division state.

[0048] Specifically, in the embodiment of the present invention, taking a home as an example, a general home contains multiple rooms, and obstacles such as furniture or sundries arranged in the room separate the connected rooms. In order to facilitate the sweeping machine to clean the room comprehensively, such as Figure 2 As shown, the embodiment of the present invention uses a room detection algorithm to partition different rooms, such as room A, room B and room C; then a single room area decomposition algorithm is used to divide the area in the room without obstacles into multiple sub-areas, each of which has a corresponding number, such as Figure 3 As shown, the sub-areas include area 1, area 2, area 3, area 4 and area 5, and each room has a specific area division state, which is only for example and not limited to this.

[0049] In some optional implementations, when the sweeping machine needs to start cleaning, it first obtains its current position through its own positioning algorithm, then determines the current room based on the current position, and determines the current sub-area of ​​the sweeping machine in the current room based on the area division status in the current room.

[0050] Step S102: query all adjacent sub-regions adjacent to the current sub-region according to the preset region division state, and determine different path strategies based on the current sub-region and the adjacent sub-regions.

[0051] Specifically, in the embodiment of the present invention, in order for the sweeper to traverse as many cleaning areas as possible at one time, the current sub-area where the sweeper is located is used as the starting cleaning area, and the adjacent sub-area adjacent to the current sub-area is used as the next cleaning area, so as to gradually plan the cleaning path. However, since there may be more than one adjacent sub-area adjacent to the current sub-area, the embodiment of the present invention abstracts the cleaning path planning problem into a business travel problem, and performs dynamic path planning based on graph theory. By setting an adjacent queue, the area numbers of all adjacent sub-areas are placed in the adjacent queue and traversed in turn, so as to achieve the exploration of the current sub-area, thereby determining different path strategies based on the current sub-area and each adjacent sub-area, and placing the area number of each sub-area in the path strategy into the path strategy of the path strategy container.

[0052] Step S103, taking the adjacent sub-area as the current sub-area, and returning to the step of querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division result, supplementing the path strategy, until all sub-areas in the current room are queried and multiple cleaning paths are obtained.

[0053] Specifically, in an embodiment of the present invention, after completing the exploration of the current sub-area, it is equivalent to completing the path planning of two sub-areas, but at this time there are other sub-areas that have not been planned into the path, so the adjacent sub-area is used as the current sub-area, and the adjacent sub-area is explored again. Because there may be more than one adjacent sub-area, it is necessary to explore each adjacent sub-area in this way. Therefore, the embodiment of the present invention takes out the area number corresponding to each adjacent sub-area from the adjacent queue in turn, thereby realizing the exploration of each adjacent sub-area in turn, and after each new adjacent sub-area is explored, the corresponding area number is placed in the adjacent queue. Through loop iteration, the corresponding path strategy can be supplemented after each exploration until all sub-areas in the current room are queried and multiple cleaning paths are obtained.

[0054] Step S104, calculating the Euclidean distances of all cleaning paths, and selecting the cleaning path corresponding to the minimum Euclidean distance to control the sweeping machine to clean the current room.

[0055] Specifically, in an embodiment of the present invention, the Euclidean distance of the cleaning path formed by different sub-areas is used as the cost of this path. Different cleaning paths have different Euclidean distances, that is, different cleaning paths have different lengths. In order to achieve efficient house cleaning, the cleaning path corresponding to the minimum Euclidean distance is selected as the target path, so as to control the sweeper to clean each sub-area in turn according to the target path until the current room is fully cleaned. Among them, path planning will be further performed in the sub-area to ensure that the sweeper can completely clean the sub-area. The specific path planning is a conventional technical means in this field and will not be repeated here.

[0056] In some optional implementations, by controlling the sweeper to clean all sub-areas in the current room and when it is necessary to go to the next room, the embodiments of the present invention calculate the Euclidean distance between different rooms at the room level, and go to the nearest room to continue cleaning until all rooms are cleaned.

[0057] The cleaning path planning method provided by the embodiment of the present invention determines the current room of the sweeper according to the current position, determines the current sub-area in the current room according to the preset area division state, queries all adjacent sub-areas adjacent to the current sub-area, and determines different path strategies based on the current sub-area and the adjacent sub-area, takes the adjacent sub-area as the current sub-area, and returns to the step of querying all adjacent sub-areas adjacent to the current sub-area, until all sub-areas in the current room are queried, and multiple cleaning paths are obtained, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean in the current room. The present invention traverses the adjacent sub-areas in turn according to the current sub-area, and selects the optimal path at the cost of the Euclidean distance. It can dynamically and efficiently plan multiple cleaning paths without relying on complex path planning algorithms and load cost functions. Moreover, the cleaning path is planned based on the proximity of the area, which can ensure the low energy consumption and beauty of the cleaning path and improve the user experience.

[0058] In this embodiment, a cleaning path planning method is provided, which can be used for the above-mentioned sweeping machine. Figure 4 is a flow chart of a method for planning a cleaning path according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0059] Step S401, obtain the current position of the sweeping machine, determine the current room where the sweeping machine is located according to the current position, and determine the current sub-area of ​​the sweeping machine in the current room according to the preset area division state. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0060] Step S402: determine the first area number corresponding to the current sub-area according to the preset area division state, put the first area number into the adjacent queue, and add the first area number to the head end of the path policy in the path policy container.

[0061] Specifically, in the embodiment of the present invention, Figure 5As shown, area numbers are pre-assigned to each room and each sub-area in the room, and the area number corresponding to the current sub-area where the sweeper is located is placed in the adjacent queue, forming an adjacent queue of [1]. At the same time, in order to display different cleaning paths, the embodiment of the present invention sets a special data structure as a path strategy container for storing multiple groups of path strategies. Each group of path strategies stores the area numbers of the sub-areas in the traversal order, where the area number of the current sub-area is placed at the head, that is, {1}, and the Euclidean distance required to access each sub-area is calculated in this order, which is used as the cost of the path strategy. As the traversal proceeds, the number of areas included in a single group of path strategies may gradually increase, and the cost will change accordingly.

[0062] Step S403: query all adjacent sub-regions adjacent to the current sub-region according to the preset region division state, and determine different path strategies based on the current sub-region and the adjacent sub-regions.

[0063] Specifically, the above step S403 includes:

[0064] Step S4031: query all adjacent sub-regions adjacent to the current sub-region according to the preset region division state, and determine the second region number corresponding to the adjacent sub-region.

[0065] Specifically, in the embodiment of the present invention, assuming that the current sub-area where the sweeper is located is area 1, according to the following Figure 3 The region division status shown in the figure queries the adjacent sub-regions adjacent to region 1 and determines the corresponding region numbers, including: region 2, region 3, and region 5. Therefore, the number of adjacent sub-regions adjacent to region 1 is 3, and the corresponding region numbers are 3. At this time, it is impossible to determine which path is the most suitable from region 1 to region 2, region 3, or region 5, and it is necessary to continue traversing and exploring.

[0066] Step S4032: taking the path policy whose tail end is the first area number as the target path policy, and determining whether the target path policy includes the second area number.

[0067] Specifically, in the embodiment of the present invention, before traversing the next sub-region, the path strategy in the path strategy container is updated according to the adjacent sub-region. Among them, because region 1 is being explored, the path strategy with the tail end corresponding to region number 1 of the current sub-region is used as the target path strategy, that is, {1}. At the same time, in order to prevent duplicate sub-regions from appearing in the path strategy, it is necessary to determine whether the target path strategy contains the region number of the adjacent sub-region. If it does, the corresponding region number will not be added to the target path strategy.

[0068] Step S4033: If not included, each second area number is added to the end of the target path policy so that the same target path policy is updated to a new path policy according to the number of areas; if included, it is not added.

[0069] Specifically, in the embodiment of the present invention, because there is only the path policy {1} in the path policy container at this time, it does not include the area numbers 2, 3 or 5 corresponding to the adjacent sub-areas. Therefore, the area numbers 2, 3 and 5 are directly added to the end of the target path policy respectively, so that one target path policy {1} is updated to 3 path policies: {1,2}, {1,3} and {1,5}.

[0070] Step S4034, taking out the first area number at the head position in the adjacent queue, and sequentially putting each second area number from the tail position into the adjacent queue.

[0071] Specifically, in the embodiment of the present invention, Figure 5 As shown in FIG. 1 , when the exploration of region 1 is completed, the corresponding region number is taken out from the head position of the adjacent queue, and the region numbers of all adjacent sub-regions are sequentially put in from the end of the queue. The order of putting in is not limited. Therefore, the adjacent queue [1] is updated to [2,3,5]. This is just an example and is not limited to this. The process of taking out and putting in is as follows: Figure 6 shown.

[0072] Step S404, taking the adjacent sub-area as the current sub-area, and returning to the step of querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division result, supplementing the path strategy, until all sub-areas in the current room are queried and multiple cleaning paths are obtained.

[0073] Specifically, the above step S404 includes:

[0074] Step S4041: The adjacent sub-region corresponding to the second region number at the head position in the adjacent queue is used as the current sub-region, and the first region number is updated to the second region number.

[0075] Specifically, in the embodiment of the present invention, the adjacent queue [2,3,5] contains three adjacent sub-regions adjacent to region 1: region 2, region 3 and region 5, which is equivalent to having completed the exploration of region 1, and it is necessary to take out the adjacent sub-region from the adjacent queue [2,3,5] to continue the exploration. In accordance with the first-in-first-out principle of the queue, the embodiment of the present invention takes out region number 5 at the head of the adjacent queue, and uses the corresponding region 5 as the current sub-region that needs to be explored.

[0076] Step S4042, if the second area number is the same as the first area number, take out the second area number at the head position in the adjacent queue, and return to the step of taking the adjacent sub-area corresponding to the second area number at the head position in the adjacent queue as the current sub-area, and updating the first area number to the second area number.

[0077] Specifically, in the embodiment of the present invention, if the adjacent area numbers in the adjacency queues are the same, after exploring the sub-area corresponding to the area number once, the exploration of the sub-area is directly skipped subsequently, thereby avoiding invalid exploration.

[0078] In some optional implementations, the embodiments of the present invention are Figure 3 The sub-areas shown include area 1 to area 5. The sweeper is currently in area 1 for example. The exploration and traversal process of each adjacent sub-area is shown in the following table, where the bold path strategy is the path strategy updated in this iteration:

[0079]

[0080]

[0081] In the subsequent traversal process, the path strategy container has traversed all sub-areas, that is, the cleaning paths formed by all adjacent sub-areas have been traversed. Other paths may have non-adjacent sub-areas, resulting in a higher cost for the cleaning paths, which need not be considered.

[0082] Step S4043, determining whether a sub-area is missing in the cleaning path according to the preset area division status, and if so, supplementing the path according to the missing sub-area.

[0083] Specifically, in the embodiment of the present invention, the partial path strategy currently traversed no longer has adjacent sub-areas to traverse, but does not include all sub-areas in the room. For such path strategy, Figure 5 As shown, add non-adjacent but unvisited sub-areas to it, so that each group of path strategies in the path strategy container can access all sub-areas. From the path strategies contained in the path strategy container in the above table, it can be seen that the current complete path strategies include: {1,2,4,3,5}, {1,2,4,5,3}, {1,5,3,4,2} and {1,3,5,4,2}, and the path strategies containing missing sub-areas are: {1,3,4,2}, {1,3,4,5}, {1,5,4,2} and {1,5,4,3}. The missing sub-areas are supplemented to obtain the path strategies: {1,3,4,2,5}, {1,3,4,5,2}, {1,5,4,2,3} and {1,5,4,3,2}.

[0084] Step S405, calculate the Euclidean distances of all cleaning paths, and select the cleaning path corresponding to the minimum Euclidean distance to control the sweeper to clean the current room. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0085] The cleaning path planning method provided by the embodiment of the present invention determines the current room of the sweeper according to the current position, determines the current sub-area in the current room according to the preset area division state, queries all adjacent sub-areas adjacent to the current sub-area, and determines different path strategies based on the current sub-area and the adjacent sub-area, takes the adjacent sub-area as the current sub-area, and returns to the step of querying all adjacent sub-areas adjacent to the current sub-area, until all sub-areas in the current room are queried, and multiple cleaning paths are obtained, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean in the current room. The present invention traverses the adjacent sub-areas in turn according to the current sub-area, and selects the optimal path at the cost of the Euclidean distance. It can dynamically and efficiently plan multiple cleaning paths without relying on complex path planning algorithms and load cost functions. Moreover, the cleaning path is planned based on the proximity of the area, which can ensure the low energy consumption and beauty of the cleaning path and improve the user experience.

[0086] In this embodiment, a cleaning path planning method is provided, which can be used for the above-mentioned sweeping machine. Figure 7 is a flow chart of a method for planning a cleaning path according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:

[0087] Step S701, obtain the current position of the sweeping machine, determine the current room where the sweeping machine is located according to the current position, and determine the current sub-area of ​​the sweeping machine in the current room according to the preset area division state. Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.

[0088] Step S702: query all adjacent sub-regions adjacent to the current sub-region according to the preset region division state, and determine different path strategies based on the current sub-region and the adjacent sub-region. Figure 4 Step S403 of the illustrated embodiment will not be described in detail here.

[0089] Step S703, taking the adjacent sub-area as the current sub-area, and returning to the step of querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division result, supplementing the path strategy, until all sub-areas in the current room are queried and multiple cleaning paths are obtained. Figure 4 Step S404 of the illustrated embodiment will not be described in detail here.

[0090] Step S704, calculating the Euclidean distances of all cleaning paths, and selecting the cleaning path corresponding to the minimum Euclidean distance to control the sweeper to clean the current room.

[0091] Specifically, the above step S704 includes:

[0092] Step S7041, according to the arrangement order of the sub-regions included in the cleaning path, the sub-Euclidean distances between the center positions of adjacent arranged sub-regions are calculated in sequence.

[0093] Specifically, in the embodiment of the present invention, Figure 8 As shown, the path strategy container contains multiple groups of cleaning paths, and the arrangement order between sub-areas in different cleaning paths is different, resulting in different Euclidean distances of the final cleaning paths. The embodiment of the present invention takes the center position of the sub-area as the base point, calculates the sub-Euclidean distance between the center positions of adjacent arranged sub-areas in the cleaning path, and sequentially uses it as the distance between two sub-areas, so that multiple sub-Euclidean distances can be obtained.

[0094] Step S7042: The sum of the sub-Euclidean distances of each adjacent arranged sub-area is used as the Euclidean distance of the cleaning path, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean the current room.

[0095] Specifically, in the embodiment of the present invention, the sum of multiple sub-Euclidean distances is used as the Euclidean distance of the corresponding cleaning path, and this Euclidean distance is used as the cost of working according to the current cleaning path, and this cost is written into the data group of the cleaning path corresponding to the path strategy container. According to the principle that the shortest path length is the optimal path, the cleaning path corresponding to the minimum Euclidean distance is selected as the target cleaning path, and the sweeper is controlled to perform cleaning work in sequence according to the arrangement order of the sub-areas in the target cleaning path until all sub-areas in the current room are cleaned.

[0096] In some optional implementations, the embodiments of the present invention may update the corresponding cost value each time the path strategy is updated during the sub-region exploration and traversal process.

[0097] The present invention traverses adjacent sub-areas in turn according to the current sub-area, and selects the optimal path at the cost of Euclidean distance. It can dynamically and efficiently plan a variety of cleaning paths without relying on complex path planning algorithms and load cost functions. The cleaning paths are planned based on regional adjacency, which can ensure low energy consumption and beautiful appearance of the cleaning paths and improve user experience.

[0098] In the present embodiment, a planning device for a cleaning path is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0099] This embodiment provides a cleaning path planning device, such as Fig. 9 As shown, including:

[0100] The position determination module 901 is used to obtain the current position of the sweeping machine, determine the current room where the sweeping machine is located according to the current position, and determine the current sub-area of ​​the sweeping machine in the current room according to a preset area division state.

[0101] The area query module 902 is used to query all adjacent sub-areas adjacent to the current sub-area according to the preset area division state, and determine different path strategies based on the current sub-area and the adjacent sub-areas.

[0102] The path planning module 903 is used to take the adjacent sub-area as the current sub-area, and return to the step of querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division result, and supplement the path strategy until all sub-areas in the current room are queried and multiple cleaning paths are obtained.

[0103] The path determination module 904 is used to calculate the costs of all cleaning paths and select the cleaning path corresponding to the minimum cost to control the sweeper to clean the current room.

[0104] In some optional embodiments, the device also includes: an area number switching module, which is used to determine the first area number corresponding to the current sub-area according to the preset area division state, put the first area number into the adjacent queue, and add the first area number to the head end of the path strategy in the path strategy container.

[0105] In some optional implementations, the area query module 902 includes:

[0106] The adjacent region determination unit is used to query all adjacent sub-regions adjacent to the current sub-region according to the preset region division state, and determine the second region number corresponding to the adjacent sub-region, the number of adjacent sub-regions is at least one, and the number of corresponding second region numbers is at least one.

[0107] The area number determination unit is used to use the path policy whose tail end is the first area number as the target path policy, and determine whether the target path policy contains the second area number.

[0108] The policy updating unit is used for adding each second area number to the end of the target path policy if it is not included, so that the same target path policy is updated to a new path policy according to the number of areas; if it is included, not adding.

[0109] The queue updating unit is used to take out the first area number at the head position of the adjacent queue, and put each second area number into the adjacent queue from the tail position in sequence.

[0110] In some optional implementations, the path planning module 903 includes:

[0111] The current region updating unit is used to take the adjacent sub-region corresponding to the second region number at the head position in the adjacent queue as the current sub-region, and update the first region number to the second region number.

[0112] The repeated area judgment unit is used for taking out the second area number at the head position in the adjacent queue if the second area number is the same as the first area number, and returning to the step of taking the adjacent sub-area corresponding to the second area number at the head position in the adjacent queue as the current sub-area, and updating the first area number to the second area number.

[0113] The path supplement unit is used to determine whether a sub-area is missing in the cleaning path according to a preset area division state, and if missing, the path is supplemented according to the missing sub-area.

[0114] In some optional implementations, the path determination module 904 includes:

[0115] The first cost calculation unit is used to calculate the sub-Euclidean distances between the center positions of adjacent arranged sub-regions in sequence according to the arrangement order of the sub-regions included in the cleaning path.

[0116] The second cost calculation unit is used to use the sum of the sub-Euclidean distances of each adjacent arrangement sub-area as the Euclidean distance of the cleaning path, and select the cleaning path corresponding to the minimum Euclidean distance to control the sweeper to clean in the current room.

[0117] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0118] The cleaning path planning device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0119] The embodiment of the present invention also provides a computer device having the above Fig. 9The cleaning path planning device shown.

[0120] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.10 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.

[0121] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0122] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0123] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0124] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0125] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0126] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0127] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0128] The embodiment of the present invention further provides a sweeping machine, comprising: Fig.10 Computer equipment shown.

[0129] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A cleaning path planning method, characterized in that: The method comprises: Acquire the current position of the sweeping machine, determine the current room where the sweeping machine is located according to the current position, and determine the current sub-area of ​​the sweeping machine in the current room according to a preset area division state; querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division state, and determining different path strategies based on the current sub-area and the adjacent sub-areas; The adjacent sub-area is used as the current sub-area, and the step of querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division result is returned to supplement the path strategy until all sub-areas in the current room are queried and multiple cleaning paths are obtained; The Euclidean distances of all the cleaning paths are calculated, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean in the current room.

2. The method according to claim 1, characterized in that: After determining the current sub-area of ​​the sweeping machine in the current room according to the preset area division state, the method further includes: Determine a first area number corresponding to the current sub-area according to the preset area division state, put the first area number into an adjacent queue, and add the first area number to the head end of the path policy in the path policy container.

3. The method according to claim 2, characterized in that The querying of all adjacent sub-regions adjacent to the current sub-region according to the preset region division state, and determining different cleaning paths based on the current sub-region and the adjacent sub-regions, includes: Querying all adjacent sub-regions adjacent to the current sub-region according to the preset region division state, and determining the second region number corresponding to the adjacent sub-region, the number of the adjacent sub-regions is at least one, and the number of the corresponding second region numbers is at least one; taking the path policy whose tail end is the first area number as the target path policy, and determining whether the target path policy includes the second area number; If not included, then each second area number is added to the end of the target path policy, so that the same target path policy is updated to a new path policy according to the number of areas; if included, then no addition is made; The first area number at the head position in the adjacent queue is taken out, and each of the second area numbers is sequentially put into the adjacent queue from the tail position.

4. The method according to claim 3, characterized in that The taking the adjacent sub-region as the current sub-region comprises: The adjacent sub-region corresponding to the second region number at the head position in the adjacent queue is used as the current sub-region, and the first region number is updated to the second region number.

5. The method according to claim 4, characterized in that After taking the adjacent sub-area corresponding to the second area number at the head position in the adjacent queue as the current sub-area and updating the first area number to the second area number, the method further includes: If the second area number is the same as the first area number, take out the second area number at the head position in the adjacent queue, and return to the step of taking the adjacent sub-area corresponding to the second area number at the head position in the adjacent queue as the current sub-area, and updating the first area number to the second area number.

6. The method according to claim 1, characterized in that After all sub-areas in the current room are queried and multiple cleaning paths are obtained, the following steps are also included: Determine whether a sub-region is missing in the cleaning path according to the preset area division state, and if missing, supplement the path according to the missing sub-region.

7. The method according to claim 1, characterized in that The calculating the Euclidean distances of all the cleaning paths and selecting the cleaning path corresponding to the minimum Euclidean distance to control the sweeper to clean in the current room includes: According to the arrangement order of the sub-regions included in the cleaning path, the sub-Euclidean distances between the center positions of adjacent arranged sub-regions are calculated in sequence; The sum of the sub-Euclidean distances of each adjacent arranged sub-area is used as the Euclidean distance of the cleaning path, and the cleaning path corresponding to the minimum Euclidean distance is selected to control the sweeper to clean in the current room.

8. A cleaning path planning device, characterized in that: The device comprises: A position determination module, used to obtain the current position of the sweeping machine, determine the current room where the sweeping machine is located according to the current position, and determine the current sub-area of ​​the sweeping machine in the current room according to a preset area division state; An area query module, used to query all adjacent sub-areas adjacent to the current sub-area according to the preset area division state, and determine different path strategies based on the current sub-area and the adjacent sub-areas; A path planning module, used to take the adjacent sub-area as the current sub-area, and return to the step of querying all adjacent sub-areas adjacent to the current sub-area according to the preset area division result, and supplement the path strategy until all sub-areas in the current room are queried and multiple cleaning paths are obtained; The path determination module is used to calculate the costs of all the cleaning paths and select the cleaning path corresponding to the minimum cost to control the sweeper to clean in the current room.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the cleaning path planning method described in any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the cleaning path planning method described in any one of claims 1 to 7.

11. A computer program product, characterized in that It comprises computer instructions, and the computer instructions are used to make a computer execute the cleaning path planning method described in any one of claims 1 to 7.

12. A sweeping machine, characterized in that: include: The computer device of claim 9.

Citation Information

Cited By

  • Path planning method and device and mobile equipment

    CN120523202A