Map anti-loss cache and application method and device, processor and medium
By caching maps and calculating availability in the robot vacuum cleaner, the problem of map loss caused by abnormal restarts is solved, enabling rapid recovery of cleaning tasks and improved security.
Patent Information
- Application Number
- CN202511756247.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-03
AI Technical Summary
The robot vacuum cleaner lost its map data due to an abnormal restart and had to be rebuilt from scratch, affecting cleaning efficiency and safety.
During the mapping process, the map is cached in a loop, and after restarting, the last cached map is read, its usability index is calculated, and the map is adaptively selected to be reused directly or rebuilt.
It enables rapid resumption of cleaning tasks, improves cleaning efficiency and user experience, reduces the risk of collisions caused by environmental changes, and enhances operational safety.
Smart Images

Figure CN121597602A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine mapping technology, specifically to a map loss prevention cache and application method, a map loss prevention cache and application device, a processor, a machine-readable storage medium, and a computer program product. Background Technology
[0002] With the rapid development of smart home technology, robotic vacuum cleaners have been widely used in homes and various indoor environments. Their core function relies on real-time generation and utilization of environmental maps through synchronous positioning and mapping technology for intelligent cleaning and efficient navigation. However, in actual operation, robotic vacuum cleaners often experience abnormal restarts due to reasons such as battery depletion, software malfunctions, or human interference. This "abnormal restart" event directly leads to the loss of real-time map data in its memory, causing the mapping or cleaning progress to be interrupted. Users have to wait for the device to restart the mapping task from scratch, which seriously affects cleaning efficiency and user experience.
[0003] Currently, robot vacuum cleaners generally use an incremental approach to map generation. During mapping or cleaning, the robot builds and updates the map in real time using sensor data. However, this map is usually only temporarily stored in the running memory and is considered a temporary, incomplete intermediate state. Only when the user manually ends the entire mapping cycle, or when the system determines that mapping is "complete," is the complete map finally saved to non-volatile memory, becoming a persistent map available for subsequent tasks.
[0004] However, the existing technology has the following problems: (1) Any abnormal restart before the end of the mapping process will cause the intermediate map in the entire incremental construction process to be completely lost. This means that even if the robot has completed the mapping of 90% of the area, it still needs to start from scratch after restarting and cannot recover from the previous progress, resulting in a waste of time and efficiency; (2) Since the environment may have changed even after the mapping is completed, the "final map" loaded after restarting may not accurately reflect the current scene. The existing technology lacks a real-time evaluation mechanism for the validity of the existing map. Directly reusing the map is very likely to cause the robot to collide with the newly added obstacles, thereby affecting the safety of the equipment operation. Summary of the Invention
[0005] The purpose of this invention is to provide a map anti-loss caching and application method, device, processor, and medium to solve the above-mentioned problems.
[0006] To achieve the above objectives, embodiments of the present invention provide a map anti-loss caching and application method, applied to a robotic vacuum cleaner, comprising: Get the current map generated during the mapping process and the mapping time; When the area or mapping time of the current map meets the preset conditions, the current map is stored as a cache map in non-volatile memory. Return to the steps of obtaining the current map and the map building time generated during the mapping or cleaning process, so as to continuously update the cached map; When an exception occurs and a restart occurs, the last cache map stored in non-volatile memory is read, and the availability index of the last cache map stored in non-volatile memory is calculated. If the availability index of the last cached map is greater than the preset availability index, execute the map application operation; otherwise, execute the map reconstruction operation.
[0007] Optionally, the preset conditions include any of the following: The current map area is larger than the preset area; or The mapping time is longer than the preset mapping time.
[0008] Optionally, the availability index of the last stored cached map is calculated, including: Get the number of objects in the last cached map; The structural complexity index of the last cached map is determined based on the number of objects in the last cached map. Based on the area of the last cached map, determine the environment scale index of the last cached map. The usability index of the final cached map is obtained by taking the weighted average of the inverse of the structural complexity index and the environment scale index.
[0009] Optionally, based on the number of objects in the last stored cached map, the structural complexity index of the last stored cached map is determined, including: The objects in the last stored cache map are classified to obtain the static obstacles and dynamic obstacles in the last stored cache map; Get the area of each static obstacle and the speed of each dynamic obstacle in the last stored cache map, and count the number of static obstacles and the number of dynamic obstacles in the last stored cache map. Calculate the ratio of the number of static obstacles and the number of dynamic obstacles in the last stored cache map to the corresponding preset maximum number, and obtain the number factor of static obstacles and the number factor of dynamic obstacles. Calculate the sum of the areas of multiple static obstacles in the last stored cache map to obtain the total area of static obstacles, and calculate the ratio of the total area of static obstacles to the area of the last stored cache map to obtain the area factor of static obstacles. Calculate the average speed of multiple dynamic obstacles in the last stored cached map to obtain the average speed of the dynamic obstacles, and calculate the ratio of the average speed of the dynamic obstacles to the preset safe speed to obtain the speed factor of the dynamic obstacles. Based on the number factor of static obstacles, the area factor of static obstacles, the number factor of dynamic obstacles, and the velocity factor of dynamic obstacles, the structural complexity index of the finally stored cache map is obtained through the following formula. ;in, This represents the structural complexity index of the final cached map. A factor representing the quantity of static obstacles. The area factor representing a static obstacle. A factor representing the number of dynamic obstacles. The velocity factor represents a dynamic obstacle.
[0010] Optionally, based on the area of the last cached map, an environment scale index for the last cached map is determined, including: The area matching ratio is obtained by calculating the ratio of the area of the finally stored cached map to the preset rated area; where the preset rated area is the map area generated by the robot vacuum cleaner when it is fully charged. If the area matching ratio is less than 1, then the area matching ratio will be used as the environment scale index of the last cached map; or If the area matching ratio is greater than 1, the environment scale index of the finally stored cached map is obtained based on the area matching ratio using the following formula. ;in, This represents the environment scale index of the last cached map stored. This indicates the area matching ratio.
[0011] Optionally, map application operations include: map display, map partitioning, and continuing cleaning.
[0012] In a second aspect of the present invention, a map anti-loss cache and application device is provided, applied to a robotic vacuum cleaner, comprising: The data acquisition module is used to acquire the current map generated during the mapping process and the mapping duration. The map caching module is used to store the current map as a cache map in non-volatile memory when the area or mapping time of the current map meets preset conditions. The continuous update module is used to return the steps of obtaining the current map and the map building time during the mapping or cleaning process, so as to continuously update the cached map; The health assessment module is used to read the last cached map from non-volatile memory and calculate the availability index of the last cached map when an anomaly occurs and a restart occurs. The execution scheduling module is used to execute map application operations when the availability index of the last cached map is greater than the preset availability index; otherwise, it executes map reconstruction operations.
[0013] In a third aspect of the present invention, a processor is provided, configured to execute the above-described map anti-loss caching and application method.
[0014] In a fourth aspect of the present invention, a machine-readable storage medium is provided, on which instructions are stored, which, when executed by a processor, cause the processor to be configured to perform the above-described map anti-loss caching and application method.
[0015] In a fifth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the map anti-loss caching and application method described above.
[0016] The beneficial effects of this invention are: (1) This invention solves the problem of the complete loss of the built map due to abnormal restart and the need to rebuild it from scratch by cyclically caching the map during the map building process and reading the last cached map after restart. This enables the rapid recovery of the cleaning task, which not only improves the cleaning efficiency but also improves the user experience.
[0017] (2) This invention effectively solves the collision risk caused by the mismatch between the cached map and the current scene due to environmental changes by calculating the availability index of the cached map after an abnormal restart and adaptively selecting the strategy of directly reusing the map or rebuilding the map according to the index. This improves the operational security.
[0018] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0019] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating the map anti-loss caching and application method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the map anti-loss cache and application device provided in an embodiment of the present invention. Detailed Implementation
[0020] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application.
[0022] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0023] Example 1 like Figure 1 As shown, Figure 1 This is a flowchart illustrating the map anti-loss caching and application method provided in an embodiment of the present invention. The method includes the following steps: S100: Obtain the current map generated during the mapping process and the mapping duration; It should be noted that the subject of this invention is a robotic vacuum cleaner.
[0024] Specifically, the mapping process refers to the entire process by which a robotic vacuum cleaner perceives environmental information through sensors and builds or updates an environmental map, including but not limited to: initial mapping and mapping during the cleaning process.
[0025] Initial mapping: The process by which a robotic vacuum cleaner starts up for the first time in a new environment, exploring and building a complete map from an unknown state.
[0026] Mapping during cleaning: This refers to the process of updating, correcting, exploring, and adding new areas to a map while performing cleaning tasks based on an existing map. Examples include discovering new passable areas during repeated cleaning or updating obstacle information due to furniture movement.
[0027] S200: When the area or mapping time of the current map meets the preset conditions, the current map is stored as a cache map in non-volatile memory. In one embodiment, the preset conditions include any one of the following: the area of the current map is greater than a preset area; or the mapping time is greater than a preset mapping time.
[0028] In another embodiment, the preset conditions include multi-level incremental caching thresholds based on area. Specifically, an initial area threshold and an incremental area threshold are set. When the current map area reaches the initial area threshold, caching is triggered. Subsequently, each time the map area increases by an incremental area threshold, a cache update is triggered. The incremental area threshold is dynamically adjusted according to changes in the total area. For example, the initial area threshold is 50 square meters, and the incremental area threshold is 20 square meters; when the total area reaches 70 square meters, the incremental area threshold is adjusted to 10 square meters; when the total area reaches 100 square meters, the incremental area threshold is adjusted to 5 square meters. Through this multi-level incremental approach, the caching frequency is increased when the map area is large, ensuring the real-time performance and integrity of the map data as the mapping becomes more complete.
[0029] In this embodiment, by intelligently matching the caching frequency with the mapping process, an optimal balance between data security and hardware lifespan is achieved: when the map changes significantly in the early stages of mapping, a larger area increment threshold is used to reduce the number of caching cycles and protect the memory lifespan; while when the map becomes more complete, the increment threshold is automatically reduced to increase the caching frequency, ensuring that high-value, near-complete map details are saved in a timely manner. This significantly reduces the risk of losing critical progress when anomalies occur at the end of the mapping process and ensures the high integrity of the map after restarting.
[0030] In another embodiment, the preset conditions also include dynamic threshold adjustment based on the mapping duration. Specifically, during the mapping process, the initial area threshold and the incremental area threshold are dynamically adjusted according to the mapping duration and the area already generated. For example, during the mapping process... Figure 1 If, after a few minutes, the generated area exceeds 100 square meters, it indicates a large map size. In this case, the initial area threshold is adjusted to 120 square meters, and the incremental area threshold is adjusted to 30 square meters. This dynamic adjustment mechanism can adapt to the mapping progress under different environments and optimize caching.
[0031] In this embodiment, the caching strategy is made adaptable to environmental scale, which significantly improves the robustness of the robot in different home environments: it intelligently predicts the environmental scale by analyzing the area generated per unit time in the early stage of mapping, and dynamically increases the cache trigger threshold for large-scale scenarios, thereby effectively avoiding the problem of excessive caching and resource waste caused by fixed thresholds in large houses. This allows a system to adaptively optimize and achieve efficient cache management and resource utilization in various environments.
[0032] Non-volatile memory refers to computer memory that retains stored data even after power is lost, including but not limited to: Flash memory (such as eMMC, UFS, NAND Flash), solid-state drives (SSDs), ferroelectric RAM (FRAM) that does not lose data when power is lost, or read-only memory (ROM). In this embodiment of the invention, a Flash chip integrated on the main control board of the robotic vacuum cleaner is preferably used as the implementation carrier of the non-volatile memory to reliably store the cached map.
[0033] S300, return to the steps of obtaining the current map and the mapping time generated during the mapping or cleaning process, so as to continuously update the cached map; It should be noted that after the current map is cached for the first time, S100 and S200 are re-executed, and the latest current map is stored in non-volatile memory, overwriting the previously cached current map.
[0034] S400, when an exception occurs and a restart occurs, reads the last cache map stored in non-volatile memory and calculates the availability index of the last cache map stored in non-volatile memory. It's important to note that the usability index of the final cached map quantifies the overall reliability of the map after an abnormal robot restart, ensuring its safe, efficient, and complete reuse in subsequent cleaning tasks. It's not simply an area ratio, but a composite indicator that integrates map environment sufficiency (the degree to which the current map area matches the area covered by a single cleaning task) and structural complexity (the number, density, and activity of static and dynamic obstacles in the map). This index directly determines whether the system can "confidently" and seamlessly resume the task, or whether "re-mapping" is necessary for operational safety, thus achieving an optimal balance between the efficiency advantage of "preventing task interruption" and the reliability requirements of "operational safety."
[0035] Specifically, the availability index of the finally stored cached map is calculated, including: S410, Get the number of objects in the last cached map; Specifically, this is achieved by processing the grid map in the robot vacuum's memory. The system traverses all "occupied" grids in the map and uses a connected component analysis algorithm to cluster adjacent occupied grids into independent object outlines. Each closed connected component is counted as an independent object, and the total number of objects in the map is obtained by counting all such components.
[0036] S420, based on the number of objects in the last stored cache map, determines the structural complexity index of the last stored cache map. Specifically, step S420 includes: S421, classify the objects in the last stored cache map to obtain the static obstacles and dynamic obstacles in the last stored cache map; Specifically, the classification operation relies on a sequence of map snapshots periodically saved during the mapping process. The system compares the final cached map with several historical map frames saved before the restart: objects whose positions and shapes remain stable across multiple map frames are classified as static obstacles (such as furniture); while objects whose positions change significantly or appear and disappear intermittently are classified as dynamic obstacles (such as pedestrians).
[0037] S422, obtain the area of each static obstacle and the speed of each dynamic obstacle in the last stored cache map, and count the number of static obstacles and the number of dynamic obstacles in the last stored cache map. Specifically, based on the classification, the system calculates the total number of grid cells occupied by static obstacles and multiplies it by the actual area of a single grid cell to obtain the physical area; for dynamic obstacles, it calculates the movement speed by combining the centroid displacement between consecutive map frames with the time interval. At the same time, the system counts the identified static and dynamic obstacles separately, and finally outputs the number of static obstacles, the number of dynamic obstacles, and the area and velocity parameters of each object.
[0038] S423, calculate the ratio of the number of static obstacles and the number of dynamic obstacles in the last stored cache map to the corresponding preset maximum number, and obtain the number factor of static obstacles and the number factor of dynamic obstacles. S424, calculate the sum of the areas of multiple static obstacles in the last stored cache map to obtain the total area of static obstacles, and calculate the ratio of the total area of static obstacles to the area of the last stored cache map to obtain the area factor of static obstacles. S425, calculate the average speed of multiple dynamic obstacles in the last stored cache map, obtain the average speed of the dynamic obstacles, and calculate the ratio of the average speed of the dynamic obstacles to the preset safe speed to obtain the speed factor of the dynamic obstacles. S426, based on the number factor of static obstacles, the area factor of static obstacles, the number factor of dynamic obstacles, and the velocity factor of dynamic obstacles, the structural complexity index of the finally stored cache map is obtained through the following formula; ;in, This represents the structural complexity index of the final cached map. A factor representing the quantity of static obstacles. The area factor representing a static obstacle. A factor representing the number of dynamic obstacles. The velocity factor represents a dynamic obstacle.
[0039] S430, based on the area of the last cached map, determines the environment scale index of the last cached map. Specifically, step S430 includes: S431, calculate the ratio of the area of the last stored cached map to the preset rated area to obtain the area matching ratio; where the preset rated area is the map area generated by the robot vacuum cleaner when it is fully charged once. S432, if the area matching ratio is less than 1, then the area matching ratio is used as the environment scale index of the last cached map; or If the area matching ratio is greater than 1, the environment scale index of the finally stored cached map is obtained based on the area matching ratio using the following formula. ;in, This represents the environment scale index of the last cached map stored. This indicates the area matching ratio.
[0040] Specifically, the system calculates an "area matching ratio" (i.e., cached map area / preset rated area). This ratio directly reflects whether the size of the cached map is "sufficient": If the ratio is less than 1, it means the cached map area is smaller than the rated area, and the robot has enough power to clean the entire cached map or even explore more areas. In this case, the environmental scale index is equal to this ratio. The larger the map area, the higher the index, indicating that its scale as a basis is more reliable.
[0041] If the ratio is greater than 1, it means the cached map area has exceeded the robot's cleaning capacity for a single cycle. At this point, even if the map is larger, its actual value to the task has reached its limit and no longer increases linearly with area. Therefore, through the formula... The exponent is calculated, and this function will approach (but never exceed) 2 as the ratio increases, thus setting a score cap for ultra-large-scale maps to prevent them from being overweighted. This reflects a design logic of "diminishing returns".
[0042] S440 calculates the usability index of the last cached map by taking the weighted average of the inverse of the structural complexity index and the environment scale index.
[0043] In one embodiment, the availability index of the last cached map can be calculated using the following formula: ;in, This indicates the availability index of the last cached map stored. This represents the structural complexity index of the final cached map. This represents the environment scale index of the last cached map stored.
[0044] S500: If the availability index of the last cached map is greater than the preset availability index, execute the map application operation; otherwise, execute the map reconstruction operation.
[0045] Specifically, map application operations include: map display, map partitioning, and continuing cleaning.
[0046] Map display refers to the direct presentation of a map restored from the cache onto the accompanying smartphone app or the robot's onboard screen after an abnormal restart of the robotic vacuum cleaner. The core purpose of this feature is to make cleaning tasks visible and manageable. For the user, this means that even if the machine malfunctions and stops working, the user doesn't have to start from scratch; they can immediately see a map of the house that closely resembles the state before the interruption, thus intuitively understanding which areas the robot has already cleaned, its current location, and the general layout of the entire house. This greatly alleviates the user's anxiety caused by machine malfunctions and provides the necessary visual context and decision-making basis for subsequent operations (such as zoning or continuing cleaning).
[0047] Map zoning refers to the ability, based on the displayed cached map, to allow users to manually or automatically divide the entire house map into different independent areas (such as "living room," "bedroom," and "kitchen") within the app. The core purpose of this feature is to enhance the flexibility and precision of cleaning management. For users, this means that once the map is restored, they don't have to perform a full house cleaning every time. They can choose to clean only a specific room (e.g., only the soiled kitchen), or set different cleaning sequences and suction levels for different rooms. This is not merely a simple restoration function, but rather a restoration of precise control over the cleaning process, allowing cleaning tasks to better adapt to the user's immediate needs, thereby significantly improving the user experience and efficiency.
[0048] Continuing cleaning is the highest-level and ultimate application operation. It refers to the robot vacuum intelligently identifying unfinished cleaning areas based on cached maps and its own positioning system, and automatically resuming the cleaning task from the point of interruption or the nearest reachable point. The core purpose of this function is to maximize cleaning efficiency and avoid repetitive work and energy waste. For users, this means that the robot will no longer have to "forget" and start cleaning the entire house again after restarting, but can "remember" its previous work progress and only clean the areas it hasn't had time to clean. This directly solves the core pain point of doubled cleaning time and wasted power due to map loss, achieving "seamless continuation" of the task, which is the most crucial step in improving the user experience.
[0049] To make it easier to understand, the following examples are provided: Assumption: Preset available index = 0.6.
[0050] Scenario: During a comprehensive mapping and cleaning process, the robot vacuum cleaner suddenly shut down due to battery depletion when the task was about 70% complete. After restarting, it read the last cached map stored in non-volatile memory and calculated that the usability index of the last cached map was 0.7.
[0051] Since the available index 0.7 satisfies the condition 0.7 > 0.6, the following operation is performed: 1. Perform map application operations: The map displayed on the robot's mobile app immediately showed a cached map covering approximately 70% of the house. Users could see the living room, dining room, and part of the hallway, which had already been successfully mapped, but the bedrooms and study were still blank. This gave users a clear overview of the cleaning progress.
[0052] Map Zoning: On the displayed map, the system has automatically or will allow users to manually divide the mapped living room and dining room into separate cleaning areas.
[0053] Continue cleaning: The robot plans an optimal path from the current charging station to the uncleaned areas (bedroom and study) and prepares to start cleaning.
[0054] The beneficial effects of this invention are: (1) This invention solves the problem of the complete loss of the built map due to abnormal restart and the need to rebuild it from scratch by cyclically caching the map during the map building process and reading the last cached map after restart. This enables the rapid recovery of the cleaning task, which not only improves the cleaning efficiency but also improves the user experience.
[0055] (2) This invention effectively solves the collision risk caused by the mismatch between the cached map and the current scene due to environmental changes by calculating the availability index of the cached map after an abnormal restart and adaptively selecting the strategy of directly reusing the map or rebuilding the map according to the index. This improves the operational security.
[0056] Example 2 Based on the same inventive concept, such as Figure 2 As shown, this embodiment of the invention also provides a map anti-loss cache and application device 200, applied to a sweeping robot, including: Data acquisition module 210 is used to acquire the current map generated during the mapping process and the mapping duration; The map caching module 220 is used to store the current map as a cache map in non-volatile memory when the area or mapping time of the current map meets the preset conditions. The continuous update module 230 is used to return the steps of obtaining the current map and the map building time generated during the mapping or cleaning process, so as to continuously update the cached map; The health assessment module 240 is used to read the last cached map from the non-volatile memory and calculate the availability index of the last cached map when an anomaly occurs and a restart occurs. The execution scheduling module 250 is used to execute map application operations when the availability index of the last stored cached map is greater than the preset availability index; otherwise, it executes map reconstruction operations.
[0057] It should be understood that this device corresponds to the map anti-loss caching and application method embodiment described above, and is capable of performing the various steps involved in the above method embodiment. The specific functions of this device can be found in the description above, and detailed descriptions are omitted here to avoid repetition. The device includes at least one software function module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware.
[0058] Example 3 Based on the same inventive concept, embodiments of the present invention also provide an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the above-described map anti-loss caching and application method is executed.
[0059] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0060] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0061] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0062] Example 4 Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the above-described map anti-loss caching and application method.
[0063] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0064] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0067] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not describe the various possible combinations separately.
[0068] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0069] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0070] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A map anti-loss caching and application method, applied to a robotic vacuum cleaner, characterized in that, include: Get the current map generated during the mapping process and the mapping time; When the area or mapping time of the current map meets the preset conditions, the current map is stored as a cache map in non-volatile memory. Return to the steps of obtaining the current map and the map building time generated during the mapping or cleaning process, so as to continuously update the cached map; When an exception occurs and a restart occurs, the last cache map stored in non-volatile memory is read, and the availability index of the last cache map stored in non-volatile memory is calculated. If the availability index of the last cached map is greater than the preset availability index, execute the map application operation; Otherwise, perform a map reconstruction operation.
2. The map anti-loss caching and application method according to claim 1, characterized in that, The preset conditions include any of the following: The current map area is larger than the preset area; or The mapping time is longer than the preset mapping time.
3. The map anti-loss caching and application method according to claim 1, characterized in that, Calculate the availability index of the last cached map, including: Get the number of objects in the last cached map; The structural complexity index of the last cached map is determined based on the number of objects in the last cached map. Based on the area of the last cached map, determine the environment scale index of the last cached map. The usability index of the final cached map is obtained by taking the weighted average of the inverse of the structural complexity index and the environment scale index.
4. The map anti-loss caching and application method according to claim 3, characterized in that, Based on the number of objects in the last stored cached map, determine the structural complexity index of the last stored cached map, including: The objects in the last stored cache map are classified to obtain the static obstacles and dynamic obstacles in the last stored cache map; Get the area of each static obstacle and the speed of each dynamic obstacle in the last stored cache map, and count the number of static obstacles and the number of dynamic obstacles in the last stored cache map. Calculate the ratio of the number of static obstacles and the number of dynamic obstacles in the last stored cache map to the corresponding preset maximum number, and obtain the number factor of static obstacles and the number factor of dynamic obstacles. Calculate the sum of the areas of multiple static obstacles in the last stored cache map to obtain the total area of static obstacles, and calculate the ratio of the total area of static obstacles to the area of the last stored cache map to obtain the area factor of static obstacles. Calculate the average speed of multiple dynamic obstacles in the last stored cache map to obtain the average speed of the dynamic obstacles, and calculate the ratio of the average speed of the dynamic obstacles to the preset safe speed to obtain the speed factor of the dynamic obstacles. Based on the number factor of static obstacles, the area factor of static obstacles, the number factor of dynamic obstacles, and the velocity factor of dynamic obstacles, the structural complexity index of the finally stored cached map is obtained through the following formula. ;in, This represents the structural complexity index of the final cached map. A factor representing the quantity of static obstacles. The area factor representing a static obstacle. A factor representing the number of dynamic obstacles. The velocity factor represents a dynamic obstacle.
5. The map anti-loss caching and application method according to claim 3, characterized in that, Based on the area of the last cached map, determine the environment scale index of the last cached map, including: The area matching ratio is obtained by calculating the ratio of the area of the finally stored cached map to the preset rated area; where the preset rated area is the map area generated by the robot vacuum cleaner when it is fully charged. If the area matching ratio is less than 1, then the area matching ratio will be used as the environment scale index of the last cached map; or If the area matching ratio is greater than 1, the environment scale index of the finally stored cached map is obtained based on the area matching ratio using the following formula. ;in, This represents the environment scale index of the last cached map stored. This indicates the area matching ratio.
6. The map anti-loss caching and application method according to claim 1, characterized in that, Map application operations include: map display, map partitioning, and continuing cleaning.
7. A map anti-loss cache and application device, applied to a sweeping robot, characterized in that, include: The data acquisition module is used to acquire the current map generated during the mapping process and the mapping duration. The map caching module is used to store the current map as a cache map in non-volatile memory when the area or mapping time of the current map meets preset conditions. The continuous update module is used to return the steps of obtaining the current map and the map building time during the mapping or cleaning process, so as to continuously update the cached map; The health assessment module is used to read the last cached map from non-volatile memory and calculate the availability index of the last cached map when an anomaly occurs and a restart occurs. The execution scheduling module is used to execute map application operations when the availability index of the last cached map is greater than the preset availability index; otherwise, it executes map reconstruction operations.
8. A processor, characterized in that, It is configured to perform the map anti-loss caching and application method according to any one of claims 1 to 6.
9. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the map anti-loss caching and application method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the map anti-loss caching and application method according to any one of claims 1 to 6.