A cleaning path planning method and device

By obtaining the area to be cleaned in the urban sanitation sweeper and dividing it into sub-areas, and dynamically planning the internal and external paths, the high cost problem of fixed lanes is solved, and flexible and efficient cleaning path planning is achieved.

CN115248042BActive Publication Date: 2025-09-09SHANGHAI XIANTU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110951193.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-18
Publication Date
2025-09-09
Estimated Expiration
2041-08-18

AI Technical Summary

Technical Problem

In the existing technology, urban sanitation sweepers need to establish fixed lanes in advance, which leads to high construction and maintenance costs, and are difficult to adapt to changes in the environment, and cannot flexibly cope with complex urban cleaning environments.

Method used

By obtaining the area to be cleaned and performing obstacle scanning, it is divided into multiple sub-areas, generating internal and external cleaning paths, and dynamically planning the global cleaning path to avoid the construction and maintenance of fixed lanes.

Benefits of technology

It achieves efficient and flexible cleaning path planning in complex urban environments, reduces equipment damage risks and costs, and improves cleaning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115248042B_ABST
    Figure CN115248042B_ABST
Patent Text Reader

Abstract

One or more embodiments of this specification provide a method and device for planning a cleaning path. The method includes: obtaining a number of areas to be cleaned and scanning them for obstacles; when there is an obstacle in any area to be cleaned, based on the location information of the obstacle, dividing it into multiple sub-areas, and obtaining a target area set consisting of the divided sub-areas and the area to be cleaned where no obstacles exist; planning the cleaning path within each target area in the target area set to obtain the internal cleaning path of the target area; planning the cleaning path between areas based on the internal cleaning paths of each target area, and determining the external cleaning path between each target area; generating a global cleaning path based on the internal cleaning path and the external cleaning path. This solution divides the sub-areas according to the scanned obstacles and dynamically generates a global cleaning path. There is no need to build and maintain lanes, which can avoid equipment damage and effectively reduce costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of computer technology, and more particularly, to a method and device for planning a cleaning path. Background Art

[0002] With the development of robotics and related technologies, machines are gradually replacing manual cleaning in applications such as urban sanitation. Due to the complex environments required for sweeping in these applications and the limited mobility of sweepers, related technologies generally use pre-established fixed lanes for sweepers to complete cleaning. However, this method is very expensive to build and maintain, and is difficult to adapt to new environments once the environment changes. Summary of the Invention

[0003] In view of this, one or more embodiments of this specification provide a method and device for planning a cleaning path.

[0004] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a cleaning path planning method is proposed, which is applied to any electronic device that performs a cleaning task. The method includes:

[0006] Acquire a plurality of areas to be cleaned, and scan the areas for obstacles;

[0007] When there is an obstacle in any area to be cleaned, the area to be cleaned is divided into multiple sub-areas based on the location information of the obstacle to obtain a target area set, which includes the sub-areas obtained after the division and the area to be cleaned where there is no obstacle;

[0008] For each target area in the target area set, a cleaning path is planned within the area to obtain an internal cleaning path of the target area;

[0009] Based on the internal cleaning paths of each target area, the cleaning paths between areas are planned to determine the external cleaning paths between each target area;

[0010] A global sweeping path is generated based on the inner sweeping path and the outer sweeping path.

[0011] According to a second aspect of one or more embodiments of this specification, a cleaning path planning device is provided, which is applied to any electronic device that performs a cleaning task. The device includes an obstacle scanning unit, an area division unit, an intra-domain planning unit, an inter-domain planning unit, and a path generation unit.

[0012] The obstacle scanning unit is used to obtain a plurality of areas to be cleaned and scan the areas for obstacles;

[0013] The area division unit is configured to, when an obstacle exists in any area to be cleaned, divide the area to be cleaned into a plurality of sub-areas based on the location information of the obstacle to obtain a target area set, wherein the target area set includes the sub-areas obtained after the division and the area to be cleaned where no obstacle exists;

[0014] The intra-domain planning unit is configured to plan a cleaning path within each target area in the target area set to obtain an internal cleaning path for the target area;

[0015] The inter-domain planning unit is configured to plan cleaning paths between regions based on the internal cleaning paths of each target region, and determine external cleaning paths between each target region;

[0016] The path generation unit is used to generate a global cleaning path based on the internal cleaning path and the external cleaning path.

[0017] According to a third aspect of one or more embodiments of this specification, there is provided an electronic device comprising a processor and a memory for storing instructions executable by the processor;

[0018] The processor implements the steps of the method described in the first aspect above by running the executable instructions.

[0019] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps in the method described in the first aspect are implemented.

[0020] As can be seen from the above description, in this specification, the electronic device that performs the cleaning task can obtain several areas to be cleaned and scan for obstacles. When there are obstacles in the area to be cleaned, it can be divided into multiple sub-areas based on the location information of the obstacles. The area to be cleaned without obstacles and the sub-areas divided from the area to be cleaned with obstacles constitute a target area set; for each target area in the target area set, path planning is performed within the area to obtain the internal cleaning path of each target area, and the cleaning paths between the target areas are further planned based on the internal cleaning paths of each target area to obtain the external cleaning paths between the target areas. Based on the internal cleaning paths and the external cleaning paths, a global cleaning path is generated in series. In this solution, the electronic device that performs the cleaning task can, after obtaining the area to be cleaned and scanning it, divide the sub-areas according to the obstacles, and then combine the sub-areas to perform path planning within and between the areas to dynamically generate a global cleaning path. There is no need to build and maintain fixed lanes, which can avoid equipment damage and effectively reduce costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a flowchart of a cleaning path planning method provided by an exemplary embodiment of this specification.

[0022] Figure 2 1 is a schematic diagram of a pre-set map including several areas to be cleaned, shown in an exemplary embodiment of this specification.

[0023] Figure 3 It is a schematic diagram showing an exemplary embodiment of this specification that divides the area to be cleaned into multiple sub-areas.

[0024] Figure 4 FIG. 1 is a schematic diagram of a generated global sweeping path shown in an exemplary embodiment of this specification.

[0025] Figure 5 It is a flow chart of a method for obtaining an internal cleaning path for each target area shown in an exemplary embodiment of this specification.

[0026] Figure 6 Schematic diagram of the internal cleaning path of each target area shown in an exemplary embodiment of this specification.

[0027] Figure 7 1 is a flow chart of a method for determining an external cleaning path between target areas, shown as an exemplary embodiment of this specification.

[0028] Figure 8 This is a flow chart of a method for determining a cleaning cost between any two target areas, shown as an exemplary embodiment of this specification.

[0029] Figure 9 It is a schematic diagram showing an exemplary embodiment of this specification, which shows generating a corresponding weighted directed graph from the cleaning costs between target areas.

[0030] Figure 10 This is a schematic diagram of multiple internal cleaning paths with different cleaning starting points and cleaning end points obtained for the same target area shown in an exemplary embodiment of this specification.

[0031] Figure 11 This is a flow chart of a method for determining a cleaning cost for a target area having multiple groups of cleaning start points and cleaning end points, shown as an exemplary embodiment of this specification.

[0032] Figure 12 This is a schematic diagram illustrating an exemplary embodiment of the present specification for determining the cleaning costs between multiple virtual areas generated from the same target area.

[0033] Figure 13 This is a structural diagram of an electronic device in which a cleaning path planning device is located, provided by an exemplary embodiment.

[0034] Figure 14 It is a block diagram of a cleaning path planning device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0035] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.

[0036] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0037] With the development of robotics and related technologies, unmanned sweepers and other equipment are gradually being used to replace manual cleaning tasks in urban sanitation scenarios. Unlike small household sweepers that perform household cleaning tasks, the environment that requires coverage cleaning in urban sanitation scenarios is complex and easily disturbed by passing vehicles and pedestrians. Unmanned sweepers also do not have the collision resistance and mobility of small household sweepers. Therefore, the more radical path planning methods used by small household sweepers to perform household cleaning tasks are not applicable in such scenarios. There are few methods for cleaning path planning in application scenarios such as urban sanitation in related technologies. Generally, fixed lanes are established in advance to enable sweepers to complete cleaning based on the lanes. However, the cost of establishing and maintaining fixed lanes is very high. Once the environment changes, the original lanes are difficult to use in the new environment, resulting in a lot of waste.

[0038] In view of this, this specification proposes a cleaning path planning method that can be applied to any electronic device that performs cleaning tasks, including but not limited to unmanned sweepers. The method is suitable for the above-mentioned urban sanitation application scenarios.

[0039] Please refer to Figure 1 , Figure 1 A flow chart of a method for planning a cleaning path provided as an exemplary embodiment of this specification.

[0040] The cleaning path planning method may include the following specific steps:

[0041] In step 102 , the electronic device performing the cleaning task obtains a number of areas to be cleaned and scans the areas for obstacles.

[0042] In this embodiment, the cleaning task performed by the electronic device is a cleaning task for a number of areas to be cleaned. Specifically, the electronic device may be pre-set with a map of a predetermined range. The map contains a number of areas to be cleaned that require blanket cleaning. These areas to be cleaned may actually be parking spaces, open spaces, and roads, etc., and there are no specific restrictions on their size and shape. Completing blanket cleaning of all areas to be cleaned in the map is the cleaning task that the electronic device needs to perform. To complete this cleaning task, the electronic device will plan a cleaning path. It is understandable that the electronic device may also pre-set a number of areas to be cleaned in other forms besides maps, and there is no specific restriction.

[0043] Please refer to Figure 2 , Figure 2 This is a schematic diagram of a map including several areas to be cleaned, which is pre-set in an electronic device according to an exemplary embodiment of this specification.

[0044] There are four areas to be cleaned marked with rectangular boxes in the map, which are marked as area to be cleaned 1, area to be cleaned 2, area to be cleaned 3 and area to be cleaned 4. Among them, area to be cleaned 1 is an open space, areas to be cleaned 2 and 3 are parking spaces, and area to be cleaned 4 is a road. Figure 2 The area to be cleaned shown is for illustration only and does not constitute a specific limitation.

[0045] Before executing the cleaning task, the electronic device will first obtain several areas to be cleaned. Specifically, the electronic device can obtain the location information of several areas to be cleaned, and the location information includes coordinate information that can locate the areas to be cleaned. Figure 2 Taking the area to be cleaned 1 in the map as an example, the electronic device will obtain the coordinate information of the four vertices of the area to be cleaned 1 in the map.

[0046] After acquiring a number of areas to be cleaned, the electronic device will perform an obstacle scan on the areas to be cleaned to determine whether there are any obstacles within each area to be cleaned, in order to dynamically generate a safer and more efficient cleaning path based on specific environmental conditions. There are multiple optional implementation methods for the electronic device to perform obstacle scanning on the areas to be cleaned. The electronic device can perform obstacle scanning on each area to be cleaned using sensors such as radar installed on the electronic device, or it can receive images captured from a bird's-eye view by a surveillance camera and perform obstacle scanning on each area to be cleaned based on the images. This embodiment does not limit the specific implementation method of the electronic device performing obstacle scanning.

[0047] In an optional implementation, the electronic device can travel based on a preset reference path, and during the driving process, scan the obstacles in the several areas to be cleaned by using sensors, cameras, etc. equipped on the electronic device.

[0048] It should be noted that the preset reference path is only a driving path pre-set in the electronic device driving system, and does not require the establishment of a physical lane. In addition, the preset reference path should satisfy the requirement that the location information of all obstacles in the area to be cleaned can be obtained after the complete driving based on the reference path. Figure 2 Taking the reference path shown in the figure as an example, the reference path is a circular path. By driving a circle based on the complete reference path, the position information of all obstacles in the area to be cleaned can be obtained, that is, Figure 2 As shown, the electronic device can scan and obtain the position information of obstacles 1-1 and 1-2 in the area to be cleaned 1, obstacles 3-1 and 3-2 in the area to be cleaned 3, and obstacle 4-1 in the area to be cleaned 4.

[0049] Step 104: When there is an obstacle in any area to be cleaned, the electronic device divides the area to be cleaned into multiple sub-areas based on the location information of the obstacle to obtain a target area set, which includes the sub-areas obtained after the division and the area to be cleaned where there is no obstacle.

[0050] After obtaining the area to be cleaned and scanning it for obstacles, the electronic device will divide the area into sub-areas based on whether there are obstacles in the area, and obtain a target area set consisting of an undivided area to be cleaned and sub-areas after the area to be cleaned is divided. Then, a cleaning path is planned and generated based on each target area in the target area set, so as to avoid the problem that the cleaning path planned and generated without considering obstacles may cause damage to the electronic device due to the presence of obstacles.

[0051] Among them, for scanning the area to be cleaned where there are no obstacles, the electronic device may not perform area division, and an original area to be cleaned is a target area. For example, Figure 2 If there are no obstacles in the area 2 to be cleaned in the map, the area 2 to be cleaned is a target area.

[0052] For the area to be cleaned where obstacles are present during scanning, area division is performed. The electronic device divides the area to be cleaned into multiple sub-areas based on the location information of the area to be cleaned and the location information of the obstacles inside it. The original area to be cleaned is no longer included in the target area set. The multiple sub-areas obtained after the area to be cleaned is divided replace the area to be cleaned and are included in the target area set. One sub-area obtained by division is a target area.

[0053] There are many optional implementation methods for the electronic device to divide an area to be cleaned into multiple sub-areas based on the location information, and this embodiment does not impose any specific restrictions on this. In one optional implementation method, the electronic device can use a greedy algorithm to divide the area to be cleaned into multiple sub-areas based on the location information of the obstacles. When dividing the area to be cleaned, the greedy algorithm will make the area of ​​each sub-area as large as possible and the number of sub-areas obtained in the end as small as possible, thereby improving the efficiency of subsequent path planning and generation. Figure 2 For example, the area to be cleaned 1 in the map shown in FIG. 1 is divided into Figure 3 Shown are sub-area 1-1, sub-area 1-2, sub-area 1-3 and sub-area 1-4.

[0054] In step 106 , the electronic device plans a cleaning path inside each target area in the target area set to obtain an internal cleaning path of the target area.

[0055] After obtaining the target area set, the electronic device will plan the cleaning path within each target area in the target area set. The undivided original area to be cleaned in the target area set and the sub-areas divided from the original area to be cleaned are equivalent target areas and no distinction is required when planning the cleaning path within the area.

[0056] The electronic device can plan the internal cleaning path of each target area based on the preset cleaning path planning rules to obtain the internal cleaning path of the target area. Different target areas can adopt the same cleaning path planning rules or different cleaning path planning rules. This embodiment does not limit the specific implementation method of obtaining the internal cleaning path of each target area based on the cleaning path planning rules.

[0057] It should be noted that since in this embodiment, coverage cleaning is performed on several areas to be cleaned, the internal cleaning path obtained after planning the cleaning path within the area should cover the entire area, so that the electronic device can complete coverage cleaning of the entire area based on the internal cleaning path.

[0058] In step 108 , the electronic device plans cleaning paths between the target areas based on the internal cleaning paths of the target areas, and determines external cleaning paths between the target areas.

[0059] The internal cleaning path of the target area obtained after planning the internal cleaning path of the area is a path with fixed endpoints. The path can be a straight line or a curve. The endpoints are usually located on the vertices or boundaries of the target area. The electronic device can determine the cleaning starting point and cleaning end point of the target area based on the endpoints of the internal cleaning path, wherein the same endpoint of the internal cleaning path can be used as both the cleaning starting point and the cleaning end point of the target area. For example, assuming that the endpoints of an internal cleaning path are marked as endpoint A and endpoint B respectively, if endpoint A is used as the cleaning starting point of the target area, endpoint B is the cleaning end point of the target area. If endpoint A is used as the cleaning end point of the target area, endpoint B is the cleaning starting point of the target area.

[0060] After determining the cleaning starting point and cleaning end point of each target area, the electronic device will determine the external cleaning path between each target area based on the cleaning starting point and cleaning end point, wherein the cleaning starting point of the current target area can be reached from the cleaning end point of other target areas to perform covering cleaning inside the current target area, and the cleaning starting point of other target areas can be reached from the cleaning end point of the current target area to perform covering cleaning inside other target areas. The electronic device will determine the cleaning order of each target area and the cleaning path between two adjacent target areas.

[0061] It should be noted that a global cleaning start point and a global cleaning end point can be pre-set in the electronic device, and the external cleaning path should start from the global cleaning start point, clean all target areas, and reach the global cleaning end point, so that the electronic device can complete the movement between areas and clean all target areas based on the external cleaning path. Of course, the global cleaning start point and the global cleaning end point can also be pre-set in the electronic device. The above cleaning task can also be completed by combining the current location of the electronic device and the cleaning start point and cleaning end point of the target areas at the first and last positions in the cleaning order in the planned external cleaning path.

[0062] In step 110 , the electronic device generates a global cleaning path based on the internal cleaning path and the external cleaning path.

[0063] Please refer to Figure 4 The electronic device determines the cleaning order of all target areas and the cleaning paths between adjacent target areas under the cleaning order based on the external cleaning path, and based on the cleaning order, connects the cleaning paths between adjacent target areas and the internal cleaning paths within the target areas in series to generate a global cleaning path.

[0064] It can be seen from the above description that in this specification, the electronic device that performs the cleaning task can obtain several areas to be cleaned and perform obstacle scanning. When there are obstacles in the area to be cleaned, it can be divided into multiple sub-areas based on the location information of the obstacle. The area to be cleaned where there are no obstacles and the sub-areas divided from the area to be cleaned where there are obstacles constitute a target area set; for each target area in the target area set, path planning is performed within the area to obtain the internal cleaning path of each target area; based on the internal cleaning path of each target area, the cleaning paths between the target areas are further planned to obtain the external cleaning paths between the target areas; based on the internal cleaning paths and the external cleaning paths, a global cleaning path is generated in series.

[0065] In this solution, the electronic device performing the cleaning task can obtain the area to be cleaned and scan it, then divide it into sub-areas according to obstacles, and then combine the sub-areas to plan paths within and between areas to dynamically generate a global cleaning path. There is no need to build and maintain fixed lanes, which can not only avoid equipment damage but also effectively reduce costs.

[0066] Furthermore, this embodiment may also include that after generating the global cleaning path, the electronic device performs cleaning tasks for the several areas to be cleaned based on the global cleaning path.

[0067] The electronic device moves between different target areas based on the generated global cleaning path and performs coverage cleaning inside each target area.

[0068] In an optional implementation, the internal cleaning path of the target area in step 106 may be obtained by path planning based on a preset cleaning path planning rule.

[0069] The electronic device that performs the cleaning task is pre-set with the area type of the area to be cleaned, and the mapping relationship between the area type and the cleaning path planning rules.

[0070] The area type of the area to be cleaned can be pre-set based on the shape and size of the area to be cleaned, and / or the actual purpose of the area to be cleaned. Figure 2 Taking the map shown as an example, based on actual use, the area type of the area to be cleaned 1 is pre-set to an open space, the area types of the areas to be cleaned 2 and 3 are pre-set to parking spaces, and the area type of the area to be cleaned 4 is pre-set to a road; the area types described here are only for illustration and do not constitute specific limitations.

[0071] For different area types, corresponding cleaning path planning rules can be specified based on the shape and size of the target area under the area type, and / or actual use. The cleaning path planning rules indicate the specific way to plan the path within the area. Figure 2 Taking the shown map as an example, for the three area types it includes, the cleaning path planning rules corresponding to open spaces plan the cleaning paths in a serpentine manner, the cleaning path planning rules corresponding to parking spaces plan the cleaning paths in a U-shaped, N-shaped or L-shaped manner based on the number of consecutive parking spaces, and the cleaning path planning rules corresponding to roads plan the cleaning paths in a straight line manner based on the length of the road; the cleaning path planning rules corresponding to the area types described here are for illustration only and do not constitute specific limitations.

[0072] The mapping relationship between the area type and the cleaning path planning rules is pre-set in the electronic device for easy query.

[0073] Please refer to Figure 5 In the above step 106, the electronic device performs cleaning path planning inside each target area in the target area set to obtain the internal cleaning path of the target area, including:

[0074] Step 1062: For each target area, the electronic device obtains the area type of the target area.

[0075] Step 1064: The electronic device searches the mapping relationship for a cleaning path planning rule corresponding to the area type.

[0076] In step 1066, the electronic device plans a cleaning path inside the target area based on the cleaning path planning rule to obtain an internal cleaning path of the target area.

[0077] Specifically, the electronic device is pre-set with the area type of the original area to be cleaned, as well as the mapping relationship between the area type and the cleaning path planning rule. For the original area to be cleaned in the target area set, the electronic device can obtain the area type of the area to be cleaned, and for the sub-area divided from the original area to be cleaned in the target area set, the electronic device can obtain the area type of the area to be cleaned to which the sub-area belongs. Based on the obtained area type, the mapping relationship is queried to obtain the cleaning path planning rule corresponding to each target area. Then, based on the queried cleaning path planning rule, the cleaning path within each target area is planned to obtain the internal cleaning path of the target area.

[0078] Please refer to Figure 6 ,by Figure 2 Taking the three area types in the map as an example, cleaning paths are planned based on the corresponding cleaning path planning rules to obtain schematic diagrams of the internal cleaning paths of each target area.

[0079] For the target area whose area type is open space, path planning is performed in a serpentine manner parallel to its longer boundary to obtain the internal cleaning path of each target area in the area to be cleaned 1.

[0080] For the target area whose area type is parking space, path planning is performed based on the number of consecutive parking spaces included in the target area. When the number of consecutive parking spaces is greater than a preset first number threshold, path planning is performed in a U-shaped manner. When the number of consecutive parking spaces is less than or equal to the first number threshold and greater than a preset second number threshold, path planning is performed in an N-shaped manner. When the number of consecutive parking spaces is less than or equal to the second number threshold, path planning is performed in an L-shaped manner, and the internal cleaning paths of each target area in areas 2 and 3 to be cleaned are obtained.

[0081] For the target area whose area type is road, path planning is performed based on the road length in the target area. When the road length is greater than or equal to a preset length threshold, path planning is performed in a straight line manner. When the road length is less than the length threshold, path planning and cleaning are not performed, and the internal cleaning path of the target area in the area to be cleaned 4 is obtained.

[0082] Under this implementation method, the area type and cleaning path planning rules are pre-set based on the shape, size and / or actual use of the area to be cleaned. The electronic device performing the cleaning task can query the corresponding cleaning path planning rules based on the area type of the target area to plan the internal cleaning path, thereby improving the path planning efficiency while ensuring that the planned internal cleaning path is accurate and effective.

[0083] Please refer to Figure 7 In an optional implementation, in step 108, the electronic device performs cleaning path planning between regions based on the internal cleaning paths of the target regions, and determines the external cleaning paths between the target regions, including:

[0084] In step 1082, the electronic device determines a cleaning start point and a cleaning end point of each target area based on an internal cleaning path of each target area.

[0085] In step 1084 , the electronic device determines a cleaning cost between any two target areas based on the cleaning start point and the cleaning end point of each target area.

[0086] The internal cleaning path of the target area obtained after the internal cleaning path planning of the area is a path with two predetermined endpoints. Based on the two endpoints, the electronic device can determine the cleaning start point and the cleaning end point of the target area.

[0087] After determining the cleaning start point and cleaning end point of each target area, the cleaning cost between any two target areas can be determined. The cleaning cost between any two target areas is bidirectional. Taking the cleaning cost between the first target area and the second target area as an example, the cleaning cost between the first target area and the second target area includes both the cleaning cost determined based on the cleaning end point of the first target area and the cleaning start point of the second target area, that is, the cleaning cost of cleaning the first target area first and then cleaning the second target area, and the cleaning cost determined based on the cleaning end point of the second target area and the cleaning start point of the first target area, that is, the cleaning cost of cleaning the second target area first and then cleaning the first target area. The specific cost value of the cleaning cost can be determined based on the specific distance between the cleaning start point and the cleaning end point, as well as the collision penalty caused by obstacles in the cleaning path, and this embodiment does not impose any restrictions on this.

[0088] Please refer to Figure 8 In one example, in step 1084, the electronic device determines the cleaning cost between any two target areas based on the cleaning start point and the cleaning end point of each target area, including:

[0089] In step 1084a, the electronic device first determines whether the area distance between any two target areas exceeds a preset distance threshold.

[0090] Specifically, the electronic device can determine the area distance between the two target areas based on the position information of the center point of the target area, and can also determine the area distance between the two target areas based on the cleaning start point and the cleaning end point of the target area. For example, when determining the cleaning cost between the first target area and the second target area, if the cleaning cost is determined to be cleaning the first target area first and then the second target area, the area distance can be determined based on the distance between the cleaning end point of the first target area and the cleaning start point of the second target area; if the cleaning cost is determined to be cleaning the second target area first and then the first target area, the area distance can be determined based on the distance between the cleaning start point of the first target area and the cleaning end point of the second target area.

[0091] Step 1084b: When the area distance does not exceed the distance threshold, the electronic device determines the cleaning cost for the cleaning start point and the cleaning end point of the target area based on a preset cost estimation algorithm;

[0092] Step 1084c, when the area distance exceeds the distance threshold, the electronic device determines the starting distance between the cleaning starting point of the target area and the preset reference path, and the ending distance between the cleaning end point of the target area and the reference path, and determines the cleaning cost based on the starting distance and the ending distance.

[0093] Specifically, when the area distance does not exceed the distance threshold, it means that the two target areas are close to each other. The electronic device can determine the cleaning cost based on the cleaning start point and cleaning end point of the target area using a preset cost estimation method.

[0094] For example, the Hybrid A Star algorithm can be used, which further combines collision penalties through the Dubin and Reeds-sheep curves that conform to the vehicle kinematics. The cleaning cost of cleaning the first target area first and then the second target area is determined based on the cleaning end point of the first target area and the cleaning starting point of the second target area. The cleaning cost of cleaning the second target area first and then the first target area is determined based on the cleaning starting point of the first target area and the cleaning end point of the second target area, thereby determining the bidirectional cleaning cost between the first target area and the second target area.

[0095] When the area distance exceeds the distance threshold, it means that the two target areas are far apart. The electronic device can first determine the starting distance between the preset reference path and the cleaning starting point of the target area, and the end distance between the reference path and the cleaning end point of the target area, and then determine the cleaning cost based on the starting distance and the end distance.

[0096] For example, the electronic device can select a first reference point on a preset reference path that is close to the cleaning end point of the first target area, and use a cost estimation method such as the Hybrid A Star algorithm to determine the end point distance between the cleaning end point of the first target area and the first reference point, and select a second reference point on the reference path that is close to the cleaning starting point of the second target area, and use a cost estimation method to determine the starting point distance between the cleaning starting point of the second target area and the second reference point. Based on the starting point distance, the end point distance, and the distance between the first and second reference points on the reference path, the cleaning cost of cleaning the first target area first and then the second target area is determined. Similarly, the cleaning cost of cleaning the second target area first and then the first target area is determined, thereby determining the bidirectional cleaning cost between the first target area and the second target area. It is understandable that the electronic device can also select multiple first reference points on the reference path to determine the end point distance between each of them and the cleaning end point of the first target area, and determine the cleaning cost based on the first reference point corresponding to the minimum end point distance. The same applies to other situations.

[0097] In step 1086, the electronic device determines an external cleaning path between all target areas with the goal of starting from a preset global cleaning starting point, cleaning all target areas, and reaching a preset global cleaning end point with the minimum total cleaning cost.

[0098] In order to determine the external cleaning path with the minimum total cleaning cost starting from the global cleaning starting point, cleaning all target areas, and reaching the global cleaning end point, a weighted directed graph can be used to solve it.

[0099] First, a weighted directed graph can be constructed, with each target area as a node and the cleaning cost between any two target areas as the directed weight between the nodes.

[0100] If the global cleaning path is preset with a global cleaning start point and a global cleaning end point, when constructing a weighted directed graph, in addition to the node corresponding to the target area, the global cleaning start point and the global cleaning end point are also used as nodes in the graph, the global cleaning start point is the starting node, and the global cleaning end point is the ending node; wherein, the directed weight between the starting node and the node corresponding to the target area, and the directed weight between the node corresponding to the target area and the ending node are unidirectional.

[0101] like Figure 9 As shown, the cleaning cost of cleaning the first target area first and then the second target area is the directed weight w12 from the first node corresponding to the first target area to the second node corresponding to the second target area; the cleaning cost of cleaning the second target area first and then the first target area is the directed weight w21 from the second node to the first node; the cleaning cost of cleaning the first target area first starting from the global cleaning starting point is the directed weight w01 from the starting node corresponding to the global cleaning starting point to the first node; the cleaning cost of cleaning the second target area first starting from the global cleaning starting point is the directed weight w02 from the starting node to the second node, and the nodes corresponding to each target area cannot point to the starting node; the cleaning cost of finally reaching the global cleaning end point after cleaning the first target area is the directed weight w1n from the first node to the ending node corresponding to the global cleaning end point; the cleaning cost of finally reaching the global cleaning end point after cleaning the second target area is the directed weight w2n from the second node to the ending node, and the ending node cannot point to the nodes corresponding to each target area.

[0102] After the weighted directed graph is constructed, the electronic device determines an external sweeping path with the minimum total sweeping cost. Specifically, the electronic device determines an optimal path with the minimum total weight traversing all nodes in the weighted directed graph. When a global sweeping start point and a global sweeping end point exist, the electronic device determines an optimal path with the minimum total weight traversing all nodes, starting from the start node and terminating at the end node. A variety of algorithms are available for solving this optimal path, including but not limited to the Lin-Kernighan-Helsgaun (LKH) algorithm for the TSP (Traveling Salesman) problem.

[0103] The global cleaning path generated under this implementation method selects the optimal cleaning order based on the series connection of external cleaning paths with the smallest total cleaning cost, when the internal cleaning paths of each target area are determined. This effectively reduces the total distance that electronic equipment performing cleaning tasks moves between different target areas, and improves the cleaning efficiency of the equipment.

[0104] Considering that the two end points of an internal cleaning path inside the target area can actually determine two sets of cleaning start points and cleaning end points, and the same target area can generate multiple internal cleaning paths, a target area can actually have multiple sets of different cleaning start points and cleaning end points. For example, Figure 10 As shown, for a rectangular open space target area, two internal cleaning paths can be generated. The two sets of diagonal vertices on the two diagonals of the regular quadrilateral can constitute the four sets of cleaning start points and end points for the target area. The global cleaning paths generated by using different cleaning start points and end points for the same target area may differ significantly in both the cleaning order and the external cleaning paths. In order to generate a more efficient global cleaning path, it is necessary to determine the optimal set of cleaning start points and end points from the multiple sets of cleaning start points and end points in the target area.

[0105] In a conventional implementation, the electronic device can use different groups of cleaning starting points and cleaning end points as the cleaning starting points and cleaning end points of the target area, respectively, and plan external cleaning paths for each group. After comparing the multiple external cleaning paths obtained, the optimal one is determined to generate a global cleaning path. However, this method is equivalent to solving multiple external cleaning paths for the same multiple target areas, which increases the amount of calculation and affects the efficiency of the device.

[0106] Please refer to Figure 11 In a more preferred implementation, in step 1084, the electronic device determines the cleaning cost between any two target areas based on the cleaning start point and cleaning end point of each target area, including:

[0107] Step 1084A: When the target area has multiple sets of cleaning start points and cleaning end points, the electronic device generates a corresponding virtual area for the target area based on each set of cleaning start points and cleaning end points, and obtains multiple virtual areas corresponding to the target area.

[0108] For example, as shown in Table 1, for endpoints A and B of an internal cleaning path within the target area, two sets of cleaning start points and cleaning end points can be determined: cleaning start point A and cleaning end point B, and cleaning start point B and cleaning end point A. When using cleaning start point A and cleaning end point B, the direction of the internal cleaning path is opposite to that when using cleaning start point B and cleaning end point A, although the internal cleaning path is the same line segment, the direction is opposite. Similarly, for endpoints C and D of another internal cleaning path within the target area, two more sets of cleaning start points and cleaning end points can also be determined, which will not be further described here.

[0109]

[0110] Table 1

[0111] Based on multiple sets of cleaning start points and end points for the same target area, corresponding virtual areas are generated, resulting in multiple virtual areas corresponding to the target area. Each virtual area is consistent with the target area in shape and size, but its cleaning start points and end points, internal cleaning paths, and directions can be different.

[0112] As shown in Table 1, for each internal cleaning path within the same target area, two sets of cleaning start points and cleaning end points are obtained in different directions. Each set of cleaning start points and cleaning end points generates a virtual area, thereby obtaining four virtual areas corresponding to the target area, which are marked as virtual area 1, virtual area 2, virtual area 3, and virtual area 4 respectively.

[0113] Step 1084B: The electronic device uses the multiple virtual areas to replace the target area to determine the cleaning cost between any two target areas, and obtains a set of cleaning costs between any two target areas, wherein the cleaning cost between any two virtual areas is determined based on a preset virtual area planning rule.

[0114] Specifically, when determining the cleaning cost between regions, a target region that has generated multiple virtual regions no longer participates in the determination of the cleaning cost. The electronic device will replace the target region with the multiple virtual regions corresponding to the target region to determine the cleaning cost between regions. After the replacement, each virtual region and the target region that has not generated a virtual region are equivalent to each other. The electronic device will determine the cleaning cost between any two virtual regions, the cleaning cost between any virtual region and any other target region that has not generated a virtual region, and the cleaning cost between any two target regions that have not generated a virtual region, and then obtain a set of cleaning costs.

[0115] The cleaning cost between the virtual area and other target areas may be determined based on the method described above.

[0116] For example, assuming that corresponding virtual areas 1, 2, 3, and 4 are generated by the first target area, the first target area is replaced, and the cleaning cost between virtual area 1 and other target areas, the cleaning cost between virtual area 2 and other target areas, the cleaning cost between virtual area 3 and other target areas, and the cleaning cost between virtual area 4 and other target areas will be determined based on the cost prediction algorithm such as the Hybrid A Star algorithm mentioned above, and the cleaning cost between the first target area and other target areas will no longer be determined. Therefore, the cleaning cost between the virtual areas and the target areas shown in Table 2 can be obtained.

[0117]

[0118]

[0119] Table 2

[0120] The cleaning costs between virtual areas can be determined based on preset virtual area planning rules.

[0121] The virtual area planning rules indicate the method for determining the cleaning costs between multiple virtual areas generated by the same target area. Specifically, based on the virtual area planning rules, multiple virtual cleaning orders between the multiple virtual areas can be determined first, and then based on the virtual cleaning orders, the cleaning costs between the virtual areas can be determined with preset cleaning cost values. The virtual cleaning orders and preset cleaning cost values ​​can ensure that in the subsequently generated external cleaning paths, the multiple virtual areas are cleaned according to one of the multiple virtual cleaning orders and no additional cleaning costs are added when cleaning the multiple virtual areas.

[0122] For example, for multiple virtual areas 1, 2, 3, and 4 generated for a first target area, based on a preset virtual area planning rule, four virtual cleaning orders can be determined between the virtual areas 1, 2, 3, and 4. First, the virtual areas 1, 2, 3, and 4 are randomly arranged to obtain the first virtual cleaning order, assuming it is virtual area 1 - virtual area 2 - virtual area 3 - virtual area 4 (hereinafter abbreviated as 1-2-3-4). The remaining three virtual cleaning orders can be obtained based on the first virtual cleaning order 1-2-3-4. Starting from any position in the first virtual cleaning order, when the last position is reached, return to the first position, until all four virtual areas are traversed in sequence, resulting in the remaining three virtual cleaning orders: 2-3-4-1, 3-4-1-2, and 4-1-2-3. Generating more virtual areas from the same target area can also obtain multiple virtual cleaning orders in the same way.

[0123] Based on any of the virtual cleaning sequences, the cleaning costs between the virtual areas are determined. For two adjacent virtual areas in the virtual cleaning sequence, the cleaning cost from the previous virtual area to the next virtual area is 0, and the cleaning cost from the next virtual area to the previous virtual area is positive infinity; for the two virtual areas at the first and last positions in the virtual cleaning sequence, the cleaning cost from the last virtual area to the first virtual area is 0, and the cleaning cost from the first virtual area to the last virtual area is positive infinity; for two virtual areas that are not adjacent and not at the first and last positions in the virtual cleaning sequence, the bidirectional cleaning costs between the two are set to positive infinity; thus, the cleaning costs between the virtual areas 1, 2, 3, and 4 shown in Table 3 can be obtained.

[0124] Virtual Area 1 2 3 4 1 —— 0 Positive infinity Positive infinity 2 Positive infinity —— 0 Positive infinity 3 Positive infinity Positive infinity —— 0 4 0 Positive infinity Positive infinity ——

[0125] Table 3

[0126] Furthermore, in order to eliminate planning errors caused by using multiple virtual areas to replace the original target area during external path planning, after obtaining the cleaning cost set and before determining the external cleaning path, the cleaning path planning method may further include:

[0127] Based on preset virtual area planning rules, multiple virtual cleaning orders between multiple virtual areas are determined;

[0128] For each virtual cleaning order, the cleaning cost between the virtual area at the end of the virtual cleaning order and other target areas in the cleaning cost set is replaced with the cleaning cost between the virtual area at the beginning of the cleaning order and the same target area. The corresponding replacement is completed under all virtual cleaning orders to obtain an updated cleaning cost set.

[0129] The external sweeping path is determined based on the updated sweeping cost set.

[0130] For example, for multiple virtual areas 1, 2, 3, and 4 generated for the first target area, based on the preset virtual area planning rules, four virtual cleaning orders between the virtual areas 1, 2, 3, and 4 can be determined: 1-2-3-4, 2-3-4-1, 3-4-1-2, and 4-1-2-3.

[0131] For the virtual cleaning sequence 1-2-3-4, the cleaning cost 4out from virtual area 4 at the end of the virtual cleaning sequence to other target areas in the cleaning cost set is replaced with the cleaning cost 1out from virtual area 1 to other targets at the beginning of the virtual cleaning sequence. Similarly, for the virtual cleaning sequence 2-3-4-1, the cleaning cost 1out from virtual area 1 to other target areas is replaced with the cleaning cost 2out from virtual area 2 to other target areas; for the virtual cleaning sequence 3-4-1-2, the cleaning cost 2out from virtual area 2 to other target areas is replaced with the cleaning cost 3out from virtual area 3 to other target areas; for the virtual cleaning sequence 4-1-2-3, the cleaning cost 3out from virtual area 3 to other target areas is replaced with the cleaning cost 4out from virtual area 4 to other target areas; thus, the cleaning costs between virtual areas and target areas after the update shown in Table 4 can be obtained.

[0132] It should be noted that the replacement of cleaning costs between different virtual areas should be the same as the replacement of the same target area. For example, the cleaning cost from virtual area 4 to the second target area should be replaced by the cleaning cost from virtual area 1 to the second target area.

[0133]

[0134] Table 4

[0135] After completing the corresponding replacement of the cleaning costs under all virtual cleaning sequences, an updated cleaning cost set can be obtained, among which the cleaning costs from other target areas to virtual areas where virtual areas have not been generated, the cleaning costs between virtual areas, and the cleaning costs between other target areas do not need to be updated and remain unchanged.

[0136] The external sweeping path will be determined based on the updated sweeping cost set.

[0137] like Figure 12 As shown in Figure 2, the same target area generates multiple corresponding virtual areas 1, 2, 3, and 4. The cleaning costs between virtual areas are shown in Table 3, and the cleaning costs after replacement between virtual areas and other target areas are shown in Table 4.

[0138] Figure 12 Four virtual cleaning orders are shown in the figure. Since there is a cleaning cost of 0 between the virtual areas, the cleaning order between the virtual areas 1, 2, 3, and 4 in the external cleaning path determined with the minimum total cleaning cost as the goal must be one of the four virtual cleaning orders.

[0139] At the same time, in the external cleaning path determined based on the updated cleaning cost set, a target area will be reached to the virtual area at the first position in any virtual cleaning sequence, and then the virtual areas will be reached in sequence based on the virtual cleaning sequence, and finally the virtual area at the last position in the virtual cleaning sequence will be reached to another target area. Since the cleaning cost of the virtual area at the last position to reach other target areas has been replaced by the cleaning cost of the virtual area at the first position to reach other target areas, the cleaning cost actually calculated in the determined external cleaning path is the cleaning cost between the virtual area at the first position and other target areas. Taking the virtual cleaning sequence 1-2-3-4 as an example, if the external cleaning path finally adopts the cleaning sequence of 1-2-3-4, since the cleaning cost 4out of virtual area 4 to other target areas has been replaced by the cleaning cost 1out of virtual area 1 to other target areas, the actual calculation is still the cleaning cost of the target area to virtual area 1 and the cleaning cost of virtual area 1 to another target area, without introducing the error caused by the different cleaning starting points and cleaning end points of virtual area 1 and virtual area 4.

[0140] Accordingly, in the above step 110, the electronic device generates a global cleaning path based on the internal cleaning path and the external cleaning path, including:

[0141] For a target area having multiple sets of cleaning start points and cleaning end points, the electronic device determines, based on the external cleaning path, the virtual area that ranks first in the cleaning order among the multiple virtual areas corresponding to the target area as the target virtual area; and adopts the internal cleaning path of the target virtual area as the internal cleaning path of the target area.

[0142] Specifically, there is no need to substitute multiple virtual areas generated by the same target area into the global cleaning path. The external cleaning path is obtained with the goal of minimizing the total cleaning cost of the external cleaning path. The multiple virtual areas generated by the same target area are always adjacent in the cleaning order. The electronic device will use the multiple virtual areas generated by the target area that is at the first place in the cleaning order as the target virtual area to replace the target area to generate a global cleaning path.

[0143] Based on the previous example, the first target area generates corresponding virtual areas 1, 2, 3, and 4. Assuming that in the obtained external cleaning path, the cleaning order is to start from the global cleaning starting point, and successively clean the virtual areas 1, 2, 3, 4 and the second target area, and finally reach the global cleaning end point, then the electronic device can use virtual area 1 as the target virtual area to replace the first target area to generate a global cleaning path.

[0144] The global cleaning path generated by the electronic device will be composed of a cleaning path between the global cleaning start point and the cleaning start point A of the virtual area 1, an internal cleaning path between the cleaning start point A and the cleaning end point B of the virtual area 1, a cleaning path between the cleaning end point B of the virtual area 1 and the cleaning start point of the second target area, an internal cleaning path between the cleaning start point and the cleaning end point of the second target area, and a cleaning path between the cleaning end point of the second target area and the global cleaning end point.

[0145] Compared with conventional implementation methods, this implementation method reduces the amount of calculation required to solve the optimal path and improves the efficiency of electronic equipment in planning the global cleaning path.

[0146] Figure 13 This is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Figure 13At the hardware level, the device includes a processor 1302, an internal bus 1304, a network interface 1306, a memory 1308, and a non-volatile memory 1310. Of course, it may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 1302 reading the corresponding computer program from the non-volatile memory 1310 into the memory 1308 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0147] Please refer to Figure 14 , the cleaning path planning device can be applied to Figure 13 The electronic device shown in the figure is used to implement the technical solution of this specification. The cleaning path planning device includes an obstacle scanning unit 1410, an area division unit 1420, an intra-domain planning unit 1430, an inter-domain planning unit 1440 and a path generation unit 1450:

[0148] The obstacle scanning unit 1410 is used to obtain a plurality of areas to be cleaned and scan the areas for obstacles;

[0149] The area division unit 1420 is configured to, when an obstacle exists in any area to be cleaned, divide the area to be cleaned into a plurality of sub-areas based on the location information of the obstacle to obtain a target area set, wherein the target area set includes the obtained sub-areas and the area to be cleaned where no obstacle exists;

[0150] The intra-domain planning unit 1430 is configured to plan a cleaning path within each target area in the target area set to obtain an internal cleaning path for the target area;

[0151] The inter-domain planning unit 1440 is configured to plan cleaning paths between regions based on the internal cleaning paths of each target region, and determine external cleaning paths between each target region;

[0152] The path generation unit 1450 is configured to generate a global cleaning path based on the internal cleaning path and the external cleaning path.

[0153] Optionally, the electronic device is pre-set with area types of the area to be cleaned, and a mapping relationship between the area types and cleaning path planning rules;

[0154] The intra-domain planning unit 1430 performs cleaning path planning for each target area in the target area set to obtain the internal cleaning path of the target area, including:

[0155] For each target area, obtaining the area type of the target area;

[0156] Searching for a cleaning path planning rule corresponding to the area type in the mapping relationship;

[0157] A cleaning path is planned inside the target area based on the cleaning path planning rule to obtain an internal cleaning path of the target area.

[0158] Optionally, the inter-domain planning unit 1440 performs inter-domain cleaning path planning based on the internal cleaning paths of the target areas to determine the external cleaning paths between the target areas, including:

[0159] Determining a cleaning start point and a cleaning end point for each target area based on an internal cleaning path of the target area;

[0160] Based on the cleaning start and end points of each target area, determine the cleaning cost between any two target areas;

[0161] The external cleaning path between each target area is determined with the goal of minimizing the total cleaning cost from the preset global cleaning starting point, cleaning all target areas, and reaching the preset global cleaning end point.

[0162] Optionally, the inter-domain planning unit 1440 determines the cleaning cost between any two target areas based on the cleaning start point and the cleaning end point of each target area, including:

[0163] Determine whether the area distance between any two target areas exceeds a preset distance threshold;

[0164] When the area distance does not exceed the distance threshold, determining the cleaning cost based on the cleaning start point and the cleaning end point of the target area according to a preset cost estimation algorithm;

[0165] When the area distance exceeds the distance threshold, the starting distance between the cleaning starting point of the target area and the preset reference path, as well as the end point distance between the cleaning end point of the target area and the reference path are determined, and the cleaning cost is determined based on the starting distance and the end point distance.

[0166] Optionally, the inter-domain planning unit 1440 determines the cleaning cost between any two target areas based on the cleaning start point and the cleaning end point of each target area, including:

[0167] When the target area has multiple groups of cleaning start points and cleaning end points, a corresponding virtual area is generated for the target area based on each group of cleaning start points and cleaning end points, thereby obtaining multiple virtual areas corresponding to the target area;

[0168] Using the multiple virtual areas to replace the target areas to determine the cleaning cost between any two target areas, to obtain a set of cleaning costs between any two target areas, wherein the cleaning cost between any two virtual areas is determined based on a preset virtual area planning rule;

[0169] The inter-domain planning unit 1440 is further configured to:

[0170] Determining multiple virtual cleaning orders between the virtual areas based on preset virtual area planning rules;

[0171] For each virtual cleaning order, the cleaning cost between the virtual area at the end of the virtual cleaning order and other target areas in the cleaning cost set is replaced with the cleaning cost between the virtual area at the beginning of the cleaning order and the same target area. The corresponding replacement is completed under all virtual cleaning orders to obtain an updated cleaning cost set.

[0172] The external sweeping path is determined based on the updated sweeping cost set;

[0173] The path generation unit 1450 generates a global cleaning path based on the internal cleaning path and the external cleaning path, including:

[0174] For a target area having multiple sets of cleaning start points and cleaning end points, based on the external cleaning path, a virtual area that is first in the cleaning order among the multiple virtual areas corresponding to the target area is determined as the target virtual area;

[0175] The internal cleaning path of the target virtual area is used as the internal cleaning path of the target area.

[0176] Optionally, the obstacle scanning unit 1410 performs obstacle scanning on the plurality of areas to be cleaned, including:

[0177] The vehicle travels along a preset reference path and scans the plurality of areas to be cleaned for obstacles during the travel.

[0178] Optionally, the device further comprises:

[0179] The task execution unit 1460 executes the cleaning tasks for the plurality of areas to be cleaned based on the global cleaning path.

[0180] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.

[0181] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0182] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0183] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0184] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0185] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0186] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0187] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."

[0188] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.

Claims

1. A cleaning path planning method, applicable to any electronic device performing a cleaning task, comprising: Acquire a plurality of areas to be cleaned, and scan the areas for obstacles; When there is an obstacle in any area to be cleaned, the area to be cleaned is divided into multiple sub-areas based on the location information of the obstacle to obtain a target area set, which includes the sub-areas obtained after the division and the area to be cleaned where there is no obstacle; For each target area in the target area set, a cleaning path is planned within the area to obtain an internal cleaning path of the target area; Based on the internal cleaning paths of each target area, the cleaning paths between areas are planned to determine the external cleaning paths between each target area; generating a global cleaning path based on the internal cleaning path and the external cleaning path; The cleaning path planning between the areas based on the internal cleaning path of each target area and determining the external cleaning path between the target areas includes: Determining a cleaning start point and a cleaning end point for each target area based on an internal cleaning path of the target area; Based on the cleaning start and end points of each target area, determine the cleaning cost between any two target areas; An external cleaning path between each target area is determined with the goal of minimizing the total cleaning cost of cleaning all target areas starting from a preset global cleaning starting point and reaching a preset global cleaning end point. The external cleaning path is determined by constructing a weighted directed graph with each target area as a node and the cleaning cost between any two target areas as the directed weight between the nodes, and solving the optimal path with the minimum total weight traversing all nodes in the weighted directed graph. The method of determining the cleaning cost between any two target areas based on the cleaning start point and cleaning end point of each target area includes: When the target area has multiple sets of cleaning start points and cleaning end points, a corresponding virtual area is generated for the target area based on each set of cleaning start points and cleaning end points, thereby obtaining multiple virtual areas corresponding to the target area, each virtual area having different cleaning start points and cleaning end points, internal cleaning paths, and directions; Using the multiple virtual areas to replace the target areas to determine the cleaning cost between any two target areas, to obtain a set of cleaning costs between any two target areas, wherein the cleaning cost between any two virtual areas is determined based on a preset virtual area planning rule; The method further comprises: Determining multiple virtual cleaning orders between the virtual areas based on preset virtual area planning rules; For each virtual cleaning order, the cleaning cost between the virtual area at the end of the virtual cleaning order and other target areas in the cleaning cost set is replaced with the cleaning cost between the virtual area at the beginning of the cleaning order and the same target area. The corresponding replacement is completed under all virtual cleaning orders to obtain an updated cleaning cost set. The external sweeping path is determined based on the updated sweeping cost set.

2. The method according to claim 1, wherein the electronic device is pre-set with area types of the area to be cleaned and a mapping relationship between the area types and cleaning path planning rules; The step of planning a cleaning path within each target area in the target area set to obtain the internal cleaning path of the target area includes: For each target area, obtaining the area type of the target area; Searching for a cleaning path planning rule corresponding to the area type in the mapping relationship; A cleaning path is planned inside the target area based on the cleaning path planning rule to obtain an internal cleaning path of the target area.

3. The method according to claim 1, wherein determining the cleaning cost between any two target areas based on the cleaning start point and cleaning end point of each target area comprises: Determine whether the area distance between any two target areas exceeds a preset distance threshold; When the area distance does not exceed the distance threshold, determining the cleaning cost based on the cleaning start point and the cleaning end point of the target area according to a preset cost estimation algorithm; When the area distance exceeds the distance threshold, the starting distance between the cleaning starting point of the target area and the preset reference path, as well as the end point distance between the cleaning end point of the target area and the reference path are determined, and the cleaning cost is determined based on the starting distance and the end point distance.

4. The method according to claim 1, wherein generating a global sweeping path based on the internal sweeping path and the external sweeping path comprises: For a target area having multiple sets of cleaning start points and cleaning end points, based on the external cleaning path, determining a virtual area that ranks first in the cleaning order among the multiple virtual areas corresponding to the target area as the target virtual area; The internal cleaning path of the target virtual area is used as the internal cleaning path of the target area.

5. The method according to claim 1, wherein scanning the plurality of areas to be cleaned for obstacles comprises: The vehicle travels along a preset reference path and scans the plurality of areas to be cleaned for obstacles during the travel.

6. The method according to claim 1, further comprising: Based on the global cleaning path, cleaning tasks for the plurality of areas to be cleaned are performed.

7. A cleaning path planning device, applicable to any electronic device that performs a cleaning task, comprising an obstacle scanning unit, an area division unit, an intra-domain planning unit, an inter-domain planning unit, and a path generation unit: The obstacle scanning unit is used to obtain a plurality of areas to be cleaned and scan the areas for obstacles; The area division unit is configured to, when an obstacle exists in any area to be cleaned, divide the area to be cleaned into a plurality of sub-areas based on the location information of the obstacle to obtain a target area set, wherein the target area set includes the sub-areas obtained after the division and the area to be cleaned where no obstacle exists; The intra-domain planning unit is configured to plan a cleaning path within each target area in the target area set to obtain an internal cleaning path for the target area; The inter-domain planning unit is configured to plan cleaning paths between regions based on the internal cleaning paths of each target region, and determine external cleaning paths between each target region; The path generation unit is configured to generate a global cleaning path based on the internal cleaning path and the external cleaning path; The inter-domain planning unit performs cleaning path planning between regions based on the internal cleaning paths of each target region, and determines the external cleaning paths between each target region, including: Determining a cleaning start point and a cleaning end point for each target area based on an internal cleaning path of the target area; Based on the cleaning start and end points of each target area, determine the cleaning cost between any two target areas; An external cleaning path between each target area is determined with the goal of minimizing the total cleaning cost of cleaning all target areas starting from a preset global cleaning starting point and reaching a preset global cleaning end point. Determining the external cleaning path with the minimum total cleaning cost includes: constructing a weighted directed graph with each target area as a node and the cleaning cost between any two target areas as a directed weight between the nodes, and solving an optimal path with the minimum total weight that traverses all nodes in the weighted directed graph; The inter-domain planning unit determines the cleaning cost between any two target areas based on the cleaning start point and cleaning end point of each target area, including: When the target area has multiple sets of cleaning start points and cleaning end points, a corresponding virtual area is generated for the target area based on each set of cleaning start points and cleaning end points, thereby obtaining multiple virtual areas corresponding to the target area, each virtual area having different cleaning start points and cleaning end points, internal cleaning paths, and directions; Using the multiple virtual areas to replace the target areas to determine the cleaning cost between any two target areas, to obtain a set of cleaning costs between any two target areas, wherein the cleaning cost between any two virtual areas is determined based on a preset virtual area planning rule; The inter-domain planning unit is further configured to: Determining multiple virtual cleaning orders between the virtual areas based on preset virtual area planning rules; For each virtual cleaning order, the cleaning cost between the virtual area at the end of the virtual cleaning order and other target areas in the cleaning cost set is replaced with the cleaning cost between the virtual area at the beginning of the cleaning order and the same target area. The corresponding replacement is completed under all virtual cleaning orders to obtain an updated cleaning cost set. The external sweeping path is determined based on the updated sweeping cost set.

8. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the steps in the method according to any one of claims 1 to 6 by running the executable instructions.

9. A computer-readable storage medium having computer instructions stored thereon, wherein when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Mobile robot full-coverage path planning method, chip and robot

    CN112068557A

  • Cleaning path planning method based on path finding cost, chip and cleaning robot

    CN112799398A

  • Full-area coverage cleaning method and device, cleaning robot and storage device

    CN113064407A