Map data processing method and device, and electronic equipment
Patent Information
- Application Number
- CN202510302966.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2026-09-22
AI Technical Summary
并且,后续传输的实时数据将会重复上面操作
[0120]本申请实施例提供的地图数据的处理方法,可以获取扫地机传输的二维地图数据,随后,对所述二维地图数据进行压缩处理,以得到二维压缩数据,之后,将所述二维压缩数据转换为三维地图数据,然后,渲染所述三维地图数据,以显示三维地图模型,其中,所述三维地图模型包括所述三维地图数据表示的地图对象的对象模型。由此,可以直接获取扫地机传输的二维地图数据,并通过将压缩后的二维地图数据(也即二维压缩数据)转换为三维地图数据,显示相应的三维地图模型。这样,扫地机只需具备获得及传输二维地图数据的功能,而无需要求扫地机具有其他数据处理能力,因而可以降低对扫地机处理能力的要求,进而可以提高本方案对不同扫地机的适用性。此外,可以利用扫地机获得的二维地图数据显示三维地图模型,提高了显示扫地机的地图的丰富性。另外,通过对二维数据进行压缩处理,可以提高三维地图模型的显示效率。
Smart Images

Figure CN122799014A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sweeping machine technology, and in particular to a method, apparatus, and electronic device for processing map data. Background Technology
[0002] In related technologies, during the cleaning process, the robot vacuum cleaner continuously transmits real-time full map data to the application (APP). The APP can typically parse and categorize the map data, and then use this data to create a map. The specific drawing process is as follows: First, based on the full map data transmitted by the robot vacuum cleaner, a map transformation coordinate system is created (the APP's coordinate origin is different from the robot vacuum cleaner's coordinate origin, so conversion is necessary). Next, a bitmap is initialized based on the transmitted map size, and each pixel in the bitmap is set to transparent. Then, based on the set of coordinate points of different types of elements on the organized map, the corresponding pixel positions on the bitmap are found and filled with the corresponding color. After all data is filled, a robot vacuum cleaner map image is generated by overlaying the data, and the APP then displays this image. Furthermore, subsequent real-time data transmissions will repeat the above operations.
[0003] However, the above scheme can only display two-dimensional bitmap images, resulting in a low richness of the map displayed for the robot vacuum cleaner. Summary of the Invention
[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, embodiments of this application provide a method, apparatus and electronic device for processing map data.
[0005] In a first aspect, embodiments of this application provide a method for processing map data, the method comprising:
[0006] Acquire the 2D map data transmitted by the robot vacuum cleaner;
[0007] The two-dimensional map data is compressed to obtain two-dimensional compressed data;
[0008] Convert the two-dimensional compressed data into three-dimensional map data;
[0009] The 3D map data is rendered to display a 3D map model, wherein the 3D map model includes an object model of the map object represented by the 3D map data.
[0010] In one possible implementation, converting the two-dimensional compressed data into three-dimensional map data includes:
[0011] Determine the target height of the map object;
[0012] Based on the two-dimensional compressed data and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
[0013] In one possible implementation, the two-dimensional compressed data is two-dimensional contour data, which represents the contour of the cleaning space of the sweeper; and
[0014] The process of converting the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data and the target height includes:
[0015] Determine the bottom surface of the cleaning space;
[0016] Based on the two-dimensional compressed data, the bottom surface, and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
[0017] In one possible implementation, converting the two-dimensional compressed data into three-dimensional map data includes:
[0018] Obtain the object model of the map object, and the orientation information of the object model;
[0019] Based on the two-dimensional compressed data, the object model, and the orientation information, the two-dimensional compressed data is converted into three-dimensional map data.
[0020] In one possible implementation, the two-dimensional compressed data is two-dimensional timed task data, which indicates the time for performing the cleaning task; and
[0021] The process of converting the two-dimensional compressed data into three-dimensional map data includes:
[0022] Determine the position information of the time indicated by the timed task data in the preset time axis;
[0023] Based on the two-dimensional compressed data and the location information, the two-dimensional compressed data is converted into three-dimensional map data.
[0024] In one possible implementation, the 3D map model includes a timeline model of the preset timeline, the timeline model including a marker model representing the time indicated by the timed task data; and
[0025] After displaying the 3D map model, the method further includes:
[0026] In response to a preset operation for the marking model, the task information of the cleaning task corresponding to the marking model is displayed.
[0027] In one possible implementation, the 3D map model includes a timeline model of the preset timeline, the timeline model including a marker model representing the time indicated by the timed task data; and
[0028] The displayed 3D map model includes:
[0029] Obtain target status information, wherein the target status information includes at least one of the following: the execution status of the cleaning task and the current time;
[0030] Based on the target state information, determine the display method of the marking model;
[0031] The marked model is displayed in accordance with the described display method.
[0032] In one possible implementation, the two-dimensional compressed data is two-dimensional cleaning pattern data, and the cleaning data model represents the cleaning pattern of the sweeper; and
[0033] The process of converting the two-dimensional compressed data into three-dimensional map data includes:
[0034] Determine the cleaning object to be cleaned by the cleaning mode indication represented by the cleaning mode data, and a first identifier representing the cleaning mode;
[0035] Determine the three-dimensional model of the object to be cleaned;
[0036] Based on the first identifier and the three-dimensional model, the two-dimensional compressed data is converted into three-dimensional map data.
[0037] In one possible implementation, acquiring the two-dimensional map data transmitted by the robot vacuum cleaner includes:
[0038] Obtain a map data set, wherein the map data set represents the full map data transmitted by the robot vacuum cleaner this time, and the map data in the map data set is two-dimensional data;
[0039] Extract a subset of map data from the map data set, wherein the subset of map data is incremental data of the full map data relative to the historical data set, and the historical data in the historical data set represents: map data that has been transmitted to the rendering unit;
[0040] Each map data in the subset of map data is identified as the two-dimensional map data collected by the sweeping machine.
[0041] In one possible implementation, extracting a subset of map data from the map data set includes:
[0042] Retrieve a pre-stored collection of historical data;
[0043] For each target map data in the map data set, determine whether the target map data is contained in the historical data set. If the target map data is not contained in the historical data set, add the target map data to the map data subset and update the historical data set based on the target map data.
[0044] In one possible implementation, determining whether the historical data set contains the target map data includes:
[0045] Determine the second identifier corresponding to the target map data;
[0046] Determine whether the historical data set contains target historical data with the second identifier to obtain a determination result;
[0047] Based on the determination result, it is determined whether the target map data is included in the historical data set.
[0048] In one possible implementation, determining whether the target map data is included in the historical data set based on the determination result includes:
[0049] If the determination result indicates that the historical data set contains the target historical data, determine whether the target historical data is the same as the target map data;
[0050] If the target historical data is the same as the target map data, it is determined that the target map data is included in the historical data set;
[0051] If the target historical data is different from the target map data, it is determined that the target map data is not included in the historical data set.
[0052] In one possible implementation, the number of the three-dimensional map data is multiple; and
[0053] Rendering the 3D map data includes:
[0054] Determine the rendering order of multiple 3D map data;
[0055] Multiple 3D map data are rendered sequentially according to the rendering order.
[0056] In one possible implementation, after extracting a subset of map data from the map dataset, the method further includes:
[0057] Determine the operating system of the target device used to render the 3D map data;
[0058] Instantiate the bridge object corresponding to the operating system;
[0059] The map data subset is transmitted to the rendering unit via the bridging object.
[0060] Secondly, embodiments of this application provide a map data processing apparatus, the apparatus comprising:
[0061] The acquisition unit is used to acquire the two-dimensional map data transmitted by the sweeping robot;
[0062] A compression unit is used to compress the two-dimensional map data to obtain two-dimensional compressed data;
[0063] A conversion unit is used to convert the two-dimensional compressed data into three-dimensional map data;
[0064] A rendering unit is used to render the three-dimensional map data to display a three-dimensional map model, wherein the three-dimensional map model includes an object model of the map object represented by the three-dimensional map data.
[0065] In one possible implementation, converting the two-dimensional compressed data into three-dimensional map data includes:
[0066] Determine the target height of the map object;
[0067] Based on the two-dimensional compressed data and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
[0068] In one possible implementation, the two-dimensional compressed data is two-dimensional contour data, which represents the contour of the cleaning space of the sweeper; and
[0069] The process of converting the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data and the target height includes:
[0070] Determine the bottom surface of the cleaning space;
[0071] Based on the two-dimensional compressed data, the bottom surface, and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
[0072] In one possible implementation, converting the two-dimensional compressed data into three-dimensional map data includes:
[0073] Obtain the object model of the map object, and the orientation information of the object model;
[0074] Based on the two-dimensional compressed data, the object model, and the orientation information, the two-dimensional compressed data is converted into three-dimensional map data.
[0075] In one possible implementation, the two-dimensional compressed data is two-dimensional timed task data, which indicates the time for performing the cleaning task; and
[0076] The process of converting the two-dimensional compressed data into three-dimensional map data includes:
[0077] Determine the position information of the time indicated by the timed task data in the preset time axis;
[0078] Based on the two-dimensional compressed data and the location information, the two-dimensional compressed data is converted into three-dimensional map data.
[0079] In one possible implementation, the 3D map model includes a timeline model of the preset timeline, the timeline model including a marker model representing the time indicated by the timed task data; and
[0080] After displaying the 3D map model, the device further includes:
[0081] The display unit is used to display the task information of the cleaning task corresponding to the marking model in response to a preset operation on the marking model.
[0082] In one possible implementation, the 3D map model includes a timeline model of the preset timeline, the timeline model including a marker model representing the time indicated by the timed task data; and
[0083] The displayed 3D map model includes:
[0084] Obtain target status information, wherein the target status information includes at least one of the following: the execution status of the cleaning task and the current time;
[0085] Based on the target state information, determine the display method of the marking model;
[0086] The marked model is displayed in accordance with the described display method.
[0087] In one possible implementation, the two-dimensional compressed data is two-dimensional cleaning pattern data, and the cleaning data model represents the cleaning pattern of the sweeper; and
[0088] The process of converting the two-dimensional compressed data into three-dimensional map data includes:
[0089] Determine the cleaning object to be cleaned by the cleaning mode indication represented by the cleaning mode data, and a first identifier representing the cleaning mode;
[0090] Determine the three-dimensional model of the object to be cleaned;
[0091] Based on the first identifier and the three-dimensional model, the two-dimensional compressed data is converted into three-dimensional map data.
[0092] In one possible implementation, acquiring the two-dimensional map data transmitted by the robot vacuum cleaner includes:
[0093] Obtain a map data set, wherein the map data set represents the full map data transmitted by the robot vacuum cleaner this time, and the map data in the map data set is two-dimensional data;
[0094] Extract a subset of map data from the map data set, wherein the subset of map data is incremental data of the full map data relative to the historical data set, and the historical data in the historical data set represents: map data that has been transmitted to the rendering unit;
[0095] Each map data in the subset of map data is identified as the two-dimensional map data collected by the sweeping machine.
[0096] In one possible implementation, extracting a subset of map data from the map data set includes:
[0097] Retrieve a pre-stored collection of historical data;
[0098] For each target map data in the map data set, determine whether the target map data is contained in the historical data set. If the target map data is not contained in the historical data set, add the target map data to the map data subset and update the historical data set based on the target map data.
[0099] In one possible implementation, determining whether the historical data set contains the target map data includes:
[0100] Determine the second identifier corresponding to the target map data;
[0101] Determine whether the historical data set contains target historical data with the second identifier to obtain a determination result;
[0102] Based on the determination result, it is determined whether the target map data is included in the historical data set.
[0103] In one possible implementation, determining whether the target map data is included in the historical data set based on the determination result includes:
[0104] If the determination result indicates that the historical data set contains the target historical data, determine whether the target historical data is the same as the target map data;
[0105] If the target historical data is the same as the target map data, it is determined that the target map data is included in the historical data set;
[0106] If the target historical data is different from the target map data, it is determined that the target map data is not included in the historical data set.
[0107] In one possible implementation, the number of the three-dimensional map data is multiple; and
[0108] Rendering the 3D map data includes:
[0109] Determine the rendering order of multiple 3D map data;
[0110] Multiple 3D map data are rendered sequentially according to the rendering order.
[0111] In one possible implementation, after extracting a subset of map data from the map dataset, the apparatus further includes:
[0112] A determining unit is configured to determine the operating system of the target device used to render the three-dimensional map data;
[0113] An instance unit is used to instantiate the bridge object corresponding to the operating system;
[0114] A transmission unit is used to transmit the subset of map data to the rendering unit through the bridging object.
[0115] Thirdly, embodiments of this application provide an electronic device, including:
[0116] Memory, used to store computer programs;
[0117] A processor is configured to execute a computer program stored in the memory, and when the computer program is executed, to implement the method of any embodiment of the map data processing method of the first aspect of this application.
[0118] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the method of any embodiment of the map data processing method of the first aspect described above.
[0119] Fifthly, embodiments of this application provide a computer program product comprising computer-readable code that, when executed on a device, causes a processor in the device to implement the method of any embodiment of the map data processing method of the first aspect described above.
[0120] The map data processing method provided in this application embodiment can acquire two-dimensional map data transmitted by a robot vacuum cleaner, then compress the two-dimensional map data to obtain two-dimensional compressed data, then convert the two-dimensional compressed data into three-dimensional map data, and finally render the three-dimensional map data to display a three-dimensional map model. The three-dimensional map model includes an object model of the map objects represented by the three-dimensional map data. Therefore, two-dimensional map data transmitted by the robot vacuum cleaner can be directly acquired, and the compressed two-dimensional map data (i.e., two-dimensional compressed data) can be converted into three-dimensional map data to display the corresponding three-dimensional map model. In this way, the robot vacuum cleaner only needs to have the function of acquiring and transmitting two-dimensional map data, without requiring other data processing capabilities, thus reducing the requirements on the robot vacuum cleaner's processing power and improving the applicability of this solution to different robot vacuum cleaners. Furthermore, the two-dimensional map data obtained by the robot vacuum cleaner can be used to display a three-dimensional map model, increasing the richness of the map displayed by the robot vacuum cleaner. In addition, by compressing the two-dimensional data, the display efficiency of the three-dimensional map model can be improved. Attached Figure Description
[0121] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0122] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0123] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0124] Figure 1 A flowchart illustrating a map data processing method provided in an embodiment of this application;
[0125] Figure 2 A flowchart illustrating another map data processing method provided in an embodiment of this application;
[0126] Figure 3A A flowchart illustrating another map data processing method provided in this application embodiment;
[0127] Figure 3B A timing diagram of a map data processing method provided in an embodiment of this application;
[0128] Figure 3C A schematic diagram of a three-dimensional map model for a map data processing method provided in an embodiment of this application;
[0129] Figure 4 This is a schematic diagram of the structure of a map data processing device provided in an embodiment of this application;
[0130] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0131] Various exemplary embodiments of this application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this application.
[0132] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of this application are only used to distinguish different steps, devices or modules, and do not represent any specific technical meaning, nor do they indicate the logical order between them.
[0133] It should also be understood that in this embodiment, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.
[0134] It should also be understood that any component, data or structure mentioned in the embodiments of this application can generally be understood as one or more unless explicitly defined or given contrary guidance in the context.
[0135] Furthermore, the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects have an "or" relationship.
[0136] It should also be understood that the description of the various embodiments in this application emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0137] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this application or its application or use.
[0138] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0139] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0140] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. To facilitate understanding of the embodiments of this application, the application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0141] To address the technical problem of low richness in the maps displayed for sweeping machines in the prior art, this application provides a map data processing method, apparatus, and electronic device, which can improve the richness of the maps displayed for sweeping machines.
[0142] Figure 1 This is a flowchart illustrating a map data processing method provided in an embodiment of this application. This method can be applied to one or more electronic devices (e.g., target devices), such as smartphones, laptops, desktop computers, portable computers, and servers. Furthermore, the execution entity of this method can be hardware or software. When the execution entity is hardware, it can be one or more of the aforementioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the execution entity is software, this method can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are imposed here.
[0143] like Figure 1 As shown, the method specifically includes:
[0144] Step 101: Obtain the two-dimensional map data transmitted by the robot vacuum cleaner.
[0145] In this embodiment, the sweeping machine, also known as a robotic sweeping machine, is an intelligent cleaning device mainly used to automatically clean dust, hair, debris and other garbage from indoor floors.
[0146] Here, the robot vacuum cleaner can collect two-dimensional map data according to a certain strategy, and then transmit the two-dimensional map data it collects each time to the execution subject of this method.
[0147] For example, a robotic vacuum cleaner can periodically collect and transmit two-dimensional map data, or it can collect and transmit two-dimensional map data under preset conditions. For example, the preset conditions could be that the amount of two-dimensional map data collected by the robotic vacuum cleaner is greater than or equal to a preset data volume threshold.
[0148] Two-dimensional map data can be used to display planar information. For example, by rendering two-dimensional map data, map objects can be projected onto a two-dimensional plane. As an example, two-dimensional map data can represent any of the following: coordinate information, topological relationships, attribute information, etc.
[0149] The coordinate information mentioned above can be data in a Cartesian coordinate system, including values along the x and y axes. For example, in a two-dimensional map of a room, the position of each point can be represented by (x, y) coordinates. The topological relationships mentioned above can represent the connection methods and adjacency relationships between elements in the cleaning space (such as rooms, corridors, doors, etc.). The attribute information mentioned above can include the floor type (such as wood flooring, tile) and area type (such as bedroom, kitchen) of the cleaning space.
[0150] Two-dimensional map data can include the following two-dimensional map data: wall data (e.g., virtual wall data, physical wall data), room outline data, obstacle data (e.g., furniture data), path data, base station data, robot vacuum cleaner data, no-go zone data (e.g., internal obstacle area data, no-mopping zone data), temporary storage data, scheduled task data, scene task data, map attribute data, etc.
[0151] The data includes: Wall data, which represents the location and shape of interior walls (e.g., physical walls, virtual walls) on the map; Room outline data, which represents the shape of the room's external boundaries on the map; Obstacle data, which includes data about objects in the room environment that may hinder the robot vacuum's cleaning or movement; Path data, which includes the robot vacuum's own recorded movement trajectory during cleaning, or the coordinates of the user-specified navigation route; Internal obstacle area data, which describes special areas within the room that may restrict the robot vacuum's cleaning or access due to the presence of special items (e.g., fragile items, appliances) or special floor materials; Base station data, which includes the base station's location coordinates on the 2D map and its status information (e.g., charging status, interface status, dust collection device status); and Robot vacuum data, which represents the robot vacuum's own status and location, including its location coordinates on the 2D map, angle (indicating the robot vacuum's orientation), and task status (e.g., cleaning mode, whether cleaning is paused / continued, remaining battery level). No-go zone data can represent data related to areas prohibited from entering by the robot vacuum cleaner, either manually designated by users or other objects on the app (set by the aforementioned execution entity) or determined based on preset configurations. For example, this includes the two-dimensional boundary coordinates of the no-go zone, the prohibition type (e.g., completely prohibited from entering, prohibited from mopping only), and the area identifier (e.g., name or number). Virtual wall data can represent data related to virtual boundaries set by users on the app, defining its location and range through two-dimensional data information (e.g., the start and end coordinates of line segments or area boundary coordinates), and may also include attributes such as the strength and visibility of the virtual wall. Temporary storage data can be a data area used to store temporary information generated by the robot vacuum cleaner during cleaning. This information includes the location of temporarily marked obstacles, temporary cleaning areas, temporary path planning, etc., stored in different formats (e.g., coordinate point arrays, area boundary coordinates, etc.) and attributes (e.g., whether it is temporary, type, etc.). No-mopping zone data can refer to data related to areas in the indoor environment of a room that are prohibited from mopping by the robot vacuum cleaner, either designated by users or other objects through the app or determined based on preset rules. This primarily includes two-dimensional boundary coordinates, whether the mopping function is enabled, and area identification. Scheduled task data can be data related to the task plan set by the user for the robot vacuum in the app, which involves performing cleaning tasks at specific times. For example, this includes cleaning time (such as the specific date and time), cleaning area (room ID (Identifier) or area coordinate range), cleaning mode (such as normal cleaning, powerful cleaning), and whether the task is repeated. Scene task data can be data related to cleaning task planning, such as a combined cleaning arrangement of multiple rooms and areas, and also involves information such as cleaning order and switching between different cleaning modes, which can be generated through user settings in the app.Furniture data refers to the data related to indoor furniture on a map, including the furniture's position coordinates on a two-dimensional plane, type (such as sofa, table, etc.), dimensions (length, width, height), angle (placement direction), and other attribute information. Map attribute data can be basic attribute information about the entire indoor map, such as map size (length and width, expressed in actual physical units), scale (such as 1:100, meaning that 1 unit length on the map corresponds to 100 actual units), coordinate system information (such as a rectangular coordinate system, origin position, coordinate axis direction), map accuracy (coordinate error range, etc.), and update time.
[0152] Step 102: Compress the two-dimensional map data to obtain two-dimensional compressed data.
[0153] In this embodiment, the two-dimensional compressed data can be the result of data processing obtained directly or indirectly after compressing two-dimensional compressed data. Compression processing can improve the efficiency of data transmission to the rendering module and increase data processing speed.
[0154] As an example, the compression process described above can be achieved using one or more data compression algorithms. For instance, two-dimensional compressed data can be data with the following JSON structure:
[0155]
[0156] Step 103: Convert the two-dimensional compressed data into three-dimensional map data.
[0157] In this embodiment, 3D map data can be used for 3D information display. For example, by rendering 3D map data, map objects can be projected into 3D space.
[0158] As an example, 3D map data adds another dimension (such as height) to 2D compressed data, enabling it to more realistically reflect map objects. For instance, in addition to planar location, 3D map data can also include vertical information such as terrain undulations and building heights.
[0159] 3D map data can include the following 3D map data: wall data (e.g., virtual wall data, physical wall data), room outline data, obstacle data (e.g., furniture data), path data, base station data, robot vacuum cleaner data, restricted area data (e.g., internal obstacle area data, no-mopping zone data), temporary storage data, scheduled task data, scene task data, map attribute data, etc.
[0160] There are several methods that can be used to convert 2D compressed data into 3D map data. Please refer to the description below for details, which will not be elaborated here.
[0161] Step 104: Render the three-dimensional map data to display a three-dimensional map model, wherein the three-dimensional map model includes an object model of the map object represented by the three-dimensional map data.
[0162] In this embodiment, at least a portion of the images in the 3D map model can be obtained by rendering 3D map data.
[0163] As an example, the above-mentioned 3D map model may include images of the following 3D models: wall models (e.g., solid wall models, virtual wall models), room outline models, obstacle models (e.g., furniture models), path models, base station models, robot vacuum cleaner models, restricted area models (e.g., internal obstacle area models, no-mopping zone models), timed task models, scene task models, etc.
[0164] Here, when displaying a 3D map model, the image of the aforementioned 3D model can be displayed simultaneously within the 3D map model. See, for example... Figure 3C , Figure 3C This is a schematic diagram of a three-dimensional map model for a map data processing method provided in an embodiment of this application.
[0165] In some optional implementations of this embodiment, the two-dimensional compressed data can be converted into three-dimensional map data in the following manner:
[0166] The first step is to determine the target height of the map objects. The map objects represented by the aforementioned two-dimensional compressed data may include, but are not limited to: walls, room outlines, the robot vacuum's path, obstacle areas within the room, and restricted areas within the room.
[0167] The target height can be set by the user or other objects, or it can be determined based on the size of the room.
[0168] The second step is to convert the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data and the target height.
[0169] Here, various methods can be used to convert the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data and the target height.
[0170] As a first example, when the map object represented by the 2D compressed data includes walls, the 2D compressed data can be 2D wall data. Wall data can represent the position and orientation of the wall using multiple 2D data points. These coordinate points can be connected sequentially to form the shape of the wall from a planar perspective. Therefore, when the 2D compressed data is 2D wall data, this wall data typically lacks height information and can be represented using coordinate points. The aforementioned wall can be a physical wall in the cleaning area or a virtual wall set by objects such as users.
[0171] In this case, the target height can represent the wall height.
[0172] Furthermore, the two-dimensional compressed data can be converted into three-dimensional map data based on the two-dimensional compressed data and the target height in the following manner: For the coordinate points (x, y) of each two-dimensional wall data, add height coordinates (assuming the height is h), and the converted three-dimensional data can be (x, y, h).
[0173] Furthermore, after obtaining all the transformed 3D data points, the wall surface can be constructed using triangular patches from computer graphics. For example, three adjacent 3D data points can be connected to form a triangular patch. In this way, all the points are connected sequentially to form a complete 3D wall model, which is then used to display a 3D map model containing this wall model.
[0174] As a second example, where the map object represented by the two-dimensional compressed data includes the path of the robot vacuum cleaner, the two-dimensional compressed data can be two-dimensional path data. The path data can represent planar coordinate points, and multiple coordinate points can form the movement trajectory of the robot vacuum cleaner on a planar map.
[0175] In this case, the target height can represent the path height. For example, the path height can be 0, or it can be the height of a staircase, etc.
[0176] If the robot vacuum moves continuously on the same plane, the height coordinates of its path (i.e., the target height mentioned above) can be a fixed value. However, if height changes are involved, such as the robot vacuum moving from a flat surface to an area with steps, the height coordinates need to be changed according to the change in the structure of the cleaning space. The target height can be obtained from the map's height data or relevant information from the object model of the map object.
[0177] Furthermore, the two-dimensional compressed data can be converted into three-dimensional map data based on the two-dimensional compressed data and the target height in the following manner:
[0178] For each 2D compressed data point in the path data, height coordinates (i.e., the target height mentioned above) are added based on the actual position of the robot vacuum in 3D space. For example, when the robot vacuum moves from a plane to an area with steps, the coordinates of the path points should be adjusted by adding the height of the steps as they pass through them, thus obtaining 3D map data.
[0179] Furthermore, connecting these coordinate points with elevation information yields a 3D path model, which in turn allows the display of a 3D map model containing this path. Such a path more accurately reflects the robot vacuum's movement trajectory in 3D space.
[0180] As a third example, where the map object represented by the 2D compressed data includes restricted areas within a room, the 2D compressed data can be 2D restricted area data. A restricted area can be a closed polygon composed of a series of points, representing the area on a plane where the robot vacuum is prohibited. A restricted area can be a no-mopping zone; it can also be other areas where the robot vacuum is prohibited, such as obstacle courses.
[0181] In this case, the target height can represent the height of the restricted area. For example, if the restricted area is a specific zone within a room, its height can be the same as the room height.
[0182] Furthermore, the two-dimensional compressed data can be converted into three-dimensional map data based on the target height as follows: After converting the two-dimensional data into three-dimensional data by adding the target height, these three-dimensional data are connected to construct the sides and top (if closure is required), forming a closed space representing the restricted area in three-dimensional space. For example, for a two-dimensional restricted area polygon, after converting its vertices into three-dimensional data, its three-dimensional shape is constructed using triangular patches, enabling the robot vacuum cleaner to recognize the three-dimensional range of the restricted area in a three-dimensional environment, thereby obtaining a three-dimensional restricted area model, which can then display a three-dimensional map model containing this three-dimensional restricted area model.
[0183] It is understood that, among the above optional implementation methods, the height of the map object represented by the two-dimensional compressed data can be used to convert the two-dimensional compressed data into three-dimensional map data more quickly.
[0184] In some application scenarios of the above-mentioned optional implementation methods, the two-dimensional compressed data is two-dimensional contour data, which represents the contour of the cleaning space of the sweeping robot.
[0185] Based on this, the two-dimensional compressed data can be converted into three-dimensional map data using the two-dimensional compressed data and the target height as follows:
[0186] The first step is to determine the bottom surface of the cleaning space.
[0187] Here, the plane containing the location represented by all or part of the map data in the map data subset can be defined as the bottom surface of the room. Alternatively, the plane passing through the target location and parallel to a preset plane can also be defined as the bottom surface of the room. The target location can be the center of the location represented by all or part of the map data in the map data subset.
[0188] The second step is to convert the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data, the bottom surface, and the target height.
[0189] As an example, in the case where the map object represented by 2D compressed data includes room outlines, the 2D compressed data can be 2D room outline data. The room outline can be a closed polygon consisting of a series of sequentially connected points.
[0190] In this case, the target height can represent the height of the room.
[0191] Furthermore, the two-dimensional compressed data can be converted into three-dimensional map data based on the two-dimensional compressed data and the target height in the following manner:
[0192] For each 2D room outline, the data is converted to 3D by adding a target height. Then, the sides are constructed using adjacent 3D data. For example, a triangular patch can be constructed as part of a room's side wall. All the 3D data are connected sequentially in this way to form the room's side walls. Next, the top and bottom are closed by connecting the 3D data of the room outline to form a planar triangular mesh. Thus, by connecting these points, the planar triangular mesh at the top and the bottom can be constructed, making the room a closed space in 3D, resulting in a 3D room model. This model can then be used to display a 3D map containing the 3D room model.
[0193] It is understandable that in the above application scenario, by using the floor of the room, two-dimensional compressed data, and the height of the map object represented by the two-dimensional compressed data, the map object can be placed on the same horizontal plane, thereby more accurately converting the two-dimensional compressed data into three-dimensional map data.
[0194] In some optional implementations of this embodiment, the two-dimensional compressed data can be converted into three-dimensional map data in the following manner:
[0195] The first step is to obtain the object model of the map object, as well as the orientation information of the object model.
[0196] The object model mentioned above can be one of the following: obstacle model, robot vacuum cleaner base station model, robot vacuum cleaner model, etc.
[0197] The second step is to convert the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data, the object model, and the orientation information.
[0198] As a first example, assume the object model is a cuboid, and its length, width, height, and two-dimensional position coordinates need to be determined. The object model's two-dimensional position coordinates and orientation information are known. Therefore, a three-dimensional object model can be constructed and its orientation determined as follows: In three-dimensional space, the object model's orientation is determined based on the orientation information to construct a cuboid. The three-dimensional object model is constructed by connecting the eight vertices of the cuboid to form triangular facets. For example, connecting the four vertices of the base can form a base mesh, and connecting the vertices of the sides can form side facets, thus forming a complete cuboid-shaped object model and obtaining all the three-dimensional map data for this object model.
[0199] As a second example, assuming the object model is a furniture model, it is necessary to pre-construct a 3D model of the furniture and determine its 2D position coordinates. The object model's 2D position coordinates and orientation information are known. Therefore, the 3D object model can be constructed and its posture determined as follows: In 3D space, the orientation of the object model is determined based on the orientation information to construct a 3D model of the furniture that conforms to the aforementioned orientation information, and to obtain all the 3D map data of the object model.
[0200] In animations or real-time displays, the 3D position and orientation of map objects can be updated based on their movement. For example, when a map object turns, its direction and angle are adjusted, vertex coordinates are recalculated, and the position and orientation of the 3D model are updated. Similarly, for a moving pet, its position, direction, and angle can be displayed in real-time within the 3D map model.
[0201] It is understandable that among the above optional implementation methods, the object model in the map model can be rendered more accurately based on two-dimensional compressed data, object model, and object orientation information.
[0202] In some optional implementations of this embodiment, the two-dimensional compressed data is two-dimensional timed task data, which indicates the time for performing the cleaning task.
[0203] Based on this, the two-dimensional compressed data can be converted into three-dimensional map data in the following way:
[0204] The first step is to determine the position information of the time indicated by the timed task data in the preset time axis.
[0205] The second step is to convert the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data and the location information.
[0206] Here, the two-dimensional scheduled task data can include: time-related settings by users or other objects, as well as associated two-dimensional area identifiers. For example, the time indicated by the scheduled task data can be used to record the specific time point of task execution (such as 9:00 AM every day) or time interval (such as 5:00 PM to 6:00 PM every Monday to Friday). In addition, the two-dimensional spatial range involved in the task can be indicated by area numbers or other methods (such as the corresponding ranges of room A, area B, etc. on a flat map).
[0207] When converting scheduled task data into 3D data, the scheduled tasks can be mapped to actual physical regions in 3D space. Then, through visualization, the location information is displayed on a timeline model within the 3D scene to show the task's temporal characteristics and execution range, allowing users and other objects to intuitively see the specific situation of the scheduled task in a 3D environment.
[0208] As an example, based on the two-dimensional region identifiers (such as room numbers, region codes, etc.) involved in the scheduled task data, the corresponding 3D region model can be found and determined in the pre-constructed 3D environment. For instance, if the scheduled task is associated with the "living room" region, the 3D model representing the living room can be found in the 3D scene. This model contains 3D structural information such as the living room walls and furniture. For cases involving combined regions (such as when the scheduled task involves both the living room and bedroom regions), the corresponding 3D models of the living room and bedroom can be located separately.
[0209] Furthermore, visual time markers can be added to the corresponding 3D region model. For example, a timeline model can be displayed in the map model, and the location information can be displayed in the timeline model to show text information such as task start time and end time.
[0210] It is understandable that, among the above optional implementation methods, the scheduled task data can be converted into three-dimensional data and then displayed in the map model, so that users and other objects can more intuitively understand the cleaning time.
[0211] In some application scenarios of the above optional implementation methods, the three-dimensional map model includes a time axis model of the preset time axis, the time axis model includes a marker model, and the marker model represents the time indicated by the timed task data.
[0212] Based on this, after displaying the 3D map model, the following steps can also be performed:
[0213] In response to a preset operation for the marking model, the task information of the cleaning task corresponding to the marking model is displayed.
[0214] The aforementioned preset operation can be any pre-defined operation, such as a click operation or a hover operation.
[0215] Understandably, in the above application scenarios, users and other entities can more quickly and intuitively understand relevant information about the cleaning task by performing preset operations.
[0216] In some application scenarios of the above optional implementation methods, the three-dimensional map model includes a time axis model of the preset time axis, the time axis model includes a marker model, and the marker model represents the time indicated by the timed task data.
[0217] The tagging model can represent the time indicated by the timed task data.
[0218] Based on this, after displaying the 3D map model, the following steps can also be performed:
[0219] The first step is to obtain the target status information.
[0220] The target status information includes at least one of the following: the execution status of the cleaning task and the current time.
[0221] The execution status of a cleaning task can include one of the following: not cleaned, cleaning in progress, cleaned, cleaning progress bar, etc.
[0222] The second step is to determine the display method of the marker model based on the target state information.
[0223] Different target state information can (but not necessarily) correspond to different display methods of the labeling model.
[0224] The above display methods may include different colors, different transparency, and other methods for displaying the marked model.
[0225] The third step is to display the marker model according to the aforementioned display method.
[0226] Understandably, in the above application scenarios, the display method of the marker model can be dynamically adjusted according to different status information. Therefore, users and other entities can more intuitively determine the cleaning status, or the duration between the current moment and the cleaning moment, through the map model.
[0227] In some optional implementations of this embodiment, the two-dimensional compressed data is two-dimensional cleaning mode data, and the cleaning data model represents the cleaning mode of the sweeping machine.
[0228] Based on this, the two-dimensional compressed data can be converted into three-dimensional map data in the following way:
[0229] The first step is to determine the cleaning object indicated by the cleaning mode data and the first identifier representing the cleaning mode.
[0230] The first identifier can indicate the cleaning mode. The cleaning target can be an area in the room, such as the master bedroom or kitchen.
[0231] The second step is to determine the three-dimensional model of the object to be cleaned.
[0232] The third step is to convert the two-dimensional compressed data into three-dimensional map data based on the first identifier and the three-dimensional model.
[0233] Here, the two-dimensional compressed data can be converted into three-dimensional map data by establishing a mapping relationship between the first identifier and the three-dimensional data corresponding to the cleaning object.
[0234] Depending on the object being cleaned, the methods for obtaining the above three-dimensional data can be found in the relevant context descriptions, and will not be repeated here.
[0235] Specifically, after obtaining the 3D data corresponding to the object being cleaned, a relationship between the first identifier and the 3D data can be established in 3D space based on the logical relationships set by the user and other objects. For example, in a 3D scene, dynamic effects (such as flashing edges, color changes, etc.) can be added to the 3D model of the living room to indicate that the cleaning task is in progress. After the living room cleaning task is completed, the focus is shifted to the 3D model of the bedroom through animation guidance (such as arrow indicators, light and shadow flow effects, etc.), and the bedroom model begins to display the corresponding dynamic effects of the task execution, and so on. In this way, the task execution status of each area can be displayed sequentially according to the task settings, allowing users to intuitively see the operation flow of the entire scene task in 3D space.
[0236] Furthermore, different status indicators can be used to reflect task progress during the execution of tasks in each area. For example, when cleaning the living room, different colors can be used to cover the floor model to represent the proportion of cleaned and uncleaned areas. As cleaning progresses, the cleaned colored area gradually expands, thus displaying the real-time progress of the task. A progress bar or task step prompt can also be added to the entire 3D scene to clearly inform the user which stage of the task they are currently in and the overall progress.
[0237] It is understandable that, among the above optional implementation methods, the corresponding identifier for the cleaning mode can be displayed in the 3D map model. This allows users and other entities to more intuitively understand the cleaning mode of the object being cleaned.
[0238] Furthermore, when the two-dimensional compressed data is two-dimensional temporary storage data, the temporary storage data can contain planar coordinate points (such as the vertex coordinates of the cleaned area) and some attribute information (such as area number, status, etc.). This data mainly describes the location and basic attributes of some temporarily related areas or objects on the plane.
[0239] When converting to three-dimensional data, we can consider the actual location and meaning of the data in three-dimensional space, and convert planar information into a form that can be represented in a three-dimensional environment.
[0240] A specific conversion process could be, for example:
[0241] Coordinate transformation: For planar coordinate points in temporary storage, add height coordinates based on their actual position in 3D space. For example, if the temporary storage data contains coordinate points of cleaning areas, add fixed height coordinates to these points to form 3D data when the cleaning areas are on the same plane. If the cleaning areas involve different heights (such as cleaning tasks in multi-story buildings), add different height coordinates based on the actual height.
[0242] Associating and displaying attributes: Based on these 3D data and related attributes, the areas or objects involved in temporary storage are accurately represented in the 3D environment. For example, if the temporary storage data contains the status of clean areas (such as cleaned or uncleaned), this status can be represented in the 3D model using different colors or markers, allowing the clean areas to intuitively display their location and status information in the 3D environment.
[0243] In some optional implementations of this embodiment, the number of three-dimensional map data is multiple.
[0244] Based on this, the 3D map data can be rendered in the following manner:
[0245] The first step is to determine the rendering order of multiple 3D map data.
[0246] The rendering order mentioned above can be clockwise, counterclockwise, or any other order.
[0247] The second step is to render multiple 3D map data sequentially according to the rendering order.
[0248] It is understood that in the above-mentioned optional implementation methods, after determining the rendering order, each 3D map data in the 3D map data set can be rendered sequentially according to the determined rendering order. This reduces the probability of repeated or missed rendering of 3D map data in the 3D map data set, and also improves rendering efficiency.
[0249] It should be noted that, where there is no conflict, the technical features described in different alternative implementations can be included in the same embodiment. For the sake of brevity, they will not be elaborated here.
[0250] The map data processing method provided in this application embodiment can acquire two-dimensional map data transmitted by a robot vacuum cleaner, then compress the two-dimensional map data to obtain two-dimensional compressed data, then convert the two-dimensional compressed data into three-dimensional map data, and finally render the three-dimensional map data to display a three-dimensional map model. The three-dimensional map model includes an object model of the map objects represented by the three-dimensional map data. Therefore, two-dimensional map data transmitted by the robot vacuum cleaner can be directly acquired, and the compressed two-dimensional map data (i.e., two-dimensional compressed data) can be converted into three-dimensional map data to display the corresponding three-dimensional map model. In this way, the robot vacuum cleaner only needs to have the function of acquiring and transmitting two-dimensional map data, without requiring other data processing capabilities, thus reducing the requirements on the robot vacuum cleaner's processing power and improving the applicability of this solution to different robot vacuum cleaners. Furthermore, the two-dimensional map data obtained by the robot vacuum cleaner can be used to display a three-dimensional map model, increasing the richness of the map displayed by the robot vacuum cleaner. In addition, by compressing the two-dimensional data, the display efficiency of the three-dimensional map model can be improved.
[0251] Figure 2 This is a flowchart illustrating another map data processing method provided in an embodiment of this application. Figure 2 As shown, the method specifically includes:
[0252] Step 201: Obtain a map data set, wherein the map data set represents the full map data transmitted by the sweeping robot this time, and the map data in the map data set is two-dimensional data.
[0253] In this embodiment, the robot vacuum cleaner can collect map data according to a certain strategy, and then transmit the full amount of map data collected each time to the execution subject of this method.
[0254] For example, a robot vacuum cleaner can periodically collect and transmit map data, or it can collect and transmit map data under preset conditions. For example, the preset conditions could be that the amount of map data collected by the robot vacuum cleaner is greater than or equal to a preset data volume threshold.
[0255] The full map data can be: multiple map data collected by the robot vacuum cleaner from the last map data transmission to the start of the current map data transmission.
[0256] The map dataset is the same as the full map data mentioned above. It can include multiple map datasets.
[0257] Please refer to the above description for the meaning of map data, which will not be repeated here.
[0258] Step 202: Extract a subset of map data from the map data set, wherein the subset of map data is incremental data of the full map data relative to the historical data set, and the historical data in the historical data set represents map data that has been transmitted to the rendering unit.
[0259] In this embodiment, incremental data can be map data that has been added to or changed relative to the historical data set.
[0260] Here, the extraction unit in the aforementioned execution entity can be used to extract a subset of map data from the map data set.
[0261] The extraction unit and the rendering unit can be two software modules located within the aforementioned execution entity. Typically, the application installed within this execution entity can include the extraction unit and rendering unit described here.
[0262] In some cases, the extraction unit can be used to acquire a map data set from the aforementioned sweeping robot, process the map data set (e.g., including but not limited to: extracting a subset of map data from the map data set), and then send the processing result to the rendering unit. The rendering unit can be used to further process the above processing result to obtain a three-dimensional map data set, and then obtain and display a three-dimensional map model by rendering the three-dimensional map data set.
[0263] Step 203: Each map data in the subset of map data is identified as the two-dimensional map data collected by the sweeping machine.
[0264] Step 204: Compress the two-dimensional map data to obtain two-dimensional compressed data.
[0265] In this embodiment, step 204 and Figure 1 Step 102 in the corresponding embodiment is basically the same, and will not be repeated here.
[0266] Step 205: Convert the two-dimensional compressed data into three-dimensional map data.
[0267] In this embodiment, step 205 and Figure 1 Step 103 in the corresponding embodiment is basically the same, and will not be repeated here.
[0268] Step 206: Render the three-dimensional map data to display a three-dimensional map model, wherein the three-dimensional map model includes an object model of the map object represented by the three-dimensional map data.
[0269] In this embodiment, step 206 and Figure 1 Step 104 in the corresponding embodiment is basically the same, and will not be repeated here.
[0270] In some optional implementations of this embodiment, a subset of map data can be extracted from the map data set in the following manner:
[0271] The first step is to obtain a pre-stored set of historical data.
[0272] Here, historical datasets can be stored in advance. For example, historical datasets can be cached.
[0273] The second step involves determining whether the target map data is included in the historical data set for each target map data in the map data set. If the target map data is not included in the historical data set, the target map data is added to the map data subset, and the historical data set is updated based on the target map data.
[0274] The target map data can be any map data in the map data set.
[0275] Here, you can iterate through each target map data in the map dataset to determine whether the target map data is contained in the historical dataset.
[0276] If it is included, there is no need to add the target map data to the subset of map data. In other words, the target map data is not incremental data, and there is no need to update the historical data set.
[0277] If not included, the target map data can be added to a subset of the map data. In other words, the target map data is incremental data, and the historical data set can be updated based on the target map data.
[0278] It is understandable that, among the above optional implementation methods, incremental data can be more accurately determined by pre-storing historical data sets, thereby improving the accuracy of the displayed 3D map model.
[0279] In some application scenarios of the above optional implementation methods, the following method can be used to determine whether the historical data set contains the target map data:
[0280] The first step is to determine the second identifier corresponding to the target map data.
[0281] The second identifier can be used to label the target map data. For example, the target map data can be used as the value, and the second identifier can be used as the key.
[0282] The second step is to determine whether the historical data set contains target historical data with the second identifier, in order to obtain a determination result.
[0283] Where the historical data set includes historical data with the second identifier, the target historical data can be historical data with the second identifier that are included in the historical data set.
[0284] The determination result can indicate whether the historical data set contains target historical data with the second identifier.
[0285] The third step is to determine, based on the determination result, whether the historical data set contains the target map data.
[0286] As an example, if the determination result indicates that target historical data with the second identifier is included, it can be determined that the target map data is included in the historical data set; if the determination result indicates that target historical data with the second identifier is not included, it can be determined that the target map data is not included in the historical data set.
[0287] Understandably, in the above application scenarios, the second identifier corresponding to the map data can be used to determine whether the historical dataset contains the target map data. Since the second identifier usually has fewer characters, it can improve the efficiency of determining whether the historical dataset contains the target map data, thereby improving the rendering efficiency of 3D map data and the display efficiency of 3D map models.
[0288] In some of the above application scenarios, the following method can be used to determine whether the target map data is included in the historical data set based on the determination result:
[0289] If the determination result indicates that the historical data set contains the target historical data, determine whether the target historical data is the same as the target map data; if the target historical data is the same as the target map data, determine that the historical data set contains the target map data; if the target historical data is not the same as the target map data, determine that the historical data set does not contain the target map data.
[0290] In the aforementioned application scenarios, to avoid sending the full amount of data every time during data transmission (especially when the data volume is large and the changes are small each time), incremental data is determined to transmit only the changed parts. This improves data transmission efficiency, saves network resources, and reduces the data processing burden on the receiving end. The core idea is to compare the newly acquired data with the previously cached old data and identify the differences between them; these differences constitute the incremental data.
[0291] The specific implementation steps include:
[0292] 1. Initialize cached data:
[0293] Here, it is necessary to store a set of historical data as a benchmark for comparison.
[0294] When the storage space used to store historical data sets is empty (i.e., it is the first time it is executed or it has not been initialized before), a new mutable dictionary object can be created as a container for cached data to prepare for subsequent data storage.
[0295] 2. Retrieve current data and cached data:
[0296] Next, we need to obtain the latest map data set and compare it with the previously cached historical data set.
[0297] 3. Compare the data to identify incremental data:
[0298] By comparing each element in the map dataset and the historical dataset, we can determine which data has changed and obtain a subset of the map data.
[0299] 4. Update cached data:
[0300] After determining the subset of map data, in order to accurately identify new increments in the future, the historical data set needs to be updated to store the latest full data state.
[0301] 5. Utilize incremental data:
[0302] The determined incremental data (i.e., a subset of map data) can be further processed and utilized according to actual needs. For example, the incremental data can be converted into a JSON (JavaScript Object Notation, a lightweight data exchange format) string and then sent to the rendering unit. After receiving the incremental data, the rendering unit can perform targeted update operations (such as updating map rendering, adjusting the displayed content based on new room information, etc.), thus achieving the goal of updating the system state efficiently using changed data.
[0303] By going through the complete process described above, incremental data can be accurately identified and fully utilized to optimize the data transmission and update process of the entire system, thereby improving the system's performance and response efficiency.
[0304] It is understandable that, under the above circumstances, by determining whether the target historical data is the same as the target map data, the accuracy of determining whether the target map data is in the historical data set can be improved, thereby improving the accuracy of determining incremental data and improving the accuracy of the displayed map model.
[0305] In some optional implementations of this embodiment, after extracting a subset of map data from the map data set, the following steps may also be performed:
[0306] The first step is to determine the operating system of the target device used to render the 3D map data.
[0307] The aforementioned operating systems may include, for example, Android and Apple operating systems.
[0308] The second step is to instantiate the bridge object corresponding to the operating system.
[0309] Here, different operating systems can correspond to different bridging objects. Bridging objects can be used to render map data from a subset of map data on target devices with different operating systems.
[0310] The third step is to transmit the subset of map data to the rendering unit through the bridging object.
[0311] Here, a corresponding bridge object can be instantiated based on different operating systems. When the bridge object receives a subset of map data transmitted from the extraction unit, it can deserialize the map data in the subset into a data object that can be processed by the rendering unit. The deserialized map data can then trigger the rendering unit to receive the aforementioned map data.
[0312] It is understandable that among the above optional implementation methods, cross-platform rendering of map data can be achieved by instantiating the corresponding bridging object, thereby improving the applicability of the solution to devices with different operating systems.
[0313] It should be noted that, in addition to the contents described above, this embodiment may also include... Figure 1 The corresponding technical features described in the corresponding embodiments, thereby achieving Figure 1 For details on the technical effects of the map data processing method shown, please refer to [link / reference]. Figure 1 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0314] The map data processing method provided in this application can more accurately determine incremental data by traversing each map data in the map data set, thereby improving the accuracy of the displayed map model.
[0315] The following describes the embodiments of this application by way of example. However, it should be noted that the following content is only used to understand the technical solutions of the embodiments of this application and does not constitute a limitation on the protection scope of the embodiments of this application.
[0316] Before introducing this plan, the following is a brief introduction to the technical terms used in it:
[0317] Unity: Unity is a cross-platform, comprehensive development engine that provides a complete development environment for creating 2D (Two-Dimensional), 3D (Three-Dimensional) games, Virtual Reality (VR), Augmented Reality (AR) experiences, and other interactive content. Its powerful feature set, ease of use, and broad platform support have led to its widespread adoption in the development industry and related fields.
[0318] 3D: "3D" is an abbreviation for "Three-Dimensional," meaning three-dimensional. It is a way of describing the shape, position, and size of objects in space. Compared to traditional two-dimensional (2D), 3D adds the dimension of depth (Z-axis), enabling a more realistic and three-dimensional representation of objects or scenes. It has wide applications in many fields such as computer graphics, film and television production, game development, architectural design, and industrial design.
[0319] MQTT (Message Queuing Telemetry Transport) is a lightweight IoT messaging protocol based on a publish / subscribe model. It is specifically designed to enable efficient and reliable communication between devices in low-bandwidth, high-latency, or unstable network environments.
[0320] Protobuf: Protocol Buffers (protobuf for short) is a lightweight and efficient structured data storage format used for serializing structured data. It is similar to XML (eXtensible Markup Language) and JSON, but is smaller, faster, and simpler. Serialization is the process of converting the state of a data structure or object into a format that can be stored or transmitted; deserialization is the opposite operation, converting the stored or transmitted format back into the data structure or object.
[0321] In the existing solution, during the cleaning process, the robot vacuum cleaner can continuously transmit the full Protobuf data of the real-time map to the APP. The APP first parses the data into corresponding JSON data, and then organizes the data according to different types. After completion, the data is used to draw a 2D map. The specific drawing process is as follows:
[0322] Based on the map data transmitted by the machine, create a 2D map transformation coordinate system (the coordinate origin of the APP is inconsistent with the coordinate origin of the machine and needs to be transformed).
[0323] Then, based on the transmitted map width and height, initialize a Bitmap and set each pixel to transparent.
[0324] Based on the organized set of coordinate points of different types of elements on the map, find the corresponding pixel positions on the map and fill them with the corresponding colors. After all the data is filled, overlay them to generate a 2D map image of the robot vacuum cleaner, and then the APP displays the image.
[0325] The real-time data will repeat the above operations.
[0326] The above solution has the following problems: Prolonged lingering on the robot vacuum's map page and frequent rendering of large amounts of repetitive data severely depletes performance, causing the phone to overheat and consume a lot of power. When the map is too large and refreshes frequently, the number of pixels for bitmap calculation and rendering becomes enormous, creating a performance bottleneck. The map interface is also aesthetically unappealing, and map updates are not timely.
[0327] The reasons for the above problems include: large data volume, slow data transmission, high performance consumption in rendering, and the inability of the 2D interface to display map data information well.
[0328] See Figure 3A and Figure 3B , Figure 3A This is a flowchart illustrating another map data processing method provided in an embodiment of this application. Figure 3B This is a timing diagram of a map data processing method provided in an embodiment of this application.
[0329] This solution can be implemented in the following way:
[0330] Overall, this solution can include the complete process of map data processing and display during the robot vacuum cleaner's cleaning process. The overall process starts with data collection from the robot vacuum cleaner, followed by data processing and optimization on the APP, and then transmission to the Unity engine (a software module in the aforementioned APP, corresponding to the aforementioned rendering unit) for rendering and display through a specific bridging method. All parts work closely together to achieve the visualization of map-related information on the terminal.
[0331] In the data transmission process from the robot vacuum to the app: During its task, the robot vacuum can continuously send various types of 2D map data to the app using the MQTT communication protocol. This 2D map data can cover map base information, the robot vacuum's cleaning trajectory, detailed information about each room, floor conditions, and the robot vacuum's specific location. This 2D map data is the foundational data source for subsequent processing and display by the entire system. It carries important information about the robot vacuum's task scenario and provides the raw material for the app and Unity platform to present a complete map display.
[0332] In the app's data processing section, a JSON data structure is defined for integrating map information. The app has redefined a JSON data structure named MapInfo to uniformly integrate and organize map-related data received from the robot vacuum and subsequently passed to Unity. This data structure contains multiple fields, each corresponding to specific aspects of map information. For example, there are fields indicating the type of map-related business operation, fields indicating whether the 3D map can be rotated, and fields controlling the display of various elements on the map. Furthermore, various information such as basic map information, wall coordinate sets, detailed information about different rooms, obstacle information, path coordinate sets, robot vacuum station locations, and the robot vacuum's own location can all be stored using the JSON structure. This structured approach allows complex and diverse map data to be clearly and systematically transmitted and processed between different modules, facilitating subsequent operations and display.
[0333] Map data contour extraction to optimize data volume: During map data processing, contour data can be extracted from the map data. This operation can reduce the amount of data transmitted subsequently and the number of models that need to be rendered, thereby improving the overall data processing efficiency and performance of the system.
[0334] In practical implementation, a dictionary structure can be used to store the boundary point information of each room, with the room ID serving as the identifier to distinguish different rooms. During processing, a traversal operation can be used to mark specific locations related to the room boundaries. This judgment condition can involve a comprehensive consideration of the room where the current location is located and the surrounding grid situation.
[0335] Next, the wall segments in the vertical and horizontal directions can be extracted separately. During the extraction process, the corresponding row and column data can be traversed, and the points on the segments can be transformed, sorted, and integrated into the relevant structure used to store the overall map data. This completes the extraction and organization of the room outline information, so as to extract the key map outline information more accurately and reduce unnecessary data redundancy.
[0336] Comprehensive organization of APP data and adaptation to MapInfo structure: The APP will comprehensively and meticulously organize the various map-related data it acquires, so that it can be adapted to the previously defined MapInfo structure, so that data in a unified format can be passed to Unity in the future.
[0337] For the basic map information, key attributes such as the map's unique identifier, width and height, rotation angle, and new and old origin coordinates can be extracted and stored in the appropriate format. Regarding wall data, the line segment data representing the walls can be processed, extracting the starting and ending coordinates of each line segment, organizing them according to a specific format, and storing them for later use and display.
[0338] When processing room data, you can iterate through the relevant information of each room. For each room, you need to convert the format of the coordinates of the multiple points it contains and store them. At the same time, you also need to associate other attributes of the room, such as the room's associated room information, boundary type, room type and name. Integrate this information into a dictionary structure, and then summarize the dictionary information of all rooms into an array to form a complete set of room information.
[0339] When processing obstacle data, attributes such as the obstacle's location, type, and validity can be extracted and encapsulated into a suitable format. When processing path data, the coordinates of multiple points on the path need to be formatted and organized. Processing internal obstacle area data is similar; the relevant information such as the area's point coordinates, area ID, and type needs to be integrated. Finally, all types of data are organized according to the MapInfo structure requirements to form a complete dictionary object containing rich map information, ready for transmission to Unity.
[0340] Data optimization and transfer from the app to Unity:
[0341] Data deduplication optimization: To avoid transmitting the full map data to Unity every time, and thus reduce unnecessary data transmission and improve efficiency, the app can perform data deduplication optimization. This process first obtains the current complete map data, and then compares the current data with previously cached data to identify the changed parts, i.e., the incremental data.
[0342] In implementation, the relevant structures for caching data can be initialized (if not previously initialized). Then, each key piece of information in the current data and cached data is compared one by one. Only data that has changed is selected, forming a new set containing only incremental data. Afterward, the locally cached data can be updated to match the latest data, facilitating the next incremental comparison. Finally, the extracted incremental data can be converted into JSON strings for transmission to Unity in a suitable format. This implements an efficient data transmission optimization mechanism, enabling Unity to promptly obtain changes in map data without wasting resources by repeatedly transmitting large amounts of unchanging data.
[0343] Cross-platform data transfer via bridging interfaces: To enable data transfer between the app and Unity across different platforms (such as iOS, Android, etc.), a unified bridging class is used. Based on the specific platform on which Unity runs, pre-compiled directives are used to instantiate the corresponding platform-specific bridging objects. This allows for different methods of interaction with native code on different platforms, ensuring smooth data transfer from the app to Unity.
[0344] When actually transmitting data, such as map data, the received JSON-formatted map data string can be deserialized first, converting it into a data object format that is easy to manipulate in Unity. Then, the corresponding event mechanism is triggered to notify the relevant module in Unity responsible for processing map data, enabling it to obtain the latest map data for subsequent processing. For other operations that require calling native interfaces, such as room editing, the relevant operation information can also be passed to the native code in JSON format through the corresponding bridge object, enabling Unity to call native functions. The bridge interface can achieve cross-platform compatibility and code extensibility, adapting to various different operating environments and business needs.
[0345] Unity-side data rendering and display:
[0346] Room drawing functionality implementation: In Unity, the task of drawing room models based on received map data can be used to achieve map visualization.
[0347] Upon receiving the map data, the first step is to perform preliminary verification and some general settings to prepare for the subsequent room drawing tasks. Then, the room information sections of the map data can be traversed to perform detailed drawing operations for each room.
[0348] During the actual drawing process, multiple key parameters are used, such as room objects, vertex data, unique room identifiers, corresponding material information, and room height, to construct specific room models through graphics drawing operations. This allows the shape and layout of each room to be presented intuitively in the Unity scene, restoring the room distribution of the area cleaned by the robot vacuum.
[0349] Basic drawing logic:
[0350] First, the vertex data can be processed according to whether coordinate system transformation is required. If coordinate system transformation is needed, the vertex coordinates can be transformed according to specific rules and logic to ensure that the vertex data is in the correct coordinate system during subsequent model construction. Next, triangular face information for drawing the model's base can be created based on the vertex data. A specific algorithm is used to generate an array representing the vertex indices of the triangles, thereby constructing the base of the model.
[0351] Next, side vertices are added to the model. By processing the original vertex data in the height direction, a certain three-dimensional effect is given, thus constructing the side parts of the model. Furthermore, during the construction of the sides, it is ensured that the orientation of the sides matches expectations, guaranteeing that the model will display correctly under lighting and other rendering effects. In addition, UV coordinate information for texture mapping is generated. This coordinate information determines the specific mapping method of the texture on the model's surface and plays a crucial role in the model's appearance.
[0352] Finally, depending on whether the mesh data already exists, different methods are used to update or create the model's mesh data. This includes clearing the existing mesh data (if it exists) and resetting new information such as vertex, triangle, and UV coordinates, or directly creating a brand new mesh object and assigning relevant data. Normal calculation operations can also be performed to ensure that the model can present the correct effect in terms of lighting and rendering.
[0353] During the robot vacuum's cleaning process, the robot continuously reports relevant data to the app via the MQTT communication protocol, such as base map data, cleaning trajectory, room information, floor information, and the robot's location. The app redefines the MapInfo JSON data structure transmitted from the app to Unity. The content is as follows:
[0354]
[0355] The JSON structure described above allows for the compression and deduplication of map data, thereby improving the efficiency of transmitting data received by the robot vacuum cleaner to the rendering module (i.e., the Unity engine mentioned above).
[0356] It should be noted that, in addition to the contents described above, this embodiment may also include the technical features described in the above embodiments, thereby achieving the technical effect of the map data processing method shown above. Please refer to the above description for details. For the sake of brevity, it will not be elaborated here.
[0357] The map data processing method provided in this application significantly improves the map rendering performance of robotic vacuum cleaners and results in a more aesthetically pleasing display. Data transmission volume is greatly reduced, and map updates are more timely.
[0358] Figure 4 This is a schematic diagram of a map data processing device provided in an embodiment of this application. Specifically, it includes:
[0359] Acquisition unit 401 is used to acquire two-dimensional map data transmitted by the sweeping robot;
[0360] Compression data 402: The two-dimensional map data is compressed to obtain two-dimensional compressed data.
[0361] The conversion unit 403 is used to convert the two-dimensional compressed data into three-dimensional map data;
[0362] The rendering unit 404 is used to render the three-dimensional map data to display a three-dimensional map model, wherein the three-dimensional map model includes an object model of the map object represented by the three-dimensional map data.
[0363] In one possible implementation, converting the two-dimensional compressed data into three-dimensional map data includes:
[0364] Determine the target height of the map object;
[0365] Based on the two-dimensional compressed data and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
[0366] In one possible implementation, the two-dimensional compressed data is two-dimensional contour data, which represents the contour of the cleaning space of the sweeper; and
[0367] The process of converting the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data and the target height includes:
[0368] Determine the bottom surface of the cleaning space;
[0369] Based on the two-dimensional compressed data, the bottom surface, and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
[0370] In one possible implementation, converting the two-dimensional compressed data into three-dimensional map data includes:
[0371] Obtain the object model of the map object, and the orientation information of the object model;
[0372] Based on the two-dimensional compressed data, the object model, and the orientation information, the two-dimensional compressed data is converted into three-dimensional map data.
[0373] In one possible implementation, the two-dimensional compressed data is two-dimensional timed task data, which indicates the time for performing the cleaning task; and
[0374] The process of converting the two-dimensional compressed data into three-dimensional map data includes:
[0375] Determine the position information of the time indicated by the timed task data in the preset time axis;
[0376] Based on the two-dimensional compressed data and the location information, the two-dimensional compressed data is converted into three-dimensional map data.
[0377] In one possible implementation, the 3D map model includes a timeline model of the preset timeline, the timeline model including a marker model representing the time indicated by the timed task data; and
[0378] After displaying the 3D map model, the device further includes:
[0379] A display unit (not shown in the figure) is used to display the task information of the cleaning task corresponding to the mark model in response to a preset operation for the mark model.
[0380] In one possible implementation, the 3D map model includes a timeline model of the preset timeline, the timeline model including a marker model representing the time indicated by the timed task data; and
[0381] The displayed 3D map model includes:
[0382] Obtain target status information, wherein the target status information includes at least one of the following: the execution status of the cleaning task and the current time;
[0383] Based on the target state information, determine the display method of the marking model;
[0384] The marked model is displayed in accordance with the described display method.
[0385] In one possible implementation, the two-dimensional compressed data is two-dimensional cleaning pattern data, and the cleaning data model represents the cleaning pattern of the sweeper; and
[0386] The process of converting the two-dimensional compressed data into three-dimensional map data includes:
[0387] Determine the cleaning object to be cleaned by the cleaning mode indication represented by the cleaning mode data, and a first identifier representing the cleaning mode;
[0388] Determine the three-dimensional model of the object to be cleaned;
[0389] Based on the first identifier and the three-dimensional model, the two-dimensional compressed data is converted into three-dimensional map data.
[0390] In one possible implementation, acquiring the two-dimensional map data transmitted by the robot vacuum cleaner includes:
[0391] Obtain a map data set, wherein the map data set represents the full map data transmitted by the robot vacuum cleaner this time, and the map data in the map data set is two-dimensional data;
[0392] Extract a subset of map data from the map data set, wherein the subset of map data is incremental data of the full map data relative to the historical data set, and the historical data in the historical data set represents: map data that has been transmitted to the rendering unit;
[0393] Each map data in the subset of map data is identified as the two-dimensional map data collected by the sweeping machine.
[0394] In one possible implementation, extracting a subset of map data from the map data set includes:
[0395] Retrieve a pre-stored collection of historical data;
[0396] For each target map data in the map data set, determine whether the target map data is contained in the historical data set. If the target map data is not contained in the historical data set, add the target map data to the map data subset and update the historical data set based on the target map data.
[0397] In one possible implementation, determining whether the historical data set contains the target map data includes:
[0398] Determine the second identifier corresponding to the target map data;
[0399] Determine whether the historical data set contains target historical data with the second identifier to obtain a determination result;
[0400] Based on the determination result, it is determined whether the target map data is included in the historical data set.
[0401] In one possible implementation, determining whether the target map data is included in the historical data set based on the determination result includes:
[0402] If the determination result indicates that the historical data set contains the target historical data, determine whether the target historical data is the same as the target map data;
[0403] If the target historical data is the same as the target map data, it is determined that the target map data is included in the historical data set;
[0404] If the target historical data is different from the target map data, it is determined that the target map data is not included in the historical data set.
[0405] In one possible implementation, the number of the three-dimensional map data is multiple; and
[0406] Rendering the 3D map data includes:
[0407] Determine the rendering order of multiple 3D map data;
[0408] Multiple 3D map data are rendered sequentially according to the rendering order.
[0409] In one possible implementation, after extracting a subset of map data from the map dataset, the apparatus further includes:
[0410] A determining unit (not shown in the figure) is used to determine the operating system of the target device used to render the 3D map data;
[0411] An instance unit (not shown in the figure) is used to instantiate the bridge object corresponding to the operating system;
[0412] A transmission unit (not shown in the figure) is used to transmit the subset of map data to the rendering unit through the bridging object.
[0413] The map data processing device provided in this embodiment can be as follows: Figure 4 The map data processing device shown can execute all the steps of the map data processing methods described above, thereby achieving the technical effects of the map data processing methods described above. For details, please refer to the relevant descriptions above. For the sake of brevity, it will not be elaborated here.
[0414] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5The illustrated electronic device 500 includes at least one processor 501, a memory 502, at least one network interface 504, and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to implement communication between these components. In addition to a data bus, the bus system 505 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 5 The general designated all buses as Bus System 505.
[0415] The user interface 503 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).
[0416] It is understood that the memory 502 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0417] In some implementations, memory 502 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 5021 and application program 5022.
[0418] The operating system 5021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 5022 includes various applications, such as a media player and a browser, used to implement various application functions. Programs implementing the methods of this application embodiment can be included in application program 5022.
[0419] In this embodiment, by calling the program or instructions stored in memory 502, specifically the program or instructions stored in application program 5022, processor 501 executes the method steps provided in each method embodiment, including, for example:
[0420] Acquire the 2D map data transmitted by the robot vacuum cleaner;
[0421] The two-dimensional map data is compressed to obtain two-dimensional compressed data;
[0422] Convert the two-dimensional compressed data into three-dimensional map data;
[0423] The 3D map data is rendered to display a 3D map model, wherein the 3D map model includes an object model of the map object represented by the 3D map data.
[0424] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 501. Processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 501 or by instructions in the form of software. The processor 501 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 502. Processor 501 reads the information in memory 502 and, in conjunction with its hardware, completes the steps of the above method.
[0425] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described above in this application, or combinations thereof.
[0426] For software implementation, the techniques described herein can be implemented by units that perform the functions described above. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or external to the processor.
[0427] The electronic device provided in this embodiment may be as follows: Figure 5 The electronic device shown can execute all the steps of the map data processing methods described above, thereby achieving the technical effects of the map data processing methods described above. For details, please refer to the relevant descriptions above. For the sake of brevity, further details are not provided here.
[0428] This application also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.
[0429] One or more programs in the storage medium can be executed by one or more processors to implement the above-described method for processing map data executed on the electronic device side.
[0430] The processor described above is used to execute a processing program for map data stored in memory, in order to implement the following steps of a map data processing method executed on the electronic device side:
[0431] Acquire the 2D map data transmitted by the robot vacuum cleaner;
[0432] The two-dimensional map data is compressed to obtain two-dimensional compressed data;
[0433] Convert the two-dimensional compressed data into three-dimensional map data;
[0434] The 3D map data is rendered to display a 3D map model, wherein the 3D map model includes an object model of the map object represented by the 3D map data.
[0435] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0436] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0437] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0438] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for processing map data, characterized in that, The method includes: Acquire the 2D map data transmitted by the robot vacuum cleaner; The two-dimensional map data is compressed to obtain two-dimensional compressed data; Convert the two-dimensional compressed data into three-dimensional map data; The 3D map data is rendered to display a 3D map model, wherein the 3D map model includes an object model of the map object represented by the 3D map data.
2. The method according to claim 1, characterized in that, The process of converting the two-dimensional compressed data into three-dimensional map data includes: Determine the target height of the map object; Based on the two-dimensional compressed data and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
3. The method according to claim 2, characterized in that, The two-dimensional compressed data is two-dimensional contour data, which represents the contour of the cleaning space of the sweeping robot; and The process of converting the two-dimensional compressed data into three-dimensional map data based on the two-dimensional compressed data and the target height includes: Determine the bottom surface of the cleaning space; Based on the two-dimensional compressed data, the bottom surface, and the target height, the two-dimensional compressed data is converted into three-dimensional map data.
4. The method according to claim 1, characterized in that, The process of converting the two-dimensional compressed data into three-dimensional map data includes: Obtain the object model of the map object, and the orientation information of the object model; Based on the two-dimensional compressed data, the object model, and the orientation information, the two-dimensional compressed data is converted into three-dimensional map data.
5. The method according to claim 1, characterized in that, The two-dimensional compressed data is two-dimensional timed task data, which indicates the time for executing the cleaning task; as well as The process of converting the two-dimensional compressed data into three-dimensional map data includes: Determine the position information of the time indicated by the timed task data in the preset time axis; Based on the two-dimensional compressed data and the location information, the two-dimensional compressed data is converted into three-dimensional map data.
6. The method according to claim 5, characterized in that, The three-dimensional map model includes a time axis model with a preset time axis, and the time axis model includes a marker model, which represents the time indicated by the timed task data. as well as After displaying the 3D map model, the method further includes: In response to a preset operation for the marking model, the task information of the cleaning task corresponding to the marking model is displayed.
7. The method according to claim 5, characterized in that, The three-dimensional map model includes a time axis model with a preset time axis, and the time axis model includes a marker model, which represents the time indicated by the timed task data. as well as The displayed 3D map model includes: Obtain target status information, wherein the target status information includes at least one of the following: the execution status of the cleaning task and the current time; Based on the target state information, determine the display method of the marking model; The marked model is displayed in accordance with the described display method.
8. The method according to claim 1, characterized in that, The two-dimensional compressed data is two-dimensional cleaning mode data, and the cleaning data model represents the cleaning mode of the sweeper; and The process of converting the two-dimensional compressed data into three-dimensional map data includes: Determine the cleaning object to be cleaned by the cleaning mode indication represented by the cleaning mode data, and a first identifier representing the cleaning mode; Determine the three-dimensional model of the object to be cleaned; Based on the first identifier and the three-dimensional model, the two-dimensional compressed data is converted into three-dimensional map data.
9. The method according to any one of claims 1-8, characterized in that, The acquisition of the two-dimensional map data transmitted by the sweeping robot includes: Obtain a map data set, wherein the map data set represents the full map data transmitted by the robot vacuum cleaner this time, and the map data in the map data set is two-dimensional data; Extract a subset of map data from the map data set, wherein the subset of map data is incremental data of the full map data relative to the historical data set, and the historical data in the historical data set represents: map data that has been transmitted to the rendering unit; Each map data in the subset of map data is identified as the two-dimensional map data collected by the sweeping machine.
10. The method according to claim 9, characterized in that, Extracting a subset of map data from the map dataset includes: Retrieve a pre-stored collection of historical data; For each target map data in the map data set, determine whether the target map data is contained in the historical data set. If the target map data is not contained in the historical data set, add the target map data to the map data subset and update the historical data set based on the target map data.
11. The method according to claim 10, characterized in that, Determining whether the historical data set contains the target map data includes: Determine the second identifier corresponding to the target map data; Determine whether the historical data set contains target historical data with the second identifier to obtain a determination result; Based on the determination result, it is determined whether the target map data is included in the historical data set.
12. The method according to claim 11, characterized in that, The step of determining whether the target map data is included in the historical data set based on the determination result includes: If the determination result indicates that the historical data set contains the target historical data, determine whether the target historical data is the same as the target map data; If the target historical data is the same as the target map data, it is determined that the target map data is included in the historical data set; If the target historical data is different from the target map data, it is determined that the target map data is not included in the historical data set.
13. The method according to claim 9, characterized in that, After extracting a subset of map data from the map dataset, the method further includes: Determine the operating system of the target device used to render the 3D map data; Instantiate the bridge object corresponding to the operating system; The map data subset is transmitted to the rendering unit via the bridging object.
14. The method according to any one of claims 1-8, characterized in that, The number of 3D map data is multiple; as well as Rendering the 3D map data includes: Determine the rendering order of multiple 3D map data; Multiple 3D map data are rendered sequentially according to the rendering order.
15. A map data processing apparatus, characterized in that, The device includes: The acquisition unit is used to acquire the two-dimensional map data transmitted by the sweeping robot; A compression unit is used to compress the two-dimensional map data to obtain two-dimensional compressed data; A conversion unit is used to convert the two-dimensional compressed data into three-dimensional map data; A rendering unit is used to render the three-dimensional map data to display a three-dimensional map model, wherein the three-dimensional map model includes an object model of the map object represented by the three-dimensional map data.
16. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the method for processing map data according to any one of claims 1-14.