Semantic map construction method and device, equipment and storage medium

By converting the 3D point cloud map into a 2D raster map and combining it with single-line radar information, depth-first search is used to update the semantic map, which solves the problems of poor obstacle avoidance and high cost in the existing technology, and achieves high accuracy and low cost. Semantic map construction.

CN118644629APending Publication Date: 2024-09-13HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410683015.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

The existing 3D exploration method of home service robots is based on multi-line radar or depth camera, which has poor obstacle avoidance effect and high cost, resulting in low accuracy of the constructed map.

Method used

Convert the 3D point cloud map scanned by the intelligent robot into a 2D raster map, combine it with the obstacle map information of the single-line radar, use depth-first search to extract the boundaries of the fused map, and update the initial 3D semantic map to achieve low-cost and high-accuracy Semantic map construction.

Benefits of technology

It improves the accuracy and efficiency of semantic maps, reduces the amount of calculation and resource overhead, saves costs, and ensures the integrity of map exploration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644629A
    Figure CN118644629A
Patent Text Reader

Abstract

The invention provides a semantic map construction method and device, equipment and a storage medium. The method comprises the following steps: traversing each point of a pre-acquired initial 3D semantic map, converting the initial 3D semantic map into a 2D grid map, fusing a pre-acquired obstacle map with the 2D grid map, and performing boundary extraction on the fused map by adopting depth-first search to obtain a boundary set, and finally, updating the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map. According to the method, the accuracy and the efficiency of the established semantic map are improved while the map exploration integrity is ensured, the calculation amount is reduced in a mode of converting the 3D point cloud map into the 2D grid map, and the cost is saved by adopting a low-cost sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for constructing a semantic map. Background Art

[0002] With the development of science and technology, home service robots have gradually become mainstream. Home robots refer to robots used in homes or private residences. They are usually designed to help people solve certain daily tasks or provide entertainment and interactive experiences. In order to make the interaction and working capabilities of home service robots more convenient, the obstacle avoidance and semantic map autonomous exploration capabilities of home service robots have become key.

[0003] In the prior art, the existing 3D exploration methods of home service robots are mostly based on multi-line radar or depth camera for obstacle avoidance.

[0004] However, this existing method has poor obstacle avoidance effect and high cost, resulting in low accuracy of the constructed map. Summary of the invention

[0005] The present application provides a semantic map construction method, device, equipment and storage medium to solve the problem of how to enhance the obstacle avoidance effect of an intelligent robot and construct an accurate semantic map.

[0006] In a first aspect, the present application provides a method for constructing a semantic map, which is applied to an intelligent robot, and the method comprises:

[0007] Traversing the pre-acquired initial 3D semantic map, and converting the initial 3D semantic map into a 2D grid map;

[0008] Fusing the pre-acquired obstacle map with the 2D grid map to obtain a fused map;

[0009] Extracting boundaries from the fused map using a depth-first search to obtain a boundary set, wherein the boundary set includes at least one boundary, and each boundary includes a plurality of continuous boundary points;

[0010] The initial 3D semantic map is updated according to the boundary set to obtain a target 3D semantic map.

[0011] In combination with the first aspect, in some embodiments, updating the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map includes:

[0012] For each boundary, according to the length of the boundary and a preset first length threshold, a target boundary point set corresponding to the boundary is determined, each target boundary point set includes at least one target boundary point, and the target boundary point is a boundary point in the boundary that is closest to the intelligent robot;

[0013] For each target boundary point, the intelligent robot moves to the target boundary point and performs rotation scanning in situ to obtain scanning information corresponding to the target boundary point, wherein the scanning information includes map information within a preset range of the location of the target boundary point;

[0014] Updating the scanning information corresponding to all target boundary points to the initial 3D semantic map to obtain a first 3D semantic map;

[0015] Continue to extract boundaries from the first 3D semantic map, and update the first 3D semantic map according to the extracted boundary set until the updated first 3D semantic map has no boundaries, and determine the updated first 3D semantic map as the target 3D semantic map.

[0016] In combination with the first aspect, in some embodiments, for each boundary, determining a set of target boundary points corresponding to the boundary according to a length of the boundary and a preset first length threshold includes:

[0017] For each boundary, determining whether segmentation processing needs to be performed on the boundary according to the length of the boundary and the first length threshold;

[0018] If it is determined that the boundary does not need to be segmented, the target boundary points corresponding to the boundary are determined by calculating all boundary points in the boundary using a preset target boundary point calculation formula to obtain a target boundary point set corresponding to the boundary.

[0019] In combination with the first aspect, in some embodiments, the method further includes:

[0020] If it is determined that the boundary needs to be segmented, segmenting the boundary according to a preset segmentation rule to obtain at least two sub-boundaries;

[0021] For each sub-boundary, the distance and distance weight of each boundary point in the sub-boundary from the intelligent robot are calculated according to a preset distance weight formula, and the boundary point corresponding to the highest distance weight is determined as the target boundary point corresponding to the sub-boundary;

[0022] The target boundary points corresponding to all sub-boundaries are aggregated to obtain a target boundary point set corresponding to the boundary.

[0023] In combination with the first aspect, in some embodiments, extracting boundary points from the fused map using depth-first search to obtain a boundary set includes:

[0024] Randomly select any point in the fused map as a starting point;

[0025] According to a preset rule, starting from the starting point, all connected areas in the fused map are traversed in sequence, and points in the fused map that meet preset conditions are determined as boundary points;

[0026] Connecting consecutive boundary points to obtain the at least one boundary;

[0027] All boundaries are aggregated to obtain the boundary set.

[0028] In combination with the first aspect, in some embodiments, the preset condition includes that the length of the continuous boundary of any point in the fused map is greater than a preset second length threshold.

[0029] In combination with the first aspect, in some embodiments, the method further includes:

[0030] At startup, perform rotation scanning in situ to obtain a new map;

[0031] Traversing the newly created map to determine whether there is a new recognition target, the new recognition target representing an actual object in the actual environment corresponding to the newly created map;

[0032] If it is determined that the newly identified target exists, move to the location of the newly identified target and perform rotation scanning to obtain scanning information around the newly identified target;

[0033] The scan information is updated to the newly created map to obtain the initial 3D semantic map.

[0034] In combination with the first aspect, in some embodiments, the method further includes:

[0035] Obstacle scanning is performed by a single-line radar to obtain the obstacle map.

[0036] In a second aspect, the present application provides a device for constructing a semantic map, comprising:

[0037] A conversion module, used for traversing the pre-acquired initial 3D semantic map and converting the initial 3D semantic map into a 2D grid map;

[0038] A fusion module, used to fuse the pre-acquired obstacle map with the 2D grid map to obtain a fused map;

[0039] An extraction module, configured to extract boundaries from the fused map by depth-first search to obtain a boundary set, wherein the boundary set includes at least one boundary, and each boundary includes a plurality of continuous boundary points;

[0040] The first updating module is used to update the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map.

[0041] In conjunction with the second aspect, in some embodiments, the first update module includes:

[0042] A first determining unit is used to determine, for each boundary, a target boundary point set corresponding to the boundary according to the length of the boundary and a preset first length threshold, wherein the target boundary point set includes at least one target boundary point, and each target boundary point is a boundary point in the boundary to which it belongs that is closest to the intelligent robot;

[0043] A scanning unit, for each target boundary point, the intelligent robot moves to the target boundary point and performs rotation scanning in situ to obtain scanning information corresponding to the target boundary point, wherein the scanning information includes map information within a preset range of the location of the target boundary point;

[0044] An updating unit, configured to update the scanning information corresponding to all target boundary points to the initial 3D semantic map to obtain a first 3D semantic map;

[0045] The second determination unit is used to continue to extract boundaries from the first 3D semantic map, and update the first 3D semantic map according to the extracted boundary set until the updated first 3D semantic map has no boundaries, and determine the updated first 3D semantic map as the target 3D semantic map.

[0046] In conjunction with the second aspect, in some embodiments, the first determining unit is specifically configured to:

[0047] For each boundary, determining whether segmentation processing needs to be performed on the boundary according to the length of the boundary and the first length threshold;

[0048] If it is determined that the boundary does not need to be segmented, the target boundary points corresponding to the boundary are determined by calculating all boundary points in the boundary using a preset target boundary point calculation formula to obtain a target boundary point set corresponding to the boundary.

[0049] In conjunction with the second aspect, in some embodiments, the first determining unit is further configured to:

[0050] If it is determined that the boundary needs to be segmented, segmenting the boundary according to a preset segmentation rule to obtain at least two sub-boundaries;

[0051] For each sub-boundary, the distance and distance weight of each boundary point in the sub-boundary from the intelligent robot are calculated according to a preset distance weight formula, and the boundary point corresponding to the highest distance weight is determined as the target boundary point corresponding to the sub-boundary;

[0052] The target boundary points corresponding to all sub-boundaries are aggregated to obtain a target boundary point set corresponding to the boundary.

[0053] In conjunction with the second aspect, in some embodiments, the extraction module includes:

[0054] A selection unit, used for randomly selecting any point in the fused map as a starting point;

[0055] A traversal unit, configured to traverse all connected areas in the fused map in sequence starting from the starting point according to a preset rule, and determine points in the fused map that meet preset conditions as boundary points;

[0056] A connecting unit, used to connect the continuous boundary points to obtain the at least one boundary;

[0057] The summarizing unit is used to summarize all the boundaries to obtain the boundary set.

[0058] In conjunction with the second aspect, in some embodiments, the preset condition includes that the length of the continuous boundary of any point in the fused map is greater than a preset second length threshold.

[0059] In conjunction with the second aspect, in some embodiments, the device further includes:

[0060] A new module is created to perform rotation scanning in situ at startup to obtain a new map;

[0061] A determination module, used to traverse the newly created map and determine whether there is a new recognition target, wherein the new recognition target represents an actual object in the actual environment corresponding to the newly created map;

[0062] A first scanning module is used for moving to the location of the newly identified target to perform rotation scanning if it is determined that the newly identified target exists, so as to obtain scanning information around the newly identified target;

[0063] The second updating module is used to update the scanning information to the newly created map to obtain the initial 3D semantic map.

[0064] In conjunction with the second aspect, in some embodiments, the device further includes:

[0065] The second scanning module is used to scan obstacles through a single-line radar to obtain the obstacle map.

[0066] In a third aspect, the present application provides an intelligent robot, including: a memory, a processor, a communication interface, and a single-line radar;

[0067] The memory stores computer-executable instructions;

[0068] The processor executes the computer-executable instructions stored in the memory to implement the method for constructing a semantic map described in the first aspect.

[0069] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method for constructing a semantic map described in any of the aforementioned aspects.

[0070] In a fifth aspect, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the method for constructing a semantic map described in the first aspect.

[0071] The semantic map construction method, device, equipment and storage medium provided in the present application traverse each point of the pre-acquired initial 3D semantic map, convert the initial 3D semantic map into a 2D grid map, then fuse the pre-acquired obstacle map with the 2D grid map, and use depth-first search to extract the boundaries of the fused map to obtain a boundary set, and finally update the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map. The above method improves the accuracy and efficiency of the established semantic map while ensuring the integrity of map exploration, and reduces the amount of calculation by converting the 3D point cloud map into a 2D grid map, and saves costs by using low-cost sensors. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] 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.

[0073] Figure 1 A diagram of an application scenario of the method for constructing a semantic map provided in an embodiment of the present application;

[0074] Figure 2 A flowchart of a first embodiment of a method for constructing a semantic map provided in an embodiment of the present application;

[0075] Figure 3 is a schematic diagram of an exemplary 3D initial semantic map;

[0076] Figure 4 is a schematic diagram of an exemplary grid map;

[0077] Figure 5 is a schematic diagram of an exemplary obstacle map;

[0078] Figure 6 A flowchart of a second embodiment of a method for constructing a semantic map provided in an embodiment of the present application;

[0079] Figure 7 A schematic diagram of an exemplary target boundary point determination;

[0080] Figure 8 A flowchart of a third embodiment of a method for constructing a semantic map provided in an embodiment of the present application;

[0081] Fig. 9 is a schematic diagram of an exemplary target boundary point;

[0082] Fig.10 A flowchart of a fourth embodiment of a method for constructing a semantic map provided in an embodiment of the present application;

[0083] Fig.11 is an exemplary boundary set schematic diagram;

[0084] Fig.12 A flowchart of a fifth embodiment of a method for constructing a semantic map provided in an embodiment of the present application;

[0085] Fig.13 A flowchart of the actual implementation of the method for constructing a semantic map provided in an embodiment of the present application;

[0086] Fig.14 A schematic diagram of the structure of a first embodiment of a device for constructing a semantic map provided in an embodiment of the present application;

[0087] Fig.15 A schematic diagram of the structure of Embodiment 2 of the apparatus for constructing a semantic map provided in the embodiment of the present application;

[0088] Fig.16 A schematic diagram of the structure of a third embodiment of a device for constructing a semantic map provided in an embodiment of the present application;

[0089] Fig.17 A schematic diagram of the structure of a fourth embodiment of a device for constructing a semantic map provided in an embodiment of the present application;

[0090] Fig.18 A schematic diagram of the structure of the intelligent robot provided in an embodiment of the present application.

[0091] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0092] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0093] With the development of science and technology, home service robots have gradually become mainstream. Home robots refer to robots used in homes or private residences. They are usually designed to help people solve certain daily tasks or provide entertainment and interactive experiences. In order to make the interaction and working capabilities of home service robots more convenient, the obstacle avoidance and semantic map autonomous exploration capabilities of home service robots become key. In the prior art, the existing 3D exploration methods of home service robots are mostly based on multi-line radar or depth camera-based obstacle avoidance. However, the existing method has poor obstacle avoidance effect and high cost, resulting in low accuracy of the constructed map.

[0094] In response to the above problems, the present application provides a method, device, equipment and storage medium for constructing a semantic map, thereby realizing low-cost and high-accuracy semantic map construction. Specifically, the existing 3D autonomous exploration method is based on multi-line radar, which has high sensor cost, or is based on depth camera, but the navigation and obstacle avoidance effect is not good. At the same time, the autonomous exploration solution based on three-dimensional map has large resource consumption and slow speed. Taking these problems into consideration, the inventor studied whether it is possible to convert the 3D point cloud map scanned by the intelligent robot into the form of a 2D grid map, and combine the obstacle map information of the single-line radar. On the basis of using lower-cost sensors, the resource consumption is reduced at the same time, and the autonomous exploration of the 3D semantic map is realized. Based on this, the technical solution of the present application is proposed.

[0095] Figure 1The application scenario diagram of the method for constructing the semantic map provided in the embodiment of the present application, the scenario includes at least one intelligent robot, a user and a working environment, wherein the intelligent robot can be a robot used for household services, such as an intelligent sweeping robot, an intelligent floor washing robot, an intelligent food delivery robot and an intelligent companion robot, etc., or an intelligent security robot used for safety protection, and the working environment can be a bedroom, living room, kitchen, balcony, toilet and other environments, or a shopping mall, hotel lobby, restaurant and other environments. The intelligent robot can interact with the user by voice, and the intelligent robot can perform corresponding services according to the user's voice instructions. For example, the user says "please go clean the kitchen" to the intelligent robot, and after the intelligent robot receives the user's instruction to clean the kitchen, it moves to the kitchen to perform the cleaning task. In the aforementioned process, in order to better complete the tasks assigned by the user, the intelligent robot can realize accurate obstacle avoidance and map exploration functions during the movement process.

[0096] It should be noted that the intelligent robot can generate an initial 3D semantic map by scanning the image of the working environment. In order to save computing power and cost and improve efficiency while ensuring the integrity of exploration, the generated initial 3D semantic map can be converted into a 2D grid map, and the obstacle map in the working environment can be obtained through single-line radar scanning. After the obstacle map and the 2D grid map are fused, exploration is carried out based on the fused map, thereby realizing the exploration of a complete 3D semantic map.

[0097] It is worth noting that the present application does not specifically limit the type of intelligent robot, the specific functions that can be realized, and the specific appearance and form. It also does not specifically limit the working environment in which the intelligent robot can work.

[0098] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0099] Figure 2 A flowchart of a method for constructing a semantic map according to an embodiment of the present application is shown in FIG. Figure 2 As shown, the method is performed by an intelligent robot and mainly includes:

[0100] S201: traverse the pre-acquired initial 3D semantic map and convert the initial 3D semantic map into a 2D grid map.

[0101] In this step, in order to enable the intelligent robot to accurately explore the 3D semantic map of the working environment and also to improve the exploration efficiency, the pre-acquired initial 3D semantic map is converted into a 2D grid map for subsequent exploration processing.

[0102] Specifically, each point cloud data in the initial 3D semantic map is traversed, and each point cloud is projected onto a plane. The x and y axes of the point cloud coordinates can be retained, and the z axis can be discarded. Then the resolution is determined, and the projected point cloud data is divided into grid cells, and the number of points or other attributes in each cell are counted. Optionally, this can be achieved by dividing the ground area into a grid and counting the number of points in each cell. Then a 2D grid map is obtained.

[0103] For example, Figure 3 is a schematic diagram of an exemplary 3D initial semantic map. Figure 4 is a schematic diagram of an exemplary grid map, such as Figure 3 and Figure 4 As shown, taking a point cloud coordinate p(x, y, z) in the 3D semantic map as an example, the coordinate point p′(x, y) of the corresponding grid map is obtained according to the values ​​of x and y, and the value of the point in the grid map is set to 100 until every point cloud coordinate in the 3D semantic map is traversed.

[0104] It should be noted that in the grid map, the value of 100 indicates the explored area, and the value of 0 indicates the unexplored area. Figure 4 The medium grey area is the unexplored area, and the black area is the explored area.

[0105] Optionally, the method of converting the initial 3D semantic map into a 2D grid map can also be implemented by a rasterization method, a scan line algorithm or other rasterization methods; or by a depth image method, 3D point cloud data is converted into a depth image, and then the depth image is converted into a 2D grid map using conventional image processing techniques (such as threshold processing, filtering, etc.); or by a machine learning algorithm, such as a convolutional neural network (CNN) or a recurrent neural network (RNN), the representation of obstacles and free space is learned from the 3D point cloud data and converted into a 2D grid map. This embodiment does not specifically limit the specific implementation method for converting the initial 3D semantic map into a 2D grid map.

[0106] S202: Fusing the pre-acquired obstacle map and the 2D grid map to obtain a fused map.

[0107] In this step, in order to improve the obstacle avoidance capability of the intelligent robot, the intelligent robot is also required to be able to identify obstacles more accurately. Therefore, during the map exploration process, the obstacle map acquired in advance and the 2D grid map obtained in the above steps are fused to obtain a fused map.

[0108] Specifically, Figure 5 is a schematic diagram of an exemplary obstacle map, such as Figure 5 As shown, to achieve map fusion, the obstacle map and the 2D grid map can be aligned to ensure that the obstacle map and the 2D grid map are in the same coordinate system, and their scales and directions are aligned, and then a fusion rule is pre-set to determine how to fuse the obstacle map and the 2D grid map. For example, it can be specified which map information is retained in the overlapping area, or how to combine the information of the two maps, and then according to the fusion rule, the actual fusion operation is performed. It can be set to superimpose the information of the two maps, or it can be set to combine them according to the weight, which is not specifically limited in this embodiment.

[0109] It should be noted that there may be conflicts between the two maps during the fusion process, for example, the two maps provide different information at the same location, which can be resolved by adopting methods such as priority and weighted average. The fused map obtained after fusion can also be subjected to necessary post-processing, such as noise removal and smoothing, to obtain a more accurate and reliable result. This embodiment is not specifically limited.

[0110] In another possible implementation, the obstacle map and the 2D grid map are fused. The obstacle map and the 2D grid map can also be fused based on probability, and the obstacle map and the 2D grid map are regarded as probability maps, and Bayesian reasoning or other probabilistic reasoning methods are used to fuse them. This method can provide more flexible and accurate fusion results, allowing uncertainty information to be considered in the fusion process; or through feature fusion, the obstacle map and the 2D grid map are converted into feature representations and passed as input to a deep learning model, which learns how to fuse the feature information of the two maps. This method can take into account more semantic information in the fusion process, and the fusion effect can be optimized through end-to-end training; or through multi-scale fusion, the obstacle map and the 2D grid map are fused at different scales, and then their results are merged together. This method can capture map information at different levels and allow fusion at different scales to obtain more comprehensive and accurate results; or through dynamic update, the fusion is carried out. In a real-time environment, the intelligent robot continuously explores the map, and obstacles can be continuously discovered, so the obstacle map and the 2D grid map may be continuously updated. Therefore, a dynamic update method can be used to update the fusion result in real time according to the latest map information and sensor data to ensure that the fused map is always consistent with the environment. The above map fusion methods can be applied in this solution, and this embodiment does not specifically limit the specific implementation method.

[0111] It should be noted that obstacles in the obstacle map refer to objects that the intelligent robot cannot pass through.

[0112] S203: extracting the boundaries of the fused map using depth-first search to obtain a boundary set.

[0113] In this step, in order to realize map exploration efficiently, boundaries are extracted in the fused map to obtain a boundary set, and subsequent new area exploration is realized based on the boundary set.

[0114] Specifically, first randomly select any point in the fused map as the starting point, then according to the preset rules, start from the starting point, traverse all the connected areas in the fused map in sequence, determine the points in the fused map that meet the preset conditions as boundary points, then connect the continuous boundary points to obtain at least one boundary, and finally summarize all the boundaries to obtain a boundary set.

[0115] It should be noted that in the process of extracting the boundary, it needs to meet the preset conditions to be determined as a boundary, that is, if the boundary length is greater than the preset second length threshold, it is determined as a boundary, and if the length is less than the second length threshold, it is discarded and not regarded as a boundary.

[0116] S204: Update the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map.

[0117] In this step, after obtaining the boundary set of the fused map, in order to obtain a complete map of the working environment, the initial 3D semantic map is updated by exploring the boundary set based on the initial 3D semantic map until the complete map exploration is completed and the target 3D semantic map is obtained.

[0118] Specifically, for each boundary, a set of target boundary points corresponding to the boundary is determined based on the length of the boundary and a pre-set first length threshold. For each target boundary point, the intelligent robot moves to the target boundary point and performs an in-situ rotation scan to obtain scanning information corresponding to the target boundary point. The scanning information corresponding to all target boundary points is then updated to the initial 3D semantic map to obtain a first 3D semantic map. The boundaries of the first 3D semantic map are then extracted, and the first 3D semantic map is updated according to the extracted boundary set until the updated first 3D semantic map has no boundaries, and the updated first 3D semantic map is determined as the target 3D semantic map.

[0119] The method for constructing a semantic map provided in this embodiment traverses each point of the pre-acquired initial 3D semantic map, converts the initial 3D semantic map into a 2D grid map, then fuses the pre-acquired obstacle map with the 2D grid map, and uses depth-first search to extract the boundaries of the fused map to obtain a boundary set, and finally updates the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map. The above method improves the accuracy and efficiency of the established semantic map while ensuring the integrity of map exploration, and reduces the amount of calculation by converting the 3D point cloud map into a 2D grid map, and saves costs by using low-cost sensors.

[0120] Figure 6 A flowchart of a second embodiment of a method for constructing a semantic map provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, based on the above embodiment, step S204 specifically includes:

[0121] S601: For each boundary, determine a target boundary point set corresponding to the boundary according to the length of the boundary and a preset first length threshold.

[0122] In this step, after completing the boundary extraction of the fused map to obtain a boundary set, in order to be able to fully and accurately realize map exploration, when exploring the unexplored area corresponding to each boundary, a target boundary point set can be selected for each boundary according to the length of the boundary, wherein the target boundary point set includes at least one target boundary point, and the target boundary point is the boundary point closest to the intelligent robot in the boundary to which the target boundary point belongs.

[0123] It should be noted that the boundary corresponding to the target boundary point may be the original boundary without segmentation, or each sub-boundary obtained by segmenting the original boundary.

[0124] Specifically, for each boundary, after calculating the length of the boundary to obtain the length of the boundary, a first length threshold is pre-set. If the length of the boundary is less than the first length threshold, it means that the length of the boundary meets the conditions for accurately exploring the unknown area corresponding to the boundary, and the target boundary point that can represent the boundary is directly determined in the boundary, and the target boundary point set corresponding to the boundary only includes one target boundary point. If the length of the boundary is greater than the first length threshold, it means that the boundary is long and the field of view of the intelligent robot is small, then the unknown area corresponding to the boundary cannot be accurately explored by the aforementioned method. Then the boundary can be segmented, so that the boundary is divided into multiple sub-boundaries, and the distance weight of the boundary points in each sub-boundary is calculated, and then the boundary point with the highest distance weight in each sub-boundary is determined as the target boundary point of the sub-boundary, and the target boundary points of all sub-boundaries are summarized to obtain the target boundary point set corresponding to the boundary.

[0125] For example, Figure 7 A schematic diagram of an exemplary target boundary point determination is shown in FIG. Figure 7 As shown, the figure shows two boundaries, namely boundary A and boundary B, wherein the length of boundary A is 1 meter, the length of boundary B is 2 meters, the first length threshold is 1.5 meters, and the length of boundary A is less than the first length threshold, then the target boundary point of boundary A can be directly determined, and the length of boundary B is greater than the first length threshold, then boundary B can be segmented into 3 sub-boundaries, and the distance weights of the boundary points in each sub-boundary are calculated respectively, so as to determine the target boundary point of each boundary, and the target boundary point set corresponding to boundary B includes the target boundary points corresponding to the 3 sub-boundaries respectively.

[0126] It should be noted that when segmenting the boundary, the length of the sub-boundary can be selected according to the actual situation. For example, the boundary can be divided into m segments, and the length of each sub-boundary can be 0.75 meters. The above is just a segmentation example. This embodiment does not specifically limit the number of segments and the length of each sub-boundary.

[0127] S602: For each target boundary point, the intelligent robot moves to the target boundary point and performs an in-situ rotation scan to obtain scanning information corresponding to the target boundary point.

[0128] In this step, if Figure 7 As shown, after the target boundary point is determined, for each target boundary point, the intelligent robot moves from the current position to the target boundary point, and then rotates in situ at the target boundary point to scan, thereby obtaining scanning information corresponding to the target boundary point, wherein the scanning information includes map information within a preset range of the location of the target boundary point.

[0129] It should be noted that the above-mentioned preset range can be the radius range of the robot itself, or it can be a scanning range pre-configured in the intelligent robot, and this embodiment does not make any specific limitation.

[0130] S603: Update the scanning information corresponding to all target boundary points to the initial 3D semantic map to obtain a first 3D semantic map.

[0131] In this step, after scanning the unknown area of ​​each target boundary point in the manner of the above steps, the scanning information corresponding to each target boundary point is obtained, and the scanning information obtained by scanning is updated in the initial 3D semantic map, thereby obtaining the first 3D semantic map.

[0132] S604: Continue to extract boundaries from the first 3D semantic map, and update the first 3D semantic map according to the extracted boundary set until the updated first 3D semantic map has no boundaries, and determine the updated first 3D semantic map as the target 3D semantic map.

[0133] In this step, after obtaining the first 3D semantic map, continue to extract boundaries from the first 3D semantic map to obtain a boundary set corresponding to the first 3D semantic map, and determine a target boundary point set for each boundary in the boundary set corresponding to the first 3D semantic map according to the implementation method in the above steps. After determining the target boundary point, scan each target boundary point in the same manner as the implementation method in the above steps, and update the obtained scanning information in the first 3D semantic map. Continue to repeat the operation until no boundaries can be extracted in the map after the last update, then end the exploration and determine the last updated map as the target 3D semantic map.

[0134] It should be noted that in the process of extracting the boundary set, the extracted boundary needs to meet the preset conditions, that is, the boundary length needs to be greater than the preset second length threshold, then it can be determined as a boundary. If it is less than the second length threshold, it is discarded and not regarded as a boundary.

[0135] The method for constructing a semantic map provided in this embodiment determines, for each boundary, a set of target boundary points corresponding to the boundary according to the length of the boundary and a pre-set first length threshold, and then for each target boundary point, the intelligent robot moves to the target boundary point and performs rotation scanning in situ to obtain scanning information corresponding to the target boundary point, and updates the scanning information corresponding to all target boundary points to the initial 3D semantic map to obtain a first 3D semantic map, and finally continues to extract boundaries from the first 3D semantic map, and updates the first 3D semantic map according to the extracted boundary set until the updated first 3D semantic map has no boundaries, and determines the updated first 3D semantic map as the target 3D semantic map. By performing map exploration by fusing the obstacle map and the 2D grid map as described above, the obstacle avoidance capability of the intelligent robot is improved, and the accuracy and completeness of the 3D semantic map are also improved.

[0136] Figure 8 The flowchart of the third embodiment of the method for constructing a semantic map provided in the embodiment of the present application is as follows: Figure 8 As shown, based on the above embodiments, step S601 specifically includes:

[0137] S801: For each boundary, determine whether segmentation processing is required for the boundary according to the length of the boundary and a first length threshold.

[0138] In this step, in order to ensure the accuracy and completeness of map exploration, the length of each boundary is compared with a preset first length threshold in the extracted boundary set. If the length of the boundary is less than the first length threshold, it is determined that the boundary does not need to be segmented. If the length of the boundary is greater than the first length threshold, it is determined that it needs to be segmented for processing, thereby ensuring the accuracy of exploration.

[0139] S802: If it is determined that the boundary does not need to be segmented, a target boundary point corresponding to the boundary is determined by calculating all boundary points in the boundary using a preset target boundary point calculation formula, thereby obtaining a target boundary point set corresponding to the boundary.

[0140] By comparing each boundary with the first length threshold, if it is determined that the boundary is less than the first length threshold, segmentation is not required, and the target boundary point corresponding to the boundary is directly calculated according to the preset target boundary point calculation formula, and the target boundary point set corresponding to the boundary includes only one target boundary point.

[0141] Specifically, the coordinates of the target boundary point are preferably set to P(X, Y), and the target boundary point can be calculated according to the formula:

[0142]

[0143] Where N is the number of boundary points in the boundary, p i (x i ,y i ) is the coordinate of the i-th boundary point in the boundary.

[0144] S803: If it is determined that the boundary needs to be segmented, the boundary is segmented according to a preset segmentation rule to obtain at least two sub-boundaries.

[0145] S804: For each sub-boundary, the distance and distance weight of each boundary point in the sub-boundary from the intelligent robot are calculated according to a preset distance weight formula, and the boundary point corresponding to the highest distance weight is determined as the target boundary point corresponding to the sub-boundary.

[0146] S805: Summarize the target boundary points corresponding to all sub-boundaries to obtain a target boundary point set corresponding to the boundary.

[0147] By comparing each boundary with the first length threshold, if it is determined that the boundary is greater than the first length threshold, segmentation is required, thereby more accurately determining the target boundary point, thereby achieving accurate and complete map exploration.

[0148] Specifically, the proportion of segments required is determined according to the length of the boundary. After the segmentation is completed, the distance between each boundary point and the intelligent robot is calculated according to the length of each sub-boundary obtained after segmentation and the current position coordinates of the intelligent robot. It can be expressed by the following formula:

[0149]

[0150] Where dis is the distance between the boundary point and the intelligent robot, L is the length of the sub-boundary, (X, Y) is the coordinate of any boundary point in the sub-boundary, and (x, y) is the current position coordinate of the intelligent robot.

[0151] After calculating the distance between each boundary point in each sub-boundary and the intelligent robot, the distance weight is calculated for each boundary point. The specific formula is expressed as follows:

[0152]

[0153] Wherein, W is the distance weight, K is a pre-set weight coefficient, which indicates the degree of influence on the length of the sub-boundary, and its value range is any real number in [0, 0.1]. L is the length of the sub-boundary, dis is the distance between the boundary point and the intelligent robot, and s is a pre-set parameter coefficient, which indicates an additional constant distance used to balance the distance weight, and its value range is any real number in [0.1, 0.5].

[0154] After calculating the distance weight between each boundary point in each sub-boundary and the intelligent robot, the boundary points of each sub-boundary are sorted from large to small according to the distance weight, and the boundary point with the largest distance weight is determined as the target boundary point of the sub-boundary. Then, the target boundary points corresponding to all sub-boundaries are summarized to obtain the target boundary point set corresponding to the boundary.

[0155] For example, Fig. 9 is a schematic diagram of an exemplary target boundary point, such as Fig. 9 As shown, according to the above method to determine the target boundary point, we get Fig. 9 The set of target boundary points corresponding to each boundary in .

[0156] The method for constructing a semantic map provided in the present embodiment determines, for each boundary, whether it is necessary to perform segmentation processing on the boundary according to the length of the boundary and a first length threshold; if it is determined that the boundary does not need to be segmented, the distance and the distance weight of each boundary point in the boundary from the intelligent robot are calculated, and the boundary point corresponding to the highest distance weight is determined as the target boundary point to obtain a set of target boundary points corresponding to the boundary; if it is determined that the boundary needs to be segmented, the boundary is segmented according to a pre-set segmentation rule to obtain at least two sub-boundaries; for each sub-boundary, the distance and the distance weight of each boundary point in the sub-boundary from the intelligent robot are calculated, and the boundary point corresponding to the highest distance weight is determined as the target boundary point corresponding to the sub-boundary; the target boundary points corresponding to all sub-boundaries are summarized to obtain a set of target boundary points; by performing segmented exploration on the extracted longer boundaries, the accuracy of the semantic map is improved, and the integrity and efficiency of the exploration are guaranteed.

[0157] Fig.10 A flowchart of a fourth embodiment of a method for constructing a semantic map provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, based on the above embodiments, step S203 specifically includes:

[0158] S1001: Randomly select any point in the fused map as the starting point.

[0159] In this step, the boundary is extracted by deep search, which requires traversing the connected areas in the 2D grid map, and a starting point needs to be determined.

[0160] Optionally, any point in the 2D grid map can be selected as the starting point when traversing the map. Usually, a point on the edge of the map is selected as the starting point, which is not specifically limited in this embodiment.

[0161] S1002: starting from the starting point, traversing all connected areas in the fused map in sequence according to preset rules, and determining points in the fused map that meet preset conditions as boundary points.

[0162] In this step, after the starting point is determined, it is necessary to traverse all connected areas in the map from the starting point and record the boundary points to determine the boundary points.

[0163] Optionally, the rules for traversal can be pre-set, for example, traversal by row priority, starting from the starting point of the first row of the map, and searching row by row. In each row, search from left to right in sequence. This search order is suitable for situations where the entire map needs to be covered from the upper left corner. Or it is a column-first search, starting from the starting point of the first column of the map, and searching column by column. In each column, search from top to bottom in sequence. This search order is suitable for situations where the entire map needs to be covered from the upper left corner, but may be different from the results of the row-first search. Or it is a random search, randomly selecting a starting point and searching its adjacent points in a random order. This search order is suitable for situations where deterministic results are not required, or for applications such as random sampling. It can also be a distance-first search, starting from the starting point, and searching adjacent points in the order of increasing distance from the starting point. This search order can be used in certain specific application scenarios, such as the shortest path search in path planning. For the traversal rules of distance, this embodiment does not make specific restrictions, and can be adaptively selected according to the actual scenario.

[0164] Optionally, since the fused map incorporates the features of the obstacle map, during the traversal process, if the current boundary point traversed has obstacle features, the selection of the current boundary point is terminated. Because the obstacle is an impassable area, terminating the selection of the current boundary point can improve the traversal efficiency and reduce the amount of calculation.

[0165] S1003: Connect continuous boundary points to obtain at least one boundary.

[0166] S1004: Summarize all boundaries to obtain a boundary set.

[0167] By determining the boundary points in the above steps, continuous boundary points are connected to obtain at least one boundary, and all boundaries are summarized to obtain a boundary set of the fused map.

[0168] Optionally, after continuous boundary points are connected, the boundary points with a length greater than a preset second length threshold are determined as the boundary of the fused map, and the boundary points with a length less than the second length threshold are discarded.

[0169] For example, Fig.11 is an exemplary boundary set diagram, such as Fig.11As shown, after the above steps of boundary extraction, we can get Fig.11 The bounds collection for the map.

[0170] The semantic map construction method provided in this embodiment randomly selects any point in the fused map as the starting point, and traverses all connected areas in the fused map in sequence from the starting point according to preset rules, determines the points in the fused map that meet the preset conditions as boundary points, and then connects the continuous boundary points to obtain at least one boundary, and finally aggregates all boundaries to obtain a boundary set. The above method realizes the boundary extraction of the fused map, saves memory, and the extracted boundaries are more accurate.

[0171] Fig.12 A flowchart of a fifth embodiment of a method for constructing a semantic map provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, based on the above embodiments, the method further includes:

[0172] S1201: At startup, perform rotation scanning in situ to obtain a new map.

[0173] In this step, when the intelligent robot is powered on and working, it receives the user's work instructions, and then performs map exploration before work according to the user's work instructions. It first performs initialization processing, rotates and scans in place for one circle, and generates a new map.

[0174] S1202: Traverse the newly created map to determine whether there is a new recognition target.

[0175] In this step, after a new map is created by scanning, it is necessary to traverse the new map to determine whether a new target is recognized, where the new target represents the actual object scanned by the intelligent robot.

[0176] S1203: If it is determined that there is a new recognition target, move to the location of the new recognition target and perform rotation scanning to obtain scanning information around the new recognition target.

[0177] In this step, after traversing the newly created map, if it is determined that there is a new recognized target in the newly created map, the intelligent robot moves to the location of the new recognized target and performs rotation scanning, thereby obtaining scanning information around the new recognized target.

[0178] It should be noted that the above operation is to determine whether the newly identified target is an impassable obstacle.

[0179] S1204: Update the scan information to the newly created map to obtain an initial 3D semantic map.

[0180] In this step, by determining the newly identified target, if the scan information around the newly identified target is obtained, the scan information is updated in the newly created map to obtain an initial 3D semantic map. Then, based on the initial 3D semantic map, map exploration of unknown areas can be carried out.

[0181] For example, Figure 7 As shown, after traversing the newly created map, if a new identified target is found, the system moves to the position of the new identified target for scanning.

[0182] Optionally, the method further includes:

[0183] S1205: Obstacle scanning is performed by using a single-line radar to obtain an obstacle map.

[0184] After obtaining the initial 3D semantic map, in order to improve the exploration efficiency and avoid unnecessary calculations, obstacles can be scanned through a single-line radar to obtain an obstacle map, where obstacles are areas that the intelligent robot cannot pass through. With the assistance of the obstacle map, the intelligent robot can avoid reaching inaccessible areas and wasting exploration time.

[0185] The method for constructing a semantic map provided in this embodiment performs a rotation scan in situ at startup to obtain a new map, and then traverses the new map to determine whether there is a new identified target. If it is determined that there is a new identified target, it moves to the location of the new identified target for rotation scanning to obtain scanning information around the new identified target, and updates the scanning information to the new map to obtain an initial 3D semantic map. Obstacle scanning is performed by a single-line radar to obtain an obstacle map. Through the above method, the establishment of the initial 3D semantic map and obstacle map is realized, and only a low-cost sensor single-line radar is used, which saves the cost of subsequent map exploration, and the efficiency of map exploration is also improved with the obstacle map obtained in advance.

[0186] Fig.13 A flowchart of the actual implementation of the method for constructing a semantic map provided in the embodiment of the present application is shown in FIG. Fig.13 As shown, the method includes:

[0187] S1301: Acquire a global semantic map.

[0188] The implementation method of this step is the same as the specific implementation method of step S1201 in the aforementioned embodiment, which will not be repeated here. The global semantic map in this step is the newly created map in step S1201.

[0189] S1302: Whether a new target is recognized.

[0190] This step is implemented in the same manner as step S1202 in the above embodiment, and will not be described in detail here. The new target is a newly identified target.

[0191] S1303: Move to the target point.

[0192] S1304: Rotate left or right to expand the recognition range.

[0193] The above two steps are implemented in the same manner as step S1203 in the above embodiment, and will not be described in detail here. The scanning information of the target point is obtained through this step, and is updated in the global semantic map of the above step S1301.

[0194] S1305: Convert the 3D map into a 2D grid map.

[0195] This step is implemented in the same manner as step S201 in the aforementioned embodiment, and will not be described in detail here.

[0196] S1306: Obtain the obstacle map and fuse it with the grid map.

[0197] The specific implementation method of this step is the same as step S1205 and step S202 in the above-mentioned embodiment, which will not be repeated here.

[0198] S1307: Obtain boundary points of the fused map.

[0199] S1308: Whether the boundary points can be extracted.

[0200] S1309: Select a circle on the spot.

[0201] S1310: Arriving at the optimal boundary point.

[0202] The above steps are the same as the specific implementation of steps S203 and S204 in the above embodiment, and will not be repeated here.

[0203] The method for constructing a semantic map provided in this embodiment converts a 3D point cloud map into a 2D grid map and combines it with obstacle map information of a single-line radar. It reduces resource overhead while using lower-cost sensors, thereby achieving autonomous exploration of the 3D semantic map and ensuring the integrity and efficiency of the exploration.

[0204] Fig.14 A structural diagram of a first embodiment of a device for constructing a semantic map provided in an embodiment of the present application, such as Fig.14 As shown, the semantic map construction device 1400 includes:

[0205] The conversion module 1401 is used to traverse the pre-acquired initial 3D semantic map and convert the initial 3D semantic map into a 2D grid map.

[0206] The fusion module 1402 is used to fuse the pre-acquired obstacle map and the 2D grid map to obtain a fused map.

[0207] The extraction module 1403 is used to extract the boundaries of the fused map by using a depth-first search to obtain a boundary set, wherein the boundary set includes at least one boundary, and each boundary includes a plurality of continuous boundary points.

[0208] The first updating module 1404 is used to update the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map.

[0209] Fig.15 The schematic diagram of the structure of the second embodiment of the apparatus for constructing a semantic map provided in the embodiment of the present application is as follows: Fig.15 As shown, based on the above device embodiment, the first updating module 1404 specifically includes:

[0210] The first determination unit 1501 is used to determine, for each boundary, a target boundary point set corresponding to the boundary according to the length of the boundary and a pre-set first length threshold, wherein the target boundary point set includes at least one target boundary point, and each target boundary point is a boundary point in the boundary to which it belongs that is closest to the intelligent robot.

[0211] The scanning unit 1502 is used for each target boundary point. The intelligent robot moves to the target boundary point and performs in-situ rotation scanning to obtain scanning information corresponding to the target boundary point. The scanning information includes map information within a preset range of the location of the target boundary point.

[0212] The updating unit 1503 is used to update the scanning information corresponding to all target boundary points to the initial 3D semantic map to obtain a first 3D semantic map.

[0213] The second determining unit 1504 is used to continue to extract boundaries from the first 3D semantic map, and update the first 3D semantic map according to the extracted boundary set until the updated first 3D semantic map has no boundaries, and determine the updated first 3D semantic map as the target 3D semantic map.

[0214] In a possible implementation, the first determining unit 1501 is specifically configured to:

[0215] For each boundary, determining whether segmentation processing is required for the boundary according to the length of the boundary and a first length threshold;

[0216] If it is determined that the boundary does not need to be segmented, then the target boundary points corresponding to the boundary are determined by calculating all boundary points in the boundary using a preset target boundary point calculation formula, thereby obtaining a target boundary point set corresponding to the boundary.

[0217] In another possible implementation, the first determining unit 1501 is further configured to:

[0218] If it is determined that the boundary needs to be segmented, the boundary is segmented according to a preset segmentation rule to obtain at least two sub-boundaries;

[0219] For each sub-boundary, the distance and distance weight of each boundary point in the sub-boundary from the intelligent robot are calculated according to a preset distance weight formula, and the boundary point corresponding to the highest distance weight is determined as the target boundary point corresponding to the sub-boundary;

[0220] The target boundary points corresponding to all sub-boundaries are summarized to obtain the target boundary point set corresponding to the boundary.

[0221] Fig.16 The schematic diagram of the structure of the third embodiment of the apparatus for constructing a semantic map provided in the embodiment of the present application is as follows: Fig.16 As shown, based on the above device embodiment, the extraction module 1403 specifically includes:

[0222] The selection unit 1601 is used to randomly select any point in the fused map as a starting point.

[0223] The traversal unit 1602 is used to traverse all connected areas in the fused map in sequence starting from the starting point according to a preset rule, and determine the points in the fused map that meet the preset conditions as boundary points.

[0224] The connecting unit 1603 is used to connect continuous boundary points to obtain at least one boundary.

[0225] The summarizing unit 1604 is used to summarize all the boundaries to obtain a boundary set.

[0226] Optionally, the preset condition in the above embodiment includes that the length of the continuous boundary where any point in the fused map is located is greater than a preset second length threshold.

[0227] Fig.17 This is a structural diagram of a fourth embodiment of a device for constructing a semantic map provided in an embodiment of the present application, such as Fig.17 As shown, based on the above device embodiment, the semantic map construction device 1400 further includes:

[0228] The new module 1701 is used to perform in-situ rotation scanning to obtain a new map when starting.

[0229] The determination module 1702 is used to traverse the newly created map to determine whether there is a new recognition target, where the new recognition target represents an actual object in the actual environment corresponding to the newly created map.

[0230] The first scanning module 1703 is used to move to the location of the new recognition target and perform rotation scanning to obtain scanning information around the new recognition target if it is determined that there is a new recognition target.

[0231] The second updating module 1704 is used to update the scan information to the newly created map to obtain an initial 3D semantic map.

[0232] Optionally, the semantic map construction device 1400 further includes:

[0233] The second scanning module 1705 is used to perform obstacle scanning through a single-line radar to obtain an obstacle map.

[0234] The apparatus for constructing a semantic map provided in each of the above embodiments is used to execute the method for constructing a semantic map in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be described in detail here.

[0235] Fig.18 A schematic diagram of the structure of the intelligent robot provided in the embodiment of the present application is shown in FIG. Fig.18 As shown, the intelligent robot 1800 includes: a memory 1801, a processor 1802, a communication interface 1803, and a single-line radar 1804;

[0236] Memory 1801 stores computer-executable instructions.

[0237] The processor 1802 executes the computer-executable instructions stored in the memory 1801 to implement the method for constructing a semantic map in any of the aforementioned embodiments.

[0238] The communication interface 1803 is used for data communication with other external devices.

[0239] The single-line radar 1804 is used to scan the obstacle map.

[0240] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to execute the semantic map construction method provided by the various embodiments described above.

[0241] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0242] Optionally, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0243] An embodiment of the present application also provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution provided by any of the above method embodiments can be implemented.

[0244] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0245] It is to be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not intended to limit the scope of the embodiments of the present application. In the embodiments of the present application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0246] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0247] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for constructing a semantic map, characterized in that: Applied to an intelligent robot, the method comprises: Traversing the pre-acquired initial 3D semantic map, and converting the initial 3D semantic map into a 2D grid map; Fusing the pre-acquired obstacle map with the 2D grid map to obtain a fused map; Extracting boundaries from the fused map using a depth-first search to obtain a boundary set, wherein the boundary set includes at least one boundary, and each boundary includes a plurality of continuous boundary points; The initial 3D semantic map is updated according to the boundary set to obtain a target 3D semantic map.

2. The method according to claim 1, characterized in that The updating of the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map includes: For each boundary, according to the length of the boundary and a preset first length threshold, a target boundary point set corresponding to the boundary is determined, the target boundary point set includes at least one target boundary point, and each target boundary point is a boundary point in the boundary to which it belongs that is closest to the intelligent robot; For each target boundary point, the intelligent robot moves to the target boundary point and performs rotation scanning in situ to obtain scanning information corresponding to the target boundary point, wherein the scanning information includes map information within a preset range of the location of the target boundary point; Updating the scanning information corresponding to all target boundary points to the initial 3D semantic map to obtain a first 3D semantic map; Continue to extract boundaries from the first 3D semantic map, and update the first 3D semantic map according to the extracted boundary set until the updated first 3D semantic map has no boundaries, and determine the updated first 3D semantic map as the target 3D semantic map.

3. The method according to claim 2, characterized in that The step of determining, for each boundary, a target boundary point set corresponding to the boundary according to a length of the boundary and a preset first length threshold, includes: For each boundary, determining whether segmentation processing needs to be performed on the boundary according to the length of the boundary and the first length threshold; If it is determined that the boundary does not need to be segmented, the target boundary points corresponding to the boundary are determined by calculating all boundary points in the boundary using a preset target boundary point calculation formula to obtain a target boundary point set corresponding to the boundary.

4. The method according to claim 3, characterized in that The method further comprises: If it is determined that the boundary needs to be segmented, segmenting the boundary according to a preset segmentation rule to obtain at least two sub-boundaries; For each sub-boundary, the distance and distance weight of each boundary point in the sub-boundary from the intelligent robot are calculated according to a preset distance weight formula, and the boundary point corresponding to the highest distance weight is determined as the target boundary point corresponding to the sub-boundary; The target boundary points corresponding to all sub-boundaries are aggregated to obtain a target boundary point set corresponding to the boundary.

5. The method according to claim 1, characterized in that The step of extracting boundary points from the fused map using depth-first search to obtain a boundary set includes: Randomly select any point in the fused map as a starting point; According to a preset rule, starting from the starting point, all connected areas in the fused map are traversed in sequence, and points in the fused map that meet preset conditions are determined as boundary points; Connecting consecutive boundary points to obtain the at least one boundary; All boundaries are aggregated to obtain the boundary set.

6. The method according to claim 5, characterized in that The preset condition includes that the length of the continuous boundary of any point in the fused map is greater than a preset second length threshold.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: At startup, perform rotation scanning in situ to obtain a new map; Traversing the newly created map to determine whether there is a new recognition target, the new recognition target represents an actual object in the actual environment corresponding to the newly created map; If it is determined that the newly identified target exists, move to the location of the newly identified target and perform rotation scanning to obtain scanning information around the newly identified target; The scan information is updated to the newly created map to obtain the initial 3D semantic map.

8. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Obstacle scanning is performed by a single-line radar to obtain the obstacle map.

9. A device for constructing a semantic map, characterized in that: include: A conversion module, used for traversing the pre-acquired initial 3D semantic map and converting the initial 3D semantic map into a 2D grid map; A fusion module, used to fuse the pre-acquired obstacle map with the 2D grid map to obtain a fused map; An extraction module, configured to extract boundaries from the fused map by depth-first search to obtain a boundary set, wherein the boundary set includes at least one boundary, and each boundary includes a plurality of continuous boundary points; The first updating module is used to update the initial 3D semantic map according to the boundary set to obtain a target 3D semantic map.

10. An intelligent robot, characterized in that: include: Memory, processor, communication interface, single-line radar; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method for constructing a semantic map as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for constructing a semantic map as described in any one of claims 1 to 8.