Map drawing method and device, mobile purifier and storage medium

By drawing a clean area map of the mobile purifier using SVG vector path, the problem of excessive storage resource occupation in the prior art is solved, and efficient storage space utilization and drawing efficiency are achieved.

CN120235982APending Publication Date: 2025-07-01GD MIDEA ENVIRONMENT APPLIANCES MFG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311868246.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

In the prior art, when drawing a map of the clean area of ​​the mobile purifier, it is necessary to traverse all pixel points, resulting in excessive storage resource occupancy.

Method used

The map is drawn using SVG vector paths, and the color values ​​of elements in the map data are obtained through the recognition module, at least one SVG vector path is generated, and rendered according to these paths to obtain a map of the clean area.

Benefits of technology

Effectively reduce the storage space required for map drawing and improve the drawing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235982A_ABST
    Figure CN120235982A_ABST
Patent Text Reader

Abstract

The invention discloses a map drawing method and device, a mobile purifier and a storage medium, and the method comprises the steps: generating at least one SVG vector path according to color values corresponding to elements in map data; rendering according to the at least one SVG vector path to obtain a map of the clean area; and displaying the map of the clean area on the display interface. Therefore, when the purifier is moved to draw the map, the map can be drawn only by traversing the generated SVG vector path, and the storage space required for drawing the map is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of map drawing, and more specifically, to a map drawing method, device, mobile purifier, and storage medium. Background Art

[0002] In the related art, when drawing a map of the cleaning area corresponding to a mobile purifier, usually, relevant data within the cleaning area is obtained by sensors, and then a map of the cleaning area is drawn on the Canvas layer based on the relevant data obtained by the sensors. However, since all pixel points on the map need to be traversed when drawing the map, a relatively large amount of relevant data about the cleaning area needs to be stored, thus occupying a relatively large amount of storage resources. Summary of the Invention

[0003] In view of the above problems, this application provides a map drawing method, device, mobile purifier, and storage medium, which can effectively reduce the storage space occupied by relevant data within the cleaning area and effectively improve the efficiency of drawing the map.

[0004] In a first aspect, this application provides a map drawing method, which is applied to a mobile purifier. The mobile purifier includes a display interface and an identification module for obtaining map data. The method includes: generating at least one SVG vector path according to the color value corresponding to an element in the map data; rendering according to the at least one SVG vector path to obtain a map of the cleaning area; and displaying the map of the cleaning area on the display interface.

[0005] In a second aspect, this application provides a map drawing method, which is applied to a mobile device. The method includes: obtaining at least one SVG vector path sent by the mobile purifier; rendering according to the at least one SVG vector path to obtain a map of the cleaning area; and displaying the map of the cleaning area on the display interface of the mobile device.

[0006] In a third aspect, this application provides a map drawing method, which includes: the mobile purifier generates at least one SVG vector path according to the color value corresponding to an element in the map data; the mobile device renders according to the at least one SVG vector path to obtain a map of the cleaning area; and the mobile device displays the map of the cleaning area on the display interface.

[0007] In a fourth aspect, this application provides a map drawing device, which is applied to a mobile purifier. The mobile purifier includes a display interface and an identification module for obtaining map data. The map drawing device includes: a generation module for generating at least one SVG vector path according to the color value corresponding to an element in the map data; a rendering module for rendering according to the at least one SVG vector path to obtain a map of the cleaning area; and a display module for displaying the map of the cleaning area on the display interface.

[0008] In a fifth aspect, the present application further provides a mobile purifier, including a processor, a memory, and one or more application programs; the one or more application programs are stored in the memory and configured to be executed by the processor to implement the above-mentioned map drawing method.

[0009] In a sixth aspect, the present application further provides a computer-readable storage medium, in which program code is stored, and when the program code is run by a processor, the above-mentioned map drawing method is executed.

[0010] The technical solution provided by the present application is applied to a mobile purifier, which includes a display interface and an identification module for obtaining map data, and includes: generating at least one SVG vector path according to the color value corresponding to the element in the map data; rendering according to the at least one SVG vector path to obtain a map of the cleaning area; and displaying the map of the cleaning area on the display interface. Thus, when the mobile purifier draws a map, it only needs to traverse the generated SVG vector paths to draw the map, effectively reducing the storage space required for drawing the map. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments and drawings obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0012] Figure 1 It is a schematic flowchart of a map drawing method provided by an embodiment of the present application.

[0013] Figure 2 It is a schematic diagram of the effect of a map provided by an embodiment of the present application.

[0014] Figure 3 It is a schematic flowchart of another map drawing method provided by an embodiment of the present application.

[0015] Figure 4 It is a schematic diagram of the effect of another map provided by an embodiment of the present application.

[0016] Figure 5 It is a schematic flowchart of still another map drawing method provided by an embodiment of the present application.

[0017] Figure 6 It is a schematic structural diagram of a map drawing device provided by an embodiment of the present application.

[0018] Figure 7It is a schematic structural diagram of a mobile purifier provided by an embodiment of the present application.

[0019] Figure 8 It is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present application. Detailed implementation manners

[0020] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.

[0021] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. In the following description, the term "a plurality" refers to at least two.

[0022] In the following description, the terms "first / second" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second" can be interchanged with a specific order or sequence when allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0024] In the related art, when drawing a map of the corresponding cleaning area of a mobile purifier, usually relevant data in the cleaning area is obtained according to sensors, and then the map of the cleaning area is drawn on the Canvas layer according to the relevant data obtained by the sensors. However, since all pixel points on the map need to be traversed when drawing the map, a relatively large amount of relevant data about the cleaning area needs to be stored, thus occupying a relatively large amount of storage resources.

[0025] To address the above issues, the present application provides a map drawing method, apparatus, mobile purifier, and storage medium. The map drawing method is applied to a mobile purifier, which includes a display interface and an identification module for obtaining map data, and includes: generating at least one scalable vector graphics (SVG) vector path according to the color values corresponding to the elements in the map data; rendering according to the at least one SVG vector path to obtain a map of the cleaning area; and displaying the map of the cleaning area on the display interface.

[0026] Thus, when the mobile purifier draws a map, it only needs to traverse the generated SVG vector paths to draw the map, effectively reducing the storage space required for drawing the map.

[0027] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a map drawing method provided by an embodiment of the present application. As Figure 1 shown, it is applied to a mobile purifier, which includes a display interface and an identification module for obtaining map data. The map drawing method includes steps 110 to 130.

[0028] In step 110, at least one SVG vector path is generated according to the color values corresponding to the elements in the map data.

[0029] During the process of the mobile purifier moving within the cleaning area, the identification module obtains the map data corresponding to the cleaning area, so that the mobile purifier generates an SVG vector path according to the map data obtained by the identification module to draw the map corresponding to the cleaning area.

[0030] Among them, the mobile purifier is a floor sweeping robot or an air purifier. It can be understood that the present application is not limited to the mobile purifier being a floor sweeping robot or an air purifier. The mobile purifier refers to a device that can move autonomously within the cleaning area and can obtain the map data of the cleaning area.

[0031] The cleaning area is the area that the mobile purifier can reach autonomously. For example, the cleaning area is the area of a residence. Another example is that the cleaning area is the area of a room.

[0032] The identification module is a radar. It can be understood that the present application is not limited to the identification module being a radar. The identification module is used to obtain the distribution information of objects within the cleaning area or the map data of the cleaning area. For example, the identification module is used to obtain the distribution information of the walls within the cleaning area. Another example is that the identification module is used to obtain the distribution information of the walls and obstacles within the cleaning area.

[0033] The map data is the map information within the cleaning area (e.g., room wall position information, bed position information, room distribution information, etc.). In the embodiments of the present application, the map data is the wall position information within the cleaning area obtained by the recognition module.

[0034] The map data is represented in the form of a two-dimensional array. Each element in the two-dimensional array corresponds to each pixel point, and the element value corresponding to each element is a color value. Exemplarily, the map data is a 5*4 two-dimensional array, and the map data of this 5*4 two-dimensional array is:

[0035]

[0036] Among them, the numerical values 0, 16, and 32 are the color values corresponding to the elements.

[0037] It can be understood that the number of elements included in the two-dimensional array is related to the area size of the cleaning area. The number of elements included in the two-dimensional array corresponding to the actual scenario is from 20,000 to 100,000.

[0038] In some embodiments, the step of generating at least one SVG vector path according to the color value corresponding to the element in the map data includes the steps of: grouping the elements with the same color value in the map data to obtain at least one SVG vector path.

[0039] Exemplarily, the map data is the 5*4 two-dimensional array provided above. The elements with the color value of 16 in the map data are grouped into one vector path, the elements with the color value of 32 in the map data are grouped into one vector path, and the elements with the color value of 0 in the map data are grouped into one vector path, that is, the elements with the same color value in the map data are grouped into one SVG vector path.

[0040] It can be understood that the number of SVG vector paths that can be generated corresponds to the number of colors included in the map data. For example, if the map data includes three colors, the mobile purifier can generate three SVG vector paths.

[0041] The SVG vector path includes SVG vector path data, that is, it can be known how to draw the SVG vector path according to the SVG vector path. That is to say, the SVG vector path is the drawing information of the elements with the same color value. When the mobile purifier draws the map according to the SVG vector path, the elements with the same color value can be drawn according to the drawing information corresponding to the SVG vector path. And since the map displayed on the subsequent display interface is drawn according to the SVG vector path (i.e., this map is a vector map), when the user zooms in on the map, the map will not be distorted.

[0042] In step 120, render according to at least one SVG vector path to obtain the map of the cleaning area.

[0043] When the mobile purifier draws a map of the cleaning area, it only needs to traverse the generated SVG vector paths, that is, draw the map according to the drawing information of elements with the same color value, without traversing all pixel points. For example, if the map data has only three colors, traversing the SVG vector paths corresponding to the three colors can obtain the map of the cleaning area. Obviously, compared with the prior art, the present application does not need to traverse elements without color (i.e., pixel points without color), so the storage space corresponding to the SVG vector paths is smaller.

[0044] Among them, the SVG vector path includes position information and color information. Among them, the position information indicates the drawing position. For example, the position information is to draw a straight line starting from element A and ending at element B. Another example is to draw a circle with element A as the center and radius r.

[0045] The color information is the filling color information after drawing according to the position information. For example, the color of the straight line drawn starting from element A and ending at element B (such as blue). Another example is the filling color of the circle drawn with element A as the center and radius r.

[0046] Exemplarily, the map data obtained by the recognition module is the 5*4 two-dimensional array provided above. According to the color values of the elements in the 5*4 two-dimensional array provided above, three SVG vector paths can be generated. The three SVG vector paths are respectively:

[0047] The code of SVG vector path A (the SVG vector path corresponding to the element with color value 0) is: "0": {color: "#00CBB8", "pathstr": "M619L1819"};

[0048] The code of SVG vector path B (the SVG vector path corresponding to the element with color value 16) is: "16": {color: "#E9F1FF", "pathstr": "M01L241M07L67M187L247M013L613M1813L2413M019L619M1819L2419M025L625L2425"};

[0049] The code of SVG vector path C (the SVG vector path corresponding to the element with color value 32) is: "32": {color: "#74A6F5", "pathstr": "M67L187M613L1813"}.

[0050] Among them, the position information of the SVG vector path A is to draw a straight line starting from the coordinate (6, 19) and ending at the coordinate (18, 19). The position information of the SVG vector path C is to draw a straight line starting from the coordinate (6, 7) and ending at the coordinate (18, 7), and to draw a straight line starting from the coordinate (6, 13) and ending at the coordinate (18, 13). The same applies to the SVG vector path B.

[0051] Among them, the color information of the SVG vector path is the color defined by the color parameter.

[0052] When the mobile purifier draws a map, it traverses the generated SVG vector paths to draw corresponding information according to the position information and color information of the SVG vector paths, so as to obtain the map of the cleaning area. More specifically, in some embodiments, the step of rendering according to at least one SVG vector path to obtain the map of the cleaning area includes the steps of: drawing the first vector path according to the position information and color information included in the first vector path to obtain the map of the cleaning area.

[0053] Among them, the first vector path is any vector path among at least one SVG vector path. The mobile purifier draws the map of the cleaning area according to the position information and color information of the generated SVG vector paths.

[0054] In some embodiments, the user can also control the operation of the mobile purifier through the display interface. Specifically, the method further includes the following steps:

[0055] (1) Respond to the user's cleaning adjustment operation on the mobile purifier to obtain the user's interaction information;

[0056] (2) Generate at least one interaction vector path according to the user's interaction information.

[0057] The user clicks on the display interface or inputs interaction information through the display interface to initiate a cleaning adjustment request to the mobile purifier. The mobile purifier responds to the user's cleaning adjustment operation, obtains the user's interaction information, and generates at least one interaction vector path according to the user's interaction information.

[0058] Among them, the interaction vector path indicates the drawing information of a type of interaction information. For example, the interaction information is the input of purification point A, that is, the interaction vector path is to establish a circle a with position A as the center and radius r, and fill the circle a with red.

[0059] The user can click the purification point setting function on the display interface to make the mobile purifier enter the purification point position input mode. The user then inputs the position of position A to set position A as the purification point, and the mobile purifier generates an interaction vector path according to the user's interaction.

[0060] In some embodiments, the user's interaction information includes at least one of the purification point location information and the restricted area location information.

[0061] Among them, the purification point location information is the location information of the purification point, that is, at which location in the cleaning area the user needs to move the purifier to work. For example, the user sets 5 purification points such as 1, 2, 3, 4, and 5 on the map. When the purifier moves to work, it will go to these 5 purification points in turn for purification treatment.

[0062] The restricted area location information is the location information enclosing the restricted area. For example, when the restricted area is a triangle, the restricted area location information is the location information of the three corners. Another example is that when the restricted area is a quadrilateral, the restricted area location information is the location information of the four corners. The restricted area formed according to the restricted area location information indicates the area where the purifier cannot move into.

[0063] In some embodiments, the purification point location information and the restricted area location information can be autonomously generated by the mobile purifier. For example, the mobile purifier sets the areas with fewer users or less object density as purification points and the areas with more users or greater object density as restricted areas according to the distribution of objects or users in the cleaning area obtained by the recognition module.

[0064] That is to say, the user's interaction information and map data are divided into different vector paths (SVG vector paths and interaction vector paths) and respectively drawn on the map of the cleaning area.

[0065] Further, in some embodiments, the step of rendering according to at least one SVG vector path to obtain the map of the cleaning area includes the steps of: rendering according to at least one vector path and at least one interaction vector path to obtain the map of the cleaning area.

[0066] That is, according to at least one vector path and at least one interaction vector path, the user's interaction information and map data are respectively drawn on the map of the cleaning area. For example, the purification points and restricted areas are divided into different interaction vector paths, and the elements with different color values in the map data are divided into different SVG vector paths. By traversing the generated interaction vector paths and SVG vector paths, the purification points, restricted areas, and walls can be drawn on the map. That is to say, the walls drawn according to the map data obtained by the recognition module, the purification points input by the user, and the restricted areas are respectively superimposed or merged to obtain the final map of the cleaning area.

[0067] In the actual use process, the user may need to adjust the interaction objects in the map. For example, adjust the location of the purification point. Another example is to adjust the location of the restricted area. Specifically, in some embodiments, the method further includes the following steps:

[0068] (1) Determine the target interaction object of the user;

[0069] (2) In response to the user's position adjustment operation on the target interaction object, determine the actual interaction position of the target interaction object after adjustment.

[0070] The target interaction object is any one of the interaction information of the user. For example, the target interaction object is one or more purification points, and for another example, the target interaction object is one or more restricted areas.

[0071] When the user needs to adjust the user's interaction information, the user may need to click on the target interaction object to be adjusted and perform corresponding operations. For example, adjusting the position information of the target interaction object, deleting the interaction object, or adding an interaction object.

[0072] Exemplarily, the user can click on one of the purification points and drag it to move the position information of the purification point after dragging the starting point of the purifier, with the actual interaction position adjusted by the starting purification point.

[0073] In some embodiments, the step of determining the target interaction object of the user includes the following steps:

[0074] (1) Determine the current interaction position of the user on the display interface;

[0075] (2) According to the current interaction position, the horizontal offset corresponding to the current interaction position, the vertical offset, and the current zoom ratio corresponding to the display interface, determine the actual interaction position of the user.

[0076] Wherein, the horizontal offset is the horizontal offset relative to the map, and the vertical offset is the vertical offset relative to the map.

[0077] Through the horizontal offset, vertical offset of the current interaction position, and the current zoom ratio corresponding to the display interface, calculate the coordinate information of the current interaction position on the map, that is, obtain the actual interaction position of the user interaction.

[0078] Exemplarily, assume that the current interaction position is (x1, y1), the horizontal offset of the current interaction position is x, the vertical offset of the current interaction position is y, and the current zoom ratio of the display interface is s. Then, according to the current interaction position, the horizontal offset corresponding to the current interaction position, the vertical offset, and the current zoom ratio corresponding to the display interface, the actual interaction position (x2, y2) is determined as:

[0079] x2 = (x1 - x) / s;

[0080] Y2 = (y1 - y) / s.

[0081] Further, the step of generating at least one interactive vector path according to the user's interaction information includes the step of updating at least one interactive vector path according to the adjusted actual interaction position.

[0082] For example, after the user drags the purification point, the mobile purifier updates the interactive vector path corresponding to the purification point according to the actual interaction position after the purification point is dragged, so as to draw the adjusted drawing information of the purification point according to the updated interactive vector path, so as to display the adjusted image of the purification point on the map.

[0083] In step 130, the map of the cleaning area is displayed on the display interface.

[0084] When the mobile purifier draws the map, it traverses the generated SVG vector paths, that is, draws the elements with different color values in the map respectively, so as to complete the drawing of the map of the cleaning area.

[0085] Exemplarily, please refer to Figure 2 , Figure 2 which is a schematic diagram of the effect of a map provided by an embodiment of the present application. As Figure 2 shown, the map includes the distribution information of purification points, restricted areas, and walls.

[0086] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another map drawing method provided by an embodiment of the present application. The map drawing method includes steps 210 to 230, wherein:

[0087] In step 210, the mobile purifier generates at least one SVG vector path according to the color value corresponding to the element in the map data.

[0088] Among them, the map data is the map information in the cleaning area (for example, the position information of the room wall, the position information of the bed, the distribution information of the room, etc.). In the embodiment of the present application, the map data is the position information of the wall in the cleaning area obtained by the recognition module.

[0089] The map data is represented in the form of a two-dimensional array. Each element in the two-dimensional array corresponds to each pixel point, and the element value corresponding to each element is a color value. Exemplarily, the map data is a 5*4 two-dimensional array, and the map data of the 5*4 two-dimensional array is:

[0090]

[0091] Among them, the numerical values 0, 16, and 32 are the color values corresponding to the elements.

[0092] It can be understood that the number of elements included in the two-dimensional array is related to the area size of the cleaning area. The number of elements included in the two-dimensional array corresponding to the actual scenario is 20,000 to 100,000.

[0093] In some embodiments, the step of moving the purifier generates at least one SVG vector path according to the color values corresponding to the elements in the map data, including the steps of: the moving purifier groups the elements with the same color value in the map data into one group to obtain at least one SVG vector path.

[0094] It can be understood that several colors are included in the map data, and the corresponding number of SVG vector paths can be generated. For example, if three colors are included in the map data, the moving purifier can generate three SVG vector paths.

[0095] That is to say, the SVG vector path is the drawing information of the elements with the same color value. When the moving purifier draws the map according to the SVG vector path, the elements with the same color value can be drawn according to the drawing information corresponding to the SVG vector path. For a more detailed description, reference can be made to the above embodiments.

[0096] In step 220, the moving purifier sends at least one SVG vector path to the mobile device.

[0097] The moving purifier sends the generated SVG vector path to the mobile device. Correspondingly, the mobile device receives the SVG vector path sent by the moving purifier. The mobile device stores the SVG vector path generated by the moving purifier.

[0098] In step 230, the mobile device renders according to at least one SVG vector path to obtain a map of the cleaning area.

[0099] Wherein, the mobile device is a device such as a mobile phone or a tablet.

[0100] When the mobile device draws the map of the cleaning area, the mobile device traverses the SVG vector path, that is, the mobile device draws the map according to the drawing information of the elements with the same color value without traversing all pixel points. For example, if there are only three colors in the map data, traversing the SVG vector paths corresponding to the three colors can obtain the map of the cleaning area. Obviously, compared with the prior art, the present application can also greatly improve the drawing efficiency. For example, for a map with 100,000 pixel points, in the prior art, it is necessary to traverse and draw 100,000 pixel points to display the map of the cleaning area. In the present application, 100,000 pixel points may only contain several colors, that is, the drawing of several vector paths. Therefore, the present application can greatly improve the efficiency of drawing the map.

[0101] Wherein, the SVG vector path includes position information and color information. The color information is the filled color information after being drawn according to the position information.

[0102] Exemplarily, the map data obtained by the recognition module is the 5*4 two-dimensional array provided above. The mobile purifier can generate three SVG vector paths according to the color values of the elements in the 5*4 two-dimensional array provided above. The three SVG vector paths are respectively:

[0103] The code of SVG vector path A (the SVG vector path corresponding to the element with a color value of 0) is: "0": {color: "#00CBB8", "pathstr": "M619L1819"};

[0104] The code of SVG vector path B (the SVG vector path corresponding to the element with a color value of 16) is: "16": {color: "#E9F1FF", "pathstr": "M01L241M07L67M187L247M013L613M1813L2413M019L619M1819L2419M025L625L2425"};

[0105] The code of SVG vector path C (the SVG vector path corresponding to the element with a color value of 32) is: "32": {color: "#74A6F5", "pathstr": "M67L187M613L1813"}.

[0106] Among them, the position information of SVG vector path A is to draw a straight line starting from the coordinate (6, 19) and ending at the coordinate (18, 19). The position information of SVG vector path C is to draw a straight line starting from the coordinate (6, 7) and ending at the coordinate (18, 7), and a straight line starting from the coordinate (6, 13) and ending at the coordinate (18, 13). The same applies to SVG vector path B.

[0107] Among them, the color information of the SVG vector path is the color defined by the color parameter. The number of colors in the map indicates the corresponding number of SVG vector paths generated. Exemplarily, please refer to Figure 4 , Figure 4 which is the schematic diagram of the effect of another map provided by the embodiment of the present application. As Figure 4 shown, the mobile purifier generates three SVG vector paths (there are three colors corresponding in the map, and two of the colors are relatively close).

[0108] When the mobile device draws the map, the generated SVG vector path is traversed to draw corresponding information according to the position information and color information of the SVG vector path, thereby obtaining a map of the clean area. More specifically, in some embodiments, the step of rendering the mobile device according to at least one SVG vector path to obtain a map of the clean area includes the steps of: the mobile device draws the first vector path according to the position information and color information included in the first vector path to obtain a map of the clean area.

[0109] The first vector path is any vector path in at least one SVG vector path. The mobile device draws a map of the cleaning area according to the position information and color information of the generated SVG vector path.

[0110] In order to improve the user interaction experience and fun of the mobile device, in some embodiments, the method further includes the following steps:

[0111] (1) The mobile device obtains user interaction information in response to the user's cleaning adjustment operation on the mobile purifier;

[0112] (2) The mobile device generates at least one interaction vector path based on the user's interaction information.

[0113] The user initiates a cleaning adjustment request through a mobile device, and the mobile device responds to the user's cleaning adjustment operation, obtains the user's interaction information, and generates at least one interaction vector path according to the user's interaction information.

[0114] The interactive vector path indicates a type of interactive information drawing information. For example, the interactive information is the input of the purification point A, that is, the interactive vector path is to establish a circle a with position A as the center and radius r, and fill the circle a with red.

[0115] In some implementations, the user's interactive information includes at least one of purification point location information and restricted area location information.

[0116] Among them, the purification point location information is the location information of the purification point, that is, the position in the cleaning area where the user needs to move the purifier to work. The restricted area location information is the location information of the restricted area. For example, when the restricted area is a triangle, the restricted area location information is the location information of the three corners. For another example, when the restricted area is a quadrilateral, the restricted area location information is the location information of the four corners. The restricted area formed according to the restricted area location information indicates the area that the mobile purifier cannot move into. By the user independently setting the purification point location information or the restricted area location information, the user interaction experience and fun of the mobile device can be increased.

[0117] In some embodiments, the purification point location information and the restricted area location information can be autonomously generated by the mobile purifier. For example, the mobile purifier sets an area with fewer users or a lower density of objects as a purification point and an area with more users or a higher density of objects as a restricted area according to the distribution of objects or users in the cleaning area obtained by the recognition module.

[0118] That is to say, the mobile device divides the user interaction information and the map data into different vector paths (SVG vector paths and interaction vector paths) and respectively draws them on the map of the cleaning area.

[0119] Further, in some embodiments, the step of the mobile device rendering according to at least one SVG vector path to obtain the map of the cleaning area includes the steps of: the mobile device rendering according to at least one vector path and at least one interaction vector path to obtain the map of the cleaning area.

[0120] That is, the mobile device draws the user interaction information and the map data on the map of the cleaning area according to at least one vector path and at least one interaction vector path respectively.

[0121] In the actual use process, the user may need to adjust the interaction objects in the map. For example, adjusting the position of the purification point. Or for another example, adjusting the position of the restricted area. Specifically, in some embodiments, the method further includes the following steps:

[0122] (1) The mobile device determines the user's target interaction object;

[0123] (2) The mobile device determines the actual interaction position of the target interaction object after adjustment in response to the user's position adjustment operation on the target interaction object.

[0124] The target interaction object is any one of the user interaction information. For example, the target interaction object is one or more of the purification points, or for another example, the target interaction object is one or more of the restricted areas.

[0125] When the user needs to adjust the user interaction information, click on the target interaction object and perform the corresponding operation. For example, adjusting the position information of the target interaction object, deleting the interaction object, or adding an interaction object.

[0126] Exemplarily, the user can click on one of the purification points and drag it, and the mobile device determines the position information of the purification point after dragging to determine the actual interaction position of the purification point after adjustment.

[0127] The user can autonomously adjust the purification point location information or the restricted area location information, thereby increasing the fun of user interaction.

[0128] In some embodiments, the step of the mobile device determining the user's target interaction object includes the following steps:

[0129] (1) The mobile device determines the current interaction position of the user on the display interface;

[0130] (2) The mobile device determines the actual interaction position of the user according to the current interaction position, the horizontal offset corresponding to the current interaction position, the vertical offset, and the current zoom ratio corresponding to the display interface.

[0131] Among them, the horizontal offset is the horizontal offset relative to the map, and the vertical offset is the vertical offset relative to the map.

[0132] The mobile device calculates the coordinate information of the current interaction position on the map through the horizontal offset, vertical offset of the current interaction position, and the current zoom ratio corresponding to the display interface, that is, obtains the actual interaction position of the user interaction.

[0133] Exemplarily, assume that the current interaction position is (x1, y1), the horizontal offset of the current interaction position is x, the vertical offset of the current interaction position is y, and the current zoom ratio of the display interface is s. Then, according to the current interaction position, the horizontal offset corresponding to the current interaction position, the vertical offset, and the current zoom ratio corresponding to the display interface, the actual interaction position (x2, y2) is determined as:

[0134] x2 = (x1 - x) / s;

[0135] Y2 = (y1 - y) / s.

[0136] Further, the step of the mobile device generating at least one interaction vector path according to the user's interaction information includes the step: The mobile device updates at least one interaction vector path according to the adjusted actual interaction position.

[0137] For example, after the user drags the purification point, the mobile device updates the interaction vector path corresponding to the purification point according to the actual interaction position after the purification point is dragged, so as to draw the adjusted drawing information of the purification point according to the updated interaction vector path, so as to display the adjusted image of the purification point on the map.

[0138] In step 240, the mobile device displays the map of the cleaning area on the display interface.

[0139] When the mobile device draws the map, it traverses the generated SVG vector paths, that is, draws the elements with different color values in the map respectively, so as to complete the drawing of the map of the cleaning area.

[0140] Please refer to Figure 5 , Figure 5It is a schematic flowchart of still another map drawing method provided by an embodiment of the present application. This map drawing method is applied to a mobile device, and this map drawing method includes steps 310 to 330, where:

[0141] In step 310, the mobile device acquires at least one SVG vector path sent by the mobile purifier.

[0142] During the process of the mobile purifier moving within the cleaning area, the recognition module acquires the map data corresponding to the cleaning area, and groups the elements with the same color value in the map data to obtain at least one SVG vector path. For a more detailed description, reference can be made to the above description.

[0143] Among them, the mobile device is a device such as a mobile phone or a tablet. The mobile purifier sends the generated SVG vector path to the mobile device. The mobile device stores the SVG vector path generated by the mobile purifier, traverses the SVG vector path, draws and displays the map of the cleaning area, so that the user can view the distribution information of the objects in the cleaning area (for example, the distribution information of the walls) through the mobile device.

[0144] In step 320, the mobile device renders according to at least one SVG vector path to obtain the map of the cleaning area.

[0145] When the mobile device draws the map of the cleaning area, it only needs to traverse the generated SVG vector path, that is, draw the map according to the drawing information of the elements with the same color value, without traversing all pixel points. For example, if the map data has only three colors, traversing the SVG vector paths corresponding to the three colors can obtain the map of the cleaning area. Obviously, compared with the prior art, the present application does not need to traverse the elements without color (that is, the pixel points without color), so the storage space corresponding to the SVG vector path is smaller.

[0146] Among them, the SVG vector path includes position information and color information. The position information indicates the drawing position. The color information is the filling color information after drawing according to the position information.

[0147] When the mobile device draws the map, it traverses the generated SVG vector path to draw the corresponding information according to the position information and color information of the SVG vector path, so as to obtain the map of the cleaning area.

[0148] In step 330, the map of the cleaning area is displayed on the display interface of the mobile device.

[0149] When the mobile purifier draws the map, it traverses the generated SVG vector path, that is, draws the elements with different color values in the map respectively, so as to complete the drawing of the map of the cleaning area.

[0150] For a more detailed description, reference can be made to the above description.

[0151] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a map drawing device provided by an embodiment of the present application, applied to a mobile purifier. The mobile purifier includes a display interface and an identification module for obtaining map data. The map drawing device 400 includes: a generation module 410, a rendering module 420, and a display module 430. Specifically:

[0152] The generation module 410 is configured to generate at least one SVG vector path according to the color values corresponding to the elements in the map data;

[0153] The rendering module 420 is configured to render according to at least one SVG vector path to obtain a map of the cleaning area;

[0154] The display module 430 is configured to display the map of the cleaning area on the display interface.

[0155] In some embodiments, the generation module 410 includes a generation unit, where:

[0156] The generation unit is configured to group the elements with the same color value in the map data to obtain at least one SVG vector path.

[0157] In some embodiments, at least one SVG vector path includes position information and color information. The rendering module 420 includes a first rendering unit, where:

[0158] The first rendering unit is configured to draw a first vector path according to the position information and color information included in the first vector path to obtain a map of the cleaning area, and the first vector path is any one of the at least one SVG vector path.

[0159] In some embodiments, the map drawing device 400 further includes an acquisition module and a first generation module, where:

[0160] The acquisition module is configured to acquire user interaction information in response to a cleaning adjustment operation of the user on the mobile purifier;

[0161] The first generation module is configured to generate at least one interaction vector path according to the user interaction information.

[0162] In some embodiments, the rendering module 420 includes a second rendering unit, where:

[0163] The second rendering unit is configured to render according to at least one SVG vector path and at least one interaction vector path to obtain a map of the cleaning area.

[0164] In some embodiments, the map drawing device 400 further includes, where:

[0165] The first determination module is used to determine the target interaction object of the user; the target interaction object is any one of the interaction information of the user's interaction information.

[0166] The second determination module is used to determine the actual interaction position of the target interaction object after adjustment in response to the user's position adjustment operation on the target interaction object.

[0167] In some embodiments, the first generation module includes a first generation unit, where:

[0168] The first generation unit is used to update at least one interaction vector path according to the adjusted actual interaction position.

[0169] In some embodiments, determining the actual interaction position of the target interaction object after adjustment in the second determination module includes a first determination unit and a second determination unit, where:

[0170] The first determination unit is used to determine the current interaction position of the user on the display interface;

[0171] The second determination unit is used to determine the actual interaction position of the user according to the current interaction position, the horizontal offset corresponding to the current interaction position, the vertical offset, and the current zoom ratio corresponding to the display interface.

[0172] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0173] In several embodiments provided in the present application, the coupling, direct coupling, or communication connection between the modules shown or discussed with each other may be through some interfaces, and the indirect coupling or communication connection of the devices or modules may be in electrical, mechanical, or other forms.

[0174] In addition, in each embodiment of the present application, the various functional modules may be integrated in one processing module, or each module may exist physically alone, or two or more modules may be integrated in one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0175] Please refer to Figure 7 , Figure 7It is a schematic structural diagram of a mobile purifier provided by an embodiment of the present application. The mobile purifier 500 in the present application may include one or more of the following components: a processor 510, a memory 520, and one or more application programs. One or more application programs may be stored in the memory 520 and configured to be executed by one or more processors 510. One or more programs are configured to execute the cooking control method described in the foregoing method embodiments.

[0176] The processor 510 may include one or more processing cores. The processor 510 connects various parts within the entire mobile purifier 500 through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 520, and by calling data stored in the memory 520, it executes various functions of the mobile purifier 500 and processes data. Optionally, the processor 510 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 510 may integrate one or several combinations of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 510 and may be implemented separately through a communication chip.

[0177] The memory 520 may include random access memory (RAM) and may also include read-only memory. The memory 520 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 520 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function, instructions for implementing the following method embodiments, etc. The data storage area may also store data created during the use of the mobile purifier 500.

[0178] Please refer to Figure 8 , Figure 8It is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable medium 600, and the program code can be called by a processor to execute the cooking control method described in the above method embodiment.

[0179] The computer-readable storage medium 600 can be an electronic memory such as a flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has a storage space for the program code 810 that executes any method step in the above method. These program codes can be read out from or written into one or more computer program devices. The program code 610 can be compressed in an appropriate form, for example.

[0180] An embodiment of the present application provides a map drawing method, device, mobile purifier, and storage medium. The map drawing method is applied to a mobile purifier, and the mobile purifier includes a display interface and an identification module for obtaining map data. The method includes: generating at least one SVG vector path according to the color value corresponding to the element in the map data; rendering according to the at least one SVG vector path to obtain a map of the cleaning area; and displaying the map of the cleaning area on the display interface. Thus, when the mobile purifier draws a map, it only needs to traverse the generated SVG vector path to draw the map, effectively reducing the storage space required for drawing the map.

[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for map drawing, characterized in that, Applied to a mobile purifier, the mobile purifier includes a display interface and an identification module for obtaining map data, and the method includes: Generating at least one SVG vector path according to the color values corresponding to the elements in the map data; Rendering according to the at least one SVG vector path to obtain a map of the cleaning area; Displaying the map of the cleaning area on the display interface.

2. The map drawing method according to claim 1, wherein The generating at least one SVG vector path according to the color values corresponding to the elements in the map data includes: Grouping the elements with the same color value in the map data to obtain the at least one SVG vector path.

3. The map drawing method according to claim 1, characterized in that, The at least one SVG vector path includes position information and color information, and the rendering according to the at least one SVG vector path to obtain a map of the cleaning area includes: Drawing the first vector path according to the position information and the color information included in the first vector path to obtain the map of the cleaning area, where the first vector path is any one of the at least one SVG vector path.

4. The map drawing method according to claim 1, wherein The method further includes: Responding to a cleaning adjustment operation of the user on the mobile purifier to obtain the user's interaction information; Generating at least one interaction vector path according to the user's interaction information; The rendering according to the at least one SVG vector path to obtain a map of the cleaning area includes: Rendering according to the at least one SVG vector path and the at least one interaction vector path to obtain the map of the cleaning area.

5. The map drawing method according to claim 4, wherein, The user's interaction information at least includes purification point position information and / or restricted area position information.

6. The map drawing method according to claim 4, characterized in that The method further includes: Determining the user's target interaction object; the target interaction object is any one of the user's interaction information; Responding to a position adjustment operation of the user on the target interaction object to determine the actual interaction position after adjustment of the target interaction object; The generating at least one interaction vector path according to the user's interaction information includes: Updating the at least one interaction vector path according to the adjusted actual interaction position.

7. The method for drawing a map according to claim 6, wherein, The determining the actual interaction position after adjustment of the target interaction object includes: Determining the current interaction position of the user on the display interface; Determining the user's actual interaction position according to the current interaction position, the horizontal offset corresponding to the current interaction position, the vertical offset, and the current zoom ratio corresponding to the display interface.

8. A method for map drawing, characterized in that, Applied to a mobile device, the method includes: Obtaining at least one SVG vector path sent by the mobile purifier; Rendering according to the at least one SVG vector path to obtain a map of the cleaning area; Displaying the map of the cleaning area on the display interface of the mobile device.

9. A method for map drawing, characterized in that, The method includes: The mobile purifier generates at least one SVG vector path according to the color values corresponding to the elements in the map data and sends the at least one SVG vector path to the mobile device; The mobile device renders according to the at least one SVG vector path to obtain a map of the cleaning area; The mobile device displays the map of the cleaning area on the display interface.

10. A map drawing device, characterized in that, Applied to a mobile purifier, the mobile purifier includes a display interface and an identification module for obtaining map data, and the map drawing device includes: A generation module for generating at least one SVG vector path according to the color values corresponding to the elements in the map data; A rendering module for rendering according to the at least one SVG vector path to obtain a map of the cleaning area; A display module for displaying the map of the cleaning area on the display interface.

11. A mobile purifier, characterized in that, Comprising: One or more processors; A memory; One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors to perform the map drawing method according to any one of claims 1-7 and claim 8.

12. A computer-readable storage medium, characterized in that, Program code is stored in the computer-readable storage medium, and the program code can be called by the processor to execute the map drawing method according to any one of claims 1-7 and claim 8.