A method and device for constructing a semantic map

By acquiring and updating point cloud data in real time, combined with the orientation information in the semantic map, it solves the problems of poor robustness and large computational load of semantic map construction in dynamic environments, and achieves autonomous dynamic updating and accurate positioning of the semantic map.

CN112784873BActive Publication Date: 2024-08-23HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011567751.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2024-08-23
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

Existing devices have poor robustness in constructing semantic maps in dynamic environments. In particular, it is difficult to dynamically update semantic maps in dynamic environments, and traditional methods require dense reconstruction and require a large amount of calculation.

Method used

By acquiring point cloud data within the monitoring range of the target device in real time, object changes are judged based on the similarity between the point cloud data and previous data, the semantic map is updated in real time, and the orientation information of the object is included in the semantic map to achieve accurate positioning and interactive perspective.

Benefits of technology

It realizes independent dynamic updating of semantic maps in dynamic environments, reduces the amount of calculation, and improves the robustness and accurate positioning capabilities of semantic maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112784873B
    Figure CN112784873B
Patent Text Reader

Abstract

The embodiment of the present application discloses a method and device for constructing a semantic map, which can be applied in the field of image construction, and specifically can be used in map construction of robots. The method includes: acquiring point cloud data of objects within the monitoring range of the target device in real time through sensors deployed on the target device, the point cloud data is used to characterize the three-dimensional coordinate value of each point in the point cloud data, the position information of the object can be obtained according to the point cloud data, and based on the similarity between the point cloud data of the object and the point cloud data of each object previously acquired, it is judged whether the object is a new object monitored by the target device, and then the semantic map is updated in real time based on the specific value of the similarity, thereby realizing autonomous dynamic update of the semantic map by the target device. In addition, the semantic map constructed by the embodiment of the present application includes not only the position information of the object, but also the orientation information of the object, so as to accurately locate the object while also providing the viewing orientation for interacting with the object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of map construction, and in particular to a method and device for constructing a semantic map. Background Art

[0002] In recent years, the construction of semantic maps has become one of the research hotspots in computer vision and mobile computing. Semantic maps are widely used in the fields of robotics, mobile terminal devices, human-computer interaction, etc. Indoor semantic maps include spatial attribute information, such as geometric information such as room distribution and room structure, and semantic attribute information, such as the location information of general entities in the room. The goal of semantic map construction is to accurately mark semantic information on a three-dimensional geometric map.

[0003] The existing devices (such as indoor mobile robots) mainly construct semantic maps by first performing 3D dense reconstruction based on the collected images to obtain a 3D dense map, then performing 3D instance segmentation on the 3D dense map, identifying the corresponding semantic information for each voxel, and marking the object area on the 3D dense map based on the obtained semantic information, thereby obtaining a semantic map. The semantic map constructed in this way can also be called a texture-based semantic map.

[0004] The construction method of the texture-based semantic map is to first build the scene based on the collected images, and then perform 3D dense reconstruction of the entire scene at one time. It has poor robustness to dynamic environments, that is, it is difficult to dynamically update the semantic map. Summary of the invention

[0005] The embodiments of the present application provide a method and device for constructing a semantic map, which are used to obtain point cloud data of objects within the monitoring range of a target device in real time, and determine whether the object is a new object monitored by the target device based on the similarity between the point cloud data of the object and the point cloud data of objects previously acquired, and then update the semantic map in real time based on the specific value of the similarity, thereby realizing autonomous dynamic updating of the semantic map by the target device. In addition, the semantic map constructed by the embodiments of the present application includes not only the location information of the object (obtained based on the point cloud data), but also the orientation information of the object, thereby accurately locating the object while also providing an interactive viewing angle orientation.

[0006] Based on this, the embodiments of the present application provide the following technical solutions:

[0007] In the first aspect, the embodiment of the present application first provides a method for constructing a semantic map, which can be used in the field of map construction. The method includes: first, obtaining the point cloud data corresponding to each object within the monitoring range of the target device at the current moment and the current position. At the current moment and the current position, the monitoring range of the target device can be referred to as the first monitoring range, and any object existing within the monitoring range can be referred to as the first object, and the point cloud data corresponding to the first object is referred to as the first point cloud data. The first monitoring range refers to the perception area of ​​the surrounding environment that the target sensor deployed on the target device can perceive at the current moment and the current position. Afterwards, the similarity between the first point cloud data and the second point cloud data is calculated. The second point cloud data is the point cloud data of the second object within the second monitoring range of the target device. The second monitoring range includes the monitoring range of the target device within the time interval from the first moment to the second moment. The second object is any object within the second monitoring range. The semantic map is constructed based on the point cloud data corresponding to each object within the second monitoring range. After calculating the similarity between the first point cloud data and the second point cloud data, the target point cloud data will be further determined based on the similarity. For example, when the similarity is in the first threshold interval, the target point cloud data is the first point cloud data; when the similarity is in the second threshold interval, and the outer envelope box of the first point cloud data is larger than the outer envelope box of the second point cloud data, the target point cloud data is the first point cloud data; when the similarity is in the second threshold interval, and when the first point cloud data and the second point cloud data are point cloud registered, the target point cloud data is fused point cloud data. Specifically, this application does not limit the method for determining the target point cloud data. After the target point cloud data is determined based on the similarity between the first point cloud data and the second point cloud data, the semantic map will be updated, which is specifically manifested in updating the target point cloud data, the label information of the target point cloud data, and the orientation information of the object in the semantic map.

[0008] In the above-mentioned implementation mode of the present application, the target sensor deployed on the target device is used to obtain point cloud data of objects within the monitoring range of the target device in real time, and based on the similarity between the point cloud data of the object and the point cloud data of the object obtained previously, it is determined whether the object is a new object monitored by the target device, and then the semantic map is updated in real time based on the specific value of the similarity, thereby realizing the autonomous dynamic update of the semantic map by the target device. In addition, the semantic map constructed by the implementation mode of the present application includes not only the location information of the object (obtained based on the point cloud data), but also the orientation information of the object, thereby accurately locating the object while also providing an interactive viewing angle orientation.

[0009] In a possible implementation of the first aspect, a method for obtaining the orientation information of an object corresponding to the target point cloud data based on the target point cloud data may specifically be: randomly sampling from the target point cloud data to obtain two points, respectively recorded as a first point and a second point, then connecting the first point and the second point to obtain a perpendicular bisector of the connecting line, and then using the perpendicular bisector as a symmetry plane, mapping the target point cloud data through the perpendicular bisector to obtain mirror point cloud data corresponding to the target point cloud data, and then calculating the distance between the target point cloud data and the mirror point cloud data according to a nearest neighbor clustering algorithm, the distance may be referred to as a first distance, the first distance corresponds to the perpendicular bisector, and the first distance is within a preset threshold range; repeating the above steps until a preset round n is reached to obtain n first distances; finally, calculating the angle between the normal of the target perpendicular bisector and the axis of the reference coordinate system, and using the angle to characterize the orientation information of the object, the target perpendicular bisector corresponding to the target distance, and the target distance has the smallest value among the n first distances.

[0010] In the above-mentioned embodiment of the present application, it is specifically explained how to obtain the orientation information of an object, that is, to obtain the mirror point cloud data by constructing a symmetry plane, and to select an optimal symmetry plane as the final target symmetry plane based on the distance between the target point cloud data and the mirror point cloud data, and finally to select the angle between the normal of the target perpendicular bisector plane and the axis of the reference coordinate system, which is feasible.

[0011] In a possible implementation of the first aspect, the line between the first point and the second point is parallel to any axis (which may be referred to as the first axis) in the reference coordinate system, and the first axis may be the x-axis, y-axis or z-axis of the reference coordinate system.

[0012] In the above-mentioned embodiment of the present application, in order to enable the two randomly sampled points each time to effectively calculate the first distance (that is, to make the calculated first distance fall within a preset range), the collection conditions of the first point and the second point obtained by sampling are constrained, thereby improving the efficiency of effective sampling.

[0013] In a possible implementation of the first aspect, the first point cloud data can also be used to characterize the pixel value of each point in the first point cloud data, and the second point cloud data can also be used to characterize the pixel value of each point in the second point cloud data. Therefore, the method of calculating the similarity between the first point cloud data and the second point cloud data can be: first, according to the nearest neighbor clustering algorithm, the distance between the first point cloud data and the second point cloud data is calculated, and the distance can be called the second distance. Then, since each point cloud data is not only used to characterize the three-dimensional coordinate value of each point in the corresponding point cloud data in the reference coordinate system, but also used to characterize the pixel value of each point corresponding to the corresponding RGB image, the difference in pixel value between the first point cloud data and the second point cloud data can be further calculated. Finally, the similarity between the first point cloud data and the second point cloud data is calculated based on the second distance and the difference in pixel value.

[0014] In the above-mentioned embodiment of the present application, it is described that the similarity between the first point cloud data and the second point cloud data is calculated by the difference in the distance and pixel value between the two point cloud data, which has flexibility.

[0015] In a possible implementation of the first aspect, the process of calculating the similarity between the first point cloud data and the second point cloud data based on the difference between the second distance and the pixel value can be obtained by calculating the second norm of the difference between the second distance and the pixel value. Specifically, the weighted sum of the difference between the second distance and the pixel value can be performed to obtain the target value, wherein the weight ratio of the difference between the second distance and the pixel value can be set according to the actual application, or can be calculated based on historical data, which is not limited in this application; finally, the target value is mapped through a Gaussian kernel to obtain the similarity between the first point cloud data and the second point cloud data.

[0016] In the above-mentioned embodiment of the present application, it is specifically described that the similarity between the first point cloud data and the second point cloud data can be obtained by calculating the second norm of the difference between the second distance and the pixel value, which is simple and easy to implement.

[0017] In a possible implementation manner of the first aspect, a method for determining target point cloud data based on similarity may be: when the similarity is within a first threshold interval, determining the first point cloud data as the target point cloud data, wherein the object corresponding to the target point cloud data is the first object.

[0018] In the above-mentioned embodiment of the present application, when the similarity between the first point cloud data and the second point cloud data is in the first threshold interval, it means that the first object corresponding to the first point cloud data is an object newly observed by the target device at the current time and current position within the monitoring range. At this time, the target point cloud data is the first point cloud data, and the semantic map can be subsequently updated according to the first point cloud data, thereby realizing real-time update of the semantic map.

[0019] In a possible implementation of the first aspect, the method for determining the target point cloud data based on the similarity may also be: when the similarity is within the second threshold interval, calculating the first outer envelope box of the first point cloud data and the second outer envelope box of the second point cloud data, and when the volume of the first outer envelope box is greater than the volume of the second outer envelope box, replacing the second point cloud data with the first point cloud data, and determining the first point cloud data as the target point cloud data.

[0020] In the above-mentioned embodiment of the present application, when the similarity between the first point cloud data and the second point cloud data is in the second threshold interval, it means that the first object corresponding to the first point cloud data is observed by the target device within the time interval between the first moment and the second moment. One processing method in this case is to calculate the first outer envelope box of the first point cloud data and the second outer envelope box of the second point cloud data, and replace the outer envelope box with a smaller volume with the outer envelope box with a larger volume. The point cloud data of the object with a larger volume includes more complete information. At this time, the target point cloud data is still the first point cloud data (because the outer envelope box of the first point cloud data is larger in volume), and the semantic map updated accordingly includes more complete object information.

[0021] In a possible implementation manner of the first aspect, when the volume of the first outer envelope box is less than or equal to the volume of the second outer envelope box, the first point cloud data is deleted.

[0022] In the above-mentioned embodiment of the present application, if the result of comparing the volumes of the first outer envelope box and the second outer envelope box is that the volume of the first outer envelope box is less than or equal to the volume of the second outer envelope box, it means that the point cloud data of the object acquired previously (i.e., the second point cloud data) includes more complete object information. In this case, the first point cloud data obtained at the current moment is deleted.

[0023] In a possible implementation of the first aspect, the method for determining the target point cloud data based on the similarity can also be: when the similarity is within the second threshold interval, the first point cloud data and the second point cloud data are point cloud registered to obtain fused point cloud data of the first point cloud data and the second point cloud data, and the fused point cloud data is determined as the target point cloud data.

[0024] In the above-mentioned embodiment of the present application, when the similarity is within the second threshold interval, the first point cloud data and the second point cloud data can also be directly point cloud registered to obtain fused point cloud data of the first point cloud data and the second point cloud data. Because the fused point cloud data contains more information, at this time, the target point cloud data is the fused point cloud data obtained after the fusion of the first point cloud data and the second point cloud data. Subsequently, the semantic map is updated based on the fused point cloud data, so that the updated semantic map includes richer information.

[0025] In a possible implementation of the first aspect, obtaining first point cloud data corresponding to a first object within a first monitoring range of a target device at a current moment can be accomplished by using a target sensor deployed on the target device to collect an RGB image and a depth image of the target device within the first monitoring range at the current moment, and performing instance segmentation on the RGB image to obtain a first area in the RGB image to which the first object belongs, and finally superimposing the first area with the depth image to obtain first point cloud data corresponding to the first object.

[0026] In the above-mentioned implementation mode of the present application, it is specifically explained that the first point cloud data is obtained based on the RGB image and the depth image, while the existing method for constructing the 3D dense map of the semantic map is obtained through dense reconstruction, and the dense reconstruction has a huge amount of calculation. The embodiment of the present application is based on the point cloud data obtained from the RGB image and the depth image, which does not require dense reconstruction and reduces the amount of calculation.

[0027] In a possible implementation manner of the first aspect, the target sensor includes: a depth camera, or a combination of a depth sensor and a camera module.

[0028] In the above-mentioned embodiments of the present application, several specific types of target sensors are described, which are optional.

[0029] In a possible implementation of the first aspect, after updating the target point cloud data, the label information of the target point cloud data and the orientation information of the target object in the semantic map, the method may further include: updating the second moment to the current moment, using the target point cloud data as the newly added second point cloud data, repeating the above steps until the preset conditions are met, and obtaining the target global semantic map, which is the semantic map obtained by the last update.

[0030] In the above-mentioned implementation mode of the present application, it is specifically explained that the execution steps of each of the above-mentioned modules can be repeatedly executed at each current moment to achieve continuous dynamic updating of the semantic map.

[0031] In a possible implementation manner of the first aspect, meeting the preset condition includes: a time interval from the first moment to the second moment reaches a preset duration.

[0032] In the above-mentioned implementation mode of the present application, the condition for stopping updating the semantic map is specifically described, that is, when the construction time reaches a preset time, the constructed semantic map is considered to be relatively complete.

[0033] In a possible implementation of the first aspect, after obtaining the target global semantic map, the method further includes: obtaining point cloud data corresponding to each object within a third monitoring range of the target device, the third monitoring range including the monitoring range of the target device within the time interval from the third moment to the current moment, at least two objects in the third monitoring range, and the point cloud data corresponding to each object within the third monitoring range is used to characterize the pixel value of each point in the corresponding point cloud data and the three-dimensional coordinate value of each point in the reference coordinate system, and then constructing a local semantic map based on the point cloud data corresponding to each object within the third monitoring range of the target device. It should be noted that in the embodiment of the present application, the current moment refers to the current moment in the process of constructing a target global semantic map for optimizing the target after the target device has constructed the target global semantic map, and the third moment is a moment before the current moment, which is set according to user needs. For example, assuming that the user wants to construct a local semantic map containing more point cloud data of objects, the third moment can be selected as a moment earlier than the current moment. Since the constructed local semantic map needs to include at least the point cloud data of two objects, the point cloud data of each object in the local semantic map is combined to construct object pair descriptors. Specifically, the point cloud data corresponding to any two objects in the local semantic map are called the third point cloud data of the third object and the fourth point cloud data of the fourth object. Then, an object pair descriptor (which can be called the first object pair descriptor) can be constructed based on the third point cloud data and the fourth point cloud data. According to the number of objects included in the local semantic map, different numbers of first object pair descriptors can be constructed. At the same time, for the previously obtained target global semantic map, the point cloud data corresponding to each object in the target global semantic map is also constructed to obtain m object pair descriptors (which can be called second object pair descriptors). Then, according to each first object pair descriptor in the local semantic map, p target object pair descriptors that are closer to the first object pair descriptor are determined from the m second object pair descriptors, p≤m. Finally, the local semantic map is respectively aligned with the p target object pair descriptors through the ICP algorithm to obtain p pose values, each of which is used to represent the rotation matrix and translation vector of the point cloud data. When at least q pose values ​​among the p pose values ​​are within the preset error range, it means that the point cloud data of the objects involved in each first object pair descriptor in the local semantic map have been successfully found in the target global semantic map. At this time, the target global semantic map is optimized according to the local semantic map, q≤p.

[0034] In the above-mentioned implementation of the present application, by further establishing a local semantic map and constructing an object pair descriptor to match and optimize the target global semantic map, the accuracy of the target global semantic map is further improved.

[0035] In a possible implementation of the first aspect, when there are not at least q pose values ​​among the p pose values ​​within the preset error range, the above steps are repeated until there are at least q pose values ​​among the p pose values ​​within the preset error range.

[0036] In the above-mentioned embodiment of the present application, if there are not at least q pose values ​​among p pose values ​​within the preset error range, it means that there are too few point cloud data of objects in the local semantic map, and the map optimization module 1707 has not matched the point cloud data of each object in the local semantic map in the target global semantic map. At this time, it is necessary to continue to obtain at least one frame of point cloud data for updating the local semantic map. The purpose of updating the local semantic map is to introduce point cloud data of new objects.

[0037] In a possible design, the object pair descriptor may also be used to characterize the distances between the intersection of the extended lines of the two target objects and the center points of the point cloud data corresponding to the two target objects.

[0038] In the above-mentioned embodiment of the present application, it is explained that the object pair descriptor is also used to characterize the distance between the intersection point of the symmetry plane and the center point. This is because the more information represented by the object pair descriptor, the more accurate the match between the local map and the target global semantic map.

[0039] In one possible design, the target device can be a mobile robot, a handheld mobile terminal device (such as a mobile phone, a personal computer, etc.), or a smart wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.). As long as the device can be used to implement the method for constructing the semantic map described in the embodiment of the present application, it can be called the target device described in the embodiment of the present application. This application does not limit the form of expression of the target device.

[0040] In the above-mentioned embodiments of the present application, it is explained what types of devices the target device may be, which has wide applicability.

[0041] A second aspect of the embodiments of the present application provides a map construction device, which has the function of implementing the method of the first aspect or any possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0042] A third aspect of an embodiment of the present application provides a map construction device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to call the programs stored in the memory to execute the method of the first aspect of the embodiment of the present application or any possible implementation method of the first aspect.

[0043] A fourth aspect of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer can execute the method of the first aspect or any possible implementation of the first aspect.

[0044] A fifth aspect of an embodiment of the present application provides a computer program, which, when executed on a computer, enables the computer to execute the method of the first aspect or any possible implementation of the first aspect.

[0045] The sixth aspect of the embodiment of the present application provides a chip, which includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, the at least one interface circuit is used to perform a transceiver function, and send instructions to at least one processor, the at least one processor is used to run a computer program or instruction, which has the function of implementing the method of the first aspect or any possible implementation of the first aspect, the function can be implemented by hardware, can also be implemented by software, can also be implemented by a combination of hardware and software, the hardware or software includes one or more modules corresponding to the above functions. In addition, the interface circuit is used to communicate with other modules outside the chip, for example, the interface circuit can send the semantic map obtained by the processor on the chip to various intelligent driving (such as, mobile robots) intelligent agents for application. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of a local point cloud registration;

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

[0048] Figure 3 A schematic diagram of the monitoring range of a target device provided in an embodiment of the present application;

[0049] Figure 4 A schematic diagram of performing instance segmentation on an RGB image provided in an embodiment of the present application;

[0050] Figure 5 A schematic diagram showing the comparison of the depth map before and after filtering provided in an embodiment of the present application;

[0051] Figure 6 A schematic diagram of the posture transformation of the target device during continuous motion provided by an embodiment of the present application;

[0052] Figure 7 A schematic diagram of performing pose estimation on a target device provided in an embodiment of the present application;

[0053] Figure 8A schematic diagram of a target device according to an embodiment of the present application acquiring in real time first point cloud data corresponding to a first object within a first monitoring range at a current location of the target device at each current moment;

[0054] Fig. 9 A schematic diagram of calculating the orientation information of a first object based on first point cloud data provided in an embodiment of the present application;

[0055] Fig.10 A schematic diagram of orientation information of a first object provided in an embodiment of the present application;

[0056] Fig.11 A schematic diagram of fused point cloud data provided in an embodiment of the present application;

[0057] Fig.12 A schematic diagram of an object pair descriptor provided in an embodiment of the present application;

[0058] Fig.13 Another schematic diagram of an object pair descriptor provided in an embodiment of the present application;

[0059] Fig.14 A schematic diagram of a matching process between a local semantic map and a target global semantic map provided in an embodiment of the present application;

[0060] Fig.15 A schematic diagram of optimizing the positions of various objects in a target global semantic map based on a local semantic map provided in an embodiment of the present application;

[0061] Fig.16 A schematic diagram of an overall process of the semantic map construction method provided in an embodiment of the present application;

[0062] Fig.17 A schematic diagram of the structure of a map construction device provided in an embodiment of the present application;

[0063] Fig.18 Another structural schematic diagram of the map construction device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The embodiments of the present application provide a method and device for constructing a semantic map, which are used to obtain point cloud data of objects within the monitoring range of a target device in real time, and determine whether the object is a new object monitored by the target device based on the similarity between the point cloud data of the object and the point cloud data of an object previously acquired, and then update the semantic map in real time based on the specific value of the similarity, thereby realizing autonomous dynamic updating of the semantic map by the target device. In addition, the semantic map constructed by the embodiments of the present application includes not only the location information of the object (obtained based on the point cloud data), but also the orientation information of the object, thereby providing an interactive viewing angle orientation for the accurate positioning of the target device object.

[0065] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0066] In order to better understand the scheme of the embodiment of the present application, the following first introduces the relevant terms and concepts that may be involved in the embodiment of the present application. It should be understood that the interpretation of the relevant concepts may be limited due to the specific circumstances of the embodiment of the present application, but it does not mean that the present application is limited to the specific circumstances. There may be differences in the specific circumstances of different embodiments, which are not specifically limited here.

[0067] (1) Point cloud data

[0068] Point cloud data can be referred to as point cloud for short. It refers to a collection of points that express the spatial distribution and surface characteristics of the target in the same spatial reference system. After obtaining the spatial coordinates of each sampling point on the surface of the object, a collection of points is obtained, which is called a point cloud.

[0069] In an embodiment of the present application, point cloud data is used to characterize the three-dimensional coordinate value of each point in the point cloud data in a reference coordinate system; in addition, in some embodiments of the present application, the point cloud data can also be integrated with pixel points of an RGB image. Therefore, in some embodiments of the present application, the point cloud data can also be used to characterize the pixel value of each point in the point cloud data and the three-dimensional coordinate value of each point in the reference coordinate system.

[0070] (2) Point cloud registration

[0071] Point cloud registration, also known as 3D point cloud registration, is one of the key research issues in computer vision and has important applications in many fields of engineering applications, such as reverse engineering, simultaneous localization and mapping (SLAM), image processing, and pattern recognition. The purpose of point cloud registration is to solve the transformation matrix of point clouds with different postures under the same coordinates, and use this matrix to achieve accurate registration of multi-view scanning point clouds, and finally obtain a complete 3D digital model or scene. Point cloud registration includes global point cloud registration and local point cloud registration, such as Figure 1 As shown, Figure 1 The diagram is a schematic diagram of local point cloud registration, that is, registering the local point cloud data of an object with the global point cloud data of the object.

[0072] (3) Iterative closest point (ICP) algorithm

[0073] The ICP algorithm is generally used for the registration of two point cloud data. The basic principle of the ICP algorithm is: find the nearest point (pi, qi) in the matching target point cloud P and source point cloud Q according to certain constraints, and then calculate the optimal matching parameters R and t to minimize the error function. Pi is a point in the target point cloud P, qi is the closest point in the source point cloud Q corresponding to pi, R is the rotation matrix, and t is the translation vector.

[0074] For example, assuming two three-dimensional point cloud data X1 and X2, the point cloud registration process based on the ICP algorithm is: the first step is to calculate the corresponding close point of each point in X2 in X1 to obtain the corresponding point pairs. The second step is to obtain the rigid body transformation matrix that minimizes the average distance of the above corresponding point pairs, and obtain the translation vector and rotation angle matrix. The third step is to use the translation vector and rotation matrix obtained in the previous step on X2 to obtain a new transformed point set. The fourth step is to stop the iterative calculation if the average distance between the new transformed point set and the reference point set is less than a given threshold, otherwise the new transformed point set is used as the new X2 and continues to iterate until the objective function is met.

[0075] (4) Nearest neighbor clustering algorithm

[0076] Clustering algorithm belongs to unsupervised learning, without giving classification categories, and the categories are obtained through similarity. The nearest neighbor clustering algorithm is a clustering algorithm based on distance threshold.

[0077] For example, suppose there are N point cloud data {X1, X2, …, Xn} to be classified, and it is required to be classified into categories with {Z1, Z2, …} as cluster centers according to the distance threshold T. The process of the nearest neighbor clustering algorithm is: the first step is to take any sample Xi as the initial value of the first cluster center, such as setting Z1 = X1. The second step is to calculate the Euclidean distance D21 = ||X2-Z1|| from sample X2 to Z1. If D21>T, a new cluster center Z2 = X2 is defined; otherwise, X2 belongs to the cluster centered on Z1. The third step, assuming that there are cluster centers {Z1, Z2}, calculate D31 = ||X3-Z1|| and D32 = ||X3-Z2||. If D31>T and D32>T, then establish the third cluster center Z3 = X3; otherwise, X3 belongs to the cluster closest to Z1 and Z2 (i.e., the cluster center of the nearest neighbor). It should be noted that this method of selecting the cluster center closest to itself as the cluster to which it belongs is called the nearest neighbor clustering algorithm. The fourth step, and so on, until all N samples are classified.

[0078] (5) Instance segmentation

[0079] Instance segmentation has the characteristics of semantic segmentation, which requires pixel-level classification, and also has some characteristics of target detection, which requires locating different instances (even those belonging to the same classification category). There are generally two methods for instance segmentation: one is a bottom-up method based on semantic segmentation, and the other is a top-down method based on detection.

[0080] The idea of ​​the top-down instance segmentation method is: first find the area (bounding box) where the instance is located through the target detection method, and then perform semantic segmentation within the detection box, and each segmentation result is output as a different instance. Each segmentation result includes the corresponding classification category, the confidence level of the classification category (not greater than 1) and the 2D segmentation mask (mask). The idea of ​​the bottom-up instance segmentation method is: first perform pixel-level semantic segmentation, and then distinguish different instances through clustering, metric learning and other means. This method can maintain better low-level features (detail information and location information), but it has high requirements on the quality of dense segmentation, which will lead to non-optimal segmentation, and has poor generalization ability and cannot cope with complex scenes with many categories.

[0081] (6) Gaussian kernel

[0082] The Gaussian kernel function, also known as the radial basis function (RBF) function, is a scalar function that is radially symmetric. It is usually defined as a monotonic function of the Euclidean distance between any point x in space and a certain center xc, which can be recorded as k = (||xx′||). Its effect is often local, that is, when x is far away from x′, the function value is very small. Among them, x′ is the center of the Gaussian kernel function, and σ is the width parameter of the Gaussian kernel function, which controls the radial range of the Gaussian kernel function. It can map finite-dimensional data to high-dimensional space. The expression of the Gaussian kernel function is shown in formula (1):

[0083]

[0084] (7) Camera coordinate system

[0085] The camera coordinate system is a coordinate system in the 3D coordinate system and is closely related to the observer. In the embodiment of the present application, the observer in the camera coordinate system is the target sensor (such as a depth camera, a depth sensor, and a camera, etc.) deployed on the target device, and the target device is used as the origin of the camera coordinate system, with the x-axis pointing to the right, the z-axis pointing forward (toward the screen or the direction in which the target device is moving), and the y-axis pointing upward (not above the world but above the target device itself).

[0086] (8) World coordinate system

[0087] In the field of computer vision, since the camera can be placed anywhere in the environment, a reference coordinate system is selected in the environment to describe the position of the camera, and it is used to describe the position of any object in the environment. This coordinate system is called the world coordinate system. The relationship between the camera coordinate system and the world coordinate system can be described by the rotation matrix and the translation vector.

[0088] In the embodiment of the present application, since the target device with the camera module can be located at any position in the environment and can move freely in the environment, a reference coordinate system can also be selected to describe the position of the target device and to describe the position of any object in the environment. This coordinate system can also be called a world coordinate system. In this case, the target device can be used as the origin of the camera coordinate system.

[0089] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0090] The present application embodiment first provides a method for constructing a semantic map, see Figure 2 , Figure 2A flowchart of a method for constructing a semantic map provided in an embodiment of the present application may include the following steps:

[0091] 201. Obtain first point cloud data corresponding to a first object within a first monitoring range of a target device at a current moment.

[0092] First, the target device will obtain the point cloud data corresponding to each object within the monitoring range of the target device at the current time and current position. At the current time and current position, the monitoring range of the target device can be called the first monitoring range, and any object within the monitoring range can be called the first object. The point cloud data corresponding to the first object is called the first point cloud data. The first monitoring range refers to the perception area of ​​the surrounding environment that the target sensor deployed on the target device can perceive at the current time and current position. For ease of understanding, Figure 3 As an example, assume that the target device is a mobile robot and the current time is T 1 , the camera deployed on the robot's head at the current time T 1 The monitoring range is as follows Figure 3 As shown in the middle cone, there are two objects in the monitoring range, namely a table and a chair. Then the robot will further obtain the point cloud data corresponding to these two objects.

[0093] It should be noted that in some embodiments of the present application, at the current moment, the target device obtains the point cloud data corresponding to each object within the monitoring range of the current position of the target device based on the raw data collected by the relevant sensors deployed on the target device. Specifically, based on the collected raw data, the target device processes the raw data to obtain the point cloud data corresponding to each object within the monitoring range. The target device collects the raw data and obtains the point cloud data corresponding to each object within the monitoring range of the target device at the current moment and current position based on the raw data through, but not limited to, the following methods:

[0094] A. Based on the acquired RGB image and depth image, the point cloud data corresponding to each object in the first monitoring range is obtained.

[0095] In an embodiment of the present application, the target device can collect the RGB image and depth image of the first monitoring range of the target device at the current moment through the target sensor deployed on the target device. The RGB image and depth image of the first monitoring range refer to the RGB image and depth image formed by the surrounding environment that the target sensor can perceive at the current moment and current position. For example, the RGB image and the corresponding depth image can be obtained by collecting the depth camera deployed on the target device, or the depth image can be collected by the depth sensor deployed on the target device, and the corresponding RGB image can be collected by the camera module (such as a camera) deployed on the target device. Specifically, this application does not limit how the target device collects the RGB image and depth image of the first monitoring range at the current moment.

[0096] After the target sensor collects the RGB image and depth image of the first monitoring range of the target device at the current moment, it first performs instance segmentation on the RGB image. For example, SOLOv2, BlendMask and other algorithms can be used to perform instance segmentation on the RGB image and output the instance segmentation result. The instance segmentation result includes the classification category to which each object on the RGB image belongs (i.e., label, such as specific semantic categories such as chairs and people), the confidence level of the classification category (not greater than 1), and the segmentation mask. The instance segmentation result can be defined as Mi. For ease of understanding, the following example is used to illustrate: Assume that the target device collects a frame of RGB image at the current moment and current position, and instance segmentation is performed on the RGB image to obtain the following Figure 4 The instance segmentation result shown in the figure includes three masks, namely M1, M2, and M3, and the classification categories of M1, M2, and M3 are chair, suitcase, and chair, respectively, with confidence levels of 0.89, 0.93, and 0.98, respectively. The area occupied by the mask corresponding to each object on the RGB image is defined as 1, and the remaining areas are defined as 0. Afterwards, the RGB image (which can be called the processed RGB image) that has implemented instance segmentation and redefined pixel values ​​is superimposed with the depth image. Each object in the processed RGB image has depth information. Specifically, since the area occupied by the mask corresponding to each object in the processed RGB image is defined as 1, and the remaining areas are defined as 0, the processed RGB image is multiplied with the depth image. Since the area with a pixel value of 0 is still 0 after multiplication, the result of the multiplication only retains the area corresponding to each object in the RGB image and the depth information corresponding to each object. Afterwards, the point cloud data of each object is restored through the camera intrinsic parameters, as shown in Figure 4 The RGB image in has three objects, so the point cloud data corresponding to each of the three objects can be restored.

[0097] It should be noted that in some embodiments of the present application, the instance segmentation result and the depth image may be filtered first, for example, by reducing the outliers of the instance segmentation result through morphological filtering, and eliminating the hollow parts of the depth image through depth smoothing. In short, the purpose of filtering is to remove noise, such as Figure 5 As shown, Figure 5 The left part of the figure shows Figure 4 The depth image portion of the object corresponding to M3 before the filtering operation, Figure 5 The right part of the figure shows Figure 4 The depth image part of the object corresponding to M3 after the filtering operation. It can be seen that the filtering operation reduces the noise and improves the accuracy of subsequent point cloud data processing for each object.

[0098] B. Obtain the point cloud data corresponding to each object within the first monitoring range based on the acquired RGB image and the original laser point cloud data.

[0099] In an embodiment of the present application, the target device can collect RGB images and original laser point cloud data of the first monitoring range of the target device at the current moment through a target sensor deployed on the target device. For example, target sensors such as laser radars and ordinary cameras can be deployed on the target device, and RGB images are collected through the camera, and original laser point cloud data are collected through the laser radar. In this case, there is no need to obtain a depth image. It is only necessary to perform instance segmentation on the RGB image according to a similar process to the above, and then correspond the instance segmentation results to the original laser point cloud data obtained at the same time, thereby obtaining the point cloud data of each object in the first monitoring range of the target device at the current moment and current position.

[0100] It should be noted that after the above processing of the collected raw data, the three-dimensional coordinate value of each point in the point cloud data corresponding to each object in the first monitoring range obtained by the target device at the current time and current position is relative to the current position of the target device, that is, the target device is the origin of the camera coordinate system, and the three-dimensional coordinate value of each point in the point cloud data corresponding to each object in the first monitoring range obtained by the target device at the current time and current position is the three-dimensional coordinate value in the camera coordinate system. Since the target device can be placed at any position in the environment and can move freely in the environment, a reference coordinate system can be selected to describe the current position of the target device. For example, the reference coordinate system can be a world coordinate system or other types of coordinate systems. The specific form of the reference coordinate system is not limited here. In an embodiment of the present application, the initial position of the target device in the environment can be selected as the reference coordinate system. During the movement of the target device, the position and posture of the target device need to be estimated to estimate the position and posture transformation of the target device relative to the starting point when the target device moves continuously. The position and posture transformation can be described by a rotation matrix and a translation vector. For example, the position and posture transformation of the target device relative to the starting point can be obtained by a visual odometry (VO) such as ORB-SLAM2, or by a visual inertial odometry (VIO) such as Vins-mono. The position and posture transformation can be represented by a six-degree-of-freedom position and posture (R, t), where R represents a rotation matrix and t represents a translation vector. Afterwards, the three-dimensional coordinate value of each point in the reference coordinate system is obtained based on the position and posture transformation (R, t) and the three-dimensional coordinate value of each point in the camera coordinate system.

[0101] For ease of understanding, the following example is used to illustrate: Figure 6 , Figure 6 When the target device provided in the embodiment of the present application is in a continuous motion and is at different positions, the posture transformation (R, t) is different. For example, at time T 1 The pose transformation at this time is (R 1 , t 1 ), at time T 2 The pose transformation at this time is (R 2 , t 2 ), ..., and so on, we can get the different posture transformations corresponding to different moments on the entire motion trajectory. The motion trajectory is as follows Figure 6 As shown by the dotted line in the figure, the triangle is the origin of the reference coordinate system, and the position of the target device is the current position of the target device in the reference coordinate system at the current moment. 2 ) The three-dimensional coordinate value of each point in the point cloud data in the camera coordinate system is added to the current time T 2The pose transformation of the target device (R 2 , t 2 ) is the three-dimensional coordinate value of each point in the point cloud data in the reference coordinate system.

[0102] It should be noted that in some embodiments of the present application, there are multiple ways to estimate the position and posture of the target device. For example, the method for estimating the position and posture of the target device can be as follows: Figure 7 As shown, Figure 7 A schematic diagram of the pose estimation of the target device provided in the embodiment of the present application, the target device extracts features from the observed RGB image, matches the previous and next frames through the feature descriptor, and finally calculates the 4X4 pose transformation matrix, where the gray points are the established feature point map, the white points are the feature points extracted by the current RGB, which are used to calculate the pose of the current target device, the white lines represent the motion trajectory of the target device, and the starting point of the white lines (i.e. Figure 7 The white triangle in the figure is used as the origin of the reference coordinate system, and the other end of the white line is the current position of the target device.

[0103] In addition, in addition to converting the three-dimensional coordinate value of each point in the point cloud data corresponding to each object within the first monitoring range obtained by the target device at the current moment and current position into the three-dimensional coordinate value in the reference coordinate system, the pixel value of the corresponding area of ​​the RGB image will be further integrated into each point in the corresponding point cloud data. That is to say, the point cloud data corresponding to each object within the first monitoring range obtained by the target device at the current moment and current position can also be used to characterize the pixel value of each point in the corresponding point cloud data and the three-dimensional coordinate value of each point in the reference coordinate system.

[0104] 202. Calculate the similarity between the first point cloud data and the second point cloud data, where the second point cloud data is point cloud data of a second object within a second monitoring range of the target device, and the second monitoring range includes a monitoring range of the target device within a time interval from the first moment to the second moment.

[0105] In an embodiment of the present application, the target device collects raw data in real time (e.g., real-time collection of RGB images and depth images) through a target sensor deployed on the target device, and obtains in real time the first point cloud data corresponding to the first object within the first monitoring range of the current position of the target device at each current moment.

[0106] For ease of understanding, the following example is used to illustrate: Figure 8 , assuming that the target device is a mobile robot, the motion trajectory of the target device starting from the initial position (i.e., the origin) is as follows Figure 8 As shown by the dotted line, assuming that the target device is currently at time T m+1 Location Figure 8As shown. Then, during the movement of the target device from the origin, the point cloud data of each object in the first monitoring range corresponding to the current moment will be obtained at each moment, that is, the target device at T 1 、T 2 、T 3 、T 4 、T 5 ,……,T m 、T m+1 At each time, point cloud data of each object within the first monitoring range of the target device at the corresponding time will be obtained. 1 At this moment, the position and posture of the target device in the reference coordinate system is (R 1 , t 1 ), the target device is in this T 1 The time and the pose (R 1 , t 1 ) The point cloud data corresponding to each object observed within the monitoring range is called T 1 Frame point cloud data; in T 2 At this moment, the position and posture of the target device in the reference coordinate system is (R 2 , t 2 ), the target device is in this T 2 The time and the pose (R 2 , t 2 ) The point cloud data corresponding to each object observed within the monitoring range is called T 2 Frame point cloud data, and so on, can get the target device at the current time T m+1 and the current pose (R m+1 , t m+1 ) Point cloud data corresponding to each object observed within the monitoring range (can be called T m+1 Frame point cloud data), that is, the target device mentioned above obtains the first point cloud data corresponding to the first object within the first monitoring range of the target device at the current moment, and the first object is any object existing in the first monitoring range. During the movement of the target device, the point cloud data corresponding to each object within the monitoring range at the corresponding moment can be obtained in real time at each moment based on the execution process similar to step 201, which will not be repeated here.

[0107] The target device obtains the target device at the current time T m+1 and the current pose (R m+1 , t m+1 ) The point cloud data corresponding to each object observed within the monitoring range (i.e., T m+1 frame point cloud data), the T m+1The frame point cloud data is similar to at least one frame point cloud data obtained from all previous moments, and the latest semantic map up to the current moment is constructed based on the calculation result and the previous m frames of point cloud data. Specifically, the target device calculates the similarity between the first point cloud data and the second point cloud data. The second point cloud data is the point cloud data of the second object within the second monitoring range of the target device. The second monitoring range refers to the observation area of ​​the monitoring range of the target device at each moment in the time interval from the first moment to the second moment, that is, the observation area of ​​the target device within a specific time interval. The second object is any object within the second monitoring range. The semantic map is constructed based on the point cloud data corresponding to each object within the second monitoring range.

[0108] It should be noted here that if the point cloud data obtained before the target device is selected is multi-frame, then the principle of selecting multi-frame point cloud data is continuous multi-frame point cloud data.

[0109] It should be noted here that since each frame of point cloud data is acquired at a different time, the target device will m+1 In the process of calculating the similarity between the frame point cloud data (i.e., the first point cloud data mentioned above) and at least one frame point cloud data obtained previously (which may be referred to as the second point cloud data), the number of selected second point cloud data is different, which means that the selection at the first moment and the second moment are different. For example, the number of selected second point cloud data is 10 and the number of selected second point cloud data is 20, and the corresponding selection time intervals are also different, that is, the time interval between the first moment and the second moment is also different. Based on the different time intervals between the first moment and the second moment, there are two ways to construct a semantic map, which are described below:

[0110] A. First build a local semantic map, and then update the constructed local semantic map to the global semantic map.

[0111] Still with the above Figure 8 For example, as of the current moment, the target device has acquired a total of m+1 frames of point cloud data. Then the target device first builds multiple local semantic maps based on the point cloud data of a preset number of frames, and then updates the global semantic map based on the multiple local semantic maps.

[0112] Take m=29 and the preset frame number as 10 as an example: the target device is at time T 1 And the pose (R 1 , t 1 ), assuming that the first frame of point cloud data has point cloud data of three objects, then the point cloud data of these three objects constitute the initial state of the first local semantic map (the first local semantic map in the initial state can be called J 10 map), as the target device moves, the target device at time T2 And the pose (R 2 , t 2 ) to obtain the second frame of point cloud data. Assuming that the second frame of point cloud data has point cloud data of two objects, the target device will calculate the similarity of the point cloud data of these two objects with the point cloud data of the three objects in the first frame of point cloud data in sequence, obtain the calculation result, and update the J according to the calculation result. 10 Map, the local semantic map after the first update can be called J 11 Map, assuming that J after the first update 11 The map has point cloud data of 4 objects (one object appears twice in the first frame point cloud data and the second frame point cloud data); then, the target device will continue to 3 And the pose (R 3 , t 3 ) to obtain the third frame of point cloud data. Assuming that the third frame of point cloud data has point cloud data of one object, the target device will calculate the similarity of the point cloud data of this object with the point cloud data of the four objects in the first two frames of point cloud data in sequence, obtain the calculation result, and update the J according to the calculation result. 11 Map, the local semantic map after the second update can be called J 12 Map, assuming that J after the second update 12 The map has point cloud data of 5 objects (indicating that the object in the third frame of point cloud data has not appeared before); and so on. 10 And the pose (R 10 , t 10 ) to obtain the 10th frame of point cloud data. Assuming that the 10th frame of point cloud data has point cloud data of 4 objects, the target device will calculate the similarity of the point cloud data of these 4 objects with the point cloud data of each object in the first 9 frames of point cloud data in turn, obtain the calculation result, and update J according to the calculation result. 19 Map, since the preset frame number for building a local map is 10, that is, after the ninth update, J 19 The map is the last update of the first local map, so J 19 The map is used as the first local map J 1 , and the first local map J 1 It is also the initial state of the global map, which can be called Q 0 map.

[0113] Similarly, the target device at time T 11 And the pose (R 11 , t 11) obtains the 11th frame of point cloud data, assuming that the 11th frame of point cloud data has point cloud data of three objects, then the target device forms the initial state of the second local semantic map with the point cloud data of the three objects (the second local semantic map in the initial state can be called J 20 map), as the target device moves, the target device at time T 12 And the pose (R 12 , t 12 ) to obtain the 12th frame of point cloud data. Assuming that the 12th frame of point cloud data has point cloud data of 4 objects, the target device will calculate the similarity of the point cloud data of these 4 objects with the point cloud data of 3 objects in the 11th frame of point cloud data in turn, obtain the calculation result, and update the J according to the calculation result. 20 Map, after the first update of J 20 The map can be called J 21 Map, assuming that J after the first update 21 The map has point cloud data of 5 objects (2 objects appear twice in the 11th frame point cloud data and the 12th frame point cloud data respectively); then, the target device will continue to 13 And the pose (R 13 , t 13 ) to obtain the 13th frame of point cloud data. Assuming that the 13th frame of point cloud data has point cloud data of one object, the target device will calculate the similarity of the point cloud data of this object with the point cloud data of five objects in the previous two frames (i.e., the 11th and 12th frames) of the point cloud data in turn, obtain the calculation result, and update the J according to the calculation result. 21 Map, after the second update of J 21 The map can be called J 22 Map; and so on, when the target device is at time T 20 And the pose (R 20 , t 20 ) to obtain the 20th frame of point cloud data. Assuming that the 20th frame of point cloud data has point cloud data of two objects, the target device will calculate the similarity of the point cloud data of these two objects with the point cloud data of each object in the previous 9 frames (i.e., the 11th to 19th frames) of point cloud data in turn, obtain the calculation result, and update J according to the calculation result. 29 Map, similarly, after the ninth update, J 29 The map is the last update of the second local map, so J 29 The map is used as the second local map J 2 .

[0114] At this time, the target device obtains the first local map J 1 and the second local map J 2, the first local map J will be 1 The point cloud data of each object in the second local map J 2 The point cloud data of each object in the , and the similarity is calculated for each pair, and the global map of the initial state (i.e., Q 0 Map) to get the global map after the first update, which can be called Q 1 map.

[0115] Similarly, the target device will continue to obtain the third local map J based on the maps from the 20th frame to the 30th frame. 3 , and the third local map J 3 The point cloud data of each object in the first updated global map (i.e., Q 1 The point cloud data of each object in the map) calculates the similarity between each other, and compares Q 1 The map is updated to obtain the global map after the second update, which can be called Q 2 map.

[0116] By analogy, the target device is in what position at the current moment, and the point cloud data of which frame is obtained can be executed according to the above steps. For example, assuming that the current moment is T 7 moment, then the corresponding first moment is T 1 , the second moment is T 6 , the target device calculates T 7 Obtain the point cloud data of each object at all times and [T 1 ,T 6 ] The similarity between the point cloud data of each object observed within the monitoring range of the target device during this time interval is calculated, and the local semantic map is updated according to the calculation results. The updated local semantic map is the latest semantic map at the current moment; assuming that the current moment is T 30 Time (T m+1 moment), then the corresponding first moment is T 21 , the second moment is T 29 , the target device calculates T 30 Obtain the point cloud data of each object at all times and [T 21 ,T 29 ]The similarity between the point cloud data of each object observed within the monitoring range of the target device during this time interval is calculated, and the local semantic map is updated according to the calculation results, and the global semantic map is updated based on the local semantic map. The updated global semantic map is the latest semantic map at the current moment, and the details are not repeated here.

[0117] It should be noted that, in some embodiments of the present application, in the process of constructing each local semantic map, if the current moment (e.g., T7 If the point cloud data of each object obtained at the time is not the last frame of point cloud data of the local semantic map of the current round, then the second time is updated to the current time (e.g., T 6 Update time to T 7 time), and at T 7 When the point cloud data of each object acquired at any time belongs to the point cloud data of the new object, T 7 The point cloud data of each object acquired at each moment (i.e., the first point cloud data) is used as the newly added second point cloud data, and the above steps are repeated until the preset conditions (such as the preset number of frames) are met to obtain the target local semantic map, and based on the local semantic map obtained each time, the global semantic map is updated until the target global semantic map is obtained. The target global semantic map is the global semantic map obtained by the last update.

[0118] B. Directly update the global semantic map.

[0119] Still with the above Figure 8 For example, as of the current moment, the target device has acquired a total of m+1 frames of point cloud data. Therefore, when the target device is in motion, each time it obtains a frame of point cloud data, it updates the entire semantic map based on the frame of point cloud data.

[0120] Still taking m=29 as an example: the target device at time T 1 And the pose (R 1 , t 1 ) After obtaining the first frame of point cloud data, assuming that the first frame of point cloud data has point cloud data of three objects, then the point cloud data of these three objects constitute the initial state of the global semantic map (the global semantic map in the initial state can be called Q 0 map), as the target device moves, the target device at time T 2 And the pose (R 2 , t 2 ) to obtain the second frame of point cloud data. Assuming that the second frame of point cloud data has point cloud data of two objects, the target device will calculate the similarity of the point cloud data of these two objects with the point cloud data of the three objects in the first frame of point cloud data in turn, obtain the calculation result, and update the Q according to the calculation result. 0 Map, after the first update of Q 0 The map can be called Q 1 Map, assuming that Q after the first update 1 The map has point cloud data of 4 objects (one object appears twice in the first frame point cloud data and the second frame point cloud data); then, the target device will continue to 3 And the pose (R 3 , t 3) to obtain the third frame of point cloud data. Assuming that the third frame of point cloud data has point cloud data of one object, the target device will calculate the similarity of the point cloud data of this object with the point cloud data of the four objects in the first two frames of point cloud data in turn, obtain the calculation result, and update the Q according to the calculation result. 1 Map, the global semantic map after the second update can be called Q 2 Map, assuming that the global semantic map after the second update has point cloud data of 5 objects (indicating that the object in the point cloud data of the third frame has not appeared before); and so on, when the target device is at time T m+1 And the pose (R m+1 , t m+1 ) to obtain the m+1th frame of point cloud data. Assuming that the m+1th frame of point cloud data has point cloud data of 4 objects, the target device will calculate the similarity of the point cloud data of these 4 objects with the point cloud data of each object in the previous m frames of point cloud data in turn, obtain the calculation result, and update Q according to the calculation result. m Map, Q m The map is the latest semantic map at the current moment.

[0121] By analogy, the above steps can be followed to determine the position of the target device at the current moment and the frame of point cloud data obtained. The details will not be elaborated here.

[0122] It should be noted that, in some implementations of the present application, in the process of constructing the global semantic map, the target device updates the second time to the current time. For example, assuming that the current time is T 7 time, then T 6 Update time to T 7 time, and at T 7 When the point cloud data of each object acquired at any time belongs to the point cloud data of the new object, T 7 The point cloud data of each object acquired at any moment (i.e., the first point cloud data) is used as the newly added second point cloud data, and the above steps are repeated until the preset conditions are met, thereby obtaining the target global semantic map, which is the global semantic map obtained by the last update.

[0123] It should also be noted that, in some embodiments of the present application, the preset condition may be that the time interval from the first moment to the second moment reaches a preset duration, that is, the duration of constructing the global semantic map reaches the preset duration, and the global semantic map is considered to be fully constructed. At this time, the global semantic map obtained by the last update is the final target global semantic map; the preset condition may also be that the target device traverses every location in the environment. When the target device traverses every location in the environment once, the global semantic map can also be considered to be fully constructed. At this time, the global semantic map obtained by the last update is the final target global semantic map. The specific form of the preset condition is not limited here.

[0124] It should be noted that, in some embodiments of the present application, no matter which of the above methods is used to construct a global semantic map, it is necessary to calculate the similarity between the point cloud data of each object obtained at the current moment and the point cloud data of each object obtained in the time interval between the first moment and the second moment. The purpose of calculating the similarity is to determine whether each object at the current moment has appeared in the previous observation process. Since the first point cloud data is any one of the point cloud data of each object obtained at the current moment, and the second point cloud data is any one of the point cloud data of each object obtained in the time interval between the first moment and the second moment, the embodiment of the present application calculates the similarity between the first point cloud data and the second point cloud data. Specifically, a method for calculating the similarity between two point cloud data can be: first, the target device calculates the distance between the first point cloud data and the second point cloud data according to the nearest neighbor clustering algorithm. This distance can be called the second distance, denoted as d ij , i represents the point cloud data of object i in the current frame point cloud data obtained by the target device at the current moment, and j represents the point cloud data of object j in all frames of point cloud data in the time interval between the first moment and the second moment; afterwards, since each point cloud data is not only used to represent the three-dimensional coordinate value of each point in the corresponding point cloud data in the reference coordinate system, but also used to represent the pixel value of each point in the corresponding RGB image, the target device further calculates the difference in pixel values ​​between the first point cloud data and the second point cloud data, which is recorded as m ij , and finally the similarity between the first point cloud data and the second point cloud data is calculated based on the difference between the second distance and the pixel value. The process of the target device calculating the similarity between the first point cloud data and the second point cloud data based on the difference between the second distance and the pixel value can be obtained by calculating the second norm of the difference between the second distance and the pixel value. Specifically, first, the difference between the second distance and the pixel value is weighted and summed to obtain the target value, which is recorded as B ij, where the weight ratio of the second distance and the pixel value difference can be set according to the actual application, or can be calculated based on historical data, which is not limited in this application. Finally, the target value B ij Through Gaussian kernel mapping, the similarity S between the first point cloud data and the second point cloud data is obtained. ij Therefore, the similarity between the point cloud data of each object obtained by the target device at the current moment and the point cloud data of each object obtained in the time interval between the first moment and the second moment can be expressed by the similarity matrix S = [S ij ]express.

[0125] It should be noted that, in some embodiments of the present application, it is also possible to first determine whether the label information of the first object and the label information of the second object are the same. When the label information of the first object and the label information of the second object are the same (for example, both are chairs), the target device calculates the distance between the first point cloud data and the second point cloud data according to the nearest neighbor clustering algorithm. This distance can be called the second distance, which is recorded as d ij-k , i represents the point cloud data corresponding to object i in the current frame point cloud data obtained by the target device at the current moment, j represents the point cloud data of object j in all frame point cloud data in the time interval between the first moment and the second moment that is consistent with the label information of object i, k represents the label information corresponding to object i and object j, that is, the classification category to which they belong, such as chair, table, suitcase, etc.; then, the target device further calculates the difference in pixel values ​​between the first point cloud data and the second point cloud data, recorded as m ij-k Finally, the similarity between the first point cloud data and the second point cloud data is calculated based on the difference between the second distance and the pixel value. The process of the target device calculating the similarity between the first point cloud data and the second point cloud data based on the difference between the second distance and the pixel value can be specifically as follows: first, the difference between the second distance and the pixel value is weightedly summed to obtain a target value, which is recorded as B ij-k , where the weight ratio of the second distance and the pixel value difference can be set according to the actual application, or can be calculated based on historical data, which is not limited in this application. Finally, the target value B ij-k Through Gaussian kernel mapping, the similarity S between the first point cloud data and the second point cloud data is obtained. ij-k Similarly, the above operation is performed on each different label information related to the object in the current frame point cloud data obtained by the target device at the current moment, so as to obtain the similarity between each first point cloud data and each second point cloud data.

[0126] 203. Obtaining orientation information of an object corresponding to the target point cloud data based on the target point cloud data, and obtaining label information of the object based on the target point cloud data, wherein the target point cloud data is determined by the obtained similarity.

[0127] After the target device calculates the similarity between the first point cloud data and the second point cloud data, it will further determine the target point cloud data based on the similarity. For example, when the similarity is in the first threshold interval, the target point cloud data is the first point cloud data; or when the similarity is in the second threshold interval and the outer envelope box of the first point cloud data is larger than the outer envelope box of the second point cloud data, the target point cloud data is the first point cloud data; or when the similarity is in the second threshold interval and the first point cloud data and the second point cloud data are point cloud aligned, the target point cloud data is the fused point cloud data. Specifically, this application does not limit the method for determining the target point cloud data.

[0128] Specifically, the target device will determine which threshold interval the similarity is located in, and judge whether the first object corresponding to the first point cloud data is a newly observed object by the target device at the current moment or an object that has been observed based on the threshold interval, and will further determine the target point cloud data according to the specific value of the similarity, and obtain the orientation information and label information of the object corresponding to the target point cloud data based on the target point cloud data. Finally, the semantic map is updated according to the orientation information and label information of the object corresponding to the target point cloud data. The following are respectively explained: 1) If the similarity between the first point cloud data and the second point cloud data is located in the first threshold interval, it means that the first object corresponding to the first point cloud data is an object newly observed by the target device at the current moment and the current position within the monitoring range. At this time, the target point cloud data is the first point cloud data, and the semantic map is updated according to the first point cloud data; 2) If the similarity between the first point cloud data and the second point cloud data is located in the second threshold interval, it means that the first object corresponding to the first point cloud data is observed by the target device in the time interval between the first moment and the second moment.

[0129] It should be noted that, in some embodiments of the present application, the similarity may be a normalized similarity, that is, the processed similarity has a value range of [0, 1].

[0130] For ease of understanding, the following example is used for illustration: assuming that the first threshold interval is [0, 0.4] (the threshold interval includes the endpoints), and the second threshold interval is [0.7, 1.0] (the threshold interval includes the endpoints). If the similarity value between the first point cloud data and the second point cloud data is within [0, 0.4], it means that the first object corresponding to the first point cloud data is a newly observed object within the monitoring range of the target device at the current moment and the current position. At this time, the target point cloud data is the first point cloud data, and the semantic map can be updated based on the first point cloud data; if the similarity value between the first point cloud data and the second point cloud data is within [0.7, 1.0], it means that the first object corresponding to the first point cloud data is observed by the target device within the time interval between the first moment and the second moment. It should be noted here that, in an embodiment of the present application, if the value of the similarity between the first point cloud data and the second point cloud data is neither within [0, 0.4] nor within [0.7, 1.0], but within the third threshold interval [0.4, 0.7] (the threshold interval does not include the endpoints), it means that the target device is not sure whether the first object corresponding to the first point cloud data has been observed within the time interval between the first moment and the second moment. In this case, the first point cloud data is directly discarded.

[0131] It should be noted that if the target device calculates the similarity between the first point cloud data and the second point cloud data and first determines whether the label information of the first object is the same as the label information of the second object, then it is possible that the label information of the first object is new label information (that is, a classification category that has not appeared before). In this case, the object corresponding to the first point cloud data is directly regarded as a new object observed, and the semantic map is updated based on the first point cloud data.

[0132] It should also be noted that the first point cloud data being located in different threshold intervals indicates whether the object corresponding to the first point cloud data is a new object. If it is a new object, the semantic map is updated according to the first point cloud data; if it is an object observed by the target device in the time interval between the first moment and the second moment, there are also multiple processing methods, which are described below:

[0133] A. When the similarity is within a first threshold range, the target device updates the semantic map according to the first point cloud data.

[0134] If the similarity between the first point cloud data and the second point cloud data is within the first threshold interval, it means that the first object corresponding to the first point cloud data is an object newly observed by the target device at the current moment and the current position within the monitoring range, and the target point cloud data is the first point cloud data. At this time, the target device updates the semantic map according to the first point cloud data in the following manner: the target device obtains the orientation information of the first object according to the first point cloud data (the orientation information of the first object is used to characterize the orientation of the first object. For example, assuming that the first object is a chair, then the direction of the chair is directly in front of the backrest of the chair. For another example, assuming that the first object is a computer monitor, then the direction of the computer monitor is directly in front of the display interface of the computer monitor, and so on. No specific examples are given here), and obtains the label information of the first object based on the first point cloud data. This is because the first point cloud data corresponds to the first object, and the first point cloud data is obtained by instance segmentation based on the RGB image collected at the current moment. Therefore, the label information of the first object, that is, the classification category to which the first object belongs, can be obtained based on the first point cloud data. Afterwards, the target device adds the first point cloud data of the first object, the label information of the first point cloud data, and the orientation information of the first object to the semantic map constructed according to the point cloud data corresponding to each object obtained in the time interval between the first moment and the second moment.

[0135] It should be noted that, in the embodiment of the present application, the purpose of adding the orientation information of the first object into the semantic map is to provide the target device with an interactive viewing orientation, and the purpose of adding the label information of the first object into the semantic map is to enable the target device to not only know in which direction the object exists, but also to further identify what category the object belongs to.

[0136] The following describes how the target device obtains the orientation information of the first object based on the first point cloud data: Fig. 9 , Fig. 9 A schematic diagram of calculating the orientation information of a first object based on first point cloud data provided in an embodiment of the present application. First, the target device randomly samples two points from the first point cloud data, which are respectively recorded as the first point p and the second point p. 1 and the second point p 2 , then for the first point p 1 and the second point p 2 Connect the lines and obtain the perpendicular bisector M of the line. According to the coordinates of the two points in space, the perpendicular bisector M is calculated as follows: 0 (x 0 ,y 0 ,z 0 ) and one of its normal vectors For any point M′(x,y,z) on the perpendicular bisector M, we have Right now Substituting the coordinate values, we obtain the calculation formula of the perpendicular bisector plane M as shown in the following formula (2):

[0137] A(xx 0 )+B(yy 0 )+C(zz 0 )=0 (2)

[0138] The obtained perpendicular bisector plane M may be called a symmetry plane (e.g., a mirror symmetry plane). Afterwards, the target device uses the perpendicular bisector plane M as a mirror symmetry plane, maps the first point cloud data through the perpendicular bisector plane M, and obtains mirror point cloud data corresponding to the first point cloud data. For example, assuming that the first point cloud data is P, there are multiple points in the first point cloud data P (at least including the first point p 1 and the second point p 2 ), the perpendicular bisector M obtained by the above calculation is mapped to the other side of the perpendicular bisector M, and the new point cloud data P′ is the mirror point cloud data of the first point cloud data P. The number of points in the mirror point cloud data P′ is the same as that of the first point cloud data P, and includes the first point p 1 The mirror point p 1 ′ and the second point p 2 The mirror point p 2 ′ The calculation process of obtaining the mirror point cloud data P′ by perpendicularly bisecting the first point cloud data P is shown in the following formula (3):

[0139]

[0140] Where d represents the first point p randomly sampled from the first point cloud data P 1 and the second point p 2 The distance in the reference coordinate system, Represents the first point p 1 To the second point p 2 The direction vector of .

[0141] Afterwards, the target device calculates the distance between the first point cloud data and the mirror point cloud data according to the nearest neighbor clustering algorithm. This distance can be called the first distance, which can be recorded as L. The first distance L is used to evaluate the error between the mirror point cloud data P′ obtained by the above-mentioned perpendicular bisector plane M and the first point cloud data P. If the plane is a true symmetry plane, then L=0.

[0142] It should be noted that in the embodiment of the present application, the first distance also needs to meet certain conditions, that is, the value of the first distance is within a preset range. Because the first and second points of the random sampling may not be ideal, resulting in a large calculated first distance, in which case the sampling is considered to be a failure, and the first distance calculated this time is discarded, and a new point is resampled for calculation. Only when the calculated first distance is within the preset range, the sampling is considered to be valid and recorded as a valid sampling round.

[0143] It should be noted here that since two points are sampled from the first point cloud data each time, a corresponding perpendicular bisector can be obtained, but the two points obtained by random sampling may not be the points with the best effect for finding the perpendicular bisector. Therefore, in an embodiment of the present application, sampling can be performed a certain number of times, such as the above-mentioned random sampling of two points to obtain a first distance. The execution process is repeated for a preset round n (n≥1), thereby obtaining n first distances, and then the sizes of these n first distances are further compared, and the first distance with the smallest value is selected as the target distance, and the perpendicular bisector corresponding to the target distance is selected as the target perpendicular bisector. Finally, the angle between the normal of the target perpendicular bisector and the axis of the reference coordinate system (including the x-axis, the y-axis, and the z-axis) is calculated, and the calculated angle is used to represent the orientation information of the first object corresponding to the first point cloud data.

[0144] To help you understand what the orientation information of the first object is, the following example is used to illustrate: Fig.10 As shown, assuming Fig.10 The cube in is the outer envelope of the first point cloud data, and the target vertical bisector surface calculated is as follows Fig.10 As shown in the gray rectangular box in, a coordinate system can be defined in advance, called the object coordinate system, and the normal direction along the target perpendicular bisector plane is defined as the x-axis of the object coordinate system. Since stationary objects are generally placed perpendicular to the ground, the target perpendicular bisector plane obtained is also perpendicular to the ground, so the z-axis of the object coordinate system can be set to be parallel to the ground, so the plane formed by the x-axis and z-axis of the object coordinate system is also parallel to the ground, and the y-axis of the object coordinate system is perpendicular to the ground and orthogonal to the x-axis and z-axis of the object coordinate system. In this case, the angle between the x-axis in the object coordinate system and the axis of the reference coordinate system can be used to characterize the orientation information of the first object. It should also be noted that in some embodiments of the present application, if the object is placed on the ground at an angle, then the z-axis of the object coordinate system is set to have the same inclination angle as the ground, and the inclination angle can be obtained by the intersection angle of the perpendicular bisector plane obtained by the target device from another observation angle and the perpendicular bisector plane obtained from the current observation angle. Finally, the inclination angle and the angle between the normal of the target perpendicular bisector plane and the axis of the reference coordinate system are used together to characterize the orientation information of the first object.

[0145] It should be noted that, in some embodiments of the present application, in order to enable the two randomly sampled points each time to effectively calculate the first distance (that is, to ensure that the calculated first distance is within a preset range), the embodiments of the present application may also impose certain constraints on the sampling conditions: for example, the line between the two randomly sampled points may be constrained to be parallel to any axis in the reference coordinate system (which may be referred to as the first axis), and the first axis may be the x-axis, y-axis or z-axis of the reference coordinate system.

[0146] It should also be noted that, in some embodiments of the present application, in order to reduce noise, the above-mentioned first point cloud data may be point cloud data that has been decentralized, that is, before calculating the perpendicular bisector, the first point cloud data is first decentralized, and decentralization refers to finding the average of the three-dimensional coordinate values ​​of each point of the first point cloud data in the reference coordinate system as the three-dimensional coordinate value of the center point of the first point cloud data in the reference coordinate system, and then subtracting the three-dimensional coordinate value of the center point from the three-dimensional coordinate value of each point of the first point cloud data to complete the decentralization operation, that is, making the three-dimensional coordinate value of the first point cloud data the three-dimensional coordinate value with the center point as the origin, and the coordinate value of the center point is (0,0,0) at this time.

[0147] To facilitate understanding of the above decentralized operation, the following example is used for illustration: Assume that there are 4 points in the first point cloud data, and the 3D coordinate values ​​of these 4 points in the reference coordinate system are (3, 2, 4), (3, 4, 5), (2, 5, 5), and (4, 5, 6), respectively. Then the coordinate value of the center point of the first point cloud data in the reference coordinate system in the x-axis direction is (3+3+2+4) / 4=3, the coordinate value in the y-axis direction is (2+4+5+5) / 4=4, and the coordinate value in the z-axis direction is (4+5+ 5+6) / 4=5, that is, the three-dimensional coordinate value of the center point of the first point cloud data in the reference coordinate system is (3,4,5). Then, the coordinate value of the center point is subtracted from the three-dimensional coordinate value of each point in the first point cloud data in the world coordinate system, and the center point is used as the origin of the new coordinate system for the decentralized operation. The coordinates of the center point of the first point cloud data are (0,0,0), and the coordinate values ​​of the four points are (0,-2,-1), (0,0,0), (-1,1,0), and (1,1,1), respectively.

[0148] It should also be noted that, in some embodiments of the present application, since the point cloud data of the current frame acquired by the target device at the current time and current position may include more than one object's point cloud data, the point cloud data of the current frame includes the point cloud data of all objects observed by the target device at the current time, therefore, a target perpendicular bisector needs to be calculated for the point cloud data of each object, so that the corresponding orientation information can be obtained for each object in the current frame point cloud data. Assuming that the current frame point cloud data acquired by the target device at the current time and current position includes the point cloud data of three objects (provided that the similarity between the point cloud data of these three objects and the existing second point cloud data is within the first threshold interval), then the corresponding target perpendicular bisectors of the point cloud data of the three objects can be obtained. The angles between the normals of the three target perpendicular bisectors and the axes of the reference coordinate system are used to characterize the orientations of each object.

[0149] It should also be noted that in the embodiment of the present application, each time the target device observes a new object, that is, when the similarity is within the first threshold interval, it is necessary to calculate the orientation information corresponding to the new object based on the point cloud data of the new object, and update the orientation of the new object to the semantic map.

[0150] B. When the similarity is within the second threshold range, the target device may perform processing in method a or method b.

[0151] If the similarity between the first point cloud data and the second point cloud data is within the second threshold interval, it means that the first object corresponding to the first point cloud data has been observed by the target device within the time interval between the first moment and the second moment. In this case, the processing method of the target device may include but is not limited to the following methods:

[0152] a. Calculate a first outer envelope box of the first point cloud data and a second outer envelope box of the second point cloud data.

[0153] When the similarity is within the second threshold interval, the target device may further calculate the first outer envelope box of the first point cloud data and the second outer envelope box of the second point cloud data. The outer envelope box refers to a box-shaped object that includes all point clouds corresponding to an object with the smallest volume. The outer envelope box can be of any shape, for example, a cube, a cone, a cylinder, etc., or an irregular shape, which is not limited here. After the target device obtains the first outer envelope box of the first point cloud data and the second outer envelope box of the second point cloud data, it will further compare the volumes of the first outer envelope box and the second outer envelope box. When the volume of the first outer envelope box is greater than the volume of the second outer envelope box, the target device replaces the second point cloud data with the first point cloud data. At this time, the target point cloud data is still the first point cloud data, and the semantic map is updated according to the first point cloud data. The updating method is similar to the above method A, which will not be repeated here. In the embodiment of the present application, the first point cloud data and the second point cloud data are both point cloud data corresponding to the same object. The advantage of replacing the small-volume second point cloud data with the large-volume first point cloud data is that the large-volume first point cloud data has more points, and the corresponding surface information of the object represented is more complete. The replaced first point cloud data then updates the semantic map to make the semantic map more accurate.

[0154] It should be noted that, in some embodiments of the present application, if the target device compares the volumes of the first outer envelope box and the second outer envelope box and the result is that the volume of the first outer envelope box is less than or equal to the volume of the second outer envelope box, it means that the point cloud data of the object previously acquired by the target device (i.e., the second point cloud data) includes more complete object information. In this case, the target device deletes the first point cloud data obtained at the current moment.

[0155] b. Performing point cloud registration on the first point cloud data and the second point cloud data.

[0156] When the similarity is within the second threshold interval, the target device can also directly perform point cloud registration on the first point cloud data and the second point cloud data, thereby obtaining fused point cloud data of the first point cloud data and the second point cloud data. At this time, the target point cloud data is the fused point cloud data, and the semantic map is updated based on the fused point cloud data. Similarly, the method of updating the semantic map based on the fused point cloud data is similar to the above-mentioned method A, which will not be repeated here. In the embodiment of the present application, the advantage of updating the semantic map based on the fused point cloud data is that although the first point cloud data and the second point cloud data are both point cloud data for the same object, the target device obtains the same object at different times and the observation angles are also different. The details of the same object when observed from different angles are also different. Therefore, the fusion of the point cloud data of the same object obtained at different times includes more object information, and the accuracy of the semantic map updated based on this is also higher.

[0157] Here, to help you understand what fused point cloud data is, let's take an example: Fig.11 As shown, Fig.11 A schematic diagram (illustrated in a plane diagram) of the fused point cloud data provided in an embodiment of the present application, for the first point cloud data P 1 and the second point cloud data P 2 Point cloud registration is performed, where the points in the intersection of the two point cloud data areas are the points after point cloud registration, and the points in this area are called the registration point set P 0 , the first point cloud data P 1 The unregistered points in the second point cloud data P 2 The unregistered points and the registered point set P 0 Together they constitute the fused point cloud data.

[0158] 204. Update the target point cloud data, label information of the target point cloud data, and orientation information of the object in a semantic map constructed based on the point cloud data.

[0159] After the target device determines the target point cloud data based on the similarity between the first point cloud data and the second point cloud data, it will update the semantic map, specifically by updating the target point cloud data, the label information of the target point cloud data, and the orientation information of the object in the semantic map.

[0160] After the above steps, the target device constructs a target global semantic map, which is the global semantic map obtained by the last update. Since the target global semantic map is constructed in real time by the target device, the target global semantic map may have certain errors. Therefore, in some embodiments of the present application, a local semantic map can be further established and an object pair descriptor can be constructed to match and optimize the target global semantic map, in order to further improve the accuracy of the target global semantic map.

[0161] It should be noted that the local semantic map constructed at this time is slightly different from the local semantic map constructed when constructing the global semantic map mentioned above. The local semantic map constructed when constructing the global semantic map above uses the point cloud data of the object obtained by the target device in each frame, while the local semantic map constructed in the process of optimizing the target global semantic map (which can be called the optimized local semantic map, unless otherwise specified, the local semantic map described below refers to the optimized local semantic map) does not need to use every frame of point cloud data. The object in the local semantic map can be one frame of point cloud data or multiple frames of point cloud data, which is not limited here. For example, the frequency of the target device collecting data, obtaining the point cloud data of the object, etc. can be lower, or, for every n frames of point cloud data obtained by the target device, only one frame of point cloud data is randomly selected to construct the local semantic map. After each frame of point cloud data is obtained, the method of constructing the local semantic map is similar to the above method, except that the local semantic map constructed this time needs to include at least the point cloud data corresponding to each of the two objects, because the point cloud data of two objects are required to construct a descriptor for an object pair.

[0162] Before introducing how to optimize the matching of the target global semantic map based on the local semantic map, it is necessary to explain the object pair descriptor here: the object pair descriptor is composed of the corresponding point cloud data of two objects. It is established through the poses of the two objects in the reference coordinate system (such as three-dimensional coordinate values) about the classification category to which the objects belong and the distance between the center points of the objects. In the implementation of this application, the object pair descriptor is the basis for closed-loop detection between the local semantic map and the target global semantic map. Specifically, the object pair descriptor is used to characterize the label pairs composed of the classification categories to which the two target objects that constitute the object pair descriptor belong, and the distance between the center points of the point cloud data corresponding to the two target objects. For ease of understanding, please refer to Fig.12 , Fig.12 The diagram shows a schematic diagram of an object pair descriptor, the point cloud data P of object i i and point cloud data P of object j j The constructed object pair descriptor can be expressed as shown in the following formula (4):

[0163] {si,sj,|d ij |} (4)

[0164] Among them, si represents the classification category (i.e., label information) to which object i belongs, and sj represents the classification category to which object j belongs. si and sj can be the same or different, and there is no limitation here. si and sj constitute the label pair of object i and object j. ij | represents the point cloud data P of object i i The center point and point cloud data P of object j iThe distance between the center points.

[0165] It should be noted that in the embodiments of the present application, since the posture of the object includes not only the three-dimensional coordinate value of the object in the reference coordinate system but also the orientation information of the object, therefore, in some embodiments of the present application, the object pair descriptor can not only characterize the label pair composed of the classification categories to which the two target objects constituting the object pair descriptor belong and the distance between the center points of the point cloud data corresponding to the two target objects, but also can be used to characterize the distance between the intersection of the extended lines of the orientations of the two target objects and the center points of the point cloud data corresponding to the two target objects. Because the more information represented by the object pair descriptor, the more accurate the result of the subsequent optimization matching based on the object pair descriptor will be. For ease of understanding, please refer to Fig.13 , Fig.13 It shows another schematic diagram of the object pair descriptor, the point cloud data P of object i i and point cloud data P of object j j The constructed object pair descriptor can be expressed as shown in the following formula (5):

[0166] {si,sj,|d ij |,|mp i |,|mp j |} (5)

[0167] Among them, si represents the classification category (i.e., label information) to which object i belongs, and sj represents the classification category to which object j belongs. si and sj can be the same or different, and there is no limitation here. si and sj constitute the label pair of object i and object j. ij | represents the point cloud data P of object i i The center point p i and point cloud data P of object j i The center point p j The distance between them, m is the center point p i and the center point p j The intersection points along the respective object orientations (i.e., the respective target perpendicular bisector planes), |mp i | represents the center point p i The distance to the intersection point m, |mp j | represents the center point p j The distance to the intersection point m.

[0168] After understanding the concept of object pair descriptors, the following specifically describes how to match and optimize the target global semantic map based on the local semantic map. The matching optimization method is to perform hierarchical clustering and retrieve the optimal match with the local semantic map on the target global semantic map. Specifically, the target device obtains the point cloud data corresponding to each object of the target device within the third monitoring range, and the third monitoring range includes the monitoring range of the target device in the time interval from the third moment to the current moment. There are at least two objects in the third monitoring range, and the point cloud data corresponding to each object in the third monitoring range is used to characterize the pixel value of each point in the corresponding point cloud data and the three-dimensional coordinate value of each point in the reference coordinate system. After that, the target device constructs a local semantic map based on the point cloud data corresponding to each object in the third monitoring range of the target device. It should be noted that in the embodiment of the present application, the current moment refers to the current moment in the process of constructing a target global semantic map after the target device has constructed the target global semantic map, and the third moment is a moment before the current moment, which is set according to user needs. For example, if the local semantic map that the user wants to construct contains more point cloud data of objects, the third moment can be selected as a moment earlier than the current moment.

[0169] Since the constructed local semantic map needs to include at least the point cloud data of two objects, the point cloud data of each object in the local semantic map is combined to construct an object pair descriptor. Specifically, the point cloud data corresponding to any two objects in the local semantic map are called the third point cloud data of the third object and the fourth point cloud data of the fourth object. Then the target device can construct an object pair descriptor (which can be called the first object pair descriptor) based on the third point cloud data and the fourth point cloud data. According to the number of objects included in the local semantic map, different numbers of first object pair descriptors can be constructed. At the same time, for the previously obtained target global semantic map, the target device will also construct m object pair descriptors (which can be called second object pair descriptors) by pairing the point cloud data corresponding to each object in the target global semantic map. Then, according to each first object pair descriptor in the local semantic map, the target device determines p target object pair descriptors that are closer to the first object pair descriptor from the m second object pair descriptors, p≤m. Finally, the target device uses the ICP algorithm to perform point cloud registration between the local semantic map and the p target object pair descriptors, thereby obtaining p pose values, each of which is used to represent the rotation matrix and translation vector of the point cloud data. When at least q pose values ​​among the p pose values ​​are within the preset error range, it means that the point cloud data of the objects involved in each first object pair descriptor in the local semantic map have been successfully found in the target global semantic map. At this time, the target device optimizes the target global semantic map according to the local semantic map, q≤p.

[0170] It should be noted that, in some embodiments of the present application, if there are not at least q pose values ​​among p pose values ​​within the preset error range, it means that there are too few point cloud data of objects in the local semantic map, and the target device has not matched the point cloud data of each object in the local semantic map in the target global semantic map. At this time, it is necessary to continue to obtain at least one frame of point cloud data for updating the local semantic map. The purpose of updating the local semantic map is to introduce point cloud data of new objects. That is to say, when there are not at least q pose values ​​among the p pose values ​​within the preset error range, the target device will repeat the above steps until there are at least q pose values ​​among the p pose values ​​within the preset error range. An example is given here for illustration: Assume that the third moment is t 1 , the current time of the current round is t 2 , and in the current round [t 1 ,t 2 ] The local semantic map constructed in the time interval includes 3 objects. Assume that the first object pair descriptors are obtained by combining the point cloud data of these 3 objects in pairs, and p target object pair descriptors are determined from the m second object pair descriptors of the target global semantic map, and p pose values ​​are obtained. However, there are at least q pose values ​​within the preset error range among these p pose values. Then the target device continues to obtain point cloud data. Assuming that the current round is x, the target device takes the current round x as the previous round, and the current time t of the current round x is 2 As the previous moment, the new current round is x+1, and the new current moment is assumed to be t 3 , then the target device is in the new current round x+1 [t 1 ,t 3 ] construct a new local semantic map within the time interval, and repeat the above steps until at least q of the p pose values ​​obtained are within the preset error range.

[0171] To facilitate understanding of the above-mentioned process of optimizing the matching of the target global semantic map based on the local semantic map, the following example is used for illustration. It should be noted that in this example, for the sake of convenience, the object pair descriptor is explained using the above formula (5) as an example (formula (4) is also acceptable and will not be repeated here): Fig.14 , Fig.14 A schematic diagram of a matching process between a local semantic map and a target global semantic map provided in an embodiment of the present application, wherein: Fig.14 The sub-diagram (a) in FIG. 1 is a schematic diagram of the first hierarchical clustering matching process of the target device. Fig.14 In the sub-diagram (a), the position of each small circle in the local semantic map represents the position of the target device from the initial observation (i.e., the third moment mentioned above, assumed to be t 1) to the current time (assuming it is t 2 ) The position of each point cloud data corresponding to each object observed during this time interval in the local semantic map. Similarly, the position of each small circle in the target global semantic map represents the position of each point cloud data corresponding to each object observed during this time interval from the origin of the reference coordinate system to the last update in the target global semantic map. A small circle corresponds to the point cloud data of an object, which can be called an object node. Different types of small circles indicate that the corresponding objects belong to different classification categories. Assuming that the target device is at the third time t 1 To the current time t 2 The time interval between 1 ,t 2 The local semantic map constructed in ] includes Fig.14 The two object nodes shown in the sub-schematic diagram (a) are composed of Fig.14 From the sub-diagram (a) in FIG, we can see that the two object nodes belong to two different classification categories. These two object nodes can construct an object pair descriptor, namely the first object pair descriptor, which can be called descriptor A. At the same time, the target device will also combine the point cloud data of all objects in the constructed target global semantic map to obtain m object pair descriptors (namely, the second object pair descriptors). Assume that the target global semantic map includes the point cloud data of 8 objects, such as Fig.14 The 8 object nodes shown in the sub-diagram (a) in FIG. 1 can be combined into 28 second object pair descriptors. At this point, the target device has obtained the time interval [t 1 ,t 2 ] and the 28 second object pair descriptors in the target global semantic map. Next, the target device will select the object pair descriptors close to itself from the 28 second object pair descriptors in the target global semantic map according to the descriptor A in the local semantic map. First, based on the label pair represented by descriptor A, select the second object pair descriptor that is consistent with the label pair of descriptor A. For example, assuming that the label pair of descriptor A is "chair-table", then select the object pair descriptor with the label pair of "chair-table" from the 28 second object pair descriptors. Assuming that there are 20 second object pair descriptors left after this screening, then based on the distance between the center points of the point cloud data corresponding to the two objects represented by descriptor A |d ij |, the distance between the intersection of the two objects' extended lines and the center point of the point cloud data corresponding to each of the two objects |mp i | and | mp j |Select the second object pair descriptor from the remaining 20 second object pair descriptors that are within the allowable error range of the three distances represented by descriptor A. For example, suppose descriptor A has |dij |=0.3m(unit: meter),|mp i |=0.5m,|mp j |=0.8m, assuming that the allowable error ranges of the three distances are ±0.1m, ±0.15m, and ±0.2m, then among the remaining 20 second object pair descriptors, as long as there are three distances with |d ij |∈[0.2m,0.4m],|mp i |∈[0.35m,0.65m],|mp j |∈[0.6m,1.0m], it is considered to be an object pair descriptor that meets the requirements. Assuming that there are 7 second object pair descriptors left after this screening step, then these 7 second object pair descriptors are used as candidate combinations. These 7 second object pair descriptors are voted once each. It should be noted here that the allowable errors of the three distances in the above embodiment are different. In some implementation methods of the present application, the allowable errors of the three distances may be the same, which is not limited here.

[0172] After the above comparison, the target device obtains 7 second object pair descriptors. Since each of the 7 second object pair descriptors has been voted once, the number of votes for each of the 7 second object pair descriptors is the same, and p can be considered as 7. At this time, the local semantic map can be respectively aligned with the 7 second object pair descriptors through the ICP algorithm to obtain 7 pose values. Assuming that only 2 of the 7 pose values ​​are within the preset error range (e.g., the error of the rotation matrix is ​​less than 10°, and the error of the translation vector is less than 10cm), and it does not meet the requirement that at least q pose values ​​(assuming q=5) among the p pose values ​​are within the preset error range, then the target device repeats the above steps, that is, continues to obtain the next frame or multiple frames of point cloud data. The above process can be called the first level clustering.

[0173] Since the local semantic map constructed by the target device in the first-level clustering process cannot be successfully matched with the target global semantic map, it means that the point cloud data of the object included in the local semantic map is too small to be successfully matched. Therefore, the target device needs to be clustered at the second level. As the target device moves, the number of observed objects will gradually increase. In the second-level clustering process, assuming that the current time is t 3 , then the target device needs to be within the time interval [t 2 ,t 3 ] at least one new object’s point cloud data is observed within the time interval, that is, the target device observes the point cloud data of the new object at the third time t 1 To the current time t 3 The time interval between 1 ,t 3The local semantic map constructed in ] includes Fig.14 The three object nodes shown in the diagram in (b) are: Fig.14 The sub-diagram (b) in FIG. 1 is a schematic diagram of the second hierarchical clustering matching process of the target device. Fig.14 As shown in the sub-diagram (b) in the figure, these two object nodes belong to three different classification categories. These three object nodes can construct three object pair descriptors, namely, three first object pair descriptors (including descriptor A in the first-level clustering process), which can be called descriptor A, descriptor B, and descriptor C. The newly obtained descriptors B and C are processed in a similar manner to the above-mentioned processing of descriptor A. Specifically, first, based on the label pairs represented by descriptors B and C, the second object pair descriptors that are consistent with the label pairs of descriptors B and C are selected. Assuming that after this step of screening, the label pairs of the remaining 12 second descriptors are consistent with the label pairs of descriptor B, and the label pairs of the remaining 15 second object pair descriptors are consistent with the label pairs of descriptor C, then based on the distance between the center points of the point cloud data corresponding to the two objects represented by descriptors B and C, |d ij |, the distance between the intersection of the two objects' extended lines and the center point of the point cloud data corresponding to each of the two objects |mp i | and | mp j |Select the second object pair descriptors whose distances are within the allowable error range respectively with the three types of descriptors represented by descriptor B and descriptor C from the remaining 12 and 15 second object pair descriptors, assuming that after this step of screening, there are 6 second object pair descriptors corresponding to descriptor B, and 8 second object pair descriptors corresponding to descriptor C, then these 6+8=14 second object pair descriptors and the 7 second object pair descriptors obtained by the first-level clustering are voted once again. At this time, the number of votes for each second object pair descriptor in the target global semantic map begins to differ. Some second object pair descriptors may have 0 votes, and some second object pair descriptors may be voted multiple times. At this time, the target device will maintain the second object descriptors with the top p votes (i.e., top p, assuming p=7) as candidate combinations. At this time, the target device will perform point cloud registration with the local semantic map obtained in the second-level clustering process and the p candidate combinations through the ICP algorithm to obtain p pose values.

[0174] Assuming that 6 of the p pose values ​​are within the preset error range (for example, the error of the rotation matrix is ​​less than 10°, and the error of the translation vector is less than 10 cm), and that at least q pose values ​​(assuming q=5) among the p pose values ​​are within the preset error range, it means that the point cloud data of the objects involved in each first object pair descriptor in the local semantic map have been successfully found in the target global semantic map. At this time, the target device optimizes the target global semantic map according to the local semantic map.

[0175] Assuming that only 4 of the p pose values ​​are within the preset error range (e.g., the error of the rotation matrix is ​​less than 10°, and the error of the translation vector is less than 10 cm), and it does not satisfy that at least q pose values ​​(assuming q=5) among the p pose values ​​are within the preset error range, then the target device continues to repeat the above steps, that is, continues to obtain the point cloud data of the next frame or multiple frames, that is, the target device needs to perform the third-level clustering again. The process of the third-level clustering and subsequent hierarchical clustering is similar to the above-mentioned second-level clustering process, which will not be repeated here. It should be noted here that the target device needs to perform the termination conditions of hierarchical clustering several times. The target device determines whether there are at least q pose values ​​among the p pose values ​​obtained based on the first p candidate combinations maintained within the preset error range. Only when it is determined that there are at least q pose values ​​among the p pose values ​​within the preset error range, it is considered that the point cloud data of all objects in the local semantic map are found in the target global semantic map, and the construction of the local semantic map can be terminated at this time.

[0176] It should also be noted here that after each matching and optimization of a local semantic map is completed on the target device, the next local semantic map can be constructed to continue optimizing the matching of the target global semantic map. The process is similar to the above and will not be repeated here.

[0177] The whole process described above is called loop closure detection. After loop closure detection, the poses of the object nodes in the entire target global semantic map need to be optimized based on the poses of each object node in the local semantic map. For details, please refer to Fig.15 , Fig.15 A schematic diagram of optimizing the poses of objects in a target global semantic map based on a local semantic map provided in an embodiment of the present application. Specifically, after obtaining the local semantic map, in theory, the local semantic map should be able to completely overlap with at least part of the target global semantic map. In practice, due to errors caused by various reasons, the local semantic map will not completely overlap. Fig.15 As shown in the sub-diagram (a) in FIG, it is assumed that the target global semantic map includes 8 object nodes, and the local semantic map includes 2 object nodes, namely object node A′ and object node B′ (shown by the dotted circle). Fig.15As can be seen from the sub-diagram (a) in FIG, there is a certain deviation between the object nodes A′ and B′ in the local semantic map and the object nodes A and B in the target global semantic map (the double-headed arrows indicate the deviation). In this case, it is necessary to adjust the position and posture of each object in the entire target global semantic map based on the object nodes A′ and B′ in the local semantic map. Specifically, the position and posture of each object node in the target global semantic map before adjustment and the connection lines between adjacent object nodes are as follows: Fig.15 As shown by the solid line in the sub-diagram (a) of FIG. , the adjustment method is based on the bundle adjustment (BA) of the following formula (6):

[0178]

[0179] Where X represents all optimized items (edges formed by two vertices), and the sum of squared errors of all edges is minimized.

[0180] Specifically, Fig.15 As shown in the sub-diagram (b) in FIG, object nodes A′ and object nodes B′ in the local semantic map are used to replace object nodes A and object nodes B in the target global semantic map. Since object nodes A and object nodes B in the target global semantic map are replaced, the edges (i.e., connections) involved in these two objects will also be updated, such as Fig.15 As shown by the bold dashed line in the sub-schematic diagram (b), Fig.15 All the object nodes and the lines between the object nodes after replacement in the sub-diagram (b) are used as the input of the bundling adjustment of the above formula (6). After the adjustment of the algorithm, Fig.15 In the sub-diagram (b) of FIG. 1 , the sum of square errors of the lines between all the replaced object nodes is the smallest. After object node A′ and object node B′ replace object node A and object node B in the target global semantic map, the position and posture of the new object node are obtained after adjustment by the above formula (6). Fig.15 As shown in the schematic diagram (c) of Fig.15 As can be seen from the sub-diagram (c) in the figure, the new poses of the object nodes in the target global semantic map after adjustment. It should be noted that the poses of the object nodes may be adjusted partially or completely, depending on the adjustment result. Fig.15The schematic diagram in (c) shows that all object nodes have been fine-tuned, where object node A″ and object node B″ are the positions of object node A, object node B, and re-observed object node A′ and object node B′ after adjustment, and the object nodes connected by solid lines are the object nodes after the adjustment, and the object nodes connected by dotted lines are the object nodes before the adjustment shown in the schematic diagram in (b). The target global semantic map after adjustment by the algorithm is the optimized target global semantic map.

[0181] Finally, the optimized target global semantic map can be actually applied. In some embodiments of the present application, in order to further improve the efficiency of the target semantic map, the map can be continuously updated. For example, if the target global semantic map is established at different times (such as across days), the previously constructed map can be fused with the currently newly established map. The method is to traverse all object nodes in the currently established target global semantic map, incrementally perform global object matching similar to the above, find the combination of the same object nodes in the two maps (i.e., object pair descriptors), as the successfully matched object set, calculate the relative coordinates of the point cloud data of each object in the two maps through the ICP algorithm, align the coordinate systems of the two obtained target global semantic maps, and then fuse the two established target global semantic maps for update. The specific process is similar to the above and will not be repeated here.

[0182] In summary, the method for constructing a semantic map provided in the embodiment of the present application mainly includes four parts, namely front-end tracking, closed-loop detection, back-end optimization and map update. Fig.16 , Fig.16A schematic diagram of the overall process of the semantic map construction method provided in an embodiment of the present application, wherein the front-end tracking part of the overall process includes data preprocessing, target device posture estimation and object update under multi-view (i.e., updating the point cloud data of new objects to the semantic map). The front-end tracking solves the data association between the target device posture and the object posture under continuous observation, and updates the newly observed object (including orientation information) to the semantic map; the closed-loop detection part includes global object matching optimization (i.e., matching optimization of the target global semantic map based on the local semantic map as described above). The closed-loop detection solves the problem of object matching after the target global semantic map has been constructed. When the target device observes again, it can find an object in the constructed target global semantic map that is the same as the currently observed object, thereby confirming that the object currently observed by the target device is an object that has been seen. This process is achieved by constructing object descriptors for hierarchical clustering; the back-end optimization part includes global map optimization (i.e., the above-mentioned optimization of the pose of the object nodes of the entire target global semantic map based on the pose of each object node in the local semantic map). According to the results of the closed-loop detection, a graph optimization model is constructed by combining the object nodes observed in the local semantic map with the object nodes in the target global semantic map (as mentioned above). Fig.15 As shown in the figure, every two adjacent object nodes form an edge, and the positions of all object nodes in the target global semantic map are optimized by optimizing libraries (such as go2, ceres, etc.); map update is mainly based on the fusion update of multiple target global semantic maps obtained in different time periods. For example, the indoor scene layout may change after the next day. At this time, the newly obtained semantic map can be fused and updated with the existing target global semantic map.

[0183] It should be noted that the method for constructing a semantic map based on the embodiment of the present application can be applied to various devices, for example, it can be a mobile robot, a handheld mobile terminal device (such as a mobile phone, a personal computer, etc.), or a smart wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.). As long as the device can be used to implement the method for constructing a semantic map described in the embodiment of the present application, it can be called the target device described in the embodiment of the present application. Specifically, this application does not limit the form of expression of the target device.

[0184] It should also be noted that, in the above-mentioned embodiments of the present application, the execution subject of steps 201 to 203 is illustrated by taking the target device itself as an example, that is, the process of the target device constructing the semantic map is implemented in its own real-time movement process. In fact, in some embodiments of the present application, the specific process of constructing the semantic map may not be executed by the target device, but may be constructed by other devices and then transmitted (or updated) to the target device in real time, so that the target device performs subsequent actions based on the constructed semantic map. For example, it may be a server connected to the target device for communication, or it may be other terminal devices such as mobile phones, personal computers, etc. connected to the target device for communication. Specifically, the present application does not limit the execution subject of constructing the semantic map.

[0185] On the basis of the above corresponding embodiments, in order to better implement the above solutions of the embodiments of the present application, the following also provides related devices for implementing the above solutions. Fig.17 , Fig.17A structural schematic diagram of a map construction device provided in an embodiment of the present application, the map construction device 1700 includes: a first acquisition module 1701, a calculation module 1702, a determination module 1703, a second acquisition module 1704, and an update module 1705, wherein the first acquisition module 1701 is used to obtain the point cloud data corresponding to each object within the monitoring range of the target device at the current time and current position. At the current moment and the current position, the monitoring range of the target device can be referred to as the first monitoring range, and any object existing in the monitoring range can be referred to as the first object. The point cloud data corresponding to the first object is referred to as the first point cloud data, and the first point cloud data is used to characterize the three-dimensional coordinate value of each point in the first point cloud data in the reference coordinate system; the calculation module 1702 is used to calculate the similarity between the first point cloud data and the second point cloud data, and the second point cloud data includes the point cloud data of the second object in the second monitoring range, and the second monitoring range includes the monitoring range of the target device in the time interval from the first moment to the second moment, and the second object is any object existing in the second monitoring range, and the second point cloud data is used to characterize the three-dimensional coordinate value of each point in the second point cloud data in the reference coordinate system; the determination module 17 03, used to determine the target point cloud data according to the similarity; the second acquisition module 1704, used to obtain the orientation information of the object corresponding to the target point cloud data based on the target point cloud data, and obtain the label information of the object based on the target point cloud data, the orientation information of the object is used to characterize the orientation of the object, for example, assuming that the first object is a chair, then the direction of the chair is directly in front of the chair backrest, for example, assuming that the first object is a computer monitor, then the direction of the computer monitor is directly in front of the display interface of the computer monitor, and so on, specific examples are not given here, the label information of the object is used to characterize the classification category to which the object belongs; the update module 1705, used to update the target point cloud data, the label information of the target point cloud data and the orientation information of the object in the semantic map constructed based on the point cloud data.

[0186] In the above-mentioned implementation mode of the present application, the target sensor deployed on the target device is used to obtain point cloud data of objects within the monitoring range of the target device in real time, and based on the similarity between the point cloud data of the object and the point cloud data of the object obtained previously, it is determined whether the object is a new object monitored by the target device, and then the semantic map is updated in real time based on the specific value of the similarity, thereby realizing the autonomous dynamic update of the semantic map by the target device. In addition, the semantic map constructed by the implementation mode of the present application includes not only the location information of the object (obtained based on the point cloud data), but also the orientation information of the object, thereby accurately locating the object while also providing an interactive viewing angle orientation.

[0187] In one possible design, the second acquisition module 1704 is specifically used to: randomly sample two points from the target point cloud data, respectively recorded as the first point and the second point, then connect the first point and the second point to obtain the perpendicular bisector of the connection, and then use the perpendicular bisector as the symmetry plane to map the target point cloud data through the perpendicular bisector to obtain the mirror point cloud data corresponding to the target point cloud data, and then calculate the distance between the target point cloud data and the mirror point cloud data according to the nearest neighbor clustering algorithm. The distance can be called the first distance, and the first distance corresponds to the perpendicular bisector, and the first distance is within a preset threshold range; repeat the above steps until a preset round n is reached to obtain n first distances; finally, calculate the angle between the normal of the target perpendicular bisector and the axis of the reference coordinate system, and use the angle to represent the orientation information of the object, the target perpendicular bisector corresponds to the target distance, and the target distance has the smallest value among the n first distances.

[0188] In the above-mentioned embodiment of the present application, it is specifically explained how to obtain the orientation information of an object, that is, to obtain the mirror point cloud data by constructing a symmetry plane, and to select an optimal symmetry plane as the final target symmetry plane based on the distance between the target point cloud data and the mirror point cloud data, and finally to select the angle between the normal of the target perpendicular bisector plane and the axis of the reference coordinate system, which is feasible.

[0189] In a possible design, the line between the first point and the second point is parallel to any axis (referred to as the first axis) in the reference coordinate system, and the first axis may be the x-axis, y-axis or z-axis of the reference coordinate system.

[0190] In the above-mentioned embodiment of the present application, in order to enable the two randomly sampled points each time to effectively calculate the first distance (that is, to make the calculated first distance fall within a preset range), the collection conditions of the first point and the second point obtained by sampling are constrained, thereby improving the efficiency of effective sampling.

[0191] In one possible design, the first point cloud data can also be used to characterize the pixel value of each point in the first point cloud data, and the second point cloud data can also be used to characterize the pixel value of each point in the second point cloud data. Therefore, the calculation module 1702 is specifically used to: first, according to the nearest neighbor clustering algorithm, calculate the distance between the first point cloud data and the second point cloud data, which can be called the second distance. Then, since each point cloud data is not only used to characterize the three-dimensional coordinate value of each point in the corresponding point cloud data in the reference coordinate system, but also used to characterize the pixel value of each point corresponding to the corresponding RGB image, the calculation module 1702 further calculates the difference in pixel values ​​between the first point cloud data and the second point cloud data. Finally, the similarity between the first point cloud data and the second point cloud data is calculated based on the second distance and the difference in pixel values.

[0192] In the above-mentioned embodiment of the present application, it is described that the similarity between the first point cloud data and the second point cloud data is calculated by the difference in the distance and pixel value between the two point cloud data, which has flexibility.

[0193] In a possible design, the process of calculating the similarity between the first point cloud data and the second point cloud data based on the difference between the second distance and the pixel value can be obtained by calculating the second norm of the difference between the second distance and the pixel value. Specifically, the calculation module 1702 is also used to: first, perform weighted summation on the difference between the second distance and the pixel value to obtain a target value, wherein the weight ratio of the difference between the second distance and the pixel value can be set according to the actual application, or can be calculated based on historical data, which is not limited in this application; finally, the target value is mapped through a Gaussian kernel to obtain the similarity between the first point cloud data and the second point cloud data.

[0194] In the above-mentioned embodiment of the present application, it is specifically described that the similarity between the first point cloud data and the second point cloud data can be obtained by calculating the second norm of the difference between the second distance and the pixel value, which is simple and easy to implement.

[0195] In a possible design, the determination module 1703 is specifically used to: when the similarity is within a first threshold interval, determine that the first point cloud data is the target point cloud data, wherein the object corresponding to the target point cloud data is the first object.

[0196] In the above-mentioned embodiment of the present application, when the similarity between the first point cloud data and the second point cloud data is in the first threshold interval, it means that the first object corresponding to the first point cloud data is an object newly observed by the target device at the current time and current position within the monitoring range. At this time, the target point cloud data is the first point cloud data, and the semantic map can be subsequently updated according to the first point cloud data, thereby realizing real-time update of the semantic map.

[0197] In one possible design, the determination module 1703 is specifically used to: when the similarity is within the second threshold interval, calculate the first outer envelope box of the first point cloud data and the second outer envelope box of the second point cloud data, and when the volume of the first outer envelope box is greater than the volume of the second outer envelope box, replace the second point cloud data with the first point cloud data, and determine that the first point cloud data is the target point cloud data.

[0198] In the above-mentioned embodiment of the present application, when the similarity between the first point cloud data and the second point cloud data is in the second threshold interval, it means that the first object corresponding to the first point cloud data is observed by the target device within the time interval between the first moment and the second moment. One processing method in this case is to calculate the first outer envelope box of the first point cloud data and the second outer envelope box of the second point cloud data, and replace the outer envelope box with a smaller volume with the outer envelope box with a larger volume. The point cloud data of the object with a larger volume includes more complete information. At this time, the target point cloud data is still the first point cloud data (because the outer envelope box of the first point cloud data is larger in volume), and the semantic map updated accordingly includes more complete object information.

[0199] In a possible design, the determination module 1703 is further used to: delete the first point cloud data when the volume of the first outer envelope box is less than or equal to the volume of the second outer envelope box.

[0200] In the above-mentioned embodiment of the present application, if the result of comparing the volumes of the first outer envelope box and the second outer envelope box is that the volume of the first outer envelope box is less than or equal to the volume of the second outer envelope box, it means that the point cloud data of the object acquired previously (i.e., the second point cloud data) includes more complete object information. In this case, the first point cloud data obtained at the current moment is deleted.

[0201] In one possible design, the determination module 1703 is specifically used to: when the similarity is within the second threshold interval, perform point cloud registration on the first point cloud data and the second point cloud data to obtain fused point cloud data of the first point cloud data and the second point cloud data, and determine the fused point cloud data as the target point cloud data.

[0202] In the above-mentioned embodiment of the present application, when the similarity is within the second threshold interval, the first point cloud data and the second point cloud data can also be directly point cloud registered to obtain fused point cloud data of the first point cloud data and the second point cloud data. Because the fused point cloud data contains more information, at this time, the target point cloud data is the fused point cloud data obtained after the fusion of the first point cloud data and the second point cloud data. Subsequently, the semantic map is updated based on the fused point cloud data, so that the updated semantic map includes richer information.

[0203] In one possible design, the first acquisition module 1701 is specifically used to: collect the RGB image and depth image of the target device within the first monitoring range at the current moment through the target sensor deployed on the target device, and perform instance segmentation on the RGB image to obtain the first area to which the first object belongs in the RGB image, and finally superimpose the first area with the depth image to obtain the first point cloud data corresponding to the first object.

[0204] In the above-mentioned implementation mode of the present application, it is specifically explained that the first point cloud data is obtained based on the RGB image and the depth image, while the existing method for constructing the 3D dense map of the semantic map is obtained through dense reconstruction, and the dense reconstruction has a huge amount of calculation. The embodiment of the present application is based on the point cloud data obtained from the RGB image and the depth image, which does not require dense reconstruction and reduces the amount of calculation.

[0205] In one possible design, the target sensor includes: a depth camera, or a combination of a depth sensor and a camera module.

[0206] In the above-mentioned embodiments of the present application, several specific types of target sensors are described, which are optional.

[0207] In a possible design, the map construction device 1700 may also include: an iteration module 1706, which is used to update the second moment to the current moment after updating the target point cloud data, the label information of the target point cloud data and the orientation information of the target object in the semantic map, and use the target point cloud data as the newly added second point cloud data to trigger the first acquisition module 1701, the calculation module 1702, the determination module 1703, the second acquisition module 1704 and the update module 1705 to repeat their respective execution steps until the preset conditions are met, thereby obtaining a target global semantic map, which is the semantic map obtained by the last update.

[0208] In the above-mentioned implementation mode of the present application, it is specifically explained that the execution steps of each of the above-mentioned modules can be repeatedly executed at each current moment to achieve continuous dynamic updating of the semantic map.

[0209] In one possible design, meeting the preset condition includes: a time interval from the first moment to the second moment reaches a preset duration.

[0210] In the above-mentioned implementation mode of the present application, the condition for stopping updating the semantic map is specifically described, that is, when the construction time reaches a preset time, the constructed semantic map is considered to be relatively complete.

[0211] In a possible design, the map construction device 1700 may also include a map optimization module 1707, which is used to: obtain the point cloud data corresponding to each object of the target device within the third monitoring range, the third monitoring range includes the monitoring range of the target device in the time interval from the third moment to the current moment, there are at least two objects in the third monitoring range, and the point cloud data corresponding to each object in the third monitoring range is used to characterize the pixel value of each point in the corresponding point cloud data and the three-dimensional coordinate value of each point in the reference coordinate system, and then construct a local semantic map based on the point cloud data corresponding to each object of the target device within the third monitoring range. It should be noted that in the embodiment of the present application, the current moment refers to the current moment in the process of constructing a target global semantic map after the target device has completed the construction of the target global semantic map, and the third moment is a moment before the current moment, which is set according to user needs. For example, assuming that the local semantic map that the user wants to construct contains more point cloud data of objects, the third moment can be selected as a moment earlier than the current moment. Since the constructed local semantic map needs to include at least the point cloud data of two objects, the point cloud data of each object in the local semantic map is combined to construct object pair descriptors. Specifically, the point cloud data corresponding to any two objects in the local semantic map are called the third point cloud data of the third object and the fourth point cloud data of the fourth object. Then, an object pair descriptor (which can be called the first object pair descriptor) can be constructed based on the third point cloud data and the fourth point cloud data. According to the number of objects included in the local semantic map, different numbers of first object pair descriptors can be constructed. At the same time, for the previously obtained target global semantic map, the point cloud data corresponding to each object in the target global semantic map is also constructed to obtain m object pair descriptors (which can be called second object pair descriptors). Then, according to each first object pair descriptor in the local semantic map, p target object pair descriptors that are closer to the first object pair descriptor are determined from the m second object pair descriptors, p≤m. Finally, the local semantic map is respectively aligned with the p target object pair descriptors through the ICP algorithm to obtain p pose values, each of which is used to represent the rotation matrix and translation vector of the point cloud data. When at least q pose values ​​among the p pose values ​​are within the preset error range, it means that the point cloud data of the objects involved in each first object pair descriptor in the local semantic map have been successfully found in the target global semantic map. At this time, the target global semantic map is optimized according to the local semantic map, q≤p.

[0212] In the above-mentioned implementation of the present application, by further establishing a local semantic map and constructing an object pair descriptor to match and optimize the target global semantic map, the accuracy of the target global semantic map is further improved.

[0213] In one possible design, the map optimization module 1707 is further used to: when there are not at least q pose values ​​among the p pose values ​​within the preset error range, repeat the above steps until there are at least q pose values ​​among the p pose values ​​within the preset error range.

[0214] In the above-mentioned embodiment of the present application, if there are not at least q pose values ​​among p pose values ​​within the preset error range, it means that there are too few point cloud data of objects in the local semantic map, and the map optimization module 1707 has not matched the point cloud data of each object in the local semantic map in the target global semantic map. At this time, it is necessary to continue to obtain at least one frame of point cloud data for updating the local semantic map. The purpose of updating the local semantic map is to introduce point cloud data of new objects.

[0215] In a possible design, the object pair descriptor may also be used to characterize the distances between the intersection of the extended lines of the two target objects and the center points of the point cloud data corresponding to the two target objects.

[0216] In the above-mentioned embodiment of the present application, it is explained that the object pair descriptor is also used to characterize the distance between the intersection point of the symmetry plane and the center point. This is because the more information represented by the object pair descriptor, the more accurate the match between the local map and the target global semantic map.

[0217] In one possible design, the target device can be a mobile robot, a handheld mobile terminal device (such as a mobile phone, a personal computer, etc.), or a smart wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.). As long as the device can be used to implement the method for constructing the semantic map described in the embodiment of the present application, it can be called the target device described in the embodiment of the present application. This application does not limit the form of expression of the target device.

[0218] In the above-mentioned embodiments of the present application, it is explained what types of devices the target device may be, which has wide applicability.

[0219] It should be noted that, in some embodiments of the present application, the map construction device 1700 may be the target device described above, that is, when the map construction device 1700 is the target device, the process of constructing the semantic map is implemented during the real-time movement of the target device itself. In fact, in some embodiments of the present application, the specific process of constructing the semantic map may not be executed by the target device, but may be constructed by other devices and then transmitted (or updated) to the target device in real time, so that the target device performs subsequent actions based on the constructed semantic map. In other words, the map construction device 1700 may not be the target device. For example, it may be a server that is connected to the target device for communication, or it may be other terminal devices such as mobile phones, personal computers, etc. that are connected to the target device for communication. Specifically, this application does not limit the specific form of the map construction device 1700.

[0220] It should be noted that Fig.17 The information interaction, execution process, etc. between the modules / units in the map construction device 1700 described in the corresponding embodiment are the same as those in the present application. Figure 2 The corresponding embodiments are based on the same concept, and the specific contents can be found in the description of the aforementioned embodiments of this application, which will not be repeated here.

[0221] Next, another map construction device provided by the embodiment of the present application is introduced. Fig.18 , Fig.18 A schematic diagram of a structure of a map construction device provided in an embodiment of the present application. The map construction device 1800 may be deployed with Fig.17 The map construction device 1700 described in the corresponding embodiment is used to implement Figure 2 The functions of each step in the corresponding embodiment are as follows. Specifically, the map construction device 1800 is implemented by one or more servers. The map construction device 1800 may have relatively large differences due to different configurations or performances. It may include one or more central processing units (CPU) 1822 (for example, one or more central processing units) and memory 1832, and one or more storage media 1830 (for example, one or more mass storage devices) storing application programs 1842 or data 1844. Among them, the memory 1832 and the storage medium 1830 may be temporary storage or permanent storage. The program stored in the storage medium 1830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the map construction device 1800. Furthermore, the central processing unit 1822 may be configured to communicate with the storage medium 1830 to execute a series of instruction operations in the storage medium 1830 on the map construction device 1800.

[0222] The map building device 1800 may also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858, and / or, one or more operating systems 1841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0223] In the embodiment of the present application, the central processor 1822 is used to execute Figure 2 The method for constructing the semantic map in the corresponding embodiment. Specifically, the central processor 1822 is used to: first, obtain the point cloud data corresponding to each object within the monitoring range of the target device at the current moment and the current position. At the current moment and the current position, the monitoring range of the target device can be referred to as the first monitoring range, and any object existing within the monitoring range can be referred to as the first object, and the point cloud data corresponding to the first object is referred to as the first point cloud data. The first monitoring range refers to the perception area of ​​the surrounding environment that the target sensor deployed on the target device can perceive at the current moment and the current position. Afterwards, the similarity between the first point cloud data and the second point cloud data is calculated, and the second point cloud data is the point cloud data of the second object within the second monitoring range of the target device. The second monitoring range includes the monitoring range of the target device in the time interval from the first moment to the second moment, and the second object is any object existing within the second monitoring range. The semantic map is constructed based on the point cloud data corresponding to each object within the second monitoring range. After calculating the similarity between the first point cloud data and the second point cloud data, the target point cloud data will be further determined based on the similarity. For example, when the similarity is in the first threshold interval, the target point cloud data is the first point cloud data; when the similarity is in the second threshold interval, and the outer envelope box of the first point cloud data is larger than the outer envelope box of the second point cloud data, the target point cloud data is the first point cloud data; when the similarity is in the second threshold interval, and when the first point cloud data and the second point cloud data are point cloud registered, the target point cloud data is fused point cloud data. Specifically, this application does not limit the method for determining the target point cloud data. After the target point cloud data is determined based on the similarity between the first point cloud data and the second point cloud data, the semantic map will be updated, which is specifically manifested in updating the target point cloud data, the label information of the target point cloud data, and the orientation information of the object in the semantic map.

[0224] It should be noted that the specific manner in which the CPU 1822 performs the above steps is different from that in the present application. Figure 2 The corresponding method embodiments are based on the same concept, and the technical effects they bring are the same as those in this application. Figure 2 The corresponding embodiments are the same, and the specific contents can be found in the description of the method embodiments shown above in this application, which will not be repeated here.

[0225] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a program for performing signal processing. When the program is run on a computer, the computer executes the steps executed by the execution device in the description of the embodiment shown above.

[0226] The computer device provided in the embodiment of the present application may be a chip, which includes: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit. The processing unit may execute the computer execution instructions stored in the storage unit, so that the chip in the computer device executes the above-mentioned Figure 4 The method for obtaining the model described in the illustrated embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0227] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0228] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0229] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0230] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another website site, computer or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (digital video disc, DVD), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

Claims

1. A method for constructing a semantic map, characterized in that: include: Acquire first point cloud data corresponding to a first object within a first monitoring range of the target device at a current moment, wherein the first point cloud data is used to represent a three-dimensional coordinate value of each point in the first point cloud data in a reference coordinate system; Calculating the similarity between the first point cloud data and the second point cloud data, the second point cloud data including point cloud data of a second object within a second monitoring range, the second monitoring range including a monitoring range of the target device within a time interval from a first moment to a second moment, the second point cloud data being used to represent a three-dimensional coordinate value of each point in the second point cloud data in the reference coordinate system; Determining the target point cloud data according to the similarity; wherein determining the target point cloud data according to the similarity comprises: determining the first point cloud data as the target point cloud data when the similarity is within a first threshold interval; Obtaining orientation information of an object corresponding to the target point cloud data based on the target point cloud data, and obtaining label information of the object based on the target point cloud data, wherein the orientation information of the object is used to characterize the orientation of the object, and the label information of the object is used to characterize the classification category to which the object belongs, and the object corresponding to the target point cloud data is the first object; wherein obtaining the orientation information of the object corresponding to the target point cloud data based on the target point cloud data comprises: calculating a perpendicular bisector of a line between a first point and a second point, wherein the first point and the second point are two points randomly sampled from the target point cloud data; Taking the perpendicular bisector as a symmetry plane, obtaining mirror point cloud data corresponding to the target point cloud data; calculating a first distance between the target point cloud data and the mirror point cloud data according to a nearest neighbor clustering algorithm, wherein the first distance corresponds to the perpendicular bisector and is within a preset threshold range; repeating the steps until a preset round n is reached, obtaining n first distances; calculating an angle between a normal of the target perpendicular bisector and the axis of the reference coordinate system, and using the angle to characterize the orientation information of the target object, wherein the target perpendicular bisector corresponds to the target distance, and the target distance has the smallest value among the n first distances; The target point cloud data, label information of the target point cloud data and orientation information of the object are updated in a semantic map constructed based on the point cloud data.

2. The method according to claim 1, characterized in that A line connecting the first point and the second point is parallel to a first axis in the reference coordinate system, and the first axis is an x-axis, a y-axis or a z-axis of the reference coordinate system.

3. The method according to any one of claims 1 to 2, characterized in that: The first point cloud data is further used to characterize a pixel value of each point in the first point cloud data, and the second point cloud data is further used to characterize a pixel value of each point in the second point cloud data, and the calculating of the similarity between the first point cloud data and the second point cloud data includes: Calculating a second distance between the first point cloud data and the second point cloud data according to a nearest neighbor clustering algorithm; Calculating a difference in pixel value between the first point cloud data and the second point cloud data; The similarity between the first point cloud data and the second point cloud data is obtained according to the difference between the second distance and the pixel value.

4. The method according to claim 3, characterized in that The obtaining the similarity between the first point cloud data and the second point cloud data according to the difference between the second distance and the pixel value comprises: Performing weighted summation on the difference between the second distance and the pixel value to obtain a target value; The target value is mapped through a Gaussian kernel to obtain the similarity between the first point cloud data and the second point cloud data.

5. The method according to any one of claims 1 to 2, characterized in that: Determining the target point cloud data according to the similarity also includes: When the similarity is within a second threshold interval, calculating a first outer envelope box of the first point cloud data and a second outer envelope box of the second point cloud data; When the volume of the first outer envelope box is greater than the volume of the second outer envelope box, the second point cloud data is replaced by the first point cloud data, and the first point cloud data is determined as the target point cloud data.

6. The method according to claim 5, characterized in that The method further comprises: When the volume of the first outer envelope box is less than or equal to the volume of the second outer envelope box, the first point cloud data is deleted.

7. The method according to any one of claims 1 to 2, characterized in that: Determining the target point cloud data according to the similarity also includes: When the similarity is within a second threshold interval, performing point cloud registration on the first point cloud data and the second point cloud data to obtain fused point cloud data of the first point cloud data and the second point cloud data; The fused point cloud data is determined to be the target point cloud data.

8. The method according to any one of claims 1 to 2, characterized in that: The step of obtaining first point cloud data corresponding to a first object within a first monitoring range of the target device at the current moment includes: Collecting an RGB image and a depth image of the target device within a first monitoring range at a current moment by using a target sensor deployed on the target device; Performing instance segmentation on the RGB image to obtain a first region to which a first object in the RGB image belongs; The first area is superimposed on the depth image to obtain first point cloud data corresponding to the first object.

9. The method according to claim 8, characterized in that The target sensor comprises: Depth camera, or a combination of a depth sensor and a camera module.

10. The method according to any one of claims 1 to 2, characterized in that: After updating the target point cloud data, the label information of the target point cloud data, and the orientation information of the target object in the semantic map, the method further includes: The second moment is updated to the current moment, the target point cloud data is used as the newly added second point cloud data, and the steps are repeated until the preset conditions are met to obtain a target global semantic map, where the target global semantic map is the semantic map obtained by the last update.

11. The method according to claim 10, characterized in that The preset conditions are as follows: The time interval from the first moment to the second moment reaches a preset duration.

12. The method according to claim 10, characterized in that After obtaining the target global semantic map, the method further includes: Acquire point cloud data corresponding to each object within a third monitoring range of the target device, the third monitoring range includes a monitoring range of the target device within a time interval from a third moment to a current moment, there are at least two objects within the third monitoring range, and the point cloud data corresponding to each object within the third monitoring range is used to characterize a three-dimensional coordinate value of each point in the point cloud data in the reference coordinate system; Building a local semantic map based on the point cloud data corresponding to each object within the third monitoring range of the target device; Constructing a first object pair descriptor based on third point cloud data corresponding to a third object and fourth point cloud data corresponding to a fourth object in the local semantic map, wherein the third object and the fourth object are any two objects existing in the third monitoring range, wherein the object pair descriptor is used to characterize a label pair consisting of classification categories to which two target objects constituting the object pair descriptor belong respectively and a distance between center points of the point cloud data corresponding to the two target objects respectively; Construct m second object pair descriptors by pairwise constructing the point cloud data corresponding to each object in the target global semantic map; Determine p target object pair descriptors from the m second object pair descriptors according to the first object pair descriptors, where p≤m; The local semantic map is respectively aligned with the p target object pair descriptors through an iterative closest point ICP algorithm to obtain p pose values, where the pose values ​​are used to represent the rotation matrix and translation vector of the point cloud data; When there are at least q pose values ​​among the p pose values ​​within a preset error range, the target global semantic map is optimized according to the local semantic map, q≤p.

13. The method according to claim 12, characterized in that The method further comprises: When there are not at least q pose values ​​among the p pose values ​​within the preset error range, repeat the steps until there are at least q pose values ​​among the p pose values ​​within the preset error range.

14. The method according to claim 12, characterized in that The object pair descriptor is further used to characterize the distances between the intersection of the extended lines of the two target objects and the center points of the point cloud data corresponding to the two target objects.

15. The method according to any one of claims 1 to 2, characterized in that: The target device includes at least one of the following: Mobile robots, handheld mobile terminal devices, and smart wearable devices.

16. A map construction device, characterized in that: include: A first acquisition module, used to acquire first point cloud data corresponding to a first object within a first monitoring range of the target device at a current moment, wherein the first point cloud data is used to represent a three-dimensional coordinate value of each point in the first point cloud data in a reference coordinate system; a calculation module, configured to calculate a similarity between the first point cloud data and second point cloud data, wherein the second point cloud data includes point cloud data of a second object within a second monitoring range, the second monitoring range includes a monitoring range of the target device within a time interval from a first moment to a second moment, and the second point cloud data is used to represent a three-dimensional coordinate value of each point in the second point cloud data in the reference coordinate system; A determination module, configured to determine target point cloud data according to the similarity; wherein the determination module is specifically configured to: determine the first point cloud data as the target point cloud data when the similarity is within a first threshold interval; a second acquisition module, configured to obtain orientation information of an object corresponding to the target point cloud data based on the target point cloud data, and to obtain label information of the object based on the target point cloud data, wherein the orientation information of the object is used to characterize the orientation of the object, and the label information of the object is used to characterize the classification category to which the object belongs, and the object corresponding to the target point cloud data is the first object; wherein the second acquisition module is specifically configured to: calculate a perpendicular bisector plane of a line connecting a first point and a second point, wherein the first point and the second point are two points randomly sampled from the target point cloud data; and obtain a label information of the object based on the target point cloud data; wherein the orientation information of the object is used to characterize the orientation of the object, and the label information of the object is used to characterize the classification category to which the object belongs; and wherein the object corresponding to the target point cloud data is the first object. The facet is a symmetric face, and the mirror point cloud data corresponding to the target point cloud data is obtained; the first distance between the target point cloud data and the mirror point cloud data is calculated according to the nearest neighbor clustering algorithm, the first distance corresponds to the perpendicular bisector, and the first distance is within a preset threshold range; the steps are repeated until a preset round n is reached, and n first distances are obtained; the angle between the normal of the target perpendicular bisector and the axis of the reference coordinate system is calculated, and the angle is used to represent the orientation information of the target object, the target perpendicular bisector corresponds to the target distance, and the target distance has the smallest value among the n first distances; An updating module is used to update the target point cloud data, the label information of the target point cloud data and the orientation information of the object in a semantic map constructed based on the point cloud data.

17. The device according to claim 16, characterized in that A line connecting the first point and the second point is parallel to a first axis in the reference coordinate system, and the first axis is an x-axis, a y-axis or a z-axis of the reference coordinate system.

18. The device according to any one of claims 16-17, characterized in that The first point cloud data is further used to characterize the pixel value of each point in the first point cloud data, the second point cloud data is further used to characterize the pixel value of each point in the second point cloud data, and the calculation module is specifically used to: Calculating a second distance between the first point cloud data and the second point cloud data according to a nearest neighbor clustering algorithm; Calculating a difference in pixel value between the first point cloud data and the second point cloud data; The similarity between the first point cloud data and the second point cloud data is obtained according to the difference between the second distance and the pixel value.

19. The device according to claim 18, characterized in that The computing module is further specifically used for: Performing weighted summation on the difference between the second distance and the pixel value to obtain a target value; The target value is mapped through a Gaussian kernel to obtain the similarity between the first point cloud data and the second point cloud data.

20. The device according to any one of claims 16-17, characterized in that The determination module is further specifically used for: When the similarity is within a second threshold interval, calculating a first outer envelope box of the first point cloud data and a second outer envelope box of the second point cloud data; When the volume of the first outer envelope box is greater than the volume of the second outer envelope box, the second point cloud data is replaced by the first point cloud data, and the first point cloud data is determined as the target point cloud data.

21. The device according to claim 20, characterized in that The determining module is further used for: When the volume of the first outer envelope box is less than or equal to the volume of the second outer envelope box, the first point cloud data is deleted.

22. The device according to any one of claims 16-17, characterized in that The determination module is further specifically used for: When the similarity is within a second threshold interval, performing point cloud registration on the first point cloud data and the second point cloud data to obtain fused point cloud data of the first point cloud data and the second point cloud data; The fused point cloud data is determined to be the target point cloud data.

23. The device according to any one of claims 16-17, characterized in that The first acquisition module is specifically used to: Collecting an RGB image and a depth image of the target device within a first monitoring range at a current moment by using a target sensor deployed on the target device; Performing instance segmentation on the RGB image to obtain a first region to which a first object in the RGB image belongs; The first area is superimposed on the depth image to obtain first point cloud data corresponding to the first object.

24. The device according to claim 23, characterized in that The target sensor comprises: Depth camera, or a combination of a depth sensor and a camera module.

25. The device according to any one of claims 16-17, characterized in that The device also includes: An iteration module is used to update the second moment to the current moment after updating the target point cloud data, the label information of the target point cloud data and the orientation information of the target object in the semantic map, and use the target point cloud data as the newly added second point cloud data to trigger the first acquisition module, the calculation module, the determination module, the second acquisition module and the update module to repeatedly execute their respective execution steps until a preset condition is met, thereby obtaining a target global semantic map, which is a semantic map obtained by the last update.

26. The device according to claim 25, characterized in that The preset conditions are as follows: The time interval from the first moment to the second moment reaches a preset duration.

27. The device according to claim 25, characterized in that The device further includes a map optimization module, wherein the map optimization module is used to: Acquire point cloud data corresponding to each object within a third monitoring range of the target device, the third monitoring range includes a monitoring range of the target device within a time interval from a third moment to a current moment, there are at least two objects within the third monitoring range, and the point cloud data corresponding to each object within the third monitoring range is used to characterize a three-dimensional coordinate value of each point in the point cloud data in the reference coordinate system; Building a local semantic map based on the point cloud data corresponding to each object within the third monitoring range of the target device; Constructing a first object pair descriptor based on third point cloud data corresponding to a third object and fourth point cloud data corresponding to a fourth object in the local semantic map, wherein the third object and the fourth object are any two objects existing in the third monitoring range, wherein the object pair descriptor is used to characterize a label pair consisting of classification categories to which two target objects constituting the object pair descriptor belong respectively and a distance between center points of the point cloud data corresponding to the two target objects respectively; Construct m second object pair descriptors by pairwise constructing the point cloud data corresponding to each object in the target global semantic map; Determine p target object pair descriptors from the m second object pair descriptors according to the first object pair descriptors, where p≤m; The local semantic map is respectively aligned with the p target object pair descriptors through an iterative closest point ICP algorithm to obtain p pose values, where the pose values ​​are used to represent the rotation matrix and translation vector of the point cloud data; When there are at least q pose values ​​among the p pose values ​​within a preset error range, the target global semantic map is optimized according to the local semantic map, q≤p.

28. The device according to claim 27, characterized in that The map optimization module is also used for: When there are not at least q pose values ​​among the p pose values ​​within the preset error range, repeat the steps until there are at least q pose values ​​among the p pose values ​​within the preset error range.

29. The device according to claim 27, characterized in that The object pair descriptor is further used to characterize the distances between the intersection of the extended lines of the two target objects and the center points of the point cloud data corresponding to the two target objects.

30. The device according to any one of claims 16-17, characterized in that The target device includes at least one of the following: Mobile robots, handheld mobile terminal devices, and smart wearable devices.

31. A map construction device, comprising a processor and a memory, wherein the processor is coupled to the memory, characterized in that: The memory is used to store programs; The processor is used to execute the program in the memory so that the map building device executes the method according to any one of claims 1-15.

32. A computer-readable storage medium comprising a program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 15.

33. A computer program product comprising instructions which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 15.