Regional map processing method and device, storage medium and electronic device
By setting closed-loop detection conditions and information collection components on the cleaning equipment to collect environmental information and updating the map of the target area, the problem of poor stability of the regional map caused by the accumulation of equipment positioning errors is solved, and more stable positioning and map construction are achieved.
Patent Information
- Application Number
- CN202310558122.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2024-11-29
AI Technical Summary
During the long-term operation of existing cleaning equipment, due to the accumulation of equipment positioning errors, the stability of the regional map cannot be maintained in the stable state of positioning and map construction for a long period of time.
By setting closed-loop detection conditions on the cleaning equipment, using the information collection components to collect environmental information for closed-loop detection, the map of the target area is updated when the preset conditions are met, the equipment positioning and map construction are optimized, and the positioning error accumulation is reduced.
It improves the positioning of cleaning equipment and the stability of map construction, reduces resource consumption, enhances user experience, and avoids the situation of stacking maps or distorting maps.
Smart Images

Figure CN119045468A_ABST
Abstract
Description
[Technical field]
[0001] The present application relates to the field of smart home, and more specifically, to a method and device for processing an area map, a storage medium, and an electronic device. [Background technology]
[0002] At present, common cleaning equipment (e.g., sweeping robots, floor scrubbers, etc.) can be equipped with a variety of sensors, such as laser radar, camera, inertial measurement unit (IMU), etc. The configured sensors can provide accurate positioning information for the cleaning equipment and build a grid map describing the scene. However, with the long-term machine movement of the cleaning equipment and various comer cases, the equipment positioning and constructed map cannot guarantee a long-term stable state.
[0003] It can be seen that the method for processing the regional map in the related art has the problem of poor stability of the regional map due to the accumulation of device positioning errors. [Summary of the invention]
[0004] The purpose of the present application is to provide a method and device for processing an area map, a storage medium and an electronic device, so as to at least solve the problem of poor stability of the area map caused by the accumulation of device positioning errors in the method for processing the area map in the related art.
[0005] The purpose of this application is to achieve the following technical solutions:
[0006] According to one aspect of an embodiment of the present application, a method for processing an area map is provided, comprising: while a cleaning device is moving within a target area, environmental information is collected by an information collection component on the cleaning device; when a preset closed-loop detection condition is met, a closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether a closed loop exists in the moving route of the cleaning device; when the closed-loop detection result is used to indicate that a closed loop exists in the moving route of the cleaning device, the target area map of the target area is updated using the current environmental information.
[0007] In an exemplary embodiment, while the cleaning device is moving in the target area, environmental information is collected by an information collection component on the cleaning device, including: while the cleaning device is performing area cleaning in the target area along a target cleaning route, environmental information is collected by the information collection component on the cleaning device, wherein the target cleaning route includes a plurality of bow-shaped cleaning sections.
[0008] In an exemplary embodiment, the method further includes: in response to the acquired target cleaning instruction, selecting the target cleaning route that matches the target cleaning instruction from a preset set of cleaning routes, wherein the target cleaning instruction is a cleaning instruction for updating a regional map while performing regional cleaning.
[0009] In an exemplary embodiment, when a preset closed-loop detection condition is met, a closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result, including: when the rotation angle of the cleaning device is within the preset angle range, determining the distance and time that the cleaning device moves along the direction after rotation to obtain a target distance and a target time; when the target distance is greater than or equal to a preset distance threshold, and the target time is greater than or equal to a preset time threshold, a closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain the closed-loop detection result.
[0010] In an exemplary embodiment, after determining the distance and time that the cleaning device moves along the direction after rotation, the method further includes: determining that the preset closed-loop detection condition is not met when the target distance is less than a preset distance threshold and / or the target time is less than a preset time threshold.
[0011] In an exemplary embodiment, the method further includes: determining that the preset closed-loop detection condition is not satisfied when the rotation angle of the cleaning device is within the preset angle range and the rotation angle of the cleaning device is within the preset angle range only once.
[0012] In an exemplary embodiment, while the cleaning device is moving within the target area, environmental information is collected by an information collection component on the cleaning device, including: while the cleaning device is moving within the target area, image collection is collected by an image collection component on the cleaning device, wherein closed-loop detection is performed based on the scene image collected by the image collection component.
[0013] In an exemplary embodiment, when a preset closed-loop detection condition is met, a closed-loop detection is performed based on the current environmental information collected by the information acquisition component to obtain a closed-loop detection result, including: when the preset closed-loop detection condition is met, matching the current scene image collected by the image acquisition component with the historical scene image collected by the image acquisition component; and determining the closed-loop detection result based on whether there is a historical scene image matching the current scene image in the historical scene images collected by the image acquisition component.
[0014] In an exemplary embodiment, after matching the current scene image captured by the image acquisition component with the historical scene images captured by the image acquisition component, the method further includes: determining that there are historical scene images matching the current scene image in the historical scene images captured by the image acquisition component, if there are historical scene images whose image similarity with the current scene image is greater than or equal to a preset similarity threshold among the historical scene images captured by the image acquisition component; and determining that there are no historical scene images matching the current scene image in the historical scene images captured by the image acquisition component, if there are no historical scene images whose image similarity with the current scene image is greater than or equal to a preset similarity threshold among the historical scene images captured by the image acquisition component.
[0015] In an exemplary embodiment, when the closed-loop detection result is used to indicate that a closed loop exists in the moving route of the cleaning device, the target area map of the target area is updated using the current environmental information, including: when the closed-loop detection result is used to indicate that a closed loop exists in the moving route of the cleaning device, the target area map is updated according to the current environmental information and target historical environmental information that matches the current environmental information, wherein the closed-loop detection result is determined based on the matching relationship between the current environmental information and the target historical environmental information.
[0016] In an exemplary embodiment, before using the current environmental information to update the target area map of the target area, the method further includes: performing image acquisition through an image acquisition component on the cleaning device to obtain a current scene image, and acquiring current measurement data of an inertial measurement unit on the cleaning device, wherein the current environmental information includes the current scene image and the current measurement data.
[0017] In an exemplary embodiment, the method further includes: after the target area map is last updated and the total time the cleaning device moves within the target area reaches a preset time threshold, sending a map update prompt message through the cleaning device to prompt an update of the target area map.
[0018] According to another aspect of an embodiment of the present application, a device for processing an area map is also provided, including: a first acquisition unit, used to collect environmental information through an information acquisition component on a cleaning device during the process of the cleaning device moving in a target area; a detection unit, used to perform closed-loop detection based on current environmental information collected by the information acquisition component when a preset closed-loop detection condition is met, and obtain a closed-loop detection result, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device; an updating unit, used to update the target area map of the target area using the current environmental information when the closed-loop detection result is used to indicate that there is a closed loop in the moving route of the cleaning device.
[0019] In an exemplary embodiment, the first acquisition unit includes: a first acquisition module, which is used to collect environmental information through the information acquisition component on the cleaning device during the process of the cleaning device performing area cleaning in the target area along a target cleaning route, wherein the target cleaning route includes a plurality of bow-shaped cleaning sections.
[0020] In an exemplary embodiment, the device also includes: a selection unit, which is used to select the target cleaning route that matches the target cleaning instruction from a preset set of cleaning routes in response to the acquired target cleaning instruction, wherein the target cleaning instruction is a cleaning instruction for updating a regional map while performing regional cleaning.
[0021] In an exemplary embodiment, the detection unit includes: a first determination module, which is used to determine the distance and time that the cleaning device moves in the direction after rotation when the rotation angle of the cleaning device is within the preset angle range, and obtain the target distance and target time; a detection module, which is used to perform closed-loop detection based on the current environmental information collected by the information collection component when the target distance is greater than or equal to a preset distance threshold and the target time is greater than or equal to a preset time threshold, and obtain the closed-loop detection result.
[0022] In an exemplary embodiment, the device also includes: a first determination unit, which is used to determine that the preset closed-loop detection condition is not met after determining the distance and time that the cleaning device has moved along the direction after rotation, when the target distance is less than a preset distance threshold and / or the target time is less than a preset time threshold.
[0023] In an exemplary embodiment, the device also includes: a second determination unit, configured to determine that the preset closed-loop detection condition is not satisfied when the rotation angle of the cleaning device is within the preset angle range and the rotation angle of the cleaning device is within the preset angle range only once.
[0024] In an exemplary embodiment, the first acquisition unit includes: a second acquisition module, which is used to acquire images through an image acquisition component on the cleaning device during the movement of the cleaning device in the target area, wherein the closed-loop detection is performed based on the scene image acquired by the image acquisition component.
[0025] In an exemplary embodiment, the detection unit includes: a matching module, which is used to match the current scene image captured by the image acquisition component with the historical scene image captured by the image acquisition component when the preset closed-loop detection condition is met; and a second determination module, which is used to determine the closed-loop detection result according to whether there is a historical scene image matching the current scene image in the historical scene images captured by the image acquisition component.
[0026] In an exemplary embodiment, the device also includes: a third determination unit for determining, after matching the current scene image captured by the image acquisition component with the historical scene images captured by the image acquisition component, that there is a historical scene image matching the current scene image in the historical scene images captured by the image acquisition component, if there is a historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold in the historical scene images captured by the image acquisition component; and a fourth determination unit for determining, if there is no historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold in the historical scene images captured by the image acquisition component.
[0027] In an exemplary embodiment, the update unit includes: an update module, which is used to update the target area map according to the current environmental information and the target historical environmental information matching the current environmental information when the closed-loop detection result is used to indicate that there is a closed loop in the moving route of the cleaning equipment, wherein the closed-loop detection result is determined based on the matching relationship between the current environmental information and the target historical environmental information.
[0028] In an exemplary embodiment, the device also includes: a second acquisition unit, which is used to perform image acquisition through the image acquisition component on the cleaning device to obtain a current scene image and obtain current measurement data of the inertial measurement unit on the cleaning device before updating the target area map of the target area using the current environmental information, wherein the current environmental information includes the current scene image and the current measurement data.
[0029] In an exemplary embodiment, the device also includes: a sending unit, which is used to send a map update prompt message through the cleaning device to prompt the update of the target area map when the total time the cleaning device moves in the target area reaches a preset time threshold after the target area map was last updated.
[0030] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned interface testing method when running.
[0031] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the interface testing method through the computer program.
[0032] In an embodiment of the present application, a closed-loop detection condition is set and map information is updated when the closed-loop detection condition is met. In the process of the cleaning device moving in the target area, environmental information is collected by the information collection component on the cleaning device; when the preset closed-loop detection condition is met, a closed-loop detection is performed according to the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device; when the closed-loop detection result is used to indicate that there is a closed loop in the moving route of the cleaning device, the target area map of the target area is updated using the current environmental information. When the cleaning device moves in a specific area, whether the preset closed-loop detection condition is met is determined based on the rotation angle of the cleaning device. If the closed-loop detection condition is met, it can be determined that there is a closed loop in the moving route of the cleaning device, so that according to the current environmental information, the area map is updated (i.e., the area map is optimized), the purpose of reducing the accumulation of device positioning errors can be achieved, and the technical effect of improving the stability of the area map can be achieved, thereby solving the problem of poor stability of the area map caused by the accumulation of device positioning errors in the area map processing method in the related art.
Brief Description of the Drawings
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0035] Figure 1 is a schematic diagram of a hardware environment of an optional method for processing a regional map according to an embodiment of the present application;
[0036] Figure 2 is a flowchart of an optional method for processing a regional map according to an embodiment of the present application;
[0037] Figure 3 is a flowchart of another optional method for processing a regional map according to an embodiment of the present application;
[0038] Figure 4 is a structural block diagram of an optional regional map processing device according to an embodiment of the present application;
[0039] Figure 5It is a structural block diagram of an optional electronic device according to an embodiment of the present application. [Specific implementation method]
[0040] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0042] According to one aspect of an embodiment of the present application, a method for processing a region map is provided. Optionally, in this embodiment, the method for processing a region map can be applied to Figure 1 In the hardware environment shown in FIG. 1 , a terminal device 102, a cleaning device 104 and a server 106 are formed. Figure 1 As shown, the terminal device 102 can be connected to the cleaning device 104 and / or the server 106 (e.g., an IoT platform or a cloud server) through a network to control the cleaning device 104, for example, to bind with the cleaning device 104 and configure the cleaning function of the cleaning device 104. The cleaning device 104 may include a host and a base station (e.g., a sweeper and a base station, a scrubber and a base), and the host and the base station may be connected through a network to determine the current state of the other end (e.g., power state, working state, location information, etc.).
[0043] The above-mentioned network may include but is not limited to at least one of the following: wired network, wireless network. The above-mentioned wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the above-mentioned wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth, infrared. The network used by the terminal device 102 to communicate with the cleaning device 104 and / or the server 106 and the network used by the cleaning device 104 to communicate with the server 106 may be the same or different. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, etc. The cleaning device 104 may include but is not limited to: a cleaning robot, for example, a sweeping robot (i.e., a sweeping machine), a floor washing robot (i.e., a floor washing machine), an automatic mop washing robot, etc. The server 106 may be a server of the Internet of Things platform.
[0044] The method for processing the area map of the embodiment of the present application may be executed by the terminal device 102, the cleaning device 104 or the server 106 alone, or may be executed jointly by at least two of the terminal device 102, the cleaning device 104 and the server 106. The method for processing the area map of the embodiment of the present application executed by the terminal device 102 or the cleaning device 104 may also be executed by a client installed thereon.
[0045] Taking the method for processing the area map in this embodiment executed by the cleaning device 104 as an example, Figure 2 is a flow chart of an optional method for processing a regional map according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0046] Step S202: When the cleaning device moves in the target area, environmental information is collected by an information collection component on the cleaning device.
[0047] The area map processing method in this embodiment can be applied to the scenario where the target area map of the target area is optimized by a cleaning device. The cleaning device can be the aforementioned sweeping robot, floor washing robot, automatic mop washing robot, etc. The cleaning device can be installed with cleaning parts (for example, roller brushes, mops or other components with cleaning functions) for cleaning the target area. The target area can be a preset cleaning area of the cleaning device, and can be an indoor area, such as a residence, office, workshop, etc.
[0048] The area map of the target area is the target area map. The target area map can be an area map constructed based on the environmental information collected by the information collection component during the movement of the cleaning equipment in the target area, or it can be an area map pre-configured in the cleaning equipment, or it can be an area map obtained by updating the constructed area map. The type of the target area map can be a two-dimensional grid map or a three-dimensional space map, which is not limited in this embodiment.
[0049] In the related technology, the equipment positioning and constructed maps of cleaning equipment cannot guarantee a stable state for a long period of time. For example, the solution of positioning and constructing maps through laser radar can perform relatively accurate positioning and map construction in a short period of time. However, as time accumulates, the errors in the working process of the sweeping robot are also accumulating. In addition, since the internal matching logic of the algorithm for constructing maps of the sweeping robot is based on scan-match, in special cases where the sweeping robot slips or cannot move, the error will increase, resulting in deviations in the positioning of the sweeping robot, and overlapping or distorted maps in the constructed maps, which greatly reduces the user experience.
[0050] In order to improve the stability of equipment positioning and map construction of cleaning equipment, positioning and map construction can be carried out by replacing more precise sensors, adding additional sensors, fusing lidar and visual sensors, etc. However, the above solutions require additional costs or additional resource consumption, or are subject to various constraints and restrictions during actual use. They cannot be widely used in sweeping robots without increasing costs, and it is also difficult to achieve the purpose of keeping the robot's positioning function and the robot's map construction function in a stable state over a long period of time.
[0051] In order to at least partially solve the above problems, in this embodiment, when the cleaning device moves in a specific area, it is determined whether the preset closed-loop detection condition is met based on the rotation angle of the cleaning device. If the closed-loop detection condition is met, it can be determined that there is a closed loop in the moving route of the cleaning device, so that the area map can be updated according to the current environmental information, that is, the constructed map is optimized. By continuously optimizing the constructed map, the accumulation of equipment positioning errors can be reduced and the stability of equipment positioning and map construction can be improved.
[0052] In this embodiment, while the cleaning device is moving in the target area, environmental information is collected through the information collection component on the cleaning device. The cleaning device may be moving in the target area based on the current task to be performed. The task to be performed may be a cleaning task, a map building task, or other types of tasks. The information collection component may include one or more, including but not limited to at least one of the following: a laser radar, a camera, a video camera, an inertial measurement unit. The number of each information collection component may be one or more, and the component position of each information collection component may be the same or different. In this embodiment, the number and position of the information collection components are not limited. For example, the information collection component of the sweeping robot may include an image collection component (e.g., a camera or a video camera), and the collected environmental information may include a scene image. Here, the image collection component may include depth information, which can facilitate the positioning of the cleaning device.
[0053] Step S204, when the preset closed-loop detection conditions are met, a closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection conditions include that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device.
[0054] During the movement within the target area, the cleaning device can perform closed-loop detection (i.e., loop detection, which refers to identifying whether a certain scene has been reached) based on the environmental information collected by the information collection components thereon to determine whether there is a closed loop in the moving route of the cleaning device. Thus, when a closed loop is detected, the positioning deviation of the cleaning device can be optimized to eliminate the accumulation of equipment positioning errors, optimize the map information of the target area map, and avoid overlapping or distorted images in the target area map.
[0055] However, frequent closed-loop detection will increase resource consumption. For example, when the information acquisition component of the cleaning equipment includes an image acquisition component, if closed-loop detection is performed based on each frame of scene image acquired by the image acquisition component, the cost of closed-loop detection is high and greatly increases resource consumption.
[0056] In order to at least partially solve the above problems, closed-loop detection conditions can be set in advance, that is, preset closed-loop detection conditions. The preset closed-loop detection conditions are used to limit the conditions that need to be met for closed-loop detection, and can include the rotation angle of the cleaning device being within a preset angle range. The preset angle range here is used to limit the rotation angle of the cleaning device to a right angle (allowing the rotation angle to have a certain fluctuation range), and can also be used to limit the rotation angle of the cleaning device to a straight angle (allowing the rotation angle to have a certain fluctuation range), and can also be other angle ranges; in addition to the preset angle range, the preset closed-loop detection conditions can also include other time and space constraints to further avoid false triggering of closed-loop detection due to abnormal conditions of the cleaning equipment.
[0057] In this embodiment, if it is detected that the preset closed-loop detection conditions are met, a closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result; if the preset closed-loop detection conditions are not met, there is no need to perform a closed-loop detection, which can reduce the false triggering of closed-loop detection under non-essential conditions, thereby minimizing resource consumption. At the same time, a regional map can be constructed or optimized in a short time, thereby improving the user experience.
[0058] Optionally, there may be multiple ways to perform closed-loop detection. For example, the existence of a closed loop may be determined by detecting the number of right angles achieved by the cleaning device when it rotates in a specific direction, and when the number reaches an integer multiple of 2. Alternatively, the current environmental information collected by the information collection component may be matched with the historical environmental information collected by the information collection component to determine whether the moving route of the cleaning device has a closed loop. Thus, a closed-loop detection result may be obtained to indicate whether the moving route of the cleaning device has a closed loop.
[0059] Step S206 , when the closed-loop detection result indicates that the moving route of the cleaning device has a closed loop, the target area map of the target area is updated using the current environmental information.
[0060] The closed-loop detection result may be that the moving route of the cleaning device has a closed loop, or that the moving route of the cleaning device does not have a closed loop. In the case where the closed-loop detection result indicates that the moving route of the cleaning device has a closed loop, the target area map may be updated based on the current environmental information, which may be based on the environmental information used to determine that the moving route of the cleaning device has a closed loop, or based on environmental information collected after determining that the moving route of the cleaning device has a closed loop.
[0061] Through the above steps S202 to S206, while the cleaning device is moving in the target area, environmental information is collected through the information collection component on the cleaning device; when the preset closed-loop detection conditions are met, closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection conditions include that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device; when the closed-loop detection result is used to indicate that a closed loop exists in the moving route of the cleaning device, the target area map of the target area is updated using the current environmental information, thereby solving the problem of poor stability of the area map due to the accumulation of equipment positioning errors in the area map processing method in the related art, and improving the stability of the area map.
[0062] In an exemplary embodiment, when the cleaning device moves in the target area, environmental information is collected by an information collection component on the cleaning device, including:
[0063] S11, when the cleaning device is performing area cleaning in the target area along the target cleaning route, environmental information is collected by an information collection component on the cleaning device, wherein the target cleaning route includes a plurality of bow-shaped cleaning sections.
[0064] The route that the cleaning equipment uses to perform regional cleaning in the target area may be a pre-set cleaning route. In the present embodiment, the route that the cleaning equipment uses to perform regional cleaning may be a target cleaning route. The target cleaning route may include multiple bow-shaped cleaning sections. The bow-shaped cleaning section means that the cleaning equipment moves in a straight line along a specific direction, and after turning, moves in a direction opposite to the specific direction. Here, based on the control logic of existing machines, bow-shaped cleaning is naturally more friendly to visual loops. During bow-shaped cleaning, the machine will frequently turn back to pass through areas that have been "seen" before. In this way, positioning deviations can be corrected based on the visual closed-loop strategy. Visual closed-loop assisted map construction based on bow-shaped logic can eliminate cumulative errors, thereby optimizing the overlapping and distorted images brought to the map.
[0065] During the process of the cleaning equipment performing regional cleaning in the target area along the target cleaning route, due to the existence of a bow-shaped cleaning section on the target cleaning route, the cleaning equipment will make multiple right-angle turns during the movement, and the right-angle turns of the equipment will make it more likely that the preset closed-loop detection conditions will be met, so that while the cleaning equipment is performing regional cleaning, the environmental information collected by the information collection component can be continuously used to update the regional map.
[0066] Here, when the cleaning equipment is cleaning along the bow-shaped cleaning section, it will make multiple back-and-forth movements, and the collection fields of the information collection components on the cleaning equipment will overlap to a large extent, that is, the cleaning equipment will frequently repeat the information collection in the area where the information has been collected, so there will be multiple closed loops in the route of the cleaning equipment, and by updating the regional map multiple times, the comprehensiveness of the regional map update can be improved. At the same time, the cleaning equipment on the bow-shaped cleaning section rotates less, which can reduce the possibility of false triggering of closed-loop detection.
[0067] For example, the control logic of a sweeper is to make the robot do a bow-shaped cleaning, that is, after the robot moves in a straight line, it will turn and move in the opposite direction. This allows the machine to make a back-and-forth motion during work, ensuring that the visual field will overlap to a large extent. By updating the area map while the sweeper is performing a bow-shaped cleaning, the comprehensiveness of the area map update can be improved.
[0068] Through this embodiment, by controlling the cleaning device to perform regional cleaning along multiple bow-shaped cleaning sections in the target area, the comprehensiveness of regional map updating can be improved and the possibility of false triggering of closed-loop detection can be reduced.
[0069] In an exemplary embodiment, the method further comprises:
[0070] S21, in response to the acquired target cleaning instruction, selecting a target cleaning route matching the target cleaning instruction from a set of preset cleaning routes, wherein the target cleaning instruction is a cleaning instruction for updating a regional map while performing regional cleaning.
[0071] If the cleaning device updates the regional map every time it performs regional cleaning, it will cause unnecessary resource occupation. In order to reduce the occupation of resources, a set of cleaning routes that are convenient for updating the regional map can be preset, such as a bow-shaped cleaning route (i.e., a target cleaning route), a U-shaped cleaning route, a diagonal cleaning route, etc. Each cleaning route in a set of cleaning routes can correspond to a different cleaning instruction, and the normal cleaning method of only performing regional cleaning can be configured with cleaning instructions different from those of performing regional cleaning and updating the regional map at the same time. Here, the cleaning route for only performing regional cleaning can be planned in real time.
[0072] In this embodiment, when the cleaning device receives a target cleaning instruction, a target cleaning route that matches the target cleaning instruction can be selected from a set of preset cleaning routes, and based on the selected target cleaning route, while performing regional cleaning on the target area, the regional map is updated based on the environmental information collected by the information collection component. Here, the target cleaning instruction is used to indicate that regional cleaning and regional map updating are performed simultaneously. The target cleaning instruction can be obtained by the cleaning device detecting a preset operation performed on the cleaning device, or it can be received from a terminal device that matches the cleaning device, or it can be obtained by other means, which is not limited in this embodiment.
[0073] Through this embodiment, by presetting cleaning instructions for performing area cleaning and area map updating at the same time and corresponding cleaning routes, it is possible to reduce unnecessary occupation of resources by area map updating and improve resource utilization.
[0074] In an exemplary embodiment, when a preset closed-loop detection condition is met, a closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result, including:
[0075] S31, when the rotation angle of the cleaning device is within a preset angle range, determining the distance and time that the cleaning device moves along the direction after rotation, and obtaining a target distance and a target time;
[0076] S32, when the target distance is greater than or equal to a preset distance threshold, and the target time is greater than or equal to a preset time threshold, a closed-loop detection is performed according to the current environment information collected by the information collection component to obtain a closed-loop detection result.
[0077] During the movement of the cleaning device, if there is a bump or collision with an obstacle, the rotation angle of the cleaning device may be within the preset angle range. If the cleaning device is closed-loop detected every time the rotation angle of the cleaning device is within the preset angle range, it may cause the closed-loop detection to be too frequent, increasing the resource consumption of the cleaning device. In this regard, when the rotation angle of the cleaning device is within the preset angle range, other constraints in the preset closed-loop detection conditions can be used to determine whether the preset closed-loop conditions are met.
[0078] In this embodiment, when the rotation angle of the cleaning device is within the preset angle range, the distance and time that the cleaning device moves in the direction after rotation can be obtained to obtain the target distance and target time. Here, the statistics of the distance and time that the cleaning device moves in the direction after rotation can be continuously performed until the moving direction of the cleaning device continues to change (that is, the cleaning device continues to rotate). Correspondingly, the preset closed-loop detection condition can also include: the distance that the cleaning device moves in the direction after rotation is greater than or equal to the preset distance threshold, and the time that the cleaning device moves in the direction after rotation is greater than or equal to the preset time threshold.
[0079] If the target distance is greater than or equal to the preset distance threshold, and the target time is greater than or equal to the preset time threshold, it can be determined that the preset closed-loop detection condition is met, and a closed-loop detection can be performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result. Here, the preset distance threshold and the preset time threshold can be default values configured in the cleaning device, or can be values manually configured by the user, which is not limited in this embodiment.
[0080] For example, a sweeper (and other similar cleaning equipment) may bump or turn during movement. If a small right angle is detected (the movement time and distance in the same direction are short), closed-loop detection will often be required, and frequent closed-loop detection will increase resource consumption. To this end, based on the visual closed-loop strategy, the timing of the closed-loop can be selected according to the detection strategy of "large right angles" (i.e., turning) and the constraints of time and space to exclude small-scale movements and perform closed-loop detection only when there are large right angles. This can eliminate the cumulative errors caused by long-period movements and minimize resource consumption, so as to assist the machine in building a better map in the shortest time and improve the user experience.
[0081] Through this embodiment, by setting closed-loop detection conditions from different angles such as rotation angle, movement time and movement distance, it is possible to eliminate the cumulative error caused by long-period motion while minimizing resource consumption.
[0082] In an exemplary embodiment, after determining the distance and time that the cleaning device moves along the direction after rotation, the method further includes:
[0083] S41, when the target distance is less than a preset distance threshold and / or the target time is less than a preset time threshold, determining that a preset closed-loop detection condition is not satisfied.
[0084] In this embodiment, determining the distance and time that the cleaning device moves in the direction after rotation can be a dynamic process, and whether the preset closed-loop detection condition is satisfied can be determined by determining the relationship between the target distance and the preset distance threshold and the relationship between the target time and the preset time threshold in real time. If the target distance is less than the preset distance threshold and / or the target time is less than the preset time threshold, it can be determined that the preset closed-loop detection condition is not satisfied. At this time, the angular rotation of the cleaning device may be caused by the cleaning device being bumped or colliding with an obstacle, and no closed-loop detection is required.
[0085] Through this embodiment, when the distance and time that the cleaning device moves in the direction after rotation do not meet the specified threshold conditions, closed-loop detection is not performed, which can improve resource utilization.
[0086] In an exemplary embodiment, the method further comprises:
[0087] S51, when the rotation angle of the cleaning device is within the preset angle range, and the rotation angle of the cleaning device is within the preset angle range only once, determining that a preset closed-loop detection condition is not satisfied.
[0088] In this embodiment, the preset angle range can be used to limit the rotation angle of the cleaning device to a right angle, that is, it is used to limit the angle range set for the right-angle rotation of the cleaning device, for example, 90±n°, where n can be a smaller angle, for example, 3, 5, 10, etc. When the closed-loop detection is performed when the cleaning device rotates for the first time within the preset angle range, it is very likely that no closed loop will be detected (because the cleaning device has only rotated a large right angle, and no closed loop exists at this time).
[0089] In this embodiment, when the rotation angle of the cleaning device is within the preset angle range, the number of times the rotation angle of the cleaning device is within the preset angle range can be determined. If the rotation angle of the cleaning device is within the preset angle range only once, that is, the rotation angle of the cleaning device is within the preset angle range for the first time, the current environmental information collected by the cleaning device is not the same as or similar to the environmental information collected by the cleaning device before the rotation angle is within the preset angle range, and there is no need to perform closed-loop detection. Therefore, it can be determined that the preset closed-loop detection condition is not met.
[0090] Optionally, when the rotation angle of the cleaning device is within a preset angle range and the rotation angle of the cleaning device is within the preset angle range multiple times, it can be determined whether the preset closed-loop detection condition is met based on the target distance and the target time.
[0091] Through this embodiment, when the rotation angle of the cleaning device is within the preset angle range for the first time, no closed-loop detection is performed, which can reduce unnecessary closed-loop detection and reduce the occupation of resources.
[0092] In an exemplary embodiment, when the cleaning device moves in the target area, environmental information is collected by an information collection component on the cleaning device, including:
[0093] S61, when the cleaning device moves in the target area, an image acquisition component on the cleaning device performs image acquisition, wherein closed-loop detection is performed based on the scene image acquired by the image acquisition component.
[0094] In this embodiment, the information acquisition component may include an image acquisition component, and the closed-loop detection is performed based on the scene image captured by the image acquisition component, that is, the current scene image captured by the image acquisition component is matched with the historical scene image captured by the image acquisition component to determine whether there is a loop on the moving route of the cleaning equipment.
[0095] Correspondingly, during the movement of the cleaning device in the target area, the cleaning device can perform image capture through the image acquisition component thereon, and the frequency of image capture can be fixed, for example, during the entire movement process, the cleaning device uses the same acquisition frequency to capture scene images; the frequency of image capture can also be dynamically adjusted, for example, when the preset closed-loop detection conditions are met, the image capture frequency is increased, and other image capture configuration methods can also be used. The image acquisition component can be a camera, a camcorder, etc. In this embodiment, there is no limitation on the type of image acquisition component and the image acquisition method.
[0096] Through this embodiment, by performing image acquisition through the image acquisition component on the cleaning device, the comprehensiveness of environmental information acquisition can be improved, thereby improving the reliability of regional map processing.
[0097] In an exemplary embodiment, when a preset closed-loop detection condition is met, a closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result, including:
[0098] S71, when a preset closed-loop detection condition is met, matching the current scene image acquired by the image acquisition component with the historical scene image acquired by the image acquisition component;
[0099] S72, determining a closed-loop detection result according to whether there is a historical scene image matching the current scene image among the historical scene images collected by the image collection component.
[0100] If the preset closed-loop detection conditions are met, the cleaning device can match the current scene image collected by the image acquisition component with the historical scene image collected by the image acquisition component, and determine whether there is a historical scene image matching the current scene image in the historical scene images collected by the image acquisition component. Image matching can be based on corresponding image features, that is, matching the current image features of the current scene image with the image features of the historical scene images collected by the image acquisition component. The type of image features can be one or more, which can be object features of key objects in the scene, or other image features, such as the positional relationship between objects. The method of scene image matching is not limited in this embodiment.
[0101] If there is a historical scene image matching the current scene image among the historical scene images collected by the image acquisition component, it can be determined that there is a closed loop in the moving route of the cleaning device. If there is no historical scene image matching the current scene image among the historical scene images collected by the image acquisition component, it can be determined that there is no closed loop in the moving route of the cleaning device.
[0102] Through this embodiment, matching is performed based on the current scene image and the historical scene image to determine whether there is a closed loop in the moving route of the cleaning device, thereby improving the reliability of closed loop detection.
[0103] In an exemplary embodiment, after matching the current scene image acquired by the image acquisition component with the historical scene image acquired by the image acquisition component, the method further includes:
[0104] S81, when there is a historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold among the historical scene images collected by the image collection component, determining that there is a historical scene image matching the current scene image among the historical scene images collected by the image collection component;
[0105] S82, when there is no historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold among the historical scene images collected by the image collection component, determining that there is no historical scene image matching the current scene image among the historical scene images collected by the image collection component.
[0106] The closed loop detection based on the current scene image collected by the image acquisition component can be performed based on the image similarity between the current scene image and the historical scene image. The similarity between scene images can be calculated based on the similarity between image features, for example, based on the vector similarity (for example, cosine similarity) between the image vector of the current scene image and the image vector of the historical scene image. Other ways of calculating image similarity can all be applied to this embodiment.
[0107] If there is a historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold value among the historical scene images collected by the image acquisition component, it can be determined that there is a historical scene image matching the current scene image among the historical scene images collected by the image acquisition component, that is, there is a visual closed loop, and then it is determined that there is a closed loop in the moving route of the cleaning device. If there is no historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold value among the historical scene images collected by the image acquisition component, it can be determined that there is no historical scene image matching the current scene image among the historical scene images collected by the image acquisition component, that is, there is no visual closed loop, and then it is determined that there is no closed loop in the moving route of the cleaning device.
[0108] It should be noted that the historical scene images collected by the image acquisition component may include all historical scene images collected by the image acquisition component before the current scene image is collected. In order to reduce the occupancy of storage space and the consumption of resources, only some historical scene images collected by the image acquisition component before the current scene image is collected (for example, scene images collected within a preset time period before the current scene image is collected) may be saved as the historical scene images collected by the image acquisition component.
[0109] Through this embodiment, whether scene images match is determined based on the image similarity between the scene images, which can improve the convenience of image matching and thus improve the efficiency of closed-loop detection.
[0110] In an exemplary embodiment, when the closed loop detection result indicates that the moving route of the cleaning device has a closed loop, the target area map of the target area is updated using the current environment information, including:
[0111] S91, when the closed-loop detection result is used to indicate that there is a closed loop in the moving route of the cleaning equipment, the target area map is updated according to the current environmental information and the target historical environmental information that matches the current environmental information, wherein the closed-loop detection result is determined based on the matching relationship between the current environmental information and the target historical environmental information.
[0112] If the target historical environmental information collected by the information collection component (environmental information collected before the information collection component of the cleaning device collects the current environmental information) matches the current environmental information, it can be determined that there is an association relationship between the current environmental information and the target historical environmental information, and the closed-loop detection result obtained is used to indicate that there is a closed loop in the moving route of the cleaning device. Here, if two frames (i.e., scene images) meet the similarity requirements, it can be determined that there is a closed loop, and the two frames are associated.
[0113] If the closed-loop detection result indicates that there is a closed loop in the moving route of the cleaning equipment, the target area map can be updated according to the current environmental information and the target historical environmental information. Here, the updating of the target area map can be to correct the positioning deviation of the cleaning equipment according to the current environmental information and the target historical environmental information to eliminate the accumulated error. The updating of the target area map can be to optimize the map portion corresponding to the current environmental information and the target historical environmental information in the target area map, or to optimize the entire target area map.
[0114] Optionally, the information acquisition component may include an image acquisition component, and correspondingly, the target historical environment information may be a target historical scene image. If a visual closed loop exists, a historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold among the historical scene images acquired by the image acquisition component may be determined as the target historical scene image, and the target area map may be updated based on the current scene image and the target historical scene image.
[0115] Through this embodiment, the regional map is updated according to the current environmental information and the historical environmental information matching the current environmental information, so that the reliability of regional map processing can be improved.
[0116] In an exemplary embodiment, before updating the target area map of the target area using the current environment information, the method further includes:
[0117] S101, performing image acquisition through an image acquisition component on a cleaning device to obtain a current scene image, and acquiring current measurement data of an inertial measurement unit on the cleaning device, wherein the current environment information includes the current scene image and the current measurement data.
[0118] In this embodiment, the information acquisition component may include an image acquisition component and an inertial measurement unit. Based on the motion logic of the cleaning equipment in the aforementioned embodiment, the algorithm can form a VIO (Visual-Inertial Odometry) system based on vision (i.e., image acquisition component) and IMU data to ensure stable positioning output. In addition, the depth of the map point can be effectively triangulated.
[0119] When the cleaning device moves in the target area, while the image acquisition component on the cleaning device is acquiring images, the inertial measurement unit on the cleaning device can also acquire environmental information to obtain measurement data. The environmental information acquired by the cleaning device may include scene images acquired by the image acquisition component and measurement data acquired by the inertial measurement unit.
[0120] Here, the inertial measurement unit is a component that measures the three-axis attitude angle (or angular velocity) and acceleration of an object. Based on the angular velocity and acceleration measured by the inertial measurement unit, the moving distance of the cleaning device can be determined, and then the positioning deviation of the cleaning device can be corrected based on the determined distance, and the area map can be updated.
[0121] For example, based on the dictionary, the images collected by the image acquisition component can be similarly calculated to distinguish whether the current scene is a scene that has been "seen" before, which is used to determine whether there is a closed loop. Once a closed loop that meets the conditions is detected, an effective closed loop constraint can be provided based on the association relationship, thereby eliminating the accumulated error over a period of time and optimizing the positioning mapping effect.
[0122] In this embodiment, environmental information is collected through image acquisition components and inertial measurement units, which can ensure that the cleaning equipment has a stable positioning output and improve the reliability of regional map processing.
[0123] In an exemplary embodiment, the method further comprises:
[0124] S111, after the target area map is last updated and the total time the cleaning device moves in the target area reaches a preset time threshold, a map update prompt message is sent by the cleaning device to prompt the target area map to be updated.
[0125] If a regional map of the target area is constructed or updated every time the cleaning device performs regional cleaning on the target area, the resource usage of the cleaning device will increase, which may affect the regional cleaning process of the cleaning device. Therefore, the frequency or number of map updates for the target area map can be set.
[0126] In this embodiment, the time required to update the regional map can be preset, that is, the preset time threshold, which is the time interval for updating the regional map, and the time interval here is limited by the time the cleaning device moves in the target area. After each update of the target area map, the total time the cleaning device moves in the target area is recorded again, that is, the total time the cleaning device moves in the target area is reset, and if the recorded total time reaches the preset time threshold, an update of the regional map is triggered.
[0127] After the cleaning device last updated the target area map, if the total time the cleaning device moves in the target area reaches a preset time threshold, it can be determined that the target area map needs to be updated. At this time, the cleaning device can be automatically controlled to move in the target area according to the aforementioned target movement route, and the target area map is updated using the regional map update method in the aforementioned embodiment. Alternatively, the cleaning device can also send a map update prompt message to prompt the target area map to be updated.
[0128] When the user receives the map update prompt information sent by the cleaning device, the user can trigger the generation of the aforementioned target cleaning instruction in a manner similar to that in the aforementioned embodiment. In response to the target cleaning instruction, the cleaning device updates the regional map while performing regional cleaning of the target area. The manner of performing regional map updating is similar to that in the aforementioned embodiment and will not be described in detail here.
[0129] In this embodiment, by presetting the time required for updating the regional map and prompting to update the regional map when the total time the cleaning device moves in the target area reaches a preset time threshold, the rationality of the regional update can be improved.
[0130] The following is an explanation of the method for processing the area map in this embodiment in conjunction with an optional example. In this optional example, the cleaning device is a sweeper, the information collection components include: a camera and an IMU, the scene image is an image frame, and the current scene image is a key frame.
[0131] This optional example provides a solution for visual closed-loop assisted map construction based on bow-shaped logic, which gives full play to the role of vision through specific regulatory actions. At the same time, considering the particularity of motion logic, if a closed-loop check is performed for each frame, the cost of detecting the closed-loop is high, which will greatly increase resource consumption. In order to reduce resource consumption, the timing of detecting the closed-loop is selected according to the "large right angle" detection strategy and time and space constraints, which can ensure effective optimization or solve the problem of inaccurate map construction over a long period of time with minimal resource consumption.
[0132] like Figure 3As shown, the process of the method for processing the area map in this optional example may include the following steps:
[0133] Step 1, obtaining an image frame through a camera;
[0134] Step 2, extract image features from the image frame and perform optical flow tracking (tracking image features by tracking key points);
[0135] Step 3, obtain acceleration and angular velocity through IMU;
[0136] Step 4: Determine speed, distance and other information through IMU pre-integration;
[0137] Step 5, determine whether to initialize, if so, go to step 7, otherwise go to step 6;
[0138] Step 6: Perform SFM (Structure from Motion, 3D reconstruction), align the visual information-IMU integral, and complete initialization;
[0139] Step 7, sliding window optimization;
[0140] A certain number of the latest image frames are retained in the sliding window, and the sliding window is updated according to the collected key frames.
[0141] Step 8, output 6-DOF (six degrees of freedom) pose graph;
[0142] Add keyframes to the pose graph, optimize the pose graph based on the relocalization results, and output a 6-DOF pose graph.
[0143] Step 9, determine whether a key frame is added to the 6-DOF (six degrees of freedom) pose graph, if so, execute step 10, otherwise execute step 7;
[0144] Step 10, performing closed-loop detection;
[0145] Step 11, determine whether the large "right angle" and time-space constraints are met, if so, execute step 12, otherwise execute step 10;
[0146] Step 12: perform closed-loop optimization.
[0147] Through this example, the timing of the detection closed loop is selected according to the "large right angle" detection strategy and the constraints of time and space, which can not only eliminate the cumulative error caused by long-period motion, but also minimize resource consumption.
[0148] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0150] According to another aspect of an embodiment of the present application, a device for processing an area map for implementing the above-mentioned method for processing an area map is also provided. Figure 4 is a structural block diagram of an optional regional map processing device according to an embodiment of the present application, such as Figure 4 As shown, the device may include:
[0151] The first collection unit 402 is used to collect environmental information through an information collection component on the cleaning device when the cleaning device moves in the target area;
[0152] The detection unit 404 is connected to the first acquisition unit 402 and is used to perform a closed-loop detection according to the current environmental information collected by the information acquisition component when a preset closed-loop detection condition is met to obtain a closed-loop detection result, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device;
[0153] The updating unit 406 is connected to the detecting unit 404, and is used to update the target area map of the target area using the current environment information when the closed-loop detection result indicates that the moving route of the cleaning device has a closed loop.
[0154] It should be noted that the first acquisition unit 402 in this embodiment can be used to execute the above step S202, the detection unit 404 in this embodiment can be used to execute the above step S204, and the updating unit 406 in this embodiment can be used to execute the above step S206.
[0155] Through the above-mentioned module, in the process of the cleaning device moving in the target area, environmental information is collected through the information collection component on the cleaning device; when the preset closed-loop detection conditions are met, closed-loop detection is performed based on the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection conditions include that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device; when the closed-loop detection result is used to indicate that there is a closed loop in the moving route of the cleaning device, the target area map of the target area is updated using the current environmental information, thereby solving the problem of poor stability of the area map caused by the accumulation of equipment positioning errors in the area map processing method in the related art, and improving the stability of the area map.
[0156] In an exemplary embodiment, the first acquisition unit includes:
[0157] The first acquisition module is used to collect environmental information through the information acquisition component on the cleaning device when the cleaning device performs area cleaning in the target area along the target cleaning route, wherein the target cleaning route includes a plurality of bow-shaped cleaning sections.
[0158] In an exemplary embodiment, the above device further comprises:
[0159] The selection unit is used to select a target cleaning route matching the target cleaning instruction from a preset set of cleaning routes in response to the acquired target cleaning instruction, wherein the target cleaning instruction is a cleaning instruction for updating a regional map while performing regional cleaning.
[0160] In an exemplary embodiment, the detection unit comprises:
[0161] A first determination module is used to determine the distance and time that the cleaning device moves along the direction after rotation when the rotation angle of the cleaning device is within a preset angle range, so as to obtain a target distance and a target time;
[0162] The detection module is used to perform closed-loop detection based on the current environmental information collected by the information collection component to obtain a closed-loop detection result when the target distance is greater than or equal to a preset distance threshold and the target time is greater than or equal to a preset time threshold.
[0163] In an exemplary embodiment, the above device further comprises:
[0164] The first determination unit is used to determine that a preset closed-loop detection condition is not satisfied when a target distance is less than a preset distance threshold and / or a target time is less than a preset time threshold after determining the distance and time that the cleaning device moves in the direction after rotation.
[0165] In an exemplary embodiment, the above device further comprises:
[0166] The second determination unit is used to determine that a preset closed-loop detection condition is not satisfied when the rotation angle of the cleaning device is within a preset angle range and the rotation angle of the cleaning device is within the preset angle range only once.
[0167] In an exemplary embodiment, the first acquisition unit includes:
[0168] The second acquisition module is used to acquire images through an image acquisition component on the cleaning device when the cleaning device moves in the target area, wherein the closed-loop detection is performed based on the scene image acquired by the image acquisition component.
[0169] In an exemplary embodiment, the detection unit comprises:
[0170] A matching module, used for matching the current scene image acquired by the image acquisition component with the historical scene image acquired by the image acquisition component when a preset closed-loop detection condition is met;
[0171] The second determination module is used to determine the closed-loop detection result according to whether there is a historical scene image matching the current scene image in the historical scene images collected by the image collection component.
[0172] In an exemplary embodiment, the above device further comprises:
[0173] A third determining unit is used to determine that there is a historical scene image matching the current scene image in the historical scene images collected by the image acquisition component after matching the current scene image collected by the image acquisition component with the historical scene images collected by the image acquisition component, if there is a historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold value in the historical scene images collected by the image acquisition component;
[0174] The fourth determination unit is used to determine that there is no historical scene image matching the current scene image among the historical scene images collected by the image acquisition component, when there is no historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold among the historical scene images collected by the image acquisition component.
[0175] In an exemplary embodiment, the updating unit comprises:
[0176] An update module is used to update the target area map according to current environmental information and target historical environmental information matching the current environmental information when a closed-loop detection result indicates that a closed-loop exists in the moving route of the cleaning equipment, wherein the closed-loop detection result is determined based on the matching relationship between the current environmental information and the target historical environmental information.
[0177] In an exemplary embodiment, the above device further comprises:
[0178] The second acquisition unit is used to acquire images through the image acquisition component on the cleaning device before using the current environmental information to update the target area map of the target area, so as to obtain the current scene image and the current measurement data of the inertial measurement unit on the cleaning device, wherein the current environmental information includes the current scene image and the current measurement data.
[0179] In an exemplary embodiment, the above device further comprises:
[0180] The sending unit is used to send a map update prompt message through the cleaning device to prompt the target area map to be updated when the total time the cleaning device moves in the target area reaches a preset time threshold after the target area map was last updated.
[0181] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0182] According to another aspect of the embodiment of the present application, a storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the above-mentioned area map processing methods in the embodiment of the present application.
[0183] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0184] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0185] S1, when the cleaning device moves in the target area, environmental information is collected by an information collection component on the cleaning device;
[0186] S2, when a preset closed-loop detection condition is met, a closed-loop detection is performed according to the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device;
[0187] S3, when the closed-loop detection result indicates that the moving route of the cleaning device has a closed loop, the target area map of the target area is updated using the current environmental information.
[0188] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0189] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0190] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned area map processing method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0191] Figure 5 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 5 As shown, it includes a processor 502, a communication interface 504, a memory 506 and a communication bus 508, wherein the processor 502, the communication interface 504 and the memory 506 communicate with each other through the communication bus 508, wherein,
[0192] Memory 506, used for storing computer programs;
[0193] The processor 502 is used to execute the computer program stored in the memory 506 to implement the following steps:
[0194] S1, when the cleaning device moves in the target area, environmental information is collected by an information collection component on the cleaning device;
[0195] S2, when a preset closed-loop detection condition is met, a closed-loop detection is performed according to the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device;
[0196] S3, when the closed-loop detection result indicates that the moving route of the cleaning device has a closed loop, the target area map of the target area is updated using the current environmental information.
[0197] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The communication interface is used for communication between the electronic device and other devices.
[0198] The above-mentioned memory may include RAM, or may include non-volatile memory (non-volatile memory), for example, at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the above-mentioned processor.
[0199] As an example, the memory 506 may include but is not limited to the first acquisition unit 402, the detection unit 404 and the update unit 406 in the control device of the device. In addition, it may also include but is not limited to other module units in the control device of the device, which will not be repeated in this example.
[0200] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0201] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0202] It can be understood by those skilled in the art that Figure 5The structure shown is for illustration only. The device for implementing the above-mentioned area map processing method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations shown.
[0203] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0204] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0205] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0206] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0207] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In another icon, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0208] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0209] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0210] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing a regional map, characterized in that: include: When the cleaning device moves in the target area, environmental information is collected by an information collection component on the cleaning device; When a preset closed-loop detection condition is met, a closed-loop detection is performed according to the current environmental information collected by the information collection component to obtain a closed-loop detection result, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device; In a case where the closed-loop detection result is used to indicate that a closed loop exists in the moving route of the cleaning device, the target area map of the target area is updated using the current environment information.
2. The method according to claim 1, characterized in that: In the process of the cleaning device moving in the target area, the environmental information is collected by the information collection component on the cleaning device, including: When the cleaning device performs area cleaning in the target area along a target cleaning route, environmental information is collected by the information collection component on the cleaning device, wherein the target cleaning route includes a plurality of bow-shaped cleaning sections.
3. The method according to claim 2, characterized in that The method further comprises: In response to the acquired target cleaning instruction, the target cleaning route matching the target cleaning instruction is selected from a set of preset cleaning routes, wherein the target cleaning instruction is a cleaning instruction for updating a regional map while performing regional cleaning.
4. The method according to claim 1, characterized in that: When the preset closed-loop detection condition is met, performing closed-loop detection according to the current environment information collected by the information collection component to obtain a closed-loop detection result includes: When the rotation angle of the cleaning device is within the preset angle range, determining the distance and time that the cleaning device moves along the direction after rotation to obtain a target distance and a target time; When the target distance is greater than or equal to a preset distance threshold and the target time is greater than or equal to a preset time threshold, a closed-loop detection is performed according to the current environment information collected by the information collection component to obtain the closed-loop detection result.
5. The method according to claim 4, characterized in that After determining the distance and time that the cleaning device moves along the direction after rotation, the method further includes: When the target distance is less than a preset distance threshold and / or the target time is less than a preset time threshold, it is determined that the preset closed-loop detection condition is not satisfied.
6. The method according to claim 4, characterized in that The method further comprises: When the rotation angle of the cleaning device is within the preset angle range, and the rotation angle of the cleaning device is within the preset angle range only once, it is determined that the preset closed-loop detection condition is not satisfied.
7. The method according to claim 1, characterized in that In the process of the cleaning device moving in the target area, the environmental information is collected by the information collection component on the cleaning device, including: When the cleaning device moves in the target area, image acquisition is performed by an image acquisition component on the cleaning device, wherein closed-loop detection is performed based on the scene image acquired by the image acquisition component.
8. The method according to claim 7, characterized in that When the preset closed-loop detection condition is met, performing closed-loop detection according to the current environment information collected by the information collection component to obtain a closed-loop detection result includes: When the preset closed-loop detection condition is met, matching the current scene image acquired by the image acquisition component with the historical scene image acquired by the image acquisition component; The closed-loop detection result is determined according to whether there is a historical scene image matching the current scene image among the historical scene images collected by the image collection component.
9. The method according to claim 8, characterized in that After matching the current scene image acquired by the image acquisition component with the historical scene image acquired by the image acquisition component, the method further includes: In the case where there is a historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold value among the historical scene images collected by the image collection component, determining that there is a historical scene image matching the current scene image among the historical scene images collected by the image collection component; When there is no historical scene image whose image similarity with the current scene image is greater than or equal to a preset similarity threshold among the historical scene images collected by the image acquisition component, it is determined that there is no historical scene image matching the current scene image among the historical scene images collected by the image acquisition component.
10. The method according to claim 1, characterized in that When the closed-loop detection result indicates that a closed loop exists in the moving route of the cleaning device, updating the target area map of the target area using the current environment information includes: In a case where the closed-loop detection result is used to indicate that a closed loop exists in the moving route of the cleaning device, the target area map is updated according to the current environmental information and the target historical environmental information that matches the current environmental information, wherein the closed-loop detection result is determined based on the matching relationship between the current environmental information and the target historical environmental information.
11. The method according to claim 10, characterized in that Before updating the target area map of the target area using the current environment information, the method further includes: Image acquisition is performed through the image acquisition component on the cleaning device to obtain a current scene image, and current measurement data of the inertial measurement unit on the cleaning device is obtained, wherein the current environment information includes the current scene image and the current measurement data.
12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: After the target area map is last updated, when the total time the cleaning device moves in the target area reaches a preset time threshold, the cleaning device sends a map update prompt message to prompt the target area map to be updated.
13. A device for processing a regional map, characterized in that: include: A first collection unit is used to collect environmental information through an information collection component on the cleaning device when the cleaning device moves in the target area; a detection unit, configured to perform a closed-loop detection according to the current environmental information collected by the information collection component to obtain a closed-loop detection result when a preset closed-loop detection condition is met, wherein the preset closed-loop detection condition includes that the rotation angle of the cleaning device is within a preset angle range, and the closed-loop detection result is used to indicate whether there is a closed loop in the moving route of the cleaning device; An updating unit is configured to update a target area map of the target area using the current environment information when the closed-loop detection result indicates that a closed loop exists in the moving route of the cleaning device.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 12 when executed.
15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 12 through the computer program.
