Data searching method and device for automatic driving positioning and computer device

CN118673195BActive Publication Date: 2026-09-22CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410800547.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2026-09-22
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

[0003]本发明的目的之一在于提供一种用于自动驾驶定位的数据查找方法、装置、计算机设备及存储介质,以解决如何提升最近邻搜索的效率

Benefits of technology

目标哈希值对应的目标桶对应于目标点所在的目标网格,目标第一邻近桶哈希值对应的第一邻近桶对应目标网格的周围的网格。从由目标哈希值对应的目标桶、每个目标第一邻近桶哈希值对应的第一邻近桶组成的第一桶集合中查找目标点对应的最近邻点,相当于由目标网格、目标网格的周围的网格组成的少量的网格的存储在目标哈希表中的点中查找目标点对应的最近邻点。减少最近邻搜索涉及的点的数量,提升最近邻搜索的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673195B_ABST
    Figure CN118673195B_ABST
Patent Text Reader

Abstract

The application relates to a data searching method and device for automatic driving positioning, computer equipment and a storage medium. The method comprises the following steps: determining a target grid where a target point is located from a plurality of grids according to the coordinates of the target point; determining a target hash value corresponding to the target point according to the position information of the target grid; when the target hash value is less than or equal to the parameter value of a maximum hash value parameter, determining a plurality of first adjacent bucket hash values of the target hash value according to the target hash value and a first hash value offset of each preset direction; determining at least one target first adjacent bucket hash value from the plurality of first adjacent bucket hash values, and searching for a nearest neighbor point corresponding to the target point from a first bucket set, wherein the first bucket set comprises a target bucket corresponding to the target hash value, a first adjacent bucket corresponding to each target first adjacent bucket hash value, and the target bucket corresponding to the target hash value and the first adjacent bucket corresponding to the target first adjacent bucket hash value are in a target hash table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and specifically to a data retrieval method, apparatus, computer device, and storage medium for autonomous driving positioning. Background Technology

[0002] Nearest neighbor search, which searches for the points closest to a given point, is a common operation in software systems such as autonomous driving systems. In related technologies, a tree structure is built, with each point as a node. However, nearest neighbor search requires traversing a large number of nodes, sometimes even the entire tree structure, resulting in low efficiency. This, in turn, leads to low localization efficiency in autonomous driving functions. Therefore, improving the efficiency of nearest neighbor search and thus improving autonomous driving localization efficiency has become a problem that needs to be solved. Summary of the Invention

[0003] One of the objectives of this invention is to provide a data retrieval method, apparatus, computer device, and storage medium for autonomous driving positioning, in order to address how to improve the efficiency of nearest neighbor search.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: Based on the coordinates of the target point, determine the target grid where the target point is located from multiple grids; Based on the location information of the target grid, determine the target hash value corresponding to the target point; When the target hash value is less than or equal to the parameter value of the maximum hash value parameter, multiple first neighbor bucket hash values ​​of the target hash value are determined based on the target hash value and the first hash value offset of each preset direction. At least one target first neighbor bucket hash value is determined from the plurality of first neighbor bucket hash values, and the nearest neighbor point corresponding to the target point is found from the first bucket set, wherein the first bucket set includes: the target bucket corresponding to the target hash value, and the first neighbor bucket corresponding to each target first neighbor bucket hash value, wherein the target bucket corresponding to the target hash value and the first neighbor bucket corresponding to the target first neighbor bucket hash value are in the target hash table.

[0005] Based on the aforementioned technical methods, the target bucket corresponding to the target hash value corresponds to the target grid where the target point is located, and the first neighbor bucket corresponding to the target's first neighbor bucket hash value corresponds to the grid surrounding the target grid. Searching for the nearest neighbor of the target point from the first bucket set, composed of the target bucket corresponding to the target hash value and the first neighbor buckets corresponding to each target's first neighbor bucket hash value, is equivalent to searching for the nearest neighbor of the target point from the points stored in the target hash table, which consists of the target grid and the small number of grids surrounding the target grid. This reduces the number of points involved in the nearest neighbor search and improves the efficiency of the nearest neighbor search.

[0006] Furthermore, it also includes: When no nearest neighbor is found in the first bucket set, multiple second neighbor bucket hash values ​​of the target hash value are determined based on the target hash value corresponding to the target point and the offset of the second hash value in each preset direction. At least one target second neighbor bucket hash value is determined from the plurality of second neighbor bucket hash values, and the nearest neighbor point corresponding to the target point is found from the second bucket set, the second bucket set including: the second neighbor bucket corresponding to each target second neighbor bucket hash value, wherein the second neighbor bucket corresponding to the target second neighbor bucket hash value is in the target hash table.

[0007] Furthermore, before determining at least one target first neighbor bucket hash value from the plurality of first neighbor bucket hash values, the method further includes: Determine whether the target bucket exists in the target hash table; If not, create the target bucket and store the target bucket in the target hash table.

[0008] Furthermore, it also includes: When the target hash value is greater than the parameter value of the maximum hash value parameter, the parameter value of the maximum hash value parameter is updated to the target hash value.

[0009] Furthermore, it also includes: Based on the parameter values ​​of the target hash value and the maximum hash value parameter, the maximum hash value offset for each preset direction is determined, wherein, for each preset direction, the maximum hash value offset for the preset direction is used to determine the corresponding hash value offset for the preset direction.

[0010] A data retrieval device, characterized in that: the data retrieval device comprises: The first determining unit is used to determine the target grid where the target point is located from multiple grids based on the coordinates of the target point; The second determining unit is used to determine the target hash value corresponding to the target point based on the location information of the target grid; The third determining unit is used to determine multiple first neighboring bucket hash values ​​of the target hash value based on the target hash value and the first hash value offset of each preset direction when the target hash value is less than or equal to the parameter value of the maximum hash value parameter. The fourth determining unit is used to determine at least one target first neighboring bucket hash value from the plurality of first neighboring bucket hash values, and to find the nearest neighbor point corresponding to the target point from the first bucket set, wherein the first bucket set includes: the target bucket corresponding to the target hash value, and the first neighboring bucket corresponding to each target first neighboring bucket hash value, wherein the target bucket corresponding to the target hash value and the first neighboring bucket corresponding to the target first neighboring bucket hash value are in the target hash table.

[0011] Furthermore, the data retrieval device also includes: The continuing search unit is used to determine multiple second neighbor bucket hash values ​​of the target hash value based on the target hash value corresponding to the target point and the second hash value offset in each preset direction when no nearest neighbor point corresponding to the target point is found from the first bucket set; determine at least one target second neighbor bucket hash value from the multiple second neighbor bucket hash values; and search for the nearest neighbor point corresponding to the target point from the second bucket set, wherein the second bucket set includes: the second neighbor bucket corresponding to each target second neighbor bucket hash value, wherein the second neighbor bucket corresponding to the target second neighbor bucket hash value is in the target hash table.

[0012] Furthermore, the data retrieval device also includes: The fifth determining unit is configured to determine whether the target bucket exists in the target hash table before determining at least one target first neighboring bucket hash value from the plurality of first neighboring bucket hash values; if not, to create the target bucket and store the target bucket in the target hash table.

[0013] Furthermore, the data retrieval device also includes: The update unit is used to update the parameter value of the maximum hash value parameter to the target hash value when the target hash value is greater than the parameter value of the maximum hash value parameter.

[0014] Furthermore, the data retrieval device also includes: The sixth determining unit is used to determine the maximum hash value offset for each preset direction based on the parameter values ​​of the target hash value and the maximum hash value parameter, wherein, for each preset direction, the maximum hash value offset for the preset direction is used to determine the corresponding hash value offset for the preset direction.

[0015] A computer device, comprising: The system includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the above-described method.

[0016] A computer-readable storage medium storing computer instructions for causing a computer to perform the above-described method.

[0017] A computer program product, characterized in that it includes computer instructions, the computer instructions being used to cause a computer to perform the above-described method.

[0018] The beneficial effects of this invention are: The target bucket corresponding to the target hash value corresponds to the target grid where the target point is located, and the first neighbor bucket corresponding to the target's first neighbor bucket hash value corresponds to the grid surrounding the target grid. Finding the nearest neighbor of the target point from the first bucket set, which consists of the target bucket corresponding to the target hash value and the first neighbor buckets corresponding to each target's first neighbor bucket hash value, is equivalent to finding the nearest neighbor of the target point from the points stored in the target hash table, which consists of the target grid and a small number of grids surrounding the target grid. This reduces the number of points involved in the nearest neighbor search and improves the efficiency of the nearest neighbor search. Attached Figure Description

[0019] Figure 1 A flowchart illustrating the data retrieval method provided in an embodiment of the present invention; Figure 2 A diagram illustrating multiple grids and their corresponding hash values. Figure 3 A diagram illustrating the first neighbor bucket hashes of the target hash value; Figure 4 A flowchart illustrating another data search method provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0020] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0021] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0022] refer to Figure 1 The diagram illustrates a flowchart of the data retrieval method provided in an embodiment of the present invention.

[0023] In step S101, the target grid where the target point is located is determined from multiple grids based on the coordinates of the target point.

[0024] The coordinates of the target point are in a pre-established two-dimensional coordinate system. The point to which the coordinates of the target point belong is in the pre-established two-dimensional coordinate system.

[0025] As an example, the localization function in autonomous driving needs to search for the nearest neighbor of the target point. The pre-established two-dimensional coordinate system is based on the road surface. The coordinates of the target point can represent the position of an object on the road surface, and the coordinates of the nearest neighbor of the target point represent the position of the object on the road surface that is closest to that object.

[0026] In this embodiment of the invention, the grid where the target point is located is called the target grid.

[0027] In this embodiment of the invention, multiple grids are obtained by dividing the region in a pre-established two-dimensional coordinate system.

[0028] Each grid can be a square and have the same side length.

[0029] In this embodiment of the invention, the location information of the target grid where the target point is located can be determined based on the side length of the grid. Thus, the target grid is determined.

[0030] Multiple grids can form a grid array. The location information of the target grid can be represented by: the row and column of the grid array in which the target grid is located.

[0031] The location information of the target grid may include: the row number of the grid array in which the target grid is located, and the column number of the grid array in which the target grid is located.

[0032] The location information of the target grid can be determined using the following formula: hx= floor(abs(x) / bucketWidth_); hy =floor(abs(y) / bucketWidth_).

[0033] Where hx represents the row number of the grid array containing the target grid, hy represents the column number of the grid array containing the target grid, bucketWidth is the side length of the grid, x is the coordinate value of the target point in the horizontal direction of the two-dimensional coordinate system, i.e., the px axis, y is the coordinate value of the target point in the vertical direction of the two-dimensional coordinate system, i.e., the py axis, and floor() represents rounding down.

[0034] In step S102, the target hash value corresponding to the target point is determined based on the location information of the target grid.

[0035] In this embodiment of the invention, the hash value corresponding to the target point is called the target hash value.

[0036] The target hash value corresponding to the target point is: the hash value corresponding to the target grid.

[0037] The target hash value, i.e., the hash value corresponding to the target grid, can be calculated using the following formula: hash_value=hx * factor + hy.

[0038] Where hash_value is the target hash value, factor is a pre-set large constant, hx represents the row number of the grid array where the target grid is located, and hy represents the column number of the grid array where the target grid is located.

[0039] In the embodiments described in this specification, the target hash table includes: a bucket.

[0040] Each bucket in the target hash table has a different storage location within the target hash table. Each bucket in the target hash table corresponds to a different hash value.

[0041] For a bucket in the target hash table, the storage location corresponding to the hash value of that bucket is located.

[0042] Each bucket in the target hash table corresponds to a different grid.

[0043] Each grid corresponds to a different hash value.

[0044] For a bucket in the target hash table, the hash value corresponding to that bucket is the hash value of the grid corresponding to that bucket.

[0045] For a given grid, the hash value corresponding to that grid is the hash value of the point in that grid.

[0046] For a grid, each point in the grid corresponds to the same hash value. The coordinates of each point in the grid are stored in a bucket located at the storage location corresponding to the same hash value. The bucket located at the storage location corresponding to the same hash value is the bucket corresponding to the grid.

[0047] refer to Figure 2 It shows a schematic diagram of multiple grids and the hash values ​​corresponding to the multiple grids.

[0048] Figure 2 The diagram shows the horizontal coordinate axis (px axis) and the vertical coordinate axis (py axis) of a two-dimensional coordinate system. Figure 2Multiple grids are shown, forming a grid array. Each grid is a square. The numbers in the grids represent the hash values ​​corresponding to the grid points. For example, the grid with the number 4005 has a hash value of 4005, and every point in that grid has a hash value of 4005. Similarly, the grid with the number 5005 has a hash value of 5005, and every point in that grid has a hash value of 5005. The grid with the number 6005 has a hash value of 6005, and every point in that grid has a hash value of 6005. If the grid with the number 5005 is the target grid, then the maximum hash value offset to the left is 5, to the right is 4, down is 5, and up is 4.

[0049] In one possible implementation, before determining at least one target first neighbor bucket hash value from multiple first neighbor bucket hash values, the method further includes: determining whether a target bucket exists in the target hash table; if it is determined that the target bucket does not exist in the target hash table, creating the target bucket, and storing the target bucket in the target hash table. Thus, it eliminates the requirement to create buckets in all storage locations of the target hash table for nearest neighbor search, improving the convenience of nearest neighbor search.

[0050] In step S103, when the target hash value is less than or equal to the parameter value of the maximum hash value parameter, multiple first neighboring bucket hash values ​​of the target hash value are determined based on the target hash value and the first hash value offset of each preset direction.

[0051] The maximum hash value parameter indicates the maximum hash value corresponding to each bucket in the target hash table. In other words, the maximum hash value parameter indicates the largest hash value in the set of hash values ​​consisting of the hash values ​​corresponding to each bucket in the target hash table.

[0052] It should be noted that the maximum hash value corresponding to the bucket in the target hash table should be understood as a variable.

[0053] In step S103, the target hash value is compared with the parameter value of the maximum hash value parameter. When the target hash value is less than or equal to the parameter value of the maximum hash value parameter, multiple first neighbor bucket hash values ​​of the target hash value are determined based on the target hash value and the first hash value offset in each preset direction.

[0054] In this embodiment of the invention, the preset direction is either horizontal or vertical. There are four preset directions: up, down, left, and right.

[0055] It should be noted that the left direction can be called the negative X-axis direction in a two-dimensional coordinate system. The right direction can be called the positive X-axis direction in a two-dimensional coordinate system. The up direction can be called the positive Y-axis direction in a two-dimensional coordinate system. The down direction can be called the negative Y-axis direction in a two-dimensional coordinate system.

[0056] The first hash value offset for each preset direction can be determined based on the preset first hash value offset for each preset direction.

[0057] For each preset direction, the preset first hash value offset for that preset direction is either a positive or negative integer, which is preset.

[0058] For each preset direction, the preset first hash value offset for that preset direction is preset.

[0059] In the embodiments of the invention, the absolute value of the preset first hash value offset for each preset direction can be the same value.

[0060] As an example, the absolute value of the preset first hash value offset for each preset direction is 1.

[0061] For each preset direction, the preset first hash value offset for that preset direction is either a positive or negative integer, which is preset.

[0062] In the embodiments of the invention, the absolute value of the preset first hash value offset for each preset direction can be the same value.

[0063] As an example, the absolute value of the preset first hash value offset for each preset direction is 1.

[0064] The default first hash value offset in the left direction is a negative integer, the default first hash value offset in the right direction is a positive integer, the default first hash value offset in the down direction is a negative integer, and the default first hash value offset in the up direction is a positive integer.

[0065] In an embodiment of the present invention, for a preset direction, if the preset first hash value offset of the preset direction is less than or equal to the maximum hash value offset of the preset direction, the preset first hash value offset of the preset direction can be determined as the first hash value offset of the preset direction.

[0066] In this embodiment of the invention, for a preset direction, if the preset first hash value offset of the preset direction is greater than the maximum hash value offset of the preset direction, then the maximum hash value offset of the preset direction can be determined as the first hash value offset of the preset direction.

[0067] In this embodiment of the invention, for a preset direction, the maximum hash value offset of the preset direction can be: the index of the last grid in the preset direction minus the index of the target grid in the preset direction. The index of the last grid in the preset direction is i, indicating that the last grid in the preset direction is the (i+1)th grid in that preset direction. The index of the target grid in the preset direction is j, indicating that the target grid is the (j+1)th grid in that preset direction.

[0068] One possible implementation further includes: determining the maximum hash value offset for each preset direction based on the parameter values ​​of the target hash value and the maximum hash value parameter, wherein, for each preset direction, the maximum hash value offset for that preset direction is used to determine the corresponding hash value offset for that preset direction. Thus, the maximum hash value offset for the preset direction can be determined quickly. The maximum hash value offset to the left can be calculated using the following formula: expend_x_l = floor(hash_value / factor_) * -1.

[0069] Where expend_x_l is the maximum hash value offset to the left, hash_value is the target hash value, and factor is a pre-set large constant.

[0070] The maximum hash value offset to the right can be calculated using the following formula: expend_x_r = floor((max_hash - hash_value) / factor); Where expend_x_l represents the maximum hash value offset to the right, hash_value is the target hash value, factor is a pre-set large constant, and max_hash is the parameter value of the maximum hash value parameter.

[0071] The maximum hash value offset in the downward direction can be calculated using the following formula, denoted as expend_y_d: expend_y_d = (hash_value % factor) * -1; Where expend_y_d is the maximum hash value offset in the downward direction, hash_value is the target hash value, and factor is a pre-set large constant.

[0072] The maximum hash value offset in the upward direction can be calculated using the following formula: expend_y_u = (max_hash- hash_value) % factor.

[0073] Where expend_y_u is the maximum hash value offset in the upward direction, hash_value is the target hash value, and factor is a pre-set large constant.

[0074] In step S103, a first interval is determined with the first hash value offset to the right as its right endpoint and the first hash value offset to the left as its left endpoint. Each positive integer within the first interval is used as a first hash value offset within the first interval. A second interval is determined with the first hash value offset to the up direction as its right endpoint and the first hash value offset to the down direction as its left endpoint. Each positive integer within the second interval is used as a first hash value offset within the second interval. The first hash value offsets within the first interval and the first hash value offsets within the second interval can be combined to obtain multiple combinations of first hash value offsets. The first neighboring bucket hash value corresponding to each combination of first hash value offsets is calculated, and the first neighboring bucket hash value corresponding to each combination of first hash value offsets is used as multiple first neighboring bucket hash values ​​for the target hash value.

[0075] In this embodiment of the invention, the hash value of the first neighboring bucket corresponding to a first hash value offset combination can be calculated using the following formula: neighborHash=hash_value+dx*factor+dy Wherein, neighborHash is the hash value of the first neighboring bucket corresponding to the first hash value offset combination, hash_value is the target hash value, dx is the first hash value offset in the first interval of the first hash value offset combination, and dy is the first hash value offset in the second interval of the first hash value offset combination.

[0076] As an example, the first hash value offset in the upward direction is 1, the first hash value offset in the downward direction is -1, the first hash value offset in the left direction is -1, and the first hash value offset in the right direction is 1. Determine a first interval with the first hash value offset in the right direction as its right endpoint and the first hash value offset in the left direction as its left endpoint; this first interval is [-1, 1]. Determine a second interval with the first hash value offset in the upward direction as its right endpoint and the first hash value offset in the downward direction as its left endpoint; this second interval is [-1, 1]. Use each positive integer in the first interval (-1, 0, 1) as a first hash value offset within that first interval. Use each positive integer in the second interval (-1, 0, 1) as a first hash value offset within that second interval. Multiple combinations of first hash value offsets can be obtained. The multiple combinations of first hash value offsets include: a combination of first hash value offsets consisting of a first hash value offset within a first interval of -1 and a first hash value offset within a second interval of -1; a combination of first hash value offsets consisting of a first hash value offset within a first interval of -1 and a first hash value offset within a second interval of 0; and a combination of first hash value offsets consisting of a first hash value offset within a first interval of -1 and a first hash value offset within a second interval of 1. The multiple combinations of first hash value offsets also include: a combination of first hash value offsets consisting of a first hash value offset within a first interval of 0 and a first hash value offset within a second interval of -1; a combination of first hash value offsets consisting of a first hash value offset within a first interval of 0 and a first hash value offset within a second interval of 0; and a combination of first hash value offsets consisting of a first hash value offset within a first interval of 0 and a first hash value offset within a second interval of 1. The multiple combinations of first hash value offsets also include: a combination of first hash value offsets consisting of first hash value offsets in a first interval that are 1 and first hash value offsets in a second interval that are -1; a combination of first hash value offsets consisting of first hash value offsets in a first interval that are 1 and first hash value offsets in a second interval that are 0; and a combination of first hash value offsets consisting of first hash value offsets in a first interval that are 1 and first hash value offsets in a second interval that are 1.

[0077] If the first hash value offset in the upward direction is 1, the first hash value offset in the downward direction is -1, the first hash value offset in the left direction is -1, and the first hash value offset in the right direction is 1, the process of calculating the first neighbor bucket hash value corresponding to each combination of first hash value offsets can be represented by the following pseudocode: for(int dx=1; dx<=1;x++){ for(int dy=-1; dy=1;y++) { intneighborHash=(hash_value+dx*factor+dy) } } refer to Figure 3 It shows a schematic diagram of multiple first neighboring bucket hashes of the target hash value.

[0078] In this example, the first hash value offset is 1 in the upward direction, -1 in the downward direction, -1 in the left direction, and 1 in the right direction. The target hash value is 5005, and the factor is 1000. Figure 3 The target mesh and the mesh surrounding the target mesh are shown. Figure 3 The target hash value corresponding to the target grid is shown as 5005. Figure 3 The diagram illustrates multiple first neighbor bucket hash values ​​for the target hash value calculated using the formula described above for calculating the hash value corresponding to a point. These first neighbor bucket hash values ​​include: 5005+0*1000+1 (5006), 5005+0*1000-1 (5004), 5005-1*1000+1 (4006), 5005-1*1000+0 (4005), 5005-1*1000-1 (4004), 5005+1*1000+1 (6006), 5005+1*1000+0 (6005), and 5005+1*1000-1 (6004). The grid corresponding to each first neighbor bucket hash value is the grid surrounding the target grid. The point whose coordinates belong to the first neighbor bucket corresponding to the first neighbor bucket hash value is the point within the grid corresponding to the first neighbor bucket hash value. For example, the grid with a first neighbor bucket hash value of 5006 is the grid closest to the target grid in the upward direction. The grid with a first neighbor bucket hash value of 5004 is the grid closest to the target grid in the downward direction. The grid with a first neighbor bucket hash value of 4005 is the grid closest to the target grid in the left direction. The grid with a first neighbor bucket hash value of 6005 is the grid closest to the target grid in the right direction.

[0079] One possible implementation also includes updating the maximum hash value parameter to the target hash value when the target hash value is greater than the maximum hash value parameter. Thus, the target hash value can be used for subsequent nearest neighbor searches of other points' corresponding nearest neighbor points.

[0080] In step S104, at least one target first neighboring bucket hash value is determined from multiple first neighboring bucket hash values, and the nearest neighbor point corresponding to the target point is found from the first bucket set.

[0081] In step S104, for a first neighboring bucket hash value, it can be determined whether there is a bucket in the storage location corresponding to the first neighboring bucket hash value in the target hash table. If there is a bucket in the storage location corresponding to the first neighboring bucket hash value, the first neighboring bucket hash value can be determined as the target first neighboring bucket hash value.

[0082] The first bucket set includes: the target bucket corresponding to the target hash value, and the first neighbor bucket corresponding to the first neighbor bucket hash value of each target.

[0083] The target bucket corresponding to the target hash value is stored in the target hash table at the storage location corresponding to the target hash value.

[0084] For a target first neighbor bucket hash value, the first neighbor bucket corresponding to the target first neighbor bucket hash value is stored in the target hash table at the storage location corresponding to the target first neighbor bucket hash value.

[0085] In step S104, in order to find the nearest neighbor of the target point from the first bucket set, the point set of the first bucket set can be determined.

[0086] The first bucket set includes: the point belonging to each coordinate in the target bucket corresponding to the target hash value, and the point set of the first neighboring bucket corresponding to the first neighboring bucket hash value of each target.

[0087] For a target first neighbor bucket hash value, the set of points in the first neighbor bucket corresponding to the target first neighbor bucket hash value includes: the point to which each coordinate in the first neighbor bucket to which the target first neighbor bucket hash value belongs.

[0088] In step S104, if the point set of the first bucket set is empty, it can be determined that no nearest neighbor point corresponding to the target point has been found in the first bucket set.

[0089] In step S104, if the point set of the first bucket is not empty, the Euclidean distance between each point in the point set of the first bucket and the target point can be calculated. The point with the smallest Euclidean distance to the target point in the point set of the first bucket can be determined, and this point is identified as the nearest neighbor of the target point.

[0090] refer to Figure 4 The diagram illustrates a flowchart of another data search method provided by an embodiment of the present invention.

[0091] In step S401, the target grid where the target point is located is determined from multiple grids based on the coordinates of the target point.

[0092] The process of step S401 is the same as that of step S101.

[0093] In step S402, the target hash value corresponding to the target point is determined based on the location information of the target grid.

[0094] The process of step S402 is the same as that of step S102.

[0095] In step S403, when the target hash value is less than or equal to the parameter value of the maximum hash value parameter, multiple first neighboring bucket hash values ​​of the target hash value are determined based on the target hash value and the first hash value offset of each preset direction.

[0096] The process of step S403 is the same as that of step S103.

[0097] In step S404, at least one target first neighboring bucket hash value is determined from multiple first neighboring bucket hash values, and the nearest neighbor point corresponding to the target point is found from the first bucket set.

[0098] The process of step S404 is the same as that of step S104.

[0099] In step S405, when no nearest neighbor point corresponding to the target point is found from the first bucket set, multiple second neighbor bucket hash values ​​of the target hash value are determined based on the target hash value corresponding to the target point and the second hash value offset of each preset direction.

[0100] As an example, the second hash value offset is 2 in the upward direction, -2 in the downward direction, -2 in the left direction, and 2 in the right direction.

[0101] It should be noted that, in this embodiment of the invention, multiple k-th neighboring bucket hash values ​​of the target hash value can be determined based on the target hash value corresponding to the target point and the k-th hash value offset in each preset direction. The k-th hash value offset in each preset direction can be determined based on a preset k-th hash value offset in each preset direction.

[0102] For each preset direction, the absolute value of the preset k-th hash value offset of the preset direction is greater than the absolute value of the preset (k-1)-th hash value offset of the preset direction. The result of subtracting the absolute value of the preset (k-1)-th hash value offset of the preset direction from the absolute value of the preset k-th hash value offset of the preset direction is the preset search radius increment value.

[0103] For each preset direction, the preset second hash value offset for that preset direction is either a positive or negative integer, which is preset.

[0104] For each preset direction, the preset second hash value offset for that preset direction is preset.

[0105] In the embodiments of the invention, the absolute value of the preset second hash value offset for each preset direction can be the same value.

[0106] As an example, the absolute value of the preset second hash value offset for each preset direction is 2.

[0107] For each preset direction, the absolute value of the preset second hash value offset of that preset direction is greater than the absolute value of the preset first hash value offset of that preset direction. The result of subtracting the absolute value of the preset first hash value offset of that preset direction from the absolute value of the preset second hash value offset of that preset direction is the preset search radius increment value. As an example, the preset search radius increment value is 1.

[0108] In an embodiment of the present invention, for a preset direction, if the preset second hash value offset of the preset direction is less than or equal to the maximum hash value offset of the preset direction, the preset second hash value offset of the preset direction can be used as the second hash value offset of the preset direction.

[0109] In this embodiment of the invention, for a preset direction, if the preset second hash value offset of the preset direction is greater than the maximum hash value offset of the preset direction, then the maximum hash value offset of the preset direction can be used as the second hash value offset of the preset direction.

[0110] In step S405, a first set consisting of the second hash value offsets in the right direction and the second hash value offsets in the left direction can be determined. A second set consisting of the second hash value offsets in the upward direction and the second hash value offsets in the downward direction can be determined. The second hash value offsets in the first set and the second set are combined to obtain multiple combinations of second hash value offsets. The second neighbor bucket hash value corresponding to each combination of second hash value offsets is calculated, and the second neighbor bucket hash value corresponding to each combination of second hash value offsets is used as multiple second neighbor bucket hash values ​​of the target hash value.

[0111] In this embodiment of the invention, the second neighboring bucket hash value corresponding to a second hash value offset combination can be calculated using the following formula: neighborHash'=hash_value+dx'*factor+dy' Wherein, neighborHash' is the second neighboring bucket hash value corresponding to the second hash value offset combination, hash_value is the target hash value, dx' is the second hash value offset belonging to the first set in the second hash value offset combination, and dy' is the second hash value offset belonging to the second set in the second hash value offset combination.

[0112] In step S406, at least one target second neighbor bucket hash value is determined from multiple second neighbor bucket hash values, and the nearest neighbor point corresponding to the target point is found from the second bucket set.

[0113] The second bucket set includes the second neighbor bucket corresponding to the hash value of the second neighbor bucket for each target.

[0114] Among them, the second neighboring bucket corresponding to the target second neighboring bucket hash value is in the target hash table.

[0115] In step S406, for a second neighboring bucket hash value, it can be determined whether there is a bucket in the storage location corresponding to the second neighboring bucket hash value in the target hash table. If there is a bucket in the storage location corresponding to the second neighboring bucket hash value, the second neighboring bucket hash value can be determined as the target second neighboring bucket hash value.

[0116] For a target second neighbor bucket hash value, the second neighbor bucket corresponding to the target second neighbor bucket hash value is stored in the target hash table at the storage location corresponding to the target second neighbor bucket hash value.

[0117] In step S406, in order to find the nearest neighbor of the target point from the second bucket set, the point set of the second bucket set can be determined.

[0118] The set of points in the second bucket set includes the set of points in the second neighboring bucket corresponding to the hash value of the second neighboring bucket for each target.

[0119] For a target second neighbor bucket hash value, the set of points in the second neighbor bucket corresponding to the target second neighbor bucket hash value includes: the point to which each coordinate in the second neighbor bucket to which the target second neighbor bucket hash value belongs.

[0120] In step S406, if the point set of the second bucket set is empty, it can be determined that no nearest neighbor point corresponding to the target point has been found in the second bucket set.

[0121] In step S406, if the point set of the second bucket is not empty, the Euclidean distance between each point in the point set of the second bucket and the target point can be calculated. The point in the point set of the second bucket with the smallest Euclidean distance to the target point can be determined, and this point is identified as the nearest neighbor of the target point.

[0122] By using steps S405-S406, if the nearest neighbor of the target point is not found in the first bucket set, the search for the nearest neighbor of the target point can continue.

[0123] This invention also provides a data retrieval device for implementing the above-described method embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "unit" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated. The devices in this invention are presented in the form of functional units, where a functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory executing one or more software or fixed programs, and / or other devices that can provide the above-described functions.

[0124] A data retrieval device, characterized in that: the data retrieval device comprises: The first determining unit is used to determine the target grid where the target point is located from multiple grids based on the coordinates of the target point; The second determining unit is used to determine the target hash value corresponding to the target point based on the location information of the target grid; The third determining unit is used to determine multiple first neighboring bucket hash values ​​of the target hash value based on the target hash value and the first hash value offset of each preset direction when the target hash value is less than or equal to the parameter value of the maximum hash value parameter. The fourth determining unit is used to determine at least one target first neighboring bucket hash value from the plurality of first neighboring bucket hash values, and to find the nearest neighbor point corresponding to the target point from the first bucket set, wherein the first bucket set includes: the target bucket corresponding to the target hash value, and the first neighboring bucket corresponding to each target first neighboring bucket hash value, wherein the target bucket corresponding to the target hash value and the first neighboring bucket corresponding to the target first neighboring bucket hash value are in the target hash table.

[0125] Furthermore, the data retrieval device also includes: The continuing search unit is used to determine multiple second neighbor bucket hash values ​​of the target hash value based on the target hash value corresponding to the target point and the second hash value offset in each preset direction when no nearest neighbor point corresponding to the target point is found from the first bucket set; determine at least one target second neighbor bucket hash value from the multiple second neighbor bucket hash values; and search for the nearest neighbor point corresponding to the target point from the second bucket set, wherein the second bucket set includes: the second neighbor bucket corresponding to each target second neighbor bucket hash value, wherein the second neighbor bucket corresponding to the target second neighbor bucket hash value is in the target hash table.

[0126] Furthermore, the data retrieval device also includes: The fifth determining unit is configured to determine whether the target bucket exists in the target hash table before determining at least one target first neighboring bucket hash value from the plurality of first neighboring bucket hash values; if not, to create the target bucket and store the target bucket in the target hash table.

[0127] Furthermore, the data retrieval device also includes: The update unit is used to update the parameter value of the maximum hash value parameter to the target hash value when the target hash value is greater than the parameter value of the maximum hash value parameter.

[0128] Furthermore, the data retrieval device also includes: The sixth determining unit is used to determine the maximum hash value offset for each preset direction based on the parameter values ​​of the target hash value and the maximum hash value parameter, wherein, for each preset direction, the maximum hash value offset for the preset direction is used to determine the corresponding hash value offset for the preset direction.

[0129] refer to Figure 5 , Figure 5This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. The computer device includes one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple devices can be connected, each providing some necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). The processor 10 can be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device can be a complex programmable logic device (CLP), a field-programmable gate array (FPGA), a general-purpose array logic (GPRS), or any combination thereof. The memory 20 stores instructions executable by at least one processor 10 to perform the methods shown in the above embodiments. The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on vehicle usage, etc. Furthermore, the memory 20 may include high-speed random access memory and non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid-state drive; the memory 20 may also include combinations of the above types of memory. The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 may be connected via a bus or other means. The input device 30 can receive input digital or character information, and generate key signal inputs related to user settings and function control of the computer device, such as touch screen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc.The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor). The aforementioned display device includes, but is not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.

[0130] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0131] A portion of the embodiments of this invention can be applied as a computer program product, such as computer program instructions. When executed by a computer, these instructions, through the operation of the computer, can invoke or provide the methods and / or technical solutions according to the invention. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Accordingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0132] The above embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention.

Claims

1. A data retrieval method for autonomous driving positioning, characterized in that: The method includes: Based on the coordinates of the target point, the target grid where the target point is located is determined from multiple grids. The coordinates of the target point are coordinates in a pre-established two-dimensional coordinate system. The coordinates of the target point are used to represent the position of an object on the road surface. The pre-established two-dimensional coordinate system is based on the road surface. The multiple grids are obtained by dividing the area under the two-dimensional coordinate system based on the road surface. Based on the location information of the target grid, determine the target hash value corresponding to the target point; When the target hash value is less than or equal to the parameter value of the maximum hash value parameter, multiple first neighbor bucket hash values ​​of the target hash value are determined based on the target hash value and the first hash value offset of each preset direction. At least one target first neighbor bucket hash value is determined from the plurality of first neighbor bucket hash values, and the nearest neighbor point corresponding to the target point is found from the first bucket set, wherein the first bucket set includes: the target bucket corresponding to the target hash value, and the first neighbor bucket corresponding to each target first neighbor bucket hash value, wherein the target bucket corresponding to the target hash value and the first neighbor bucket corresponding to the target first neighbor bucket hash value are in the target hash table, and the nearest neighbor point corresponding to the target point represents the object on the road that is closest to the object.

2. The method according to claim 1, characterized in that: The method further includes: When no nearest neighbor is found in the first bucket set, multiple second neighbor bucket hash values ​​of the target hash value are determined based on the target hash value corresponding to the target point and the offset of the second hash value in each preset direction. At least one target second neighbor bucket hash value is determined from the plurality of second neighbor bucket hash values, and the nearest neighbor point corresponding to the target point is found from the second bucket set, the second bucket set including: the second neighbor bucket corresponding to each target second neighbor bucket hash value, wherein the second neighbor bucket corresponding to the target second neighbor bucket hash value is in the target hash table.

3. The method according to claim 1, characterized in that: Before determining at least one target first neighbor bucket hash value from the plurality of first neighbor bucket hash values, the method further includes: Determine whether the target bucket exists in the target hash table; If not, create the target bucket and store the target bucket in the target hash table.

4. The method according to claim 1, characterized in that: The method further includes: When the target hash value is greater than the parameter value of the maximum hash value parameter, the parameter value of the maximum hash value parameter is updated to the target hash value.

5. The method according to any one of claims 1-4, characterized in that: The method further includes: Based on the parameter values ​​of the target hash value and the maximum hash value parameter, the maximum hash value offset for each preset direction is determined, wherein, for each preset direction, the maximum hash value offset for the preset direction is used to determine the corresponding hash value offset for the preset direction.

6. A data retrieval device for autonomous driving positioning, characterized in that: The device includes: The first determining unit is used to determine the target grid where the target point is located from multiple grids based on the coordinates of the target point. The coordinates of the target point are coordinates in a pre-established two-dimensional coordinate system. The coordinates of the target point are used to represent the position of an object on the road surface. The pre-established two-dimensional coordinate system is established based on the road surface. The multiple grids are obtained by dividing the area under the two-dimensional coordinate system established based on the road surface. The second determining unit is used to determine the target hash value corresponding to the target point based on the location information of the target grid; The third determining unit is used to determine multiple first neighboring bucket hash values ​​of the target hash value based on the target hash value and the first hash value offset of each preset direction when the target hash value is less than or equal to the parameter value of the maximum hash value parameter. The fourth determining unit is used to determine at least one target first neighbor bucket hash value from the plurality of first neighbor bucket hash values, and to find the nearest neighbor point corresponding to the target point from the first bucket set, wherein the first bucket set includes: the target bucket corresponding to the target hash value, and the first neighbor bucket corresponding to each target first neighbor bucket hash value, wherein the target bucket corresponding to the target hash value and the first neighbor bucket corresponding to the target first neighbor bucket hash value are in the target hash table, and the nearest neighbor point corresponding to the target point represents the object on the road that is closest to the object.

7. The apparatus according to claim 6, characterized in that: The device further includes: The continuing search unit is used to determine multiple second neighbor bucket hash values ​​of the target hash value based on the target hash value corresponding to the target point and the second hash value offset in each preset direction when no nearest neighbor point corresponding to the target point is found from the first bucket set; determine at least one target second neighbor bucket hash value from the multiple second neighbor bucket hash values; and search for the nearest neighbor point corresponding to the target point from the second bucket set, wherein the second bucket set includes: the second neighbor bucket corresponding to each target second neighbor bucket hash value, wherein the second neighbor bucket corresponding to the target second neighbor bucket hash value is in the target hash table.

8. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 5.

10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Neighbor searching method and neighbor searching system

    CN103020321A

  • System And Method For High-Dimensional Similarity Search

    US20100070509A1