Map display control method of cleaning robot, mobile terminal and medium
By acquiring map data scanned in real time by the cleaning robot, the spatial range parameters of the scanned area are dynamically determined. Combined with the display parameters of the mobile terminal screen, the map image is panned and zoomed, which solves the problem of unstable map display by the cleaning robot and improves the user experience and interface aesthetics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-27
AI Technical Summary
During the real-time scanning process of the cleaning robot, the scanned area may be too small or off-center from the screen, requiring users to frequently perform manual operations to track key areas, which disrupts the smoothness of the interaction and the aesthetics of the interface.
By acquiring map data scanned in real time by the cleaning robot, the spatial range parameters of the scanned area are dynamically determined. Combined with the display parameters of the mobile terminal screen, the map image is panned and scaled to be displayed in the specified area of the screen.
It solves the problems of map drift and inconvenience in viewing and operation caused by excessively small display size, and significantly improves the user experience and interface aesthetics.
Smart Images

Figure CN121730686A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cleaning robot technology, and in particular to a map display control method, mobile terminal and medium for a cleaning robot. Background Technology
[0002] With the development of smart home technology, automated cleaning robots have been widely used in home and commercial environments. These robots are typically equipped with LiDAR, visual sensors, or other ranging devices, and use simultaneous localization and mapping (SMR) technology to scan and build a map of their working environment in real time as they move.
[0003] During map building, mobile devices (such as dedicated applications on smartphones and tablets) need to render the real-time scanning data transmitted by the robot into a visual map for users to view and interact with. However, during real-time scanning, the scanned area starts from a single point and gradually expands outwards, with its spatial extent and location constantly changing dynamically. This can cause scanned areas to be difficult to observe due to their small size or offset from the center of the screen; users have to frequently perform manual zooming, dragging, and panning operations to track this changing key area, severely disrupting the smoothness of interaction, the aesthetics of the interface, and the user experience. Summary of the Invention
[0004] Therefore, it is necessary to provide a map display control method, mobile terminal, and medium for a cleaning robot to address the aforementioned problems.
[0005] In a first aspect, this application provides a map display control method for a cleaning robot, comprising the following steps: Step S1: Obtain map data scanned in real time by the cleaning robot, and dynamically determine the spatial range parameters of the scanned area based on the map data; Step S2: Render the map data into a map image; Step S3: Based on the spatial range parameters and the display parameters of the mobile terminal screen, perform at least one of translation and scaling processing on the map image so that the processed map image is displayed within the screen display area of the mobile terminal screen.
[0006] In one example, the spatial range parameters include first coordinate information for determining the center position of the scanned area, and first size information for determining the maximum range of the scanned area in the horizontal and vertical directions; the display parameters of the mobile terminal screen include the coordinates of the center point of the screen display area, and the length and width of the screen display area.
[0007] In one example, the first coordinate information is the coordinates of the center point of the smallest bounding rectangle of the scanned area; the first size information is the length and width of the smallest bounding rectangle.
[0008] In one example, performing at least one of translation and scaling processing on the map image based on the spatial range parameters and the display parameters of the mobile terminal screen includes the following steps: Determine whether the first coordinate information coincides with the coordinates of the center point of the screen display area; If they do not overlap, the map image is first translated until the first coordinate information coincides with the center point coordinates of the screen display area, and then the translated map image is scaled. If they overlap, only the map images will be scaled.
[0009] In one example, the translation process specifically includes: Calculate a first difference between the abscissa of the first coordinate information and the abscissa of the center point of the screen display area, and calculate a second difference between the ordinate of the first coordinate information and the ordinate of the center point of the screen display area; The map image is shifted along the horizontal axis by the distance corresponding to the first difference, and along the vertical axis by the distance corresponding to the second difference; Wherein, the horizontal axis represents the horizontal direction of the mobile terminal screen, and the vertical axis represents the vertical direction of the mobile terminal screen.
[0010] In one example, the scaling process specifically includes: Based on the first size information, the horizontal and vertical dimensions are determined, and the larger of the horizontal and vertical dimensions is taken as the reference dimension. When the reference size is a horizontal dimension, the reference size is the length of the screen display area; when the reference size is a vertical dimension, the reference size is the width of the screen display area. Calculate the scaling ratio based on the base size and the reference size; Using the center point coordinates of the screen display area as the anchor point, the map image is scaled according to the scaling ratio.
[0011] In one example, the specific content of calculating the scaling ratio includes: scaling ratio = (base size * preset margin coefficient) / reference size; wherein, the preset margin coefficient is a positive number less than 1.
[0012] In one example, the preset margin coefficient is greater than or equal to 0.85 and less than or equal to 0.95.
[0013] Secondly, this application provides a mobile terminal, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the map display control method for the cleaning robot described in any of the above claims.
[0014] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the map display control method as described in any of the preceding claims.
[0015] One of the above technical solutions has the following advantages and beneficial effects: The map display control method for cleaning robots described above obtains the spatial range parameters of the scanned area and combines them with the display parameters of the mobile terminal screen. It automatically performs at least one of the translation and scaling processing on the map image obtained after rendering the map data, and displays the dynamically changing scanned area in a specified area of the screen. This solves the problems of map drift and inconvenience in viewing and operation caused by the display being too small, and significantly improves the user experience and the aesthetics of the interface. Attached Figure Description
[0016] Figure 1 This is a first flowchart illustrating the map display control method for a cleaning robot in an embodiment of this application.
[0017] Figure 2 This is a second flowchart illustrating the map display control method for a cleaning robot in an embodiment of this application.
[0018] Figure 3 This is a schematic diagram of the third process of the map display control method for a cleaning robot in an embodiment of this application.
[0019] Figure 4 This is a schematic diagram showing the effect of map display before optimization in the embodiments of this application.
[0020] Figure 5 This is a schematic diagram illustrating the optimized map display effect in an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0022] In one embodiment, such as Figures 1 to 5 As shown, a map display control method for a cleaning robot is provided, including the following steps: Step S1: Obtain map data scanned in real time by the cleaning robot, and dynamically determine the spatial range parameters of the scanned area based on the map data; Step S2: Render the map data into a map image; Step S3: Based on the spatial range parameters and the display parameters of the mobile terminal screen, perform at least one of the following processing on the map image: translation or scaling, so that the processed map image is displayed within the screen display area of the mobile terminal screen.
[0023] This application discloses a map display control method for a cleaning robot. By acquiring the spatial range parameters of the scanned area and combining them with the display parameters of the mobile terminal screen, the method automatically performs at least one of translation and scaling processing on the map image obtained after rendering from map data. This method displays the dynamically changing scanned area on a designated area of the screen, solving the problems of map drift and inconvenience in viewing and operation caused by the display being too small, and significantly improving the user experience and interface aesthetics.
[0024] In step S1, the map data obtained by the cleaning robot in real time can be the original map data generated by the cleaning robot in real time through sensors such as LiDAR during its operation. Spatial range parameters can be used to characterize the geometric parameters of the graphic corresponding to the scanned area on the screen display area of the mobile terminal. For example, a two-dimensional rectangular coordinate system can be established with the screen display area to obtain the position and size of the graphic corresponding to the scanned area in the coordinate system. For example, it can include the center point coordinates, width and length of the smallest bounding rectangle of the scanned area, or the boundary coordinates of the scanned area, such as the maximum and minimum values of the X-axis and Y-axis.
[0025] In step S3, the mobile terminal can be an electronic device such as a mobile phone, tablet, or computer; the display parameters of the mobile terminal screen can be fixed or preset layout parameters for the screen display area. The screen display area can be a preset rectangular area located on the screen. This rectangular area can be smaller than the entire screen that can be displayed, leaving space for UI buttons, status bars, etc. Accordingly, the display parameters can include the center point coordinates, width, and length of this rectangular area. Based on the center point coordinates of the display parameters and the center point coordinates of the scanned area, the center point of the map image can be made to coincide with the center point of the screen display area by translating the map image relative to the screen display area, or the center point of the map image can be offset from the center point of the screen display area by a preset distance. In addition, based on the length and width of the smallest bounding rectangle of the scanned area, and the width and length in the display parameters, the scaling ratio of the map image can be adjusted according to the length ratio or width ratio between the two.
[0026] Based on this, the system performs at least one of translation and scaling processing on the rendered map image according to the spatial range parameters and display parameters, so that the area scanned by the cleaning robot is displayed on the mobile terminal screen at the set position and scale.
[0027] It should be noted that rendering map data into map images is essentially the process by which cleaning robots use sensors such as LiDAR to transform the perceived, abstract numerical environmental model into a visual image that humans can intuitively understand.
[0028] In one example, the spatial extent parameter includes first coordinate information for determining the center position of the scanned area, and first size information for determining the maximum extent of the scanned area in the horizontal and vertical directions; The display parameters of a mobile terminal screen include the coordinates of the center point of the screen display area, as well as the length and width of the screen display area.
[0029] The first coordinate information can be used to determine the coordinates of the center point of the graphic corresponding to the scanned area in a two-dimensional rectangular coordinate system. These coordinates can be used as the calculation basis for map image translation processing, so as to move the center point of the map image to a specified position in the screen display area. The first dimension information can be used to determine the maximum range of the scanned area in the horizontal and vertical directions; the first dimension information can be the geometric parameters of the bounding rectangle, bounding circle or bounding polygon corresponding to the scanned area, so as to quantify the size of the scanned area.
[0030] The display parameters of a mobile terminal screen may include the coordinates of the center point of the screen display area, as well as the length and width of the screen display area. The coordinates of the center point of the screen display area refer to the position of the geometric center point of the screen display area in the screen coordinate system. For example, the position of the geometric center point of the view or canvas used to display a map in an app in the screen coordinate system. The length and width of the screen display area refer to the physical size of the screen display area.
[0031] It should be noted that, based on the center point coordinates in the first coordinate information and the center point coordinates in the display parameters, the map image can be translated to move the center point of the map image to a specified position in the screen display area; in addition, based on the geometric parameters in the first size information and the width and length in the display parameters, one or more scaling ratios can be calculated and the map image can be scaled to display the map image at an appropriate size in the screen display area.
[0032] In one embodiment, the first coordinate information is the coordinates of the center point of the smallest bounding rectangle of the scanned area; the first size information is the length and width of the smallest bounding rectangle.
[0033] It should be noted that the minimum bounding rectangle is determined by the maximum size range of the scanned area in both the vertical and horizontal directions. Regardless of whether the shape of the scanned area is regular or irregular, there is one and only one rectangle that can enclose the entire range of the scanned area. In addition, the screen display area of a mobile terminal is essentially a rectangle. By calculating the scaling ratio based on the smallest bounding rectangle of the scanned area, the problem of how to adapt the map image corresponding to the scanned area to the mobile terminal screen can be simplified to how to adapt one rectangle to another rectangle through at least one of translation and scaling processing.
[0034] like Figure 2 and Figure 3 As shown, in one embodiment, the map image is subjected to at least one of translation and scaling processing based on spatial range parameters and display parameters of the mobile terminal screen, including the following steps: Determine whether the first coordinate information coincides with the coordinates of the center point of the screen display area; If they do not overlap, first translate the map image until the first coordinate information coincides with the center point coordinates of the screen display area, and then scale the translated map image. If they overlap, only the map images will be scaled.
[0035] In this case, when the first coordinate information does not coincide with the center point coordinate of the screen display area, the map image is first translated and then scaled. This ensures that the user always sees the scanned area centered on the screen display area first, and then sees the scanned area enlarged to an appropriate size. Compared to scaling the map image first and then translating it, this avoids blank spaces or the map edges filling the screen, preventing the scanned area from partially or completely overflowing the screen display area.
[0036] In one embodiment, the translation process specifically includes: Calculate the first difference between the x-coordinate of the first coordinate information and the x-coordinate of the center point of the screen display area, and calculate the second difference between the y-coordinate of the first coordinate information and the y-coordinate of the center point of the screen display area; Control the map image to shift along the horizontal axis by the distance corresponding to the first difference, and along the vertical axis by the distance corresponding to the second difference; The horizontal axis represents the horizontal direction of the mobile terminal screen, and the vertical axis represents the vertical direction of the mobile terminal screen.
[0037] In one example, the scaling process specifically includes: Based on the first dimension information, the larger of the horizontal and vertical dimensions is taken as the reference dimension. When the reference size is a horizontal dimension, the reference size is the length of the screen display area; when the reference size is a vertical dimension, the reference size is the width of the screen display area. Calculate the scaling ratio based on the baseline and reference dimensions; Using the center point coordinates of the screen display area as the anchor point, scale the map image according to the scaling ratio.
[0038] Among them, the larger of the horizontal and vertical dimensions is taken as the reference dimension to ensure that the longest side of the scanned area can fit into the screen display area. This ensures that the scaled view will definitely include the entire scanned area and will not overflow the screen display area due to excessive length in a certain direction.
[0039] The length or width of the screen display area is taken as the reference size. Specifically, if the reference size is horizontal, the reference size is the length of the screen display area; if the reference size is vertical, the reference size is the width of the screen. Based on this, a matching relationship is established between the screen display area size and the target size of the map image, ensuring that the calculated scaling ratio can adapt the scanned area to the corresponding direction of the screen display area. For example, if the shape corresponding to the scanned area is a rectangle with a large horizontal size and a small vertical size, the horizontal size in the first size information is taken as the reference size, and the length of the screen display area is taken as the reference size. The scaling ratio is determined based on the reference size and the reference size. When the horizontal size in the first size information is scaled to be equal to the length of the screen display area, or when the horizontal size in the first size information is scaled to be slightly smaller than the length of the screen display area, it can be ensured that the vertical size in the first size information will not exceed the width of the screen display area after scaling, thus avoiding the scanned area from overflowing the screen display area.
[0040] In one example, the specific steps involved in calculating the scaling ratio include: Scaling ratio = (Base size * Preset margin factor) / Reference size; The preset margin coefficient is a positive number less than 1.
[0041] The preset margin is a positive number less than 1, which ensures that when the scanned area is fully displayed on the screen, there is a certain blank area between the map image and the screen border, preventing the edge of the map image from being too close to the edge of the screen, creating a visual buffer area and improving the aesthetics of the image on the screen.
[0042] In some embodiments, the preset margin coefficient is greater than or equal to 0.85 and less than or equal to 0.95.
[0043] The preset margin coefficient can be a positive number greater than or equal to 0.85 and less than or equal to 0.95. For example, the preset margin coefficient is 0.9. Taking the screen display area of the mobile terminal as an A1*B1mm rectangular area as an example, where A1mm is the length of the screen display area and B1mm is the width of the screen display area; the minimum bounding rectangle corresponding to the scanned area is an A2*B2mm rectangle, and A2>B2. In this case, A2 is taken as the reference size and A1 is the base size. The scaling ratio is calculated as (A1*0.9) / A2. If the center point of the map image coincides with the center point of the screen display area, the map image is enlarged by (A1*0.9) / A2 times with the center point of the screen display area as the center. The enlarged map image and the border of the screen display area retain a spacing of 0.1*A1mm on both sides in the horizontal direction.
[0044] It should be understood that, although Figure 1-2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0045] In one embodiment, a mobile terminal is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the map display control method for the cleaning robot described above.
[0046] In one embodiment, when a processor executes a computer program, it may perform the following steps: The system acquires map data scanned in real time by the cleaning robot and dynamically determines the spatial range parameters of the scanned area based on the map data. It then renders the map data into a map image. Based on the spatial range parameters and the display parameters of the mobile terminal screen, the system performs at least one of the following processing methods: translation and scaling, so that the processed map image is displayed within the screen display area of the mobile terminal screen.
[0047] In one embodiment, when the processor executes a computer program, it may further perform the following steps: Determine whether the first coordinate information coincides with the coordinates of the center point of the screen display area; If they do not overlap, first translate the map image until the first coordinate information coincides with the center point coordinates of the screen display area, and then scale the translated map image. If they overlap, only the map images will be scaled.
[0048] In one embodiment, when the processor executes a computer program, it may further perform the following steps: Calculate the first difference between the x-coordinate of the first coordinate information and the x-coordinate of the center point of the screen display area, and calculate the second difference between the y-coordinate of the first coordinate information and the y-coordinate of the center point of the screen display area; Control the map image to shift along the horizontal axis by the distance corresponding to the first difference, and along the vertical axis by the distance corresponding to the second difference; The horizontal axis represents the horizontal direction of the mobile terminal screen, and the vertical axis represents the vertical direction of the mobile terminal screen.
[0049] In one embodiment, when the processor executes a computer program, it may further perform the following steps: Based on the first dimension information, the larger of the horizontal and vertical dimensions is taken as the reference dimension. When the reference size is a horizontal dimension, the reference size is the length of the screen display area; when the reference size is a vertical dimension, the reference size is the width of the screen display area. Calculate the scaling ratio based on the baseline and reference dimensions; Using the center point coordinates of the screen display area as the anchor point, scale the map image according to the scaling ratio.
[0050] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the map display control method described above.
[0051] In one example, when a computer program is executed by a processor, it performs the following steps: The system acquires map data scanned in real time by the cleaning robot and dynamically determines the spatial range parameters of the scanned area based on the map data. It then renders the map data into a map image. Based on the spatial range parameters and the display parameters of the mobile terminal screen, the system performs at least one of the following processing methods: translation and scaling, so that the processed map image is displayed within the screen display area of the mobile terminal screen.
[0052] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus RAM (RDRAM), direct memory bus RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0053] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0054] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A map display control method of a cleaning robot, characterized by, The method comprises the following steps: S1. Obtain map data scanned by the cleaning robot in real time, and dynamically determine a spatial range parameter of a scanned area according to the map data; S2. Render the map data into a map picture; S3. According to the spatial range parameter and the display parameter of the mobile terminal screen, at least one of translation processing and scaling processing is performed on the map picture, so that the processed map picture is displayed in the screen display area of the mobile terminal screen.
2. The map display control method of the cleaning robot according to claim 1, wherein the spatial range parameter comprises first coordinate information for determining the center position of the scanned area and first size information for determining the maximum range of the scanned area in the horizontal direction and the vertical direction; and the display parameter of the mobile terminal screen comprises the center point coordinate of the screen display area and the length and width of the screen display area.
3. The map display control method of the cleaning robot according to claim 2, wherein the first coordinate information is the center point coordinate of the minimum circumscribed rectangle of the scanned area; and the first size information is the length and width of the minimum circumscribed rectangle.
4. The map display control method of the cleaning robot according to claim 2 or 3, wherein the step of performing at least one of translation processing and scaling processing on the map picture according to the spatial range parameter and the display parameter of the mobile terminal screen comprises the following steps: determining whether the first coordinate information coincides with the center point coordinate of the screen display area; if not, first performing the translation processing on the map picture until the first coordinate information coincides with the center point coordinate of the screen display area, and then performing the scaling processing on the translated map picture; if yes, only performing the scaling processing on the map picture. The translation processing specifically comprises: calculating a first difference value between the horizontal coordinate of the first coordinate information and the horizontal coordinate of the center point of the screen display area, and a second difference value between the vertical coordinate of the first coordinate information and the vertical coordinate of the center point of the screen display area; controlling the map picture to be translated by a distance corresponding to the first difference value along the horizontal axis and a distance corresponding to the second difference value along the vertical axis; wherein the horizontal axis is the horizontal direction of the mobile terminal screen, and the vertical axis is the vertical direction of the mobile terminal screen. The scaling processing specifically comprises:
5. The map display control method of the cleaning robot according to claim 2 or 3, characterized in that, taking one of the horizontal size and the vertical size determined according to the first size information as a reference size; when the reference size is the horizontal size, taking the length of the screen display area as the reference size; when the reference size is the vertical size, taking the width of the screen display area as the reference size; calculating a scaling ratio according to the reference size and the reference size; scaling the map picture according to the scaling ratio with the center point coordinate of the screen display area as an anchor point.
6. The map display control method of the cleaning robot according to claim 2 or 3, characterized in that, The specific content of the calculation of the scaling ratio comprises: scaling ratio = (reference size * preset margin coefficient) / reference size. 7. The map display control method of the cleaning robot according to claim 6, characterized in that, The preset margin coefficient is a positive number less than 1. 8.The map display control method of the cleaning robot according to claim 7, characterized in that, The preset margin coefficient is greater than or equal to 0.85 and less than or equal to 0.
95.
9. A mobile terminal comprising a memory and a processor, said memory storing a computer program, characterized in that, The processor, when executing the computer program, implements the steps of the map display control method of the cleaning robot according to any one of claims 1 to 8.
10. A computer readable storage medium storing a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the map display control method according to any one of claims 1 to 8.