Method and apparatus for updating a three-dimensional point cloud map

By storing 3D point cloud maps in an improved tree structure and dynamically managing the addition, deletion, and reconstruction of point cloud maps, the problem of resource waste in existing technologies is solved, and efficient long-term acquisition and processing of SLAM systems is achieved.

CN116737740BActive Publication Date: 2026-01-06REALSEE (BEIJING) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310869849.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2026-01-06
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

The existing 3D point cloud map storage structure cannot support real-time updates and reconstruction, resulting in resource waste in SLAM systems during long-term acquisition and processing.

Method used

An improved tree structure is used to store 3D point cloud maps. Points to be added are obtained through downsampling and added to the original tree structure one by one. Points to be deleted and subtrees to be rebuilt are determined based on node information, and the addition, deletion and reconstruction operations are performed dynamically.

Benefits of technology

Dynamic management of the tree structure is achieved, avoiding the reconstruction of the entire structure when a new laser data frame arrives, improving the efficiency of long-term acquisition and processing of the SLAM system, and reducing resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116737740B_ABST
    Figure CN116737740B_ABST
Patent Text Reader

Abstract

The method comprises: in response to obtaining a new laser data frame, performing downsampling processing on the new laser data frame to obtain a to-be-added point; adding the to-be-added point to an original tree structure one by one; in response to successfully adding one to-be-added point to the original tree structure, determining a to-be-deleted point corresponding to the successfully added to-be-added point, and setting a first flag bit of a node where the to-be-deleted point is located to true, the first flag bit being used to indicate whether a node storage point is deleted; in accordance with a bottom-up order, recursively updating node information of nodes on a path where the to-be-added point and the to-be-deleted point are located; and determining a to-be-reconstructed sub-tree according to node information of at least one node in the updated original tree structure, and reconstructing the to-be-reconstructed sub-tree. Through the triangular partitioning method, dynamic addition, deletion and reconstruction of the tree structure can be realized, and long-time acquisition and processing of a SLAM system can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of three-dimensional spatial data processing technology, and in particular to a method and apparatus for updating a three-dimensional point cloud map. Background Technology

[0002] Simultaneous Localization and Mapping (SLAM) is a technology that uses information acquired by radar to determine its own spatial coordinates and reconstruct a map of the surrounding environment. In existing laser SLAM processes, it is necessary to store the generated 3D point cloud map over a certain period for querying, matching, and updating. However, existing data storage structures for storing 3D point cloud maps cannot support real-time updates and reconstruction of the 3D point cloud map, thus hindering the long-term acquisition and processing capabilities of SLAM systems. Summary of the Invention

[0003] One technical problem to be solved by the embodiments of this disclosure is to provide a method and apparatus for updating a three-dimensional point cloud map.

[0004] According to one aspect of the present disclosure, a method for updating a three-dimensional point cloud map is provided, the method comprising:

[0005] In response to acquiring a new laser data frame, the new laser data frame is downsampled to obtain the point to be added;

[0006] The points to be added are added one by one to the original tree structure, wherein the original point cloud map is stored in the original tree structure;

[0007] In response to successfully adding a point to be added to the original tree structure, the point to be deleted corresponding to the successfully added point is determined, and the first flag bit of the node where the point to be deleted is located is set to true. The first flag bit is used to indicate whether the node storage point has been deleted.

[0008] In a bottom-up order, recursively update the node information of the nodes on the paths of the points to be added and the points to be deleted;

[0009] Based on the node information of at least one node in the updated original tree structure, determine the subtree to be reconstructed;

[0010] The subtree to be reconstructed is reconstructed.

[0011] In yet another embodiment of this disclosure, the node information of the node includes:

[0012] The first flag bit; the second flag bit used to indicate the spatial range information of the points stored in the subtree of the node; the third flag bit used to indicate whether the subtree of the node has been deleted; the fourth flag bit used to indicate whether the subtree of the node is being rebuilt; the eighth flag bit used to indicate whether the subtree of the node needs to be rebuilt; the fifth and sixth flag bits used to indicate the number of points stored in the left and right subtrees of the node; the seventh flag bit used to indicate the number of deleted points in the subtree of the node; the three-dimensional coordinate information of the node's stored points and the dividing axis.

[0013] In another embodiment of this disclosure, the step of downsampling the new laser data frame in response to acquiring a new laser data frame to obtain the point to be added includes:

[0014] According to the set point cloud density, the point cloud corresponding to the new laser data frame is downsampled to obtain the points to be added.

[0015] In yet another embodiment of this disclosure, determining the point to be deleted corresponding to the successfully added point to be added includes:

[0016] Points within a downsampling interval centered on the point to be added are determined as the points to be deleted. The points within the downsampling interval include points in the original tree structure, or the points within the downsampling interval include points in the original tree structure and points to be added that have been successfully added to the original tree structure.

[0017] In another embodiment of this disclosure, the points to be added are added one by one to the original tree structure, including:

[0018] Starting from the root node of the original tree structure, the process recursively moves downwards, determining the target addition position of the point to be added in the original tree structure based on the relationship between the component of the point to be added and the node storage point in the original tree structure on the split axis.

[0019] Add the point to be added at the target addition location, and initialize the node information value of the corresponding node according to the three-dimensional coordinate information of the point to be added.

[0020] In another embodiment of this disclosure, the step of recursively updating the node information of the nodes on the paths where the point to be added and the point to be deleted are located in a bottom-up order includes:

[0021] Starting from the target addition position, recursively update the fifth or sixth flag bit of the node on the path where the point to be added is located;

[0022] Starting from the point to be deleted, recursively update the seventh flag bit of each node on the path containing the point to be deleted.

[0023] In another embodiment of this disclosure, determining the subtree to be reconstructed based on the node information of at least one node in the updated original tree structure includes:

[0024] Starting from the leaf node of the path associated with the point to be added and the point to be deleted, recursively upwards, and determines whether the subtree of the at least one node satisfies the first reconstruction condition based on the value of the fifth flag bit and the value of the sixth flag bit of at least one node.

[0025] Based on the values ​​of the seventh flag bit, the fifth flag bit, and the sixth flag bit of the at least one node, determine whether the subtree of the at least one node satisfies the second reconstruction condition;

[0026] The subtree that satisfies the first reconstruction condition and / or the second reconstruction condition is determined as the subtree to be reconstructed.

[0027] In yet another embodiment of this disclosure, the reconstruction of the subtree to be reconstructed includes:

[0028] Determine the number of undeleted points in the subtree to be reconstructed;

[0029] In response to the number being less than a set threshold, a first tree structure is constructed using the undeleted points in the subtree to be reconstructed, and the first tree structure is then spliced ​​into the original tree structure.

[0030] In response to the number being not less than a set threshold, the fourth flag bit of the subtree to be rebuilt is set to true, and the reconstruction of the subtree to be rebuilt is performed by the subtree reconstruction thread.

[0031] In yet another embodiment of this disclosure, the step of reconstructing the subtree to be reconstructed via a subtree reconstruction thread includes:

[0032] Extract the undeleted points in the subtree to be rebuilt, wake up the subtree reconstruction thread, and add a mutex lock to the subtree reconstruction thread;

[0033] Through the subtree reconstruction thread, a second tree structure is constructed based on the undeleted points extracted from the subtree to be reconstructed, and the second tree structure is then spliced ​​into the original tree structure.

[0034] Release the mutex lock and set the fourth flag of the subtree to be rebuilt to false.

[0035] In yet another embodiment of this disclosure, after reconstructing the subtree to be reconstructed, the method further includes:

[0036] The node information of the nodes on the associated path of the subtree to be reconstructed is updated accordingly.

[0037] In yet another embodiment of this disclosure, the method further includes:

[0038] Receive a search instruction, wherein the search instruction carries the three-dimensional coordinate information of the target point;

[0039] Starting from the root node, traverse downwards and store the first set number of points encountered in the target container. The target container stores the three-dimensional coordinate information of the set number of points and the maximum distance from the target point.

[0040] In response to traversing to at least one node in the subtree that is not being rebuilt or deleted, the minimum distance between the subtree of the at least one node and the target point is calculated based on the value of the second flag bit of the at least one node;

[0041] In response to the minimum distance being less than the maximum distance, the distance between at least one point in the subtree of the at least one node and the target point is calculated, and the point in the target container corresponding to the maximum distance is replaced with at least one point whose distance is less than the maximum distance;

[0042] Update the maximum distance recorded in the target container;

[0043] In response to having traversed all nodes in the original tree structure, the target container is returned.

[0044] According to another aspect of the present disclosure, a three-dimensional point cloud map updating apparatus is provided, the apparatus comprising:

[0045] The first processing module is used to downsample the new laser data frame in response to the acquisition of a new laser data frame to obtain the point to be added.

[0046] An add module is used to add the points to be added one by one to the original tree structure, wherein the original point cloud map is stored in the original tree structure;

[0047] The second processing module is used to respond to the successful addition of a point to be added to the original tree structure, determine the point to be deleted corresponding to the successfully added point to be added, and set the first flag bit of the node where the point to be deleted is located to true. The first flag bit is used to indicate whether the node storage point has been deleted.

[0048] The first update module is used to recursively update the node information of the nodes on the paths of the points to be added and the points to be deleted in a bottom-up order.

[0049] The determination module is used to determine the subtree to be reconstructed based on the node information of at least one node in the updated original tree structure.

[0050] The reconstruction module is used to reconstruct the subtree to be reconstructed.

[0051] In one embodiment of this disclosure, the node information of the node includes:

[0052] The first flag bit; the second flag bit used to indicate the spatial range information of the points stored in the subtree of the node; the third flag bit used to indicate whether the subtree of the node has been deleted; the fourth flag bit used to indicate whether the subtree of the node is being rebuilt; the eighth flag bit used to indicate whether the subtree of the node needs to be rebuilt; the fifth and sixth flag bits used to indicate the number of points stored in the left and right subtrees of the node; the seventh flag bit used to indicate the number of deleted points in the subtree of the node; the three-dimensional coordinate information of the node's stored points and the dividing axis.

[0053] In another embodiment of this disclosure, the first processing module is specifically configured to, in response to acquiring a new laser data frame, perform downsampling processing on the new laser data frame to obtain the point to be added, including:

[0054] According to the set point cloud density, the point cloud corresponding to the new laser data frame is downsampled to obtain the points to be added.

[0055] In another embodiment of this disclosure, the second processing module is specifically used to determine the points within the downsampling interval centered on the point to be added as the points to be deleted. The points within the downsampling interval include the points in the original tree structure, or the points within the downsampling interval include the points in the original tree structure and the points to be added that have been successfully added to the original tree structure.

[0056] In yet another embodiment of this disclosure, the adding module includes:

[0057] The first processing submodule is used to recursively move downwards from the root node of the original tree structure and determine the target addition position of the point to be added in the original tree structure based on the relationship between the component of the point to be added and the node storage point in the original tree structure on the split axis.

[0058] The initialization submodule is used to add the point to be added at the target addition location and initialize the node information value of the corresponding node according to the three-dimensional coordinate information of the point to be added.

[0059] In yet another embodiment of this disclosure, the first update module includes:

[0060] The first update submodule is used to recursively update the fifth or sixth flag bit of the node on the path where the point to be added is located, starting from the target addition position and going upwards.

[0061] The second update submodule is used to recursively update the seventh flag bit of the nodes on the path where the point to be deleted is located, starting from the point to be deleted.

[0062] In yet another embodiment of this disclosure, the determining module includes:

[0063] The first determining submodule is used to recursively move upwards from the leaf node of the path associated with the point to be added and the point to be deleted, and determine whether the subtree of the at least one node satisfies the first reconstruction condition based on the value of the fifth flag bit and the value of the sixth flag bit of the at least one node.

[0064] The second determining submodule is used to determine whether the subtree of the at least one node satisfies the second reconstruction condition based on the values ​​of the seventh flag bit, the fifth flag bit, and the sixth flag bit of the at least one node.

[0065] The third determining submodule is used to determine the subtree that satisfies the first reconstruction condition and / or the second reconstruction condition as the subtree to be reconstructed.

[0066] In yet another embodiment of this disclosure, the reconstruction module includes:

[0067] The fourth determining submodule is used to determine the number of undeleted points in the subtree to be reconstructed;

[0068] The second processing submodule is used to respond to the fact that the number is less than a set threshold, construct a first tree structure using the undeleted points in the subtree to be reconstructed, and splice the first tree structure into the original tree structure;

[0069] The reconstruction submodule is used to set the fourth flag bit of the subtree to be reconstructed to true in response to the number being not less than a set threshold, and to perform the reconstruction of the subtree to be reconstructed through the reconstruction subtree thread.

[0070] In yet another embodiment of this disclosure, the reconstruction submodule includes:

[0071] The extraction submodule is used to extract the undeleted points in the subtree to be reconstructed, wake up the subtree reconstruction thread, and add a mutex lock to the subtree reconstruction thread;

[0072] The third processing submodule is used to construct a second tree structure based on the undeleted points extracted from the subtree to be reconstructed through the subtree reconstruction thread, and to splice the second tree structure into the original tree structure;

[0073] The fourth processing submodule is used to release the mutex lock and set the fourth flag bit of the subtree to be rebuilt to false.

[0074] In yet another embodiment of this disclosure, the apparatus further includes:

[0075] The second update module is used to update the node information of the nodes on the path associated with the subtree to be reconstructed.

[0076] In yet another embodiment of this disclosure, the apparatus further includes:

[0077] A receiving module is used to receive a search instruction, wherein the search instruction carries the three-dimensional coordinate information of the target point;

[0078] The third processing module is used to traverse downwards from the root node and store the first set number of points encountered in the target container. The target container stores the three-dimensional coordinate information of the set number of points and the maximum distance from the target point.

[0079] The first calculation module is used to calculate the minimum distance between the subtree of the at least one node and the target point based on the value of the second flag bit of the at least one node when traversing to at least one node that is not being rebuilt or deleted;

[0080] The second calculation module is used to calculate the distance between at least one point in the subtree of the at least one node and the target point in response to the minimum distance being less than the maximum distance, and replace the point in the target container corresponding to the maximum distance with at least one point whose distance is less than the maximum distance;

[0081] The third update module is used to update the maximum distance recorded in the target container;

[0082] The return module is used to return the target container in response to the completion of traversing all nodes in the original tree structure.

[0083] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:

[0084] Memory, used to store computer programs;

[0085] A processor is configured to execute a computer program stored in the memory, and when the computer program is executed, to implement the above-described method for updating the three-dimensional point cloud map.

[0086] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the above-described method for updating a three-dimensional point cloud map.

[0087] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the above-described method for updating a three-dimensional point cloud map.

[0088] Based on the three-dimensional point cloud map update method, apparatus, and storage medium provided in the above embodiments of this disclosure, when a new laser data frame is acquired, the new laser data frame can be downsampled to obtain points to be added; the points to be added are added one by one to the original tree structure; in response to successfully adding a point to be added to the original tree structure, the point to be deleted corresponding to the successfully added point is determined, and the first flag bit of the node where the point to be deleted is located is set to true, the first flag bit being used to indicate whether the node storage point has been deleted; the node information of the points to be added and the nodes on the path where the points to be deleted are located is recursively updated in a bottom-up order; based on the node information of at least one node in the updated original tree structure, the subtree to be reconstructed is determined; and the subtree to be reconstructed is reconstructed. This technical solution, by storing the point cloud map in an improved tree structure, enables dynamic addition, deletion, and reconstruction of the tree structure, achieving long-term acquisition and processing of the SLAM system, and effectively avoiding the resource waste caused by needing to reconstruct the entire tree structure when a new laser data frame is available.

[0089] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0090] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0091] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:

[0092] Figure 1 A flowchart illustrating one embodiment of the three-dimensional point cloud map updating method of this disclosure;

[0093] Figure 2A This is a flowchart of the process for reconstructing the subtree to be reconstructed as disclosed in this disclosure;

[0094] Figure 2B This is a schematic diagram of the tree structure in the method for updating a 3D point cloud map disclosed herein;

[0095] Figure 2C This is a flowchart of the process of reconstructing the subtree to be reconstructed by a subtree reconstruction thread disclosed herein;

[0096] Figure 3 A flowchart illustrating one embodiment of the three-dimensional point cloud map search method disclosed herein;

[0097] Figure 4 This is a schematic diagram of the structure of one embodiment of the three-dimensional point cloud map updating device disclosed herein;

[0098] Figure 5This is a schematic diagram of another embodiment of the three-dimensional point cloud map updating device disclosed herein;

[0099] Figure 6 This is a schematic diagram of another embodiment of the three-dimensional point cloud map updating device disclosed herein;

[0100] Figure 7 This is a structural diagram of an electronic device provided as an illustrative embodiment of the present disclosure. Detailed Implementation

[0101] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0102] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0103] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0104] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0105] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0106] This disclosure can be applied to electronic devices such as computer systems / servers, which can operate with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations suitable for use with electronic devices such as computer systems / servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0107] Electronic devices such as computer systems / servers can be described in the general context of computer-executable instructions (such as program modules) executed by the computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are performed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0108] Exemplary embodiments

[0109] Figure 1 This is a flowchart illustrating an embodiment of the 3D point cloud map updating method disclosed herein; this 3D point cloud map updating method can be applied to electronic devices (such as computer systems, servers, etc.). Figure 1 As shown, the method for updating this 3D point cloud map includes the following steps:

[0110] In step 101, in response to acquiring a new laser data frame, the new laser data frame is downsampled to obtain the point to be added.

[0111] In one embodiment, the origin cloud map is stored in the original tree structure. See also Figure 2B To implement the technical solution of this disclosure embodiment, in the tree structure provided by this disclosure embodiment, each node not only stores the three-dimensional coordinate information of the storage point (e.g., the three-dimensional coordinates (x, y, z) of point P) and the dividing axis of the storage point, but also stores a first flag bit P_delete for indicating whether the node's storage point has been deleted; a second flag bit T_area for indicating the spatial range information of the points stored in the node's subtree; a third flag bit T_delete for indicating whether the node's subtree has been deleted; a fourth flag bit T_rebuilding for indicating whether the node's subtree is being rebuilt; an eighth flag bit T_rebuild for indicating whether the node's subtree needs to be rebuilt; a fifth and sixth flag bits L_num and R_num for indicating the number of points stored in the node's left and right subtrees; and a seventh flag bit D_num for indicating the number of deleted points in the node's subtree.

[0112] In one embodiment, when initially constructing the point cloud map, the spatial range of all point clouds can be calculated, and then the spatial ranges can be sorted according to the three dimensions of x, y, and z. The dimension with the largest spatial distance difference is selected as the basis for the current segmentation. For example, if the current point cloud has the largest range on the z-axis, then all point clouds are sorted according to the size of the z-coordinate. The point in the middle of the z-axis direction (assumed to be P_middle) is taken as the root node of the entire tree structure. The three-dimensional coordinates of this point and the segmentation axis z-axis are stored in the node information of the root node. At the same time, the first flag bit indicating whether the point has been deleted can be set to false, the third flag bit indicating whether the subtree of the node has been deleted can be set to false, and the fourth flag bit indicating whether the subtree of the node has been reconstructed can be set to false. The second flag bit T_area, which indicates the spatial range information of the points stored in the subtree of the node, is initialized. At the same time, the fifth and sixth flag bits L_num and R_num, which indicate the number of points stored in the left and right subtrees of the node, and the seventh flag bit D_num, which indicates the number of deleted points in the subtree of the node, are updated. Then, treat all points with z-coordinates less than P_middle as a single entity, and repeat the above operations of determining the root node and its information to construct a subtree, which is then used as the left subtree of the root node. Similarly, construct a subtree for points with z-coordinates greater than P_middle, which is then used as the right subtree of the root node. Continue this iterative process until the entire tree is constructed.

[0113] In one embodiment, when a new laser data frame is acquired, the point cloud corresponding to the new laser data frame can be determined first. Then, the determined point cloud is downsampled. That is, the point cloud corresponding to the new laser data frame is downsampled according to a set point cloud density to obtain the points to be added. The set point cloud density can indicate the density of the points to be added. For example, only one point can be retained in a spatial unit of any set size (a k*k*k cube space), while redundant points are deleted. This achieves downsampling of the points in the new laser data frame to obtain the points to be added.

[0114] In one embodiment, by downsampling the new laser data frames, the number of points to be added can be reduced, and the uniformity of points in the point cloud map can be ensured.

[0115] In step 102, the points to be added are added one by one to the original tree structure, wherein the original point cloud map is stored in the original tree structure.

[0116] In one embodiment, starting from the root node of the original tree structure, the process recursively moves downwards, and determines the target addition position of the point to be added in the original tree structure based on the relationship between the components of the point to be added and the node storage points in the original tree structure on the dividing axis. The point to be added is then added at the target addition position, and the node information value of the corresponding node is initialized based on the three-dimensional coordinate information of the point to be added.

[0117] When adding a point, you can first determine the relationship between the coordinates of the point to be added and the coordinates on the dividing axis of the root node. For example, if the three-dimensional coordinates of the root node are (11, 21, 31) and the dividing axis is the z-axis, and the three-dimensional coordinates of the point to be added are (12, 22, 11), the coordinate of the point to be added on the dividing axis z-axis of the root node is 11, which is less than the coordinate of the root node on the z-axis. Therefore, you can continue to search downwards in the left subtree of the root node, and then recursively search until you reach the leaf node. This will determine the target addition position of the point to be added. The point to be added becomes a child node of the leaf node, and the initialization of the information contained in this node is consistent with that during construction.

[0118] In one embodiment, when adding a point to the origin point cloud map, if it is found that the point to be added is duplicated with a point in the origin point cloud map when recursively traversing from the root node of the original tree structure to the bottom leaf node, the point in the origin point cloud map can be retained instead of adding the point to be added again.

[0119] In step 103, in response to successfully adding a point to be added to the original tree structure, the point to be deleted corresponding to the successfully added point is determined, and the first flag bit of the node where the point to be deleted is located is set to true. The first flag bit is used to indicate whether the node storage point has been deleted.

[0120] In one embodiment, points within a downsampling interval centered on the point to be added can be determined as the points to be deleted. The points within the downsampling interval include points in the original tree structure, or the points within the downsampling interval include points in the original tree structure and points to be added that have already been successfully added to the original tree structure. For example, all nodes within the downsampling interval can be set as points to be deleted (excluding the currently successfully added point) centered on the point to be added. The size of the downsampling interval can be preset; for example, a 1-centimeter radius around the point to be added can be defined as the downsampling interval.

[0121] In one embodiment, when determining the points to be deleted, all nodes within the downsampling interval can be set as points to be deleted. These points include points in the origin cloud map and points in new laser data frames that have been successfully added to the origin cloud map. Alternatively, only points in the origin cloud map within the downsampling interval can be set as points to be deleted, excluding points in new laser data frames that have been successfully added to the origin cloud map.

[0122] In one embodiment, the specific points within the downsampling interval to be determined as the points to be deleted can be preset by the user.

[0123] In one embodiment, the downsampling and deletion operations triggered when adding a point in the original point cloud map simply set the first flag of the point to be deleted to true. During a search operation, this point or the subtree it represents is skipped. The node containing the point to be deleted is only actually deleted when the corresponding subtree is reconstructed. In another embodiment, if the range represented by the second flag T_area of ​​a subtree is completely surrounded by the downsampling interval, then the third flag T_delete, indicating whether the entire subtree has been deleted, needs to be set to true.

[0124] In step 104, the node information of the nodes on the paths of the points to be added and the points to be deleted is recursively updated in a bottom-up order.

[0125] In practice, the process can be recursively updated from the target addition position upwards, sequentially updating the values ​​of the fifth and sixth flag bits of the nodes on the path where the point to be added is located; and recursively updated from the point to be deleted upwards, sequentially updating the seventh flag bit of the nodes on the path where the point to be deleted is located.

[0126] In one embodiment, when a point to be added is added, and a point to be deleted within its downsampling interval is deleted, the flag bits of all nodes on its path are recursively updated from bottom to top. When adding a point, the values ​​of the fifth and sixth flag bits L_num and R_num of the node on the path need to be updated accordingly, while when deleting a point, the value of the seventh flag bit D_num of the node on the path needs to be updated accordingly.

[0127] In step 105, the subtree to be reconstructed is determined based on the node information of at least one node in the updated original tree structure.

[0128] In one embodiment, when determining whether a subtree needs to be rebuilt, two aspects can be considered: one is whether the proportion of "deleted" points in the subtree of the node is too large, and the other is whether the proportion of points in the left subtree and right subtree of a node is unbalanced.

[0129] In practice, the process can recursively proceed upwards from the leaf nodes of the paths associated with the points to be added and deleted. Based on the values ​​of the fifth and sixth flag bits of at least one node, it can be determined whether the subtree of the at least one node satisfies the first reconstruction condition (the first reconstruction condition indicates that the values ​​of the fifth and sixth flag bits differ significantly, i.e., the ratio of points in the left subtree to the right subtree is unbalanced). Based on the values ​​of the seventh, fifth, and sixth flag bits of the at least one node, it can be determined whether the subtree of the at least one node satisfies the second reconstruction condition (the second reconstruction condition indicates that the ratio of the value of the seventh flag bit to the sum of the values ​​of the fifth and sixth flag bits is too large, i.e., the proportion of "deleted" points in the subtree of that node is too large). If the subtree satisfies the first reconstruction condition and / or the second reconstruction condition, it is determined that it needs to be rebuilt.

[0130] It should be noted that starting from the leaf node of the path associated with the point to be added and the point to be deleted, recursively determining the subtree to be rebuilt and performing the reconstruction operation can ensure that the amount of data involved in each subtree reconstruction is as small as possible, thereby shortening the reconstruction time of each subtree. This is because the closer the subtree is to the leaf node, the fewer nodes it contains, and the shorter the reconstruction time required. Reconstructing the subtree closer to the leaf node first will completely delete the points marked for deletion in the subtree, so the number of points in the left and right subtrees of the upper-level node will also decrease, thus shortening the reconstruction time of the upper-level subtree.

[0131] In one embodiment, the first reconstruction condition may be that the ratio of the larger value to the smaller value of the fifth and sixth flag bits is greater than a set value, for example, the ratio of the larger value to the smaller value of the fifth and sixth flag bits is greater than 1.5; the first reconstruction condition may also be that the ratio of the smaller value to the larger value of the fifth and sixth flag bits is less than a set value, for example, the ratio of the smaller value to the larger value of the fifth and sixth flag bits is less than 0.75.

[0132] In one embodiment, the second reconstruction condition may be that the ratio of the value of the seventh flag bit to the sum of the values ​​of the fifth and sixth flag bits is too large. For example, if the ratio of the value of the seventh flag bit to the sum of the values ​​of the fifth and sixth flag bits is greater than 0.5, it indicates that the proportion of deleted points is too large, and therefore reconstruction is required.

[0133] In step 106, the subtree to be reconstructed is reconstructed.

[0134] In one embodiment, when reconstructing a subtree, if the subtree contains few points, all the points that were not "deleted" can be extracted directly to construct a new tree structure, which is then grafted onto the original subtree. If the subtree contains too many points, the root node of the subtree needs to be saved, and its fourth flag indicating whether it is being reconstructed is set to true. Then, a separate process is used for reconstruction. This process is normally in a dormant state, but is awakened when a subtree needs to be reconstructed. After reconstruction, the new tree structure is grafted onto the original tree structure.

[0135] It should be noted that the subtree reconstruction operation does not conflict with other functions of the tree structure. You can continue to perform corresponding add, search and other operations on the tree structure. However, when you find a subtree that is being reconstructed, you need to skip this subtree and continue the search.

[0136] In one embodiment, the specific implementation of reconstructing the subtree can be found in [reference needed]. Figure 2A The embodiments shown are not described in detail here.

[0137] In steps 101-106 above, when a new laser data frame is acquired, the new laser data frame can be downsampled to obtain points to be added; these points are added one by one to the original tree structure; in response to the successful addition of a point to be added to the original tree structure, the point to be deleted corresponding to the successfully added point is determined, and the first flag bit of the node where the point to be deleted is located is set to true, the first flag bit being used to indicate whether the node storage point has been deleted; the node information of the points to be added and the nodes on the paths where the points to be deleted are located is recursively updated in a bottom-up order; based on the node information of at least one node in the updated original tree structure, the subtree to be reconstructed is determined; and the subtree to be reconstructed is reconstructed. This disclosed technical solution, by storing point cloud maps in an improved tree structure, enables dynamic addition, deletion, and reconstruction of the tree structure, achieving long-term acquisition and processing of SLAM systems, and effectively avoiding the resource waste caused by needing to reconstruct the entire tree structure when a new laser data frame is available.

[0138] To better illustrate the scheme for updating the 3D point cloud map of this disclosure, another embodiment is described below.

[0139] Figure 2A This is a flowchart of the reconstruction process for the subtree to be reconstructed, as disclosed in this disclosure. Figure 2B This is a schematic diagram of the tree structure in the 3D point cloud map updating method disclosed herein. Figure 2C This is a flowchart illustrating the process of reconstructing a subtree using a subtree reconstruction thread as described in this disclosure. This embodiment uses the reconstruction of a subtree as an example for illustrative purposes. Figure 2AAs shown, it includes the following steps:

[0140] In step 201, the number of undeleted points in the subtree to be reconstructed is determined.

[0141] In one embodiment, after recursively determining the subtree to be reconstructed from the leaf nodes of the paths associated with the points to be added and deleted, the number of deleted points can be determined based on the value of the seventh flag bit D_num of each node on the path of each subtree, and the number of original stored points of the subtree can be determined based on the values ​​of the fifth and sixth flag bits. Then, the number of undeleted points in the subtree to be reconstructed can be determined by calculating the difference between the number of original stored points of the subtree and the number of deleted points. For example, if the left and right subtrees store information for 15 points in total, and the number of deleted points is 12, then there are only 3 undeleted points.

[0142] In step 202, in response to the number being less than a set threshold, a first tree structure is constructed using the undeleted points in the subtree to be reconstructed, and the first tree structure is then spliced ​​into the original tree structure.

[0143] In one embodiment, the threshold can be a pre-set fixed value, such as 5.

[0144] In one embodiment, when the number of undeleted points is less than a set threshold, the undeleted points in the subtree to be reconstructed can be directly extracted to construct a first tree structure, and then the constructed first tree structure can be spliced ​​into the original tree structure. Specifically, points whose first flag indicating whether a point has been deleted is extracted.

[0145] In one embodiment, after the subtree to be reconstructed is constructed, the node information of the nodes on the paths associated with the subtree to be reconstructed is updated accordingly, such as the number of left and right subtrees of the node, the number of deleted points of the node, etc. After the subtree is reconstructed, the points in the original subtree that were marked with the first flag as true but were not actually deleted are completely deleted after the subtree is reconstructed. Therefore, it is necessary to update the node information of the nodes on the upper-level paths of the subtree in sequence.

[0146] In step 203, in response to the number being not less than a set threshold, the fourth flag bit of the subtree to be rebuilt is set to true, and the reconstruction of the subtree to be rebuilt is performed by the subtree reconstruction thread.

[0147] In one embodiment, if the number of undeleted points is not less than a set threshold, it indicates that the subtree to be rebuilt contains too many points. In this case, the root node of the subtree to be rebuilt needs to be saved, and its fourth flag (T_rebuilding) indicating whether it is being rebuilt should be set to true. Then, a separate subtree rebuilding thread is used for reconstruction. The subtree rebuilding thread is normally in a dormant state and can be woken up when needed. The process of reconstructing the subtree using the subtree rebuilding thread can be found in [reference needed]. Figure 2C The illustrated embodiment, as Figure 2C This includes the following steps 231 to 233:

[0148] In step 231, the undeleted points in the subtree to be rebuilt are extracted, the subtree reconstruction thread is woken up, and a mutex lock is added to the subtree reconstruction thread.

[0149] In one embodiment, the undeleted points in the subtree to be reconstructed can be obtained by extracting the points whose first flag indicating whether a point has been deleted is set to false in each node of the subtree to be reconstructed.

[0150] In one embodiment, after waking up the subtree reconstruction thread, since the subtree reconstruction thread is performed independently of the main thread, there may be a situation where the point to be added happens to fall on the subtree to be rebuilt. When the point to be added happens to fall on the subtree to be rebuilt, it is necessary to add the point to be added to the subtree to be rebuilt.

[0151] In one embodiment, after waking up the subtree reconstruction thread, a mutex lock needs to be added to the subtree reconstruction thread.

[0152] In step 232, the subtree reconstruction thread constructs a second tree structure based on the undeleted points extracted from the subtree to be reconstructed, and then splices the second tree structure into the original tree structure.

[0153] In one embodiment, by reconstructing the subtree thread, the undeleted points in the subtree to be reconstructed are extracted to construct a second tree structure, and then the constructed second tree structure is grafted onto the original tree structure.

[0154] In one embodiment, it should be noted that the subtree reconstruction thread does not conflict with other functions. Therefore, when adding a point to the subtree to be reconstructed, the point to be added can be added to the list of undeleted points in the subtree to be reconstructed, so that the point to be added can also be added to the subtree when the subtree is reconstructed. When performing the operation of searching for a point, if it is found in the subtree being reconstructed, this subtree can be skipped and the search can be performed at other nodes in the original tree structure.

[0155] In step 233, the mutex is released and the fourth flag of the subtree to be rebuilt is set to false.

[0156] In one embodiment, after the subtree to be rebuilt is constructed, the mutex lock needs to be released and the subtree reconstruction thread needs to be terminated. Then, the node information of the nodes on the path associated with the subtree to be rebuilt is updated accordingly.

[0157] Through the above steps 201 to 203, when a subtree needs to be rebuilt, the subtree to be rebuilt can be rebuilt in a timely and fast manner, thereby solving the problem that the amount of data in the original tree structure may become larger and larger or the tree structure may become unbalanced due to the addition and deletion of points; moreover, the mutual exclusion between the rebuilt subtree and other processing of the tree structure can be maintained by setting mutual exclusion locks and other methods.

[0158] Figure 3 This is a flowchart illustrating one embodiment of the method for searching points in a 3D point cloud map according to the present disclosure; this embodiment uses the example of how to find points in a 3D point cloud map for illustrative purposes. Figure 3 As shown, it includes the following steps:

[0159] In step 301, a search instruction is received, which carries the three-dimensional coordinate information of the target point.

[0160] In step 302, the system traverses downwards from the root node, storing the first set number of points encountered in the target container. The target container stores the three-dimensional coordinate information of the set number of points and their maximum distance from the target point.

[0161] In one embodiment, the number of points can be a pre-defined value, such as 5. In order to find the point that best matches the target point, the traversal can start from the root node and go down, and the found points can be stored in the target container.

[0162] In one embodiment, to find a set number of points closest to the target point in the tree structure, a target container K can be allocated before starting the search, and the target container K can be used to store the nearest neighbor points. Then, starting from the root node, the target container K is initially 0 in size, so the first 5 traversed points are directly stored in the target container K. At the same time, the distance between all points in the target container K and the target point is calculated, and the points in the target container are sorted in ascending order of distance, and the distance between each point and the target point is saved. The farthest distance is denoted as d_max.

[0163] In step 303, in response to traversing to at least one node in the subtree that is not being rebuilt or deleted, the minimum distance between the subtree of the at least one node and the target point is calculated based on the value of the second flag bit of the at least one node.

[0164] In one embodiment, when traversing downward to a certain node p_curr, it is first necessary to determine that the third flag bit T_delete of p_curr is true and the fourth flag bit T_rebuilding of p_curr is true, and then calculate the minimum distance d_min between the interval where the subtree of this point is located and the target point. Since the second flag bit T_area of this node has stored the spatial size information of the subtree, the minimum distance d_min can be easily calculated by using the existing distance algorithm from a point to a space.

[0165] In one embodiment, if d_min >= d_max, directly skip this subtree and perform preorder traversal, which can save time. If d_min < d_max, then enter this subtree for traversal. First, check any node in the subtree to determine the first flag bit P_delete of the corresponding node. If this flag bit is false, calculate the distance d_curr between p_curr and the target point. If d_curr < d_max, then discard the point farthest from the target point in the target container and put p_curr into the target container, and at the same time update the d_max corresponding to the target container; if P_delete is true, then skip this node and traverse its left subtree and right subtree until all nodes are traversed to complete the search process.

[0166] In step 304, in response to the minimum distance being less than the maximum distance, calculate the distance between at least one point in the subtree of the at least one node and the target point, and use at least one point with a distance less than the maximum distance to replace the point corresponding to the maximum distance in the target container.

[0167] In step 305, update the maximum distance recorded in the target container.

[0168] In step 306, in response to traversing all nodes in the tree structure, return the target container.

[0169] In steps 303 to 306, when traversing downward to a certain node p_curr, it is first necessary to determine that the third flag bit T_delete of p_curr is true and the fourth flag bit T_rebuilding of p_curr is true, and then calculate the minimum distance d_min between the interval where the subtree of this point is located and the target point. Since the second flag bit T_area of this node has stored the spatial size information of the subtree, the minimum distance d_min can be easily calculated by using the existing distance algorithm from a point to a space.

[0170] In one embodiment, if d_min >= d_max, directly skip traversing this subtree in preorder, which can save time. If d_min < d_max, then enter this subtree for traversal. First, check any node in the subtree to determine the first flag bit P_delete of the corresponding node. If this flag bit is false, calculate the distance d_curr between p_curr and the target point. If d_curr < d_max, then discard the point farthest from the target point in the target container and put p_curr into the target container, and at the same time update the corresponding d_max of the target container. If P_delete is true, then skip this node and traverse its left subtree and right subtree until all nodes are traversed to complete the search process.

[0171] Through the above steps 301 to 306, when a point needs to be searched, during the nearest neighbor search, by making a geometric distance determination on the three-dimensional space where the subtree is located, the traversal path can be reduced and the search efficiency can be improved.

[0172] Corresponding to the embodiments of the method for updating the three-dimensional point cloud map described above, the present disclosure also provides corresponding embodiments of a device for updating the three-dimensional point cloud map.

[0173] Figure 4 FIG. is a schematic structural diagram of an embodiment of a device for updating a three-dimensional point cloud map of the present disclosure. This device is applied to an electronic device (such as a computer system, a server), as Figure 4 shown, this device includes:

[0174] A first processing module 41, configured to perform downsampling processing on the new laser data frame in response to obtaining the new laser data frame, so as to obtain points to be added;

[0175] An adding module 42, configured to add the points to be added to the original tree structure one by one, wherein the original point cloud map is stored in the original tree structure;

[0176] A second processing module 43, configured to add the points to be added to the original tree structure. In response to successfully adding a point to be added to the original tree structure, determine the point to be deleted corresponding to the successfully added point to be added, and set the first flag bit of the node where the point to be deleted is located to true. The first flag bit is used to indicate whether the point stored in the node is deleted;

[0177] A first updating module 44, configured to recursively update the node information of the nodes on the paths where the points to be added and the points to be deleted are located in the order from bottom to top;

[0178] A determining module 45, configured to determine a subtree to be reconstructed according to the node information of at least one node in the updated original tree structure;

[0179] Reconstruction module 46 is used to reconstruct the subtree to be reconstructed.

[0180] Figure 5 This is a schematic diagram of another embodiment of the three-dimensional point cloud map updating device disclosed herein, as shown below. Figure 4 As shown, in Figure 4 Based on the illustrated embodiment, in one embodiment, the node information of the node includes:

[0181] The first flag bit; the second flag bit used to indicate the spatial range information of the points stored in the subtree of the node; the third flag bit used to indicate whether the subtree of the node has been deleted; the fourth flag bit used to indicate whether the subtree of the node is being rebuilt; the eighth flag bit used to indicate whether the subtree of the node needs to be rebuilt; the fifth and sixth flag bits used to indicate the number of points stored in the left and right subtrees of the node; the seventh flag bit used to indicate the number of deleted points in the subtree of the node; the three-dimensional coordinate information of the node's stored points and the dividing axis.

[0182] In one embodiment, the first processing module 41 is specifically configured to, in response to acquiring a new laser data frame, perform downsampling processing on the new laser data frame to obtain the point to be added, including:

[0183] According to the set point cloud density, the point cloud corresponding to the new laser data frame is downsampled to obtain the points to be added.

[0184] In one embodiment, the second processing module 43 is specifically used to determine the points within a downsampling interval centered on the point to be added as the points to be deleted. The points within the downsampling interval include points in the original tree structure, or the points within the downsampling interval include points in the original tree structure and points to be added that have been successfully added to the original tree structure.

[0185] In one embodiment, the adding module 42 includes:

[0186] The first processing submodule 421 is used to recursively move downwards from the root node of the original tree structure and determine the target addition position of the point to be added in the original tree structure based on the relationship between the component of the point to be added and the node storage point in the original tree structure on the dividing axis.

[0187] The initialization submodule 422 is used to add the point to be added at the target addition location and initialize the node information value of the corresponding node according to the three-dimensional coordinate information of the point to be added.

[0188] In one embodiment, the first update module 44 includes:

[0189] The first update submodule 441 is used to recursively update the fifth or sixth flag bit of the node on the path where the point to be added is located, starting from the target addition position and going upwards.

[0190] The second update submodule 442 is used to recursively update the seventh flag bit of the nodes on the path where the point to be deleted is located, starting from the point to be deleted.

[0191] In one embodiment, the determining module 45 includes:

[0192] The first determining submodule 451 is used to recursively determine, starting from the leaf node of the path associated with the point to be added and the point to be deleted, whether the subtree of the at least one node satisfies the first reconstruction condition based on the value of the fifth flag bit and the value of the sixth flag bit of the at least one node.

[0193] The second determining submodule 452 is used to determine whether the subtree of the at least one node satisfies the second reconstruction condition based on the values ​​of the seventh flag bit, the fifth flag bit, and the sixth flag bit of the at least one node.

[0194] The third determining submodule 453 is used to determine the subtree that satisfies the first reconstruction condition and / or the second reconstruction condition as the subtree to be reconstructed.

[0195] Figure 6 This is a schematic diagram of another embodiment of the three-dimensional point cloud map updating device disclosed herein, as shown below. Figure 6 As shown, in Figure 4 and / or Figure 5 Based on the illustrated embodiment, in one embodiment, the reconstruction module 46 includes:

[0196] The fourth determining submodule 461 is used to determine the number of undeleted points in the subtree to be reconstructed;

[0197] The second processing submodule 462 is used to construct a first tree structure using the undeleted points in the subtree to be reconstructed in response to the number being less than a set threshold, and to splice the first tree structure into the original tree structure.

[0198] The reconstruction submodule 463 is used to set the fourth flag bit of the subtree to be reconstructed to true in response to the number being not less than a set threshold, and to perform the reconstruction of the subtree to be reconstructed through the reconstruction subtree thread.

[0199] In one embodiment, the reconstruction submodule 463 includes:

[0200] Extraction submodule 4631 is used to extract the undeleted points in the subtree to be reconstructed, wake up the subtree reconstruction thread and add a mutex lock to the subtree reconstruction thread;

[0201] The third processing submodule 4632 is used to construct a second tree structure based on the undeleted points extracted from the subtree to be reconstructed through the subtree reconstruction thread, and to splice the second tree structure into the original tree structure;

[0202] The fourth processing submodule 4633 is used to release the mutex lock and set the fourth flag bit of the subtree to be rebuilt to false.

[0203] In one embodiment, the device further includes:

[0204] The second update module 47 is used to update the node information of the nodes on the path associated with the subtree to be rebuilt after the subtree to be rebuilt is rebuilt.

[0205] In one embodiment, the device further includes:

[0206] The receiving module 48 is used to receive a search instruction, wherein the search instruction carries the three-dimensional coordinate information of the target point;

[0207] The third processing module 49 is used to traverse downwards from the root node and store the first set number of points traversed in the target container. The target container stores the three-dimensional coordinate information of the set number of points and the maximum distance to the target point.

[0208] The first calculation module 50 is used to calculate the minimum distance between the subtree of the at least one node and the target point based on the value of the second flag bit of the at least one node when traversing to at least one node whose subtree is not being rebuilt or deleted.

[0209] The second calculation module 51 is used to calculate the distance between at least one point in the subtree of the at least one node and the target point in response to the minimum distance being less than the maximum distance, and replace the point in the target container corresponding to the maximum distance with at least one point whose distance is less than the maximum distance;

[0210] The third update module 52 is used to update the maximum distance recorded in the target container;

[0211] Return module 53 is used to return the target container in response to traversing all nodes in the original tree structure.

[0212] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0213] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0214] Below, for reference Figure 7 This describes an electronic device according to embodiments of the present disclosure, wherein apparatus for implementing methods according to embodiments of the present disclosure may be integrated. Figure 7 This is a structural diagram of an electronic device provided in an illustrative embodiment of the present disclosure, such as... Figure 7 As shown, the electronic device includes one or more processors 71, one or more memory 72s of computer-readable storage media, and a computer program stored in the memory and executable on the processor. When the program in the memory 72 is executed, the aforementioned method for updating the 3D point cloud map can be implemented.

[0215] Specifically, in practical applications, the electronic device may also include components such as an input device 73 and an output device 74, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). Those skilled in the art will understand that... Figure 7 The structure of the electronic device shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or certain components, or different component arrangements. Wherein:

[0216] The processor 71 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities. It performs various functions and processes data by running or executing software programs and / or modules stored in memory 72 and calling data stored in memory 72, thereby providing overall monitoring of the electronic device.

[0217] The memory 72 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 71 may execute the program instructions to implement the three-dimensional point cloud map update method of the various embodiments of this disclosure described above and / or other desired functions. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.

[0218] The input device 73 can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0219] The output device 74 can output various information to the outside, including determined distance information, direction information, etc. The output device 74 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0220] Electronic devices may also include a power supply for powering various components, which can be logically connected to the processor 71 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The power supply may also include one or more DC or AC power sources, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and any other components.

[0221] Of course, for the sake of simplicity, Figure 7 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0222] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods for updating a three-dimensional point cloud map according to various embodiments of this disclosure as described in the "Exemplary Methods" section of this specification.

[0223] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0224] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods for updating a three-dimensional point cloud map according to various embodiments of this disclosure as described in the "Exemplary Methods" section of this specification.

[0225] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0226] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0227] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0228] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.

[0229] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0230] The description in this disclosure is provided for illustrative and descriptive purposes only and is not intended to be exhaustive or to limit the disclosure to its forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of this disclosure and to enable those skilled in the art to understand this disclosure and to design various embodiments with various modifications suitable for a particular purpose.

Claims

1. A method for updating a three-dimensional point cloud map, characterized in that, The method comprises: in response to obtaining a new laser data frame, performing down-sampling processing on the new laser data frame to obtain a to-be-added point; adding the to-be-added point to an original tree structure one by one, wherein an original point cloud map is stored in the original tree structure; in response to successfully adding a to-be-added point to the original tree structure, determining a to-be-deleted point corresponding to the successfully added to-be-added point, and setting a first flag bit of a node where the to-be-deleted point is located to true, the first flag bit being used to indicate whether the node stores a point that is deleted; recursively updating node information of nodes on a path where the to-be-added point and the to-be-deleted point are located in a bottom-up order; determining a to-be-reconstructed sub-tree according to the node information of at least one node in the original tree structure after being updated; reconstructing the to-be-reconstructed sub-tree.

2. The method of claim 1, wherein, The node information of the node comprises: the first flag bit, a second flag bit used to indicate spatial range information of points stored in a sub-tree of the node, a third flag bit used to indicate whether the sub-tree of the node is deleted, a fourth flag bit used to indicate whether the sub-tree of the node is being reconstructed, an eighth flag bit used to indicate whether the sub-tree of the node needs to be reconstructed, a fifth flag bit and a sixth flag bit used to indicate numbers of points stored in left and right sub-trees of the node, a seventh flag bit used to indicate a number of deleted points in the sub-tree of the node, three-dimensional coordinate information of a point stored in the node, and a split axis.

3. The method of claim 2, wherein, The method comprises: performing down-sampling processing on point clouds corresponding to the new laser data frame according to a set point cloud density to obtain the to-be-added point.

4. The method of claim 2, wherein, The method comprises: determining points in a down-sampling interval range centered on the to-be-added point as the to-be-deleted points, the points in the down-sampling interval range comprising points in the original tree structure, or the points in the down-sampling interval range comprising points in the original tree structure and the to-be-added points that have been successfully added to the original tree structure.

5. The method of claim 2, wherein, The method comprises: recursively starting from a root node of the original tree structure, determining a target adding position where the to-be-added point is added to the original tree structure according to a size relationship of components of the to-be-added point and points stored in nodes in the original tree structure on a split axis; adding the to-be-added point to the target adding position, and initializing values of node information of corresponding nodes according to three-dimensional coordinate information of the to-be-added point.

6. The method of claim 5, wherein, The method comprises: recursively starting from the target adding position, sequentially updating the fifth flag bit or the sixth flag bit of nodes on a path where the to-be-added point is located; recursively starting from the to-be-deleted point, sequentially updating the seventh flag bit of nodes on a path where the to-be-deleted point is located.

7. The method of claim 5, wherein, The method comprises: recursively starting from a leaf node of a path associated with the to-be-added point and the to-be-deleted point, determining whether a sub-tree of at least one node satisfies a first reconstruction condition according to a value of a fifth flag bit and a value of a sixth flag bit of the at least one node; determining whether a sub-tree of the at least one node satisfies a second reconstruction condition according to a value of a seventh flag bit, the value of the fifth flag bit and the value of the sixth flag bit of the at least one node; determining the sub-tree satisfying the first reconstruction condition and / or the second reconstruction condition as the to-be-reconstructed sub-tree.

8. The method of claim 7, wherein, the reconstruction of the to-be-reconstructed sub-tree comprises: determining a number of non-deleted points in the to-be-reconstructed sub-tree; in response to the number being less than a set threshold, constructing a first tree structure using the non-deleted points in the to-be-reconstructed sub-tree, and splicing the first tree structure into the original tree structure; in response to the number being not less than the set threshold, setting a fourth flag bit of the to-be-reconstructed sub-tree to true, and performing the reconstruction of the to-be-reconstructed sub-tree by a reconstruction sub-tree thread.

9. The method of claim 8, wherein, the reconstruction of the to-be-reconstructed sub-tree by the reconstruction sub-tree thread comprises: extracting the non-deleted points in the to-be-reconstructed sub-tree, waking up the reconstruction sub-tree thread and adding a mutual exclusion lock to the reconstruction sub-tree thread; constructing a second tree structure according to the extracted non-deleted points in the to-be-reconstructed sub-tree by the reconstruction sub-tree thread, and splicing the second tree structure into the original tree structure; releasing the mutual exclusion lock, and setting the fourth flag bit of the to-be-reconstructed sub-tree to false.

10. The method of claim 1, wherein, after the reconstruction of the to-be-reconstructed sub-tree, the method further comprises: correspondingly updating node information of nodes on a path associated with the to-be-reconstructed sub-tree.

11. The method of claim 2, wherein, the method further comprises: receiving a search instruction, the search instruction carrying three-dimensional coordinate information of a target point; starting from a root node and traversing downward, storing a preset number of points traversed in a target container, the target container storing three-dimensional coordinate information of a preset number of points and a maximum distance from the target point; in response to traversing at least one node of a sub-tree that is not being reconstructed and has not been deleted, calculating a minimum distance from the target point to the sub-tree of the at least one node according to a value of a second flag bit of the at least one node; in response to the minimum distance being less than the maximum distance, calculating distances from the target point to at least one point in the sub-tree of the at least one node, and replacing a point corresponding to the maximum distance in the target container with at least one point having a distance less than the maximum distance; updating the maximum distance recorded in the target container; in response to traversing all nodes in the original tree structure, returning the target container.

12. An updating apparatus of a three-dimensional point cloud map, characterized by comprising: the apparatus comprises: a first processing module configured to, in response to obtaining a new laser data frame, perform down-sampling processing on the new laser data frame to obtain a to-be-added point; an adding module configured to add the to-be-added point to an original tree structure one by one, wherein an original point cloud map is stored in the original tree structure; The second processing module is configured to, in response to successfully adding one to-be-added point into the original tree structure, determine a to-be-deleted point corresponding to the successfully added to-be-added point, and set a first flag bit of a node where the to-be-deleted point is located to true, the first flag bit being used to indicate whether a point stored in the node is deleted; The first updating module is configured to update node information of nodes on a path where the to-be-added point and the to-be-deleted point are located in a bottom-up order in a recursive manner; The determining module is configured to determine a to-be-reconstructed sub-tree according to the node information of at least one node in the updated original tree structure; The reconstructing module is configured to reconstruct the to-be-reconstructed sub-tree.

Citation Information

Patent Citations

  • System and methodology for providing compact B-Tree

    US20030204513A1

  • High-definition map creation method and device, and electronic device

    US20230042968A1