Map presentation method, storage medium and mobile terminal
By setting and optimizing the maximum bounding rectangle border of the map built for the cleaning robot, the problem of non-square floor plans in existing technologies has been solved, resulting in a clear and aesthetically pleasing map display that is easy for users to read.
Patent Information
- Application Number
- CN202310091761.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-14
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-01-14
AI Technical Summary
The maps generated by existing cleaning robots are not square enough due to the recognition of walls, which fails to vividly display the actual floor plan and affects the user's reading efficiency.
Set a maximum outer rectangle border for each cleanable partition, and optimize these borders by removing overlapping or unnecessary lines, adjusting the borders to align with the global border, and simplifying boundary lines to ensure a clear display of each partition.
By optimizing the maximum bounding rectangle border, the squareness and aesthetics of the map are improved, enabling users to read floor plans more quickly and accurately.
Smart Images

Figure CN116883642B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of map presentation technology, and more specifically to a map presentation method, storage medium, and mobile terminal. Background Technology
[0002] Existing cleaning robots can autonomously locate, navigate, and build maps using cameras and / or radar. Once the map is built, the robot can send it back to the user's mobile phone for viewing. However, since cleaning robots primarily build maps by recognizing walls, obstacles such as internal pillars can affect the map's visual representation. Figure 1 As shown, the existing map's boundary lines are curved and not square enough, and the existing map cannot vividly display the actual house layout, which is not conducive to users reading the map quickly. Summary of the Invention
[0003] One objective of this invention is to provide a map presentation method, storage medium, and mobile terminal, which aims to improve the problem that existing maps cannot vividly display the actual floor plan.
[0004] In a first aspect, embodiments of the present invention provide a map presentation method, comprising:
[0005] Obtain a cleaning map, which includes at least one cleanable zone;
[0006] Set a maximum outer rectangular border for each of the cleanable zones;
[0007] Optimize the bounding box of each of the aforementioned maximum bounding rectangles;
[0008] The optimized cleaning map is presented, wherein each cleanable section of the cleaning map is bounded by a corresponding optimized maximum bounding rectangle.
[0009] Optionally, optimizing each of the maximum bounding rectangle borders includes:
[0010] The two largest bounding rectangles that overlap are identified as the first bounding rectangle and the second bounding rectangle.
[0011] Delete the line segments of the first outer rectangle that appear within the second outer rectangle.
[0012] Optionally, the area of the first circumscribed rectangle is greater than the area of the second circumscribed rectangle.
[0013] Optionally, the cleaning map includes reachable areas, and optimizing each of the maximum bounding rectangle borders includes:
[0014] Extract the target line segments whose maximum bounding rectangle border appears within the reachable region;
[0015] Delete the target line segment.
[0016] Optionally, optimizing each of the maximum bounding rectangle borders includes:
[0017] Determine the maximum outer global bounding box used to define the clean map;
[0018] If the first line segment is parallel to the second line segment, the maximum bounding rectangle border is optimized based on the first relative distance between the first line segment and the second line segment, wherein the first line segment is any boundary line segment in the maximum bounding rectangle border, and the second line segment is any boundary line segment in the maximum bounding global border.
[0019] Optionally, optimizing the maximum bounding rectangle based on the first relative distance between the first line segment and the second line segment includes:
[0020] If the first relative distance is less than or equal to the first threshold, then control the first line segment to translate to the position of the second line segment, so that the first line segment coincides with the second line segment;
[0021] The two boundary line segments connected to the first line segment in the maximum outer rectangle are controlled to extend according to the translation direction and translation distance of the first line segment.
[0022] Optionally, optimizing each of the maximum bounding rectangle borders includes:
[0023] One of the plurality of maximum bounding rectangles is selected as the first maximum bounding rectangle, and one of the remaining maximum bounding rectangles is selected in sequence as the second maximum bounding rectangle. The remaining maximum bounding rectangle is the maximum bounding rectangle after removing the first maximum bounding rectangle from the plurality of maximum bounding rectangles.
[0024] Determine whether the third line segment is parallel to the fourth line segment, wherein the third line segment is any boundary line segment in the first maximum bounding rectangle, and the fourth line segment is any boundary line segment in the second maximum bounding rectangle;
[0025] If the third line segment is parallel to the fourth line segment, then calculate the second relative distance between the third line segment and the fourth line segment, and determine the common boundary line segment of the first maximum outer rectangle and the second maximum outer rectangle based on the second relative distance.
[0026] Optionally, determining the common boundary segment of the first maximum circumscribed rectangle and the second maximum circumscribed rectangle based on the second relative distance includes:
[0027] Determine whether the second relative distance is less than or equal to the second threshold;
[0028] If it is less than or equal to, then the fifth line segment is determined, and the fifth line segment is used as the common boundary line segment of the first maximum bounding rectangle and the second maximum bounding rectangle. The third line segment and the fourth line segment are deleted, wherein the fifth line segment is located in the middle between the third line segment and the fourth line segment.
[0029] In a second aspect, embodiments of the present invention provide a storage medium storing computer-executable instructions, which are used to cause a mobile terminal to execute the above-described map rendering method.
[0030] In a third aspect, embodiments of the present invention provide a mobile terminal, comprising:
[0031] At least one processor; and,
[0032] A memory communicatively connected to the at least one processor; wherein,
[0033] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the map rendering method described above.
[0034] In the map presentation method provided in this embodiment of the invention, a clean map is obtained, which includes at least one cleanable zone. A maximum bounding rectangle border is set for each cleanable zone, and the maximum bounding rectangle border is optimized to present an optimized clean map. Each cleanable zone of the clean map is defined by the corresponding optimized maximum bounding rectangle border. This embodiment, by setting a maximum bounding rectangle border for each cleanable zone and optimizing the maximum bounding rectangle border, helps to square each cleanable zone, which is beneficial for vividly displaying the actual floor plan, thereby enabling users to quickly read the map. Attached Figure Description
[0035] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0036] Figure 1 A schematic diagram of a map provided for related technologies;
[0037] Figure 2 This is a flowchart illustrating a map presentation method provided in an embodiment of the present invention.
[0038] Figure 3a This is a schematic diagram showing the intersection of the first outer rectangular border and the second outer rectangular border, provided in an embodiment of the present invention.
[0039] Figure 3b To delete Figure 3a A schematic diagram following the intersecting line segments shown;
[0040] Figure 4a A schematic diagram of the line segments in the reachable region where the maximum bounding rectangle border appears, as provided in an embodiment of the present invention;
[0041] Figure 4b To delete Figure 4a A schematic diagram following the target line segment shown;
[0042] Figure 5 A cleaning map provided in this embodiment of the invention Figure 3b and Figure 4b The diagram shows the result after the procedure is completed;
[0043] Figure 6 This is a schematic diagram illustrating the alignment of the maximum outer rectangle border with the maximum outer global border, as provided in an embodiment of the present invention.
[0044] Figure 7 This is a schematic diagram of a clean map according to an embodiment of the present invention, wherein the boundary line segment of the first maximum circumscribed rectangle is similar to the boundary line segment of the second maximum circumscribed rectangle;
[0045] Figure 8 In order to be in Figure 7 A schematic diagram showing the common boundary line segment of the first and second largest bounding rectangles;
[0046] Figure 9 This is a schematic diagram of the structure of a map presentation device provided in an embodiment of the present invention;
[0047] Figure 10 This is a schematic diagram of the circuit structure of a mobile terminal provided in an embodiment of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0049] It should be noted that, unless otherwise specified, the various features in the embodiments of this invention can be combined with each other, all of which are within the protection scope of this invention. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this invention do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0050] This invention provides a map presentation method. Please refer to [link / reference]. Figure 2 The map presentation method includes the following steps:
[0051] S21: Obtain a cleaning map, which includes at least one cleanable zone.
[0052] In this step, the cleaning map can be a raster map or other graphical map. This embodiment can generate a cleaning map based on sensor data and divide the cleaning map into at least one cleanable zone according to a preset partitioning algorithm. The sensor data can be collected by the cleaning robot through LiDAR and / or cameras and / or various motion sensors.
[0053] S22: Set the maximum outer rectangle border for each cleanable zone.
[0054] In this step, the maximum outer rectangle border is the border used to define the cleanable partition, wherein the maximum outer rectangle border is sufficient to enclose at least the cleanable partition. In some embodiments, setting the maximum outer rectangle border for each cleanable partition includes: determining the boundary line of the cleanable partition, and generating the maximum outer rectangle border based on the boundary line of the cleanable partition.
[0055] In some embodiments, generating the maximum bounding rectangle based on the boundary line of the cleanable partition includes: expanding the boundary line of the cleanable partition into the maximum bounding rectangle based on an expansion-shrinkage algorithm.
[0056] In some embodiments, generating the maximum bounding rectangle based on the boundary line of the cleanable partition includes: determining the maximum row, minimum row, maximum column, and minimum column of the boundary line of the cleanable partition in the coordinate system, and generating the maximum bounding rectangle based on the maximum row, minimum row, maximum column, and minimum column of the boundary line of the cleanable partition.
[0057] S23: Optimize the border of each maximum bounding rectangle.
[0058] In this step, optimization refers to modifying the line segments in the border of the largest outer rectangle that are not visually appealing.
[0059] S24: Presents the optimized cleaning map, where each cleanable zone is bounded by the corresponding optimized maximum bounding rectangle.
[0060] This embodiment sets a maximum bounding rectangle border for each cleanable zone and optimizes the maximum bounding rectangle border, which helps to square each cleanable zone and vividly display the actual floor plan, thus making it easier for users to quickly read the map.
[0061] Since each cleanable zone is configured with a corresponding maximum bounding rectangle, this can easily lead to overlapping or intersecting maximum bounding rectangles, resulting in an unattractive cleaning map with messy lines. Therefore, in some embodiments, optimizing each maximum bounding rectangle includes the following steps:
[0062] S231: Determine the two largest outer rectangle borders that overlap as the first outer rectangle border and the second outer rectangle border.
[0063] S232: Delete the line segment whose first outer rectangle border appears within the second outer rectangle border.
[0064] In S231, determining the two largest bounding rectangle borders that overlap as the first bounding rectangle border and the second bounding rectangle border includes: selecting any two largest bounding rectangle borders and determining whether they intersect. If they intersect, then the two largest bounding rectangle borders are determined as the first bounding rectangle border and the second bounding rectangle border. If they do not intersect, then another pair of largest bounding rectangle borders are selected and determined whether they intersect.
[0065] In S232, deleting the line segment of the first outer rectangle border that appears within the second outer rectangle border includes: determining the intersecting line segment of the first outer rectangle border and the second outer rectangle border, and deleting the intersecting line segment.
[0066] Please see Figure 3a The first outer rectangle 3a1 intersects the second outer rectangle 3a2, and the intersecting line segment is L. p1p2 That is, the intersecting line segment L of the first circumscribed rectangle 3a1 p1p2 It appears within the border of the second outer rectangle 3a2.
[0067] Please see Figure 3b This embodiment can delete intersecting line segments of type L. p1p2 This avoids the maximum outer rectangle borders of different cleaning zones intersecting to form additional invalid lines, thus preventing unsightly issues.
[0068] In some embodiments, the area of the first outer rectangular border is greater than the area of the second outer rectangular border. Typically, the largest outer rectangular border corresponding to the larger cleanable partition will wrap around the largest outer rectangular border corresponding to the smaller cleanable partition. In order to avoid deleting the largest outer rectangular border corresponding to the smaller cleanable partition, this embodiment can prioritize deleting the intersecting line segments of the largest outer rectangular border with the largest area. This way, the largest outer rectangular border corresponding to the smaller cleanable partition can be preserved, thereby reliably ensuring the squareness of the floor plan.
[0069] As mentioned earlier, the maximum bounding rectangle of each cleanable zone not only intersects or overlaps, but also its boundary segments extend into the reachable area of the cleaning map. This can easily mislead users into thinking that the boundary segments extending into the reachable area are obstacles, and it also looks unsightly. Therefore, in some embodiments, the cleaning map includes reachable areas and inaccessible areas. Reachable areas are areas that the cleaning robot can reach, and inaccessible areas are areas that the cleaning robot cannot reach. Optimizing each maximum bounding rectangle includes the following steps:
[0070] S233: Extract the target line segment whose maximum bounding rectangle border appears within the reachable area.
[0071] S234: Delete the target line segment.
[0072] In S233, extracting the target line segment whose maximum bounding rectangle border appears within the reachable area includes the following steps: configuring a first binary map for the clean map and configuring a single-value map for the maximum bounding rectangle border. The first value of the first binary map is used to represent the reachable area, and the second value is used to represent the unreachable area. The value of the single-value map is the first value. The first binary map and the single-value map are ANDed to obtain a second binary map. Based on the second binary map, the line segment formed by the pixel points whose value is the first value is selected as the target line segment.
[0073] For example, the first value is 1, and the second value is 0. The first binary image is represented by both 0 and 1, while the single-value image is represented by 1. When the first binary image and the single-value image are ANDed, the pixels of the target line segment whose maximum bounding rectangle border appears within the reachable area will remain 1, while the pixels of other line segments whose maximum bounding rectangle border does not appear within the reachable area will become 0. Therefore, in this embodiment, the line segment formed by the pixels with a value of 1 in the second binary image is selected as the target line segment.
[0074] In S234, deleting the target line segment includes setting the pixel values of the target line segment to 0. In some embodiments, setting the pixel values of the target line segment to 0 includes performing an XOR operation between the second binary image and the single-value image to obtain a third binary image, in which the pixel values of the target line segment are set to 0.
[0075] Please see Figure 4a The maximum bounding rectangle 4a1 appears on line segment 4a3 within the reachable region 4a2, and line segment 4a3 is the target line segment.
[0076] Please see Figure 4b By adopting the methods described in the above embodiments, this embodiment can effectively delete line segment 4a3, avoid some line segments of the maximum outer rectangle border 4a1 from occupying the reachable area, and avoid making the map less aesthetically pleasing.
[0077] It is understood that in this embodiment, steps S231 and S232 can be executed first, followed by steps S233 and S234, or steps S233 and S234 can be executed first, followed by steps S231 and S232. There is no distinction between the order of optimization of the maximum circumscribed rectangle. Those skilled in the art can optimize according to the corresponding optimization order based on the content of this disclosure, which will not be elaborated here.
[0078] After steps S231, S232, S233, and S234 in this embodiment, the following can be obtained: Figure 5 The map presented has good visual effects, a square layout, and is in line with users' reading habits.
[0079] As mentioned earlier, the relevant technology mainly constructs maps by identifying walls. Since indoor furniture or pillars are objects with a certain thickness, the boundaries of the constructed map may not align with the boundaries of the entire map. To make the map more square and conform to common-sense apartment layouts, in some embodiments, optimizing the bounding rectangle of each maximum enclosing rectangle includes the following steps:
[0080] S235: Determine the maximum outer global border used to define the clean map.
[0081] S236: If the first line segment is parallel to the second line segment, then optimize the maximum bounding rectangle based on the first relative distance between the first and second line segments.
[0082] S237: If the first line segment is not parallel to the second line segment, then there is no need to translate the first line segment.
[0083] In S235, the maximum outer global bounding box is the bounding box used to define the cleaning map, wherein the maximum outer global bounding box at least surrounds the cleaning map. In some embodiments, determining the maximum outer global bounding box used to define the cleaning map includes: determining the boundary lines of the cleaning map, and generating the maximum outer global bounding box based on the boundary lines of the cleaning map.
[0084] In some embodiments, generating the maximum outer global bounding based on the boundary lines of the clean map includes: expanding the boundary lines of the clean map into the maximum outer global bounding based on an expansion-contraction algorithm.
[0085] In some embodiments, generating the maximum outer global bounding box based on the boundary lines of the cleaning map includes: determining the maximum row, minimum row, maximum column, and minimum column of the boundary lines of the cleaning map in the coordinate system, and generating the maximum outer global bounding box based on the maximum row, minimum row, maximum column, and minimum column of the boundary lines of the cleaning map.
[0086] Please see Figure 6 In this embodiment, a maximum outer global border 602 is configured for the cleaning map 601, which can surround the cleaning map 601.
[0087] In S236, determining whether the first line segment is parallel to the second line segment includes: determining the first unit normal vector of the first line segment and the second unit normal vector of the second line segment; multiplying the first unit normal vector by the second unit normal vector to obtain the absolute value of the multiplication result; determining whether the absolute value is 1; if it is 1, then the first line segment is parallel to the second line segment; if it is not 1, then the first line segment is not parallel to the second line segment.
[0088] The first relative distance is the distance from the first line segment to the second line segment, where the first line segment is any boundary line segment within the maximum bounding rectangle, and the second line segment is any boundary line segment within the maximum bounding global bounding. For example, the maximum bounding global bounding ABCD includes boundary line segment L. AB Boundary segment L BC Boundary segment L CD and boundary segment L DA The maximum bounding rectangle of the cleanable partition, EFGH, includes the boundary segment L. EF Boundary segment L FG Boundary segment L GH and boundary segment L HE .
[0089] In this embodiment, boundary line segment L is selected. DA For the second line segment, select boundary line segment L. EF This is the first line segment. Because of the boundary line segment L... EF Not parallel to boundary line segment L DA In this embodiment, the boundary segment L is selected.FG As the first line segment, continue to determine the boundary line segment L. FG Is it parallel to the boundary line segment L? DA Although the boundary segment L FG Parallel to boundary line segment L DA However, the boundary segment L FG With boundary segment L DA Since the spacing is relatively large, this embodiment continues to select boundary line segment L. GH As the first line segment, continue to determine the boundary line segment L. GH Is it parallel to the boundary line segment L? DA Due to boundary segment L GH Not parallel to boundary line segment L DA In this embodiment, the boundary segment L is selected. HE As the first line segment, continue to determine the boundary line segment L. HE Is it parallel to the boundary line segment L? DA And so on. Subsequently, in this embodiment, the boundary segment L is selected again. AB This is the second line segment; continue the judgment using the method described above.
[0090] In some embodiments, optimizing the maximum circumscribed rectangle border based on the first relative distance between the first line segment and the second line segment includes: if the first relative distance is less than or equal to a first threshold, controlling the first line segment to translate to the position of the second line segment so that the first line segment and the second line segment coincide; controlling the two boundary line segments in the maximum circumscribed rectangle border that are respectively connected to the first line segment to extend according to the translation direction and translation distance of the first line segment; if the first relative distance is greater than the first threshold, it remains unchanged. In this way, this embodiment can ensure that the maximum circumscribed rectangle border that is close to the maximum circumscribed global border can be aligned with the maximum circumscribed global border without any breakage, thereby improving the squareness of the apartment layout.
[0091] Please combine Figure 6 For the maximum circumscribed rectangle of the first cleanable zone 603, the first line segment mn is parallel to the second line segment ij and their relative distance is small. Therefore, the first line segment mn is shifted to the left so that the shifted first line segment mn coincides with the second line segment ij. Simultaneously, boundary line segments pq and rt are both connected to the first line segment mn and belong to the same maximum circumscribed rectangle. Boundary line segments pq and rt extend according to the translation direction and distance of the first line segment mn, thus ensuring that the maximum circumscribed rectangle does not break after the first line segment mn is shifted, and also improving the squareness of the floor plan.
[0092] When a cleaning map includes many cleanable zones, the large number of boundary segments of the maximum bounding rectangles can easily cause clutter, especially when the boundary segments of two adjacent maximum bounding rectangles are close together, making it difficult for users to read the map.
[0093] In some embodiments, optimizing each maximum bounding rectangle includes the following steps: selecting one maximum bounding rectangle from a plurality of maximum bounding rectangles as the first maximum bounding rectangle, and sequentially selecting one maximum bounding rectangle from the remaining maximum bounding rectangles as the second maximum bounding rectangle, wherein the remaining maximum bounding rectangles are the maximum bounding rectangles after removing the first maximum bounding rectangle from the plurality of maximum bounding rectangles; determining whether a third line segment is parallel to a fourth line segment, wherein the third line segment is any boundary line segment in the first maximum bounding rectangle, and the fourth line segment is any boundary line segment in the second maximum bounding rectangle; if the third line segment is parallel to the fourth line segment, then calculating the second relative distance between the third line segment and the fourth line segment, and determining the common boundary line segment of the first maximum bounding rectangle and the second maximum bounding rectangle based on the second relative distance; if the third line segment is not parallel to the fourth line segment, then remaining unchanged. This simplifies the number of line segments in the maximum bounding rectangle and improves the simplicity of map representation.
[0094] For example, the cleaning map includes cleanable zones F1, F2, F3, and F4. Each cleanable zone has a corresponding maximum bounding rectangle border. The maximum bounding rectangle borders of cleanable zones F1, F2, F3, and F4 are K1 to K4, respectively. In this embodiment, maximum bounding rectangle border K1 is selected as the first maximum bounding rectangle border, and maximum bounding rectangle border K2 is selected as the second maximum bounding rectangle border. In this embodiment, one boundary segment of maximum bounding rectangle border K1 is arbitrarily selected as the third segment, and one boundary segment of maximum bounding rectangle border K2 is selected as the fourth segment. The common boundary segment of maximum bounding rectangle borders K1 and K2 is determined according to the above method. Then, in this embodiment, either maximum bounding rectangle border K3 or maximum bounding rectangle border K4 is selected as the second maximum bounding rectangle border, and the comparison is performed according to the above method, and so on.
[0095] In some embodiments, determining the common boundary segment of the first maximum circumscribed rectangle and the second maximum circumscribed rectangle based on the second relative distance includes: determining whether the second relative distance is less than or equal to a second threshold; if it is less than or equal to a second threshold, determining the fifth segment, using the fifth segment as the common boundary segment of the first maximum circumscribed rectangle and the second maximum circumscribed rectangle, and deleting the third and fourth segments, wherein the fifth segment is located in the middle between the third and fourth segments; if it is greater than the threshold, it remains unchanged.
[0096] In some embodiments, determining the fifth line segment includes: determining the coordinates of the first endpoint and the second endpoint of the third line segment; determining the coordinates of the third endpoint and the fourth endpoint of the fourth line segment; calculating the average of the coordinates of the first endpoint and the third endpoint to obtain the coordinates of the fifth endpoint of the fifth line segment; calculating the average of the coordinates of the second endpoint and the fourth endpoint to obtain the coordinates of the sixth endpoint of the fifth line segment; and generating the fifth line segment based on the coordinates of the fifth endpoint and the sixth endpoint.
[0097] For example, please see Figure 7 The first maximum circumscribed rectangle 701 includes a boundary line segment 702, and the second maximum circumscribed rectangle 703 includes a boundary line segment 704. Boundary line segment 702 is the third line segment, and boundary line segment 704 is the fourth line segment. Since boundary line segment 702 is parallel to boundary line segment 704, and the second relative distance between boundary line segment 702 and boundary line segment 704 is less than a second threshold, this embodiment needs to redetermine the common boundary line segment of the first maximum circumscribed rectangle 701 and the second maximum circumscribed rectangle 702.
[0098] Please see Figure 8 In this embodiment, a fifth line segment 705 is set in the middle of the boundary line segment 702 and the boundary line segment 704. The fifth line segment 705 serves as the common boundary line segment of the first maximum circumscribed rectangle 701 and the second maximum circumscribed rectangle 702. The boundary line segments 702 and 704 are deleted. This can simply express the boundary of the first maximum circumscribed rectangle 701 and the boundary of the second maximum circumscribed rectangle 703 without causing the lines to be cluttered, thereby improving the readability and visual effect of the map.
[0099] It should be noted that in the above embodiments, there is no necessarily a certain order between the steps. Those skilled in the art can understand from the description of the embodiments of the present invention that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in turn, etc.
[0100] As another aspect of the embodiments of the present invention, the present invention provides a map presentation device. The map presentation device can be a software module, which includes several instructions stored in a memory. A processor can access the memory, call the instructions, and execute them to complete the map presentation methods described in the various embodiments above.
[0101] In some embodiments, the map rendering device can also be constructed from hardware devices. For example, the map rendering device can be constructed from one or more chips, which can work together to complete the map rendering methods described in the various embodiments above. As another example, the map rendering device can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0102] Please see Figure 9 The map presentation device 900 includes a map acquisition module 91, a border setting module 92, a border optimization module 93, and a map presentation module 94.
[0103] The map acquisition module 91 is used to acquire a cleaning map, which includes at least one cleanable zone. The border setting module 92 is used to set the maximum bounding rectangle border for each cleanable zone. The border optimization module 93 is used to optimize each maximum bounding rectangle border. The map presentation module 94 is used to present the optimized cleaning map. Each cleanable zone of the cleaning map is defined by the corresponding optimized maximum bounding rectangle border.
[0104] This embodiment sets a maximum bounding rectangle border for each cleanable zone and optimizes the maximum bounding rectangle border, which helps to square each cleanable zone and vividly display the actual floor plan, thus making it easier for users to quickly read the map.
[0105] In some embodiments, the border optimization module 93 is specifically used to: determine that the two largest outer rectangular borders of the border overlap are the first outer rectangular border and the second outer rectangular border, and delete the line segments of the first outer rectangular border that appear within the second outer rectangular border.
[0106] In some embodiments, the area of the first circumscribed rectangle is greater than the area of the second circumscribed rectangle.
[0107] In some embodiments, the clean map includes reachable areas, and the border optimization module 93 is specifically used to: extract target line segments whose maximum bounding rectangle borders appear within the reachable areas, and delete the target line segments.
[0108] In some embodiments, the border optimization module 93 is specifically used to: determine the maximum outer global border for defining the clean map; if the first line segment is parallel to the second line segment, optimize the maximum outer rectangular border according to the first relative distance between the first line segment and the second line segment, wherein the first line segment is any boundary line segment in the maximum outer rectangular border, and the second line segment is any boundary line segment in the maximum outer global border.
[0109] In some embodiments, the border optimization module 93 is further specifically used to: if the first relative distance is less than or equal to the first threshold, control the first line segment to translate to the position of the second line segment so that the first line segment coincides with the second line segment, and control the two boundary line segments in the maximum outer rectangle border that are respectively connected to the first line segment to extend according to the translation direction and translation distance of the first line segment.
[0110] In some embodiments, the border optimization module 93 is further specifically used for: selecting one of the plurality of maximum outer bounding rectangle borders as the first maximum outer bounding rectangle border, and sequentially selecting one of the remaining maximum outer bounding rectangle borders as the second maximum outer bounding rectangle border, wherein the remaining maximum outer bounding rectangle borders are the maximum outer bounding rectangle borders after removing the first maximum outer bounding rectangle border from the plurality of maximum outer bounding rectangle borders; determining whether the third line segment is parallel to the fourth line segment, wherein the third line segment is any boundary line segment in the first maximum outer bounding rectangle border, and the fourth line segment is any boundary line segment in the second maximum outer bounding rectangle border; if the third line segment is parallel to the fourth line segment, then calculating the second relative distance between the third line segment and the fourth line segment, and determining the common boundary line segment of the first maximum outer bounding rectangle border and the second maximum outer bounding rectangle border based on the second relative distance.
[0111] In some embodiments, the border optimization module 93 is further specifically used to: determine whether the second relative distance is less than or equal to the second threshold; if it is less than or equal to the threshold, determine the fifth line segment, use the fifth line segment as the common boundary line segment of the first maximum outer rectangle border and the second maximum outer rectangle border, and delete the third line segment and the fourth line segment, wherein the fifth line segment is located in the middle between the third line segment and the fourth line segment.
[0112] It should be noted that the map presentation device described above can execute the map presentation method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the map presentation device embodiments can be found in the map presentation method provided in the embodiments of the present invention.
[0113] Please see Figure 10, Figure 10 This is a schematic diagram of the circuit structure of a mobile terminal provided in an embodiment of the present invention. The mobile terminal can be any suitable type of device or electronic product, such as a smartphone, computer, PDA, tablet computer, smartwatch, or other device or electronic product with logic calculation and analysis functions. The mobile terminal can establish a communication connection with a cleaning robot to complete various tasks. The communication connection includes wired or wireless communication connections. Wired communication connections include various communication connections that transmit information using tangible media such as metal wires and optical fibers. Wireless communication connections include 5G, 4G, 3G, 2G, CDMA, Zig-Bee, Bluetooth, Wi-Fi, UWB, NFC, CDMA2000, GSM, Infrared (IR), ISM, RFID, UMTS / 3GPPw / HSDPA, WiMAX, Wi-Fi, or ZigBee, etc.
[0114] Cleaning robots can include sweeping robots, floor washing robots, mopping robots, handling robots, and pet-friendly robots. After building a map, the cleaning robot can send the map to a mobile terminal, which then executes the map presentation methods described in the above embodiments to display the map.
[0115] like Figure 10 As shown, the mobile terminal 110 includes one or more processors 111 and a memory 112. Wherein, Figure 10 Take a processor 111 as an example.
[0116] Processor 111 and memory 112 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0117] The memory 112, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the map presentation method in the embodiments of the present invention. The processor 111 executes various functional applications and data processing of the map presentation device by running the non-volatile software programs, instructions, and modules stored in the memory 112, thereby realizing the functions of the map presentation method provided in the above method embodiments and the various modules or units in the above device embodiments.
[0118] Memory 112 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 112 may optionally include memory remotely located relative to processor 111, and these remote memories may be connected to processor 111 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0119] The program instructions / modules are stored in the memory 112 and, when executed by one or more processors 111, execute the map presentation method in any of the above method embodiments.
[0120] This invention also provides a storage medium storing computer-executable instructions that are executed by one or more processors, for example... Figure 10 One of the processors 111 enables one or more of the processors to execute the map presentation method in any of the above method embodiments. This embodiment, by setting a maximum bounding rectangle border for each cleanable zone and optimizing the maximum bounding rectangle border, facilitates the squarening of each cleanable zone, which helps to vividly display the actual floor plan, thereby enabling users to quickly read the map.
[0121] This invention also provides a computer program product, comprising a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions, which, when executed by a mobile terminal, cause the mobile terminal to perform any of the map presentation methods described above. This embodiment, by setting a maximum bounding rectangle border for each cleanable zone and optimizing the maximum bounding rectangle border, facilitates the squarening of each cleanable zone, enabling a more realistic display of the floor plan and allowing users to quickly read the map.
[0122] The device or equipment embodiments described above are merely illustrative. The unit modules described as separate components may or may not be physically separate. The components shown as module units may or may not be physical units; that is, they may be located in one place or distributed across multiple network module units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A map presentation method, characterized in that, include: Obtain a cleaning map, which includes at least one cleanable zone; Set a maximum outer rectangular border for each of the cleanable zones; Optimizing each of the maximum bounding rectangle borders includes: determining the maximum bounding global border used to define the clean map; if a first line segment is parallel to a second line segment, optimizing the maximum bounding rectangle border based on a first relative distance between the first line segment and the second line segment, wherein the first line segment is any boundary line segment in the maximum bounding rectangle border, and the second line segment is any boundary line segment in the maximum bounding global border; optimizing the maximum bounding rectangle border based on the first relative distance between the first line segment and the second line segment includes: if the first relative distance is less than or equal to a first threshold, controlling the first line segment to translate to the position of the second line segment, so that the first line segment coincides with the second line segment, and controlling the two boundary line segments of the maximum bounding rectangle border respectively connected to the first line segment to extend according to the translation direction and translation distance of the first line segment; if the first relative distance is greater than the first threshold, remaining unchanged; The optimized cleaning map is presented, wherein each cleanable zone of the cleaning map is bounded by a corresponding optimized maximum bounding rectangle.
2. The method according to claim 1, characterized in that, The optimization of each of the maximum bounding rectangle borders includes: The two largest bounding rectangles that overlap are identified as the first bounding rectangle and the second bounding rectangle. Delete the line segments of the first outer rectangle that appear within the second outer rectangle.
3. The method according to claim 2, characterized in that, The area of the first circumscribed rectangle is greater than the area of the second circumscribed rectangle.
4. The method according to claim 1, characterized in that, The cleaning map includes reachable areas, and optimizing each of the maximum bounding rectangle borders includes: Extract the target line segments whose maximum bounding rectangle border appears within the reachable region; Delete the target line segment.
5. The method according to claim 1, characterized in that, The optimization of each of the maximum bounding rectangle borders also includes: Select one of the maximum bounding rectangles as the first maximum bounding rectangle, and sequentially select one of the remaining maximum bounding rectangles as the second maximum bounding rectangle. The remaining maximum bounding rectangle is the maximum bounding rectangle after removing the first maximum bounding rectangle from the plurality of maximum bounding rectangles. Determine whether the third line segment is parallel to the fourth line segment, wherein the third line segment is any boundary line segment in the first maximum bounding rectangle, and the fourth line segment is any boundary line segment in the second maximum bounding rectangle; If the third line segment is parallel to the fourth line segment, then calculate the second relative distance between the third line segment and the fourth line segment, and determine the common boundary line segment of the first maximum outer rectangle and the second maximum outer rectangle based on the second relative distance.
6. The method according to claim 5, characterized in that, The step of determining the common boundary segment of the first maximum outer rectangle and the second maximum outer rectangle based on the second relative distance includes: Determine whether the second relative distance is less than or equal to the second threshold; If it is less than or equal to, then the fifth line segment is determined, and the fifth line segment is used as the common boundary line segment of the first maximum bounding rectangle and the second maximum bounding rectangle. The third line segment and the fourth line segment are deleted, wherein the fifth line segment is located in the middle between the third line segment and the fourth line segment.
7. A storage medium, characterized in that, The device stores computer-executable instructions for causing a mobile terminal to perform the map rendering method as described in any one of claims 1 to 6.
8. A mobile terminal, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the map rendering method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Cleaning range determination method and device, cleaning robot and storage medium
CN115429157A