Method for determining target area, self-mobile device and computer-readable storage medium

By using grid maps and area optimization operations in the cleaning robot, deleting areas that meet specific unreachable conditions is solved, and the problem of unreliability of cleaning areas is achieved by realizing the free walking of self-mobile devices in the target area and the reliable execution of cleaning tasks.

CN119043303BActive Publication Date: 2025-03-18FOSHAN YINXING INTELLIGENT MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411524700.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-18
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

The prior art is susceptible to the position of the slits when dividing the cleaning area, resulting in the unreliable cleaning area, especially when the door width is narrow, it is difficult for cleaning robots to enter the cleaning area.

Method used

By obtaining the grid map, performing area optimization operations, deleting areas located between two unknown grids that meet the first type of inaccessible conditions, and areas located between the unknown grid and the obstacle grid that meet the second type of inaccessible conditions, thereby determining a reliable target area.

Benefits of technology

Ensure that the self-mobile device can walk freely within the target area, improve the reliability and efficiency of cleaning tasks, and avoid the unreliability of cleaning areas caused by the clamped area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119043303B_ABST
    Figure CN119043303B_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to the field of map processing technology, and disclose a method for determining a target area, a self-mobile device, and a computer-readable storage medium. The method includes: obtaining a grid map, deleting an area between two unknown grids that meets the first type of inaccessible condition, deleting an area between an unknown grid and an obstacle grid that meets the second type of inaccessible condition, and searching for a connected domain containing the current machine position in the optimized map to obtain a target area. When a self-mobile device detects and constructs a grid map, it is easily affected by the position of the gap and obtains a slit area. The embodiments of the present application regard an area between two unknown grids that meets the first type of inaccessible condition, and an area between an unknown grid and an obstacle grid that meets the second type of inaccessible condition as a gap area, and delete both of them, thereby ensuring that a reliable target area is extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of map processing technology, and in particular to a method for determining a target area, a self-mobile device, and a computer-readable storage medium. Background Art

[0002] As people's quality of life improves, more and more self-moving devices are entering thousands of households. Cleaning robots, as a self-moving device with cleaning function, are widely used to clean indoor environments. Before cleaning, the cleaning robot needs to detect the surrounding environment and build a grid map. The related technology divides the cleaning area according to the partitioning algorithm, and the cleaning robot goes to the cleaning area for cleaning. However, the related technology usually divides the cleaning area according to the gap position, such as dividing the cleaning area by the position of the door as the gap position. Some doors are narrow in width, which makes the cleaning robot unable to enter the cleaning area for cleaning. Therefore, the cleaning partitioning method of the related technology is not reliable. Summary of the invention

[0003] One purpose of the embodiments of the present application is to provide a method for determining a cleaning area, a self-mobile device, and a computer-readable storage medium to solve the technical problem that the related art cannot reliably divide the area.

[0004] In a first aspect, an embodiment of the present application provides a method for determining a target area, which is applied to a self-moving device, comprising:

[0005] Acquire a grid map, wherein the grid map includes a traversable area, an obstacle area, and an unknown area, wherein the obstacle area includes a plurality of obstacle grids, and the unknown area includes a plurality of unknown grids;

[0006] Performing a regional optimization operation on the grid map to obtain an optimized map, wherein the regional optimization operation includes: deleting an area between two unknown grids and satisfying a first type of inaccessible condition, and deleting an area between the unknown grid and the obstacle grid and satisfying a second type of inaccessible condition;

[0007] Determining a current machine position of the self-moving device;

[0008] The connected domain including the current machine position is searched in the optimized map to obtain a target area.

[0009] In a second aspect, an embodiment of the present application provides a self-moving device, comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the self-moving device implements the above-mentioned method for determining the target area.

[0010] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the above-mentioned method for determining a target area.

[0011] The embodiment of the present application can achieve the following technical effects: when the self-moving device detects and constructs a grid map, it is easily affected by the position of the gap and obtains a gap area. The embodiment of the present application regards the area between two unknown grids and meeting the first type of inaccessible conditions, and the area between the unknown grid and the obstacle grid and meeting the second type of inaccessible conditions as the gap area, and deletes both, thereby ensuring that a reliable target area is extracted, which is conducive to the self-moving device being able to move freely in the target area and ensuring that the task can be reliably executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0013] Figure 1 A schematic diagram of a self-mobile device performing detection and mapping indoors provided in an embodiment of the present application;

[0014] Figure 2 A schematic diagram of a first grid map provided in an embodiment of the present application, wherein the grid map has an unknown area;

[0015] Figure 3 A schematic diagram of a second grid map provided in an embodiment of the present application, wherein the grid map has mixed areas;

[0016] Figure 4 A schematic diagram of a third grid map provided in an embodiment of the present application, wherein the width of the doorway is smaller than the maximum size of the self-moving device;

[0017] Figure 5 A schematic diagram of a fourth grid map provided in an embodiment of the present application, wherein the width of the doorway is greater than the maximum size of the self-moving device;

[0018] Figure 6 A schematic diagram of a flow chart of a method for determining a target area provided in an embodiment of the present application;

[0019] Figure 7A schematic diagram of a fifth grid map provided in an embodiment of the present application, wherein the first reference area is located on grid lines of two unknown grids;

[0020] Figure 8 A schematic diagram of a sixth grid map provided in an embodiment of the present application, wherein the second reference area is located between two unknown grids but not on the same grid line;

[0021] Fig. 9 A schematic diagram of a seventh grid map provided in an embodiment of the present application, wherein the seventh grid map presents a plurality of unknown starting grids and a plurality of unknown ending grids;

[0022] Fig.10 A schematic diagram of an eighth grid map provided in an embodiment of the present application, wherein the eighth grid map presents a situation in which a description of a first type of starting point is not satisfied during a search for an unknown starting point grid;

[0023] Fig.11 A schematic diagram of a ninth grid map provided in an embodiment of the present application, wherein the ninth grid map presents a situation in which a grid that satisfies the description of the first type of abnormal endpoint is encountered when searching for an unknown endpoint grid;

[0024] Fig.12 A schematic diagram of the tenth type of grid map provided in the embodiment of the present application, wherein the embodiment of the present application adopts method M to process the tenth type of grid map;

[0025] Fig.13 A schematic diagram of an eleventh grid map provided in an embodiment of the present application, wherein the embodiment of the present application adopts method N to process the eleventh grid map;

[0026] Fig.14 A schematic diagram of a twelfth grid map provided in an embodiment of the present application, wherein the twelfth grid map presents a situation in which an obstacle starting point description is not satisfied during a search for an obstacle starting point grid;

[0027] Fig.15 A schematic diagram of a thirteenth grid map provided in an embodiment of the present application, wherein the thirteenth grid map presents a situation in which a grid that satisfies the second type of abnormal endpoint description is encountered when searching for a target endpoint grid;

[0028] Fig.16 A schematic diagram of a grid map provided in another embodiment of the present application;

[0029] Fig.17 The embodiment of the present application provides Fig.16 A schematic diagram of marking the unknown starting grid and the unknown ending grid on the grid map;

[0030] Fig.18The embodiment of the present application provides Fig.16 The schematic diagram of the provided raster map after the first single-row and single-column processing;

[0031] Fig.19 The embodiment of the present application provides Fig.18 A schematic diagram of marking the unknown starting grid and the unknown ending grid on the grid map;

[0032] Fig. 20 The embodiment of the present application provides Fig.19 The schematic diagram of the provided raster map after the first multi-row and multi-column processing;

[0033] Fig.21 The embodiment of the present application provides Fig. 20 A schematic diagram of the provided raster map after the second multi-row and multi-column processing;

[0034] Fig. 22 The embodiment of the present application provides Fig.21 A schematic diagram of marking a target starting grid and a target end grid on a grid map;

[0035] Fig.23 The embodiment of the present application provides Fig. 22 The schematic diagram of the provided raster map after the second single-row and single-column processing;

[0036] Fig.24 A schematic diagram of searching for a connected domain including the current machine position on a grid map obtained after a series of processing to obtain a target area provided in an embodiment of the present application;

[0037] Fig.25 Based on the embodiments of the present application Fig.24 The provided target area updates the grid map and obtains a schematic diagram of the updated grid map;

[0038] Fig.26 A schematic diagram of the structure of a device for determining a target area provided in an embodiment of the present application;

[0039] Fig. 27 A schematic diagram of the structure of a self-moving device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0041] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0042] The embodiment of the present application provides a working scenario in which a self-moving device determines a target area, wherein the self-moving device includes a cleaning robot, a transport robot, a shopping guide robot, or a nursing robot, etc., and the cleaning robot includes a sweeping robot, a floor washing robot, a mopping machine, or a sweeping and mopping robot. When the self-moving device is a cleaning robot, the target area is the area that the self-moving device currently needs to clean. When the self-moving robot is a transport robot, a shopping guide robot, or a nursing robot, etc., the target area is the area that the self-moving device currently needs to perform operations.

[0043] See also Figure 1 , the self-mobile device 11 detects the surrounding environment using a laser radar and / or a camera in the room 12 to obtain detection data, and processes the detection data based on the SLAM algorithm (Simultaneous Localization and Mapping) to obtain a grid map. The grid map includes a passable area, an obstacle area, and an unknown area. The passable area is an area where the self-mobile device can walk, the obstacle area is an area that blocks the self-mobile device from walking, and the unknown area is an area that the self-mobile device cannot detect.

[0044] The mobile device 11 detects in different environments, obtains grid maps under different situations, and sends the grid maps to the mobile terminal for presentation.

[0045] See also Figure 2 In one environment, the mobile device 11 detects the current machine position through a laser radar and / or a camera to obtain a grid map. Fig. 20 , where the grid Fig. 20It includes a passable area 21 and an unknown area 22 connected to the current machine position. Figure 2 As shown, the passable area 21 is provided with a doorway 23, and the width of the doorway 23 is small. When the self-moving device 11 detects at the current machine position through the laser radar and / or camera, the laser line of the laser radar cannot hit the unknown area 22, or the camera cannot capture the unknown area 22. In order to ensure that the self-moving device 11 can reliably enter the corresponding area to operate, the embodiment of the present application regards the unknown area 22 as a type of inaccessible area, and the unknown area 22 needs to be deleted.

[0046] See also Figure 3 In another environment, the mobile device 11 detects the current machine position through a laser radar and / or a camera to obtain a grid map 30, wherein the grid map 30 includes a passable area 31 and a mixed area 32 connected to the current machine position. Figure 3 As shown, the passable area 31 is provided with a doorway 33, and the width of the doorway 33 is relatively small. Due to the width of the doorway 33, the doorway position and the detection position, when the self-moving device 11 detects at the current machine position through the laser radar and / or camera, the laser line of the laser radar can hit the wall 34, but cannot hit the area 35 opposite to the wall 34, or the camera can capture the wall 34, but cannot capture the area 35 opposite to the wall 34. In order to ensure that the self-moving device 11 can reliably enter the corresponding area to operate, the embodiment of the present application regards the mixed area 32 composed of the wall 34 and the area 35 as another type of inaccessible area, and the mixed area 32 needs to be deleted.

[0047] It is understandable that the embodiments of the present application can not only Figure 2 or Figure 3 The unknown area 22 and mixed area 32 involved are deleted, and other types of inaccessible areas formed by the influence of the slit position can also be deleted.

[0048] It is also understood that the no-entry areas determined by the mobile device when detecting different areas are relative concepts. Figure 4, the grid map 40 includes a first area 41 and a second area 42, the first area 41 is connected to the second area 42 through a door 43, wherein the width of the door 43 is less than the maximum size of the self-moving device, and when the shape of the self-moving device is circular, the maximum size of the self-moving device is the diameter. When the self-moving device 11 detects in the first area 41, the self-moving device 11 obtains the grid map 40, and since the self-moving device 11 cannot reach the second area 42 from the first area 41 through the door 43, the second area 42 is an inaccessible area. When the self-moving device 11 detects in the second area 42, the self-moving device 11 obtains the grid map 40, and since the self-moving device 11 cannot reach the first area 41 from the second area 42 through the door 43, the first area 41 is an inaccessible area.

[0049] See also Figure 5 The width of the door 43 is greater than the maximum size of the self-moving device. The self-moving device 11 can reach the first area 41 and the second area 42 through the door 43. The self-moving device 11 merges the first area 41 and the second area 42 into a target area.

[0050] The self-mobile device 10 searches for a connected domain including the current machine position of the self-mobile device 10 based on the grid map and the target area determination method described in the following embodiments to obtain the target area. Figure 2 In , if the self-mobile device is in the passable area 21, the passable area 21 is the target area. Figure 3 In , if the self-mobile device is in the passable area 31, the passable area 31 is the target area. Figure 4 In , if the self-equipped device is in the first area 41, the first area 41 is the target area, and if the self-equipped device is in the second area 42, the second area 42 is the target area. Figure 5 In the example, the first area 41 and the second area 42 are combined into a target area.

[0051] The following is a method for determining a target area in an embodiment of the present application. Figure 6 The method for determining the target area includes steps S61 to S64. It can be understood that the embodiment of the present application does not make any improper limitations on the execution order between the steps.

[0052] The embodiment of the present application executes step S61 to obtain a grid map.

[0053] There are many ways to obtain raster maps.

[0054] In some embodiments, the self-mobile device can construct a grid map in real time. The self-mobile device uses a laser radar and / or a camera to detect the surrounding environment and obtain detection data. Then, the self-mobile device processes the detection data according to a preset map construction algorithm to obtain a grid map, wherein the preset map construction algorithm includes a SLAM algorithm or a topological map construction algorithm.

[0055] In some embodiments, the mobile device pre-stores a grid map locally in advance, and when the target area needs to be determined, the mobile device retrieves the grid map locally.

[0056] In some embodiments, the grid map is pre-stored on a storage device, such as a USB flash drive. When the target area needs to be determined, the user inserts the storage device into the mobile device, and the mobile device reads the grid map from the storage device.

[0057] In some embodiments, the grid map is pre-stored on the terminal device or the cloud server. When the target area needs to be determined, the mobile device requests the terminal device or the cloud server to return the grid map.

[0058] The grid map includes a passable area, an obstacle area, and an unknown area. The passable area includes multiple passable grids, the obstacle area includes multiple obstacle grids, and the unknown area includes multiple unknown grids. The passable grid is represented by the first grid value, the obstacle grid is represented by the second grid value, and the unknown grid is represented by the third grid value. The designer customizes the first grid value, the second grid value, and the third grid value based on engineering experience. For example, the first grid value is 0, the second grid value is 90, and the third grid value is 255. It can be understood that the grid value can be represented by the pixel value of each grid or by the rules specified by the designer.

[0059] After executing step S61 to obtain a grid map, the embodiment of the present application executes step S62 to perform a regional optimization operation on the grid map to obtain an optimized map, wherein the regional optimization operation includes: deleting an area located between two unknown grids and satisfying a first type of inaccessible condition, and deleting an area located between an unknown grid and an obstacle grid and satisfying a second type of inaccessible condition.

[0060] The first type of no-entry condition is set to delete the unknown area between two unknown grids. It can be understood that the situation of the area between two unknown grids includes the following two types.

[0061] The first case is that the grid in the region is not only between the two unknown grids, but also on the same grid line as the two unknown grids, which is a row grid line or a column grid line. Figure 7, the unknown grid is represented by light gray, the first reference area 71 is on the same grid line as the unknown grid 72 and the unknown grid 73, and is between the unknown grid 72 and the unknown grid 73. At the same time, the first reference area 71 satisfies the first type of non-entry condition. Therefore, the embodiment of the present application deletes the first reference area 71.

[0062] The second situation is: the grid map is configured with a coordinate system, the horizontal coordinate of the grid in this area is greater than the horizontal coordinate of one of the two unknown grids, but the horizontal coordinate of the grid in this area is less than the horizontal coordinate of the other unknown grid, or the vertical coordinate of the grid in this area is greater than the vertical coordinate of one of the two unknown grids, but the vertical coordinate of the grid in this area is less than the vertical coordinate of the other unknown grid. See Figure 8 , the second reference area 81 is located between the unknown grid 82 and the unknown grid 83, but not on the same grid line, and the horizontal coordinate of the second reference area 81 is greater than the unknown grid 82, but smaller than the unknown grid 83, and the second reference area 81 satisfies the first type of non-entry condition. Therefore, the embodiment of the present application deletes the second reference area 81.

[0063] In some embodiments, the first type of inaccessible condition includes a first single-row single-column condition, and deleting the region between two unknown grids and satisfying the first type of inaccessible condition includes the following steps: deleting the grids between the two unknown grids and on the same grid line, wherein the grids between the two unknown grids and on the same grid line satisfy the first single-row single-column condition. It can be understood that the grids of the region and the two unknown grids are located on the same row grid line, or the grids of the region and the two unknown grids are located on the same column grid line.

[0064] It can be understood that the method of deleting the grid includes setting the grid value of the grid to 255 or other specified grid values.

[0065] The area between two unknown grids and on the same grid line is usually an unknown area. The embodiment of the present application deletes such unknown areas without partitioning such unknown areas, thereby avoiding the risk of navigating to such unknown areas from a mobile device. This approach is conducive to accurately and reliably determining a safer target area.

[0066] The unknown grids include unknown starting grids and unknown end grids. The unknown starting grid is an unknown grid that meets the first type of starting point description, and the unknown end grid is an unknown grid that meets the first type of normal end point description.

[0067] The first type of starting point description is to find the description information of the unknown starting point grid on the grid map. The first type of starting point description is: if the grid adjacent to the unknown grid along the first search direction is a passable grid, then the unknown grid is the unknown starting point grid, that is: if the grid value of the first grid is the third grid value, and the grid value of the second grid adjacent to the first grid along the search direction is the first grid value, then the first grid is the unknown starting point grid.

[0068] For example, please combine Figure 7 When the first search direction is from left to right, the grid value of the first grid (ie, the unknown grid 72) is 255, and the grid value of the second grid to the right of the first grid and adjacent to the first grid is 0. Therefore, the unknown grid 72 is an unknown starting grid.

[0069] The first type of normal endpoint description is the description information of finding the unknown endpoint grid on the grid map. The first type of normal endpoint description is: if the grid adjacent to the unknown grid in the opposite direction of the first search is a passable grid, then the unknown grid is the unknown endpoint grid, that is: if the grid value of the first grid is the third grid value, and the grid value of the third grid adjacent to the first grid in the opposite direction of the search is the first grid value, then the first grid is the unknown endpoint grid.

[0070] For example, please combine Figure 7 When the first search direction is from left to right, the grid value of the first grid (i.e., unknown grid 73) is 255, and the grid value of the third grid to the left of the first grid and adjacent to the first grid is 0. Therefore, unknown grid 73 is the unknown end grid, and unknown grid 72 and unknown grid 73 are on the same grid line.

[0071] Deleting a grid located between two unknown grids and on the same grid line includes the following steps: searching on the grid map according to a first search direction to obtain an unknown starting grid that meets the first type of starting point description and an unknown ending grid that meets the first type of normal ending point description, the unknown starting grid and the unknown ending grid are on the same grid line, determining that the grid between the unknown starting grid and the unknown ending grid meets the first single-row and single-column condition, and deleting the grid between the unknown starting grid and the unknown ending grid.

[0072] The first search direction is any one of the first direction and the second direction, the first direction is any one of from left to right and from right to left, and the second direction is any one of from top to bottom and from bottom to top. The embodiment of the present application selects the first direction (or the second direction) as the first search direction to search on the grid map, deletes the area between the two unknown grids and satisfying the first type of inaccessible condition, and then selects the second direction (or the first direction) as the first search direction to search on the grid map, and deletes the area between the two unknown grids and satisfying the first type of inaccessible condition. The embodiment of the present application deletes the grid between the unknown starting grid and the unknown end grid, which is conducive to accurately and reliably extracting the target area from the grid map, so that the self-mobile device can perform tasks in full coverage on the target area without hindrance.

[0073] It is understandable that after the embodiment of the present application searches for the unknown starting grid described by the first type of starting point according to the first search direction, the embodiment of the present application continues to search for the unknown end grid along the first search direction. In the process of searching for the unknown end grid, when the embodiment of the present application encounters an obstacle grid, the embodiment of the present application abandons the unknown starting grid that has been found, and re-determines a new unknown starting grid and an unknown end grid after the obstacle grid along the first search direction, until the boundary of the grid map is found to end the current search operation.

[0074] In some embodiments, the first type of inaccessible condition includes a first multi-row and multi-column condition, and deleting the area between two unknown grids and satisfying the first type of inaccessible condition includes the following steps: determining a first maximum area between the two unknown grids, the first maximum area being the largest area between the two unknown grids that does not contain an obstacle grid, deleting the first maximum area whose area size is greater than or equal to a preset size threshold, wherein the first maximum area whose area size is greater than or equal to the preset size threshold satisfies the first multi-row and multi-column condition, and retaining the first maximum area whose area size is less than the preset size threshold.

[0075] The unknown grids include an unknown starting grid and an unknown ending grid, and determining the first maximum area between the two unknown grids includes the following steps:

[0076] A11: Search on the grid map according to the second search direction, and use the first grid that meets the description of the first type of starting point as the first type of initial grid.

[0077] A12: Starting from the first type of initial grid, perform a first type of starting point search operation according to the third search direction to obtain a first type of starting point set.

[0078] A13: Perform a first-category endpoint search operation according to the first-category starting point set and the first-category normal endpoint description to obtain a first-category endpoint set.

[0079] A14: Determine a first maximum area according to the first type of endpoint set.

[0080] In A11, the second search direction is any one of top-to-bottom, bottom-to-top, left-to-right, and right-to-left. The embodiment of the present application selects one of the above four directions in sequence as the second search direction to determine the first maximum area. When the second search direction is from top to bottom, according to the definition of the first type of starting point described above, if the grid value of grid a1 is 255, and the grid value of the grid above grid a1 and adjacent to the grid is 0, then grid a1 is the first type of initial grid. Similarly, when the second search direction is from left to right, according to the definition of the first type of starting point described above, if the grid value of grid a1 is 255, and the grid value of the grid to the right of grid a1 and adjacent to the grid is 0, then grid a1 is the first type of initial grid.

[0081] See also Fig. 9 When the second search direction is from left to right, the embodiment of the present application starts searching from the 0th row of grid lines from left to right. Since no grid on the 0th row of grid lines satisfies the first type of starting point description, the embodiment of the present application then searches from the 1st row of grid lines from left to right. Since grid 91 on the 1st row and 1st column satisfies the first type of starting point description, grid 91 on the 1st row and 1st column serves as the first type of initial grid.

[0082] In A12, the first type of starting point set includes multiple unknown starting point grids that are located on the same grid line and are continuously arranged, the first type of initial grid is an unknown starting point grid among the multiple unknown starting point grids, and the third search direction is perpendicular to the second search direction. For example, if the second search direction is from top to bottom, the third search direction is from left to right or from right to left. If the second search direction is from left to right, the third search direction is from top to bottom.

[0083] Please combine Fig. 9 When the 1st row and 1st column grid 91 is used as the first type of initial grid, the embodiment of the present application uses the 1st row and 1st column grid 91 as the first unknown starting point grid and starts searching for other unknown starting point grids from bottom to top.

[0084] Starting from the first type of initial grid, a first type of starting point search operation is performed according to a third search direction to obtain a first type of starting point set, including the following steps: starting from the first type of initial grid, each first reference grid is sequentially obtained according to the third search direction, and it is determined whether the first reference grid satisfies the first type of starting point description. If so, the first reference grid is placed in the first type of starting point set as an unknown starting point grid, and the step of sequentially obtaining each first reference grid according to the third search direction is returned. If not, the first type of starting point set is output.

[0085] Please combine Fig. 9 , the embodiment of the present application starts from the 1st row and 1st column grid 91, and obtains the 2nd row and 1st column grid 92 (i.e., the first reference grid) from bottom to top. Since the 2nd row and 1st column grid 92 meets the first type of starting point description, the embodiment of the present application places the 2nd row and 1st column grid 92 into the first type of starting point set Q1={91,92}. Similarly, the 3rd row and 1st column grid 93 to the 9th row and 1st column grid 99 all meet the first type of starting point description. The embodiment of the present application places the 3rd row and 1st column grid 93 to the 9th row and 1st column grid 99 into the first type of starting point set Q1={91,92,93,94,95,96,97,98,99}.

[0086] Depend on Fig. 9 It can be seen that in the first type of starting point set Q1, all unknown starting point grids are on the same column grid line. However, when determining the first type of initial grid, the first type of initial grid is determined according to the direction of the row grid lines (i.e., from left to right). After the first type of initial grid is determined, the embodiment of the present application takes the first type of initial grid as a reference and determines other unknown starting point grids according to the direction of the column grid lines (i.e., from bottom to top).

[0087] In the process of performing the first type starting point search operation, if the first reference grid does not meet the first type starting point description, the embodiment of the present application outputs the current first type starting point set. For example, refer to Fig.10 , the grid 96 in the 6th row and the 1st column does not satisfy the description of the first type of starting point. The embodiment of the present application ends the current first type of starting point search operation and outputs the current first type starting point set Q2={91,92,93,94,95}.

[0088] In A13, the first type of endpoint set includes at least one unknown endpoint grid, and each unknown endpoint grid may be on the same grid line or not, but an unknown endpoint grid and an unknown starting grid are on the same grid line that matches the second search direction. For example, if the second search direction is from left to right, and the grid line that matches from left to right is a row grid line, then the unknown endpoint grid and the unknown starting grid are both on the same row grid line.

[0089] A first-class endpoint search operation is performed according to the first-class starting point set and the first-class normal endpoint description to obtain the first-class endpoint set, including the following steps: determining whether the number of unknown starting point grids contained in the first-class starting point set is greater than or equal to a preset number threshold; if so, performing an unknown endpoint search operation according to the first-class starting point set and the first-class normal endpoint description to obtain the first-class endpoint set; if less than, returning to the step of searching along the second search direction for the first grid that meets the first-class starting point description as the first-class initial grid.

[0090] The preset number threshold is customized by the designer based on engineering experience, for example, the preset number threshold is 7. If the number of unknown starting grids contained in the first type of starting point set is greater than or equal to the preset number threshold, since the unknown starting grid represents an unknown area, it means that the area corresponding to the first type of starting point set is more likely to be an unknown area with a larger area. The reason behind this is often that the laser radar or camera of the self-moving device cannot detect the area through the slit position, causing the area to be presented as an unknown area on the grid map. In order to further prove that the area corresponding to the first type of starting point set is more likely to be an unknown area with a larger area, the embodiment of the present application needs to further determine the first type of end point set. If the number of unknown starting grids contained in the first type of starting point set is less than the preset number threshold, it means that the laser radar or camera of the self-moving device can detect individual local positions in the area.

[0091] Please combine Fig. 9 Since the number of unknown starting grids included in the first type starting point set Q1 is 9, and the number of unknown starting grids 9 is greater than the preset number threshold 7, the embodiment of the present application enters the step of determining the first type end point set. Fig.10 Since the number of unknown starting grids included in the first type of starting point set Q is 5, and the number of unknown starting grids 5 is less than the preset number threshold 7, the embodiment of the present application needs to redetermine the first type of initial grid, that is: start searching for the first type of initial grid from the 7th row of grid lines.

[0092] The unknown endpoint search operation is performed according to the first type of starting point set and the first type of normal endpoint description to obtain the first type of endpoint set, including the following steps: determining the unknown starting point grid in the first type of starting point set in a to-be-searched state as a reference unknown starting point grid according to a preset grid arrangement order, starting from the reference unknown starting point grid, sequentially acquiring the second reference grid according to the third search direction, judging whether the second reference grid satisfies the first type of normal endpoint description, if the second reference grid satisfies the first type of normal endpoint description, placing the second reference grid as the unknown endpoint grid into the first type of endpoint set, returning to the step of determining the unknown starting point grid in the first type of starting point set in a to-be-searched state as the reference unknown starting point grid according to the preset grid arrangement order, if the second reference grid does not satisfy the first type of normal endpoint description, judging whether the second reference grid satisfies the first type of abnormal endpoint description, if the second reference grid satisfies the first type of abnormal endpoint description, outputting the first type of endpoint set, and if the second reference grid does not satisfy the first type of abnormal endpoint description, returning to the step of sequentially acquiring the second reference grid according to the third search direction.

[0093] In some embodiments, the preset grid arrangement order is the order of the horizontal coordinate from small to large, or the order of the horizontal coordinate from large to small, or the order of the vertical coordinate from small to large, or the order of the vertical coordinate from large to small. The state to be searched refers to the state in which the unknown starting point grid does not participate in the operation of determining the unknown end point grid. The third reference grid is a grid encountered in the process of searching for the unknown end point grid. The first type of abnormal end point is described as: starting from the unknown starting point grid, searching along the grid line matching the first search direction, when an obstacle grid is encountered before the unknown end point grid is determined, the obstacle grid is an abnormal end point grid, that is: the grid value of the first grid is the second grid value, then the first grid is an abnormal end point grid.

[0094] Please combine Fig. 9 In the embodiment of the present application, the unknown starting point grid 91 is determined as the reference unknown starting point grid, and the second reference grids are obtained in sequence from left to right. If the second reference grid satisfies the first type of normal endpoint description, it means that the unknown endpoint grid corresponding to the unknown starting point grid 91 has been found.

[0095] like Fig. 9 As shown, grid 911 is used as the second reference grid, which satisfies the first type of normal endpoint description. Therefore, grid 911 is used as the unknown endpoint grid corresponding to unknown starting grid 91. The embodiment of the present application puts grid 911 into the first type of endpoint set P1={911}. By analogy, the embodiment of the present application sequentially finds grids 912 to 919 as unknown endpoint grids. Therefore, the first type of endpoint set P1={911,912,913,914,915,916,917,918,919}, where unknown starting grid 91 corresponds to unknown endpoint grid 911, unknown starting grid 92 corresponds to unknown endpoint grid 912, and so on.

[0096] See also Fig.11 , the embodiment of the present application has obtained the first type of starting point set Q1={91,92,93,94,95,96,97,98,99}, and, according to the above method, grids 911 to 916 are also found as unknown end grids. When the embodiment of the present application needs to find the unknown end grid 920 corresponding to the unknown starting point grid 97 (grid 920 is after grid 916), the grid value of grid 920 is 90, so grid 920 meets the first type of abnormal end point description, grid 920 is an abnormal end point grid, and the embodiment of the present application outputs the existing first type of end point set P2={911,912,913,914,915,916}.

[0097] In A14, determining the first maximum area according to the first type of endpoint set includes the following steps: forming a grid unit with multiple grids located between the first type of unknown endpoint grid and the first type of unknown starting point grid, the first type of unknown endpoint grid is an unknown endpoint grid in the first type of endpoint set, the first type of unknown starting point grid is an unknown starting point grid on the same grid line as the first type of unknown endpoint grid, and combining all grid units to obtain the first maximum area.

[0098] The area size is represented by the number of unknown endpoint grids, the preset size threshold is represented by the preset endpoint threshold, and deleting the first largest area whose area size is greater than or equal to the preset size threshold includes the following steps: if the number of unknown endpoint grids contained in the first type of endpoint set is less than the preset endpoint threshold, deleting the first largest area.

[0099] like Fig. 9 As shown, the embodiment of the present application selects unknown starting grid 91 as a first type of unknown starting grid, selects unknown end grid 911 as a first type of unknown end grid corresponding to unknown starting grid 911, and multiple grids between unknown starting grid 91 and unknown end grid 911 form grid unit U1, and so on, grid units U1 to U9 can be obtained. The embodiment of the present application combines grid units U1 to U9 to obtain the first maximum area. The embodiment of the present application adopts the above-mentioned approach, which can maximize the search for the first maximum area between two unknown grids that meets the first multi-row and multi-column conditions, so that the first maximum area with a larger area caused by the slit position can be deleted, ensuring that the target area extracted by the embodiment of the present application can allow the self-equipped device to move and pass freely, thereby improving the reliability of the operation.

[0100] The second type of no-entry condition is used to delete the area between the unknown grid and the obstacle grid. It can be understood that the area between the unknown grid and the obstacle grid is the same as Figure 7 and Figure 8 The situation shown is similar and will not be described here in detail.

[0101] The obstacle grid includes an obstacle start grid and an obstacle end grid. The obstacle start grid is an obstacle grid that meets the obstacle start description, that is, the obstacle start description is: if the grid value of the first grid is the second grid value, and the grid value of the second grid adjacent to the first grid along the first search direction is the first grid value, then the first grid is the obstacle start grid. The obstacle end grid is an obstacle grid that meets the obstacle end description, that is, the obstacle end description is: if the grid value of the first grid is the second grid value, and the grid value of the third grid adjacent to the first grid in the opposite direction of the first search direction is the first grid value, then the first grid is the obstacle end grid.

[0102] In some embodiments, the second type of no-entry condition includes a second multi-row and multi-column condition, and deleting the area between the unknown grid and the obstacle grid and satisfying the second type of no-entry condition includes the following steps: deleting the area between the obstacle starting grid and the unknown ending grid and satisfying the second multi-row and multi-column condition.

[0103] In some embodiments, the second type of no-entry condition includes a second multi-row and multi-column condition, and deleting the area between the unknown grid and the obstacle grid and satisfying the second type of no-entry condition includes the following steps: deleting the area between the unknown starting grid and the obstacle end grid and satisfying the second multi-row and multi-column condition.

[0104] Let "delete the area between the obstacle starting grid and the unknown end grid and satisfying the second multi-row multi-column condition" be practice M, let "delete the area between the unknown starting grid and the obstacle end grid and satisfying the second multi-row multi-column condition" be practice N. It can be understood that the embodiment of the present application can first execute practice M and then execute practice N, or first execute practice N and then execute practice M, or execute practice M and practice N at the same time. Alternatively, the embodiment of the present application can select a solution between practice M and practice N for execution.

[0105] In addition, the embodiment of the present application can also execute the single-row single-column practice K on the basis of the practice M and / or the practice N. It can be understood that the execution relationship between the single-row single-column practice K and the practices M and N is as follows: the embodiment of the present application can first execute the practice M, then execute the practice K, and finally execute the practice N, or first execute the practice K, then execute the practice M, and finally execute the practice N, or first execute the practice K, then execute the practice N, and finally execute the practice M, or first execute the practice M, then execute the practice N, and finally execute the practice K, or first execute the practice N, then execute the practice K, and finally execute the practice M, or first execute the practice N, then execute the practice K, and finally execute the practice M, or first execute the practice N, then execute the practice M, and finally execute the practice K.

[0106] It can be understood that the number of single-row and single-column practices K can be not only one but also two. For example, the two single-row schemes are C1 and C2 respectively. The execution relationship of the single-row and single-column practices K1, C2, practice M and practice N is as follows: the embodiment of the present application can first execute practice K1, then execute practice M, then execute practice K2, and finally execute practice N, or it can also be combined into the above-mentioned corresponding variation schemes, which are not repeated here.

[0107] It can be understood that the specific technical means of method M and method N are similar. For the convenience of brief description, the embodiment of the present application summarizes the obstacle starting grid of method M and the unknown starting grid of method N, and superimposes the two into a target starting grid. The embodiment of the present application summarizes the unknown end grid of method M and the obstacle end grid of method N, and superimposes the two into a target end grid.

[0108] It can be understood that if the obstacle starting grid is the target starting grid, the unknown end grid is the target end grid, and if the unknown starting grid is the target starting grid, the obstacle end grid is the target end grid.

[0109] In some embodiments, deleting an area between a target starting grid and a target ending grid and satisfying a second multi-row and multi-column condition comprises the following steps: determining a second maximum area between the target starting grid and the target ending grid, the second maximum area being the maximum area between the target starting grid and the target ending grid that does not contain a grid with the same grid value as the target starting grid, deleting the second maximum area whose area size is greater than or equal to a preset size threshold, wherein the second maximum area whose area size is greater than or equal to the preset size threshold satisfies the second multi-row and multi-column condition, and retaining the second maximum area whose area size is less than the preset size threshold.

[0110] As mentioned above, if the obstacle starting grid is the target starting grid, the unknown end grid is the target end grid, then: the embodiment of the present application determines the second largest area between the obstacle starting grid and the unknown end grid, the second largest area is the largest area between the obstacle starting grid and the unknown end grid that does not contain a grid with the same grid value as the obstacle starting grid, and deletes the second largest area whose area size is greater than or equal to the preset size threshold.

[0111] As mentioned above, if the unknown starting grid is the target starting grid, and the obstacle end grid is the target end grid, then: the embodiment of the present application determines the second largest area between the unknown starting grid and the obstacle end grid, the second largest area is the largest area between the unknown starting grid and the obstacle end grid that does not contain a grid with the same grid value as the unknown starting grid, and deletes the second largest area whose area size is greater than or equal to the preset size threshold.

[0112] Determining the second largest area between the target start grid and the target end grid comprises the following steps:

[0113] B11: Search on the grid map according to the second search direction, and use the first grid that meets the description of the second type of starting point as the second type of initial grid.

[0114] B12: Starting from the second type of initial grid, a second type of starting point search operation is performed according to the third search direction to obtain a second type of starting point set.

[0115] B13: Perform a second-category endpoint search operation according to the second-category starting point set and the second-category normal endpoint description to obtain a second-category endpoint set.

[0116] B14: Determine the second largest area based on the second type endpoint set.

[0117] In B11, the second search direction is any one of top-to-bottom, bottom-to-top, left-to-right, and right-to-left. The embodiment of the present application selects one direction in sequence from the above four directions as the second search direction to determine the second largest area.

[0118] In method M, in some embodiments, the second type of starting point description includes an obstacle starting point description, and the obstacle starting point description is: if the grid adjacent to the obstacle grid along the first search direction is a passable grid, then the obstacle grid is the target starting point grid, that is: if the grid value of the first grid is the second grid value, and the grid value of the second grid adjacent to the first grid along the first search direction is the first grid value, then the first grid is the target starting point grid.

[0119] When the embodiment of the present application searches on the grid map according to the second search direction, if the first grid encountered meets the obstacle starting point description, the grid is a second type of initial grid, and the second type of initial grid in this case belongs to an obstacle grid.

[0120] See also Fig.12 When the second search direction is from left to right, the embodiment of the present application starts searching from the 0th row of grid lines from left to right. Since no grid on the 0th row of grid lines satisfies the obstacle starting point description, the embodiment of the present application then searches from the 1st row of grid lines from left to right. Since the 1st row and 1st column grid 121 satisfies the obstacle starting point description, the 1st row and 1st column grid 121 is used as the second type of initial grid.

[0121] In practice N, in some embodiments, the second type of starting point description includes an unknown starting point description, and the unknown starting point description is: if the grid adjacent to the unknown grid along the first search direction is a passable grid, then the unknown grid is the target starting point grid, that is: if the grid value of the first grid is the third grid value, and the grid value of the second grid adjacent to the first grid along the first search direction is the first grid value, then the first grid is the target starting point grid.

[0122] When the embodiment of the present application searches on the grid map according to the second search direction, if the first grid encountered meets the description of the unknown starting point, the grid is a second type of initial grid, and the second type of initial grid in this case belongs to an unknown grid.

[0123] See also Fig.13When the second search direction is from left to right, the embodiment of the present application starts searching from the 0th row of grid lines from left to right. Since none of the grids on the 0th row of grid lines satisfy the unknown starting point description, the embodiment of the present application then searches from the 1st row of grid lines from left to right. Since the 1st row and 1st column grid 131 satisfies the unknown starting point description, the 1st row and 1st column grid 131 serves as the second type of initial grid.

[0124] In B12, the second type of starting point set includes multiple target starting point grids that are located on the same grid line and are arranged continuously, the second type of initial grid is a target starting point grid among the multiple target starting point grids, and the third search direction is perpendicular to the second search direction. For example, if the second search direction is from top to bottom, the third search direction is from left to right or from right to left. If the second search direction is from left to right, the third search direction is from top to bottom.

[0125] It can be understood that in method M, all target starting grids of the second type of starting point set are obstacle grids. Fig.12 When the 1st row and 1st column grid 121 is used as the second type of initial grid, the embodiment of the present application uses the 1st row and 1st column grid 121 as the first target starting grid and starts searching for other target starting grids from bottom to top.

[0126] In method N, all target starting grids of the second type of starting point set are unknown grids. Fig.13 When the 1st row and 1st column grid 131 is used as the second type of initial grid, the embodiment of the present application uses the 1st row and 1st column grid 131 as the first target starting grid and starts searching for other target starting grids from bottom to top.

[0127] Starting from the second type of initial grid, performing the second type of starting point search operation according to the third search direction to obtain the second type of starting point set includes the following steps: starting from the second type of initial grid, sequentially obtaining each third reference grid according to the third search direction, judging whether the third reference grid satisfies the second type of starting point description, if so, placing the second reference grid as the target starting point grid into the second type of starting point set, returning to the step of sequentially obtaining each second reference grid according to the third search direction, if not, outputting the second type of starting point set.

[0128] In step M, please combine Fig.12, the embodiment of the present application starts from the 1st row and 1st column grid 121, and obtains the 2nd row and 1st column grid 122 (i.e., the second reference grid) from bottom to top. Since the 2nd row and 1st column grid 122 meets the obstacle starting point description, the embodiment of the present application places the 2nd row and 1st column grid 122 into the second type starting point set Q3={121,122}. Similarly, the 3rd row and 1st column grid 123 to the 9th row and 1st column grid 129 all meet the second type starting point description. The embodiment of the present application places the 3rd row and 1st column grid 123 to the 9th row and 1st column grid 129 into the second type starting point set Q3={121,122,123,124,125,126,127,128,129}.

[0129] In step N, please combine Fig.13 , the embodiment of the present application starts from the 1st row and 1st column grid 131, and obtains the 2nd row and 1st column grid 132 (i.e., the second reference grid) from bottom to top. Since the 2nd row and 1st column grid 132 satisfies the unknown starting point description, the embodiment of the present application places the 2nd row and 1st column grid 132 into the second type starting point set Q4={131,132}. Similarly, the 3rd row and 1st column grid 133 to the 9th row and 1st column grid 139 all satisfy the second type starting point description. The embodiment of the present application places the 3rd row and 1st column grid 133 to the 9th row and 1st column grid 139 into the second type starting point set Q4={131,132,133,134,135,136,137,138,139}.

[0130] After performing the second type of starting point search operation, if the second reference grid does not meet the second type of starting point description, the embodiment of the present application outputs the current second type of starting point set. For example, refer to Fig.14 In method M, the grid 126 in the 6th row and the 1st column does not satisfy the obstacle starting point description. The embodiment of the present application ends the current second-type starting point search operation and outputs the current second-type starting point set Q5={121,122,123,124,125}.

[0131] In B13, the second type of endpoint set includes at least one target endpoint grid, and each target endpoint grid may be on the same grid line or not, but a target endpoint grid and a target start grid are on the same grid line that matches the second search direction. For example, if the second search direction is from left to right, and the grid line that matches from left to right is a row grid line, then the target endpoint grid and the target start grid are both on the same row grid line.

[0132] In method M, the second type of normal endpoint description includes an unknown endpoint description, and the unknown endpoint description is: if the grid adjacent to the unknown grid opposite to the first search direction is a passable grid, then the unknown grid is the target endpoint grid, that is: if the grid value of the first grid is the third grid value, and the grid value of the third grid adjacent to the first grid opposite to the first search direction is the first grid value, then the first grid is the target endpoint grid.

[0133] The second type of abnormal endpoint description includes an obstacle abnormal endpoint description. The obstacle abnormal endpoint description is: starting from the target starting point grid, searching along the grid line matching the first search direction, when an obstacle grid is encountered before the target endpoint grid is determined, the obstacle grid is the abnormal endpoint grid, that is: the obstacle abnormal endpoint description is: if the grid value of the first grid is the second grid value, then the first grid is the abnormal endpoint grid.

[0134] In practice N, the second type of normal endpoint description includes an obstacle endpoint description, and the obstacle endpoint description is: if the grid adjacent to the obstacle grid opposite to the first search direction is a passable grid, then the obstacle grid is the target endpoint grid, that is: if the grid value of the first grid is the second grid value, and the grid value of the third grid adjacent to the first grid opposite to the first search direction is the first grid value, then the first grid is the target endpoint grid.

[0135] The second type of abnormal endpoint description includes an unknown abnormal endpoint description, which is: starting from the target starting point grid and searching along the grid line matching the first search direction, when an unknown grid is encountered before the target end point grid is determined, the unknown grid is the abnormal end point grid, that is: if the grid value of the first grid is the third grid value, the first grid is the abnormal end point grid.

[0136] A second-class endpoint search operation is performed according to the second-class starting point set and the second-class normal endpoint description to obtain the second-class endpoint set, including the following steps: determining whether the number of target starting point grids contained in the second-class starting point set is greater than or equal to a preset number threshold; if so, performing a second-class endpoint search operation according to the second-class starting point set and the second-class normal endpoint description to obtain the second-class endpoint set; if less than, returning to the step of searching on the grid map according to the second search direction and taking the first grid that meets the second-class starting point description as the second-class initial grid.

[0137] If the number of target starting grids included in the second type of starting point set is greater than or equal to a preset number threshold, since the target starting grid (unknown grid or obstacle grid) represents an unknown area or an obstacle area, it means that the area corresponding to the second type of starting point set is more likely to be an unknown area or an obstacle area with a larger area. If the laser radar or camera of the self-moving device can only detect one side of an area through the slit position and cannot detect the other side of the area, then one side of the area is presented as an unknown area on the grid map, and the other side is presented as an obstacle area on the grid map. Under the premise that the number of target starting grids is greater than or equal to the preset number threshold, in order to further determine that the scene detected by the self-moving device belongs to the scene described above, the embodiment of the present application needs to further determine the second type of end point set.

[0138] Please combine Fig.12 Since the number of target starting grids included in the second type starting point set Q3 is 9, and the number of target starting grids 9 is greater than the preset number threshold 7, the embodiment of the present application enters the step of determining the second type end point set. Fig.14 Since the number of target starting grids included in the second type starting point set Q5 is 5, and the number of target starting grids 5 is less than the preset number threshold 7, the embodiment of the present application needs to redetermine the second type initial grid, that is: start searching for the second type initial grid from the 7th row of grid lines.

[0139] The second type of endpoint search operation is performed according to the second type of starting point set and the second type of normal endpoint description, and the second type of endpoint set is obtained, including the following steps: determining the target starting point grid in the second type of starting point set in a to-be-searched state as the reference target starting point grid according to the preset grid arrangement order, starting from the reference target starting point grid, sequentially obtaining the fourth reference grid according to the third search direction, judging whether the fourth reference grid satisfies the second type of normal endpoint description, if the fourth reference grid satisfies the second type of normal endpoint description, placing the fourth reference grid as the target endpoint grid into the second type of endpoint set, returning to the step of determining the target starting point grid in the second type of starting point set in a to-be-searched state as the reference target starting point grid according to the preset grid arrangement order, if the fourth reference grid does not satisfy the second type of normal endpoint description, judging whether the fourth reference grid satisfies the second type of abnormal endpoint description, if the fourth reference grid satisfies the second type of abnormal endpoint description, outputting the second type of endpoint set, and if the fourth reference grid does not satisfy the second type of abnormal endpoint description, returning to the step of sequentially obtaining the fourth reference grid according to the third search direction.

[0140] Please combine Fig.12In the embodiment of the present application, grid 121 is determined as the reference target starting grid, and the fourth reference grid is obtained in sequence from left to right. If the fourth reference grid satisfies the second type of normal endpoint description, it means that the target endpoint grid corresponding to grid 121 has been found.

[0141] like Fig.12 As shown, grid 1211 is used as the fourth reference grid, which satisfies the description of the second type of normal endpoint. Therefore, grid 1211 is used as the target endpoint grid corresponding to grid 121. The embodiment of the present application puts grid 1211 into the second type of endpoint set P3={1211}. By analogy, the embodiment of the present application sequentially finds grids 1212 to 1219 as target endpoint grids. Therefore, the second type of endpoint set P3={1211,1212,1213,1214,1215,1216,1217,1218,1219}, where grid 121 corresponds to grid 1211, grid 122 corresponds to grid 1212, and so on.

[0142] See also Fig.15 , the embodiment of the present application has obtained the second type of starting point set Q3={121,122,123,124,125,126,127,128,129}, and, according to the above method, grids 1211 to 1216 are also found as target end grids. When the embodiment of the present application needs to find the target end grid 1220 corresponding to the target starting point grid 127 (grid 1220 is after grid 1216), the grid value of grid 1220 is 90, so grid 1220 meets the second type of abnormal end point description, grid 1220 is an abnormal end point grid, and the embodiment of the present application outputs the existing second type of end point set P4={1211,1212,1213,1214,1215,1216}.

[0143] In B14, determining the second maximum area according to the second type of endpoint set includes the following steps: forming a grid unit from multiple grids located between the target endpoint grid and the target starting grid, and combining all grid units to obtain the second maximum area. The embodiment of the present application adopts the above-mentioned method to maximize the search for the second maximum area between the unknown grid and the obstacle grid that meets the second multi-row and multi-column conditions, so that the second maximum area with a larger area caused by the slit position can be deleted, ensuring that the target area extracted by the embodiment of the present application can allow the self-equipment device to move and pass freely, thereby improving the reliability of the operation.

[0144] The area size is represented by the number of target endpoint grids, the preset size threshold is represented by the preset endpoint threshold, and deleting the second largest area whose area size is greater than or equal to the preset size threshold includes the following steps: if the number of target endpoint grids included in the second type of endpoint set is less than the preset endpoint threshold, deleting the second largest area.

[0145] In method K, the second type of inaccessible condition includes a second single-row single-column condition. Deleting the area between the unknown grid and the obstacle grid and satisfying the second type of inaccessible condition includes the following steps: searching on the grid map according to the first search direction to obtain a target starting grid that satisfies the second type of starting point description and a target end grid that satisfies the second type of normal end point description, the target starting grid and the target end grid are on the same grid line, and the distance between the target starting grid and the target end grid is obtained. If the distance is less than or equal to a preset distance threshold, it is determined that the grid between the target starting grid and the target end grid satisfies the second single-row single-column condition, and the grid between the target starting grid and the target end grid is deleted. If the distance is greater than the preset distance threshold, the grid between the target starting grid and the target end grid is retained.

[0146] It is understandable that method K can be executed between method M and method N, that is, after executing method M, execute method K, and finally execute method N. When the size of the area formed by the grid between the target starting grid and the target end grid is less than or equal to the preset distance threshold, the self-moving device cannot enter such area or entering such area is not convenient for the self-moving device to flexibly perform tasks. Therefore, the embodiment of the present application adopts method K to delete such area. When the size of the area formed by the grid between the target starting grid and the target end grid is greater than the preset distance threshold, whether such area needs to be deleted can be further determined by the strategy of method N.

[0147] The embodiment of the present application executes step S63 to determine the current machine position of the self-moving device. It is understandable that the embodiment of the present application can execute step S63 before step S61 or step S62, or after step S61 or step S62, or even execute step S63 together with step S61 or step S62.

[0148] The embodiment of the present application executes step S64, searching the connected domain including the current machine position in the optimized map to obtain the target area. The embodiment of the present application starts searching the connected domain with the current machine position as the starting point according to a preset connected domain search algorithm, and the preset connected domain search algorithm includes an algorithm based on neighborhood search, a depth-first search algorithm, a breadth-first search algorithm, etc.

[0149] As can be seen from the above description, when the self-moving device detects and constructs a grid map, it is easily affected by the position of the gap and obtains a slit area. In the embodiment of the present application, the area between two unknown grids and meeting the first type of inaccessible conditions, and the area between the unknown grid and the obstacle grid and meeting the second type of inaccessible conditions are both regarded as the gap area, and both are deleted, so as to ensure that a reliable target area is extracted, which is conducive to the self-moving device being able to move freely in the target area and ensure that the task can be reliably executed.

[0150] In order to facilitate a detailed understanding of the method for determining the target area provided in the embodiment of the present application, the embodiment of the present application is described in detail in conjunction with the following drawings. It can be understood that the method described below is only one of the methods for implementing the method for determining the target area, and the method described below does not cause any improper limitation to the scope of protection of the present application.

[0151] See also Fig.16 , the grid map 160 provided in the embodiment of the present application includes a passable area 161, an obstacle area 162 and an unknown area 163, wherein the passable area 161 includes a plurality of passable sub-areas, and the current machine position of the self-mobile device is in the passable sub-area 164. The implementation architecture of the method for determining the target area is as follows: the first single-row single-column approach H→the first multi-row multi-column approach L→the second multi-row multi-column approach M→the second single-row single-column approach K→the third multi-row multi-column approach N→find a connected domain including the current machine position.

[0152] ① The first single-row and single-column operation H is as follows:

[0153] 1. The first search direction includes from left to right or from top to bottom. The unknown starting point grid, unknown end point grid and abnormal end point grid are defined as follows:

[0154] The first type of starting point is described as follows: if the grid value of the first grid is 255, and the grid value of the grid to the right of the first grid is 0, then the first grid is an unknown starting point grid. The first type of normal end point is described as follows: if the grid value of the first grid is 255, and the grid value of the grid to the left of the first grid is 0, then the first grid is an unknown end point grid. The first type of abnormal end point is described as follows: if the grid value of the first grid is 90, then the first grid is an abnormal end point grid.

[0155] See also Fig.17 , the embodiment of the present application is based on the first type of starting point description, the first type of normal end point description and the first type of abnormal end point description. Fig.17 Mark the unknown starting grid and unknown ending grid on the grid. For example, Fig.17 The unknown starting point grid 171 and the unknown ending point grid 172 are marked respectively.

[0156] The first type of no-entry condition includes the first single-row single-column condition. Since the grid between the unknown starting grid and the unknown ending grid meets the first single-row single-column condition, the embodiment of the present application sets the grid value of the grid between the unknown starting grid and the unknown ending grid to 255. Fig.18 , Fig.16 After the provided grid map 160 is processed by the first single-row and single-column operation H, part of the area is deleted.

[0157] ②The first multi-row and multi-column method L is as follows:

[0158] Step 1: Please refer to Fig.19 In the embodiment of the present application, according to the first type of starting point description, the first type of normal end point description and the first type of abnormal end point description, the left-to-right direction is combined. Fig.18 The unknown starting point grid 191 and the unknown ending point grid 192 are marked respectively.

[0159] Step 2: The embodiment of the present application searches for the first type of initial grid from left to right.

[0160] Step 3: Determine the first type of starting point set based on the first type of initial grid. Perform the first type of starting point search operation from the first type of initial grid in a top-down direction, and record the position and number of unknown starting point grids. If the next row does not find an unknown starting point grid, the search is terminated, so that all unknown starting point grids of the first type of starting point set are continuous from top to bottom.

[0161] Step 4. The embodiment of the present application determines whether the number of unknown starting point grids in the first type of starting point set is greater than or equal to 7. If it is greater than or equal to 7, the embodiment of the present application determines the first type of end point set. If it is less than 7, the embodiment of the present application discards the existing first type of starting point set and re-searches the first type of initial grid in the next row until the boundary of the grid map is encountered to end the search operation.

[0162] Step 5. In the process of determining the first type of endpoint set, the embodiment of the present application takes each unknown starting point grid as a reference and searches from left to right along the row grid line where the unknown starting point grid is located, so as to search for the unknown endpoint grid corresponding to the unknown starting point grid. In the process of searching for the unknown endpoint grid, if a wall is encountered (for example, the grid encountered is an obstacle grid), the embodiment of the present application ends the endpoint search operation and jumps to execute step 6. In this way, the vertical coordinates of the unknown endpoint grids can be ensured to be continuous from top to bottom, but it is not necessary for each unknown endpoint grid to be located on the same column grid line.

[0163] Step 6: Determine the number of unknown endpoint grids in the first type of endpoint set. If the number of unknown endpoint grids is greater than 7, proceed to step 7, otherwise proceed to step 4 to restart the search for the first type of endpoint set.

[0164] Step 7: Set the grid value of all grids between the unknown starting grid and the unknown ending grid to 255. Fig. 20 , Fig. 20 Shown Fig.19 The grid map 160 provided is a situation where part of the area is deleted after being processed by the first multi-row and multi-column method L.

[0165] Step 8: Repeat steps 5 and 6 until all unknown starting point grids searched in step 3 are traversed.

[0166] Step 9: After traversing all unknown starting grids searched in step 3, return to step 2 to re-determine the first type of initial grid until the row boundary of the grid map is searched.

[0167] ③The second multi-row and multi-column method M is as follows:

[0168] The target starting grid, target end grid and abnormal end grid are defined with the first search direction from left to right. The second type of starting grid is described as follows: if the grid value of the first grid is 90 and the grid value of the grid to the right of the first grid is 0, then the first grid is the target starting grid. The second type of normal end grid is described as follows: if the grid value of the first grid is 255 and the grid value of the grid to the left of the first grid is 0, then the first grid is the target end grid. The second type of abnormal end grid is described as follows: if the grid value of the first grid is 90, then the first grid is the abnormal end grid.

[0169] The second multi-row and multi-column method M is similar to the first multi-row and multi-column method L described in the above embodiment except that the starting point, the end point and the abnormal point are different, and other steps are not repeated here.

[0170] See also Fig.21 , Fig.21 After the provided grid map 160 is processed by the second multi-row and multi-column method M, part of the area is deleted.

[0171] ④ The second single-row and single-column operation K is as follows:

[0172] The target starting grid, target end grid and abnormal end grid are defined with the first search direction from left to right. The second type of starting grid is described as follows: if the grid value of the first grid is 255 and the grid value of the grid to the right of the first grid is 0, then the first grid is the target starting grid. The second type of normal end grid is described as follows: if the grid value of the first grid is 90 and the grid value of the grid to the left of the first grid is 0, then the first grid is the target end grid. The second type of abnormal end grid is described as follows: if the grid value of the first grid is 255, then the first grid is the abnormal end grid.

[0173] See also Fig. 22 In the embodiment of the present application, according to the above second type of starting point description, second type of normal end point description and second type of abnormal end point description, the left-to-right direction is combined. Fig.21 The target starting grid 221 and the target ending grid 222 are marked respectively.

[0174] In the embodiment of the present application, the distance between the target starting grid and the target ending grid is obtained. If the distance is less than or equal to a preset distance threshold, the grid value of the grid between the target starting grid and the target ending grid is set to 255.

[0175] See also Fig.23 , Fig. 22 After the provided grid map 160 is processed by the second single-row and single-column method K, part of the area is deleted.

[0176] ⑤The third multi-row and multi-column method N is as follows:

[0177] The target starting grid, target end grid and abnormal end grid are defined with the first search direction from left to right. The second type of starting grid is described as follows: if the grid value of the first grid is 255 and the grid value of the grid to the right of the first grid is 0, then the first grid is the target starting grid. The second type of normal end grid is described as follows: if the grid value of the first grid is 90 and the grid value of the grid to the left of the first grid is 0, then the first grid is the target end grid. The second type of abnormal end grid is described as follows: if the grid value of the first grid is 255, then the first grid is the abnormal end grid.

[0178] The third multi-row and multi-column method N is similar to the first multi-row and multi-column method L described in the above embodiment except that the starting point, the end point and the abnormal point are different, and other steps are not repeated here.

[0179] ⑥ Find the connected domain containing the current machine location as follows:

[0180] See also Fig.24The embodiment of the present application searches for a connected domain including the current machine position on the grid map (ie, optimized map) obtained after the above processing to obtain a target area, that is, the target area is the traversable sub-area 164 mentioned above.

[0181] See also Fig.25 In order to facilitate users to easily distinguish the target area and non-target area on the grid map through vision, the embodiment of the present application sets the grid value of the non-target area in the grid map to 0 and the grid value of the target area to 255, and obtains an updated grid map. The updated grid map is sent from the mobile device to the mobile terminal for presentation.

[0182] It can be seen from the above figures that, relative to the current machine position of the self-moving device, the embodiment of the present application can delete the slit area caused by the slit position, so as to extract a reliable target area to facilitate the self-moving device to move freely in the target area to perform tasks.

[0183] It should be noted that in each of the above embodiments, there is not necessarily a certain order between the above steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0184] As another aspect of the embodiment of the present application, the embodiment of the present application provides a device for determining a target area, which is applied to a self-moving device. The device for determining a target area can be a software module, which includes a plurality of instructions stored in a memory, and a processor can access the memory and call the instructions for execution to complete the method for determining a target area described in the above embodiments.

[0185] In some embodiments, the target area determination device can also be constructed by hardware devices, for example, the target area determination device can be constructed by one or more chips, and each chip can work in coordination with each other to complete the target area determination method described in the above embodiments. For another example, the target area determination device can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components.

[0186] See also Fig.26The target area determination device 260 includes a map acquisition module 261, a map optimization module 262, a location acquisition module 263 and an area search module 264.

[0187] The map acquisition module 261 is used to obtain a grid map, which includes a passable area, an obstacle area and an unknown area. The obstacle area includes multiple obstacle grids, and the unknown area includes multiple unknown grids. The map optimization module 262 is used to perform a regional optimization operation on the grid map to obtain an optimized map, wherein the regional optimization operation includes: deleting an area located between two unknown grids and satisfying the first type of inaccessible condition, and deleting an area located between an unknown grid and an obstacle grid and satisfying the second type of inaccessible condition. The position acquisition module 263 is used to determine the current machine position of the self-moving device. The area search module 264 is used to search the connected domain containing the current machine position in the optimized map to obtain the target area. When the self-moving device detects and constructs a grid map, it is easily affected by the position of the gap and obtains a slit area. The embodiment of the present application regards the area between two unknown grids and satisfying the first type of inaccessible condition, and the area between the unknown grid and the obstacle grid and satisfying the second type of inaccessible condition as the gap area, and deletes both of them, thereby ensuring that a reliable target area is extracted, which is conducive to the self-moving device being able to move freely in the target area and ensuring that the task can be reliably executed.

[0188] In some embodiments, the first type of non-entry condition includes a first single-row and single-column condition, and the map optimization module 262 is specifically used to: delete the grids located between two unknown grids and on the same grid line, wherein the grids located between two unknown grids and on the same grid line satisfy the first single-row and single-column condition.

[0189] In some embodiments, the unknown grid includes an unknown starting grid and an unknown ending grid, and the map optimization module 262 is further specifically used to: search on the grid map according to the first search direction to obtain an unknown starting grid that meets the first type of starting point description and an unknown ending grid that meets the first type of normal ending description, the unknown starting grid and the unknown ending grid are on the same grid line, the grid between the unknown starting grid and the unknown ending grid meets the first single-row and single-column condition, and the grid between the unknown starting grid and the unknown ending grid is deleted.

[0190] In some embodiments, the first type of inaccessible condition includes a first multi-row and multi-column condition, and the map optimization module 262 is further specifically used to: determine a first maximum area between two unknown grids, the first maximum area being the largest area between the two unknown grids that does not contain an obstacle grid, and delete the first maximum area whose area size is greater than or equal to a preset size threshold, wherein the first maximum area whose area size is greater than or equal to the preset size threshold satisfies the first multi-row and multi-column condition.

[0191] In some embodiments, the unknown grid includes an unknown starting grid and an unknown ending grid. The map optimization module 262 is further specifically used to: search on the grid map according to the second search direction, use the first grid that meets the first type of starting point description as the first type of initial grid, perform the first type of starting point search operation according to the third search direction starting from the first type of initial grid, and obtain a first type of starting point set. The first type of starting point set includes multiple unknown starting point grids that are located on the same grid line and arranged continuously. The first type of initial grid is an unknown starting point grid among the multiple unknown starting point grids. The third search direction is perpendicular to the second search direction. According to the first type of starting point set and the first type of normal ending description, perform the first type of ending point search operation to obtain a first type of ending point set. The first type of ending point set includes at least one unknown ending point grid. An unknown ending point grid and an unknown starting point grid are located on the same grid line matching the second search direction. The first maximum area is determined according to the first type of ending point set.

[0192] In some embodiments, the map optimization module 262 is also specifically used to: determine whether the number of unknown starting point grids contained in the first type of starting point set is greater than or equal to a preset number threshold; if it is greater than or equal to, perform an unknown terminal search operation according to the first type of starting point set and the first type of normal terminal description to obtain the first type of terminal set; if it is less than, search on the grid map according to the second search direction, and use the first grid that meets the first type of starting point description as the first type of initial grid.

[0193] In some embodiments, the map optimization module 262 is further specifically used to: determine an unknown starting point grid in a to-be-searched state in the first type of starting point set as a reference unknown starting point grid according to a preset grid arrangement order, start from the reference unknown starting point grid, sequentially obtain the second reference grid according to the third search direction, determine whether the second reference grid satisfies the first type of normal terminal description, if the second reference grid satisfies the first type of normal terminal description, then place the second reference grid as the unknown terminal grid into the first type of terminal set, determine an unknown starting point grid in a to-be-searched state in the first type of starting point set as a reference unknown starting point grid according to the preset grid arrangement order, if the second reference grid does not satisfy the first type of normal terminal description, then determine whether the second reference grid satisfies the first type of abnormal terminal description, if the second reference grid satisfies the first type of abnormal terminal description, then output the first type of terminal set, if the second reference grid does not satisfy the first type of abnormal terminal description, then sequentially obtain the second reference grid according to the third search direction.

[0194] In some embodiments, the unknown grid includes an unknown starting grid and an unknown ending grid, the obstacle grid includes an obstacle starting grid and an obstacle ending grid, the second type of inaccessible condition includes a second multi-row and multi-column condition, and the map optimization module 262 is further specifically used to: delete the area between the obstacle starting grid and the unknown ending grid and satisfying the second multi-row and multi-column conditions, and / or delete the area between the unknown starting grid and the obstacle ending grid and satisfying the second multi-row and multi-column conditions.

[0195] In some embodiments, if the obstacle starting grid is the target starting grid, the unknown end grid is the target end grid, and if the unknown starting grid is the target starting grid, the obstacle end grid is the target end grid. The map optimization module 262 is also specifically used to: determine the second largest area between the target starting grid and the target end grid, the second largest area is the largest area between the target starting grid and the target end grid that does not contain a grid with the same grid value as the target starting grid, and delete the second largest area whose area size is greater than or equal to the preset size threshold, wherein the second largest area whose area size is greater than or equal to the preset size threshold satisfies the second multi-row multi-column condition.

[0196] In some embodiments, the map optimization module 262 is further specifically used to: search on the grid map according to the second search direction, use the first grid that meets the second-class starting point description as the second-class initial grid, perform the second-class starting point search operation according to the third search direction starting from the second-class initial grid, and obtain a second-class starting point set, the second-class starting point set includes multiple target starting point grids that are located on the same grid line and arranged continuously, the second-class initial grid is a target starting point grid among the multiple target starting point grids, the third search direction is perpendicular to the second search direction, perform the second-class terminal search operation according to the second-class starting point set and the second-class normal terminal description, and obtain a second-class terminal set, the second-class terminal set includes at least one target terminal grid, a target terminal grid and a target starting point grid are located on the same grid line matching the second search direction, and determine the second maximum area according to the second-class terminal set.

[0197] In some embodiments, the unknown grid includes an unknown starting grid and an unknown ending grid, the obstacle grid includes an obstacle starting grid and an obstacle ending grid, if the obstacle starting grid is the target starting grid, then the unknown ending grid is the target ending grid, if the unknown starting grid is the target starting grid, then the obstacle ending grid is the target ending grid, and the second type of no-entry condition includes a second single-row and single-column condition.

[0198] The map optimization module 262 is also specifically used to: search on the grid map according to the first search direction, obtain a target starting grid that meets the second type of starting point description and a target terminal grid that meets the second type of normal terminal description, the target starting grid and the target terminal grid are on the same grid line, and calculate the distance between the target starting grid and the target terminal grid. If the distance is less than or equal to a preset distance threshold, it is determined that the grid between the target starting grid and the target terminal grid meets the second single-row and single-column condition, and the grid between the target starting grid and the target terminal grid is deleted.

[0199] It should be noted that the above-mentioned device for determining the target area can execute the method for determining the target area provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in the embodiment of the device for determining the target area, refer to the method for determining the target area provided in the embodiment of the present application.

[0200] See also Fig. 27 , Fig. 27 The schematic diagram of the structure of a self-moving device provided in an embodiment of the present application. The self-moving device 270 includes one or more processors 271 and a memory 272. The memory 272 is connected to the one or more processors 271, for example, connected to the processor 271 via a bus.

[0201] The processor 271 is configured to support the self-mobile device to perform the corresponding functions of the method in the above method embodiment. The processor can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0202] The memory 272 is used to store program codes, etc. The memory may include a volatile memory (VM), such as a random access memory (RAM); the memory may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory may also include a combination of the above types of memory.

[0203] The memory 272 may be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method for determining the target area in the embodiment of the present application. The processor executes the various functional applications and data processing of the method for determining the target area and the device for determining the target area by running the non-volatile software programs, instructions and modules stored in the memory, that is, the functions of the various modules or units of the method for determining the target area and the device for determining the target area provided in the above method embodiment are realized.

[0204] The memory 272 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function. The data storage area may store data created according to the use of the determination device of the target area, etc. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the determination device of the target area 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.

[0205] One or more modules are stored in the memory, and when executed by one or more processors, the method for determining the target area in any of the above method embodiments is executed, for example, the method steps described in the above method embodiments are executed to realize the functions of the modules described in the above device embodiments.

[0206] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method of the aforementioned embodiment.

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

[0208] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for determining a target area, applied to a self-moving device, characterized in that: include: Acquire a grid map, wherein the grid map includes a traversable area, an obstacle area, and an unknown area, wherein the obstacle area includes a plurality of obstacle grids, and the unknown area includes a plurality of unknown grids; Performing a regional optimization operation on the grid map to obtain an optimized map, wherein the regional optimization operation includes: deleting an area between two unknown grids and satisfying a first type of inaccessible condition, and deleting an area between the unknown grid and the obstacle grid and satisfying a second type of inaccessible condition; Determining a current machine position of the self-moving device; Searching the optimization map for a connected domain including the current machine position to obtain a target area; Wherein: the first type of inaccessible condition includes a first single-row single-column condition, and deleting the area between the two unknown grids and satisfying the first type of inaccessible condition includes: deleting grids between the two unknown grids and on the same grid line, wherein the grids between the two unknown grids and on the same grid line satisfy the first single-row single-column condition; The unknown grid includes an unknown starting grid and an unknown ending grid, the obstacle grid includes an obstacle starting grid and an obstacle ending grid, if the obstacle starting grid is a target starting grid, then the unknown ending grid is a target ending grid, if the unknown starting grid is a target starting grid, then the obstacle ending grid is a target ending grid, the second type of inaccessible condition includes a second single-row single-column condition, and deleting the area between the unknown grid and the obstacle grid and satisfying the second type of inaccessible condition includes: Searching on the grid map according to the first search direction, obtaining a target starting grid that meets the description of the second type of starting point and a target terminal grid that meets the description of the second type of normal terminal, the target starting grid and the target terminal grid are on the same grid line, calculating the distance between the target starting grid and the target terminal grid, and if the distance is less than or equal to a preset distance threshold, determining that the grid between the target starting grid and the target terminal grid meets the second single-row and single-column condition, and deleting the grid between the target starting grid and the target terminal grid; The second type of normal endpoint description includes an unknown endpoint description or an obstacle endpoint description, wherein the unknown endpoint description is: if the grid adjacent to the unknown grid in the opposite direction of the first search direction is a passable grid, then the unknown grid is the target endpoint grid, and the obstacle endpoint description is: if the grid adjacent to the obstacle grid in the opposite direction of the first search direction is a passable grid, then the obstacle grid is the target endpoint grid; the second type of starting point description includes an obstacle starting point description or an unknown starting point description, wherein the obstacle starting point description is: if the grid adjacent to the obstacle grid along the first search direction is a passable grid, and the unknown starting point description is: if the grid adjacent to the unknown grid along the first search direction is a passable grid, then the unknown grid is the target starting point grid.

2. The determination method according to claim 1, characterized in that: Deleting the grid located between the two unknown grids and on the same grid line comprises: Searching on the grid map according to the first search direction, obtaining an unknown starting grid that meets the first type of starting point description and an unknown ending grid that meets the first type of normal ending description, wherein the unknown starting grid and the unknown ending grid are on the same grid line, and the grid between the unknown starting grid and the unknown ending grid meets the first single-row and single-column condition, wherein the first type of starting point description is: if the grid adjacent to the unknown grid along the first search direction is a passable grid, then the unknown grid is the unknown starting grid, and the first type of normal ending description is: if the grid adjacent to the unknown grid against the first search direction is a passable grid, then the unknown grid is the unknown ending grid; Delete the grids between the unknown starting grid and the unknown ending grid.

3. The determination method according to claim 1, characterized in that: The first type of inaccessible condition includes a first multi-row and multi-column condition, and deleting the area between the two unknown grids and satisfying the first type of inaccessible condition includes: Determine a first maximum area between the two unknown grids, where the first maximum area is a maximum area between the two unknown grids that does not contain an obstacle grid; The first largest area whose area size is greater than or equal to the preset size threshold is deleted, wherein the first largest area whose area size is greater than or equal to the preset size threshold satisfies the first multiple-row and multiple-column condition.

4. The determination method according to claim 3, characterized in that: The determining of the first maximum area between the two unknown grids comprises: Searching on the grid map according to the second search direction, taking the first grid that meets the description of the first type of starting point as the first type of initial grid, wherein the description of the first type of starting point is: if the grids adjacent to the unknown grid along the first search direction are passable grids, then the unknown grid is the unknown starting grid; Performing a first-type starting point search operation from the first-type initial grid along a third search direction to obtain a first-type starting point set, wherein the first-type starting point set includes a plurality of unknown starting point grids that are located on the same grid line and are continuously arranged, the first-type initial grid is one of the plurality of unknown starting point grids, and the third search direction is perpendicular to the second search direction; A first-type endpoint search operation is performed according to the first-type starting point set and the first-type normal endpoint description to obtain a first-type endpoint set, wherein the first-type endpoint set includes at least one unknown endpoint grid, wherein an unknown endpoint grid and an unknown starting point grid are located on the same grid line matching the second search direction, and the first-type normal endpoint description is: if a grid adjacent to the unknown grid in the opposite direction to the first search direction is a passable grid, then the unknown grid is an unknown endpoint grid; A first maximum area is determined according to the first-type endpoint set.

5. The determination method according to claim 4, characterized in that: The first-type endpoint search operation is performed according to the first-type starting point set and the first-type normal endpoint description, and the first-type endpoint set is obtained, including: Determine whether the number of unknown starting point grids included in the first type of starting point set is greater than or equal to a preset number threshold; If it is greater than or equal to, then performing an unknown endpoint search operation according to the first type of starting point set and the first type of normal endpoint description to obtain a first type of endpoint set; If it is less than, the step of returning to searching on the grid map according to the second search direction and taking the first grid that meets the description of the first type of starting point as the first type of initial grid.

6. The determination method according to claim 5, characterized in that: According to the first type of starting point set and the first type of normal end point description, an unknown end point search operation is performed to obtain a first type of end point set including: Determine, according to a preset grid arrangement order, an unknown starting point grid in a to-be-searched state in the first type of starting point set as a reference unknown starting point grid; Starting from the unknown reference starting point grid, sequentially acquiring second reference grids according to a third search direction; Determining whether the second reference grid satisfies the first type of normal endpoint description; If the second reference grid satisfies the first type normal endpoint description, the second reference grid is placed in the first type endpoint set as an unknown endpoint grid, and the step of returning to determine an unknown starting point grid in the first type starting point set in a to-be-searched state as a reference unknown starting point grid according to a preset grid arrangement order; If the second reference grid does not satisfy the first type of normal endpoint description, it is determined whether the second reference grid satisfies the first type of abnormal endpoint description, wherein the first type of abnormal endpoint description is: starting from the unknown starting grid and searching along the grid line matching the first search direction, when an obstacle grid is encountered before the unknown endpoint grid is determined, the obstacle grid is the abnormal endpoint grid; If the second reference grid satisfies the description of the first type of abnormal endpoint, outputting the first type of endpoint set; If the second reference grid does not satisfy the first type of abnormal endpoint description, the process returns to the step of sequentially acquiring the second reference grid according to the third search direction.

7. The determination method according to claim 1, characterized in that: The unknown grid includes an unknown starting grid and an unknown ending grid, the obstacle grid includes an obstacle starting grid and an obstacle ending grid, if the obstacle starting grid is a target starting grid, then the unknown ending grid is a target ending grid, if the unknown starting grid is a target starting grid, then the obstacle ending grid is a target ending grid, the second type of no-entry condition includes a second multi-row and multi-column condition, the second multi-row and multi-column condition includes a second maximum area whose area size is greater than or equal to a preset size threshold, the second maximum area is a maximum area between the target starting grid and the target ending grid that does not contain a grid with the same grid value as the target starting grid; Deleting the area between the unknown grid and the obstacle grid and satisfying the second type of inaccessible condition includes: Deleting the area between the obstacle starting grid and the unknown ending grid and satisfying the second multi-row and multi-column condition; and / or, The area between the unknown starting point grid and the obstacle end point grid and satisfying the second multi-row and multi-column conditions is deleted.

8. The determination method according to claim 7, characterized in that: Deleting the area between the target start grid and the target end grid that meets the second multi-row and multi-column conditions includes: Determine a second maximum area between the target starting grid and the target ending grid, the second maximum area being a maximum area between the target starting grid and the target ending grid that does not contain a grid with the same grid value as the target starting grid; The second largest area whose area size is greater than or equal to the preset size threshold is deleted, wherein the second largest area whose area size is greater than or equal to the preset size threshold satisfies the second multi-row and multi-column condition.

9. The determination method according to claim 8, characterized in that: The determining of the second largest area between the target starting grid and the target ending grid comprises: Searching on the grid map according to a second search direction, taking the first grid that meets the description of the second type of starting point as the second type of initial grid; Performing a second type of starting point search operation from the second type of initial grid along a third search direction to obtain a second type of starting point set, wherein the second type of starting point set includes a plurality of target starting point grids that are located on the same grid line and are continuously arranged, the second type of initial grid is one of the plurality of target starting point grids, and the third search direction is perpendicular to the second search direction; Perform a second-type endpoint search operation according to the second-type starting point set and the second-type normal endpoint description to obtain a second-type endpoint set, wherein the second-type endpoint set includes at least one target endpoint grid, and a target endpoint grid and a target starting point grid are located on the same grid line matching the second search direction; A second maximum area is determined according to the second-type endpoint set.

10. A self-propelled device, characterized in that: It includes a memory and a processor, the memory is connected to the processor, the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the self-mobile device implements the method for determining the target area as described in any one of claims 1-9.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method for determining a target area according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Map construction method and device, terminal equipment and storage medium

    CN114219905A

  • Robot navigation method, nonvolatile readable storage medium and robot

    CN116878506A