Intelligent Partitioning Method, Apparatus and Device
By obtaining the whole house map and calculating the slope of the partition boundary line, the inclined boundary line is corrected, which solves the problem of incomplete partition caused by obstacles when building the sweeper map, and realizes the neat and beautiful appearance of the partition boundary line.
Patent Information
- Application Number
- CN202210952659.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-08-09
AI Technical Summary
When building a picture, the sweeper is easily affected by obstacles such as walls, resulting in diagonal lines in the room partition and incomplete picture construction.
By obtaining the whole house map, using the door location and wall location for intelligent partitioning, an intelligent partition map is generated, the slope of the partition boundary line is calculated, and the inclined boundary line is corrected, a correction boundary line is generated, and added to the intelligent partition map.
It effectively solves the problem of incomplete partitions caused by obstacles when building maps of the sweeper, and ensures that the partition boundary line is neat and beautiful.
Smart Images

Figure CN115444312B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent recognition and correction, and particularly to an intelligent zoning method, device, and equipment. Background Art
[0002] For a floor sweeping robot that builds a map based on a laser platform, after the first cleaning of a room, it can perform intelligent zoning according to the obtained map. The concept of intelligent zoning is that after the robot completes the first full-house cleaning and obtains the full-house map, it automatically divides the house map. The principle of zoning is based on the house structure, and each separate room is divided into a room zone.
[0003] However, in the current intelligent zoning method, when the floor sweeping robot builds a map, it is easily affected by obstacles such as walls, resulting in diagonal lines in the room zones and imperfect map building. Summary of the Invention
[0004] This application provides an intelligent zoning method, device, and equipment, aiming to solve the problem that in the prior art, when a floor sweeping robot builds a map, it is easily affected by obstacles such as walls, resulting in diagonal lines in the room zones and imperfect map building.
[0005] To solve the above technical problems, in the first aspect, this application provides an intelligent zoning method, including:
[0006] Obtain the full-house map of the house, and perform intelligent zoning on the full-house map according to the door positions and wall positions of each room in the full-house map to generate an intelligent zoning map;
[0007] Generate a zoning boundary line according to the intelligent zoning map, and obtain two points with the largest distance interval in the zoning boundary line to generate a first endpoint and a second endpoint;
[0008] On the intelligent zoning map, establish a rectangular coordinate system with any side of the intelligent zoning map as the X-axis and the direction perpendicular to this side as the Y-axis, and calculate the slope between the first endpoint and the second endpoint;
[0009] When the slope between the first endpoint and the second endpoint is greater than a preset value, determine that the zoning boundary line is an inclined boundary line;
[0010] Perform correction on the inclined boundary line to generate a corrected boundary line, delete the inclined boundary line, and add the corrected boundary line to the intelligent zoning map.
[0011] Preferably, the step of generating a zoning boundary line according to the intelligent zoning map includes:
[0012] Extract the boundary door area in the intelligent partition map based on the position of the room door, and mark the points on both sides of the boundary door area with different marks and different from the preset mark as area demarcation points, where the marks of adjacent partitions are different from each other, and all the walls in the intelligent partition map are marked with a preset mark different from the marks of each partition;
[0013] Connect the area demarcation points to generate the partition boundary line.
[0014] Preferably, the step of extracting the boundary door area in the intelligent partition map based on the position of the room door, and marking the points on both sides of the boundary door area with different marks and different from the preset mark as area demarcation points includes:
[0015] Obtain the position of the room door in the intelligent partition map;
[0016] Frame a first preset range area including the position of the room door to generate a boundary door area;
[0017] Perform a four-neighborhood search on the boundary door area, and mark the points on both sides of the four-neighborhood with different marks and different from the preset mark as area demarcation points.
[0018] Preferably, after the step of performing a four-neighborhood search on the boundary door area and marking the points on both sides of the four-neighborhood with different marks and different from the preset mark as area demarcation points, it includes:
[0019] Continue to perform a four-neighborhood search on the interval within a second preset range outside the boundary door area;
[0020] When the interval within the second preset range contains the area demarcation point, it is determined that the deviation of the intelligent partition map is too large;
[0021] Then re-enter the steps: obtain the whole-house map of the house, and perform intelligent partitioning on the whole-house map according to the positions of the room doors and walls in the whole-house map to generate an intelligent partition map.
[0022] Preferably, the step of calculating the slope between the first endpoint and the second endpoint includes:
[0023] Respectively obtain the coordinate information of the first endpoint and the second endpoint in the rectangular coordinate system, and correspondingly generate a first coordinate and a second coordinate;
[0024] Connect the first coordinate and the second coordinate to generate a span line;
[0025] Calculate the slope of the span line according to the first coordinate and the second coordinate.
[0026] Preferably, the steps of performing the correction on the inclined boundary line, generating a corrected boundary line, deleting the inclined boundary line, and adding the corrected boundary line to the intelligent partition map include:
[0027] Taking the first endpoint as the first center point, making extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis respectively until touching the wall;
[0028] Calculating and obtaining the distances when the first endpoint touches the wall in the four directions respectively, generating a first distance, a second distance, a third distance, and a fourth distance;
[0029] Taking the second endpoint as the second center point, making extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis respectively until touching the wall;
[0030] Calculating and obtaining the distances when the second endpoint touches the wall in the four directions respectively, generating a fifth distance, a sixth distance, a seventh distance, and an eighth distance;
[0031] Taking the extension line corresponding to the minimum distance among the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance as the corrected boundary line;
[0032] Clearing the inclined boundary line in the intelligent partition map and adding the corrected boundary line to the intelligent partition map.
[0033] Preferably, the step of taking the extension line corresponding to the minimum distance among the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance as the corrected boundary line includes:
[0034] Calculating the differences between the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance and a preset minimum distance value respectively, generating a first difference, a second difference, a third difference, a fourth difference, a fifth difference, a sixth difference, a seventh difference, and an eighth difference;
[0035] Taking the extension line corresponding to the non-negative difference and the minimum difference among the first difference, the second difference, the third difference, the fourth difference, the fifth difference, the sixth difference, the seventh difference, and the eighth difference as the corrected boundary line.
[0036] Preferably, after the steps of performing the correction on the inclined boundary line, generating a corrected boundary line, deleting the inclined boundary line, and adding the corrected boundary line to the intelligent partition map, it includes:
[0037] Taking one of the two endpoints of the corrected boundary line as the starting point and the other endpoint as the ending point, perform a four-neighborhood extraction to generate the four-neighborhood information of the corrected boundary line;
[0038] Using the marks corresponding to the partitions other than the preset mark obtained first from the four-neighborhood information, generate a filling mark;
[0039] Fill the corrected boundary line with the filling mark.
[0040] In a second aspect, the present application further provides an intelligent partitioning device, the device includes:
[0041] An intelligent partitioning map generation module, configured to obtain a whole-house map of a house, and perform intelligent partitioning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent partitioning map;
[0042] An endpoint generation module, configured to generate a partitioning boundary line according to the intelligent partitioning map, and obtain two points with the largest distance interval on the partitioning boundary line to generate a first endpoint and a second endpoint;
[0043] A calculation module, configured to establish a rectangular coordinate system on the intelligent partitioning map with any side of the intelligent partitioning map as the X-axis and the direction perpendicular to the side as the Y-axis, and calculate the slope between the first endpoint and the second endpoint;
[0044] A determination module, configured to determine that the partitioning boundary line is an inclined boundary line when the slope between the first endpoint and the second endpoint is greater than a preset value;
[0045] A correction module, configured to perform correction on the inclined boundary line to generate a corrected boundary line, delete the inclined boundary line, and add the corrected boundary line to the intelligent partitioning map.
[0046] In a third aspect, the present application further provides a computer device, including a memory and a processor, where a computer program is stored in the memory, and when the processor executes the computer program, the steps of the intelligent partitioning method described in any one of the above are implemented.
[0047] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the intelligent partitioning method described in any one of the above are implemented.
[0048] An intelligent zoning method, device, and equipment of the present application can partition a house map by different rooms to generate an intelligent zoning map, and generate a zoning boundary line based on the intelligent zoning map. When performing zoning correction, a coordinate system can be established based on the intelligent zoning map, and the endpoints of the zoning boundary line between different zones can be determined in the coordinate system, and then the slope of the zoning boundary line can be determined, so as to judge whether the boundary line is inclined. If the zoning boundary line is inclined, the inclination of the boundary line will be corrected, which can effectively solve the problem that the floor sweeper is easily affected by obstacles such as walls during map building in the prior art, resulting in slanted room zoning and imperfect map building. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a schematic flowchart of the intelligent zoning method according to an embodiment;
[0050] Figure 2 It is a schematic structural diagram of the intelligent zoning device according to an embodiment;
[0051] Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment;
[0052] Figure 4 It is a schematic diagram before intelligent zoning according to an embodiment;
[0053] Figure 5 It is a partial enlarged view during the intelligent zoning process according to an embodiment;
[0054] Figure 6 It is a schematic diagram after intelligent zoning according to an embodiment.
[0055] The realization, functional features, and advantages of the objectives of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] Those skilled in the art of the present technology can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the above", and "the" used herein may also include the plural forms. It should be further understood that the term "including" used in the description of the present application means the presence of features, integers, steps, operations, elements, units, units, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, units, units, components, and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.
[0058] Those skilled in the art of the present technology can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.
[0059] Referring to Figure 1 , which is an intelligent partitioning method provided in an embodiment of the present application, includes:
[0060] S1: Obtain the whole-house map of the house, and perform intelligent partitioning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent partitioning map;
[0061] S2: Generate a partition boundary line according to the intelligent partitioning map, obtain the two points with the largest distance interval in the partition boundary line, and generate a first endpoint and a second endpoint;
[0062] S3: On the intelligent partitioning map, establish a rectangular coordinate system with any side of the intelligent partitioning map as the X-axis and the direction perpendicular to this side as the Y-axis, and calculate the slope between the first endpoint and the second endpoint;
[0063] S4: When the slope between the first endpoint and the second endpoint is greater than a preset value, determine that the partition boundary line is an inclined boundary line;
[0064] S5: Perform correction on the inclined boundary line to generate a corrected boundary line, delete the inclined boundary line, and add the corrected boundary line to the intelligent partitioning map.
[0065] As described in the above steps S1 - S2, after the floor sweeper finishes cleaning for the first time, it is determined that the whole house cleaning is completed. Therefore, a map of the whole house can be obtained. Among them, when the floor sweeper obtains the map of the whole house, the overall map of the room can be obtained based on the obstacles (walls) scanned by the laser. The cloud server can intelligently partition according to the position of the door and the wall structure, divide the whole house map into multiple separate rooms to obtain an intelligent partition map, and set the partition boundaries between the partitions in the intelligent partition map as partition boundary lines, and mark the two endpoints with the largest distance between the partition boundary lines in the middle of the partition boundary lines as the first endpoint A and the second endpoint B;
[0066] It should be noted that each area is formed by enclosing with different "boundary lines", and each boundary line has a different extension direction (or, in some embodiments, different line segments that are adjacent and connected and have a small angular divergence direction can be classified as the same boundary line). Here, it means to obtain the two points with the largest distance on (judged to be the same) one boundary line;
[0067] As described in the above steps S3 to S4, the partition boundary line is a straight line or a line segment close to a straight line. Therefore, the approximate range of the partition boundary line can be determined by marking the two points at the outermost sides of the partition boundary line, and a rectangular coordinate system is established with any side of the intelligent partition map as the X - axis and the direction perpendicular to this side as the Y - axis. Through the positioning system of the floor sweeper itself or the tracking and positioning technology of the camera, it is very easy to obtain the coordinates of the first endpoint A and the second endpoint B in the rectangular coordinate system. Connect the two endpoints and calculate the slope between the two endpoints to calculate the inclination of the two ends of the first endpoint A and the second endpoint B relative to the corresponding door. When the slope between the first endpoint A and the second endpoint B is greater than the preset value, such as when the slope exceeds 0.2, it is determined that the partition boundary line is too inclined;
[0068] As described in the above step S5, when the partition boundary line is too inclined, the cloud server will correct the inclined partition boundary line, delete the original inclined boundary line from the intelligent partition map, and add the corrected boundary line back to the intelligent partition map, so that there is no inclined partition boundary line in the intelligent partition map, ensuring the beauty of the intelligent partition map.
[0069] In one embodiment, the step of generating a partition boundary line according to the intelligent partition map includes:
[0070] Based on the position of the door, extract the boundary door area in the intelligent partition map, and mark the points on both sides of the boundary door area with different marks and different from the preset mark as area demarcation points. Among them, the marks of adjacent partitions are different, and all the walls in the intelligent partition map are marked with a preset mark different from the marks of each partition;
[0071] Connect the area demarcation points to generate the partition boundary line.
[0072] As described above, after the sweeping robot completes the first cleaning task and obtains the intelligent partition map, the cloud server will identify each corresponding room 1, room 2, room 3, hall, etc. in the intelligent partition map with different colors. The identification method is not limited. For example, it can include colors, background patterns, diagonal lines with different density specifications / angle directions, etc. For the sake of easy understanding and elaboration, this application takes color identification as an example for illustration. For example, room 1 is marked blue, room 2 is marked yellow, room 3 is marked red, the hall is marked white, etc. The colors between each area are different or at least the colors in adjacent partitions are different from each other; at the same time, in combination with the cleaning area of the sweeping robot, the running trajectory, and the overall layout of the entire house, etc., the interval area (the area that cannot be cleaned during cleaning) between room 1 and room 2 and the hall when the sweeping robot performs cleaning is identified as a wall. Therefore, all the walls in the whole house map can be marked with a specific color. For example, all the walls in the whole house map are marked black, which is different from the marking colors of room 1, room 2, room 3, and the hall, so as to be better identified when obtaining the partition boundary line in the subsequent process;
[0073] Due to the existence of the wall, the wall can separate two different partitions. Therefore, when partitioning, it is only necessary to define the boundary line between one room and another room. Therefore, as long as the area where the door of the room is located (the boundary door area) in the intelligent partition map is extracted to obtain the dividing line between the rooms. Because each room was marked with a different color before, only the boundary door area of the room will have an adjoining place with other rooms, and there will be more than two colors. Then, by using the color difference, by marking the pixel points in the boundary door area with different colors from adjacent pixel points, the area demarcation points between the rooms can be determined, and connecting the area demarcation points at the door of the room forms the partition boundary line.
[0074] In one embodiment, the step of extracting the boundary door area in the intelligent partition map based on the position of the door and marking the points on both sides of the boundary door area with different marks and different from the preset mark as area demarcation points includes:
[0075] Obtain the position of the door in the intelligent partition map;
[0076] Frame a first preset range area including the position of the door to generate a boundary door area;
[0077] Perform a four-neighborhood search on the boundary door area, and mark the points on both sides of the four-neighborhood with different marks and different from the preset mark as area demarcation points.
[0078] As described above, due to the existence of the wall, the wall can separate two different partitions. Therefore, when partitioning, only the boundary line between one room and another needs to be defined, that is, when partitioning, only the four-neighborhood expansion needs to be performed at the door of each room. Therefore, the cloud server can mark the doors of each room in the intelligent partition map and frame a search area with a preset size that includes the door. For example, the length of the long side of the search area is the width of the door, and the length of the short side of the search area is the thickness of the wall where the door is located. In this search area, a four-neighborhood expansion search is performed for visual recognition and scanning in the four directions of up, down, left, and right. Since each room area is marked with a different color, during the process of scanning using the four-neighborhood expansion search, the color difference of the pixel points on both sides of the partition boundary of the door can be recognized (excluding the specific black color of the wall). Then, the color difference can be used to determine that the point with a pixel color difference between the rooms is the area boundary point, and connecting the area boundary points at the door forms the partition boundary line.
[0079] In one embodiment, after the step of performing a four-neighborhood search on the boundary door area and marking the points with different marks on both sides in the four-neighborhood and different from the preset mark as area boundary points, it includes:
[0080] Continuing to perform a four-neighborhood search on the interval within a second preset range outside the boundary door area;
[0081] When the interval within the second preset range contains the area boundary point, it is determined that the deviation of the intelligent partition map is too large;
[0082] Then re-enter the steps: obtaining the whole-house map of the house, and performing intelligent partitioning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent partition map.
[0083] As described above, after completing the four-neighborhood search of the boundary door area, an extended search can also be performed on the interval within a certain range near the outside of the boundary door area. If there are still area boundary points in the interval within a certain range near the outside of the search area, it indicates that the error is too large when performing intelligent partitioning on the whole-house map or there is too large a deviation when the sweeping robot performs mapping. Therefore, it can be fed back to the cloud server to control the sweeping robot to traverse the house again and re-obtain the whole-house map of the house.
[0084] In one embodiment, the step of calculating the slope between the first endpoint and the second endpoint includes:
[0085] Respectively obtaining the coordinate information of the first endpoint and the second endpoint in the rectangular coordinate system, and correspondingly generating a first coordinate and a second coordinate;
[0086] Connect the first coordinate and the second coordinate to generate a span line;
[0087] Calculate the slope of the span line according to the first coordinate and the second coordinate.
[0088] As described above, since the slope between the first endpoint A and the second endpoint B at the door needs to be calculated, therefore, the two sides of the right angle of a room in the intelligent partition map can be used as the X-axis and Y-axis of the rectangular coordinate system respectively to establish a rectangular coordinate system O. Based on the positioning and tracking system of the sweeping robot itself or the positioning and tracking system of the camera in the room, it is easy to determine the coordinates of any point in the room relative to the rectangular coordinate system O. Therefore, the coordinates of the first endpoint A can be obtained as (X1, Y1), and the coordinates of the second endpoint B can be obtained as (X2, Y2). Using the slope calculation formula y2 - y1 = k(x2 - x1), the slope k of the span line where the first coordinate (X1, Y1) and the second coordinate (X2, Y2) are located can be calculated.
[0089] Refer to Figures 4 to 6 In one embodiment, the steps of performing the correction on the inclined boundary line, generating a corrected boundary line, deleting the inclined boundary line, and adding the corrected boundary line to the intelligent partition map include:
[0090] Taking the first endpoint as the first center point respectively, and making extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis until touching the wall;
[0091] Calculate and obtain the distances when the first endpoint touches the wall along the four directions respectively, and generate a first distance, a second distance, a third distance, and a fourth distance;
[0092] Taking the second endpoint as the second center point respectively, and making extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis until touching the wall;
[0093] Calculate and obtain the distances when the second endpoint touches the wall along the four directions respectively, and generate a fifth distance, a sixth distance, a seventh distance, and an eighth distance;
[0094] Take the extension line corresponding to the minimum distance among the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance as the corrected boundary line;
[0095] Clear the inclined boundary line in the intelligent partition map, and add the corrected boundary line to the intelligent partition map.
[0096] As described above, when correcting the inclined boundary line, it is necessary to determine the relative position relationship between the first endpoint A and the second endpoint B. Therefore, specifically, taking the first endpoint as the first center point, extension lines are made along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis in the rectangular coordinate system O until they touch the wall; the distances when the first endpoint touches the wall along the four directions are respectively calculated to obtain the first distance L1, the second distance L2, the third distance L3, and the fourth distance L4; taking the second endpoint as the second center point, extension lines are made along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis until they touch the wall; the distances when the second endpoint touches the wall along the four directions are respectively calculated to obtain the fifth distance L5, the sixth distance L6, the seventh distance L7, and the eighth distance L8;
[0097] Further, two orthogonal coordinate axes can be established separately: taking the first end point A as the origin, the straight line where the wall near the first end point A is located as the X-axis, and the straight line perpendicular to the X-axis and passing through the first end point A as the Y-axis, to establish the first orthogonal coordinate axis O1; taking the second end point B as the origin, the straight line where the wall near the second end point B is located as the X-axis, and the straight line perpendicular to the X-axis and passing through the second end point B as the Y-axis, to establish the second orthogonal coordinate axis O2. Further, for the convenience of conversion, the first orthogonal coordinate axis O1 and the second orthogonal coordinate axis O2 are set in the same direction, that is, the X and Y axes of the first orthogonal coordinate axis O1 are respectively in the same direction as the X and Y axes of the second orthogonal coordinate axis O2. Still further, the directions of the first orthogonal coordinate axis O1 and the second orthogonal coordinate axis O2 can be the same as or different from the direction of the rectangular coordinate system O established with any side of the intelligent partition map as the X-axis and the direction perpendicular to this side as the Y-axis. Starting from the first end point A, extend lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis of the first orthogonal coordinate axis O1 respectively until touching the wall; calculate and obtain the distances of the extended lines when the first end point touches the wall along the above four directions, and obtain the first distance L1, the second distance L2, the third distance L3, and the fourth distance L4 of the walls touched when the first end point extends along the above four directions. Similarly, starting from the second end point B, extend lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis of the second orthogonal coordinate axis O2 respectively until touching the wall; calculate and obtain the distances of the extended lines when the second end point touches the wall along the above four directions, and obtain the fifth distance L5, the sixth distance L6, the seventh distance L7, and the eighth distance L8 of the walls touched when the second end point extends along the above four directions. Compare these eight distances, and the extended line corresponding to the minimum distance value (L6) among these eight distances is the required corrected boundary line. At the same time, when the corrected boundary line is obtained, the cloud server can erase the original inclined boundary line in the intelligent partition map and add the new corrected boundary line to the intelligent partition map to make the map look more beautiful overall.
[0098] In one embodiment, the step of taking the extended line corresponding to the minimum distance among the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance as the corrected boundary line includes:
[0099] Calculate the differences between the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance and a preset minimum distance value respectively, and generate a first difference, a second difference, a third difference, a fourth difference, a fifth difference, a sixth difference, a seventh difference, and an eighth difference;
[0100] Take the extension line corresponding to the difference that is not negative and the smallest among the first difference, second difference, third difference, fourth difference, fifth difference, sixth difference, seventh difference, and eighth difference as the correction boundary line.
[0101] As described above, when the floor sweeper constructs a map, there may be map construction interference factors. For example, when constructing the map, part of the wall will protrude. Therefore, when extending from the first endpoint A in the positive direction of the Y-axis, if the extension reaches the wall before reaching 0.2m, this is obviously unreasonable and ineffective. Therefore, a minimum distance threshold will be set for the extension lines made along the positive and negative directions of each axis from the origin of the orthogonal coordinate axes. When the length of the extension line is less than the minimum distance threshold, that is, the difference between the distance from the extension line to the wall and the minimum distance threshold is negative, it means that there is a protruding wall in the positive direction of the Y-axis from the first endpoint A. Therefore, the extension line in the positive direction of the Y-axis cannot be used as the correction boundary line. Only when the distance from the extension line to the wall is greater than the minimum distance threshold is it possible to be used as the correction boundary line. Therefore, the extension line corresponding to the difference that is not negative and the smallest (L6) can be selected as the correction boundary line.
[0102] In one embodiment, after the step of performing the correction of the inclined boundary line, generating the correction boundary line, deleting the inclined boundary line, and adding the correction boundary line to the intelligent partition map, it includes:
[0103] Perform a four-neighborhood extraction with one of the two endpoints of the correction boundary line as the starting point and the other endpoint as the ending point to generate the four-neighborhood information of the correction boundary line;
[0104] Generate a filling mark with the mark corresponding to the partition other than the preset mark obtained first from the four-neighborhood information;
[0105] Fill the correction boundary line with the filling mark.
[0106] As described above, after determining the correction boundary line, it is necessary to fill the room areas on both sides of the correction boundary line. Therefore, the cloud server will perform a four-neighborhood extraction with one of the two endpoints of the correction boundary line as the starting point and the other endpoint as the ending point, that is, scan and identify in the four-neighborhood up, down, left, or right directions from one end of the correction boundary line towards the other endpoint. Here, it is the left and right directions. When scanning and identifying to the left, the blue color of the left room area will be identified first, and the blue color of the left room area will be filled into the cleared part on the left side of the correction boundary line to make it blue. When scanning and identifying to the right, the red color of the right room area will be identified first, and the red color of the right room area will be filled into the cleared part on the right side of the correction boundary line to make it red, completing the color filling of the previously cleared part.
[0107] Refer to Figure 2, In a second aspect, the present application further provides an intelligent zoning device, including:
[0108] An intelligent zoning map generation module 100, which obtains a whole-house map of a house, and performs intelligent zoning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent zoning map;
[0109] An endpoint generation module 200, which is used to generate a zoning boundary line according to the intelligent zoning map, obtain two points with the largest distance between intervals on the zoning boundary line, and generate a first endpoint and a second endpoint;
[0110] A calculation module 300, which is used to establish a rectangular coordinate system on the intelligent zoning map with any side of the intelligent zoning map as the X-axis and the direction perpendicular to this side as the Y-axis, and calculate the slope between the first endpoint and the second endpoint;
[0111] A determination module 400, which is used to determine that the zoning boundary line is an inclined boundary line when the slope between the first endpoint and the second endpoint is greater than a preset value;
[0112] A correction module 500, which is used to perform correction on the inclined boundary line to generate a corrected boundary line, delete the inclined boundary line, and add the corrected boundary line to the intelligent zoning map.
[0113] In one embodiment, the endpoint generation module 200 includes:
[0114] A regional demarcation point generation unit, which is used to extract a boundary door area in the intelligent zoning map based on the door position, and mark the points on both sides of the boundary door area with different marks and different from the preset mark as regional demarcation points, where the marks of adjacent partitions are different from each other, and all the walls in the intelligent zoning map are marked with a preset mark different from the marks of each partition;
[0115] A connection unit, which is used to connect the regional demarcation points to generate the zoning boundary line.
[0116] In one embodiment, the regional demarcation point generation unit is further used for:
[0117] Obtaining the door positions in the intelligent zoning map;
[0118] Framing a first preset range area including the door position to generate a boundary door area;
[0119] Performing a four-neighborhood search on the boundary door area, and marking the points on both sides of the four-neighborhood with different marks and different from the preset mark as regional demarcation points.
[0120] In one embodiment, the endpoint generation module 200 further includes an inspection unit, and the inspection unit is configured to:
[0121] Continue to perform a four-neighborhood search on the interval within a second preset range outside the boundary gate area;
[0122] When the interval within the second preset range contains the area demarcation point, it is determined that the deviation of the intelligent partition map is too large;
[0123] Then re-enter the steps: obtain the whole-house map of the house, and perform intelligent partitioning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent partition map.
[0124] In one embodiment, the calculation module 300 is further configured to:
[0125] Respectively obtain the coordinate information of the first endpoint and the second endpoint in the rectangular coordinate system, and correspondingly generate a first coordinate and a second coordinate;
[0126] Connect the first coordinate and the second coordinate to generate a span line;
[0127] Calculate the slope of the span line according to the first coordinate and the second coordinate.
[0128] In one embodiment, the correction module 500 is further configured to:
[0129] Taking the first endpoint as the first center point, make extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis respectively until touching the wall;
[0130] Respectively calculate and obtain the distances when the first endpoint touches the wall along the four directions, and generate a first distance, a second distance, a third distance, and a fourth distance;
[0131] Taking the second endpoint as the second center point, make extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis respectively until touching the wall;
[0132] Respectively calculate and obtain the distances when the second endpoint touches the wall along the four directions, and generate a fifth distance, a sixth distance, a seventh distance, and an eighth distance;
[0133] Use the extension line corresponding to the minimum distance among the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance as the correction boundary line;
[0134] Clear the inclined boundary line in the intelligent partition map, and add the correction boundary line to the intelligent partition map.
[0135] In one embodiment, the correction module 500 is further configured to:
[0136] Calculate the differences between the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance and a preset minimum distance value respectively, to generate a first difference, a second difference, a third difference, a fourth difference, a fifth difference, a sixth difference, a seventh difference, and an eighth difference;
[0137] Use the extension line corresponding to the difference that is not negative and has the smallest value among the first difference, the second difference, the third difference, the fourth difference, the fifth difference, the sixth difference, the seventh difference, and the eighth difference as the correction boundary line.
[0138] In one embodiment, the device further includes a filling module, and the filling module is configured to:
[0139] Perform four-neighborhood extraction with one of the two endpoints of the correction boundary line as the starting point and the other endpoint as the ending point, to generate four-neighborhood information of the correction boundary line;
[0140] Use the label corresponding to the partition other than the preset label obtained first from the four-neighborhood information to generate a filling label;
[0141] Fill the correction boundary line with the filling label.
[0142] Refer to Figure 3 , and this application embodiment also provides a computer device. This computer device may be a server, and its internal structure may be as Figure 3 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store intelligent partition data, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements an intelligent partition method.
[0143] Those skilled in the art can understand that Figure 3 the structure shown in
[0144] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, an intelligent partitioning method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0145] In summary, for the intelligent partitioning method, device, and equipment provided in this embodiment, the house map can be partitioned by different rooms, different partitions can be marked with different labels, the wall is marked with a preset label. When the sweeping robot performs partition correction, the boundary line between partitions can be extracted based on the identification labels between different partitions, and whether the boundary line is inclined can be judged by the span of the endpoints at both ends of the partition boundary line. If the partition boundary line is inclined, the inclination of the boundary line will be corrected. At the same time, the inclined boundary line can be cleared, and the corrected boundary line is marked at the intelligent partition map corresponding to the inclined boundary line, and the adjacent partition labels are scanned through the four-neighborhood to fill the area near the corrected boundary line, which can effectively solve the problem that the sweeping robot is easily affected by obstacles such as walls during map building in the prior art, resulting in incomplete map building or diagonal lines in room partitioning.
[0146] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium provided in the present application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0147] It should be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent in such a process, device, article or method. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, device, article or method including such an element.
[0148] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. An intelligent zoning method, characterized in that, Including: Obtain the whole-house map of the house, and perform intelligent zoning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent zoning map; Generate a zoning boundary line according to the intelligent zoning map, and obtain two points with the largest interval distance in the zoning boundary line to generate a first endpoint and a second endpoint; On the intelligent zoning map, establish a rectangular coordinate system with any side of the intelligent zoning map as the X-axis and the direction perpendicular to this side as the Y-axis, and calculate the slope between the first endpoint and the second endpoint; When the slope between the first endpoint and the second endpoint is greater than a preset value, determine that the zoning boundary line is an inclined boundary line; Perform correction on the inclined boundary line to generate a corrected boundary line, delete the inclined boundary line, and add the corrected boundary line to the intelligent zoning map; The step of performing correction on the inclined boundary line to generate a corrected boundary line, deleting the inclined boundary line, and adding the corrected boundary line to the intelligent zoning map includes: Taking the first endpoint as the first center point, make extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis respectively until touching the wall; Calculate and obtain the distances when the first endpoint touches the wall along the four directions respectively to generate a first distance, a second distance, a third distance, and a fourth distance; Taking the second endpoint as the second center point, make extension lines along the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis respectively until touching the wall; Calculate and obtain the distances when the second endpoint touches the wall along the four directions respectively to generate a fifth distance, a sixth distance, a seventh distance, and an eighth distance; Take the extension line corresponding to the minimum of the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance, and the eighth distance as the corrected boundary line; Clear the inclined boundary line in the intelligent zoning map and add the corrected boundary line to the intelligent zoning map.
2. The intelligent zoning method according to claim 1, wherein The step of generating a zoning boundary line according to the intelligent zoning map includes: Extract the boundary door area in the intelligent zoning map based on the door position, and mark the points with different marks on both sides and different from the preset mark in the boundary door area as area demarcation points, where the marks of adjacent zones are different from each other, and all the walls in the intelligent zoning map are marked with a preset mark different from the marks of each zone; Connect the area demarcation points to generate the zoning boundary line.
3. The intelligent partitioning method according to claim 2, wherein, The step of extracting the boundary door area in the intelligent zoning map based on the door position and marking the points with different marks on both sides and different from the preset mark in the boundary door area as area demarcation points includes: Obtain the door positions in the intelligent zoning map; Select a first preset range area including the door position to generate a boundary door area; Perform a four-neighborhood search on the boundary door area, and mark the points with different marks on both sides and different from the preset mark in the four-neighborhood as area demarcation points.
4. The intelligent zoning method according to claim 3, wherein After the step of performing a four-neighborhood search on the boundary door area and marking the points with different marks on both sides and different from the preset mark in the four-neighborhood as area demarcation points, it includes: Continuing to perform a four-neighborhood search on the interval within the second preset range outside the boundary door area; When the interval within the second preset range contains the area demarcation point, it is determined that the deviation of the intelligent partition map is too large; Then re-enter the step: obtaining the whole-house map of the house, and performing intelligent partitioning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent partition map.
5. The intelligent partitioning method according to claim 1, wherein The step of calculating the slope between the first endpoint and the second endpoint includes: Respectively obtaining the coordinate information of the first endpoint and the second endpoint in the rectangular coordinate system, and correspondingly generating a first coordinate and a second coordinate; Connecting the first coordinate and the second coordinate to generate a span line; Calculating the slope of the span line according to the first coordinate and the second coordinate.
6. The intelligent partitioning method according to claim 1, wherein, The step of taking the extension line corresponding to the minimum distance among the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance and the eighth distance as the corrected boundary line includes: Respectively calculating the differences between the first distance, the second distance, the third distance, the fourth distance, the fifth distance, the sixth distance, the seventh distance and the eighth distance and a preset minimum distance value to generate a first difference, a second difference, a third difference, a fourth difference, a fifth difference, a sixth difference, a seventh difference and an eighth difference; Taking the extension line corresponding to the difference that is not negative and the smallest among the first difference, the second difference, the third difference, the fourth difference, the fifth difference, the sixth difference, the seventh difference and the eighth difference as the corrected boundary line.
7. The intelligent partitioning method according to claim 2, wherein After the step of performing the correction on the inclined boundary line to generate a corrected boundary line, deleting the inclined boundary line, and adding the corrected boundary line to the intelligent partition map, it includes: Taking one of the two endpoints of the corrected boundary line as the starting point and the other endpoint as the ending point to perform four-neighborhood extraction to generate the four-neighborhood information of the corrected boundary line; Generating a filling mark with the mark corresponding to the partition other than the preset mark obtained first with the four-neighborhood information; Filling the corrected boundary line with the filling mark.
8. An intelligent zoning device for implementing the method according to any one of claims 1-7, characterized in that, It includes: An intelligent partition map generation module, which is used to obtain the whole-house map of the house, and perform intelligent partitioning on the whole-house map according to the door positions and wall positions of each room in the whole-house map to generate an intelligent partition map; An endpoint generation module, which is used to generate a partition boundary line according to the intelligent partition map, and obtain the two points with the largest interval distance on the partition boundary line to generate a first endpoint and a second endpoint; A calculation module, which is used to establish a rectangular coordinate system on the intelligent partition map with any side of the intelligent partition map as the X-axis and the direction perpendicular to the side as the Y-axis, and calculate the slope between the first endpoint and the second endpoint; A determination module, which is used to determine that the partition boundary line is an inclined boundary line when the slope between the first endpoint and the second endpoint is greater than a preset value; A correction module is used to perform correction on the inclined boundary line, generate a corrected boundary line, delete the inclined boundary line, and add the corrected boundary line to the intelligent partition map.
9. A computer device, characterized in that, It includes a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps of the intelligent partition method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
License plate tilt correction method and apparatus
CN105608455A
Region division method and device, terminal and computer readable medium
CN111419118A
Indoor cleaning zoning method and device and sweeping robot
CN114365974A